-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 Resource: aws_cloudfront_vpc_origin #40239
New Resource: aws_cloudfront_vpc_origin #40239
Conversation
Community NoteVoting for Prioritization
For Submitters
|
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.
Welcome @itsnicksia 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
Added simple implementations of Read, Update and Delete. These are still fragile and needs proper error handling. Tests and documentation are not yet done. |
Fixing up the SSL Origin Protocol syntax then going onto Tests and Docs. |
Docs updated. Working on acceptance tests... |
% make testacc TESTARGS='-run=TestAccCloudFrontVPCOrigin_basic' PKG=cloudfront make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.3 test ./internal/service/cloudfront/... -v -count 1 -parallel 20 -run=TestAccCloudFrontVPCOrigin_basic -timeout 360m 2024/12/17 14:47:44 Initializing Terraform AWS Provider... === RUN TestAccCloudFrontVPCOrigin_basic === PAUSE TestAccCloudFrontVPCOrigin_basic === CONT TestAccCloudFrontVPCOrigin_basic --- PASS: TestAccCloudFrontVPCOrigin_basic (991.04s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront 996.513s
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.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccCloudFrontVPCOrigin_' PKG=cloudfront ACCTEST_PARALLELISM=4
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/cloudfront/... -v -count 1 -parallel 4 -run=TestAccCloudFrontVPCOrigin_ -timeout 360m
2024/12/17 16:47:16 Initializing Terraform AWS Provider...
=== RUN TestAccCloudFrontVPCOrigin_basic
=== PAUSE TestAccCloudFrontVPCOrigin_basic
=== RUN TestAccCloudFrontVPCOrigin_disappears
=== PAUSE TestAccCloudFrontVPCOrigin_disappears
=== RUN TestAccCloudFrontVPCOrigin_update
=== PAUSE TestAccCloudFrontVPCOrigin_update
=== RUN TestAccCloudFrontVPCOrigin_tags
=== PAUSE TestAccCloudFrontVPCOrigin_tags
=== CONT TestAccCloudFrontVPCOrigin_basic
=== CONT TestAccCloudFrontVPCOrigin_update
=== CONT TestAccCloudFrontVPCOrigin_disappears
=== CONT TestAccCloudFrontVPCOrigin_tags
--- PASS: TestAccCloudFrontVPCOrigin_basic (738.19s)
--- PASS: TestAccCloudFrontVPCOrigin_update (740.90s)
--- PASS: TestAccCloudFrontVPCOrigin_tags (741.42s)
--- PASS: TestAccCloudFrontVPCOrigin_disappears (746.68s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront 752.020s
% make testacc TESTARGS='-run=TestAccCloudFrontDistribution_noOptionalItems\|TestAccCloudFrontDistribution_vpcOriginConfig' PKG=cloudfront
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/cloudfront/... -v -count 1 -parallel 20 -run=TestAccCloudFrontDistribution_noOptionalItems\|TestAccCloudFrontDistribution_vpcOriginConfig -timeout 360m
2024/12/18 08:31:18 Initializing Terraform AWS Provider...
=== RUN TestAccCloudFrontDistribution_noOptionalItems
=== PAUSE TestAccCloudFrontDistribution_noOptionalItems
=== RUN TestAccCloudFrontDistribution_vpcOriginConfig
=== PAUSE TestAccCloudFrontDistribution_vpcOriginConfig
=== CONT TestAccCloudFrontDistribution_noOptionalItems
=== CONT TestAccCloudFrontDistribution_vpcOriginConfig
--- PASS: TestAccCloudFrontDistribution_noOptionalItems (671.02s)
--- PASS: TestAccCloudFrontDistribution_vpcOriginConfig (921.69s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront 927.226s
This comment was marked as resolved.
This comment was marked as resolved.
Thanks for the fixes Kit! Will review those so I don't make the same mistakes in future. Did you want
In this PR or a separate one? |
@nicksia-vgw I will add the change to this PR so that we can get it released this week. Thanks. |
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.
LGTM 🎉
% make testacc PKG=cloudfront TESTS="TestAccCloudFrontDistribution_noOptionalItems|TestAccCloudFrontDistribution_vpcOriginConfig"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/cloudfront/... -v -count 1 -parallel 20 -run='TestAccCloudFrontDistribution_noOptionalItems|TestAccCloudFrontDistribution_vpcOriginConfig' -timeout 360m
2024/12/18 09:47:31 Initializing Terraform AWS Provider...
=== RUN TestAccCloudFrontDistribution_noOptionalItems
=== PAUSE TestAccCloudFrontDistribution_noOptionalItems
=== RUN TestAccCloudFrontDistribution_vpcOriginConfig
=== PAUSE TestAccCloudFrontDistribution_vpcOriginConfig
=== CONT TestAccCloudFrontDistribution_noOptionalItems
=== CONT TestAccCloudFrontDistribution_vpcOriginConfig
--- PASS: TestAccCloudFrontDistribution_noOptionalItems (474.54s)
--- PASS: TestAccCloudFrontDistribution_vpcOriginConfig (911.16s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront 920.068s
% make testacc PKG=cloudfront TESTS=TestAccCloudFrontVPCOrigin_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/cloudfront/... -v -count 1 -parallel 20 -run='TestAccCloudFrontVPCOrigin_' -timeout 360m
2024/12/18 09:47:28 Initializing Terraform AWS Provider...
=== RUN TestAccCloudFrontVPCOrigin_basic
=== PAUSE TestAccCloudFrontVPCOrigin_basic
=== RUN TestAccCloudFrontVPCOrigin_disappears
=== PAUSE TestAccCloudFrontVPCOrigin_disappears
=== RUN TestAccCloudFrontVPCOrigin_update
=== PAUSE TestAccCloudFrontVPCOrigin_update
=== RUN TestAccCloudFrontVPCOrigin_tags
=== PAUSE TestAccCloudFrontVPCOrigin_tags
=== CONT TestAccCloudFrontVPCOrigin_basic
=== CONT TestAccCloudFrontVPCOrigin_update
=== CONT TestAccCloudFrontVPCOrigin_disappears
=== CONT TestAccCloudFrontVPCOrigin_tags
--- PASS: TestAccCloudFrontVPCOrigin_disappears (911.28s)
--- PASS: TestAccCloudFrontVPCOrigin_basic (913.95s)
--- PASS: TestAccCloudFrontVPCOrigin_update (916.28s)
--- PASS: TestAccCloudFrontVPCOrigin_tags (916.72s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront 923.298s
@itsnicksia Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.82.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. Thank you! |
Description
This change adds the new "Cloudfront VPC Origin" resource.
Relations
Closes #40234.
References
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/cloudfront#Client.CreateVpcOrigin
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/cloudfront#Client.DeleteVpcOrigin
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/cloudfront#Client.GetVpcOrigin
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/cloudfront#Client.ListVpcOrigins
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/cloudfront#Client.UpdateVpcOrigin
Output from Acceptance Testing
TODO