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>

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.

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.redshift.SubnetGroup;
import com.pulumi.aws.redshift.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.1.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.cidrBlock("10.1.1.0/24")
.availabilityZone("us-west-2a")
.vpcId(fooVpc.id())
.tags(Map.of("Name", "tf-dbsubnet-test-1"))
.build());
var bar = new Subnet("bar", SubnetArgs.builder()
.cidrBlock("10.1.2.0/24")
.availabilityZone("us-west-2b")
.vpcId(fooVpc.id())
.tags(Map.of("Name", "tf-dbsubnet-test-2"))
.build());
var fooSubnetGroup = new SubnetGroup("fooSubnetGroup", SubnetGroupArgs.builder()
.subnetIds(
fooSubnet.id(),
bar.id())
.tags(Map.of("environment", "Production"))
.build());
}
}

Import

Redshift subnet groups can be imported using the name, e.g.,

$ pulumi import aws:redshift/subnetGroup:SubnetGroup testgroup1 test-cluster-subnet-group

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

The description of the Redshift Subnet group. Defaults to "Managed by Pulumi".

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

The name of the Redshift Subnet group.

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

An array of VPC subnet IDs.

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

A map of tags to assign to the resource. .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