Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
published on Tuesday, Mar 24, 2026 by g-core
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
published on Tuesday, Mar 24, 2026 by g-core
Security groups act as virtual firewalls controlling inbound and outbound traffic for instances and other resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const exampleCloudSecurityGroups = gcore.getCloudSecurityGroups({
projectId: 1,
regionId: 1,
name: "my_security_group",
tagKeys: [
"key1",
"key2",
],
tagKeyValue: "tag_key_value",
});
import pulumi
import pulumi_gcore as gcore
example_cloud_security_groups = gcore.get_cloud_security_groups(project_id=1,
region_id=1,
name="my_security_group",
tag_keys=[
"key1",
"key2",
],
tag_key_value="tag_key_value")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gcore.GetCloudSecurityGroups(ctx, &gcore.GetCloudSecurityGroupsArgs{
ProjectId: pulumi.Float64Ref(1),
RegionId: pulumi.Float64Ref(1),
Name: pulumi.StringRef("my_security_group"),
TagKeys: []string{
"key1",
"key2",
},
TagKeyValue: pulumi.StringRef("tag_key_value"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var exampleCloudSecurityGroups = Gcore.GetCloudSecurityGroups.Invoke(new()
{
ProjectId = 1,
RegionId = 1,
Name = "my_security_group",
TagKeys = new[]
{
"key1",
"key2",
},
TagKeyValue = "tag_key_value",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.GcoreFunctions;
import com.pulumi.gcore.inputs.GetCloudSecurityGroupsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleCloudSecurityGroups = GcoreFunctions.getCloudSecurityGroups(GetCloudSecurityGroupsArgs.builder()
.projectId(1)
.regionId(1)
.name("my_security_group")
.tagKeys(
"key1",
"key2")
.tagKeyValue("tag_key_value")
.build());
}
}
variables:
exampleCloudSecurityGroups:
fn::invoke:
function: gcore:getCloudSecurityGroups
arguments:
projectId: 1
regionId: 1
name: my_security_group
tagKeys:
- key1
- key2
tagKeyValue: tag_key_value
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(max_items: Optional[float] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
region_id: Optional[float] = None,
tag_key_value: Optional[str] = None,
tag_keys: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudSecurityGroupsResult
def get_cloud_security_groups_output(max_items: Optional[pulumi.Input[float]] = None,
name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[float]] = None,
region_id: Optional[pulumi.Input[float]] = None,
tag_key_value: Optional[pulumi.Input[str]] = None,
tag_keys: Optional[pulumi.Input[Sequence[pulumi.Input[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: gcore:index/getCloudSecurityGroups:getCloudSecurityGroups
arguments:
# arguments dictionaryThe following arguments are supported:
- Max
Items double - Max items to fetch, default: 1000
- Name string
- Optional. Filter by name. Must be specified a full name of the security group.
- Project
Id double - Project ID
- Region
Id double - Region ID
- Tag
Key stringValue - Optional. Filter by tag key-value pairs.
- Tag
Keys List<string> - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- Max
Items float64 - Max items to fetch, default: 1000
- Name string
- Optional. Filter by name. Must be specified a full name of the security group.
- Project
Id float64 - Project ID
- Region
Id float64 - Region ID
- Tag
Key stringValue - Optional. Filter by tag key-value pairs.
- Tag
Keys []string - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- max
Items Double - Max items to fetch, default: 1000
- name String
- Optional. Filter by name. Must be specified a full name of the security group.
- project
Id Double - Project ID
- region
Id Double - Region ID
- tag
Key StringValue - Optional. Filter by tag key-value pairs.
- tag
Keys List<String> - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- max
Items number - Max items to fetch, default: 1000
- name string
- Optional. Filter by name. Must be specified a full name of the security group.
- project
Id number - Project ID
- region
Id number - Region ID
- tag
Key stringValue - Optional. Filter by tag key-value pairs.
- tag
Keys string[] - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- max_
items float - Max items to fetch, default: 1000
- name str
- Optional. Filter by name. Must be specified a full name of the security group.
- project_
id float - Project ID
- region_
id float - Region ID
- tag_
key_ strvalue - Optional. Filter by tag key-value pairs.
- tag_
keys Sequence[str] - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- max
Items Number - Max items to fetch, default: 1000
- name String
- Optional. Filter by name. Must be specified a full name of the security group.
- project
Id Number - Project ID
- region
Id Number - Region ID
- tag
Key StringValue - Optional. Filter by tag key-value pairs.
- tag
Keys List<String> - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
getCloudSecurityGroups Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<Get
Cloud Security Groups Item> - The items returned by the data source
- Max
Items double - Max items to fetch, default: 1000
- Name string
- Optional. Filter by name. Must be specified a full name of the security group.
- Project
Id double - Project ID
- Region
Id double - Region ID
- Tag
Key stringValue - Optional. Filter by tag key-value pairs.
- Tag
Keys List<string> - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Get
Cloud Security Groups Item - The items returned by the data source
- Max
Items float64 - Max items to fetch, default: 1000
- Name string
- Optional. Filter by name. Must be specified a full name of the security group.
- Project
Id float64 - Project ID
- Region
Id float64 - Region ID
- Tag
Key stringValue - Optional. Filter by tag key-value pairs.
- Tag
Keys []string - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- id String
- The provider-assigned unique ID for this managed resource.
- items
List<Get
Cloud Security Groups Item> - The items returned by the data source
- max
Items Double - Max items to fetch, default: 1000
- name String
- Optional. Filter by name. Must be specified a full name of the security group.
- project
Id Double - Project ID
- region
Id Double - Region ID
- tag
Key StringValue - Optional. Filter by tag key-value pairs.
- tag
Keys List<String> - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- id string
- The provider-assigned unique ID for this managed resource.
- items
Get
Cloud Security Groups Item[] - The items returned by the data source
- max
Items number - Max items to fetch, default: 1000
- name string
- Optional. Filter by name. Must be specified a full name of the security group.
- project
Id number - Project ID
- region
Id number - Region ID
- tag
Key stringValue - Optional. Filter by tag key-value pairs.
- tag
Keys string[] - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[Get
Cloud Security Groups Item] - The items returned by the data source
- max_
items float - Max items to fetch, default: 1000
- name str
- Optional. Filter by name. Must be specified a full name of the security group.
- project_
id float - Project ID
- region_
id float - Region ID
- tag_
key_ strvalue - Optional. Filter by tag key-value pairs.
- tag_
keys Sequence[str] - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
- id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- The items returned by the data source
- max
Items Number - Max items to fetch, default: 1000
- name String
- Optional. Filter by name. Must be specified a full name of the security group.
- project
Id Number - Project ID
- region
Id Number - Region ID
- tag
Key StringValue - Optional. Filter by tag key-value pairs.
- tag
Keys List<String> - Optional. Filter by tag keys. ?
tag_key=key1&tag_key=key2
Supporting Types
GetCloudSecurityGroupsItem
- Created
At string - Datetime when the security group was created
- Description string
- Security group description
- Id string
- Security group ID
- Name string
- Security group name
- Project
Id double - Project ID
- Region string
- Region name
- Region
Id double - Region ID
- Revision
Number double - The number of revisions
- Security
Group List<GetRules Cloud Security Groups Item Security Group Rule> - Security group rules
-
List<Get
Cloud Security Groups Item Tags V2> - List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- Updated
At string - Datetime when the security group was last updated
- Created
At string - Datetime when the security group was created
- Description string
- Security group description
- Id string
- Security group ID
- Name string
- Security group name
- Project
Id float64 - Project ID
- Region string
- Region name
- Region
Id float64 - Region ID
- Revision
Number float64 - The number of revisions
- Security
Group []GetRules Cloud Security Groups Item Security Group Rule - Security group rules
-
[]Get
Cloud Security Groups Item Tags V2 - List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- Updated
At string - Datetime when the security group was last updated
- created
At String - Datetime when the security group was created
- description String
- Security group description
- id String
- Security group ID
- name String
- Security group name
- project
Id Double - Project ID
- region String
- Region name
- region
Id Double - Region ID
- revision
Number Double - The number of revisions
- security
Group List<GetRules Cloud Security Groups Item Security Group Rule> - Security group rules
-
List<Get
Cloud Security Groups Item Tags V2> - List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- updated
At String - Datetime when the security group was last updated
- created
At string - Datetime when the security group was created
- description string
- Security group description
- id string
- Security group ID
- name string
- Security group name
- project
Id number - Project ID
- region string
- Region name
- region
Id number - Region ID
- revision
Number number - The number of revisions
- security
Group GetRules Cloud Security Groups Item Security Group Rule[] - Security group rules
-
Get
Cloud Security Groups Item Tags V2[] - List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- updated
At string - Datetime when the security group was last updated
- created_
at str - Datetime when the security group was created
- description str
- Security group description
- id str
- Security group ID
- name str
- Security group name
- project_
id float - Project ID
- region str
- Region name
- region_
id float - Region ID
- revision_
number float - The number of revisions
- security_
group_ Sequence[Getrules Cloud Security Groups Item Security Group Rule] - Security group rules
-
Sequence[Get
Cloud Security Groups Item Tags V2] - List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- updated_
at str - Datetime when the security group was last updated
- created
At String - Datetime when the security group was created
- description String
- Security group description
- id String
- Security group ID
- name String
- Security group name
- project
Id Number - Project ID
- region String
- Region name
- region
Id Number - Region ID
- revision
Number Number - The number of revisions
- security
Group List<Property Map>Rules - Security group rules
- List<Property Map>
- List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
- updated
At String - Datetime when the security group was last updated
GetCloudSecurityGroupsItemSecurityGroupRule
- Created
At string - Datetime when the rule was created
- Description string
- Rule description
- Direction string
- Ingress or egress, which is the direction in which the security group rule is applied Available values: "egress", "ingress".
- Ethertype string
- Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules. Available values: "IPv4", "IPv6".
- Id string
- The ID of the security group rule
- Port
Range doubleMax - The maximum port number in the range that is matched by the security group rule
- Port
Range doubleMin - The minimum port number in the range that is matched by the security group rule
- Protocol string
- Protocol Available values: "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap", "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts", "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
- Remote
Group stringId - The remote group UUID to associate with this security group rule
- Remote
Ip stringPrefix - The remote IP prefix that is matched by this security group rule
- Revision
Number double - The revision number of the resource
- Security
Group stringId - The security group ID to associate with this security group rule
- Updated
At string - Datetime when the rule was last updated
- Created
At string - Datetime when the rule was created
- Description string
- Rule description
- Direction string
- Ingress or egress, which is the direction in which the security group rule is applied Available values: "egress", "ingress".
- Ethertype string
- Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules. Available values: "IPv4", "IPv6".
- Id string
- The ID of the security group rule
- Port
Range float64Max - The maximum port number in the range that is matched by the security group rule
- Port
Range float64Min - The minimum port number in the range that is matched by the security group rule
- Protocol string
- Protocol Available values: "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap", "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts", "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
- Remote
Group stringId - The remote group UUID to associate with this security group rule
- Remote
Ip stringPrefix - The remote IP prefix that is matched by this security group rule
- Revision
Number float64 - The revision number of the resource
- Security
Group stringId - The security group ID to associate with this security group rule
- Updated
At string - Datetime when the rule was last updated
- created
At String - Datetime when the rule was created
- description String
- Rule description
- direction String
- Ingress or egress, which is the direction in which the security group rule is applied Available values: "egress", "ingress".
- ethertype String
- Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules. Available values: "IPv4", "IPv6".
- id String
- The ID of the security group rule
- port
Range DoubleMax - The maximum port number in the range that is matched by the security group rule
- port
Range DoubleMin - The minimum port number in the range that is matched by the security group rule
- protocol String
- Protocol Available values: "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap", "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts", "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
- remote
Group StringId - The remote group UUID to associate with this security group rule
- remote
Ip StringPrefix - The remote IP prefix that is matched by this security group rule
- revision
Number Double - The revision number of the resource
- security
Group StringId - The security group ID to associate with this security group rule
- updated
At String - Datetime when the rule was last updated
- created
At string - Datetime when the rule was created
- description string
- Rule description
- direction string
- Ingress or egress, which is the direction in which the security group rule is applied Available values: "egress", "ingress".
- ethertype string
- Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules. Available values: "IPv4", "IPv6".
- id string
- The ID of the security group rule
- port
Range numberMax - The maximum port number in the range that is matched by the security group rule
- port
Range numberMin - The minimum port number in the range that is matched by the security group rule
- protocol string
- Protocol Available values: "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap", "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts", "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
- remote
Group stringId - The remote group UUID to associate with this security group rule
- remote
Ip stringPrefix - The remote IP prefix that is matched by this security group rule
- revision
Number number - The revision number of the resource
- security
Group stringId - The security group ID to associate with this security group rule
- updated
At string - Datetime when the rule was last updated
- created_
at str - Datetime when the rule was created
- description str
- Rule description
- direction str
- Ingress or egress, which is the direction in which the security group rule is applied Available values: "egress", "ingress".
- ethertype str
- Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules. Available values: "IPv4", "IPv6".
- id str
- The ID of the security group rule
- port_
range_ floatmax - The maximum port number in the range that is matched by the security group rule
- port_
range_ floatmin - The minimum port number in the range that is matched by the security group rule
- protocol str
- Protocol Available values: "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap", "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts", "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
- remote_
group_ strid - The remote group UUID to associate with this security group rule
- remote_
ip_ strprefix - The remote IP prefix that is matched by this security group rule
- revision_
number float - The revision number of the resource
- security_
group_ strid - The security group ID to associate with this security group rule
- updated_
at str - Datetime when the rule was last updated
- created
At String - Datetime when the rule was created
- description String
- Rule description
- direction String
- Ingress or egress, which is the direction in which the security group rule is applied Available values: "egress", "ingress".
- ethertype String
- Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules. Available values: "IPv4", "IPv6".
- id String
- The ID of the security group rule
- port
Range NumberMax - The maximum port number in the range that is matched by the security group rule
- port
Range NumberMin - The minimum port number in the range that is matched by the security group rule
- protocol String
- Protocol Available values: "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap", "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts", "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
- remote
Group StringId - The remote group UUID to associate with this security group rule
- remote
Ip StringPrefix - The remote IP prefix that is matched by this security group rule
- revision
Number Number - The revision number of the resource
- security
Group StringId - The security group ID to associate with this security group rule
- updated
At String - Datetime when the rule was last updated
GetCloudSecurityGroupsItemTagsV2
- Key string
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- Read
Only bool - If true, the tag is read-only and cannot be modified by the user
- Value string
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- Key string
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- Read
Only bool - If true, the tag is read-only and cannot be modified by the user
- Value string
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- key String
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- read
Only Boolean - If true, the tag is read-only and cannot be modified by the user
- value String
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- key string
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- read
Only boolean - If true, the tag is read-only and cannot be modified by the user
- value string
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- key str
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- read_
only bool - If true, the tag is read-only and cannot be modified by the user
- value str
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- key String
- Tag key. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
- read
Only Boolean - If true, the tag is read-only and cannot be modified by the user
- value String
- Tag value. Maximum 255 characters. Cannot contain spaces, tabs, newlines, empty string or '=' character.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcoreTerraform Provider.
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
published on Tuesday, Mar 24, 2026 by g-core
