1. Packages
  2. AWS
  3. API Docs
  4. redshift
  5. getSubnetGroup
AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi
aws-v6 logo
AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi

    Provides details about a specific redshift subnet group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.redshift.getSubnetGroup({
        name: exampleAwsRedshiftSubnetGroup.name,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.redshift.get_subnet_group(name=example_aws_redshift_subnet_group["name"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redshift.LookupSubnetGroup(ctx, &redshift.LookupSubnetGroupArgs{
    			Name: exampleAwsRedshiftSubnetGroup.Name,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.RedShift.GetSubnetGroup.Invoke(new()
        {
            Name = exampleAwsRedshiftSubnetGroup.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.redshift.RedshiftFunctions;
    import com.pulumi.aws.redshift.inputs.GetSubnetGroupArgs;
    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) {
            final var example = RedshiftFunctions.getSubnetGroup(GetSubnetGroupArgs.builder()
                .name(exampleAwsRedshiftSubnetGroup.name())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:redshift:getSubnetGroup
          arguments:
            name: ${exampleAwsRedshiftSubnetGroup.name}
    

    Using getSubnetGroup

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSubnetGroup(args: GetSubnetGroupArgs, opts?: InvokeOptions): Promise<GetSubnetGroupResult>
    function getSubnetGroupOutput(args: GetSubnetGroupOutputArgs, opts?: InvokeOptions): Output<GetSubnetGroupResult>
    def get_subnet_group(name: Optional[str] = None,
                         tags: Optional[Mapping[str, str]] = None,
                         opts: Optional[InvokeOptions] = None) -> GetSubnetGroupResult
    def get_subnet_group_output(name: Optional[pulumi.Input[str]] = None,
                         tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetSubnetGroupResult]
    func LookupSubnetGroup(ctx *Context, args *LookupSubnetGroupArgs, opts ...InvokeOption) (*LookupSubnetGroupResult, error)
    func LookupSubnetGroupOutput(ctx *Context, args *LookupSubnetGroupOutputArgs, opts ...InvokeOption) LookupSubnetGroupResultOutput

    > Note: This function is named LookupSubnetGroup in the Go SDK.

    public static class GetSubnetGroup 
    {
        public static Task<GetSubnetGroupResult> InvokeAsync(GetSubnetGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetSubnetGroupResult> Invoke(GetSubnetGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSubnetGroupResult> getSubnetGroup(GetSubnetGroupArgs args, InvokeOptions options)
    public static Output<GetSubnetGroupResult> getSubnetGroup(GetSubnetGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:redshift/getSubnetGroup:getSubnetGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the cluster subnet group for which information is requested.
    Tags Dictionary<string, string>
    Tags associated to the Subnet Group
    Name string
    Name of the cluster subnet group for which information is requested.
    Tags map[string]string
    Tags associated to the Subnet Group
    name String
    Name of the cluster subnet group for which information is requested.
    tags Map<String,String>
    Tags associated to the Subnet Group
    name string
    Name of the cluster subnet group for which information is requested.
    tags {[key: string]: string}
    Tags associated to the Subnet Group
    name str
    Name of the cluster subnet group for which information is requested.
    tags Mapping[str, str]
    Tags associated to the Subnet Group
    name String
    Name of the cluster subnet group for which information is requested.
    tags Map<String>
    Tags associated to the Subnet Group

    getSubnetGroup Result

    The following output properties are available:

    Arn string
    ARN of the Redshift Subnet Group name.
    Description string
    Description of the Redshift Subnet group.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    SubnetIds List<string>
    An array of VPC subnet IDs.
    Tags Dictionary<string, string>
    Tags associated to the Subnet Group
    Arn string
    ARN of the Redshift Subnet Group name.
    Description string
    Description of the Redshift Subnet group.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    SubnetIds []string
    An array of VPC subnet IDs.
    Tags map[string]string
    Tags associated to the Subnet Group
    arn String
    ARN of the Redshift Subnet Group name.
    description String
    Description of the Redshift Subnet group.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    subnetIds List<String>
    An array of VPC subnet IDs.
    tags Map<String,String>
    Tags associated to the Subnet Group
    arn string
    ARN of the Redshift Subnet Group name.
    description string
    Description of the Redshift Subnet group.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    subnetIds string[]
    An array of VPC subnet IDs.
    tags {[key: string]: string}
    Tags associated to the Subnet Group
    arn str
    ARN of the Redshift Subnet Group name.
    description str
    Description of the Redshift Subnet group.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    subnet_ids Sequence[str]
    An array of VPC subnet IDs.
    tags Mapping[str, str]
    Tags associated to the Subnet Group
    arn String
    ARN of the Redshift Subnet Group name.
    description String
    Description of the Redshift Subnet group.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    subnetIds List<String>
    An array of VPC subnet IDs.
    tags Map<String>
    Tags associated to the Subnet Group

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws-v6 logo
    AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate