-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Modules: cloudfront_cache_policy
and cloudfront_origin_request_policy
#2046
base: main
Are you sure you want to change the base?
New Modules: cloudfront_cache_policy
and cloudfront_origin_request_policy
#2046
Conversation
…man/community.aws into cloudfrontCreateCacheAndOriginPolicy
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/cloudformation_stack_set_module.html b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/cloudformation_stack_set_module.html
index 5a1609a..b53cc13 100644
--- a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/cloudformation_stack_set_module.html
+++ b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/cloudformation_stack_set_module.html
@@ -22,7 +22,7 @@
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="search" title="Search" href="../../../search.html" />
- <link rel="next" title="community.aws.cloudfront_distribution module – Create, update and delete AWS CloudFront distributions" href="cloudfront_distribution_module.html" />
+ <link rel="next" title="community.aws.cloudfront_cache_policy module – Create, update and delete cache policies to be used in a Cloudfront distribution’s cache behavior" href="cloudfront_cache_policy_module.html" />
<link rel="prev" title="community.aws.cloudformation_exports_info module – Read a value from CloudFormation Exports" href="cloudformation_exports_info_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
@@ -667,7 +667,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="cloudformation_exports_info_module.html" class="btn btn-neutral float-left" title="community.aws.cloudformation_exports_info module – Read a value from CloudFormation Exports" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
- <a href="cloudfront_distribution_module.html" class="btn btn-neutral float-right" title="community.aws.cloudfront_distribution module – Create, update and delete AWS CloudFront distributions" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
+ <a href="cloudfront_cache_policy_module.html" class="btn btn-neutral float-right" title="community.aws.cloudfront_cache_policy module – Create, update and delete cache policies to be used in a Cloudfront distribution’s cache behavior" 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/cloudfront_distribution_module.html b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/cloudfront_distribution_module.html
index 1f264d7..f0941e2 100644
--- a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/cloudfront_distribution_module.html
+++ b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/cloudfront_distribution_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.cloudfront_distribution_info module – Obtain facts about an AWS CloudFront distribution" href="cloudfront_distribution_info_module.html" />
- <link rel="prev" title="community.aws.cloudformation_stack_set module – Manage groups of CloudFormation stacks" href="cloudformation_stack_set_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
+ <link rel="prev" title="community.aws.cloudfront_cache_policy module – Create, update and delete cache policies to be used in a Cloudfront distribution’s cache behavior" href="cloudfront_cache_policy_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
@@ -2715,7 +2715,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="cloudformation_stack_set_module.html" class="btn btn-neutral float-left" title="community.aws.cloudformation_stack_set module – Manage groups of CloudFormation stacks" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
+ <a href="cloudfront_cache_policy_module.html" class="btn btn-neutral float-left" title="community.aws.cloudfront_cache_policy module – Create, update and delete cache policies to be used in a Cloudfront distribution’s cache behavior" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="cloudfront_distribution_info_module.html" class="btn btn-neutral float-right" title="community.aws.cloudfront_distribution_info module – Obtain facts about an AWS CloudFront distribution" 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/cloudfront_origin_access_identity_module.html b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/cloudfront_origin_access_identity_module.html
index 1bf9d08..90736cb 100644
--- a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/cloudfront_origin_access_identity_module.html
+++ b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/cloudfront_origin_access_identity_module.html
@@ -22,7 +22,7 @@
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="search" title="Search" href="../../../search.html" />
- <link rel="next" 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" />
+ <link rel="next" title="community.aws.cloudfront_origin_request_policy module – Create, update and delete origin request policies to be used in a Cloudfront distribution’s cache behavior" href="cloudfront_origin_request_policy_module.html" />
<link rel="prev" title="community.aws.cloudfront_invalidation module – create invalidations for AWS CloudFront distributions" href="cloudfront_invalidation_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
@@ -482,7 +482,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_invalidation_module.html" class="btn btn-neutral float-left" title="community.aws.cloudfront_invalidation module – create invalidations for AWS CloudFront distributions" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
- <a href="cloudfront_response_headers_policy_module.html" class="btn btn-neutral float-right" title="community.aws.cloudfront_response_headers_policy module – Create, update and delete response headers policies to be used in a Cloudfront distribution" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
+ <a href="cloudfront_origin_request_policy_module.html" class="btn btn-neutral float-right" title="community.aws.cloudfront_origin_request_policy module – Create, update and delete origin request policies to be used in a Cloudfront distribution’s cache behavior" 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/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 43de027..ba9b3d6 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
@@ -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.codebuild_project module – Create or delete an AWS CodeBuild project" href="codebuild_project_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 -->
+ <link rel="prev" title="community.aws.cloudfront_origin_request_policy module – Create, update and delete origin request policies to be used in a Cloudfront distribution’s cache behavior" href="cloudfront_origin_request_policy_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
@@ -513,7 +513,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="cloudfront_origin_request_policy_module.html" class="btn btn-neutral float-left" title="community.aws.cloudfront_origin_request_policy module – Create, update and delete origin request policies to be used in a Cloudfront distribution’s cache behavior" 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>
</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 ddd2ccd..4865d36 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
@@ -200,10 +200,12 @@
<li><p><a class="reference internal" href="batch_job_queue_module.html#ansible-collections-community-aws-batch-job-queue-module"><span class="std std-ref">batch_job_queue module</span></a> – Manage AWS Batch Job Queues</p></li>
<li><p><a class="reference internal" href="cloudformation_exports_info_module.html#ansible-collections-community-aws-cloudformation-exports-info-module"><span class="std std-ref">cloudformation_exports_info module</span></a> – Read a value from CloudFormation Exports</p></li>
<li><p><a class="reference internal" href="cloudformation_stack_set_module.html#ansible-collections-community-aws-cloudformation-stack-set-module"><span class="std std-ref">cloudformation_stack_set module</span></a> – Manage groups of CloudFormation stacks</p></li>
+<li><p><a class="reference internal" href="cloudfront_cache_policy_module.html#ansible-collections-community-aws-cloudfront-cache-policy-module"><span class="std std-ref">cloudfront_cache_policy module</span></a> – Create, update and delete cache policies to be used in a Cloudfront distribution’s cache behavior</p></li>
<li><p><a class="reference internal" href="cloudfront_distribution_module.html#ansible-collections-community-aws-cloudfront-distribution-module"><span class="std std-ref">cloudfront_distribution module</span></a> – Create, update and delete AWS CloudFront distributions</p></li>
<li><p><a class="reference internal" href="cloudfront_distribution_info_module.html#ansible-collections-community-aws-cloudfront-distribution-info-module"><span class="std std-ref">cloudfront_distribution_info module</span></a> – Obtain facts about an AWS CloudFront distribution</p></li>
<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_origin_request_policy_module.html#ansible-collections-community-aws-cloudfront-origin-request-policy-module"><span class="std std-ref">cloudfront_origin_request_policy module</span></a> – Create, update and delete origin request policies to be used in a Cloudfront distribution’s cache behavior</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="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>
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 1e89b37..8e4d5d0 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
@@ -143,10 +143,12 @@
<li><p><a class="reference internal" href="community/aws/batch_job_queue_module.html#ansible-collections-community-aws-batch-job-queue-module"><span class="std std-ref">community.aws.batch_job_queue</span></a> – Manage AWS Batch Job Queues</p></li>
<li><p><a class="reference internal" href="community/aws/cloudformation_exports_info_module.html#ansible-collections-community-aws-cloudformation-exports-info-module"><span class="std std-ref">community.aws.cloudformation_exports_info</span></a> – Read a value from CloudFormation Exports</p></li>
<li><p><a class="reference internal" href="community/aws/cloudformation_stack_set_module.html#ansible-collections-community-aws-cloudformation-stack-set-module"><span class="std std-ref">community.aws.cloudformation_stack_set</span></a> – Manage groups of CloudFormation stacks</p></li>
+<li><p><a class="reference internal" href="community/aws/cloudfront_cache_policy_module.html#ansible-collections-community-aws-cloudfront-cache-policy-module"><span class="std std-ref">community.aws.cloudfront_cache_policy</span></a> – Create, update and delete cache policies to be used in a Cloudfront distribution’s cache behavior</p></li>
<li><p><a class="reference internal" href="community/aws/cloudfront_distribution_module.html#ansible-collections-community-aws-cloudfront-distribution-module"><span class="std std-ref">community.aws.cloudfront_distribution</span></a> – Create, update and delete AWS CloudFront distributions</p></li>
<li><p><a class="reference internal" href="community/aws/cloudfront_distribution_info_module.html#ansible-collections-community-aws-cloudfront-distribution-info-module"><span class="std std-ref">community.aws.cloudfront_distribution_info</span></a> – Obtain facts about an AWS CloudFront distribution</p></li>
<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_origin_request_policy_module.html#ansible-collections-community-aws-cloudfront-origin-request-policy-module"><span class="std std-ref">community.aws.cloudfront_origin_request_policy</span></a> – Create, update and delete origin request policies to be used in a Cloudfront distribution’s cache behavior</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/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>
|
…man/community.aws into cloudfrontCreateCacheAndOriginPolicy
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 25s (non-voting) |
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 4m 40s (non-voting) |
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 4m 47s (non-voting) |
region: '{{ aws_region }}' | ||
block: | ||
|
||
- name: Create a simple cache policy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also please add some tests for check_mode and idempotency?
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Build failed. ❌ ansible-galaxy-importer FAILURE in 5m 04s (non-voting) |
c27c8e3
to
9d49a0d
Compare
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 5m 19s (non-voting) |
SUMMARY
Currently, there is no module available for creating and modifying CloudFront Cache Policies and Origin Request Policies. This makes it difficult to use custom ones with the
cloudfront_distribution
module.Therefore this PR is to add modules for these 2 resources. As these resources are similar in management and functions to CloudFront Response Header Policies that are managed by the
cloudfront_response_headers_policy
module, this PR is heavily based on the work in #925.ISSUE TYPE
COMPONENT NAME
cloudfront_cache_policy
cloudfront_origin_request_policy