Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
published on Friday, Jul 17, 2026 by OVHcloud
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
published on Friday, Jul 17, 2026 by OVHcloud
Use this data source to list the security groups of a public cloud project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const securityGroups = ovh.getCloudSecurityGroups({
serviceName: "<public cloud project ID>",
});
export const securityGroupNames = securityGroups.then(securityGroups => .map(sg => (sg.name)));
import pulumi
import pulumi_ovh as ovh
security_groups = ovh.get_cloud_security_groups(service_name="<public cloud project ID>")
pulumi.export("securityGroupNames", [sg.name for sg in security_groups.security_groups])
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var securityGroups = Ovh.GetCloudSecurityGroups.Invoke(new()
{
ServiceName = "<public cloud project ID>",
});
return new Dictionary<string, object?>
{
["securityGroupNames"] = .Select(sg =>
{
return sg.Name;
}).ToList(),
};
});
Example coming soon!
Example coming soon!
Example coming soon!
Using getCloudSecurityGroups
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCloudSecurityGroups(args: GetCloudSecurityGroupsArgs, opts?: InvokeOptions): Promise<GetCloudSecurityGroupsResult>
function getCloudSecurityGroupsOutput(args: GetCloudSecurityGroupsOutputArgs, opts?: InvokeOptions): Output<GetCloudSecurityGroupsResult>def get_cloud_security_groups(service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudSecurityGroupsResult
def get_cloud_security_groups_output(service_name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudSecurityGroupsResult]func GetCloudSecurityGroups(ctx *Context, args *GetCloudSecurityGroupsArgs, opts ...InvokeOption) (*GetCloudSecurityGroupsResult, error)
func GetCloudSecurityGroupsOutput(ctx *Context, args *GetCloudSecurityGroupsOutputArgs, opts ...InvokeOption) GetCloudSecurityGroupsResultOutput> Note: This function is named GetCloudSecurityGroups in the Go SDK.
public static class GetCloudSecurityGroups
{
public static Task<GetCloudSecurityGroupsResult> InvokeAsync(GetCloudSecurityGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetCloudSecurityGroupsResult> Invoke(GetCloudSecurityGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCloudSecurityGroupsResult> getCloudSecurityGroups(GetCloudSecurityGroupsArgs args, InvokeOptions options)
public static Output<GetCloudSecurityGroupsResult> getCloudSecurityGroups(GetCloudSecurityGroupsArgs args, InvokeOptions options)
fn::invoke:
function: ovh:index/getCloudSecurityGroups:getCloudSecurityGroups
arguments:
# arguments dictionarydata "ovh_get_cloud_security_groups" "name" {
# arguments
}The following arguments are supported:
- Service
Name string - Service name of the resource representing the id of the cloud project.
- Service
Name string - Service name of the resource representing the id of the cloud project.
- service_
name string - Service name of the resource representing the id of the cloud project.
- service
Name String - Service name of the resource representing the id of the cloud project.
- service
Name string - Service name of the resource representing the id of the cloud project.
- service_
name str - Service name of the resource representing the id of the cloud project.
- service
Name String - Service name of the resource representing the id of the cloud project.
getCloudSecurityGroups Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Security
Groups List<GetCloud Security Groups Security Group> - List of security groups. Each element exports:
- Service
Name string
- Id string
- The provider-assigned unique ID for this managed resource.
- Security
Groups []GetCloud Security Groups Security Group - List of security groups. Each element exports:
- Service
Name string
- id string
- The provider-assigned unique ID for this managed resource.
- security_
groups list(object) - List of security groups. Each element exports:
- service_
name string
- id String
- The provider-assigned unique ID for this managed resource.
- security
Groups List<GetCloud Security Groups Security Group> - List of security groups. Each element exports:
- service
Name String
- id string
- The provider-assigned unique ID for this managed resource.
- security
Groups GetCloud Security Groups Security Group[] - List of security groups. Each element exports:
- service
Name string
- id str
- The provider-assigned unique ID for this managed resource.
- security_
groups Sequence[GetCloud Security Groups Security Group] - List of security groups. Each element exports:
- service_
name str
- id String
- The provider-assigned unique ID for this managed resource.
- security
Groups List<Property Map> - List of security groups. Each element exports:
- service
Name String
Supporting Types
GetCloudSecurityGroupsSecurityGroup
- Checksum string
- Computed hash representing the current target specification value.
- Created
At string - Creation date of the security group.
- Current
State GetCloud Security Groups Security Group Current State - Current state of the security group:
- Description string
- Description of the rule.
- Id string
- Rule ID.
- Location
Get
Cloud Security Groups Security Group Location - Location details:
- Name string
- Name of the security group.
- Resource
Status string - Security group readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Rules
List<Get
Cloud Security Groups Security Group Rule> - List of security group rules:
- 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 GetCloud Security Groups Security Group Current State - Current state of the security group:
- Description string
- Description of the rule.
- Id string
- Rule ID.
- Location
Get
Cloud Security Groups Security Group Location - Location details:
- Name string
- Name of the security group.
- Resource
Status string - Security group readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Rules
[]Get
Cloud Security Groups Security Group Rule - List of security group rules:
- 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 rule.
- id string
- Rule ID.
- location object
- Location details:
- name string
- Name of the security group.
- 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:
- 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 GetCloud Security Groups Security Group Current State - Current state of the security group:
- description String
- Description of the rule.
- id String
- Rule ID.
- location
Get
Cloud Security Groups Security Group Location - Location details:
- name String
- Name of the security group.
- resource
Status String - Security group readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - rules
List<Get
Cloud Security Groups Security Group Rule> - List of security group rules:
- 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 GetCloud Security Groups Security Group Current State - Current state of the security group:
- description string
- Description of the rule.
- id string
- Rule ID.
- location
Get
Cloud Security Groups Security Group Location - Location details:
- name string
- Name of the security group.
- resource
Status string - Security group readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - rules
Get
Cloud Security Groups Security Group Rule[] - List of security group rules:
- 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 GetCloud Security Groups Security Group Current State - Current state of the security group:
- description str
- Description of the rule.
- id str
- Rule ID.
- location
Get
Cloud Security Groups Security Group Location - Location details:
- name str
- Name of the security group.
- resource_
status str - Security group readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - rules
Sequence[Get
Cloud Security Groups Security Group Rule] - List of security group rules:
- 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 rule.
- id String
- Rule ID.
- location Property Map
- Location details:
- name String
- Name of the security group.
- 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:
- updated
At String - Last update date of the security group.
GetCloudSecurityGroupsSecurityGroupCurrentState
- Default
Rules List<GetCloud Security Groups Security Group Current State Default Rule> - Default egress rules auto-created by OpenStack (same schema as
rules). - Description string
- Description of the rule.
- Location
Get
Cloud Security Groups Security Group Current State Location - Location details:
- Name string
- Name of the security group.
- Rules
List<Get
Cloud Security Groups Security Group Current State Rule> - User-specified security group rules with their IDs:
- Default
Rules []GetCloud Security Groups Security Group Current State Default Rule - Default egress rules auto-created by OpenStack (same schema as
rules). - Description string
- Description of the rule.
- Location
Get
Cloud Security Groups Security Group Current State Location - Location details:
- Name string
- Name of the security group.
- Rules
[]Get
Cloud Security Groups 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). - description string
- Description of the rule.
- 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<GetCloud Security Groups Security Group Current State Default Rule> - Default egress rules auto-created by OpenStack (same schema as
rules). - description String
- Description of the rule.
- location
Get
Cloud Security Groups Security Group Current State Location - Location details:
- name String
- Name of the security group.
- rules
List<Get
Cloud Security Groups Security Group Current State Rule> - User-specified security group rules with their IDs:
- default
Rules GetCloud Security Groups Security Group Current State Default Rule[] - Default egress rules auto-created by OpenStack (same schema as
rules). - description string
- Description of the rule.
- location
Get
Cloud Security Groups Security Group Current State Location - Location details:
- name string
- Name of the security group.
- rules
Get
Cloud Security Groups Security Group Current State Rule[] - User-specified security group rules with their IDs:
- default_
rules Sequence[GetCloud Security Groups Security Group Current State Default Rule] - Default egress rules auto-created by OpenStack (same schema as
rules). - description str
- Description of the rule.
- location
Get
Cloud Security Groups Security Group Current State Location - Location details:
- name str
- Name of the security group.
- rules
Sequence[Get
Cloud Security Groups 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). - description String
- Description of the rule.
- location Property Map
- Location details:
- name String
- Name of the security group.
- rules List<Property Map>
- User-specified security group rules with their IDs:
GetCloudSecurityGroupsSecurityGroupCurrentStateDefaultRule
- Description string
- Description of the rule.
- Direction string
- Direction of the rule.
- Ethernet
Type string - Ethernet 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 rule.
- Direction string
- Direction of the rule.
- Ethernet
Type string - Ethernet 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 rule.
- direction string
- Direction of the rule.
- ethernet_
type string - Ethernet 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 rule.
- direction String
- Direction of the rule.
- ethernet
Type String - Ethernet 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 rule.
- direction string
- Direction of the rule.
- ethernet
Type string - Ethernet 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 rule.
- direction str
- Direction of the rule.
- ethernet_
type str - Ethernet 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 rule.
- direction String
- Direction of the rule.
- ethernet
Type String - Ethernet 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.
GetCloudSecurityGroupsSecurityGroupCurrentStateLocation
- Region string
- Region.
- Region string
- Region.
- region string
- Region.
- region String
- Region.
- region string
- Region.
- region str
- Region.
- region String
- Region.
GetCloudSecurityGroupsSecurityGroupCurrentStateRule
- Description string
- Description of the rule.
- Direction string
- Direction of the rule.
- Ethernet
Type string - Ethernet 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 rule.
- Direction string
- Direction of the rule.
- Ethernet
Type string - Ethernet 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 rule.
- direction string
- Direction of the rule.
- ethernet_
type string - Ethernet 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 rule.
- direction String
- Direction of the rule.
- ethernet
Type String - Ethernet 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 rule.
- direction string
- Direction of the rule.
- ethernet
Type string - Ethernet 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 rule.
- direction str
- Direction of the rule.
- ethernet_
type str - Ethernet 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 rule.
- direction String
- Direction of the rule.
- ethernet
Type String - Ethernet 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.
GetCloudSecurityGroupsSecurityGroupLocation
- Region string
- Region.
- Region string
- Region.
- region string
- Region.
- region String
- Region.
- region string
- Region.
- region str
- Region.
- region String
- Region.
GetCloudSecurityGroupsSecurityGroupRule
- Description string
- Description of the rule.
- Direction string
- Direction of the rule.
- Ethernet
Type string - Ethernet type.
- 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 rule.
- Direction string
- Direction of the rule.
- Ethernet
Type string - Ethernet type.
- 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 rule.
- direction string
- Direction of the rule.
- ethernet_
type string - Ethernet type.
- 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 rule.
- direction String
- Direction of the rule.
- ethernet
Type String - Ethernet type.
- 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 rule.
- direction string
- Direction of the rule.
- ethernet
Type string - Ethernet type.
- 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 rule.
- direction str
- Direction of the rule.
- ethernet_
type str - Ethernet type.
- 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 rule.
- direction String
- Direction of the rule.
- ethernet
Type String - Ethernet type.
- 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.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovhTerraform Provider.
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
published on Friday, Jul 17, 2026 by OVHcloud