FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

aws_redshift_subnet_group

Creates a new Amazon Redshift subnet group. You must provide a list of one or more subnets in your existing Amazon Virtual Private Cloud (Amazon VPC) when creating Amazon Redshift subnet group.

Example Usage

resource "aws_vpc" "foo" {
	cidr_block = "10.1.0.0/16"
}

resource "aws_subnet" "foo" {
	cidr_block = "10.1.1.0/24"
	availability_zone = "us-west-2a"
	vpc_id = "${aws_vpc.foo.id}"
	tags {
		Name = "tf-dbsubnet-test-1"
	}
}

resource "aws_subnet" "bar" {
	cidr_block = "10.1.2.0/24"
	availability_zone = "us-west-2b"
	vpc_id = "${aws_vpc.foo.id}"
	tags {
		Name = "tf-dbsubnet-test-2"
	}
}

resource "aws_redshift_subnet_group" "foo" {
	name = "foo"
	subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"]
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Redshift subnet groups can be imported using the name, e.g.

$ terraform import aws_redshift_subnet_group.testgroup1 test-cluster-subnet-group

See the source of this document at Terraform.io