-
Notifications
You must be signed in to change notification settings - Fork 72
/
subnetworks.tf
31 lines (26 loc) · 931 Bytes
/
subnetworks.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
resource "google_compute_subnetwork" "dev-subnet" {
ip_cidr_range = "${var.gcp_ip_cidr_range}"
name = "${var.subnet_names["subnet1"]}"
network = "${google_compute_network.our_development_network.name}"
}
resource "aws_subnet" "subnet1" {
cidr_block = "${cidrsubnet(aws_vpc.environment-example-two.cidr_block, 3, 1)}"
vpc_id = "${aws_vpc.environment-example-two.id}"
availability_zone = "us-west-2a"
}
resource "aws_subnet" "subnet2" {
cidr_block = "${cidrsubnet(aws_vpc.environment-example-two.cidr_block, 2, 2)}"
vpc_id = "${aws_vpc.environment-example-two.id}"
availability_zone = "us-west-2b"
}
resource "aws_security_group" "subnetsecurity" {
vpc_id = "${aws_vpc.environment-example-two.id}"
ingress {
cidr_blocks = [
"${aws_vpc.environment-example-two.cidr_block}",
]
from_port = 80
to_port = 80
protocol = "tcp"
}
}