edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center
edgecenter.getSecuritygroup
Explore with Pulumi AI
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center
Represent SecurityGroups(Firewall)
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";
const pr = edgecenter.getProject({
    name: "test",
});
const rg = edgecenter.getRegion({
    name: "ED-10 Preprod",
});
const _default = Promise.all([rg, pr]).then(([rg, pr]) => edgecenter.getSecuritygroup({
    name: "default",
    regionId: rg.id,
    projectId: pr.id,
}));
export const view = _default;
import pulumi
import pulumi_edgecenter as edgecenter
pr = edgecenter.get_project(name="test")
rg = edgecenter.get_region(name="ED-10 Preprod")
default = edgecenter.get_securitygroup(name="default",
    region_id=rg.id,
    project_id=pr.id)
pulumi.export("view", default)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		pr, err := edgecenter.LookupProject(ctx, &edgecenter.LookupProjectArgs{
			Name: pulumi.StringRef("test"),
		}, nil)
		if err != nil {
			return err
		}
		rg, err := edgecenter.GetRegion(ctx, &edgecenter.GetRegionArgs{
			Name: "ED-10 Preprod",
		}, nil)
		if err != nil {
			return err
		}
		_default, err := edgecenter.LookupSecuritygroup(ctx, &edgecenter.LookupSecuritygroupArgs{
			Name:      "default",
			RegionId:  pulumi.Float64Ref(rg.Id),
			ProjectId: pulumi.Float64Ref(pr.Id),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("view", _default)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;
return await Deployment.RunAsync(() => 
{
    var pr = Edgecenter.GetProject.Invoke(new()
    {
        Name = "test",
    });
    var rg = Edgecenter.GetRegion.Invoke(new()
    {
        Name = "ED-10 Preprod",
    });
    var @default = Edgecenter.GetSecuritygroup.Invoke(new()
    {
        Name = "default",
        RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
        ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
    });
    return new Dictionary<string, object?>
    {
        ["view"] = @default,
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.EdgecenterFunctions;
import com.pulumi.edgecenter.inputs.GetProjectArgs;
import com.pulumi.edgecenter.inputs.GetRegionArgs;
import com.pulumi.edgecenter.inputs.GetSecuritygroupArgs;
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 pr = EdgecenterFunctions.getProject(GetProjectArgs.builder()
            .name("test")
            .build());
        final var rg = EdgecenterFunctions.getRegion(GetRegionArgs.builder()
            .name("ED-10 Preprod")
            .build());
        final var default = EdgecenterFunctions.getSecuritygroup(GetSecuritygroupArgs.builder()
            .name("default")
            .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
            .projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
            .build());
        ctx.export("view", default_);
    }
}
variables:
  pr:
    fn::invoke:
      function: edgecenter:getProject
      arguments:
        name: test
  rg:
    fn::invoke:
      function: edgecenter:getRegion
      arguments:
        name: ED-10 Preprod
  default:
    fn::invoke:
      function: edgecenter:getSecuritygroup
      arguments:
        name: default
        regionId: ${rg.id}
        projectId: ${pr.id}
outputs:
  view: ${default}
Using getSecuritygroup
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 getSecuritygroup(args: GetSecuritygroupArgs, opts?: InvokeOptions): Promise<GetSecuritygroupResult>
function getSecuritygroupOutput(args: GetSecuritygroupOutputArgs, opts?: InvokeOptions): Output<GetSecuritygroupResult>def get_securitygroup(id: Optional[str] = None,
                      metadata_k: Optional[str] = None,
                      metadata_kv: Optional[Mapping[str, str]] = None,
                      name: Optional[str] = None,
                      project_id: Optional[float] = None,
                      project_name: Optional[str] = None,
                      region_id: Optional[float] = None,
                      region_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetSecuritygroupResult
def get_securitygroup_output(id: Optional[pulumi.Input[str]] = None,
                      metadata_k: Optional[pulumi.Input[str]] = None,
                      metadata_kv: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      project_id: Optional[pulumi.Input[float]] = None,
                      project_name: Optional[pulumi.Input[str]] = None,
                      region_id: Optional[pulumi.Input[float]] = None,
                      region_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetSecuritygroupResult]func LookupSecuritygroup(ctx *Context, args *LookupSecuritygroupArgs, opts ...InvokeOption) (*LookupSecuritygroupResult, error)
func LookupSecuritygroupOutput(ctx *Context, args *LookupSecuritygroupOutputArgs, opts ...InvokeOption) LookupSecuritygroupResultOutput> Note: This function is named LookupSecuritygroup in the Go SDK.
public static class GetSecuritygroup 
{
    public static Task<GetSecuritygroupResult> InvokeAsync(GetSecuritygroupArgs args, InvokeOptions? opts = null)
    public static Output<GetSecuritygroupResult> Invoke(GetSecuritygroupInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSecuritygroupResult> getSecuritygroup(GetSecuritygroupArgs args, InvokeOptions options)
public static Output<GetSecuritygroupResult> getSecuritygroup(GetSecuritygroupArgs args, InvokeOptions options)
fn::invoke:
  function: edgecenter:index/getSecuritygroup:getSecuritygroup
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the security group.
- Id string
- The ID of this resource.
- MetadataK string
- Filtration query opts (only key).
- MetadataKv Dictionary<string, string>
- Filtration query opts, for example, {offset = "10", limit = "10"}
- ProjectId double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- Name string
- The name of the security group.
- Id string
- The ID of this resource.
- MetadataK string
- Filtration query opts (only key).
- MetadataKv map[string]string
- Filtration query opts, for example, {offset = "10", limit = "10"}
- ProjectId float64
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId float64
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- name String
- The name of the security group.
- id String
- The ID of this resource.
- metadataK String
- Filtration query opts (only key).
- metadataKv Map<String,String>
- Filtration query opts, for example, {offset = "10", limit = "10"}
- projectId Double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- name string
- The name of the security group.
- id string
- The ID of this resource.
- metadataK string
- Filtration query opts (only key).
- metadataKv {[key: string]: string}
- Filtration query opts, for example, {offset = "10", limit = "10"}
- projectId number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- name str
- The name of the security group.
- id str
- The ID of this resource.
- metadata_k str
- Filtration query opts (only key).
- metadata_kv Mapping[str, str]
- Filtration query opts, for example, {offset = "10", limit = "10"}
- project_id float
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_name str
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- region_id float
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region_name str
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- name String
- The name of the security group.
- id String
- The ID of this resource.
- metadataK String
- Filtration query opts (only key).
- metadataKv Map<String>
- Filtration query opts, for example, {offset = "10", limit = "10"}
- projectId Number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
getSecuritygroup Result
The following output properties are available:
- Description string
- A detailed description of the security group.
- Id string
- The ID of this resource.
- MetadataRead List<GetOnlies Securitygroup Metadata Read Only> 
- A list of read-only metadata items, e.g. tags.
- Name string
- The name of the security group.
- SecurityGroup List<GetRules Securitygroup Security Group Rule> 
- Firewall rules control what inbound(ingress) and outbound(egress) traffic is allowed to enter or leave a Instance. At least one 'egress' rule should be set
- MetadataK string
- Filtration query opts (only key).
- MetadataKv Dictionary<string, string>
- Filtration query opts, for example, {offset = "10", limit = "10"}
- ProjectId double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- Description string
- A detailed description of the security group.
- Id string
- The ID of this resource.
- MetadataRead []GetOnlies Securitygroup Metadata Read Only 
- A list of read-only metadata items, e.g. tags.
- Name string
- The name of the security group.
- SecurityGroup []GetRules Securitygroup Security Group Rule 
- Firewall rules control what inbound(ingress) and outbound(egress) traffic is allowed to enter or leave a Instance. At least one 'egress' rule should be set
- MetadataK string
- Filtration query opts (only key).
- MetadataKv map[string]string
- Filtration query opts, for example, {offset = "10", limit = "10"}
- ProjectId float64
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId float64
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- description String
- A detailed description of the security group.
- id String
- The ID of this resource.
- metadataRead List<GetOnlies Securitygroup Metadata Read Only> 
- A list of read-only metadata items, e.g. tags.
- name String
- The name of the security group.
- securityGroup List<GetRules Securitygroup Security Group Rule> 
- Firewall rules control what inbound(ingress) and outbound(egress) traffic is allowed to enter or leave a Instance. At least one 'egress' rule should be set
- metadataK String
- Filtration query opts (only key).
- metadataKv Map<String,String>
- Filtration query opts, for example, {offset = "10", limit = "10"}
- projectId Double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- description string
- A detailed description of the security group.
- id string
- The ID of this resource.
- metadataRead GetOnlies Securitygroup Metadata Read Only[] 
- A list of read-only metadata items, e.g. tags.
- name string
- The name of the security group.
- securityGroup GetRules Securitygroup Security Group Rule[] 
- Firewall rules control what inbound(ingress) and outbound(egress) traffic is allowed to enter or leave a Instance. At least one 'egress' rule should be set
- metadataK string
- Filtration query opts (only key).
- metadataKv {[key: string]: string}
- Filtration query opts, for example, {offset = "10", limit = "10"}
- projectId number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- description str
- A detailed description of the security group.
- id str
- The ID of this resource.
- metadata_read_ Sequence[Getonlies Securitygroup Metadata Read Only] 
- A list of read-only metadata items, e.g. tags.
- name str
- The name of the security group.
- security_group_ Sequence[Getrules Securitygroup Security Group Rule] 
- Firewall rules control what inbound(ingress) and outbound(egress) traffic is allowed to enter or leave a Instance. At least one 'egress' rule should be set
- metadata_k str
- Filtration query opts (only key).
- metadata_kv Mapping[str, str]
- Filtration query opts, for example, {offset = "10", limit = "10"}
- project_id float
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_name str
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- region_id float
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region_name str
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- description String
- A detailed description of the security group.
- id String
- The ID of this resource.
- metadataRead List<Property Map>Onlies 
- A list of read-only metadata items, e.g. tags.
- name String
- The name of the security group.
- securityGroup List<Property Map>Rules 
- Firewall rules control what inbound(ingress) and outbound(egress) traffic is allowed to enter or leave a Instance. At least one 'egress' rule should be set
- metadataK String
- Filtration query opts (only key).
- metadataKv Map<String>
- Filtration query opts, for example, {offset = "10", limit = "10"}
- projectId Number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
Supporting Types
GetSecuritygroupMetadataReadOnly    
GetSecuritygroupSecurityGroupRule    
- CreatedAt string
- Description string
- Direction string
- Ethertype string
- Id string
- PortRange doubleMax 
- PortRange doubleMin 
- Protocol string
- RemoteIp stringPrefix 
- UpdatedAt string
- CreatedAt string
- Description string
- Direction string
- Ethertype string
- Id string
- PortRange float64Max 
- PortRange float64Min 
- Protocol string
- RemoteIp stringPrefix 
- UpdatedAt string
- createdAt String
- description String
- direction String
- ethertype String
- id String
- portRange DoubleMax 
- portRange DoubleMin 
- protocol String
- remoteIp StringPrefix 
- updatedAt String
- createdAt string
- description string
- direction string
- ethertype string
- id string
- portRange numberMax 
- portRange numberMin 
- protocol string
- remoteIp stringPrefix 
- updatedAt string
- created_at str
- description str
- direction str
- ethertype str
- id str
- port_range_ floatmax 
- port_range_ floatmin 
- protocol str
- remote_ip_ strprefix 
- updated_at str
- createdAt String
- description String
- direction String
- ethertype String
- id String
- portRange NumberMax 
- portRange NumberMin 
- protocol String
- remoteIp StringPrefix 
- updatedAt String
Package Details
- Repository
- edgecenter edge-center/terraform-provider-edgecenter
- License
- Notes
- This Pulumi package is based on the edgecenterTerraform Provider.
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center