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

New Resource: aws_cloudfront_vpc_origin #40239

Merged
merged 43 commits into from
Dec 18, 2024

Conversation

itsnicksia
Copy link
Contributor

@itsnicksia itsnicksia commented Nov 21, 2024

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 service/cloudfront Issues and PRs that pertain to the cloudfront service. needs-triage Waiting for first response or review from a maintainer. labels Nov 21, 2024
Copy link

@github-actions github-actions bot left a 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! 😃

@github-actions github-actions bot added the generators Relates to code generators. label Nov 21, 2024
@itsnicksia
Copy link
Contributor Author

Create working:
image

@itsnicksia
Copy link
Contributor Author

itsnicksia commented Nov 23, 2024

Added simple implementations of Read, Update and Delete.

These are still fragile and needs proper error handling.

Tests and documentation are not yet done.

@nicksia-vgw
Copy link
Contributor

Fixing up the SSL Origin Protocol syntax then going onto Tests and Docs.

@nicksia-vgw
Copy link
Contributor

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
@ewbankkit ewbankkit changed the title [WIP] New Resource: aws_cloudfront_vpc_origin New Resource: aws_cloudfront_vpc_origin Dec 17, 2024
@ewbankkit ewbankkit added the new-resource Introduces a new resource. label Dec 17, 2024
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 17, 2024
ewbankkit
ewbankkit previously approved these changes Dec 17, 2024
Copy link
Contributor

@ewbankkit ewbankkit left a 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

@ewbankkit

This comment was marked as resolved.

@nicksia-vgw
Copy link
Contributor

Thanks for the fixes Kit!

Will review those so I don't make the same mistakes in future.

Did you want

aws_cloudfront_distribution.origin.vpc_origin_config

In this PR or a separate one?

@ewbankkit
Copy link
Contributor

@nicksia-vgw I will add the change to this PR so that we can get it released this week. Thanks.

@ewbankkit ewbankkit added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 18, 2024
Copy link
Member

@jar-b jar-b left a 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

@ewbankkit
Copy link
Contributor

@itsnicksia Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit f8f77af into hashicorp:main Dec 18, 2024
41 checks passed
@github-actions github-actions bot added this to the v5.82.0 milestone Dec 18, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 19, 2024
Copy link

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!

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. new-resource Introduces a new resource. service/cloudfront Issues and PRs that pertain to the cloudfront service. 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.

[Enhancement]: Support for CloudFront VPC Origins
4 participants