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

aws_eip: Add 'carrier_ip' attribute #16724

Merged
merged 2 commits into from
Dec 15, 2020

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Dec 11, 2020

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

Relates #14518.

Release note for CHANGELOG:

resource/aws_eip: Add `carrier_ip` attribute.
data-source/aws_eip: Add `carrier_ip` attribute.

Output from acceptance testing:

us-west-2
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSEIP_' ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 2 -run=TestAccAWSEIP_ -timeout 120m
=== RUN   TestAccAWSEIP_Ec2Classic
=== PAUSE TestAccAWSEIP_Ec2Classic
=== RUN   TestAccAWSEIP_basic
=== PAUSE TestAccAWSEIP_basic
=== RUN   TestAccAWSEIP_instance
=== PAUSE TestAccAWSEIP_instance
=== RUN   TestAccAWSEIP_networkInterface
=== PAUSE TestAccAWSEIP_networkInterface
=== RUN   TestAccAWSEIP_twoEIPsOneNetworkInterface
=== PAUSE TestAccAWSEIP_twoEIPsOneNetworkInterface
=== RUN   TestAccAWSEIP_associated_user_private_ip
=== PAUSE TestAccAWSEIP_associated_user_private_ip
=== RUN   TestAccAWSEIP_Instance_Reassociate
=== PAUSE TestAccAWSEIP_Instance_Reassociate
=== RUN   TestAccAWSEIP_disappears
=== PAUSE TestAccAWSEIP_disappears
=== RUN   TestAccAWSEIP_notAssociated
=== PAUSE TestAccAWSEIP_notAssociated
=== RUN   TestAccAWSEIP_tags_Vpc
=== PAUSE TestAccAWSEIP_tags_Vpc
=== RUN   TestAccAWSEIP_tags_Ec2Classic
=== PAUSE TestAccAWSEIP_tags_Ec2Classic
=== RUN   TestAccAWSEIP_PublicIpv4Pool_default
=== PAUSE TestAccAWSEIP_PublicIpv4Pool_default
=== RUN   TestAccAWSEIP_NetworkBorderGroup
=== PAUSE TestAccAWSEIP_NetworkBorderGroup
=== RUN   TestAccAWSEIP_CarrierIP
=== PAUSE TestAccAWSEIP_CarrierIP
=== RUN   TestAccAWSEIP_PublicIpv4Pool_custom
    resource_aws_eip_test.go:502: Environment variable AWS_EC2_EIP_PUBLIC_IPV4_POOL is not set
--- SKIP: TestAccAWSEIP_PublicIpv4Pool_custom (0.00s)
=== RUN   TestAccAWSEIP_CustomerOwnedIpv4Pool
=== PAUSE TestAccAWSEIP_CustomerOwnedIpv4Pool
=== CONT  TestAccAWSEIP_Ec2Classic
=== CONT  TestAccAWSEIP_notAssociated
    resource_aws_eip_test.go:328: Step 3/3 error: Error running apply: 2020/12/11 14:30:33 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.10.0
        
        Error: Failure associating EIP: Gateway.NotAttached: Network vpc-b6fbb6cf is not attached to any internet gateway
        	status code: 400, request id: af22d2a6-09f4-444e-b701-7dee0d2aa5f7
        
        
--- FAIL: TestAccAWSEIP_notAssociated (111.85s)
=== CONT  TestAccAWSEIP_CustomerOwnedIpv4Pool
    data_source_aws_outposts_outposts_test.go:66: skipping since no Outposts found
--- SKIP: TestAccAWSEIP_CustomerOwnedIpv4Pool (1.52s)
=== CONT  TestAccAWSEIP_CarrierIP
--- PASS: TestAccAWSEIP_CarrierIP (16.85s)
=== CONT  TestAccAWSEIP_NetworkBorderGroup
--- PASS: TestAccAWSEIP_NetworkBorderGroup (15.02s)
=== CONT  TestAccAWSEIP_PublicIpv4Pool_default
--- PASS: TestAccAWSEIP_PublicIpv4Pool_default (14.30s)
=== CONT  TestAccAWSEIP_tags_Ec2Classic
--- PASS: TestAccAWSEIP_tags_Ec2Classic (34.44s)
=== CONT  TestAccAWSEIP_tags_Vpc
--- PASS: TestAccAWSEIP_Ec2Classic (213.33s)
=== CONT  TestAccAWSEIP_twoEIPsOneNetworkInterface
--- PASS: TestAccAWSEIP_tags_Vpc (21.30s)
=== CONT  TestAccAWSEIP_disappears
--- PASS: TestAccAWSEIP_disappears (9.58s)
=== CONT  TestAccAWSEIP_Instance_Reassociate
--- PASS: TestAccAWSEIP_twoEIPsOneNetworkInterface (75.54s)
=== CONT  TestAccAWSEIP_associated_user_private_ip
--- PASS: TestAccAWSEIP_Instance_Reassociate (112.19s)
=== CONT  TestAccAWSEIP_instance
    resource_aws_eip_test.go:148: Step 1/2 error: Error running apply: 2020/12/11 14:35:08 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.10.0
        
        Error: Failure associating EIP: Gateway.NotAttached: Network vpc-b6fbb6cf is not attached to any internet gateway
        	status code: 400, request id: 279951a1-59df-47b0-aaf3-12e1778f58d4
        
        
--- FAIL: TestAccAWSEIP_instance (75.87s)
=== CONT  TestAccAWSEIP_networkInterface
--- PASS: TestAccAWSEIP_networkInterface (73.94s)
=== CONT  TestAccAWSEIP_basic
--- PASS: TestAccAWSEIP_associated_user_private_ip (198.31s)
--- PASS: TestAccAWSEIP_basic (13.65s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	500.614s
FAIL
GNUmakefile:27: recipe for target 'testacc' failed
make: *** [testacc] Error 1

The 2 failures are because the default VPC in the region does not have an attached Internet Gateway.

eu-central-1
$ AWS_DEFAULT_REGION=eu-central-1 make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSEIP_instance\|TestAccAWSEIP_notAssociated' ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 2 -run=TestAccAWSEIP_instance\|TestAccAWSEIP_notAssociated -timeout 120m
=== RUN   TestAccAWSEIP_instance
=== PAUSE TestAccAWSEIP_instance
=== RUN   TestAccAWSEIP_notAssociated
=== PAUSE TestAccAWSEIP_notAssociated
=== CONT  TestAccAWSEIP_instance
=== CONT  TestAccAWSEIP_notAssociated
--- PASS: TestAccAWSEIP_instance (108.60s)
--- PASS: TestAccAWSEIP_notAssociated (121.32s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	121.402s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAWSEIP_\|TestAccDataSourceAwsEip_' ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 2 -run=TestAccDataSourceAWSEIP_\|TestAccDataSourceAwsEip_ -timeout 120m
=== RUN   TestAccDataSourceAwsEip_Filter
=== PAUSE TestAccDataSourceAwsEip_Filter
=== RUN   TestAccDataSourceAwsEip_Id
=== PAUSE TestAccDataSourceAwsEip_Id
=== RUN   TestAccDataSourceAwsEip_PublicIP_EC2Classic
=== PAUSE TestAccDataSourceAwsEip_PublicIP_EC2Classic
=== RUN   TestAccDataSourceAwsEip_PublicIP_VPC
=== PAUSE TestAccDataSourceAwsEip_PublicIP_VPC
=== RUN   TestAccDataSourceAwsEip_Tags
=== PAUSE TestAccDataSourceAwsEip_Tags
=== RUN   TestAccDataSourceAwsEip_NetworkInterface
=== PAUSE TestAccDataSourceAwsEip_NetworkInterface
=== RUN   TestAccDataSourceAwsEip_Instance
=== PAUSE TestAccDataSourceAwsEip_Instance
=== RUN   TestAccDataSourceAWSEIP_CarrierIP
=== PAUSE TestAccDataSourceAWSEIP_CarrierIP
=== RUN   TestAccDataSourceAWSEIP_CustomerOwnedIpv4Pool
=== PAUSE TestAccDataSourceAWSEIP_CustomerOwnedIpv4Pool
=== CONT  TestAccDataSourceAwsEip_Filter
=== CONT  TestAccDataSourceAwsEip_NetworkInterface
--- PASS: TestAccDataSourceAwsEip_Filter (13.33s)
=== CONT  TestAccDataSourceAWSEIP_CustomerOwnedIpv4Pool
    data_source_aws_outposts_outposts_test.go:66: skipping since no Outposts found
--- SKIP: TestAccDataSourceAWSEIP_CustomerOwnedIpv4Pool (1.46s)
=== CONT  TestAccDataSourceAWSEIP_CarrierIP
--- PASS: TestAccDataSourceAWSEIP_CarrierIP (13.70s)
=== CONT  TestAccDataSourceAwsEip_Instance
--- PASS: TestAccDataSourceAwsEip_NetworkInterface (66.40s)
=== CONT  TestAccDataSourceAwsEip_PublicIP_VPC
--- PASS: TestAccDataSourceAwsEip_PublicIP_VPC (13.49s)
=== CONT  TestAccDataSourceAwsEip_Tags
--- PASS: TestAccDataSourceAwsEip_Tags (11.89s)
=== CONT  TestAccDataSourceAwsEip_PublicIP_EC2Classic
--- PASS: TestAccDataSourceAwsEip_PublicIP_EC2Classic (8.68s)
=== CONT  TestAccDataSourceAwsEip_Id
--- PASS: TestAccDataSourceAwsEip_Id (11.22s)
--- PASS: TestAccDataSourceAwsEip_Instance (99.86s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	128.440s

@ewbankkit ewbankkit requested a review from a team as a code owner December 11, 2020 19:49
@ghost ghost added size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 11, 2020
Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSEIP_CarrierIP' ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 2 -run=TestAccAWSEIP_CarrierIP -timeout 120m
=== RUN   TestAccAWSEIP_CarrierIP
=== PAUSE TestAccAWSEIP_CarrierIP
=== CONT  TestAccAWSEIP_CarrierIP
--- PASS: TestAccAWSEIP_CarrierIP (17.36s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	17.450s
Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAWSEIP_CarrierIP' ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 2 -run=TestAccDataSourceAWSEIP_CarrierIP -timeout 120m
=== RUN   TestAccDataSourceAWSEIP_CarrierIP
=== PAUSE TestAccDataSourceAWSEIP_CarrierIP
=== CONT  TestAccDataSourceAWSEIP_CarrierIP
--- PASS: TestAccDataSourceAWSEIP_CarrierIP (14.74s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	14.829s
@ewbankkit ewbankkit changed the title [WIP] aws_eip: Add 'carrier_ip' attribute aws_eip: Add 'carrier_ip' attribute Dec 11, 2020
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 15, 2020
@bflad bflad added this to the v3.22.0 milestone Dec 15, 2020
Copy link
Contributor

@bflad bflad 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, thank you, @ewbankkit 🚀

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSEIP_basic (23.34s)
--- PASS: TestAccAWSEIP_CarrierIP (26.38s)
--- PASS: TestAccAWSEIP_disappears (16.84s)
--- PASS: TestAccAWSEIP_Ec2Classic (211.77s)
--- PASS: TestAccAWSEIP_instance (116.62s)
--- PASS: TestAccAWSEIP_Instance_Reassociate (132.06s)
--- PASS: TestAccAWSEIP_NetworkBorderGroup (24.27s)
--- PASS: TestAccAWSEIP_networkInterface (83.09s)
--- PASS: TestAccAWSEIP_notAssociated (142.81s)
--- PASS: TestAccAWSEIP_PublicIpv4Pool_default (23.41s)
--- PASS: TestAccAWSEIP_tags_Ec2Classic (11.46s)
--- PASS: TestAccAWSEIP_tags_Vpc (31.99s)
--- PASS: TestAccAWSEIP_twoEIPsOneNetworkInterface (84.00s)
--- SKIP: TestAccAWSEIP_CustomerOwnedIpv4Pool (2.65s)
--- SKIP: TestAccAWSEIP_PublicIpv4Pool_custom (0.00s)

--- PASS: TestAccDataSourceAWSEIP_CarrierIP (24.36s)
--- SKIP: TestAccDataSourceAWSEIP_CustomerOwnedIpv4Pool (2.52s)

Output from acceptance testing in AWS GovCloud (US):

--- PASS: TestAccAWSEIP_associated_user_private_ip (228.21s)
--- PASS: TestAccAWSEIP_basic (27.86s)
--- PASS: TestAccAWSEIP_disappears (19.78s)
--- PASS: TestAccAWSEIP_instance (96.92s)
--- PASS: TestAccAWSEIP_Instance_Reassociate (122.67s)
--- PASS: TestAccAWSEIP_NetworkBorderGroup (27.88s)
--- PASS: TestAccAWSEIP_networkInterface (86.32s)
--- PASS: TestAccAWSEIP_notAssociated (126.33s)
--- PASS: TestAccAWSEIP_PublicIpv4Pool_default (26.38s)
--- PASS: TestAccAWSEIP_tags_Vpc (38.76s)
--- PASS: TestAccAWSEIP_twoEIPsOneNetworkInterface (86.89s)
--- SKIP: TestAccAWSEIP_CarrierIP (3.72s)
--- SKIP: TestAccAWSEIP_CustomerOwnedIpv4Pool (5.18s)
--- SKIP: TestAccAWSEIP_Ec2Classic (4.51s)
--- SKIP: TestAccAWSEIP_PublicIpv4Pool_custom (0.00s)
--- SKIP: TestAccAWSEIP_tags_Ec2Classic (4.51s)

--- SKIP: TestAccDataSourceAWSEIP_CarrierIP (3.74s)
--- SKIP: TestAccDataSourceAWSEIP_CustomerOwnedIpv4Pool (4.51s)

aws/resource_aws_eip_test.go Show resolved Hide resolved
aws/data_source_aws_eip_test.go Show resolved Hide resolved
aws/resource_aws_eip.go Show resolved Hide resolved
@bflad bflad merged commit 5601d74 into hashicorp:master Dec 15, 2020
bflad added a commit that referenced this pull request Dec 15, 2020
@ewbankkit ewbankkit deleted the f-aws_eip-carrier_ip branch December 15, 2020 13:40
@ghost
Copy link

ghost commented Dec 18, 2020

This has been released in version 3.22.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 Jan 14, 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 Jan 14, 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. enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/M 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.

2 participants