fix: Remove timeouts from aws_default_route_table
parent
0bff01a7b2
commit
d40368983c
|
@ -134,6 +134,7 @@ func TestTerraformStateReader_AWS_Resources(t *testing.T) {
|
|||
{name: "IAM group policy", dirName: "aws_iam_group_policy", wantErr: false},
|
||||
{name: "IAM group policy attachment", dirName: "aws_iam_group_policy_attachment", wantErr: false},
|
||||
{name: "VPC security group rule", dirName: "aws_vpc_security_group_rule", wantErr: false},
|
||||
{name: "default route table", dirName: "aws_default_route_table", wantErr: false, providerVersion: "3.62.0"},
|
||||
{name: "route table", dirName: "aws_route_table", wantErr: false, providerVersion: "3.62.0"},
|
||||
{name: "route table associations", dirName: "aws_route_assoc", wantErr: false},
|
||||
{name: "route", dirName: "aws_route", wantErr: false},
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# This file is maintained automatically by "terraform init".
|
||||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/hashicorp/aws" {
|
||||
version = "3.62.0"
|
||||
constraints = "3.62.0"
|
||||
hashes = [
|
||||
"h1:UjsV2CRiVU3ye7w9AabX6t/bmDuAF5mt+fr63/pfDHQ=",
|
||||
"zh:08a94019e17304f5927d7c85b8f5dade6b9ffebeb7b06ec0643aaa1130c4c85d",
|
||||
"zh:0e3709f6c1fed8c5119a5653bec7e3069258ddf91f62d851f8deeede10487fb8",
|
||||
"zh:0ed32886abce5fee49f1ae49b84472558224366c31a638e51c63061c3126e7c2",
|
||||
"zh:0f1ecbeddfa61d87701a3f3b463e508773171981bf6dad8b1313a9eafaffd5e1",
|
||||
"zh:724cde4f27253b547714a606288ede17f5df67f430438478feed113d7acb5ac7",
|
||||
"zh:81e6e751a168eab1a054230d4441b43c68693bfb6e0545536f2ea6dbb39fe9af",
|
||||
"zh:84deaf1c6661ba0dbc07ac159109fb6746772476646d39854c755c8dfb7a8ac4",
|
||||
"zh:909dcefc6c986c926ad856662ab5d38a3988b1906569387b5b58e7ddd89a155c",
|
||||
"zh:d03886705e9f25d4bebeae115bb07e36adb14e778859cedb2bf3c3bed39f4d2b",
|
||||
"zh:de9fc80c5a5d3be7535856242c823a92516eb7d5c16ae509fa10b92cd6b3fa9b",
|
||||
"zh:e91dcd9eec8b779a9b089f2f8d45f1047f890cb7b9241490451da52c04cef63d",
|
||||
]
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
[
|
||||
{
|
||||
"Id": "rtb-03fda555c6c35a1e5",
|
||||
"Type": "aws_default_route_table",
|
||||
"Attrs": {
|
||||
"arn": "arn:aws:ec2:us-east-1:282061376516:route-table/rtb-03fda555c6c35a1e5",
|
||||
"default_route_table_id": "rtb-03fda555c6c35a1e5",
|
||||
"id": "rtb-03fda555c6c35a1e5",
|
||||
"owner_id": "282061376516",
|
||||
"vpc_id": "vpc-092fed41ffac6df72"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": "vpc-092fed41ffac6df72",
|
||||
"Type": "aws_default_vpc",
|
||||
"Attrs": {
|
||||
"arn": "arn:aws:ec2:us-east-1:282061376516:vpc/vpc-092fed41ffac6df72",
|
||||
"assign_generated_ipv6_cidr_block": false,
|
||||
"cidr_block": "172.31.0.0/16",
|
||||
"default_network_acl_id": "acl-002fc212359c4b93a",
|
||||
"default_route_table_id": "rtb-03fda555c6c35a1e5",
|
||||
"default_security_group_id": "sg-03760d6acce69ef1f",
|
||||
"dhcp_options_id": "dopt-0e014c87049a96ce5",
|
||||
"enable_classiclink": false,
|
||||
"enable_classiclink_dns_support": false,
|
||||
"enable_dns_hostnames": true,
|
||||
"enable_dns_support": true,
|
||||
"id": "vpc-092fed41ffac6df72",
|
||||
"instance_tenancy": "default",
|
||||
"ipv6_association_id": "",
|
||||
"ipv6_cidr_block": "",
|
||||
"main_route_table_id": "rtb-03fda555c6c35a1e5",
|
||||
"owner_id": "282061376516"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": "vpc-09268173e7934824f",
|
||||
"Type": "aws_vpc",
|
||||
"Attrs": {
|
||||
"arn": "arn:aws:ec2:us-east-1:282061376516:vpc/vpc-09268173e7934824f",
|
||||
"assign_generated_ipv6_cidr_block": false,
|
||||
"cidr_block": "10.0.0.0/16",
|
||||
"default_network_acl_id": "acl-017254a726eae530a",
|
||||
"default_route_table_id": "rtb-01a82ab505edb8894",
|
||||
"default_security_group_id": "sg-0f6fcfa77cc4c1d4a",
|
||||
"dhcp_options_id": "dopt-0e014c87049a96ce5",
|
||||
"enable_classiclink": false,
|
||||
"enable_classiclink_dns_support": false,
|
||||
"enable_dns_hostnames": false,
|
||||
"enable_dns_support": true,
|
||||
"id": "vpc-09268173e7934824f",
|
||||
"instance_tenancy": "default",
|
||||
"ipv6_association_id": "",
|
||||
"ipv6_cidr_block": "",
|
||||
"main_route_table_id": "rtb-01a82ab505edb8894",
|
||||
"owner_id": "282061376516"
|
||||
}
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,24 @@
|
|||
provider "aws" {
|
||||
region = "us-east-1"
|
||||
}
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
aws = "3.62.0"
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_default_vpc" "default" {}
|
||||
|
||||
resource "aws_vpc" "vpc" {
|
||||
cidr_block = "10.0.0.0/16"
|
||||
}
|
||||
|
||||
resource "aws_default_route_table" "default" {
|
||||
default_route_table_id = aws_default_vpc.default.default_route_table_id
|
||||
|
||||
timeouts {
|
||||
create = "6m"
|
||||
update = "3m"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.2.2",
|
||||
"serial": 4,
|
||||
"lineage": "14d1f567-0bef-b33c-81ac-3c2a27a9d155",
|
||||
"outputs": {},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "aws_default_route_table",
|
||||
"name": "default",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"arn": "arn:aws:ec2:us-east-1:282061376516:route-table/rtb-03fda555c6c35a1e5",
|
||||
"default_route_table_id": "rtb-03fda555c6c35a1e5",
|
||||
"id": "rtb-03fda555c6c35a1e5",
|
||||
"owner_id": "282061376516",
|
||||
"propagating_vgws": null,
|
||||
"route": [],
|
||||
"tags": null,
|
||||
"tags_all": {},
|
||||
"timeouts": {
|
||||
"create": "6m",
|
||||
"update": "3m"
|
||||
},
|
||||
"vpc_id": "vpc-092fed41ffac6df72"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozNjAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwfX0=",
|
||||
"dependencies": [
|
||||
"aws_default_vpc.default"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "aws_default_vpc",
|
||||
"name": "default",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 1,
|
||||
"attributes": {
|
||||
"arn": "arn:aws:ec2:us-east-1:282061376516:vpc/vpc-092fed41ffac6df72",
|
||||
"assign_generated_ipv6_cidr_block": false,
|
||||
"cidr_block": "172.31.0.0/16",
|
||||
"default_network_acl_id": "acl-002fc212359c4b93a",
|
||||
"default_route_table_id": "rtb-03fda555c6c35a1e5",
|
||||
"default_security_group_id": "sg-03760d6acce69ef1f",
|
||||
"dhcp_options_id": "dopt-0e014c87049a96ce5",
|
||||
"enable_classiclink": false,
|
||||
"enable_classiclink_dns_support": false,
|
||||
"enable_dns_hostnames": true,
|
||||
"enable_dns_support": true,
|
||||
"id": "vpc-092fed41ffac6df72",
|
||||
"instance_tenancy": "default",
|
||||
"ipv6_association_id": "",
|
||||
"ipv6_cidr_block": "",
|
||||
"main_route_table_id": "rtb-03fda555c6c35a1e5",
|
||||
"owner_id": "282061376516",
|
||||
"tags": null,
|
||||
"tags_all": {}
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ=="
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "aws_vpc",
|
||||
"name": "vpc",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 1,
|
||||
"attributes": {
|
||||
"arn": "arn:aws:ec2:us-east-1:282061376516:vpc/vpc-09268173e7934824f",
|
||||
"assign_generated_ipv6_cidr_block": false,
|
||||
"cidr_block": "10.0.0.0/16",
|
||||
"default_network_acl_id": "acl-017254a726eae530a",
|
||||
"default_route_table_id": "rtb-01a82ab505edb8894",
|
||||
"default_security_group_id": "sg-0f6fcfa77cc4c1d4a",
|
||||
"dhcp_options_id": "dopt-0e014c87049a96ce5",
|
||||
"enable_classiclink": false,
|
||||
"enable_classiclink_dns_support": false,
|
||||
"enable_dns_hostnames": false,
|
||||
"enable_dns_support": true,
|
||||
"id": "vpc-09268173e7934824f",
|
||||
"instance_tenancy": "default",
|
||||
"ipv6_association_id": "",
|
||||
"ipv6_cidr_block": "",
|
||||
"main_route_table_id": "rtb-01a82ab505edb8894",
|
||||
"owner_id": "282061376516",
|
||||
"tags": null,
|
||||
"tags_all": {}
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ=="
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -11,4 +11,8 @@ func initAwsDefaultRouteTableMetadata(resourceSchemaRepository resource.SchemaRe
|
|||
}
|
||||
})
|
||||
resourceSchemaRepository.SetFlags(AwsDefaultRouteTableResourceType, resource.FlagDeepMode)
|
||||
resourceSchemaRepository.SetNormalizeFunc(AwsDefaultRouteTableResourceType, func(res *resource.Resource) {
|
||||
val := res.Attrs
|
||||
val.SafeDelete([]string{"timeouts"})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue