provider/aws: remove asg test dependence on default SG
accidentally pushed this with an implicit dependency on the default SG and VPC
This commit is contained in:
parent
265b9b254e
commit
e84203a2dc
|
@ -343,9 +343,42 @@ resource "aws_autoscaling_group" "bar" {
|
|||
`
|
||||
|
||||
const testAccAWSAutoScalingGroupConfigWithLoadBalancer = `
|
||||
resource "aws_vpc" "foo" {
|
||||
cidr_block = "10.1.0.0/16"
|
||||
tags { Name = "tf-asg-test" }
|
||||
}
|
||||
|
||||
resource "aws_internet_gateway" "gw" {
|
||||
vpc_id = "${aws_vpc.foo.id}"
|
||||
}
|
||||
|
||||
resource "aws_subnet" "foo" {
|
||||
cidr_block = "10.1.1.0/24"
|
||||
vpc_id = "${aws_vpc.foo.id}"
|
||||
}
|
||||
|
||||
resource "aws_security_group" "foo" {
|
||||
vpc_id="${aws_vpc.foo.id}"
|
||||
|
||||
ingress {
|
||||
protocol = "-1"
|
||||
from_port = 0
|
||||
to_port = 0
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
}
|
||||
|
||||
egress {
|
||||
protocol = "-1"
|
||||
from_port = 0
|
||||
to_port = 0
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_elb" "bar" {
|
||||
name = "foobar-terraform-test"
|
||||
availability_zones = ["us-west-2a"]
|
||||
subnets = ["${aws_subnet.foo.id}"]
|
||||
security_groups = ["${aws_security_group.foo.id}"]
|
||||
|
||||
listener {
|
||||
instance_port = 80
|
||||
|
@ -361,6 +394,8 @@ resource "aws_elb" "bar" {
|
|||
interval = 5
|
||||
timeout = 2
|
||||
}
|
||||
|
||||
depends_on = ["aws_internet_gateway.gw"]
|
||||
}
|
||||
|
||||
resource "aws_launch_configuration" "foobar" {
|
||||
|
@ -368,16 +403,18 @@ resource "aws_launch_configuration" "foobar" {
|
|||
// bitnami-nginxstack-1.6.1-0-linux-ubuntu-14.04.1-x86_64-hvm-ebs-ami-99f5b1a9-3
|
||||
image_id = "ami-b5b3fc85"
|
||||
instance_type = "t2.micro"
|
||||
security_groups = ["${aws_security_group.foo.id}"]
|
||||
}
|
||||
|
||||
resource "aws_autoscaling_group" "bar" {
|
||||
availability_zones = ["us-west-2a"]
|
||||
availability_zones = ["${aws_subnet.foo.availability_zone}"]
|
||||
vpc_zone_identifier = ["${aws_subnet.foo.id}"]
|
||||
name = "foobar3-terraform-test"
|
||||
max_size = 2
|
||||
min_size = 2
|
||||
health_check_grace_period = 300
|
||||
health_check_type = "ELB"
|
||||
min_elb_capacity = 1
|
||||
min_elb_capacity = 2
|
||||
force_delete = true
|
||||
|
||||
launch_configuration = "${aws_launch_configuration.foobar.name}"
|
||||
|
|
Loading…
Reference in New Issue