Resource Type definition for AWS::ElastiCache::SubnetGroup
To create a simple elasticache subnet group
resource "awscc_ec2_vpc" "this" {
cidr_block = "10.0.0.0/16"
tags = [
{
key = "Modified By"
value = "AWSCC"
}
]
}
resource "awscc_ec2_subnet" "this" {
vpc_id = resource.awscc_ec2_vpc.this.id
cidr_block = "10.0.1.0/24"
availability_zone = "us-east-1a"
tags = [
{
key = "Modified By"
value = "AWSCC"
}
]
}
resource "awscc_elasticache_subnet_group" "this" {
cache_subnet_group_name = "example-cache-group"
description = "example awscc cache subnet"
subnet_ids = [awscc_ec2_subnet.this.id]
tags = [
{
key = "Modified By"
value = "AWSCC"
}
]
}
description
(String) The description for the cache subnet group.subnet_ids
(List of String) The EC2 subnet IDs for the cache subnet group.cache_subnet_group_name
(String) The name for the cache subnet group. This value is stored as a lowercase string.tags
(Attributes List) (see below for nested schema)id
(String) Uniquely identifies the resource.tags
Required:
key
(String)value
(String)Import is supported using the following syntax:
$ terraform import awscc_elasticache_subnet_group.example <resource ID>