New modules: cloudmap_namespace and cloudmap_info - #2411
Conversation
New modules for managing AWS Cloud Map namespaces (public and private DNS) and querying namespace/service/instance information. Includes: - cloudmap_namespace: create/delete with wait support, SOA property handling, DuplicateRequest tolerance on delete, namespace_type required for both present and absent states to prevent wrong-target deletion - cloudmap_info: query by namespace name or ID with optional instance details - Integration tests covering create, idempotency, info queries, delete, and delete idempotency for both public and private namespaces - Registered both modules in meta/runtime.yml action_groups
Docs Build 📝Thank you for contribution!✨ The docsite for this PR is available for download as an artifact from this run: You can compare to the docs for the File changes:
Click to see the diff comparison.NOTE: only file modifications are shown here. New and deleted files are excluded. diff --git a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/cloudfront_response_headers_policy_module.html b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/cloudfront_response_headers_policy_module.html
index da0464e..82e0993 100644
--- a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/cloudfront_response_headers_policy_module.html
+++ b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/cloudfront_response_headers_policy_module.html
@@ -22,7 +22,7 @@
<script src="../../../_static/sphinx_highlight.js?v=6ffebe34"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="search" title="Search" href="../../../search.html" />
- <link rel="next" title="community.aws.codebuild_project module – Create or delete an AWS CodeBuild project" href="codebuild_project_module.html" />
+ <link rel="next" title="community.aws.cloudmap_info module – Retrieve information about AWS Cloud Map services and instances" href="cloudmap_info_module.html" />
<link rel="prev" title="community.aws.cloudfront_origin_access_identity module – Create, update and delete origin access identities for a CloudFront distribution" href="cloudfront_origin_access_identity_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
@@ -494,7 +494,7 @@ see <a class="reference internal" href="#ansible-collections-community-aws-cloud
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="cloudfront_origin_access_identity_module.html" class="btn btn-neutral float-left" title="community.aws.cloudfront_origin_access_identity module – Create, update and delete origin access identities for a CloudFront distribution" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
- <a href="codebuild_project_module.html" class="btn btn-neutral float-right" title="community.aws.codebuild_project module – Create or delete an AWS CodeBuild project" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
+ <a href="cloudmap_info_module.html" class="btn btn-neutral float-right" title="community.aws.cloudmap_info module – Retrieve information about AWS Cloud Map services and instances" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
diff --git a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/codebuild_project_module.html b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/codebuild_project_module.html
index 02074ff..1053fe6 100644
--- a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/codebuild_project_module.html
+++ b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/codebuild_project_module.html
@@ -23,7 +23,7 @@
<script src="../../../_static/js/theme.js"></script>
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="community.aws.codecommit_repository module – Manage repositories in AWS CodeCommit" href="codecommit_repository_module.html" />
- <link rel="prev" title="community.aws.cloudfront_response_headers_policy module – Create, update and delete response headers policies to be used in a Cloudfront distribution" href="cloudfront_response_headers_policy_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
+ <link rel="prev" title="community.aws.cloudmap_namespace module – Create or delete AWS Cloud Map namespaces" href="cloudmap_namespace_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
@@ -801,7 +801,7 @@ see <a class="reference internal" href="#ansible-collections-community-aws-codeb
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
- <a href="cloudfront_response_headers_policy_module.html" class="btn btn-neutral float-left" title="community.aws.cloudfront_response_headers_policy module – Create, update and delete response headers policies to be used in a Cloudfront distribution" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
+ <a href="cloudmap_namespace_module.html" class="btn btn-neutral float-left" title="community.aws.cloudmap_namespace module – Create or delete AWS Cloud Map namespaces" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="codecommit_repository_module.html" class="btn btn-neutral float-right" title="community.aws.codecommit_repository module – Manage repositories in AWS CodeCommit" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
diff --git a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/index.html b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/index.html
index 7f63cd4..cad9a47 100644
--- a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/index.html
+++ b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/index.html
@@ -202,6 +202,8 @@
<li><p><a class="reference internal" href="cloudfront_invalidation_module.html#ansible-collections-community-aws-cloudfront-invalidation-module"><span class="std std-ref">cloudfront_invalidation module</span></a> – create invalidations for AWS CloudFront distributions</p></li>
<li><p><a class="reference internal" href="cloudfront_origin_access_identity_module.html#ansible-collections-community-aws-cloudfront-origin-access-identity-module"><span class="std std-ref">cloudfront_origin_access_identity module</span></a> – Create, update and delete origin access identities for a CloudFront distribution</p></li>
<li><p><a class="reference internal" href="cloudfront_response_headers_policy_module.html#ansible-collections-community-aws-cloudfront-response-headers-policy-module"><span class="std std-ref">cloudfront_response_headers_policy module</span></a> – Create, update and delete response headers policies to be used in a Cloudfront distribution</p></li>
+<li><p><a class="reference internal" href="cloudmap_info_module.html#ansible-collections-community-aws-cloudmap-info-module"><span class="std std-ref">cloudmap_info module</span></a> – Retrieve information about AWS Cloud Map services and instances</p></li>
+<li><p><a class="reference internal" href="cloudmap_namespace_module.html#ansible-collections-community-aws-cloudmap-namespace-module"><span class="std std-ref">cloudmap_namespace module</span></a> – Create or delete AWS Cloud Map namespaces</p></li>
<li><p><a class="reference internal" href="codebuild_project_module.html#ansible-collections-community-aws-codebuild-project-module"><span class="std std-ref">codebuild_project module</span></a> – Create or delete an AWS CodeBuild project</p></li>
<li><p><a class="reference internal" href="codecommit_repository_module.html#ansible-collections-community-aws-codecommit-repository-module"><span class="std std-ref">codecommit_repository module</span></a> – Manage repositories in AWS CodeCommit</p></li>
<li><p><a class="reference internal" href="codepipeline_module.html#ansible-collections-community-aws-codepipeline-module"><span class="std std-ref">codepipeline module</span></a> – Create or delete AWS CodePipelines</p></li>
diff --git a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/index_module.html b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/index_module.html
index 70b206e..e1023a1 100644
--- a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/index_module.html
+++ b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/index_module.html
@@ -145,6 +145,8 @@
<li><p><a class="reference internal" href="community/aws/cloudfront_invalidation_module.html#ansible-collections-community-aws-cloudfront-invalidation-module"><span class="std std-ref">community.aws.cloudfront_invalidation</span></a> – create invalidations for AWS CloudFront distributions</p></li>
<li><p><a class="reference internal" href="community/aws/cloudfront_origin_access_identity_module.html#ansible-collections-community-aws-cloudfront-origin-access-identity-module"><span class="std std-ref">community.aws.cloudfront_origin_access_identity</span></a> – Create, update and delete origin access identities for a CloudFront distribution</p></li>
<li><p><a class="reference internal" href="community/aws/cloudfront_response_headers_policy_module.html#ansible-collections-community-aws-cloudfront-response-headers-policy-module"><span class="std std-ref">community.aws.cloudfront_response_headers_policy</span></a> – Create, update and delete response headers policies to be used in a Cloudfront distribution</p></li>
+<li><p><a class="reference internal" href="community/aws/cloudmap_info_module.html#ansible-collections-community-aws-cloudmap-info-module"><span class="std std-ref">community.aws.cloudmap_info</span></a> – Retrieve information about AWS Cloud Map services and instances</p></li>
+<li><p><a class="reference internal" href="community/aws/cloudmap_namespace_module.html#ansible-collections-community-aws-cloudmap-namespace-module"><span class="std std-ref">community.aws.cloudmap_namespace</span></a> – Create or delete AWS Cloud Map namespaces</p></li>
<li><p><a class="reference internal" href="community/aws/codebuild_project_module.html#ansible-collections-community-aws-codebuild-project-module"><span class="std std-ref">community.aws.codebuild_project</span></a> – Create or delete an AWS CodeBuild project</p></li>
<li><p><a class="reference internal" href="community/aws/codecommit_repository_module.html#ansible-collections-community-aws-codecommit-repository-module"><span class="std std-ref">community.aws.codecommit_repository</span></a> – Manage repositories in AWS CodeCommit</p></li>
<li><p><a class="reference internal" href="community/aws/codepipeline_module.html#ansible-collections-community-aws-codepipeline-module"><span class="std std-ref">community.aws.codepipeline</span></a> – Create or delete AWS CodePipelines</p></li>
|
There was a problem hiding this comment.
Pull request overview
This PR introduces new Ansible modules to manage and query AWS Cloud Map namespaces, and adds an integration test target to validate namespace lifecycle and info lookups.
Changes:
- Added
cloudmap_namespacemodule to create/delete public and private DNS namespaces with optional wait support. - Added
cloudmap_infomodule to query namespaces and list services/instances. - Registered both modules in
meta/runtime.ymland added integration tests undertests/integration/targets/cloudmap_namespace.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
plugins/modules/cloudmap_namespace.py |
Implements create/delete logic, wait/polling, properties and tag handling for Cloud Map namespaces. |
plugins/modules/cloudmap_info.py |
Implements namespace resolution plus service and instance listing and formatting. |
meta/runtime.yml |
Adds the new modules to the aws action group. |
tests/integration/targets/cloudmap_namespace/tasks/main.yml |
Integration coverage for create/idempotency/info queries/delete/idempotent delete. |
tests/integration/targets/cloudmap_namespace/tasks/99_cleanup.yml |
Cleanup logic for namespaces and VPC used in tests. |
tests/integration/targets/cloudmap_namespace/defaults/main.yml |
Defines default namespace names/description for the test target. |
tests/integration/targets/cloudmap_namespace/meta/main.yml |
Adds empty dependencies for the integration target. |
tests/integration/targets/cloudmap_namespace/aliases |
Registers the integration target aliases and timeout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 4m 55s (non-voting) |
- Fix properties PascalCase bug (capitalize_first=True) and add TTL normalization - Normalize namespace return data to consistent snake_case via format_namespace() - Update RETURN docs to match actual output - Validate service_id belongs to the resolved namespace in cloudmap_info - Make namespace_type required, drop redundant required_if
|
Build failed.
|
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
|
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 3m 53s (non-voting) |
- Add check_mode tests for cloudmap_namespace create/delete (both public and private) and cloudmap_info queries - Fix PascalCase assertion keys (Id, Type, Name) to match snake_case output from format_namespace() (id, type, name) - Fix pep8 line-too-long in namespace_type docstring
|
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 5m 01s (non-voting) |
Summary
cloudmap_namespacemodule for creating/deleting AWS Cloud Map public and private DNS namespaces with wait support, SOA property handling, and DuplicateRequest tolerance on deletecloudmap_infomodule for querying Cloud Map namespaces, services, and instances by name or IDmeta/runtime.ymlaction groupsTest plan
ansible-test integration --docker default cloudmap_namespaceansible-test sanitypylint and validate-modules checks pass