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

r/aws_cloudfront_distribution: Support trusted_key_groups argument #18644

Merged
merged 3 commits into from
Apr 16, 2021

Conversation

shuheiktgw
Copy link
Collaborator

@shuheiktgw shuheiktgw commented Apr 8, 2021

Community Note

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

Closes #15912

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSCloudFrontDistribution_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCloudFrontDistribution_ -timeout 180m
=== RUN   TestAccAWSCloudFrontDistribution_disappears
=== PAUSE TestAccAWSCloudFrontDistribution_disappears
=== RUN   TestAccAWSCloudFrontDistribution_S3Origin
=== PAUSE TestAccAWSCloudFrontDistribution_S3Origin
=== RUN   TestAccAWSCloudFrontDistribution_S3OriginWithTags
=== PAUSE TestAccAWSCloudFrontDistribution_S3OriginWithTags
=== RUN   TestAccAWSCloudFrontDistribution_customOrigin
=== PAUSE TestAccAWSCloudFrontDistribution_customOrigin
=== RUN   TestAccAWSCloudFrontDistribution_originPolicyDefault
=== PAUSE TestAccAWSCloudFrontDistribution_originPolicyDefault
=== RUN   TestAccAWSCloudFrontDistribution_originPolicyOrdered
=== PAUSE TestAccAWSCloudFrontDistribution_originPolicyOrdered
=== RUN   TestAccAWSCloudFrontDistribution_multiOrigin
=== PAUSE TestAccAWSCloudFrontDistribution_multiOrigin
=== RUN   TestAccAWSCloudFrontDistribution_orderedCacheBehavior
=== PAUSE TestAccAWSCloudFrontDistribution_orderedCacheBehavior
=== RUN   TestAccAWSCloudFrontDistribution_orderedCacheBehaviorCachePolicy
=== PAUSE TestAccAWSCloudFrontDistribution_orderedCacheBehaviorCachePolicy
=== RUN   TestAccAWSCloudFrontDistribution_forwardedValuesToCachePolicy
=== PAUSE TestAccAWSCloudFrontDistribution_forwardedValuesToCachePolicy
=== RUN   TestAccAWSCloudFrontDistribution_Origin_EmptyDomainName
=== PAUSE TestAccAWSCloudFrontDistribution_Origin_EmptyDomainName
=== RUN   TestAccAWSCloudFrontDistribution_Origin_EmptyOriginID
=== PAUSE TestAccAWSCloudFrontDistribution_Origin_EmptyOriginID
=== RUN   TestAccAWSCloudFrontDistribution_noOptionalItemsConfig
=== PAUSE TestAccAWSCloudFrontDistribution_noOptionalItemsConfig
=== RUN   TestAccAWSCloudFrontDistribution_HTTP11Config
=== PAUSE TestAccAWSCloudFrontDistribution_HTTP11Config
=== RUN   TestAccAWSCloudFrontDistribution_IsIPV6EnabledConfig
=== PAUSE TestAccAWSCloudFrontDistribution_IsIPV6EnabledConfig
=== RUN   TestAccAWSCloudFrontDistribution_noCustomErrorResponseConfig
=== PAUSE TestAccAWSCloudFrontDistribution_noCustomErrorResponseConfig
=== RUN   TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_ForwardedValues_Cookies_WhitelistedNames
=== PAUSE TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_ForwardedValues_Cookies_WhitelistedNames
=== RUN   TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_ForwardedValues_Headers
=== PAUSE TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_ForwardedValues_Headers
=== RUN   TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_TrustedKeyGroups
=== PAUSE TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_TrustedKeyGroups
=== RUN   TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_TrustedSigners
=== PAUSE TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_TrustedSigners
=== RUN   TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_RealtimeLogConfigArn
=== PAUSE TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_RealtimeLogConfigArn
=== RUN   TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_RealtimeLogConfigArn
=== PAUSE TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_RealtimeLogConfigArn
=== RUN   TestAccAWSCloudFrontDistribution_Enabled
=== PAUSE TestAccAWSCloudFrontDistribution_Enabled
=== RUN   TestAccAWSCloudFrontDistribution_RetainOnDelete
=== PAUSE TestAccAWSCloudFrontDistribution_RetainOnDelete
=== RUN   TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_ForwardedValues_Cookies_WhitelistedNames
=== PAUSE TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_ForwardedValues_Cookies_WhitelistedNames
=== RUN   TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_ForwardedValues_Headers
=== PAUSE TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_ForwardedValues_Headers
=== RUN   TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn
=== PAUSE TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn
=== RUN   TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn_ConflictsWithCloudFrontDefaultCertificate
=== PAUSE TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn_ConflictsWithCloudFrontDefaultCertificate
=== RUN   TestAccAWSCloudFrontDistribution_WaitForDeployment
=== PAUSE TestAccAWSCloudFrontDistribution_WaitForDeployment
=== RUN   TestAccAWSCloudFrontDistribution_OriginGroups
=== PAUSE TestAccAWSCloudFrontDistribution_OriginGroups
=== CONT  TestAccAWSCloudFrontDistribution_disappears
=== CONT  TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_ForwardedValues_Cookies_WhitelistedNames
=== CONT  TestAccAWSCloudFrontDistribution_OriginGroups
=== CONT  TestAccAWSCloudFrontDistribution_WaitForDeployment
=== CONT  TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn_ConflictsWithCloudFrontDefaultCertificate
=== CONT  TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn
=== CONT  TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_RealtimeLogConfigArn
=== CONT  TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_TrustedSigners
=== CONT  TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_TrustedKeyGroups
=== CONT  TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_ForwardedValues_Headers
=== CONT  TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_RealtimeLogConfigArn
=== CONT  TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_ForwardedValues_Headers
=== CONT  TestAccAWSCloudFrontDistribution_RetainOnDelete
=== CONT  TestAccAWSCloudFrontDistribution_Enabled
=== CONT  TestAccAWSCloudFrontDistribution_noOptionalItemsConfig
=== CONT  TestAccAWSCloudFrontDistribution_originPolicyDefault
=== CONT  TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_ForwardedValues_Cookies_WhitelistedNames
=== CONT  TestAccAWSCloudFrontDistribution_noCustomErrorResponseConfig
=== CONT  TestAccAWSCloudFrontDistribution_IsIPV6EnabledConfig
=== CONT  TestAccAWSCloudFrontDistribution_orderedCacheBehaviorCachePolicy
--- PASS: TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_TrustedSigners (253.38s)
=== CONT  TestAccAWSCloudFrontDistribution_HTTP11Config
--- PASS: TestAccAWSCloudFrontDistribution_disappears (285.12s)
=== CONT  TestAccAWSCloudFrontDistribution_Origin_EmptyDomainName
--- PASS: TestAccAWSCloudFrontDistribution_Origin_EmptyDomainName (13.16s)
=== CONT  TestAccAWSCloudFrontDistribution_Origin_EmptyOriginID
--- PASS: TestAccAWSCloudFrontDistribution_Origin_EmptyOriginID (9.96s)
=== CONT  TestAccAWSCloudFrontDistribution_forwardedValuesToCachePolicy
--- PASS: TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_ForwardedValues_Cookies_WhitelistedNames (309.02s)
=== CONT  TestAccAWSCloudFrontDistribution_S3OriginWithTags
--- PASS: TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn_ConflictsWithCloudFrontDefaultCertificate (310.02s)
=== CONT  TestAccAWSCloudFrontDistribution_customOrigin
--- PASS: TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_TrustedKeyGroups (310.17s)
=== CONT  TestAccAWSCloudFrontDistribution_S3Origin
--- PASS: TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn (311.58s)
=== CONT  TestAccAWSCloudFrontDistribution_multiOrigin
--- PASS: TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_ForwardedValues_Headers (314.01s)
=== CONT  TestAccAWSCloudFrontDistribution_originPolicyOrdered
--- PASS: TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_RealtimeLogConfigArn (319.86s)
=== CONT  TestAccAWSCloudFrontDistribution_orderedCacheBehavior
--- PASS: TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_RealtimeLogConfigArn (321.59s)
--- PASS: TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_ForwardedValues_Headers (331.31s)
--- PASS: TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_ForwardedValues_Cookies_WhitelistedNames (342.71s)
--- PASS: TestAccAWSCloudFrontDistribution_OriginGroups (461.53s)
--- PASS: TestAccAWSCloudFrontDistribution_noCustomErrorResponseConfig (461.66s)
--- PASS: TestAccAWSCloudFrontDistribution_IsIPV6EnabledConfig (461.82s)
--- PASS: TestAccAWSCloudFrontDistribution_originPolicyDefault (463.61s)
--- PASS: TestAccAWSCloudFrontDistribution_orderedCacheBehaviorCachePolicy (463.65s)
--- PASS: TestAccAWSCloudFrontDistribution_noOptionalItemsConfig (464.20s)
--- PASS: TestAccAWSCloudFrontDistribution_RetainOnDelete (476.67s)
--- PASS: TestAccAWSCloudFrontDistribution_WaitForDeployment (534.86s)
--- PASS: TestAccAWSCloudFrontDistribution_Enabled (678.49s)
--- PASS: TestAccAWSCloudFrontDistribution_HTTP11Config (427.49s)
--- PASS: TestAccAWSCloudFrontDistribution_orderedCacheBehavior (382.20s)
--- PASS: TestAccAWSCloudFrontDistribution_originPolicyOrdered (391.02s)
--- PASS: TestAccAWSCloudFrontDistribution_customOrigin (400.02s)
--- PASS: TestAccAWSCloudFrontDistribution_S3Origin (401.96s)
--- PASS: TestAccAWSCloudFrontDistribution_multiOrigin (401.24s)
--- PASS: TestAccAWSCloudFrontDistribution_forwardedValuesToCachePolicy (571.22s)
--- PASS: TestAccAWSCloudFrontDistribution_S3OriginWithTags (614.95s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	926.576s

Added trusted_key_groups support for aws_cloudfront_distribution resource. Thank you for your review!

@ghost ghost added size/L Managed by automation to categorize the size of a PR. service/cloudfront Issues and PRs that pertain to the cloudfront service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 8, 2021
@shuheiktgw shuheiktgw force-pushed the add_trusted_key_groups_argument branch from dbef048 to 3a8e389 Compare April 10, 2021 01:27
@ghost ghost added the documentation Introduces or discusses updates to documentation. label Apr 10, 2021
@shuheiktgw shuheiktgw marked this pull request as ready for review April 10, 2021 01:49
@shuheiktgw shuheiktgw requested a review from a team as a code owner April 10, 2021 01:49
@YakDriver YakDriver self-assigned this Apr 15, 2021
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

Looks good! 🎉

Commercial acceptance tests:

--- PASS: TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_TrustedSigners (166.89s)
--- PASS: TestAccAWSCloudFrontDistribution_disappears (171.42s)
--- PASS: TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_ForwardedValues_Headers (195.23s)
--- PASS: TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_ForwardedValues_Cookies_WhitelistedNames (197.30s)
--- PASS: TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_ForwardedValues_Cookies_WhitelistedNames (197.39s)
--- PASS: TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_ForwardedValues_Headers (200.51s)
--- PASS: TestAccAWSCloudFrontDistribution_Origin_EmptyDomainName (1.04s)
--- PASS: TestAccAWSCloudFrontDistribution_Origin_EmptyOriginID (0.91s)
--- PASS: TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn_ConflictsWithCloudFrontDefaultCertificate (207.96s)
--- PASS: TestAccAWSCloudFrontDistribution_OrderedCacheBehavior_RealtimeLogConfigArn (209.86s)
--- PASS: TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_RealtimeLogConfigArn (210.81s)
--- PASS: TestAccAWSCloudFrontDistribution_DefaultCacheBehavior_TrustedKeyGroups (221.41s)
--- PASS: TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn (263.64s)
--- PASS: TestAccAWSCloudFrontDistribution_orderedCacheBehavior (320.99s)
--- PASS: TestAccAWSCloudFrontDistribution_RetainOnDelete (323.26s)
--- PASS: TestAccAWSCloudFrontDistribution_WaitForDeployment (328.04s)
--- PASS: TestAccAWSCloudFrontDistribution_originPolicyOrdered (378.02s)
--- PASS: TestAccAWSCloudFrontDistribution_originPolicyDefault (379.20s)
--- PASS: TestAccAWSCloudFrontDistribution_multiOrigin (379.44s)
--- PASS: TestAccAWSCloudFrontDistribution_OriginGroups (379.55s)
--- PASS: TestAccAWSCloudFrontDistribution_orderedCacheBehaviorCachePolicy (423.81s)
--- PASS: TestAccAWSCloudFrontDistribution_Enabled (506.15s)
--- PASS: TestAccAWSCloudFrontDistribution_noCustomErrorResponseConfig (335.19s)
--- PASS: TestAccAWSCloudFrontDistribution_IsIPV6EnabledConfig (345.01s)
--- PASS: TestAccAWSCloudFrontDistribution_S3Origin (337.06s)
--- PASS: TestAccAWSCloudFrontDistribution_HTTP11Config (345.46s)
--- PASS: TestAccAWSCloudFrontDistribution_customOrigin (347.10s)
--- PASS: TestAccAWSCloudFrontDistribution_noOptionalItemsConfig (334.89s)
--- PASS: TestAccAWSCloudFrontDistribution_forwardedValuesToCachePolicy (441.43s)
--- PASS: TestAccAWSCloudFrontDistribution_S3OriginWithTags (451.95s)

GovCloud acceptance tests:

(All skipped)

@YakDriver YakDriver added this to the v3.37.0 milestone Apr 16, 2021
@YakDriver YakDriver merged commit 2dd01c8 into hashicorp:main Apr 16, 2021
@ghost
Copy link

ghost commented Apr 16, 2021

This has been released in version 3.37.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented May 16, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/cloudfront Issues and PRs that pertain to the cloudfront service. size/L 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.

Support the use of CloudFront Trusted Key Group as a signer
2 participants