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

Terraform Apply shows changes even after Apply #5745

Closed
ghost opened this issue Aug 31, 2018 · 3 comments
Closed

Terraform Apply shows changes even after Apply #5745

ghost opened this issue Aug 31, 2018 · 3 comments
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@ghost
Copy link

ghost commented Aug 31, 2018

This issue was originally opened by @dbadola as hashicorp/terraform#18763. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.11.8
+ provider.aws v1.33.0

Terraform Configuration Files

resource "aws_instance" "fw1" {
  ami               = "${var.ami_id}"
  instance_type     = "${var.instance_type}"
  network_interface {
     network_interface_id = "${var.fw1_trust_intf_id}"
     device_index = 0
  }
  network_interface {
     network_interface_id = "${var.fw1_untrust_intf_id}"
     device_index = 1
  }  
  network_interface {
     network_interface_id = "${var.fw1_mgmt_intf_id}"
     device_index = 2
  }
  network_interface {
     network_interface_id = "${var.fw1_ha_intf_id}"
     device_index = 3
  }    
  tags {
    Name = "${var.fw1}"
  }
  lifecycle { 
   ignore_changes = ["network_interface"] 
  } 
}

Debug Output

Crash Output

Expected Behavior

I have deployed an Instance with 4 interface. Once deployed I wanted to swap port 3 and 4. When deployed Port3 was for MGMT and Port4 was for HA. Once I swap the interface id's. Instance should change the interfaces without deleting the instance.

Actual Behavior

Even though if i did "Terraform apply" below changes is showing up again and again if I re-run "terraform apply"

 ~ module.default_rtb.aws_default_route_table.default_rtb
      route.2492921425.cidr_block:                "" => "0.0.0.0/0"
      route.2492921425.egress_only_gateway_id:    "" => ""
      route.2492921425.gateway_id:                "" => ""
      route.2492921425.instance_id:               "" => ""
      route.2492921425.ipv6_cidr_block:           "" => ""
      route.2492921425.nat_gateway_id:            "" => ""
      route.2492921425.network_interface_id:      "" => "eni-0b7dc2d8e6e2aceb1"
      route.2492921425.vpc_peering_connection_id: "" => ""
      route.595419263.cidr_block:                 "0.0.0.0/0" => ""
      route.595419263.egress_only_gateway_id:     "" => ""
      route.595419263.gateway_id:                 "" => ""
      route.595419263.instance_id:                "i-035d41365218caf4b" => ""
      route.595419263.ipv6_cidr_block:            "" => ""
      route.595419263.nat_gateway_id:             "" => ""
      route.595419263.network_interface_id:       "eni-0b7dc2d8e6e2aceb1" => ""
      route.595419263.vpc_peering_connection_id:  "" => ""

  ~ module.fw_trust_rtb.aws_route_table.fw_trust_rtb
      route.2492921425.cidr_block:                "" => "0.0.0.0/0"
      route.2492921425.egress_only_gateway_id:    "" => ""
      route.2492921425.gateway_id:                "" => ""
      route.2492921425.instance_id:               "" => ""
      route.2492921425.ipv6_cidr_block:           "" => ""
      route.2492921425.nat_gateway_id:            "" => ""
      route.2492921425.network_interface_id:      "" => "eni-0b7dc2d8e6e2aceb1"
      route.2492921425.vpc_peering_connection_id: "" => ""
      route.595419263.cidr_block:                 "0.0.0.0/0" => ""
      route.595419263.egress_only_gateway_id:     "" => ""
      route.595419263.gateway_id:                 "" => ""
      route.595419263.instance_id:                "i-035d41365218caf4b" => ""
      route.595419263.ipv6_cidr_block:            "" => ""
      route.595419263.nat_gateway_id:             "" => ""
      route.595419263.network_interface_id:       "eni-0b7dc2d8e6e2aceb1" => ""
      route.595419263.vpc_peering_connection_id:  "" => ""

In order to solve this i have to remove lifecycle section and then it will destroy the instance and recreate it

  lifecycle { 
   ignore_changes = ["network_interface"] 
  }

Steps to Reproduce

terraform apply

Additional Context

References

@bleggett
Copy link

bleggett commented Sep 4, 2018

Wondering if this bug might be related to #5742

@bflad bflad added the service/ec2 Issues and PRs that pertain to the ec2 service. label Sep 25, 2018
@aeschright aeschright added needs-triage Waiting for first response or review from a maintainer. bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 24, 2019
ewbankkit added a commit to ewbankkit/terraform-provider-aws that referenced this issue Aug 8, 2020
…o_NetworkInterface_Attached' and 'TestAccAWSRouteTable_IPv4_To_NetworkInterface_TwoAttachments'.

These two tests fail as expected (#1426 and hashicorp#5745).
ewbankkit added a commit to ewbankkit/terraform-provider-aws that referenced this issue Dec 7, 2020
…o_NetworkInterface_Attached' and 'TestAccAWSRouteTable_IPv4_To_NetworkInterface_TwoAttachments'.

These two tests fail as expected (#1426 and hashicorp#5745).
bflad added a commit that referenced this issue Dec 7, 2020
…ion for future fixes/enhancements (#14013)

* r/aws_route: New 'TestAccAWSRouteTable_basic'.

Acceptance test output:

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

* r/aws_route: Add 'TestAccAWSRouteTable_disappears'.

Acceptance test output:

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

* r/aws_route: Add 'TestAccAWSRouteTable_IPv4_To_InternetGateway'.

Acceptance test output:

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

* r/aws_route: Update 'TestAccAWSRouteTable_tags'.

Acceptance test output:

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

* r/aws_route_table: 'TestAccAWSRouteTable_instance' -> 'TestAccAWSRouteTable_IPv4_To_Instance'.

Acceptance test output:

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

* r/aws_route_table: 'TestAccAWSRouteTable_ipv6' -> 'TestAccAWSRouteTable_IPv6_To_EgressOnlyInternetGateway'.

Acceptance test output:

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

* r/aws_route_table: Fix 'testAccRouteTableConfigPanicEmptyRoute'.

Acceptance test output:

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

* r/aws_route_table: Rework 'TestAccAWSRouteTable_Route_ConfigMode'.

Acceptance test output:

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

* r/aws_route_table: 'TestAccAWSRouteTable_Route_TransitGatewayID' -> 'TestAccAWSRouteTable_IPv4_To_TransitGateway'.

Acceptance test output:

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

* r/aws_route_table: 'TestAccAWSRouteTable_vpcPeering' -> 'TestAccAWSRouteTable_IPv4_To_VpcPeeringConnection'.

Acceptance test output:

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

* r/aws_route_table: Rework 'TestAccAWSRouteTable_vgwRoutePropagation'.

Acceptance test output:

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

* r/aws_route_table: Add 'TestAccAWSRouteTable_VpcMultipleCidrs_VpcEndpointAssociation'. Currently fails.

Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRouteTable_VpcMultipleCidrs_VpcEndpointAssociation'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSRouteTable_VpcMultipleCidrs_VpcEndpointAssociation -timeout 120m
=== RUN   TestAccAWSRouteTable_VpcMultipleCidrs_VpcEndpointAssociation
=== PAUSE TestAccAWSRouteTable_VpcMultipleCidrs_VpcEndpointAssociation
=== CONT  TestAccAWSRouteTable_VpcMultipleCidrs_VpcEndpointAssociation
--- FAIL: TestAccAWSRouteTable_VpcMultipleCidrs_VpcEndpointAssociation (47.64s)
    testing.go:684: Step 0 error: Check failed: Check 2/7 error: Route Table has incorrect number of routes (Expected=3, Actual=2)

FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	47.694s
FAIL
GNUmakefile:26: recipe for target 'testacc' failed
make: *** [testacc] Error 1

* Comment out 'TestAccAWSRouteTable_VpcMultipleCidrs_VpcEndpointAssociation'.

* r/aws_route_table: Add 'TestAccAWSRouteTable_IPv4_To_NatGateway'.

Acceptance test output:

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

* r/aws_route_table: Add 'TestAccAWSRouteTable_IPv6_To_NetworkInterface'.

Acceptance test output:

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

* r/aws_route_table: Rework 'TestAccAWSRouteTable_ConditionalCidrBlock'.

Acceptance test output:

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

* r/aws_route_table: Rework 'testAccCheckAWSRouteTablePropagatingVgw'.

Acceptance test output:

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

* Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRouteTable_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 2 -run=TestAccAWSRouteTable_ -timeout 120m
=== RUN   TestAccAWSRouteTable_basic
=== PAUSE TestAccAWSRouteTable_basic
=== RUN   TestAccAWSRouteTable_disappears
=== PAUSE TestAccAWSRouteTable_disappears
=== RUN   TestAccAWSRouteTable_IPv4_To_InternetGateway
=== PAUSE TestAccAWSRouteTable_IPv4_To_InternetGateway
=== RUN   TestAccAWSRouteTable_IPv4_To_Instance
=== PAUSE TestAccAWSRouteTable_IPv4_To_Instance
=== RUN   TestAccAWSRouteTable_IPv6_To_EgressOnlyInternetGateway
=== PAUSE TestAccAWSRouteTable_IPv6_To_EgressOnlyInternetGateway
=== RUN   TestAccAWSRouteTable_tags
=== PAUSE TestAccAWSRouteTable_tags
=== RUN   TestAccAWSRouteTable_panicEmptyRoute
=== PAUSE TestAccAWSRouteTable_panicEmptyRoute
=== RUN   TestAccAWSRouteTable_Route_ConfigMode
=== PAUSE TestAccAWSRouteTable_Route_ConfigMode
=== RUN   TestAccAWSRouteTable_IPv4_To_TransitGateway
=== PAUSE TestAccAWSRouteTable_IPv4_To_TransitGateway
=== RUN   TestAccAWSRouteTable_IPv4_To_VpcPeeringConnection
=== PAUSE TestAccAWSRouteTable_IPv4_To_VpcPeeringConnection
=== RUN   TestAccAWSRouteTable_vgwRoutePropagation
=== PAUSE TestAccAWSRouteTable_vgwRoutePropagation
=== RUN   TestAccAWSRouteTable_ConditionalCidrBlock
=== PAUSE TestAccAWSRouteTable_ConditionalCidrBlock
=== RUN   TestAccAWSRouteTable_IPv4_To_NatGateway
=== PAUSE TestAccAWSRouteTable_IPv4_To_NatGateway
=== RUN   TestAccAWSRouteTable_IPv6_To_NetworkInterface
=== PAUSE TestAccAWSRouteTable_IPv6_To_NetworkInterface
=== CONT  TestAccAWSRouteTable_basic
=== CONT  TestAccAWSRouteTable_IPv4_To_TransitGateway
--- PASS: TestAccAWSRouteTable_basic (37.06s)
=== CONT  TestAccAWSRouteTable_IPv6_To_NetworkInterface
--- PASS: TestAccAWSRouteTable_IPv6_To_NetworkInterface (47.79s)
=== CONT  TestAccAWSRouteTable_IPv4_To_NatGateway
--- PASS: TestAccAWSRouteTable_IPv4_To_NatGateway (196.98s)
=== CONT  TestAccAWSRouteTable_ConditionalCidrBlock
--- PASS: TestAccAWSRouteTable_IPv4_To_TransitGateway (348.59s)
=== CONT  TestAccAWSRouteTable_vgwRoutePropagation
--- PASS: TestAccAWSRouteTable_ConditionalCidrBlock (77.19s)
=== CONT  TestAccAWSRouteTable_IPv4_To_VpcPeeringConnection
--- PASS: TestAccAWSRouteTable_IPv4_To_VpcPeeringConnection (44.68s)
=== CONT  TestAccAWSRouteTable_IPv6_To_EgressOnlyInternetGateway
--- PASS: TestAccAWSRouteTable_IPv6_To_EgressOnlyInternetGateway (42.42s)
=== CONT  TestAccAWSRouteTable_Route_ConfigMode
--- PASS: TestAccAWSRouteTable_vgwRoutePropagation (115.86s)
=== CONT  TestAccAWSRouteTable_panicEmptyRoute
--- PASS: TestAccAWSRouteTable_panicEmptyRoute (24.55s)
=== CONT  TestAccAWSRouteTable_tags
--- PASS: TestAccAWSRouteTable_Route_ConfigMode (101.57s)
=== CONT  TestAccAWSRouteTable_IPv4_To_InternetGateway
--- PASS: TestAccAWSRouteTable_tags (83.12s)
=== CONT  TestAccAWSRouteTable_IPv4_To_Instance
--- PASS: TestAccAWSRouteTable_IPv4_To_InternetGateway (78.17s)
=== CONT  TestAccAWSRouteTable_disappears
--- PASS: TestAccAWSRouteTable_disappears (34.81s)
--- PASS: TestAccAWSRouteTable_IPv4_To_Instance (121.04s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	693.250s

* r/aws_route_table: Add (and comment out) 'TestAccAWSRouteTable_IPv4_To_NetworkInterface_Attached' and 'TestAccAWSRouteTable_IPv4_To_NetworkInterface_TwoAttachments'.

These two tests fail as expected (#1426 and #5745).

* r/aws_route_table: Add 'testAccCheckAWSRouteTableRoute'.

* r/aws_route_table: Rename 'TestAccAWSRouteTable_VpcMultipleCidrs_VpcEndpointAssociation' to 'TestAccAWSRouteTable_VpcMultipleCidrs'. Gateway VPC Endpoint routes are added asynchronously so don't attempt to test.

Acceptance test output:

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

* r/aws_route_table: Add 'TestAccAWSRouteTable_VpcClassicLink'

Acceptance test output:

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

* r/aws_route_table: Add 'TestAccAWSRouteTable_GatewayVpcEndpoint'

Acceptance test output:

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

* r/aws_route_table: Add 'TestAccAWSRouteTable_disappears_SubnetAssociation'.

Acceptance test output:

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

* r/aws_route_table: Add 'TestAccAWSRouteTable_MultipleRoutes'.

Acceptance test output:

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

* r/aws_route_table: Use Amazon NAT instance AMI for instance tests.

Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRouteTable_IPv4_To_Instance'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSRouteTable_IPv4_To_Instance -timeout 120m
=== RUN   TestAccAWSRouteTable_IPv4_To_Instance
=== PAUSE TestAccAWSRouteTable_IPv4_To_Instance
=== CONT  TestAccAWSRouteTable_IPv4_To_Instance
--- PASS: TestAccAWSRouteTable_IPv4_To_Instance (109.91s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	110.478s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRouteTable_MultipleRoutes'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSRouteTable_MultipleRoutes -timeout 120m
=== RUN   TestAccAWSRouteTable_MultipleRoutes
=== PAUSE TestAccAWSRouteTable_MultipleRoutes
=== CONT  TestAccAWSRouteTable_MultipleRoutes
--- PASS: TestAccAWSRouteTable_MultipleRoutes (204.15s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	204.201s

* r/aws_route_table: Delete 'TestAccAWSRouteTable_IPv4_To_NetworkInterface_Attached' and 'TestAccAWSRouteTable_IPv4_To_NetworkInterface_TwoAttachments'.

If we mark `instance_id` and `network_interface_id` as both `Computed: true` in the `route` attribute's schema
then we end up having to change the associated set hash function to choose one or other of those attributes to
include in the hash and ignore the other. This means that either 'TestAccAWSRouteTable_IPv4_To_Instance' will
show continuous diffs or 'TestAccAWSRouteTable_IPv4_To_NetworkInterface_Attached' will.
The longer term solution is to remove `instance_id` as a route target as the instance's primary ENI's ID can
be used in the `network_interface_id`. This will also simplify the `aws_route` resource.

* r/aws_route_table: Use 'testAccAvailableAZsNoOptInExcludeConfig'.

* Use 'testAccAvailableAZsNoOptInDefaultExcludeConfig'.

* Fix compilation errors after rebase.

* Fix compilation errors after rebase.

* Exclude 'resource_aws_route_table_test.go' from acceptance test Terraform linting (testAccAWSRouteTableConfigMultipleRoutes).

* r/aws_route_table: Ensure no diff when expanded form of IPv6 CIDR block is used.

Acceptance test output:

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

* r/aws_vpc_endpoint_route_table_association: Rename 'TestAccAWSRouteTable_Route_VpcEndpointId' to 'TestAccAWSRouteTable_IPv4_To_VpcEndpoint'.

Acceptance test output:

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

* r/aws_route_table: Missing commit from rebase.

* Update aws/resource_aws_route_table_test.go

Co-authored-by: Brian Flad <[email protected]>

* Update aws/resource_aws_route_table_test.go

Co-authored-by: Brian Flad <[email protected]>

* Update aws/resource_aws_route_table_test.go

Co-authored-by: Brian Flad <[email protected]>

* Update aws/resource_aws_route_table_test.go

Co-authored-by: Brian Flad <[email protected]>

* Update aws/resource_aws_route_table_test.go

Co-authored-by: Brian Flad <[email protected]>

* r/aws_route_table: 'make fmt'.

* r/aws_route_table: Refactor 'TestAccAWSRouteTable_MultipleRoutes' so as to avoid dynamic attribute names.

Acceptance test output:

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

* Fix 'terrafmt' issues.

Co-authored-by: Brian Flad <[email protected]>
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Jul 16, 2021
@github-actions
Copy link

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 have found a problem that seems similar to this, 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 Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

3 participants