Class SubnetGroup
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
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var fooVpc = new Aws.Ec2.Vpc("fooVpc", new Aws.Ec2.VpcArgs
{
CidrBlock = "10.1.0.0/16",
});
var fooSubnet = new Aws.Ec2.Subnet("fooSubnet", new Aws.Ec2.SubnetArgs
{
AvailabilityZone = "us-west-2a",
CidrBlock = "10.1.1.0/24",
Tags =
{
{ "Name", "tf-dbsubnet-test-1" },
},
VpcId = fooVpc.Id,
});
var bar = new Aws.Ec2.Subnet("bar", new Aws.Ec2.SubnetArgs
{
AvailabilityZone = "us-west-2b",
CidrBlock = "10.1.2.0/24",
Tags =
{
{ "Name", "tf-dbsubnet-test-2" },
},
VpcId = fooVpc.Id,
});
var fooSubnetGroup = new Aws.RedShift.SubnetGroup("fooSubnetGroup", new Aws.RedShift.SubnetGroupArgs
{
SubnetIds =
{
fooSubnet.Id,
bar.Id,
},
Tags =
{
{ "environment", "Production" },
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.RedShift
Assembly: Pulumi.Aws.dll
Syntax
public class SubnetGroup : CustomResource
Constructors
View SourceSubnetGroup(String, SubnetGroupArgs, CustomResourceOptions)
Create a SubnetGroup resource with the given unique name, arguments, and options.
Declaration
public SubnetGroup(string name, SubnetGroupArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SubnetGroupArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
Amazon Resource Name (ARN) of the Redshift Subnet group name
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of the Redshift Subnet group. Defaults to "Managed by Pulumi".
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the Redshift Subnet group.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SubnetIds
An array of VPC subnet IDs.
Declaration
public Output<ImmutableArray<string>> SubnetIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Tags
A map of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Methods
View SourceGet(String, Input<String>, SubnetGroupState, CustomResourceOptions)
Get an existing SubnetGroup resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static SubnetGroup Get(string name, Input<string> id, SubnetGroupState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| SubnetGroupState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| SubnetGroup |