Last active
August 12, 2019 12:50
-
-
Save dpiddockcmp/bd45caa17caa445c46cf9325da649789 to your computer and use it in GitHub Desktop.
terraform-provider-aws 8268
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_vpc" "alb_test" { | |
cidr_block = "10.0.0.0/16" | |
tags = { | |
Name = "ALB_test" | |
} | |
} | |
locals { | |
subs_cidr = ["10.0.0.0/24", "10.0.1.0/24"] | |
azs = ["us-east-1a", "us-east-1b"] | |
} | |
resource "aws_subnet" "alb_test" { | |
count = 2 | |
vpc_id = aws_vpc.alb_test.id | |
cidr_block = local.subs_cidr[count.index] | |
map_public_ip_on_launch = true | |
availability_zone = local.azs[count.index] | |
tags = { | |
Name = "ALB_test-${count.index}" | |
} | |
} | |
resource "aws_internet_gateway" "gw" { | |
vpc_id = aws_vpc.alb_test.id | |
tags = { | |
Name = "ALB_test" | |
} | |
} | |
resource "aws_lb" "this" { | |
name = "alb-test" | |
load_balancer_type = "application" | |
security_groups = [aws_vpc.alb_test.default_security_group_id] | |
subnets = aws_subnet.alb_test[*].id | |
depends_on = [aws_internet_gateway.gw] | |
} | |
resource "aws_lb_listener" "this" { | |
load_balancer_arn = aws_lb.this.arn | |
port = 80 | |
protocol = "HTTP" | |
default_action { | |
type = "fixed-response" | |
fixed_response { | |
content_type = "text/plain" | |
message_body = "Hi" | |
status_code = 404 | |
} | |
} | |
} | |
resource "aws_lb_listener_rule" "this" { | |
listener_arn = aws_lb_listener.this.arn | |
priority = 100 | |
action { | |
type = "fixed-response" | |
fixed_response { | |
content_type = "text/plain" | |
message_body = "Static" | |
status_code = 200 | |
} | |
} | |
condition { | |
field = "path-pattern" | |
path_pattern { | |
# Original | |
#values = ["1"] | |
# Update | |
values = ["1", "2", "3"] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"format_version": "0.1", | |
"terraform_version": "0.12.6", | |
"planned_values": { | |
"root_module": { | |
"resources": [ | |
{ | |
"address": "aws_internet_gateway.gw", | |
"mode": "managed", | |
"type": "aws_internet_gateway", | |
"name": "gw", | |
"provider_name": "aws", | |
"schema_version": 0, | |
"values": { | |
"id": "igw-04429d048cc6cf869", | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test" | |
}, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
} | |
}, | |
{ | |
"address": "aws_lb.this", | |
"mode": "managed", | |
"type": "aws_lb", | |
"name": "this", | |
"provider_name": "aws", | |
"schema_version": 0, | |
"values": { | |
"access_logs": [ | |
{ | |
"bucket": "", | |
"enabled": false, | |
"prefix": "" | |
} | |
], | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"arn_suffix": "app/alb-test/bcafe59f768ee71e", | |
"dns_name": "alb-test-2010207985.us-east-1.elb.amazonaws.com", | |
"enable_cross_zone_load_balancing": null, | |
"enable_deletion_protection": false, | |
"enable_http2": true, | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"idle_timeout": 60, | |
"internal": false, | |
"ip_address_type": "ipv4", | |
"load_balancer_type": "application", | |
"name": "alb-test", | |
"name_prefix": null, | |
"security_groups": [ | |
"sg-0af69c2fa2436a37a" | |
], | |
"subnet_mapping": [ | |
{ | |
"allocation_id": "", | |
"subnet_id": "subnet-083457d50fb270f51" | |
}, | |
{ | |
"allocation_id": "", | |
"subnet_id": "subnet-0b25e4359f137259f" | |
} | |
], | |
"subnets": [ | |
"subnet-083457d50fb270f51", | |
"subnet-0b25e4359f137259f" | |
], | |
"tags": {}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35", | |
"zone_id": "Z35SXDOTRQ7X7K" | |
} | |
}, | |
{ | |
"address": "aws_lb_listener.this", | |
"mode": "managed", | |
"type": "aws_lb_listener", | |
"name": "this", | |
"provider_name": "aws", | |
"schema_version": 0, | |
"values": { | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"certificate_arn": null, | |
"default_action": [ | |
{ | |
"authenticate_cognito": [], | |
"authenticate_oidc": [], | |
"fixed_response": [ | |
{ | |
"content_type": "text/plain", | |
"message_body": "Hi", | |
"status_code": "404" | |
} | |
], | |
"order": 1, | |
"redirect": [], | |
"target_group_arn": "", | |
"type": "fixed-response" | |
} | |
], | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"load_balancer_arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"port": 80, | |
"protocol": "HTTP", | |
"ssl_policy": "", | |
"timeouts": null | |
} | |
}, | |
{ | |
"address": "aws_lb_listener_rule.this", | |
"mode": "managed", | |
"type": "aws_lb_listener_rule", | |
"name": "this", | |
"provider_name": "aws", | |
"schema_version": 0, | |
"values": { | |
"action": [ | |
{ | |
"authenticate_cognito": [], | |
"authenticate_oidc": [], | |
"fixed_response": [ | |
{ | |
"content_type": "text/plain", | |
"message_body": "Static", | |
"status_code": "200" | |
} | |
], | |
"order": 1, | |
"redirect": [], | |
"target_group_arn": "", | |
"type": "fixed-response" | |
} | |
], | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener-rule/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4/a9700ad1889f678a", | |
"condition": [ | |
{ | |
"field": "path-pattern", | |
"host_header": [], | |
"http_header": [], | |
"http_request_method": [], | |
"path_pattern": [ | |
{ | |
"values": [ | |
"1", | |
"2", | |
"3" | |
] | |
} | |
], | |
"query_string": [], | |
"source_ip": [] | |
} | |
], | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener-rule/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4/a9700ad1889f678a", | |
"listener_arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"priority": 100 | |
} | |
}, | |
{ | |
"address": "aws_subnet.alb_test[0]", | |
"mode": "managed", | |
"type": "aws_subnet", | |
"name": "alb_test", | |
"index": 0, | |
"provider_name": "aws", | |
"schema_version": 1, | |
"values": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:subnet/subnet-0b25e4359f137259f", | |
"assign_ipv6_address_on_creation": false, | |
"availability_zone": "us-east-1a", | |
"availability_zone_id": "use1-az1", | |
"cidr_block": "10.0.0.0/24", | |
"id": "subnet-0b25e4359f137259f", | |
"ipv6_cidr_block": "", | |
"ipv6_cidr_block_association_id": "", | |
"map_public_ip_on_launch": true, | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test-0" | |
}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
} | |
}, | |
{ | |
"address": "aws_subnet.alb_test[1]", | |
"mode": "managed", | |
"type": "aws_subnet", | |
"name": "alb_test", | |
"index": 1, | |
"provider_name": "aws", | |
"schema_version": 1, | |
"values": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:subnet/subnet-083457d50fb270f51", | |
"assign_ipv6_address_on_creation": false, | |
"availability_zone": "us-east-1b", | |
"availability_zone_id": "use1-az2", | |
"cidr_block": "10.0.1.0/24", | |
"id": "subnet-083457d50fb270f51", | |
"ipv6_cidr_block": "", | |
"ipv6_cidr_block_association_id": "", | |
"map_public_ip_on_launch": true, | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test-1" | |
}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
} | |
}, | |
{ | |
"address": "aws_vpc.alb_test", | |
"mode": "managed", | |
"type": "aws_vpc", | |
"name": "alb_test", | |
"provider_name": "aws", | |
"schema_version": 1, | |
"values": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:vpc/vpc-045ebad0e5d75dd35", | |
"assign_generated_ipv6_cidr_block": false, | |
"cidr_block": "10.0.0.0/16", | |
"default_network_acl_id": "acl-01aca1f35cd33de97", | |
"default_route_table_id": "rtb-05bf3888261fc9905", | |
"default_security_group_id": "sg-0af69c2fa2436a37a", | |
"dhcp_options_id": "dopt-xxxxxxxx", | |
"enable_classiclink": false, | |
"enable_classiclink_dns_support": false, | |
"enable_dns_hostnames": false, | |
"enable_dns_support": true, | |
"id": "vpc-045ebad0e5d75dd35", | |
"instance_tenancy": "default", | |
"ipv6_association_id": "", | |
"ipv6_cidr_block": "", | |
"main_route_table_id": "rtb-05bf3888261fc9905", | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test" | |
} | |
} | |
} | |
] | |
} | |
}, | |
"resource_changes": [ | |
{ | |
"address": "aws_internet_gateway.gw", | |
"mode": "managed", | |
"type": "aws_internet_gateway", | |
"name": "gw", | |
"provider_name": "aws", | |
"change": { | |
"actions": [ | |
"no-op" | |
], | |
"before": { | |
"id": "igw-04429d048cc6cf869", | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test" | |
}, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
}, | |
"after": { | |
"id": "igw-04429d048cc6cf869", | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test" | |
}, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
}, | |
"after_unknown": {} | |
} | |
}, | |
{ | |
"address": "aws_lb.this", | |
"mode": "managed", | |
"type": "aws_lb", | |
"name": "this", | |
"provider_name": "aws", | |
"change": { | |
"actions": [ | |
"no-op" | |
], | |
"before": { | |
"access_logs": [ | |
{ | |
"bucket": "", | |
"enabled": false, | |
"prefix": "" | |
} | |
], | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"arn_suffix": "app/alb-test/bcafe59f768ee71e", | |
"dns_name": "alb-test-2010207985.us-east-1.elb.amazonaws.com", | |
"enable_cross_zone_load_balancing": null, | |
"enable_deletion_protection": false, | |
"enable_http2": true, | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"idle_timeout": 60, | |
"internal": false, | |
"ip_address_type": "ipv4", | |
"load_balancer_type": "application", | |
"name": "alb-test", | |
"name_prefix": null, | |
"security_groups": [ | |
"sg-0af69c2fa2436a37a" | |
], | |
"subnet_mapping": [ | |
{ | |
"allocation_id": "", | |
"subnet_id": "subnet-083457d50fb270f51" | |
}, | |
{ | |
"allocation_id": "", | |
"subnet_id": "subnet-0b25e4359f137259f" | |
} | |
], | |
"subnets": [ | |
"subnet-083457d50fb270f51", | |
"subnet-0b25e4359f137259f" | |
], | |
"tags": {}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35", | |
"zone_id": "Z35SXDOTRQ7X7K" | |
}, | |
"after": { | |
"access_logs": [ | |
{ | |
"bucket": "", | |
"enabled": false, | |
"prefix": "" | |
} | |
], | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"arn_suffix": "app/alb-test/bcafe59f768ee71e", | |
"dns_name": "alb-test-2010207985.us-east-1.elb.amazonaws.com", | |
"enable_cross_zone_load_balancing": null, | |
"enable_deletion_protection": false, | |
"enable_http2": true, | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"idle_timeout": 60, | |
"internal": false, | |
"ip_address_type": "ipv4", | |
"load_balancer_type": "application", | |
"name": "alb-test", | |
"name_prefix": null, | |
"security_groups": [ | |
"sg-0af69c2fa2436a37a" | |
], | |
"subnet_mapping": [ | |
{ | |
"allocation_id": "", | |
"subnet_id": "subnet-083457d50fb270f51" | |
}, | |
{ | |
"allocation_id": "", | |
"subnet_id": "subnet-0b25e4359f137259f" | |
} | |
], | |
"subnets": [ | |
"subnet-083457d50fb270f51", | |
"subnet-0b25e4359f137259f" | |
], | |
"tags": {}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35", | |
"zone_id": "Z35SXDOTRQ7X7K" | |
}, | |
"after_unknown": {} | |
} | |
}, | |
{ | |
"address": "aws_lb_listener.this", | |
"mode": "managed", | |
"type": "aws_lb_listener", | |
"name": "this", | |
"provider_name": "aws", | |
"change": { | |
"actions": [ | |
"no-op" | |
], | |
"before": { | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"certificate_arn": null, | |
"default_action": [ | |
{ | |
"authenticate_cognito": [], | |
"authenticate_oidc": [], | |
"fixed_response": [ | |
{ | |
"content_type": "text/plain", | |
"message_body": "Hi", | |
"status_code": "404" | |
} | |
], | |
"order": 1, | |
"redirect": [], | |
"target_group_arn": "", | |
"type": "fixed-response" | |
} | |
], | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"load_balancer_arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"port": 80, | |
"protocol": "HTTP", | |
"ssl_policy": "", | |
"timeouts": null | |
}, | |
"after": { | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"certificate_arn": null, | |
"default_action": [ | |
{ | |
"authenticate_cognito": [], | |
"authenticate_oidc": [], | |
"fixed_response": [ | |
{ | |
"content_type": "text/plain", | |
"message_body": "Hi", | |
"status_code": "404" | |
} | |
], | |
"order": 1, | |
"redirect": [], | |
"target_group_arn": "", | |
"type": "fixed-response" | |
} | |
], | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"load_balancer_arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"port": 80, | |
"protocol": "HTTP", | |
"ssl_policy": "", | |
"timeouts": null | |
}, | |
"after_unknown": {} | |
} | |
}, | |
{ | |
"address": "aws_lb_listener_rule.this", | |
"mode": "managed", | |
"type": "aws_lb_listener_rule", | |
"name": "this", | |
"provider_name": "aws", | |
"change": { | |
"actions": [ | |
"update" | |
], | |
"before": { | |
"action": [ | |
{ | |
"authenticate_cognito": [], | |
"authenticate_oidc": [], | |
"fixed_response": [ | |
{ | |
"content_type": "text/plain", | |
"message_body": "Static", | |
"status_code": "200" | |
} | |
], | |
"order": 1, | |
"redirect": [], | |
"target_group_arn": "", | |
"type": "fixed-response" | |
} | |
], | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener-rule/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4/a9700ad1889f678a", | |
"condition": [ | |
{ | |
"field": "path-pattern", | |
"host_header": [], | |
"http_header": [], | |
"http_request_method": [], | |
"path_pattern": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
], | |
"query_string": [], | |
"source_ip": [], | |
"values": [ | |
"1" | |
] | |
} | |
], | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener-rule/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4/a9700ad1889f678a", | |
"listener_arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"priority": 100 | |
}, | |
"after": { | |
"action": [ | |
{ | |
"authenticate_cognito": [], | |
"authenticate_oidc": [], | |
"fixed_response": [ | |
{ | |
"content_type": "text/plain", | |
"message_body": "Static", | |
"status_code": "200" | |
} | |
], | |
"order": 1, | |
"redirect": [], | |
"target_group_arn": "", | |
"type": "fixed-response" | |
} | |
], | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener-rule/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4/a9700ad1889f678a", | |
"condition": [ | |
{ | |
"field": "path-pattern", | |
"host_header": [], | |
"http_header": [], | |
"http_request_method": [], | |
"path_pattern": [ | |
{ | |
"values": [ | |
"1", | |
"2", | |
"3" | |
] | |
} | |
], | |
"query_string": [], | |
"source_ip": [] | |
} | |
], | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener-rule/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4/a9700ad1889f678a", | |
"listener_arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"priority": 100 | |
}, | |
"after_unknown": { | |
"action": [ | |
{ | |
"authenticate_cognito": [], | |
"authenticate_oidc": [], | |
"fixed_response": [ | |
{} | |
], | |
"redirect": [] | |
} | |
], | |
"condition": [ | |
{ | |
"host_header": [], | |
"http_header": [], | |
"http_request_method": [], | |
"path_pattern": [ | |
{ | |
"values": [ | |
false, | |
false, | |
false | |
] | |
} | |
], | |
"query_string": [], | |
"source_ip": [], | |
"values": true | |
} | |
] | |
} | |
} | |
}, | |
{ | |
"address": "aws_subnet.alb_test[0]", | |
"mode": "managed", | |
"type": "aws_subnet", | |
"name": "alb_test", | |
"index": 0, | |
"provider_name": "aws", | |
"change": { | |
"actions": [ | |
"no-op" | |
], | |
"before": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:subnet/subnet-0b25e4359f137259f", | |
"assign_ipv6_address_on_creation": false, | |
"availability_zone": "us-east-1a", | |
"availability_zone_id": "use1-az1", | |
"cidr_block": "10.0.0.0/24", | |
"id": "subnet-0b25e4359f137259f", | |
"ipv6_cidr_block": "", | |
"ipv6_cidr_block_association_id": "", | |
"map_public_ip_on_launch": true, | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test-0" | |
}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
}, | |
"after": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:subnet/subnet-0b25e4359f137259f", | |
"assign_ipv6_address_on_creation": false, | |
"availability_zone": "us-east-1a", | |
"availability_zone_id": "use1-az1", | |
"cidr_block": "10.0.0.0/24", | |
"id": "subnet-0b25e4359f137259f", | |
"ipv6_cidr_block": "", | |
"ipv6_cidr_block_association_id": "", | |
"map_public_ip_on_launch": true, | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test-0" | |
}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
}, | |
"after_unknown": {} | |
} | |
}, | |
{ | |
"address": "aws_subnet.alb_test[1]", | |
"mode": "managed", | |
"type": "aws_subnet", | |
"name": "alb_test", | |
"index": 1, | |
"provider_name": "aws", | |
"change": { | |
"actions": [ | |
"no-op" | |
], | |
"before": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:subnet/subnet-083457d50fb270f51", | |
"assign_ipv6_address_on_creation": false, | |
"availability_zone": "us-east-1b", | |
"availability_zone_id": "use1-az2", | |
"cidr_block": "10.0.1.0/24", | |
"id": "subnet-083457d50fb270f51", | |
"ipv6_cidr_block": "", | |
"ipv6_cidr_block_association_id": "", | |
"map_public_ip_on_launch": true, | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test-1" | |
}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
}, | |
"after": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:subnet/subnet-083457d50fb270f51", | |
"assign_ipv6_address_on_creation": false, | |
"availability_zone": "us-east-1b", | |
"availability_zone_id": "use1-az2", | |
"cidr_block": "10.0.1.0/24", | |
"id": "subnet-083457d50fb270f51", | |
"ipv6_cidr_block": "", | |
"ipv6_cidr_block_association_id": "", | |
"map_public_ip_on_launch": true, | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test-1" | |
}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
}, | |
"after_unknown": {} | |
} | |
}, | |
{ | |
"address": "aws_vpc.alb_test", | |
"mode": "managed", | |
"type": "aws_vpc", | |
"name": "alb_test", | |
"provider_name": "aws", | |
"change": { | |
"actions": [ | |
"no-op" | |
], | |
"before": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:vpc/vpc-045ebad0e5d75dd35", | |
"assign_generated_ipv6_cidr_block": false, | |
"cidr_block": "10.0.0.0/16", | |
"default_network_acl_id": "acl-01aca1f35cd33de97", | |
"default_route_table_id": "rtb-05bf3888261fc9905", | |
"default_security_group_id": "sg-0af69c2fa2436a37a", | |
"dhcp_options_id": "dopt-xxxxxxxx", | |
"enable_classiclink": false, | |
"enable_classiclink_dns_support": false, | |
"enable_dns_hostnames": false, | |
"enable_dns_support": true, | |
"id": "vpc-045ebad0e5d75dd35", | |
"instance_tenancy": "default", | |
"ipv6_association_id": "", | |
"ipv6_cidr_block": "", | |
"main_route_table_id": "rtb-05bf3888261fc9905", | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test" | |
} | |
}, | |
"after": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:vpc/vpc-045ebad0e5d75dd35", | |
"assign_generated_ipv6_cidr_block": false, | |
"cidr_block": "10.0.0.0/16", | |
"default_network_acl_id": "acl-01aca1f35cd33de97", | |
"default_route_table_id": "rtb-05bf3888261fc9905", | |
"default_security_group_id": "sg-0af69c2fa2436a37a", | |
"dhcp_options_id": "dopt-xxxxxxxx", | |
"enable_classiclink": false, | |
"enable_classiclink_dns_support": false, | |
"enable_dns_hostnames": false, | |
"enable_dns_support": true, | |
"id": "vpc-045ebad0e5d75dd35", | |
"instance_tenancy": "default", | |
"ipv6_association_id": "", | |
"ipv6_cidr_block": "", | |
"main_route_table_id": "rtb-05bf3888261fc9905", | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test" | |
} | |
}, | |
"after_unknown": {} | |
} | |
} | |
], | |
"prior_state": { | |
"format_version": "0.1", | |
"terraform_version": "0.12.6", | |
"values": { | |
"root_module": { | |
"resources": [ | |
{ | |
"address": "aws_internet_gateway.gw", | |
"mode": "managed", | |
"type": "aws_internet_gateway", | |
"name": "gw", | |
"provider_name": "aws", | |
"schema_version": 0, | |
"values": { | |
"id": "igw-04429d048cc6cf869", | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test" | |
}, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
}, | |
"depends_on": [ | |
"aws_vpc.alb_test" | |
] | |
}, | |
{ | |
"address": "aws_lb.this", | |
"mode": "managed", | |
"type": "aws_lb", | |
"name": "this", | |
"provider_name": "aws", | |
"schema_version": 0, | |
"values": { | |
"access_logs": [ | |
{ | |
"bucket": "", | |
"enabled": false, | |
"prefix": "" | |
} | |
], | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"arn_suffix": "app/alb-test/bcafe59f768ee71e", | |
"dns_name": "alb-test-2010207985.us-east-1.elb.amazonaws.com", | |
"enable_cross_zone_load_balancing": null, | |
"enable_deletion_protection": false, | |
"enable_http2": true, | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"idle_timeout": 60, | |
"internal": false, | |
"ip_address_type": "ipv4", | |
"load_balancer_type": "application", | |
"name": "alb-test", | |
"name_prefix": null, | |
"security_groups": [ | |
"sg-0af69c2fa2436a37a" | |
], | |
"subnet_mapping": [ | |
{ | |
"allocation_id": "", | |
"subnet_id": "subnet-083457d50fb270f51" | |
}, | |
{ | |
"allocation_id": "", | |
"subnet_id": "subnet-0b25e4359f137259f" | |
} | |
], | |
"subnets": [ | |
"subnet-083457d50fb270f51", | |
"subnet-0b25e4359f137259f" | |
], | |
"tags": {}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35", | |
"zone_id": "Z35SXDOTRQ7X7K" | |
}, | |
"depends_on": [ | |
"aws_internet_gateway.gw", | |
"aws_subnet.alb_test", | |
"aws_vpc.alb_test" | |
] | |
}, | |
{ | |
"address": "aws_lb_listener.this", | |
"mode": "managed", | |
"type": "aws_lb_listener", | |
"name": "this", | |
"provider_name": "aws", | |
"schema_version": 0, | |
"values": { | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"certificate_arn": null, | |
"default_action": [ | |
{ | |
"authenticate_cognito": [], | |
"authenticate_oidc": [], | |
"fixed_response": [ | |
{ | |
"content_type": "text/plain", | |
"message_body": "Hi", | |
"status_code": "404" | |
} | |
], | |
"order": 1, | |
"redirect": [], | |
"target_group_arn": "", | |
"type": "fixed-response" | |
} | |
], | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"load_balancer_arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/alb-test/bcafe59f768ee71e", | |
"port": 80, | |
"protocol": "HTTP", | |
"ssl_policy": "", | |
"timeouts": null | |
}, | |
"depends_on": [ | |
"aws_lb.this" | |
] | |
}, | |
{ | |
"address": "aws_lb_listener_rule.this", | |
"mode": "managed", | |
"type": "aws_lb_listener_rule", | |
"name": "this", | |
"provider_name": "aws", | |
"schema_version": 0, | |
"values": { | |
"action": [ | |
{ | |
"authenticate_cognito": [], | |
"authenticate_oidc": [], | |
"fixed_response": [ | |
{ | |
"content_type": "text/plain", | |
"message_body": "Static", | |
"status_code": "200" | |
} | |
], | |
"order": 1, | |
"redirect": [], | |
"target_group_arn": "", | |
"type": "fixed-response" | |
} | |
], | |
"arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener-rule/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4/a9700ad1889f678a", | |
"condition": [ | |
{ | |
"field": "path-pattern", | |
"host_header": [], | |
"http_header": [], | |
"http_request_method": [], | |
"path_pattern": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
], | |
"query_string": [], | |
"source_ip": [], | |
"values": [ | |
"1" | |
] | |
} | |
], | |
"id": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener-rule/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4/a9700ad1889f678a", | |
"listener_arn": "arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/alb-test/bcafe59f768ee71e/bb8ee400b90829a4", | |
"priority": 100 | |
}, | |
"depends_on": [ | |
"aws_lb_listener.this" | |
] | |
}, | |
{ | |
"address": "aws_subnet.alb_test", | |
"mode": "managed", | |
"type": "aws_subnet", | |
"name": "alb_test", | |
"index": 1, | |
"provider_name": "aws", | |
"schema_version": 1, | |
"values": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:subnet/subnet-083457d50fb270f51", | |
"assign_ipv6_address_on_creation": false, | |
"availability_zone": "us-east-1b", | |
"availability_zone_id": "use1-az2", | |
"cidr_block": "10.0.1.0/24", | |
"id": "subnet-083457d50fb270f51", | |
"ipv6_cidr_block": "", | |
"ipv6_cidr_block_association_id": "", | |
"map_public_ip_on_launch": true, | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test-1" | |
}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
}, | |
"depends_on": [ | |
"aws_vpc.alb_test" | |
] | |
}, | |
{ | |
"address": "aws_subnet.alb_test", | |
"mode": "managed", | |
"type": "aws_subnet", | |
"name": "alb_test", | |
"index": 0, | |
"provider_name": "aws", | |
"schema_version": 1, | |
"values": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:subnet/subnet-0b25e4359f137259f", | |
"assign_ipv6_address_on_creation": false, | |
"availability_zone": "us-east-1a", | |
"availability_zone_id": "use1-az1", | |
"cidr_block": "10.0.0.0/24", | |
"id": "subnet-0b25e4359f137259f", | |
"ipv6_cidr_block": "", | |
"ipv6_cidr_block_association_id": "", | |
"map_public_ip_on_launch": true, | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test-0" | |
}, | |
"timeouts": null, | |
"vpc_id": "vpc-045ebad0e5d75dd35" | |
}, | |
"depends_on": [ | |
"aws_vpc.alb_test" | |
] | |
}, | |
{ | |
"address": "aws_vpc.alb_test", | |
"mode": "managed", | |
"type": "aws_vpc", | |
"name": "alb_test", | |
"provider_name": "aws", | |
"schema_version": 1, | |
"values": { | |
"arn": "arn:aws:ec2:us-east-1:111111111111:vpc/vpc-045ebad0e5d75dd35", | |
"assign_generated_ipv6_cidr_block": false, | |
"cidr_block": "10.0.0.0/16", | |
"default_network_acl_id": "acl-01aca1f35cd33de97", | |
"default_route_table_id": "rtb-05bf3888261fc9905", | |
"default_security_group_id": "sg-0af69c2fa2436a37a", | |
"dhcp_options_id": "dopt-xxxxxxxx", | |
"enable_classiclink": false, | |
"enable_classiclink_dns_support": false, | |
"enable_dns_hostnames": false, | |
"enable_dns_support": true, | |
"id": "vpc-045ebad0e5d75dd35", | |
"instance_tenancy": "default", | |
"ipv6_association_id": "", | |
"ipv6_cidr_block": "", | |
"main_route_table_id": "rtb-05bf3888261fc9905", | |
"owner_id": "111111111111", | |
"tags": { | |
"Name": "ALB_test" | |
} | |
} | |
} | |
] | |
} | |
} | |
}, | |
"configuration": { | |
"provider_config": { | |
"aws": { | |
"name": "aws", | |
"version_constraint": "~> 2.0", | |
"expressions": { | |
"profile": { | |
"constant_value": "cmpstaging" | |
}, | |
"region": { | |
"constant_value": "us-east-1" | |
} | |
} | |
} | |
}, | |
"root_module": { | |
"resources": [ | |
{ | |
"address": "aws_internet_gateway.gw", | |
"mode": "managed", | |
"type": "aws_internet_gateway", | |
"name": "gw", | |
"provider_config_key": "aws", | |
"expressions": { | |
"tags": { | |
"constant_value": { | |
"Name": "ALB_test" | |
} | |
}, | |
"vpc_id": { | |
"references": [ | |
"aws_vpc.alb_test" | |
] | |
} | |
}, | |
"schema_version": 0 | |
}, | |
{ | |
"address": "aws_lb.this", | |
"mode": "managed", | |
"type": "aws_lb", | |
"name": "this", | |
"provider_config_key": "aws", | |
"expressions": { | |
"load_balancer_type": { | |
"constant_value": "application" | |
}, | |
"name": { | |
"constant_value": "alb-test" | |
}, | |
"security_groups": { | |
"references": [ | |
"aws_vpc.alb_test" | |
] | |
}, | |
"subnets": { | |
"references": [ | |
"aws_subnet.alb_test" | |
] | |
} | |
}, | |
"schema_version": 0, | |
"depends_on": [ | |
"aws_internet_gateway.gw" | |
] | |
}, | |
{ | |
"address": "aws_lb_listener.this", | |
"mode": "managed", | |
"type": "aws_lb_listener", | |
"name": "this", | |
"provider_config_key": "aws", | |
"expressions": { | |
"default_action": [ | |
{ | |
"fixed_response": [ | |
{ | |
"content_type": { | |
"constant_value": "text/plain" | |
}, | |
"message_body": { | |
"constant_value": "Hi" | |
}, | |
"status_code": { | |
"constant_value": 404 | |
} | |
} | |
], | |
"type": { | |
"constant_value": "fixed-response" | |
} | |
} | |
], | |
"load_balancer_arn": { | |
"references": [ | |
"aws_lb.this" | |
] | |
}, | |
"port": { | |
"constant_value": 80 | |
}, | |
"protocol": { | |
"constant_value": "HTTP" | |
} | |
}, | |
"schema_version": 0 | |
}, | |
{ | |
"address": "aws_lb_listener_rule.this", | |
"mode": "managed", | |
"type": "aws_lb_listener_rule", | |
"name": "this", | |
"provider_config_key": "aws", | |
"expressions": { | |
"action": [ | |
{ | |
"fixed_response": [ | |
{ | |
"content_type": { | |
"constant_value": "text/plain" | |
}, | |
"message_body": { | |
"constant_value": "Static" | |
}, | |
"status_code": { | |
"constant_value": 200 | |
} | |
} | |
], | |
"type": { | |
"constant_value": "fixed-response" | |
} | |
} | |
], | |
"condition": [ | |
{ | |
"field": { | |
"constant_value": "path-pattern" | |
}, | |
"path_pattern": [ | |
{ | |
"values": { | |
"constant_value": [ | |
"1", | |
"2", | |
"3" | |
] | |
} | |
} | |
] | |
} | |
], | |
"listener_arn": { | |
"references": [ | |
"aws_lb_listener.this" | |
] | |
}, | |
"priority": { | |
"constant_value": 100 | |
} | |
}, | |
"schema_version": 0 | |
}, | |
{ | |
"address": "aws_subnet.alb_test", | |
"mode": "managed", | |
"type": "aws_subnet", | |
"name": "alb_test", | |
"provider_config_key": "aws", | |
"expressions": { | |
"availability_zone": { | |
"references": [ | |
"local.azs", | |
"count.index" | |
] | |
}, | |
"cidr_block": { | |
"references": [ | |
"local.subs_cidr", | |
"count.index" | |
] | |
}, | |
"map_public_ip_on_launch": { | |
"constant_value": true | |
}, | |
"tags": { | |
"references": [ | |
"count.index" | |
] | |
}, | |
"vpc_id": { | |
"references": [ | |
"aws_vpc.alb_test" | |
] | |
} | |
}, | |
"schema_version": 1, | |
"count_expression": { | |
"constant_value": 2 | |
} | |
}, | |
{ | |
"address": "aws_vpc.alb_test", | |
"mode": "managed", | |
"type": "aws_vpc", | |
"name": "alb_test", | |
"provider_config_key": "aws", | |
"expressions": { | |
"cidr_block": { | |
"constant_value": "10.0.0.0/16" | |
}, | |
"tags": { | |
"constant_value": { | |
"Name": "ALB_test" | |
} | |
} | |
}, | |
"schema_version": 1 | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment