1. Packages
  2. Opennebula Provider
  3. API Docs
  4. SecurityGroup
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

opennebula.SecurityGroup

Explore with Pulumi AI

opennebula logo
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

    Provides an OpenNebula security group resource.

    This resource allows you to manage security groups on your OpenNebula clusters. When applied, a new security group is created. When destroyed, this security group is removed.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opennebula from "@pulumi/opennebula";
    
    const example = new opennebula.SecurityGroup("example", {
        description: "Terraform security group",
        group: "terraform",
        rules: [
            {
                protocol: "ALL",
                ruleType: "OUTBOUND",
            },
            {
                protocol: "TCP",
                range: "22",
                ruleType: "INBOUND",
            },
            {
                protocol: "ICMP",
                ruleType: "INBOUND",
            },
        ],
        tags: {
            environment: "example",
        },
        templateSections: [{
            elements: {
                key1: "value1",
            },
            name: "example",
        }],
    });
    
    import pulumi
    import pulumi_opennebula as opennebula
    
    example = opennebula.SecurityGroup("example",
        description="Terraform security group",
        group="terraform",
        rules=[
            {
                "protocol": "ALL",
                "rule_type": "OUTBOUND",
            },
            {
                "protocol": "TCP",
                "range": "22",
                "rule_type": "INBOUND",
            },
            {
                "protocol": "ICMP",
                "rule_type": "INBOUND",
            },
        ],
        tags={
            "environment": "example",
        },
        template_sections=[{
            "elements": {
                "key1": "value1",
            },
            "name": "example",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opennebula/opennebula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opennebula.NewSecurityGroup(ctx, "example", &opennebula.SecurityGroupArgs{
    			Description: pulumi.String("Terraform security group"),
    			Group:       pulumi.String("terraform"),
    			Rules: opennebula.SecurityGroupRuleArray{
    				&opennebula.SecurityGroupRuleArgs{
    					Protocol: pulumi.String("ALL"),
    					RuleType: pulumi.String("OUTBOUND"),
    				},
    				&opennebula.SecurityGroupRuleArgs{
    					Protocol: pulumi.String("TCP"),
    					Range:    pulumi.String("22"),
    					RuleType: pulumi.String("INBOUND"),
    				},
    				&opennebula.SecurityGroupRuleArgs{
    					Protocol: pulumi.String("ICMP"),
    					RuleType: pulumi.String("INBOUND"),
    				},
    			},
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("example"),
    			},
    			TemplateSections: opennebula.SecurityGroupTemplateSectionArray{
    				&opennebula.SecurityGroupTemplateSectionArgs{
    					Elements: pulumi.StringMap{
    						"key1": pulumi.String("value1"),
    					},
    					Name: pulumi.String("example"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opennebula = Pulumi.Opennebula;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Opennebula.SecurityGroup("example", new()
        {
            Description = "Terraform security group",
            Group = "terraform",
            Rules = new[]
            {
                new Opennebula.Inputs.SecurityGroupRuleArgs
                {
                    Protocol = "ALL",
                    RuleType = "OUTBOUND",
                },
                new Opennebula.Inputs.SecurityGroupRuleArgs
                {
                    Protocol = "TCP",
                    Range = "22",
                    RuleType = "INBOUND",
                },
                new Opennebula.Inputs.SecurityGroupRuleArgs
                {
                    Protocol = "ICMP",
                    RuleType = "INBOUND",
                },
            },
            Tags = 
            {
                { "environment", "example" },
            },
            TemplateSections = new[]
            {
                new Opennebula.Inputs.SecurityGroupTemplateSectionArgs
                {
                    Elements = 
                    {
                        { "key1", "value1" },
                    },
                    Name = "example",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opennebula.SecurityGroup;
    import com.pulumi.opennebula.SecurityGroupArgs;
    import com.pulumi.opennebula.inputs.SecurityGroupRuleArgs;
    import com.pulumi.opennebula.inputs.SecurityGroupTemplateSectionArgs;
    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 example = new SecurityGroup("example", SecurityGroupArgs.builder()
                .description("Terraform security group")
                .group("terraform")
                .rules(            
                    SecurityGroupRuleArgs.builder()
                        .protocol("ALL")
                        .ruleType("OUTBOUND")
                        .build(),
                    SecurityGroupRuleArgs.builder()
                        .protocol("TCP")
                        .range("22")
                        .ruleType("INBOUND")
                        .build(),
                    SecurityGroupRuleArgs.builder()
                        .protocol("ICMP")
                        .ruleType("INBOUND")
                        .build())
                .tags(Map.of("environment", "example"))
                .templateSections(SecurityGroupTemplateSectionArgs.builder()
                    .elements(Map.of("key1", "value1"))
                    .name("example")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: opennebula:SecurityGroup
        properties:
          description: Terraform security group
          group: terraform
          rules:
            - protocol: ALL
              ruleType: OUTBOUND
            - protocol: TCP
              range: '22'
              ruleType: INBOUND
            - protocol: ICMP
              ruleType: INBOUND
          tags:
            environment: example
          templateSections:
            - elements:
                key1: value1
              name: example
    

    Create SecurityGroup Resource

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

    Constructor syntax

    new SecurityGroup(name: string, args: SecurityGroupArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityGroup(resource_name: str,
                      args: SecurityGroupArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityGroup(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      rules: Optional[Sequence[SecurityGroupRuleArgs]] = None,
                      commit: Optional[bool] = None,
                      description: Optional[str] = None,
                      group: Optional[str] = None,
                      name: Optional[str] = None,
                      permissions: Optional[str] = None,
                      security_group_id: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      template_sections: Optional[Sequence[SecurityGroupTemplateSectionArgs]] = 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: opennebula:SecurityGroup
    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 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.

    Constructor example

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

    var securityGroupResource = new Opennebula.SecurityGroup("securityGroupResource", new()
    {
        Rules = new[]
        {
            new Opennebula.Inputs.SecurityGroupRuleArgs
            {
                Protocol = "string",
                RuleType = "string",
                IcmpType = "string",
                Ip = "string",
                NetworkId = "string",
                Range = "string",
                Size = "string",
            },
        },
        Commit = false,
        Description = "string",
        Group = "string",
        Name = "string",
        Permissions = "string",
        SecurityGroupId = "string",
        Tags = 
        {
            { "string", "string" },
        },
        TemplateSections = new[]
        {
            new Opennebula.Inputs.SecurityGroupTemplateSectionArgs
            {
                Name = "string",
                Elements = 
                {
                    { "string", "string" },
                },
            },
        },
    });
    
    example, err := opennebula.NewSecurityGroup(ctx, "securityGroupResource", &opennebula.SecurityGroupArgs{
    	Rules: opennebula.SecurityGroupRuleArray{
    		&opennebula.SecurityGroupRuleArgs{
    			Protocol:  pulumi.String("string"),
    			RuleType:  pulumi.String("string"),
    			IcmpType:  pulumi.String("string"),
    			Ip:        pulumi.String("string"),
    			NetworkId: pulumi.String("string"),
    			Range:     pulumi.String("string"),
    			Size:      pulumi.String("string"),
    		},
    	},
    	Commit:          pulumi.Bool(false),
    	Description:     pulumi.String("string"),
    	Group:           pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	Permissions:     pulumi.String("string"),
    	SecurityGroupId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TemplateSections: opennebula.SecurityGroupTemplateSectionArray{
    		&opennebula.SecurityGroupTemplateSectionArgs{
    			Name: pulumi.String("string"),
    			Elements: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    		},
    	},
    })
    
    var securityGroupResource = new SecurityGroup("securityGroupResource", SecurityGroupArgs.builder()
        .rules(SecurityGroupRuleArgs.builder()
            .protocol("string")
            .ruleType("string")
            .icmpType("string")
            .ip("string")
            .networkId("string")
            .range("string")
            .size("string")
            .build())
        .commit(false)
        .description("string")
        .group("string")
        .name("string")
        .permissions("string")
        .securityGroupId("string")
        .tags(Map.of("string", "string"))
        .templateSections(SecurityGroupTemplateSectionArgs.builder()
            .name("string")
            .elements(Map.of("string", "string"))
            .build())
        .build());
    
    security_group_resource = opennebula.SecurityGroup("securityGroupResource",
        rules=[{
            "protocol": "string",
            "rule_type": "string",
            "icmp_type": "string",
            "ip": "string",
            "network_id": "string",
            "range": "string",
            "size": "string",
        }],
        commit=False,
        description="string",
        group="string",
        name="string",
        permissions="string",
        security_group_id="string",
        tags={
            "string": "string",
        },
        template_sections=[{
            "name": "string",
            "elements": {
                "string": "string",
            },
        }])
    
    const securityGroupResource = new opennebula.SecurityGroup("securityGroupResource", {
        rules: [{
            protocol: "string",
            ruleType: "string",
            icmpType: "string",
            ip: "string",
            networkId: "string",
            range: "string",
            size: "string",
        }],
        commit: false,
        description: "string",
        group: "string",
        name: "string",
        permissions: "string",
        securityGroupId: "string",
        tags: {
            string: "string",
        },
        templateSections: [{
            name: "string",
            elements: {
                string: "string",
            },
        }],
    });
    
    type: opennebula:SecurityGroup
    properties:
        commit: false
        description: string
        group: string
        name: string
        permissions: string
        rules:
            - icmpType: string
              ip: string
              networkId: string
              protocol: string
              range: string
              ruleType: string
              size: string
        securityGroupId: string
        tags:
            string: string
        templateSections:
            - elements:
                string: string
              name: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SecurityGroup resource accepts the following input properties:

    Rules List<SecurityGroupRule>
    List of rules. See Rule parameters below for details
    Commit bool
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    Description string
    Description of the security group.
    Group string
    Name of the group which owns the security group. Defaults to the caller primary group.
    Name string
    The name of the security group.
    Permissions string
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    SecurityGroupId string
    ID of the security group.
    Tags Dictionary<string, string>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TemplateSections List<SecurityGroupTemplateSection>
    Allow to add a custom vector. See Template section parameters
    Rules []SecurityGroupRuleArgs
    List of rules. See Rule parameters below for details
    Commit bool
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    Description string
    Description of the security group.
    Group string
    Name of the group which owns the security group. Defaults to the caller primary group.
    Name string
    The name of the security group.
    Permissions string
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    SecurityGroupId string
    ID of the security group.
    Tags map[string]string
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TemplateSections []SecurityGroupTemplateSectionArgs
    Allow to add a custom vector. See Template section parameters
    rules List<SecurityGroupRule>
    List of rules. See Rule parameters below for details
    commit Boolean
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    description String
    Description of the security group.
    group String
    Name of the group which owns the security group. Defaults to the caller primary group.
    name String
    The name of the security group.
    permissions String
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    securityGroupId String
    ID of the security group.
    tags Map<String,String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    templateSections List<SecurityGroupTemplateSection>
    Allow to add a custom vector. See Template section parameters
    rules SecurityGroupRule[]
    List of rules. See Rule parameters below for details
    commit boolean
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    description string
    Description of the security group.
    group string
    Name of the group which owns the security group. Defaults to the caller primary group.
    name string
    The name of the security group.
    permissions string
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    securityGroupId string
    ID of the security group.
    tags {[key: string]: string}
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    templateSections SecurityGroupTemplateSection[]
    Allow to add a custom vector. See Template section parameters
    rules Sequence[SecurityGroupRuleArgs]
    List of rules. See Rule parameters below for details
    commit bool
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    description str
    Description of the security group.
    group str
    Name of the group which owns the security group. Defaults to the caller primary group.
    name str
    The name of the security group.
    permissions str
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    security_group_id str
    ID of the security group.
    tags Mapping[str, str]
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    template_sections Sequence[SecurityGroupTemplateSectionArgs]
    Allow to add a custom vector. See Template section parameters
    rules List<Property Map>
    List of rules. See Rule parameters below for details
    commit Boolean
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    description String
    Description of the security group.
    group String
    Name of the group which owns the security group. Defaults to the caller primary group.
    name String
    The name of the security group.
    permissions String
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    securityGroupId String
    ID of the security group.
    tags Map<String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    templateSections List<Property Map>
    Allow to add a custom vector. See Template section parameters

    Outputs

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

    DefaultTags Dictionary<string, string>
    Default tags defined in the provider configuration.
    Gid double
    Group ID which owns the security group.
    Gname string
    Group Name which owns the security group.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    Result of the applied default_tags and then resource tags.
    Uid double
    User ID whom owns the security group.
    Uname string
    User Name whom owns the security group.
    DefaultTags map[string]string
    Default tags defined in the provider configuration.
    Gid float64
    Group ID which owns the security group.
    Gname string
    Group Name which owns the security group.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    Result of the applied default_tags and then resource tags.
    Uid float64
    User ID whom owns the security group.
    Uname string
    User Name whom owns the security group.
    defaultTags Map<String,String>
    Default tags defined in the provider configuration.
    gid Double
    Group ID which owns the security group.
    gname String
    Group Name which owns the security group.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    Result of the applied default_tags and then resource tags.
    uid Double
    User ID whom owns the security group.
    uname String
    User Name whom owns the security group.
    defaultTags {[key: string]: string}
    Default tags defined in the provider configuration.
    gid number
    Group ID which owns the security group.
    gname string
    Group Name which owns the security group.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    Result of the applied default_tags and then resource tags.
    uid number
    User ID whom owns the security group.
    uname string
    User Name whom owns the security group.
    default_tags Mapping[str, str]
    Default tags defined in the provider configuration.
    gid float
    Group ID which owns the security group.
    gname str
    Group Name which owns the security group.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    Result of the applied default_tags and then resource tags.
    uid float
    User ID whom owns the security group.
    uname str
    User Name whom owns the security group.
    defaultTags Map<String>
    Default tags defined in the provider configuration.
    gid Number
    Group ID which owns the security group.
    gname String
    Group Name which owns the security group.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    Result of the applied default_tags and then resource tags.
    uid Number
    User ID whom owns the security group.
    uname String
    User Name whom owns the security group.

    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,
            commit: Optional[bool] = None,
            default_tags: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            gid: Optional[float] = None,
            gname: Optional[str] = None,
            group: Optional[str] = None,
            name: Optional[str] = None,
            permissions: Optional[str] = None,
            rules: Optional[Sequence[SecurityGroupRuleArgs]] = None,
            security_group_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            template_sections: Optional[Sequence[SecurityGroupTemplateSectionArgs]] = None,
            uid: Optional[float] = None,
            uname: 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)
    resources:  _:    type: opennebula:SecurityGroup    get:      id: ${id}
    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:
    Commit bool
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    DefaultTags Dictionary<string, string>
    Default tags defined in the provider configuration.
    Description string
    Description of the security group.
    Gid double
    Group ID which owns the security group.
    Gname string
    Group Name which owns the security group.
    Group string
    Name of the group which owns the security group. Defaults to the caller primary group.
    Name string
    The name of the security group.
    Permissions string
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    Rules List<SecurityGroupRule>
    List of rules. See Rule parameters below for details
    SecurityGroupId string
    ID of the security group.
    Tags Dictionary<string, string>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TagsAll Dictionary<string, string>
    Result of the applied default_tags and then resource tags.
    TemplateSections List<SecurityGroupTemplateSection>
    Allow to add a custom vector. See Template section parameters
    Uid double
    User ID whom owns the security group.
    Uname string
    User Name whom owns the security group.
    Commit bool
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    DefaultTags map[string]string
    Default tags defined in the provider configuration.
    Description string
    Description of the security group.
    Gid float64
    Group ID which owns the security group.
    Gname string
    Group Name which owns the security group.
    Group string
    Name of the group which owns the security group. Defaults to the caller primary group.
    Name string
    The name of the security group.
    Permissions string
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    Rules []SecurityGroupRuleArgs
    List of rules. See Rule parameters below for details
    SecurityGroupId string
    ID of the security group.
    Tags map[string]string
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TagsAll map[string]string
    Result of the applied default_tags and then resource tags.
    TemplateSections []SecurityGroupTemplateSectionArgs
    Allow to add a custom vector. See Template section parameters
    Uid float64
    User ID whom owns the security group.
    Uname string
    User Name whom owns the security group.
    commit Boolean
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    defaultTags Map<String,String>
    Default tags defined in the provider configuration.
    description String
    Description of the security group.
    gid Double
    Group ID which owns the security group.
    gname String
    Group Name which owns the security group.
    group String
    Name of the group which owns the security group. Defaults to the caller primary group.
    name String
    The name of the security group.
    permissions String
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    rules List<SecurityGroupRule>
    List of rules. See Rule parameters below for details
    securityGroupId String
    ID of the security group.
    tags Map<String,String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll Map<String,String>
    Result of the applied default_tags and then resource tags.
    templateSections List<SecurityGroupTemplateSection>
    Allow to add a custom vector. See Template section parameters
    uid Double
    User ID whom owns the security group.
    uname String
    User Name whom owns the security group.
    commit boolean
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    defaultTags {[key: string]: string}
    Default tags defined in the provider configuration.
    description string
    Description of the security group.
    gid number
    Group ID which owns the security group.
    gname string
    Group Name which owns the security group.
    group string
    Name of the group which owns the security group. Defaults to the caller primary group.
    name string
    The name of the security group.
    permissions string
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    rules SecurityGroupRule[]
    List of rules. See Rule parameters below for details
    securityGroupId string
    ID of the security group.
    tags {[key: string]: string}
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll {[key: string]: string}
    Result of the applied default_tags and then resource tags.
    templateSections SecurityGroupTemplateSection[]
    Allow to add a custom vector. See Template section parameters
    uid number
    User ID whom owns the security group.
    uname string
    User Name whom owns the security group.
    commit bool
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    default_tags Mapping[str, str]
    Default tags defined in the provider configuration.
    description str
    Description of the security group.
    gid float
    Group ID which owns the security group.
    gname str
    Group Name which owns the security group.
    group str
    Name of the group which owns the security group. Defaults to the caller primary group.
    name str
    The name of the security group.
    permissions str
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    rules Sequence[SecurityGroupRuleArgs]
    List of rules. See Rule parameters below for details
    security_group_id str
    ID of the security group.
    tags Mapping[str, str]
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tags_all Mapping[str, str]
    Result of the applied default_tags and then resource tags.
    template_sections Sequence[SecurityGroupTemplateSectionArgs]
    Allow to add a custom vector. See Template section parameters
    uid float
    User ID whom owns the security group.
    uname str
    User Name whom owns the security group.
    commit Boolean
    Flag to commit changes on Virtual Machine on security group update. Defaults to true.
    defaultTags Map<String>
    Default tags defined in the provider configuration.
    description String
    Description of the security group.
    gid Number
    Group ID which owns the security group.
    gname String
    Group Name which owns the security group.
    group String
    Name of the group which owns the security group. Defaults to the caller primary group.
    name String
    The name of the security group.
    permissions String
    Permissions applied on security group. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    rules List<Property Map>
    List of rules. See Rule parameters below for details
    securityGroupId String
    ID of the security group.
    tags Map<String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll Map<String>
    Result of the applied default_tags and then resource tags.
    templateSections List<Property Map>
    Allow to add a custom vector. See Template section parameters
    uid Number
    User ID whom owns the security group.
    uname String
    User Name whom owns the security group.

    Supporting Types

    SecurityGroupRule, SecurityGroupRuleArgs

    Protocol string
    Protocol for the rule. Supported values: ALL, TCP, UDP, ICMP or IPSEC.
    RuleType string
    Direction of the traffic flow to allow, must be INBOUND or OUTBOUND.
    IcmpType string

    Type of ICMP traffic to apply to when 'protocol' is ICMP.

    See https://docs.opennebula.org/5.12/operation/network_management/security_groups.html for more details on allowed values.

    Ip string
    IP (or starting IP if used with 'size') to apply the rule to.
    NetworkId string
    VNET ID to be used as the source/destination IP addresses.
    Range string
    Comma separated list of ports and port ranges.
    Size string
    Number of IPs to apply the rule from, starting with ip.
    Protocol string
    Protocol for the rule. Supported values: ALL, TCP, UDP, ICMP or IPSEC.
    RuleType string
    Direction of the traffic flow to allow, must be INBOUND or OUTBOUND.
    IcmpType string

    Type of ICMP traffic to apply to when 'protocol' is ICMP.

    See https://docs.opennebula.org/5.12/operation/network_management/security_groups.html for more details on allowed values.

    Ip string
    IP (or starting IP if used with 'size') to apply the rule to.
    NetworkId string
    VNET ID to be used as the source/destination IP addresses.
    Range string
    Comma separated list of ports and port ranges.
    Size string
    Number of IPs to apply the rule from, starting with ip.
    protocol String
    Protocol for the rule. Supported values: ALL, TCP, UDP, ICMP or IPSEC.
    ruleType String
    Direction of the traffic flow to allow, must be INBOUND or OUTBOUND.
    icmpType String

    Type of ICMP traffic to apply to when 'protocol' is ICMP.

    See https://docs.opennebula.org/5.12/operation/network_management/security_groups.html for more details on allowed values.

    ip String
    IP (or starting IP if used with 'size') to apply the rule to.
    networkId String
    VNET ID to be used as the source/destination IP addresses.
    range String
    Comma separated list of ports and port ranges.
    size String
    Number of IPs to apply the rule from, starting with ip.
    protocol string
    Protocol for the rule. Supported values: ALL, TCP, UDP, ICMP or IPSEC.
    ruleType string
    Direction of the traffic flow to allow, must be INBOUND or OUTBOUND.
    icmpType string

    Type of ICMP traffic to apply to when 'protocol' is ICMP.

    See https://docs.opennebula.org/5.12/operation/network_management/security_groups.html for more details on allowed values.

    ip string
    IP (or starting IP if used with 'size') to apply the rule to.
    networkId string
    VNET ID to be used as the source/destination IP addresses.
    range string
    Comma separated list of ports and port ranges.
    size string
    Number of IPs to apply the rule from, starting with ip.
    protocol str
    Protocol for the rule. Supported values: ALL, TCP, UDP, ICMP or IPSEC.
    rule_type str
    Direction of the traffic flow to allow, must be INBOUND or OUTBOUND.
    icmp_type str

    Type of ICMP traffic to apply to when 'protocol' is ICMP.

    See https://docs.opennebula.org/5.12/operation/network_management/security_groups.html for more details on allowed values.

    ip str
    IP (or starting IP if used with 'size') to apply the rule to.
    network_id str
    VNET ID to be used as the source/destination IP addresses.
    range str
    Comma separated list of ports and port ranges.
    size str
    Number of IPs to apply the rule from, starting with ip.
    protocol String
    Protocol for the rule. Supported values: ALL, TCP, UDP, ICMP or IPSEC.
    ruleType String
    Direction of the traffic flow to allow, must be INBOUND or OUTBOUND.
    icmpType String

    Type of ICMP traffic to apply to when 'protocol' is ICMP.

    See https://docs.opennebula.org/5.12/operation/network_management/security_groups.html for more details on allowed values.

    ip String
    IP (or starting IP if used with 'size') to apply the rule to.
    networkId String
    VNET ID to be used as the source/destination IP addresses.
    range String
    Comma separated list of ports and port ranges.
    size String
    Number of IPs to apply the rule from, starting with ip.

    SecurityGroupTemplateSection, SecurityGroupTemplateSectionArgs

    Name string
    The vector name.
    Elements Dictionary<string, string>
    Collection of custom tags.
    Name string
    The vector name.
    Elements map[string]string
    Collection of custom tags.
    name String
    The vector name.
    elements Map<String,String>
    Collection of custom tags.
    name string
    The vector name.
    elements {[key: string]: string}
    Collection of custom tags.
    name str
    The vector name.
    elements Mapping[str, str]
    Collection of custom tags.
    name String
    The vector name.
    elements Map<String>
    Collection of custom tags.

    Import

    opennebula_security_group can be imported using its ID:

    $ pulumi import opennebula:index/securityGroup:SecurityGroup example 123
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    opennebula opennebula/terraform-provider-opennebula
    License
    Notes
    This Pulumi package is based on the opennebula Terraform Provider.
    opennebula logo
    opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula