SubnetGroup

class SubnetGroup : KotlinCustomResource

Provides an ElastiCache Subnet Group resource.

NOTE: ElastiCache Subnet Groups are only for use when working with an ElastiCache cluster inside of a VPC. If you are on EC2 Classic, see the ElastiCache Security Group resource.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.ec2.Subnet;
import com.pulumi.aws.ec2.SubnetArgs;
import com.pulumi.aws.elasticache.SubnetGroup;
import com.pulumi.aws.elasticache.SubnetGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.tags(Map.of("Name", "tf-test"))
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.vpcId(fooVpc.id())
.cidrBlock("10.0.0.0/24")
.availabilityZone("us-west-2a")
.tags(Map.of("Name", "tf-test"))
.build());
var bar = new SubnetGroup("bar", SubnetGroupArgs.builder()
.subnetIds(fooSubnet.id())
.build());
}
}

Import

ElastiCache Subnet Groups can be imported using the name, e.g.,

$ pulumi import aws:elasticache/subnetGroup:SubnetGroup bar tf-test-cache-subnet

Properties

Link copied to clipboard
val arn: Output<String>
Link copied to clipboard
val description: Output<String>

Description for the cache subnet group. Defaults to "Managed by Pulumi".

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Name for the cache subnet group. ElastiCache converts this name to lowercase.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val subnetIds: Output<List<String>>

List of VPC Subnet IDs for the cache subnet group

Link copied to clipboard
val tags: Output<Map<String, String>>?

Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>