1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. CloudSecurityGroup
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud

    Creates a security group in a public cloud project.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      sg:
        type: ovh:CloudSecurityGroup
        properties:
          serviceName: <public cloud project ID>
          region: GRA1
          name: my-security-group
          description: Allow SSH and HTTPS
          rules:
            - direction: INGRESS
              ethernet_type: IPV4
              protocol: TCP
              port_range_min: 22
              port_range_max: 22
              remote_ip_prefix: 0.0.0.0/0
              description: SSH
            - direction: INGRESS
              ethernet_type: IPV4
              protocol: TCP
              port_range_min: 443
              port_range_max: 443
              remote_ip_prefix: 0.0.0.0/0
              description: HTTPS
    
    Example coming soon!
    

    Create CloudSecurityGroup Resource

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

    Constructor syntax

    new CloudSecurityGroup(name: string, args: CloudSecurityGroupArgs, opts?: CustomResourceOptions);
    @overload
    def CloudSecurityGroup(resource_name: str,
                           args: CloudSecurityGroupArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def CloudSecurityGroup(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           region: Optional[str] = None,
                           service_name: Optional[str] = None,
                           description: Optional[str] = None,
                           name: Optional[str] = None,
                           rules: Optional[Sequence[CloudSecurityGroupRuleArgs]] = None)
    func NewCloudSecurityGroup(ctx *Context, name string, args CloudSecurityGroupArgs, opts ...ResourceOption) (*CloudSecurityGroup, error)
    public CloudSecurityGroup(string name, CloudSecurityGroupArgs args, CustomResourceOptions? opts = null)
    public CloudSecurityGroup(String name, CloudSecurityGroupArgs args)
    public CloudSecurityGroup(String name, CloudSecurityGroupArgs args, CustomResourceOptions options)
    
    type: ovh:CloudSecurityGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "ovh_cloud_security_group" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args CloudSecurityGroupArgs
    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 CloudSecurityGroupArgs
    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 CloudSecurityGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudSecurityGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudSecurityGroupArgs
    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 cloudSecurityGroupResource = new Ovh.CloudSecurityGroup("cloudSecurityGroupResource", new()
    {
        Region = "string",
        ServiceName = "string",
        Description = "string",
        Name = "string",
        Rules = new[]
        {
            new Ovh.Inputs.CloudSecurityGroupRuleArgs
            {
                Direction = "string",
                EthernetType = "string",
                Description = "string",
                PortRangeMax = 0,
                PortRangeMin = 0,
                Protocol = "string",
                RemoteGroupId = "string",
                RemoteIpPrefix = "string",
            },
        },
    });
    
    example, err := ovh.NewCloudSecurityGroup(ctx, "cloudSecurityGroupResource", &ovh.CloudSecurityGroupArgs{
    	Region:      pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Rules: ovh.CloudSecurityGroupRuleArray{
    		&ovh.CloudSecurityGroupRuleArgs{
    			Direction:      pulumi.String("string"),
    			EthernetType:   pulumi.String("string"),
    			Description:    pulumi.String("string"),
    			PortRangeMax:   pulumi.Int(0),
    			PortRangeMin:   pulumi.Int(0),
    			Protocol:       pulumi.String("string"),
    			RemoteGroupId:  pulumi.String("string"),
    			RemoteIpPrefix: pulumi.String("string"),
    		},
    	},
    })
    
    resource "ovh_cloud_security_group" "cloudSecurityGroupResource" {
      lifecycle {
        create_before_destroy = true
      }
      region       = "string"
      service_name = "string"
      description  = "string"
      name         = "string"
      rules {
        direction        = "string"
        ethernet_type    = "string"
        description      = "string"
        port_range_max   = 0
        port_range_min   = 0
        protocol         = "string"
        remote_group_id  = "string"
        remote_ip_prefix = "string"
      }
    }
    
    var cloudSecurityGroupResource = new CloudSecurityGroup("cloudSecurityGroupResource", CloudSecurityGroupArgs.builder()
        .region("string")
        .serviceName("string")
        .description("string")
        .name("string")
        .rules(CloudSecurityGroupRuleArgs.builder()
            .direction("string")
            .ethernetType("string")
            .description("string")
            .portRangeMax(0)
            .portRangeMin(0)
            .protocol("string")
            .remoteGroupId("string")
            .remoteIpPrefix("string")
            .build())
        .build());
    
    cloud_security_group_resource = ovh.CloudSecurityGroup("cloudSecurityGroupResource",
        region="string",
        service_name="string",
        description="string",
        name="string",
        rules=[{
            "direction": "string",
            "ethernet_type": "string",
            "description": "string",
            "port_range_max": 0,
            "port_range_min": 0,
            "protocol": "string",
            "remote_group_id": "string",
            "remote_ip_prefix": "string",
        }])
    
    const cloudSecurityGroupResource = new ovh.CloudSecurityGroup("cloudSecurityGroupResource", {
        region: "string",
        serviceName: "string",
        description: "string",
        name: "string",
        rules: [{
            direction: "string",
            ethernetType: "string",
            description: "string",
            portRangeMax: 0,
            portRangeMin: 0,
            protocol: "string",
            remoteGroupId: "string",
            remoteIpPrefix: "string",
        }],
    });
    
    type: ovh:CloudSecurityGroup
    properties:
        description: string
        name: string
        region: string
        rules:
            - description: string
              direction: string
              ethernetType: string
              portRangeMax: 0
              portRangeMin: 0
              protocol: string
              remoteGroupId: string
              remoteIpPrefix: string
        serviceName: string
    

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

    Region string
    Region where the security group will be created. Changing this value recreates the resource.
    ServiceName string
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    Description string
    Description of the security group.
    Name string
    Name of the security group.
    Rules List<CloudSecurityGroupRule>
    List of security group rules. Each rule supports:
    Region string
    Region where the security group will be created. Changing this value recreates the resource.
    ServiceName string
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    Description string
    Description of the security group.
    Name string
    Name of the security group.
    Rules []CloudSecurityGroupRuleArgs
    List of security group rules. Each rule supports:
    region string
    Region where the security group will be created. Changing this value recreates the resource.
    service_name string
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    description string
    Description of the security group.
    name string
    Name of the security group.
    rules list(object)
    List of security group rules. Each rule supports:
    region String
    Region where the security group will be created. Changing this value recreates the resource.
    serviceName String
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    description String
    Description of the security group.
    name String
    Name of the security group.
    rules List<CloudSecurityGroupRule>
    List of security group rules. Each rule supports:
    region string
    Region where the security group will be created. Changing this value recreates the resource.
    serviceName string
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    description string
    Description of the security group.
    name string
    Name of the security group.
    rules CloudSecurityGroupRule[]
    List of security group rules. Each rule supports:
    region str
    Region where the security group will be created. Changing this value recreates the resource.
    service_name str
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    description str
    Description of the security group.
    name str
    Name of the security group.
    rules Sequence[CloudSecurityGroupRuleArgs]
    List of security group rules. Each rule supports:
    region String
    Region where the security group will be created. Changing this value recreates the resource.
    serviceName String
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    description String
    Description of the security group.
    name String
    Name of the security group.
    rules List<Property Map>
    List of security group rules. Each rule supports:

    Outputs

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

    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Creation date of the security group.
    CurrentState CloudSecurityGroupCurrentState
    Current state of the security group:
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceStatus string
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    UpdatedAt string
    Last update date of the security group.
    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Creation date of the security group.
    CurrentState CloudSecurityGroupCurrentState
    Current state of the security group:
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceStatus string
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    UpdatedAt string
    Last update date of the security group.
    checksum string
    Computed hash representing the current target specification value.
    created_at string
    Creation date of the security group.
    current_state object
    Current state of the security group:
    id string
    The provider-assigned unique ID for this managed resource.
    resource_status string
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updated_at string
    Last update date of the security group.
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Creation date of the security group.
    currentState CloudSecurityGroupCurrentState
    Current state of the security group:
    id String
    The provider-assigned unique ID for this managed resource.
    resourceStatus String
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updatedAt String
    Last update date of the security group.
    checksum string
    Computed hash representing the current target specification value.
    createdAt string
    Creation date of the security group.
    currentState CloudSecurityGroupCurrentState
    Current state of the security group:
    id string
    The provider-assigned unique ID for this managed resource.
    resourceStatus string
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updatedAt string
    Last update date of the security group.
    checksum str
    Computed hash representing the current target specification value.
    created_at str
    Creation date of the security group.
    current_state CloudSecurityGroupCurrentState
    Current state of the security group:
    id str
    The provider-assigned unique ID for this managed resource.
    resource_status str
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updated_at str
    Last update date of the security group.
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Creation date of the security group.
    currentState Property Map
    Current state of the security group:
    id String
    The provider-assigned unique ID for this managed resource.
    resourceStatus String
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updatedAt String
    Last update date of the security group.

    Look up Existing CloudSecurityGroup Resource

    Get an existing CloudSecurityGroup 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?: CloudSecurityGroupState, opts?: CustomResourceOptions): CloudSecurityGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            checksum: Optional[str] = None,
            created_at: Optional[str] = None,
            current_state: Optional[CloudSecurityGroupCurrentStateArgs] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            resource_status: Optional[str] = None,
            rules: Optional[Sequence[CloudSecurityGroupRuleArgs]] = None,
            service_name: Optional[str] = None,
            updated_at: Optional[str] = None) -> CloudSecurityGroup
    func GetCloudSecurityGroup(ctx *Context, name string, id IDInput, state *CloudSecurityGroupState, opts ...ResourceOption) (*CloudSecurityGroup, error)
    public static CloudSecurityGroup Get(string name, Input<string> id, CloudSecurityGroupState? state, CustomResourceOptions? opts = null)
    public static CloudSecurityGroup get(String name, Output<String> id, CloudSecurityGroupState state, CustomResourceOptions options)
    resources:  _:    type: ovh:CloudSecurityGroup    get:      id: ${id}
    import {
      to = ovh_cloud_security_group.example
      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:
    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Creation date of the security group.
    CurrentState CloudSecurityGroupCurrentState
    Current state of the security group:
    Description string
    Description of the security group.
    Name string
    Name of the security group.
    Region string
    Region where the security group will be created. Changing this value recreates the resource.
    ResourceStatus string
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    Rules List<CloudSecurityGroupRule>
    List of security group rules. Each rule supports:
    ServiceName string
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    UpdatedAt string
    Last update date of the security group.
    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Creation date of the security group.
    CurrentState CloudSecurityGroupCurrentStateArgs
    Current state of the security group:
    Description string
    Description of the security group.
    Name string
    Name of the security group.
    Region string
    Region where the security group will be created. Changing this value recreates the resource.
    ResourceStatus string
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    Rules []CloudSecurityGroupRuleArgs
    List of security group rules. Each rule supports:
    ServiceName string
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    UpdatedAt string
    Last update date of the security group.
    checksum string
    Computed hash representing the current target specification value.
    created_at string
    Creation date of the security group.
    current_state object
    Current state of the security group:
    description string
    Description of the security group.
    name string
    Name of the security group.
    region string
    Region where the security group will be created. Changing this value recreates the resource.
    resource_status string
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    rules list(object)
    List of security group rules. Each rule supports:
    service_name string
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    updated_at string
    Last update date of the security group.
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Creation date of the security group.
    currentState CloudSecurityGroupCurrentState
    Current state of the security group:
    description String
    Description of the security group.
    name String
    Name of the security group.
    region String
    Region where the security group will be created. Changing this value recreates the resource.
    resourceStatus String
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    rules List<CloudSecurityGroupRule>
    List of security group rules. Each rule supports:
    serviceName String
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    updatedAt String
    Last update date of the security group.
    checksum string
    Computed hash representing the current target specification value.
    createdAt string
    Creation date of the security group.
    currentState CloudSecurityGroupCurrentState
    Current state of the security group:
    description string
    Description of the security group.
    name string
    Name of the security group.
    region string
    Region where the security group will be created. Changing this value recreates the resource.
    resourceStatus string
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    rules CloudSecurityGroupRule[]
    List of security group rules. Each rule supports:
    serviceName string
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    updatedAt string
    Last update date of the security group.
    checksum str
    Computed hash representing the current target specification value.
    created_at str
    Creation date of the security group.
    current_state CloudSecurityGroupCurrentStateArgs
    Current state of the security group:
    description str
    Description of the security group.
    name str
    Name of the security group.
    region str
    Region where the security group will be created. Changing this value recreates the resource.
    resource_status str
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    rules Sequence[CloudSecurityGroupRuleArgs]
    List of security group rules. Each rule supports:
    service_name str
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    updated_at str
    Last update date of the security group.
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Creation date of the security group.
    currentState Property Map
    Current state of the security group:
    description String
    Description of the security group.
    name String
    Name of the security group.
    region String
    Region where the security group will be created. Changing this value recreates the resource.
    resourceStatus String
    Security group readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    rules List<Property Map>
    List of security group rules. Each rule supports:
    serviceName String
    Service name of the resource representing the id of the cloud project. Changing this value recreates the resource.
    updatedAt String
    Last update date of the security group.

    Supporting Types

    CloudSecurityGroupCurrentState, CloudSecurityGroupCurrentStateArgs

    DefaultRules List<CloudSecurityGroupCurrentStateDefaultRule>
    Default egress rules auto-created by OpenStack (same schema as rules). These are not part of the managed rule set and are exposed for information only.
    Description string
    Description of the security group.
    Location CloudSecurityGroupCurrentStateLocation
    Location details:
    Name string
    Name of the security group.
    Rules List<CloudSecurityGroupCurrentStateRule>
    User-specified security group rules with their IDs:
    DefaultRules []CloudSecurityGroupCurrentStateDefaultRule
    Default egress rules auto-created by OpenStack (same schema as rules). These are not part of the managed rule set and are exposed for information only.
    Description string
    Description of the security group.
    Location CloudSecurityGroupCurrentStateLocation
    Location details:
    Name string
    Name of the security group.
    Rules []CloudSecurityGroupCurrentStateRule
    User-specified security group rules with their IDs:
    default_rules list(object)
    Default egress rules auto-created by OpenStack (same schema as rules). These are not part of the managed rule set and are exposed for information only.
    description string
    Description of the security group.
    location object
    Location details:
    name string
    Name of the security group.
    rules list(object)
    User-specified security group rules with their IDs:
    defaultRules List<CloudSecurityGroupCurrentStateDefaultRule>
    Default egress rules auto-created by OpenStack (same schema as rules). These are not part of the managed rule set and are exposed for information only.
    description String
    Description of the security group.
    location CloudSecurityGroupCurrentStateLocation
    Location details:
    name String
    Name of the security group.
    rules List<CloudSecurityGroupCurrentStateRule>
    User-specified security group rules with their IDs:
    defaultRules CloudSecurityGroupCurrentStateDefaultRule[]
    Default egress rules auto-created by OpenStack (same schema as rules). These are not part of the managed rule set and are exposed for information only.
    description string
    Description of the security group.
    location CloudSecurityGroupCurrentStateLocation
    Location details:
    name string
    Name of the security group.
    rules CloudSecurityGroupCurrentStateRule[]
    User-specified security group rules with their IDs:
    default_rules Sequence[CloudSecurityGroupCurrentStateDefaultRule]
    Default egress rules auto-created by OpenStack (same schema as rules). These are not part of the managed rule set and are exposed for information only.
    description str
    Description of the security group.
    location CloudSecurityGroupCurrentStateLocation
    Location details:
    name str
    Name of the security group.
    rules Sequence[CloudSecurityGroupCurrentStateRule]
    User-specified security group rules with their IDs:
    defaultRules List<Property Map>
    Default egress rules auto-created by OpenStack (same schema as rules). These are not part of the managed rule set and are exposed for information only.
    description String
    Description of the security group.
    location Property Map
    Location details:
    name String
    Name of the security group.
    rules List<Property Map>
    User-specified security group rules with their IDs:

    CloudSecurityGroupCurrentStateDefaultRule, CloudSecurityGroupCurrentStateDefaultRuleArgs

    Description string
    Description of the security group.
    Direction string
    Direction of the rule.
    EthernetType string
    Ether type.
    Id string
    Rule ID.
    PortRangeMax int
    Maximum port number.
    PortRangeMin int
    Minimum port number.
    Protocol string
    Protocol.
    RemoteGroupId string
    Remote security group ID.
    RemoteIpPrefix string
    Remote IP prefix.
    Description string
    Description of the security group.
    Direction string
    Direction of the rule.
    EthernetType string
    Ether type.
    Id string
    Rule ID.
    PortRangeMax int
    Maximum port number.
    PortRangeMin int
    Minimum port number.
    Protocol string
    Protocol.
    RemoteGroupId string
    Remote security group ID.
    RemoteIpPrefix string
    Remote IP prefix.
    description string
    Description of the security group.
    direction string
    Direction of the rule.
    ethernet_type string
    Ether type.
    id string
    Rule ID.
    port_range_max number
    Maximum port number.
    port_range_min number
    Minimum port number.
    protocol string
    Protocol.
    remote_group_id string
    Remote security group ID.
    remote_ip_prefix string
    Remote IP prefix.
    description String
    Description of the security group.
    direction String
    Direction of the rule.
    ethernetType String
    Ether type.
    id String
    Rule ID.
    portRangeMax Integer
    Maximum port number.
    portRangeMin Integer
    Minimum port number.
    protocol String
    Protocol.
    remoteGroupId String
    Remote security group ID.
    remoteIpPrefix String
    Remote IP prefix.
    description string
    Description of the security group.
    direction string
    Direction of the rule.
    ethernetType string
    Ether type.
    id string
    Rule ID.
    portRangeMax number
    Maximum port number.
    portRangeMin number
    Minimum port number.
    protocol string
    Protocol.
    remoteGroupId string
    Remote security group ID.
    remoteIpPrefix string
    Remote IP prefix.
    description str
    Description of the security group.
    direction str
    Direction of the rule.
    ethernet_type str
    Ether type.
    id str
    Rule ID.
    port_range_max int
    Maximum port number.
    port_range_min int
    Minimum port number.
    protocol str
    Protocol.
    remote_group_id str
    Remote security group ID.
    remote_ip_prefix str
    Remote IP prefix.
    description String
    Description of the security group.
    direction String
    Direction of the rule.
    ethernetType String
    Ether type.
    id String
    Rule ID.
    portRangeMax Number
    Maximum port number.
    portRangeMin Number
    Minimum port number.
    protocol String
    Protocol.
    remoteGroupId String
    Remote security group ID.
    remoteIpPrefix String
    Remote IP prefix.

    CloudSecurityGroupCurrentStateLocation, CloudSecurityGroupCurrentStateLocationArgs

    Region string
    Region where the security group will be created. Changing this value recreates the resource.
    Region string
    Region where the security group will be created. Changing this value recreates the resource.
    region string
    Region where the security group will be created. Changing this value recreates the resource.
    region String
    Region where the security group will be created. Changing this value recreates the resource.
    region string
    Region where the security group will be created. Changing this value recreates the resource.
    region str
    Region where the security group will be created. Changing this value recreates the resource.
    region String
    Region where the security group will be created. Changing this value recreates the resource.

    CloudSecurityGroupCurrentStateRule, CloudSecurityGroupCurrentStateRuleArgs

    Description string
    Description of the security group.
    Direction string
    Direction of the rule.
    EthernetType string
    Ether type.
    Id string
    Rule ID.
    PortRangeMax int
    Maximum port number.
    PortRangeMin int
    Minimum port number.
    Protocol string
    Protocol.
    RemoteGroupId string
    Remote security group ID.
    RemoteIpPrefix string
    Remote IP prefix.
    Description string
    Description of the security group.
    Direction string
    Direction of the rule.
    EthernetType string
    Ether type.
    Id string
    Rule ID.
    PortRangeMax int
    Maximum port number.
    PortRangeMin int
    Minimum port number.
    Protocol string
    Protocol.
    RemoteGroupId string
    Remote security group ID.
    RemoteIpPrefix string
    Remote IP prefix.
    description string
    Description of the security group.
    direction string
    Direction of the rule.
    ethernet_type string
    Ether type.
    id string
    Rule ID.
    port_range_max number
    Maximum port number.
    port_range_min number
    Minimum port number.
    protocol string
    Protocol.
    remote_group_id string
    Remote security group ID.
    remote_ip_prefix string
    Remote IP prefix.
    description String
    Description of the security group.
    direction String
    Direction of the rule.
    ethernetType String
    Ether type.
    id String
    Rule ID.
    portRangeMax Integer
    Maximum port number.
    portRangeMin Integer
    Minimum port number.
    protocol String
    Protocol.
    remoteGroupId String
    Remote security group ID.
    remoteIpPrefix String
    Remote IP prefix.
    description string
    Description of the security group.
    direction string
    Direction of the rule.
    ethernetType string
    Ether type.
    id string
    Rule ID.
    portRangeMax number
    Maximum port number.
    portRangeMin number
    Minimum port number.
    protocol string
    Protocol.
    remoteGroupId string
    Remote security group ID.
    remoteIpPrefix string
    Remote IP prefix.
    description str
    Description of the security group.
    direction str
    Direction of the rule.
    ethernet_type str
    Ether type.
    id str
    Rule ID.
    port_range_max int
    Maximum port number.
    port_range_min int
    Minimum port number.
    protocol str
    Protocol.
    remote_group_id str
    Remote security group ID.
    remote_ip_prefix str
    Remote IP prefix.
    description String
    Description of the security group.
    direction String
    Direction of the rule.
    ethernetType String
    Ether type.
    id String
    Rule ID.
    portRangeMax Number
    Maximum port number.
    portRangeMin Number
    Minimum port number.
    protocol String
    Protocol.
    remoteGroupId String
    Remote security group ID.
    remoteIpPrefix String
    Remote IP prefix.

    CloudSecurityGroupRule, CloudSecurityGroupRuleArgs

    Direction string
    Direction of the rule (INGRESS or EGRESS).
    EthernetType string
    Ether type (IPV4 or IPV6).
    Description string

    Description of the rule.

    NOTE: When a security group is created, OpenStack automatically adds a default egress rule (allowing all outbound traffic). This default rule is not part of the managed rule set: it is never sent in your configuration and never appears under rule, so it will not show up as drift on subsequent plans. It is surfaced for information only under current_state.default_rules.

    PortRangeMax int
    Maximum port number.
    PortRangeMin int
    Minimum port number.
    Protocol string
    Protocol (TCP, UDP, ICMP, etc.).
    RemoteGroupId string
    Remote security group ID.
    RemoteIpPrefix string
    Remote IP prefix (CIDR notation).
    Direction string
    Direction of the rule (INGRESS or EGRESS).
    EthernetType string
    Ether type (IPV4 or IPV6).
    Description string

    Description of the rule.

    NOTE: When a security group is created, OpenStack automatically adds a default egress rule (allowing all outbound traffic). This default rule is not part of the managed rule set: it is never sent in your configuration and never appears under rule, so it will not show up as drift on subsequent plans. It is surfaced for information only under current_state.default_rules.

    PortRangeMax int
    Maximum port number.
    PortRangeMin int
    Minimum port number.
    Protocol string
    Protocol (TCP, UDP, ICMP, etc.).
    RemoteGroupId string
    Remote security group ID.
    RemoteIpPrefix string
    Remote IP prefix (CIDR notation).
    direction string
    Direction of the rule (INGRESS or EGRESS).
    ethernet_type string
    Ether type (IPV4 or IPV6).
    description string

    Description of the rule.

    NOTE: When a security group is created, OpenStack automatically adds a default egress rule (allowing all outbound traffic). This default rule is not part of the managed rule set: it is never sent in your configuration and never appears under rule, so it will not show up as drift on subsequent plans. It is surfaced for information only under current_state.default_rules.

    port_range_max number
    Maximum port number.
    port_range_min number
    Minimum port number.
    protocol string
    Protocol (TCP, UDP, ICMP, etc.).
    remote_group_id string
    Remote security group ID.
    remote_ip_prefix string
    Remote IP prefix (CIDR notation).
    direction String
    Direction of the rule (INGRESS or EGRESS).
    ethernetType String
    Ether type (IPV4 or IPV6).
    description String

    Description of the rule.

    NOTE: When a security group is created, OpenStack automatically adds a default egress rule (allowing all outbound traffic). This default rule is not part of the managed rule set: it is never sent in your configuration and never appears under rule, so it will not show up as drift on subsequent plans. It is surfaced for information only under current_state.default_rules.

    portRangeMax Integer
    Maximum port number.
    portRangeMin Integer
    Minimum port number.
    protocol String
    Protocol (TCP, UDP, ICMP, etc.).
    remoteGroupId String
    Remote security group ID.
    remoteIpPrefix String
    Remote IP prefix (CIDR notation).
    direction string
    Direction of the rule (INGRESS or EGRESS).
    ethernetType string
    Ether type (IPV4 or IPV6).
    description string

    Description of the rule.

    NOTE: When a security group is created, OpenStack automatically adds a default egress rule (allowing all outbound traffic). This default rule is not part of the managed rule set: it is never sent in your configuration and never appears under rule, so it will not show up as drift on subsequent plans. It is surfaced for information only under current_state.default_rules.

    portRangeMax number
    Maximum port number.
    portRangeMin number
    Minimum port number.
    protocol string
    Protocol (TCP, UDP, ICMP, etc.).
    remoteGroupId string
    Remote security group ID.
    remoteIpPrefix string
    Remote IP prefix (CIDR notation).
    direction str
    Direction of the rule (INGRESS or EGRESS).
    ethernet_type str
    Ether type (IPV4 or IPV6).
    description str

    Description of the rule.

    NOTE: When a security group is created, OpenStack automatically adds a default egress rule (allowing all outbound traffic). This default rule is not part of the managed rule set: it is never sent in your configuration and never appears under rule, so it will not show up as drift on subsequent plans. It is surfaced for information only under current_state.default_rules.

    port_range_max int
    Maximum port number.
    port_range_min int
    Minimum port number.
    protocol str
    Protocol (TCP, UDP, ICMP, etc.).
    remote_group_id str
    Remote security group ID.
    remote_ip_prefix str
    Remote IP prefix (CIDR notation).
    direction String
    Direction of the rule (INGRESS or EGRESS).
    ethernetType String
    Ether type (IPV4 or IPV6).
    description String

    Description of the rule.

    NOTE: When a security group is created, OpenStack automatically adds a default egress rule (allowing all outbound traffic). This default rule is not part of the managed rule set: it is never sent in your configuration and never appears under rule, so it will not show up as drift on subsequent plans. It is surfaced for information only under current_state.default_rules.

    portRangeMax Number
    Maximum port number.
    portRangeMin Number
    Minimum port number.
    protocol String
    Protocol (TCP, UDP, ICMP, etc.).
    remoteGroupId String
    Remote security group ID.
    remoteIpPrefix String
    Remote IP prefix (CIDR notation).

    Import

    A cloud security group can be imported using the service_name and security_group_id, separated by /:

    terraform

    import {

    to = ovh_cloud_security_group.sg

    id = “<service_name>/<security_group_id>”

    }

    bash

    $ pulumi import ovh:index/cloudSecurityGroup:CloudSecurityGroup sg service_name/security_group_id
    

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

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.17.0
    published on Friday, Jul 17, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial