1. Packages
  2. OpenStack
  3. API Docs
  4. networking
  5. SecGroup
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

openstack.networking.SecGroup

Explore with Pulumi AI

openstack logo
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

    Import

    Security Groups can be imported using the id, e.g.

    $ pulumi import openstack:networking/secGroup:SecGroup secgroup_1 38809219-5e8a-4852-9139-6f461c90e8bc
    

    Create SecGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SecGroup(name: string, args?: SecGroupArgs, opts?: CustomResourceOptions);
    @overload
    def SecGroup(resource_name: str,
                 args: Optional[SecGroupArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecGroup(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 delete_default_rules: Optional[bool] = None,
                 description: Optional[str] = None,
                 name: Optional[str] = None,
                 region: Optional[str] = None,
                 tags: Optional[Sequence[str]] = None,
                 tenant_id: Optional[str] = None)
    func NewSecGroup(ctx *Context, name string, args *SecGroupArgs, opts ...ResourceOption) (*SecGroup, error)
    public SecGroup(string name, SecGroupArgs? args = null, CustomResourceOptions? opts = null)
    public SecGroup(String name, SecGroupArgs args)
    public SecGroup(String name, SecGroupArgs args, CustomResourceOptions options)
    
    type: openstack:networking:SecGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SecGroupArgs
    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 SecGroupArgs
    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 SecGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var openstackSecGroupResource = new OpenStack.Networking.SecGroup("openstackSecGroupResource", new()
    {
        DeleteDefaultRules = false,
        Description = "string",
        Name = "string",
        Region = "string",
        Tags = new[]
        {
            "string",
        },
        TenantId = "string",
    });
    
    example, err := networking.NewSecGroup(ctx, "openstackSecGroupResource", &networking.SecGroupArgs{
    	DeleteDefaultRules: pulumi.Bool(false),
    	Description:        pulumi.String("string"),
    	Name:               pulumi.String("string"),
    	Region:             pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TenantId: pulumi.String("string"),
    })
    
    var openstackSecGroupResource = new SecGroup("openstackSecGroupResource", SecGroupArgs.builder()
        .deleteDefaultRules(false)
        .description("string")
        .name("string")
        .region("string")
        .tags("string")
        .tenantId("string")
        .build());
    
    openstack_sec_group_resource = openstack.networking.SecGroup("openstackSecGroupResource",
        delete_default_rules=False,
        description="string",
        name="string",
        region="string",
        tags=["string"],
        tenant_id="string")
    
    const openstackSecGroupResource = new openstack.networking.SecGroup("openstackSecGroupResource", {
        deleteDefaultRules: false,
        description: "string",
        name: "string",
        region: "string",
        tags: ["string"],
        tenantId: "string",
    });
    
    type: openstack:networking:SecGroup
    properties:
        deleteDefaultRules: false
        description: string
        name: string
        region: string
        tags:
            - string
        tenantId: string
    

    SecGroup 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 SecGroup resource accepts the following input properties:

    DeleteDefaultRules bool
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    Description string
    A unique name for the security group.
    Name string
    A unique name for the security group.
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    Tags List<string>
    A set of string tags for the security group.
    TenantId string
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.
    DeleteDefaultRules bool
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    Description string
    A unique name for the security group.
    Name string
    A unique name for the security group.
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    Tags []string
    A set of string tags for the security group.
    TenantId string
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.
    deleteDefaultRules Boolean
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    description String
    A unique name for the security group.
    name String
    A unique name for the security group.
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    tags List<String>
    A set of string tags for the security group.
    tenantId String
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.
    deleteDefaultRules boolean
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    description string
    A unique name for the security group.
    name string
    A unique name for the security group.
    region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    tags string[]
    A set of string tags for the security group.
    tenantId string
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.
    delete_default_rules bool
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    description str
    A unique name for the security group.
    name str
    A unique name for the security group.
    region str
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    tags Sequence[str]
    A set of string tags for the security group.
    tenant_id str
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.
    deleteDefaultRules Boolean
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    description String
    A unique name for the security group.
    name String
    A unique name for the security group.
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    tags List<String>
    A set of string tags for the security group.
    tenantId String
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.

    Outputs

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

    AllTags List<string>
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    Id string
    The provider-assigned unique ID for this managed resource.
    AllTags []string
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    Id string
    The provider-assigned unique ID for this managed resource.
    allTags List<String>
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    id String
    The provider-assigned unique ID for this managed resource.
    allTags string[]
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    id string
    The provider-assigned unique ID for this managed resource.
    all_tags Sequence[str]
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    id str
    The provider-assigned unique ID for this managed resource.
    allTags List<String>
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SecGroup Resource

    Get an existing SecGroup 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?: SecGroupState, opts?: CustomResourceOptions): SecGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            all_tags: Optional[Sequence[str]] = None,
            delete_default_rules: Optional[bool] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            tenant_id: Optional[str] = None) -> SecGroup
    func GetSecGroup(ctx *Context, name string, id IDInput, state *SecGroupState, opts ...ResourceOption) (*SecGroup, error)
    public static SecGroup Get(string name, Input<string> id, SecGroupState? state, CustomResourceOptions? opts = null)
    public static SecGroup get(String name, Output<String> id, SecGroupState 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:
    AllTags List<string>
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    DeleteDefaultRules bool
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    Description string
    A unique name for the security group.
    Name string
    A unique name for the security group.
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    Tags List<string>
    A set of string tags for the security group.
    TenantId string
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.
    AllTags []string
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    DeleteDefaultRules bool
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    Description string
    A unique name for the security group.
    Name string
    A unique name for the security group.
    Region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    Tags []string
    A set of string tags for the security group.
    TenantId string
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.
    allTags List<String>
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    deleteDefaultRules Boolean
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    description String
    A unique name for the security group.
    name String
    A unique name for the security group.
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    tags List<String>
    A set of string tags for the security group.
    tenantId String
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.
    allTags string[]
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    deleteDefaultRules boolean
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    description string
    A unique name for the security group.
    name string
    A unique name for the security group.
    region string
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    tags string[]
    A set of string tags for the security group.
    tenantId string
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.
    all_tags Sequence[str]
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    delete_default_rules bool
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    description str
    A unique name for the security group.
    name str
    A unique name for the security group.
    region str
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    tags Sequence[str]
    A set of string tags for the security group.
    tenant_id str
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.
    allTags List<String>
    The collection of tags assigned on the security group, which have been explicitly and implicitly added.
    deleteDefaultRules Boolean
    Whether or not to delete the default egress security rules. This is false by default. See the below note for more information.
    description String
    A unique name for the security group.
    name String
    A unique name for the security group.
    region String
    The region in which to obtain the V2 networking client. A networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new security group.
    tags List<String>
    A set of string tags for the security group.
    tenantId String
    The owner of the security group. Required if admin wants to create a port for another tenant. Changing this creates a new security group.

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi