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

resource/aws_opsworks_stack: Use Default VPC when no VPC ID passed #26711

Merged
merged 3 commits into from
Sep 8, 2022

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Sep 8, 2022

When no vpc_id is passed to aws_opsworks_stack, use the default VPC to match the behaviour of the AWS API.

Relates #26525
Relates #26666
Relates #23625

Output from acceptance testing:

$ make testacc PKG=opsworks TESTS=TestAccOpsWorksStack_

    acctest.go:696: skipping tests; AWS_DEFAULT_REGION (us-west-2) does not equal us-east-1
--- SKIP: TestAccOpsWorksStack_tagsAlternateRegion (1.02s)
--- PASS: TestAccOpsWorksStack_disappears (40.06s)
--- PASS: TestAccOpsWorksStack_noVPC_defaultAZ (40.93s)
--- PASS: TestAccOpsWorksStack_basic (41.47s)
--- PASS: TestAccOpsWorksStack_windows (56.94s)
--- PASS: TestAccOpsWorksStack_noVPC_basic (62.84s)
--- PASS: TestAccOpsWorksStack_tags (73.88s)
--- PASS: TestAccOpsWorksStack_allAttributes (74.94s)
$ AWS_DEFAULT_REGION=us-east-1 AWS_ALTERNATE_REGION=us-west-1 make testacc PKG=opsworks TESTS=TestAccOpsWorksStack_tagsAlternateRegion

--- PASS: TestAccOpsWorksStack_tagsAlternateRegion (95.42s)

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/acm Issues and PRs that pertain to the acm service. service/opsworks Issues and PRs that pertain to the opsworks service. service/vpc Issues and PRs that pertain to the vpc service. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/L Managed by automation to categorize the size of a PR. labels Sep 8, 2022
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=TestAccOpsWorksStack_' PKG=opsworks ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/opsworks/... -v -count 1 -parallel 3  -run=TestAccOpsWorksStack_ -timeout 180m
=== RUN   TestAccOpsWorksStack_basic
=== PAUSE TestAccOpsWorksStack_basic
=== RUN   TestAccOpsWorksStack_disappears
=== PAUSE TestAccOpsWorksStack_disappears
=== RUN   TestAccOpsWorksStack_noVPC_basic
=== PAUSE TestAccOpsWorksStack_noVPC_basic
=== RUN   TestAccOpsWorksStack_noVPC_defaultAZ
=== PAUSE TestAccOpsWorksStack_noVPC_defaultAZ
=== RUN   TestAccOpsWorksStack_tags
=== PAUSE TestAccOpsWorksStack_tags
=== RUN   TestAccOpsWorksStack_tagsAlternateRegion
=== PAUSE TestAccOpsWorksStack_tagsAlternateRegion
=== RUN   TestAccOpsWorksStack_allAttributes
=== PAUSE TestAccOpsWorksStack_allAttributes
=== RUN   TestAccOpsWorksStack_windows
=== PAUSE TestAccOpsWorksStack_windows
=== CONT  TestAccOpsWorksStack_basic
=== CONT  TestAccOpsWorksStack_tags
=== CONT  TestAccOpsWorksStack_allAttributes
--- PASS: TestAccOpsWorksStack_basic (38.52s)
=== CONT  TestAccOpsWorksStack_windows
--- PASS: TestAccOpsWorksStack_allAttributes (68.63s)
=== CONT  TestAccOpsWorksStack_tagsAlternateRegion
    acctest.go:696: skipping tests; AWS_DEFAULT_REGION (us-west-2) does not equal us-east-1
--- SKIP: TestAccOpsWorksStack_tagsAlternateRegion (0.31s)
=== CONT  TestAccOpsWorksStack_noVPC_basic
--- PASS: TestAccOpsWorksStack_tags (70.93s)
=== CONT  TestAccOpsWorksStack_noVPC_defaultAZ
--- PASS: TestAccOpsWorksStack_windows (59.21s)
=== CONT  TestAccOpsWorksStack_disappears
--- PASS: TestAccOpsWorksStack_noVPC_defaultAZ (40.84s)
--- PASS: TestAccOpsWorksStack_disappears (31.09s)
--- PASS: TestAccOpsWorksStack_noVPC_basic (62.13s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/opsworks	134.874s

@gdavison gdavison merged commit 6dfa30e into main Sep 8, 2022
@gdavison gdavison deleted the b-opsworks-no-vpc branch September 8, 2022 22:39
@github-actions github-actions bot added this to the v4.30.0 milestone Sep 8, 2022
github-actions bot pushed a commit that referenced this pull request Sep 8, 2022
@github-actions
Copy link

github-actions bot commented Sep 9, 2022

This functionality has been released in v4.30.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!

@github-actions
Copy link

github-actions bot commented Oct 9, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2022
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/acm Issues and PRs that pertain to the acm service. service/opsworks Issues and PRs that pertain to the opsworks service. service/vpc Issues and PRs that pertain to the vpc service. size/L Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. 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.

2 participants