GetSecGroup
Use this data source to get the ID of an available OpenStack security group.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var secgroup = Output.Create(OpenStack.Networking.GetSecGroup.InvokeAsync(new OpenStack.Networking.GetSecGroupArgs
{
Name = "tf_test_secgroup",
}));
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
secgroup = openstack.networking.get_sec_group(name="tf_test_secgroup")import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const secgroup = pulumi.output(openstack.networking.getSecGroup({
name: "tf_test_secgroup",
}, { async: true }));Using GetSecGroup
function getSecGroup(args: GetSecGroupArgs, opts?: InvokeOptions): Promise<GetSecGroupResult>function get_sec_group(description=None, name=None, region=None, secgroup_id=None, tags=None, tenant_id=None, opts=None)func LookupSecGroup(ctx *Context, args *LookupSecGroupArgs, opts ...InvokeOption) (*LookupSecGroupResult, error)Note: This function is named
LookupSecGroupin the Go SDK.
public static class GetSecGroup {
public static Task<GetSecGroupResult> InvokeAsync(GetSecGroupArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Description string
Human-readable description the the subnet.
- Name string
The name of the security group.
- Region string
The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve security groups ids. If omitted, the
regionargument of the provider is used.- Secgroup
Id string The ID of the security group.
- List<string>
The list of security group tags to filter.
- Tenant
Id string The owner of the security group.
- Description string
Human-readable description the the subnet.
- Name string
The name of the security group.
- Region string
The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve security groups ids. If omitted, the
regionargument of the provider is used.- Secgroup
Id string The ID of the security group.
- []string
The list of security group tags to filter.
- Tenant
Id string The owner of the security group.
- description string
Human-readable description the the subnet.
- name string
The name of the security group.
- region string
The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve security groups ids. If omitted, the
regionargument of the provider is used.- secgroup
Id string The ID of the security group.
- string[]
The list of security group tags to filter.
- tenant
Id string The owner of the security group.
- description str
Human-readable description the the subnet.
- name str
The name of the security group.
- region str
The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve security groups ids. If omitted, the
regionargument of the provider is used.- secgroup_
id str The ID of the security group.
- List[str]
The list of security group tags to filter.
- tenant_
id str The owner of the security group.
GetSecGroup Result
The following output properties are available:
- List<string>
The set of string tags applied on the security group.
- Id string
The provider-assigned unique ID for this managed resource.
- Region string
See Argument Reference above.
- Tenant
Id string - Description string
- Name string
See Argument Reference above. *
description- See Argument Reference above.- Secgroup
Id string - List<string>
- []string
The set of string tags applied on the security group.
- Id string
The provider-assigned unique ID for this managed resource.
- Region string
See Argument Reference above.
- Tenant
Id string - Description string
- Name string
See Argument Reference above. *
description- See Argument Reference above.- Secgroup
Id string - []string
- string[]
The set of string tags applied on the security group.
- id string
The provider-assigned unique ID for this managed resource.
- region string
See Argument Reference above.
- tenant
Id string - description string
- name string
See Argument Reference above. *
description- See Argument Reference above.- secgroup
Id string - string[]
- List[str]
The set of string tags applied on the security group.
- id str
The provider-assigned unique ID for this managed resource.
- region str
See Argument Reference above.
- tenant_
id str - description str
- name str
See Argument Reference above. *
description- See Argument Reference above.- secgroup_
id str - List[str]
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.