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_eip: Default to default domain when vpc not set #26716

Merged
merged 3 commits into from
Sep 8, 2022

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Sep 8, 2022

Default to default domain when vpc not set. standard in EC2-Classic, vpc otherwise

Relates #26525
Relates #26666
Relates #23625

Output from acceptance testing:

$ make testacc PKG=ec2 TESTS=TestAccEC2EIP

    ec2_eip_test.go:424: Environment variable AWS_EC2_EIP_PUBLIC_IPV4_POOL is not set
--- SKIP: TestAccEC2EIP_PublicIPv4Pool_custom (0.00s)
    ec2_eip_test.go:566: Environment variable AWS_EC2_EIP_BYOIP_ADDRESS is not set
--- SKIP: TestAccEC2EIP_BYOIPAddress_custom (0.00s)
    ec2_eip_test.go:594: Environment variable AWS_EC2_EIP_BYOIP_ADDRESS is not set
--- SKIP: TestAccEC2EIP_BYOIPAddress_customWithPublicIPv4Pool (0.00s)
    acctest.go:1346: skipping since no Outposts found
--- SKIP: TestAccEC2EIPDataSource_customerOwnedIPv4Pool (1.72s)
    wavelength_carrier_gateway_test.go:196: skipping since no Wavelength Zones are available
--- SKIP: TestAccEC2EIPDataSource_carrierIP (0.07s)
--- PASS: TestAccEC2EIP_disappears (79.49s)
--- PASS: TestAccEC2EIPDataSource_filter (93.29s)
--- PASS: TestAccEC2EIPDataSource_publicIP (95.68s)
--- PASS: TestAccEC2EIP_NetworkInterface_twoEIPsOneInterface (111.14s)
    wavelength_carrier_gateway_test.go:196: skipping since no Wavelength Zones are available
--- SKIP: TestAccEC2EIP_carrierIP (0.26s)
    ec2_classic.go:62: this test can only run in EC2-Classic, platforms available in us-east-1: ["VPC"]
--- SKIP: TestAccEC2EIPAssociation_classic (3.67s)
--- PASS: TestAccEC2EIP_noVPC (117.52s)
--- PASS: TestAccEC2EIP_basic (117.88s)
--- PASS: TestAccEC2EIP_networkInterface (136.89s)
    acctest.go:1346: skipping since no Outposts found
--- SKIP: TestAccEC2EIP_customerOwnedIPv4Pool (0.55s)
--- PASS: TestAccEC2EIPDataSource_id (95.92s)
--- PASS: TestAccEC2EIPAssociation_basic (197.76s)
    ec2_classic.go:62: this test can only run in EC2-Classic, platforms available in us-east-1: ["VPC"]
--- SKIP: TestAccEC2EIP_Instance_ec2Classic (0.00s)
--- PASS: TestAccEC2EIP_instance (206.65s)
--- PASS: TestAccEC2EIPDataSource_instance (211.27s)
--- PASS: TestAccEC2EIPDataSource_networkInterface (132.06s)
--- PASS: TestAccEC2EIPDataSource_tags (115.42s)
--- PASS: TestAccEC2EIPAssociation_networkInterface (146.10s)
--- PASS: TestAccEC2EIP_networkBorderGroup (150.25s)
--- PASS: TestAccEC2EIP_Instance_notAssociated (290.66s)
--- PASS: TestAccEC2EIPAssociation_spotInstance (198.06s)
--- PASS: TestAccEC2EIPsDataSource_basic (126.28s)
--- PASS: TestAccEC2EIP_tags (302.21s)
--- PASS: TestAccEC2EIP_Instance_reassociate (304.82s)
--- PASS: TestAccEC2EIPAssociation_instance (195.98s)
--- PASS: TestAccEC2EIP_BYOIPAddress_default (113.81s)
--- PASS: TestAccEC2EIP_PublicIPv4Pool_default (109.46s)
--- PASS: TestAccEC2EIPAssociation_disappears (150.53s)
--- PASS: TestAccEC2EIP_Instance_associatedUserPrivateIP (359.90s)
--- PASS: TestAccEC2EIP_association (374.52s)

@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/ec2 Issues and PRs that pertain to the ec2 service. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/S 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=TestAccEC2EIP_' PKG=ec2 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3  -run=TestAccEC2EIP_ -timeout 180m
=== RUN   TestAccEC2EIP_basic
=== PAUSE TestAccEC2EIP_basic
=== RUN   TestAccEC2EIP_disappears
=== PAUSE TestAccEC2EIP_disappears
=== RUN   TestAccEC2EIP_noVPC
=== PAUSE TestAccEC2EIP_noVPC
=== RUN   TestAccEC2EIP_tags
=== PAUSE TestAccEC2EIP_tags
=== RUN   TestAccEC2EIP_instance
=== PAUSE TestAccEC2EIP_instance
=== RUN   TestAccEC2EIP_Instance_reassociate
=== PAUSE TestAccEC2EIP_Instance_reassociate
=== RUN   TestAccEC2EIP_Instance_associatedUserPrivateIP
=== PAUSE TestAccEC2EIP_Instance_associatedUserPrivateIP
=== RUN   TestAccEC2EIP_Instance_notAssociated
=== PAUSE TestAccEC2EIP_Instance_notAssociated
=== RUN   TestAccEC2EIP_networkInterface
=== PAUSE TestAccEC2EIP_networkInterface
=== RUN   TestAccEC2EIP_NetworkInterface_twoEIPsOneInterface
=== PAUSE TestAccEC2EIP_NetworkInterface_twoEIPsOneInterface
=== RUN   TestAccEC2EIP_association
=== PAUSE TestAccEC2EIP_association
=== RUN   TestAccEC2EIP_PublicIPv4Pool_default
=== PAUSE TestAccEC2EIP_PublicIPv4Pool_default
=== RUN   TestAccEC2EIP_PublicIPv4Pool_custom
    ec2_eip_test.go:424: Environment variable AWS_EC2_EIP_PUBLIC_IPV4_POOL is not set
--- SKIP: TestAccEC2EIP_PublicIPv4Pool_custom (0.00s)
=== RUN   TestAccEC2EIP_customerOwnedIPv4Pool
=== PAUSE TestAccEC2EIP_customerOwnedIPv4Pool
=== RUN   TestAccEC2EIP_networkBorderGroup
=== PAUSE TestAccEC2EIP_networkBorderGroup
=== RUN   TestAccEC2EIP_carrierIP
=== PAUSE TestAccEC2EIP_carrierIP
=== RUN   TestAccEC2EIP_BYOIPAddress_default
=== PAUSE TestAccEC2EIP_BYOIPAddress_default
=== RUN   TestAccEC2EIP_BYOIPAddress_custom
    ec2_eip_test.go:566: Environment variable AWS_EC2_EIP_BYOIP_ADDRESS is not set
--- SKIP: TestAccEC2EIP_BYOIPAddress_custom (0.00s)
=== RUN   TestAccEC2EIP_BYOIPAddress_customWithPublicIPv4Pool
    ec2_eip_test.go:594: Environment variable AWS_EC2_EIP_BYOIP_ADDRESS is not set
--- SKIP: TestAccEC2EIP_BYOIPAddress_customWithPublicIPv4Pool (0.00s)
=== RUN   TestAccEC2EIP_Instance_ec2Classic
=== PAUSE TestAccEC2EIP_Instance_ec2Classic
=== CONT  TestAccEC2EIP_basic
=== CONT  TestAccEC2EIP_NetworkInterface_twoEIPsOneInterface
=== CONT  TestAccEC2EIP_networkBorderGroup
--- PASS: TestAccEC2EIP_networkBorderGroup (20.39s)
=== CONT  TestAccEC2EIP_Instance_reassociate
--- PASS: TestAccEC2EIP_basic (20.49s)
=== CONT  TestAccEC2EIP_networkInterface
--- PASS: TestAccEC2EIP_NetworkInterface_twoEIPsOneInterface (30.28s)
=== CONT  TestAccEC2EIP_Instance_notAssociated
--- PASS: TestAccEC2EIP_networkInterface (28.89s)
=== CONT  TestAccEC2EIP_Instance_associatedUserPrivateIP
--- PASS: TestAccEC2EIP_Instance_reassociate (129.16s)
=== CONT  TestAccEC2EIP_tags
--- PASS: TestAccEC2EIP_Instance_notAssociated (131.80s)
=== CONT  TestAccEC2EIP_instance
--- PASS: TestAccEC2EIP_tags (39.93s)
=== CONT  TestAccEC2EIP_noVPC
--- PASS: TestAccEC2EIP_noVPC (16.13s)
=== CONT  TestAccEC2EIP_disappears
--- PASS: TestAccEC2EIP_Instance_associatedUserPrivateIP (158.58s)
=== CONT  TestAccEC2EIP_BYOIPAddress_default
--- PASS: TestAccEC2EIP_disappears (12.65s)
=== CONT  TestAccEC2EIP_Instance_ec2Classic
    acctest.go:696: skipping tests; AWS_DEFAULT_REGION (us-west-2) does not equal us-east-1
--- SKIP: TestAccEC2EIP_Instance_ec2Classic (0.44s)
=== CONT  TestAccEC2EIP_PublicIPv4Pool_default
--- PASS: TestAccEC2EIP_BYOIPAddress_default (14.35s)
=== CONT  TestAccEC2EIP_customerOwnedIPv4Pool
    acctest.go:1346: skipping since no Outposts found
--- SKIP: TestAccEC2EIP_customerOwnedIPv4Pool (1.57s)
=== CONT  TestAccEC2EIP_carrierIP
--- PASS: TestAccEC2EIP_PublicIPv4Pool_default (16.56s)
=== CONT  TestAccEC2EIP_association
--- PASS: TestAccEC2EIP_carrierIP (18.46s)
--- PASS: TestAccEC2EIP_instance (126.63s)
--- PASS: TestAccEC2EIP_association (182.94s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	422.009s

@gdavison gdavison merged commit c8a7efb into main Sep 8, 2022
@gdavison gdavison deleted the b-eip-no-vpc branch September 8, 2022 23:20
@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/ec2 Issues and PRs that pertain to the ec2 service. size/S 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