SubnetGroupArgs

data class SubnetGroupArgs(val description: Output<String>? = null, val name: Output<String>? = null, val subnetIds: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<SubnetGroupArgs>

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

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, name: Output<String>? = null, subnetIds: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val description: Output<String>? = null

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

Link copied to clipboard
val name: Output<String>? = null

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

Link copied to clipboard
val subnetIds: Output<List<String>>? = null

List of VPC Subnet IDs for the cache subnet group

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

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.

Functions

Link copied to clipboard
open override fun toJava(): SubnetGroupArgs