github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/cmd/roachprod/vm/aws/terraform/aws-region/main.tf (about) 1 # --------------------------------------------------------------------------------------------------------------------- 2 # Single region resources for GCP. 3 # All resources are created in passed-in project name and region. 4 # --------------------------------------------------------------------------------------------------------------------- 5 provider "aws" {} 6 7 # --------------------------------------------------------------------------------------------------------------------- 8 # Module variables 9 # --------------------------------------------------------------------------------------------------------------------- 10 variable "region" { description = "AWS Region name" } 11 variable "image_name" { 12 description = "CockroachDB base image name" 13 default = "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20180126" 14 } 15 16 variable "label" { 17 description = "Used as the resource name prefix." 18 } 19 20 # --------------------------------------------------------------------------------------------------------------------- 21 # Output 22 # --------------------------------------------------------------------------------------------------------------------- 23 24 # Contains all necessary information to configure VPC peering. 25 output "vpc_info" { 26 value = { 27 "region" = "${var.region}" 28 "vpc_id" = "${aws_vpc.region_vpc.id}" 29 "vpc_cidr" = "${aws_vpc.region_vpc.cidr_block}" 30 "security_group" = "${aws_security_group.region_security_group.id}" 31 "route_table_id" = "${data.aws_route_table.region_route_table.id}" 32 } 33 } 34 35 output "region_info" { 36 value = { 37 "region" = "${var.region}" 38 "security_group" = "${aws_security_group.region_security_group.id}" 39 "ami_id" = "${data.aws_ami.node_ami.image_id}" 40 "subnets" = "${zipmap( 41 "${aws_subnet.region_subnets.*.availability_zone}", 42 "${aws_subnet.region_subnets.*.id}" 43 )}" 44 } 45 }