github.com/adrian-bl/terraform@v0.7.0-rc2.0.20160705220747-de0a34fc3517/website/source/docs/providers/aws/r/elasticache_subnet_group.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_elasticache_subnet_group" 4 sidebar_current: "docs-aws-resource-elasticache-subnet-group" 5 description: |- 6 Provides an ElastiCache Subnet Group resource. 7 --- 8 9 # aws\_elasticache\_subnet\_group 10 11 Provides an ElastiCache Subnet Group resource. 12 13 ~> **NOTE:** ElastiCache Subnet Groups are only for use when working with an 14 ElastiCache cluster **inside** of a VPC. If you are on EC2 Classic, see the 15 [ElastiCache Security Group resource](elasticache_security_group.html). 16 17 ## Example Usage 18 19 ``` 20 resource "aws_vpc" "foo" { 21 cidr_block = "10.0.0.0/16" 22 tags { 23 Name = "tf-test" 24 } 25 } 26 27 resource "aws_subnet" "foo" { 28 vpc_id = "${aws_vpc.foo.id}" 29 cidr_block = "10.0.0.0/24" 30 availability_zone = "us-west-2a" 31 tags { 32 Name = "tf-test" 33 } 34 } 35 36 resource "aws_elasticache_subnet_group" "bar" { 37 name = "tf-test-cache-subnet" 38 subnet_ids = ["${aws_subnet.foo.id}"] 39 } 40 ``` 41 42 ## Argument Reference 43 44 The following arguments are supported: 45 46 * `name` – (Required) Name for the cache subnet group. Elasticache converts this name to lowercase. 47 * `description` – (Optional) Description for the cache subnet group. Defaults to "Managed by Terraform". 48 * `subnet_ids` – (Required) List of VPC Subnet IDs for the cache subnet group 49 50 ## Attributes Reference 51 52 The following attributes are exported: 53 54 * `description` 55 * `name` 56 * `subnet_ids` 57