github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/redshift_subnet_group.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_redshift_subnet_group"
     4  sidebar_current: "docs-aws-resource-redshift-subnet-group"
     5  description: |-
     6    Provides a Redshift Subnet Group resource.
     7  ---
     8  
     9  # aws\_redshift\_subnet\_group
    10  
    11  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.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "aws_vpc" "foo" {
    17    cidr_block = "10.1.0.0/16"
    18  }
    19  
    20  resource "aws_subnet" "foo" {
    21    cidr_block        = "10.1.1.0/24"
    22    availability_zone = "us-west-2a"
    23    vpc_id            = "${aws_vpc.foo.id}"
    24  
    25    tags {
    26      Name = "tf-dbsubnet-test-1"
    27    }
    28  }
    29  
    30  resource "aws_subnet" "bar" {
    31    cidr_block        = "10.1.2.0/24"
    32    availability_zone = "us-west-2b"
    33    vpc_id            = "${aws_vpc.foo.id}"
    34  
    35    tags {
    36      Name = "tf-dbsubnet-test-2"
    37    }
    38  }
    39  
    40  resource "aws_redshift_subnet_group" "foo" {
    41    name       = "foo"
    42    subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"]
    43  
    44    tags {
    45      environment = "Production"
    46    }
    47  }
    48  ```
    49  
    50  ## Argument Reference
    51  
    52  The following arguments are supported:
    53  
    54  * `name` - (Required) The name of the Redshift Subnet group.
    55  * `description` - (Optional) The description of the Redshift Subnet group. Defaults to "Managed by Terraform".
    56  * `subnet_ids` - (Required) An array of VPC subnet IDs.
    57  * `tags` - (Optional) A mapping of tags to assign to the resource.
    58  
    59  ## Attributes Reference
    60  
    61  The following attributes are exported:
    62  
    63  * `id` - The Redshift Subnet group ID.
    64  
    65  ## Import
    66  
    67  Redshift subnet groups can be imported using the `name`, e.g.
    68  
    69  ```
    70  $ terraform import aws_redshift_subnet_group.testgroup1 test-cluster-subnet-group
    71  ```