published on Friday, Jul 17, 2026 by OVHcloud
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.
- 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<Cloud
Security Group Rule> - 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
[]Cloud
Security Group Rule Args - 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.
- 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<Cloud
Security Group Rule> - 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
Cloud
Security Group Rule[] - 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[Cloud
Security Group Rule Args] - 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<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.
- Created
At string - Creation date of the security group.
- Current
State CloudSecurity Group Current State - 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.
- Created
At string - Creation date of the security group.
- Current
State CloudSecurity Group Current State - 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.
- 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.
- created
At String - Creation date of the security group.
- current
State CloudSecurity Group Current State - 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.
- created
At string - Creation date of the security group.
- current
State CloudSecurity Group Current State - 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 str
- Computed hash representing the current target specification value.
- created_
at str - Creation date of the security group.
- current_
state CloudSecurity Group Current State - 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.
- created
At String - Creation date of the security group.
- current
State Property Map - 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.
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) -> CloudSecurityGroupfunc 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.
- Checksum string
- Computed hash representing the current target specification value.
- Created
At string - Creation date of the security group.
- Current
State CloudSecurity Group Current State - 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<Cloud
Security Group Rule> - 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.
- Created
At string - Creation date of the security group.
- Current
State CloudSecurity Group Current State Args - 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
[]Cloud
Security Group Rule Args - 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.
- 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.
- created
At String - Creation date of the security group.
- current
State CloudSecurity Group Current State - 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<Cloud
Security Group Rule> - 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.
- created
At string - Creation date of the security group.
- current
State CloudSecurity Group Current State - 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
Cloud
Security Group Rule[] - 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 str
- Computed hash representing the current target specification value.
- created_
at str - Creation date of the security group.
- current_
state CloudSecurity Group Current State Args - 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[Cloud
Security Group Rule Args] - 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.
- created
At String - Creation date of the security group.
- current
State 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.
- resource
Status 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:
- 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.
Supporting Types
CloudSecurityGroupCurrentState, CloudSecurityGroupCurrentStateArgs
- Default
Rules List<CloudSecurity Group Current State Default Rule> - Default egress rules auto-created by OpenStack (same schema as
rules). These are not part of the managedruleset and are exposed for information only. - Description string
- Description of the security group.
- Location
Cloud
Security Group Current State Location - Location details:
- Name string
- Name of the security group.
- Rules
List<Cloud
Security Group Current State Rule> - User-specified security group rules with their IDs:
- Default
Rules []CloudSecurity Group Current State Default Rule - Default egress rules auto-created by OpenStack (same schema as
rules). These are not part of the managedruleset and are exposed for information only. - Description string
- Description of the security group.
- Location
Cloud
Security Group Current State Location - Location details:
- Name string
- Name of the security group.
- Rules
[]Cloud
Security Group Current State Rule - 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 managedruleset 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:
- default
Rules List<CloudSecurity Group Current State Default Rule> - Default egress rules auto-created by OpenStack (same schema as
rules). These are not part of the managedruleset and are exposed for information only. - description String
- Description of the security group.
- location
Cloud
Security Group Current State Location - Location details:
- name String
- Name of the security group.
- rules
List<Cloud
Security Group Current State Rule> - User-specified security group rules with their IDs:
- default
Rules CloudSecurity Group Current State Default Rule[] - Default egress rules auto-created by OpenStack (same schema as
rules). These are not part of the managedruleset and are exposed for information only. - description string
- Description of the security group.
- location
Cloud
Security Group Current State Location - Location details:
- name string
- Name of the security group.
- rules
Cloud
Security Group Current State Rule[] - User-specified security group rules with their IDs:
- default_
rules Sequence[CloudSecurity Group Current State Default Rule] - Default egress rules auto-created by OpenStack (same schema as
rules). These are not part of the managedruleset and are exposed for information only. - description str
- Description of the security group.
- location
Cloud
Security Group Current State Location - Location details:
- name str
- Name of the security group.
- rules
Sequence[Cloud
Security Group Current State Rule] - User-specified security group rules with their IDs:
- default
Rules List<Property Map> - Default egress rules auto-created by OpenStack (same schema as
rules). These are not part of the managedruleset 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.
- Ethernet
Type string - Ether type.
- Id string
- Rule ID.
- Port
Range intMax - Maximum port number.
- Port
Range intMin - Minimum port number.
- Protocol string
- Protocol.
- Remote
Group stringId - Remote security group ID.
- Remote
Ip stringPrefix - 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 intMax - Maximum port number.
- Port
Range intMin - Minimum port number.
- Protocol string
- Protocol.
- Remote
Group stringId - Remote security group ID.
- Remote
Ip stringPrefix - 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_ numbermax - Maximum port number.
- port_
range_ numbermin - Minimum port number.
- protocol string
- Protocol.
- remote_
group_ stringid - Remote security group ID.
- remote_
ip_ stringprefix - 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 IntegerMax - Maximum port number.
- port
Range IntegerMin - Minimum port number.
- protocol String
- Protocol.
- remote
Group StringId - Remote security group ID.
- remote
Ip StringPrefix - 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 numberMax - Maximum port number.
- port
Range numberMin - Minimum port number.
- protocol string
- Protocol.
- remote
Group stringId - Remote security group ID.
- remote
Ip stringPrefix - 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_ intmax - Maximum port number.
- port_
range_ intmin - Minimum port number.
- protocol str
- Protocol.
- remote_
group_ strid - Remote security group ID.
- remote_
ip_ strprefix - 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 NumberMax - Maximum port number.
- port
Range NumberMin - Minimum port number.
- protocol String
- Protocol.
- remote
Group StringId - Remote security group ID.
- remote
Ip StringPrefix - 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.
- Ethernet
Type string - Ether type.
- Id string
- Rule ID.
- Port
Range intMax - Maximum port number.
- Port
Range intMin - Minimum port number.
- Protocol string
- Protocol.
- Remote
Group stringId - Remote security group ID.
- Remote
Ip stringPrefix - 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 intMax - Maximum port number.
- Port
Range intMin - Minimum port number.
- Protocol string
- Protocol.
- Remote
Group stringId - Remote security group ID.
- Remote
Ip stringPrefix - 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_ numbermax - Maximum port number.
- port_
range_ numbermin - Minimum port number.
- protocol string
- Protocol.
- remote_
group_ stringid - Remote security group ID.
- remote_
ip_ stringprefix - 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 IntegerMax - Maximum port number.
- port
Range IntegerMin - Minimum port number.
- protocol String
- Protocol.
- remote
Group StringId - Remote security group ID.
- remote
Ip StringPrefix - 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 numberMax - Maximum port number.
- port
Range numberMin - Minimum port number.
- protocol string
- Protocol.
- remote
Group stringId - Remote security group ID.
- remote
Ip stringPrefix - 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_ intmax - Maximum port number.
- port_
range_ intmin - Minimum port number.
- protocol str
- Protocol.
- remote_
group_ strid - Remote security group ID.
- remote_
ip_ strprefix - 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 NumberMax - Maximum port number.
- port
Range NumberMin - Minimum port number.
- protocol String
- Protocol.
- remote
Group StringId - Remote security group ID.
- remote
Ip StringPrefix - Remote IP prefix.
CloudSecurityGroupRule, CloudSecurityGroupRuleArgs
- Direction string
- Direction of the rule (
INGRESSorEGRESS). - Ethernet
Type string - Ether type (
IPV4orIPV6). - 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
ruleset: it is never sent in your configuration and never appears underrule, so it will not show up as drift on subsequent plans. It is surfaced for information only undercurrent_state.default_rules.- Port
Range intMax - Maximum port number.
- Port
Range intMin - Minimum port number.
- Protocol string
- Protocol (
TCP,UDP,ICMP, etc.). - Remote
Group stringId - Remote security group ID.
- Remote
Ip stringPrefix - Remote IP prefix (CIDR notation).
- Direction string
- Direction of the rule (
INGRESSorEGRESS). - Ethernet
Type string - Ether type (
IPV4orIPV6). - 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
ruleset: it is never sent in your configuration and never appears underrule, so it will not show up as drift on subsequent plans. It is surfaced for information only undercurrent_state.default_rules.- Port
Range intMax - Maximum port number.
- Port
Range intMin - Minimum port number.
- Protocol string
- Protocol (
TCP,UDP,ICMP, etc.). - Remote
Group stringId - Remote security group ID.
- Remote
Ip stringPrefix - Remote IP prefix (CIDR notation).
- direction string
- Direction of the rule (
INGRESSorEGRESS). - ethernet_
type string - Ether type (
IPV4orIPV6). - 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
ruleset: it is never sent in your configuration and never appears underrule, so it will not show up as drift on subsequent plans. It is surfaced for information only undercurrent_state.default_rules.- port_
range_ numbermax - Maximum port number.
- port_
range_ numbermin - Minimum port number.
- protocol string
- Protocol (
TCP,UDP,ICMP, etc.). - remote_
group_ stringid - Remote security group ID.
- remote_
ip_ stringprefix - Remote IP prefix (CIDR notation).
- direction String
- Direction of the rule (
INGRESSorEGRESS). - ethernet
Type String - Ether type (
IPV4orIPV6). - 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
ruleset: it is never sent in your configuration and never appears underrule, so it will not show up as drift on subsequent plans. It is surfaced for information only undercurrent_state.default_rules.- port
Range IntegerMax - Maximum port number.
- port
Range IntegerMin - Minimum port number.
- protocol String
- Protocol (
TCP,UDP,ICMP, etc.). - remote
Group StringId - Remote security group ID.
- remote
Ip StringPrefix - Remote IP prefix (CIDR notation).
- direction string
- Direction of the rule (
INGRESSorEGRESS). - ethernet
Type string - Ether type (
IPV4orIPV6). - 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
ruleset: it is never sent in your configuration and never appears underrule, so it will not show up as drift on subsequent plans. It is surfaced for information only undercurrent_state.default_rules.- port
Range numberMax - Maximum port number.
- port
Range numberMin - Minimum port number.
- protocol string
- Protocol (
TCP,UDP,ICMP, etc.). - remote
Group stringId - Remote security group ID.
- remote
Ip stringPrefix - Remote IP prefix (CIDR notation).
- direction str
- Direction of the rule (
INGRESSorEGRESS). - ethernet_
type str - Ether type (
IPV4orIPV6). - 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
ruleset: it is never sent in your configuration and never appears underrule, so it will not show up as drift on subsequent plans. It is surfaced for information only undercurrent_state.default_rules.- port_
range_ intmax - Maximum port number.
- port_
range_ intmin - Minimum port number.
- protocol str
- Protocol (
TCP,UDP,ICMP, etc.). - remote_
group_ strid - Remote security group ID.
- remote_
ip_ strprefix - Remote IP prefix (CIDR notation).
- direction String
- Direction of the rule (
INGRESSorEGRESS). - ethernet
Type String - Ether type (
IPV4orIPV6). - 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
ruleset: it is never sent in your configuration and never appears underrule, so it will not show up as drift on subsequent plans. It is surfaced for information only undercurrent_state.default_rules.- port
Range NumberMax - Maximum port number.
- port
Range NumberMin - Minimum port number.
- protocol String
- Protocol (
TCP,UDP,ICMP, etc.). - remote
Group StringId - Remote security group ID.
- remote
Ip StringPrefix - 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
ovhTerraform Provider.
published on Friday, Jul 17, 2026 by OVHcloud