Skip to content
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

add support for cloudfront invalidation resource fixes #13298 #37561

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iwarapter
Copy link
Contributor

Description

Add resource for CloudFront Invalidation:

Relations

Closes #13298

Output from Acceptance Testing

%  make testacc TESTS=TestAccCloudFrontInvalidation PKG=cloudfront
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/cloudfront/... -v -count 1 -parallel 20 -run='TestAccCloudFrontInvalidation'  -timeout 360m
=== RUN   TestAccCloudFrontInvalidation_basic
=== PAUSE TestAccCloudFrontInvalidation_basic
=== CONT  TestAccCloudFrontInvalidation_basic
--- PASS: TestAccCloudFrontInvalidation_basic (262.03s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront 266.116s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/cloudfront Issues and PRs that pertain to the cloudfront service. generators Relates to code generators. labels May 16, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label May 16, 2024
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels May 16, 2024
Copy link

@RalphBragg RalphBragg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the approve.

@Nowaker
Copy link

Nowaker commented May 22, 2024

@iwarapter As the author of the submission, you have the copyright. Could you also submit this to OpenTofu so the fix can reach many more users?


* `distribution_id` - (Required) CloudFront Distribution ID.
* `paths` - (Required) List of paths to invalidate.
* `triggers` (Optional) Map of arbitrary keys and values that, when changed, will trigger a re-invocation. To force a re-invocation without changing these keys/values, use the [`terraform taint` command](https://www.terraform.io/docs/commands/taint.html).
Copy link
Contributor

@KyMidd KyMidd May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we provide an example of using triggers? And maybe more information about what happens if no triggers are specified. I assume if no triggers are specified the invalidation will be performed 1 time ever (on initial "resource create"), but triggers would make it happen basically on demand (that is awesome, btw).

NOTE: I'm not a maintainer, I just think this is a neat change. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean more like, provide an example on the http example page in this PR. Thank you for the link! I want to learn more about this, I'm a n00b with aspirations of knowing what you're doing in this PR one day. :)

@KyMidd
Copy link
Contributor

KyMidd commented May 22, 2024

@iwarapter As the author of the submission, you have the copyright. Could you also submit this to OpenTofu so the fix can reach many more users?

@Nowaker: The AWS provider is open source under the MPL-2.0 license, so this change, once merged, should be usable by the Tofu community too! <3

@Nowaker
Copy link

Nowaker commented May 22, 2024

@KyMidd Ah, cool, thanks for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. generators Relates to code generators. service/cloudfront Issues and PRs that pertain to the cloudfront service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cloudfront Invalidation paths options
5 participants