1. Packages
  2. AWS Classic
  3. API Docs
  4. redshift
  5. SecurityGroup

Try AWS Native preview for resources not in the classic version.

AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi

aws.redshift.SecurityGroup

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi

    Creates a new Amazon Redshift security group. You use security groups to control access to non-VPC clusters.

    !> WARNING: With the retirement of EC2-Classic the aws.redshift.SecurityGroup resource has been deprecated and will be removed in a future version. Any existing resources can be removed from state manually.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Aws.RedShift.SecurityGroup("default", new()
        {
            Ingress = new[]
            {
                new Aws.RedShift.Inputs.SecurityGroupIngressArgs
                {
                    Cidr = "10.0.0.0/24",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/redshift"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redshift.NewSecurityGroup(ctx, "default", &redshift.SecurityGroupArgs{
    			Ingress: redshift.SecurityGroupIngressArray{
    				&redshift.SecurityGroupIngressArgs{
    					Cidr: pulumi.String("10.0.0.0/24"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.redshift.SecurityGroup;
    import com.pulumi.aws.redshift.SecurityGroupArgs;
    import com.pulumi.aws.redshift.inputs.SecurityGroupIngressArgs;
    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 default_ = new SecurityGroup("default", SecurityGroupArgs.builder()        
                .ingress(SecurityGroupIngressArgs.builder()
                    .cidr("10.0.0.0/24")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    default = aws.redshift.SecurityGroup("default", ingress=[aws.redshift.SecurityGroupIngressArgs(
        cidr="10.0.0.0/24",
    )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const _default = new aws.redshift.SecurityGroup("default", {ingress: [{
        cidr: "10.0.0.0/24",
    }]});
    
    resources:
      default:
        type: aws:redshift:SecurityGroup
        properties:
          ingress:
            - cidr: 10.0.0.0/24
    

    Create SecurityGroup Resource

    new SecurityGroup(name: string, args: SecurityGroupArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityGroup(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      description: Optional[str] = None,
                      ingress: Optional[Sequence[SecurityGroupIngressArgs]] = None,
                      name: Optional[str] = None)
    @overload
    def SecurityGroup(resource_name: str,
                      args: SecurityGroupArgs,
                      opts: Optional[ResourceOptions] = None)
    func NewSecurityGroup(ctx *Context, name string, args SecurityGroupArgs, opts ...ResourceOption) (*SecurityGroup, error)
    public SecurityGroup(string name, SecurityGroupArgs args, CustomResourceOptions? opts = null)
    public SecurityGroup(String name, SecurityGroupArgs args)
    public SecurityGroup(String name, SecurityGroupArgs args, CustomResourceOptions options)
    
    type: aws:redshift:SecurityGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SecurityGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SecurityGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SecurityGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SecurityGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SecurityGroup resource accepts the following input properties:

    Ingress List<Pulumi.Aws.RedShift.Inputs.SecurityGroupIngressArgs>

    A list of ingress rules.

    Description string

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

    Name string

    The name of the Redshift security group.

    Ingress []SecurityGroupIngressArgs

    A list of ingress rules.

    Description string

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

    Name string

    The name of the Redshift security group.

    ingress List<SecurityGroupIngressArgs>

    A list of ingress rules.

    description String

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

    name String

    The name of the Redshift security group.

    ingress SecurityGroupIngressArgs[]

    A list of ingress rules.

    description string

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

    name string

    The name of the Redshift security group.

    ingress Sequence[SecurityGroupIngressArgs]

    A list of ingress rules.

    description str

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

    name str

    The name of the Redshift security group.

    ingress List<Property Map>

    A list of ingress rules.

    description String

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

    name String

    The name of the Redshift security group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecurityGroup resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing SecurityGroup Resource

    Get an existing SecurityGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SecurityGroupState, opts?: CustomResourceOptions): SecurityGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            ingress: Optional[Sequence[SecurityGroupIngressArgs]] = None,
            name: Optional[str] = None) -> SecurityGroup
    func GetSecurityGroup(ctx *Context, name string, id IDInput, state *SecurityGroupState, opts ...ResourceOption) (*SecurityGroup, error)
    public static SecurityGroup Get(string name, Input<string> id, SecurityGroupState? state, CustomResourceOptions? opts = null)
    public static SecurityGroup get(String name, Output<String> id, SecurityGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string

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

    Ingress List<Pulumi.Aws.RedShift.Inputs.SecurityGroupIngressArgs>

    A list of ingress rules.

    Name string

    The name of the Redshift security group.

    Description string

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

    Ingress []SecurityGroupIngressArgs

    A list of ingress rules.

    Name string

    The name of the Redshift security group.

    description String

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

    ingress List<SecurityGroupIngressArgs>

    A list of ingress rules.

    name String

    The name of the Redshift security group.

    description string

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

    ingress SecurityGroupIngressArgs[]

    A list of ingress rules.

    name string

    The name of the Redshift security group.

    description str

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

    ingress Sequence[SecurityGroupIngressArgs]

    A list of ingress rules.

    name str

    The name of the Redshift security group.

    description String

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

    ingress List<Property Map>

    A list of ingress rules.

    name String

    The name of the Redshift security group.

    Supporting Types

    SecurityGroupIngress

    Cidr string

    The CIDR block to accept

    SecurityGroupName string

    The name of the security group to authorize

    SecurityGroupOwnerId string

    The owner Id of the security group provided by security_group_name.

    Cidr string

    The CIDR block to accept

    SecurityGroupName string

    The name of the security group to authorize

    SecurityGroupOwnerId string

    The owner Id of the security group provided by security_group_name.

    cidr String

    The CIDR block to accept

    securityGroupName String

    The name of the security group to authorize

    securityGroupOwnerId String

    The owner Id of the security group provided by security_group_name.

    cidr string

    The CIDR block to accept

    securityGroupName string

    The name of the security group to authorize

    securityGroupOwnerId string

    The owner Id of the security group provided by security_group_name.

    cidr str

    The CIDR block to accept

    security_group_name str

    The name of the security group to authorize

    security_group_owner_id str

    The owner Id of the security group provided by security_group_name.

    cidr String

    The CIDR block to accept

    securityGroupName String

    The name of the security group to authorize

    securityGroupOwnerId String

    The owner Id of the security group provided by security_group_name.

    Import

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

     $ pulumi import aws:redshift/securityGroup:SecurityGroup testgroup1 redshift_test_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 logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi