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

Tests for TGW peering attachment #3

Merged
merged 2 commits into from
Dec 24, 2019

Conversation

Omarimcblack
Copy link
Collaborator

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEc2TransitGatewayPeeringAttachment'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEc2TransitGatewayPeeringAttachment -timeout 120m
=== RUN   TestAccAWSEc2TransitGatewayPeeringAttachment_basic
=== PAUSE TestAccAWSEc2TransitGatewayPeeringAttachment_basic
=== RUN   TestAccAWSEc2TransitGatewayPeeringAttachment_disappears
=== PAUSE TestAccAWSEc2TransitGatewayPeeringAttachment_disappears
=== RUN   TestAccAWSEc2TransitGatewayPeeringAttachment_Tags
=== PAUSE TestAccAWSEc2TransitGatewayPeeringAttachment_Tags
=== CONT  TestAccAWSEc2TransitGatewayPeeringAttachment_basic
=== CONT  TestAccAWSEc2TransitGatewayPeeringAttachment_Tags
=== CONT  TestAccAWSEc2TransitGatewayPeeringAttachment_disappears
--- FAIL: TestAccAWSEc2TransitGatewayPeeringAttachment_basic (166.50s)
    testing.go:635: Step 0 error: Check failed: Check 1/6 error: Not found: aws_ec2_transit_gateway_peering_attachment.test
    testing.go:696: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.
        
        Error: config is invalid: 2 problems:
        
        - Provider configuration not present: To work with aws_ec2_transit_gateway.second its original provider configuration at provider.aws.alternate is required, but it has been removed. This occurs when a provider configuration is removed while objects created by that provider still exist in the state. Re-add the provider configuration to destroy aws_ec2_transit_gateway.second, after which you can remove the provider configuration again.
        - Provider configuration not present: To work with data.aws_caller_identity.second its original provider configuration at provider.aws.alternate is required, but it has been removed. This occurs when a provider configuration is removed while objects created by that provider still exist in the state. Re-add the provider configuration to destroy data.aws_caller_identity.second, after which you can remove the provider configuration again.
        
        State: aws_ec2_transit_gateway.first:
          ID = tgw-x1x1x1x1x1x1x1x1x
          provider = provider.aws
          amazon_side_asn = 64512
          arn = arn:aws:ec2:us-west-2:012345678901:transit-gateway/tgw-x1x1x1x1x1x1x1x1x
          association_default_route_table_id = tgw-rtb-x1x1x1x1x1x1x1x1x
          auto_accept_shared_attachments = disable
          default_route_table_association = enable
          default_route_table_propagation = enable
          description = 
          dns_support = enable
          owner_id = 012345678901
          propagation_default_route_table_id = tgw-rtb-x1x1x1x1x1x1x1x1x
          tags.% = 1
          tags.Name = tf-acc-test-ec2-transit-gateway-first-Config
          vpn_ecmp_support = enable
        aws_ec2_transit_gateway.second:
          ID = tgw-x2x2x2x2x2x2x2x2x
          provider = provider.aws.alternate
          amazon_side_asn = 64512
          arn = arn:aws:ec2:us-east-1:012345678901:transit-gateway/tgw-x2x2x2x2x2x2x2x2x
          association_default_route_table_id = tgw-rtb-x2x2x2x2x2x2x2x2x
          auto_accept_shared_attachments = disable
          default_route_table_association = enable
          default_route_table_propagation = enable
          description = 
          dns_support = enable
          owner_id = 012345678901
          propagation_default_route_table_id = tgw-rtb-x2x2x2x2x2x2x2x2x
          tags.% = 1
          tags.Name = tf-acc-test-ec2-transit-gateway-second-Config
          vpn_ecmp_support = enable
        aws_ec2_transit_gateway_peering_attachment.example:
          ID = tgw-attach-0960a65acef1bca0c
          provider = provider.aws
          peer_account_id = 012345678901
          peer_region = us-east-1
          peer_transit_gateway_id = tgw-x2x2x2x2x2x2x2x2x
          tags.% = 1
          tags.Name = tf-acc-test-ec2-transit-gateway-peering-attachment-Config
          transit_gateway_id = tgw-x1x1x1x1x1x1x1x1x
        
          Dependencies:
            aws_ec2_transit_gateway.first
            aws_ec2_transit_gateway.second
            data.aws_caller_identity.second
        data.aws_caller_identity.second:
          ID = 2019-12-24 13:10:46.27799 +0000 UTC
          provider = provider.aws.alternate
          account_id = 012345678901
          arn = arn:aws:sts::012345678901:assumed-role/xxxxx
          user_id = AROARBTZVYAKHZMQ5BU6Q:scripted-assume-role
--- FAIL: TestAccAWSEc2TransitGatewayPeeringAttachment_Tags (171.59s)
    testing.go:635: Step 0 error: Check failed: Check 1/3 error: Not found: aws_ec2_transit_gateway_peering_attachment.test
    testing.go:696: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.
        
        Error: errors during apply: error deleting EC2 Transit Gateway: IncorrectState: tgw-x3x3x3x3x3x3x3x3x has non-deleted Transit Gateway Cross Region Peering Attachments: tgw-attach-x4x4x4x4x4x4x4x4x.
                status code: 400, request id: 046caa36-ca25-4a30-88fd-13a9064adb2f
        
        State: aws_ec2_transit_gateway.second:
          ID = tgw-x3x3x3x3x3x3x3x3x
          provider = provider.aws.alternate
          amazon_side_asn = 64512
          arn = arn:aws:ec2:us-east-1:012345678901:transit-gateway/tgw-x3x3x3x3x3x3x3x3x
          association_default_route_table_id = tgw-rtb-x3x3x3x3x3x3x3x3x
          auto_accept_shared_attachments = disable
          default_route_table_association = enable
          default_route_table_propagation = enable
          description = 
          dns_support = enable
          owner_id = 012345678901
          propagation_default_route_table_id = tgw-rtb-x3x3x3x3x3x3x3x3x
          tags.% = 1
          tags.Name = tf-acc-test-ec2-transit-gateway-second-ConfigTags1
          vpn_ecmp_support = enable
--- FAIL: TestAccAWSEc2TransitGatewayPeeringAttachment_disappears (194.91s)
    testing.go:635: Step 0 error: Check failed: Check 1/2 error: Not found: aws_ec2_transit_gateway_peering_attachment.test
    testing.go:696: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.
        
        Error: errors during apply: error deleting EC2 Transit Gateway: IncorrectState: tgw-x5x5x5x5x5x5x5x5x has non-deleted Transit Gateway Cross Region Peering Attachments: tgw-attach-x6x6x6x6x6x6x6x6x.
                status code: 400, request id: b810b053-9d45-4262-a4fc-493b925385e4
        
        State: aws_ec2_transit_gateway.first:
          ID = tgw-x5x5x5x5x5x5x5x5x
          provider = provider.aws
          amazon_side_asn = 64512
          arn = arn:aws:ec2:us-west-2:012345678901:transit-gateway/tgw-x5x5x5x5x5x5x5x5x
          association_default_route_table_id = tgw-rtb-x5x5x5x5x5x5x5x5x
          auto_accept_shared_attachments = disable
          default_route_table_association = enable
          default_route_table_propagation = enable
          description = 
          dns_support = enable
          owner_id = 012345678901
          propagation_default_route_table_id = tgw-rtb-x5x5x5x5x5x5x5x5x
          tags.% = 1
          tags.Name = tf-acc-test-ec2-transit-gateway-first-Config
          vpn_ecmp_support = enable
FAIL
FAIL    github.com/terraform-providers/terraform-provider-aws/aws       195.809s
FAIL
make: *** [testacc] Error 1

Joe Horner and others added 2 commits December 24, 2019 13:36
Initial tests added for resource: transit gateway peering attachment,
work in progress.

Co-authored-by: Omarimcblack 43746683+Omarimcblack@users.noreply.github.com
@Omarimcblack Omarimcblack merged commit 20f5872 into add_transit_gw_peering Dec 24, 2019
@Omarimcblack Omarimcblack deleted the tgw_peer_tests branch December 24, 2019 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant