SecurityGroup

Provides an RDS security group resource. This is only for DB instances in the EC2-Classic Platform. For instances inside a VPC, use the aws_db_instance.vpc_security_group_ids attribute instead.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = new Aws.Rds.SecurityGroup("default", new Aws.Rds.SecurityGroupArgs
        {
            Ingress = 
            {
                new Aws.Rds.Inputs.SecurityGroupIngressArgs
                {
                    Cidr = "10.0.0.0/24",
                },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/rds"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := rds.NewSecurityGroup(ctx, "_default", &rds.SecurityGroupArgs{
            Ingress: rds.SecurityGroupIngressArray{
                &rds.SecurityGroupIngressArgs{
                    Cidr: pulumi.String("10.0.0.0/24"),
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

default = aws.rds.SecurityGroup("default", ingress=[{
    "cidr": "10.0.0.0/24",
}])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const defaultSecurityGroup = new aws.rds.SecurityGroup("default", {
    ingress: [{
        cidr: "10.0.0.0/24",
    }],
});

Create a SecurityGroup Resource

def SecurityGroup(resource_name, opts=None, description=None, ingress=None, name=None, tags=None, __props__=None);
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.
opts ResourceOptions
A bag of options that control this 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.

SecurityGroup Resource Properties

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

Inputs

The SecurityGroup resource accepts the following input properties:

Ingress List<SecurityGroupIngressArgs>

A list of ingress rules.

Description string

The description of the DB security group. Defaults to “Managed by Pulumi”.

Name string

The name of the DB security group.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

Ingress []SecurityGroupIngress

A list of ingress rules.

Description string

The description of the DB security group. Defaults to “Managed by Pulumi”.

Name string

The name of the DB security group.

Tags map[string]string

A map of tags to assign to the resource.

ingress SecurityGroupIngress[]

A list of ingress rules.

description string

The description of the DB security group. Defaults to “Managed by Pulumi”.

name string

The name of the DB security group.

tags {[key: string]: string}

A map of tags to assign to the resource.

ingress List[SecurityGroupIngress]

A list of ingress rules.

description str

The description of the DB security group. Defaults to “Managed by Pulumi”.

name str

The name of the DB security group.

tags Dict[str, str]

A map of tags to assign to the resource.

Outputs

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

Arn string

The arn of the DB security group.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The arn of the DB security group.

Id string
The provider-assigned unique ID for this managed resource.
arn string

The arn of the DB security group.

id string
The provider-assigned unique ID for this managed resource.
arn str

The arn of the DB security group.

id str
The provider-assigned unique ID for this managed resource.

Look up an 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
static get(resource_name, id, opts=None, arn=None, description=None, ingress=None, name=None, tags=None, __props__=None);
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)
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.

The following state arguments are supported:

Arn string

The arn of the DB security group.

Description string

The description of the DB security group. Defaults to “Managed by Pulumi”.

Ingress List<SecurityGroupIngressArgs>

A list of ingress rules.

Name string

The name of the DB security group.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

Arn string

The arn of the DB security group.

Description string

The description of the DB security group. Defaults to “Managed by Pulumi”.

Ingress []SecurityGroupIngress

A list of ingress rules.

Name string

The name of the DB security group.

Tags map[string]string

A map of tags to assign to the resource.

arn string

The arn of the DB security group.

description string

The description of the DB security group. Defaults to “Managed by Pulumi”.

ingress SecurityGroupIngress[]

A list of ingress rules.

name string

The name of the DB security group.

tags {[key: string]: string}

A map of tags to assign to the resource.

arn str

The arn of the DB security group.

description str

The description of the DB security group. Defaults to “Managed by Pulumi”.

ingress List[SecurityGroupIngress]

A list of ingress rules.

name str

The name of the DB security group.

tags Dict[str, str]

A map of tags to assign to the resource.

Supporting Types

SecurityGroupIngress

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Cidr string

The CIDR block to accept

SecurityGroupId string

The ID of the security group to authorize

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

SecurityGroupId string

The ID of the security group to authorize

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

securityGroupId string

The ID of the security group to authorize

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

securityGroupName str

The name of the security group to authorize

securityGroupOwnerId str

The owner Id of the security group provided by security_group_name.

security_group_id str

The ID of the security group to authorize

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.