1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsSecurityGroup
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIsSecurityGroup

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieve information about a security group as a read-only data source. For more information, about managing IBM Cloud security group , see about security group.

    Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

    provider.tf

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Using getIsSecurityGroup

    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 getIsSecurityGroup(args: GetIsSecurityGroupArgs, opts?: InvokeOptions): Promise<GetIsSecurityGroupResult>
    function getIsSecurityGroupOutput(args: GetIsSecurityGroupOutputArgs, opts?: InvokeOptions): Output<GetIsSecurityGroupResult>
    def get_is_security_group(id: Optional[str] = None,
                              name: Optional[str] = None,
                              resource_group: Optional[str] = None,
                              vpc: Optional[str] = None,
                              vpc_name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetIsSecurityGroupResult
    def get_is_security_group_output(id: Optional[pulumi.Input[str]] = None,
                              name: Optional[pulumi.Input[str]] = None,
                              resource_group: Optional[pulumi.Input[str]] = None,
                              vpc: Optional[pulumi.Input[str]] = None,
                              vpc_name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetIsSecurityGroupResult]
    func LookupIsSecurityGroup(ctx *Context, args *LookupIsSecurityGroupArgs, opts ...InvokeOption) (*LookupIsSecurityGroupResult, error)
    func LookupIsSecurityGroupOutput(ctx *Context, args *LookupIsSecurityGroupOutputArgs, opts ...InvokeOption) LookupIsSecurityGroupResultOutput

    > Note: This function is named LookupIsSecurityGroup in the Go SDK.

    public static class GetIsSecurityGroup 
    {
        public static Task<GetIsSecurityGroupResult> InvokeAsync(GetIsSecurityGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetIsSecurityGroupResult> Invoke(GetIsSecurityGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsSecurityGroupResult> getIsSecurityGroup(GetIsSecurityGroupArgs args, InvokeOptions options)
    public static Output<GetIsSecurityGroupResult> getIsSecurityGroup(GetIsSecurityGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsSecurityGroup:getIsSecurityGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the security group.
    Id string
    (String) The ID of the security group.
    ResourceGroup string
    The identifier of the resource group where this security group resides.
    Vpc string
    The identifier of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    VpcName string
    The name of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    Name string
    The name of the security group.
    Id string
    (String) The ID of the security group.
    ResourceGroup string
    The identifier of the resource group where this security group resides.
    Vpc string
    The identifier of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    VpcName string
    The name of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    name String
    The name of the security group.
    id String
    (String) The ID of the security group.
    resourceGroup String
    The identifier of the resource group where this security group resides.
    vpc String
    The identifier of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    vpcName String
    The name of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    name string
    The name of the security group.
    id string
    (String) The ID of the security group.
    resourceGroup string
    The identifier of the resource group where this security group resides.
    vpc string
    The identifier of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    vpcName string
    The name of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    name str
    The name of the security group.
    id str
    (String) The ID of the security group.
    resource_group str
    The identifier of the resource group where this security group resides.
    vpc str
    The identifier of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    vpc_name str
    The name of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    name String
    The name of the security group.
    id String
    (String) The ID of the security group.
    resourceGroup String
    The identifier of the resource group where this security group resides.
    vpc String
    The identifier of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)
    vpcName String
    The name of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs)

    getIsSecurityGroup Result

    The following output properties are available:

    AccessTags List<string>
    (List) Access management tags associated for the security group.
    Crn string
    The CRN of the security group.
    Id string
    (String) The ID of the security group.
    Name string
    ResourceControllerUrl string
    ResourceCrn string
    ResourceGroup string
    ResourceGroupName string
    ResourceName string
    Rules List<GetIsSecurityGroupRule>
    (List of Objects) The rules associated with security group. Each rule has following attributes.
    Tags List<string>
    Tags associated with the security group.
    Vpc string
    VpcName string
    AccessTags []string
    (List) Access management tags associated for the security group.
    Crn string
    The CRN of the security group.
    Id string
    (String) The ID of the security group.
    Name string
    ResourceControllerUrl string
    ResourceCrn string
    ResourceGroup string
    ResourceGroupName string
    ResourceName string
    Rules []GetIsSecurityGroupRuleType
    (List of Objects) The rules associated with security group. Each rule has following attributes.
    Tags []string
    Tags associated with the security group.
    Vpc string
    VpcName string
    accessTags List<String>
    (List) Access management tags associated for the security group.
    crn String
    The CRN of the security group.
    id String
    (String) The ID of the security group.
    name String
    resourceControllerUrl String
    resourceCrn String
    resourceGroup String
    resourceGroupName String
    resourceName String
    rules List<GetIsSecurityGroupRule>
    (List of Objects) The rules associated with security group. Each rule has following attributes.
    tags List<String>
    Tags associated with the security group.
    vpc String
    vpcName String
    accessTags string[]
    (List) Access management tags associated for the security group.
    crn string
    The CRN of the security group.
    id string
    (String) The ID of the security group.
    name string
    resourceControllerUrl string
    resourceCrn string
    resourceGroup string
    resourceGroupName string
    resourceName string
    rules GetIsSecurityGroupRule[]
    (List of Objects) The rules associated with security group. Each rule has following attributes.
    tags string[]
    Tags associated with the security group.
    vpc string
    vpcName string
    access_tags Sequence[str]
    (List) Access management tags associated for the security group.
    crn str
    The CRN of the security group.
    id str
    (String) The ID of the security group.
    name str
    resource_controller_url str
    resource_crn str
    resource_group str
    resource_group_name str
    resource_name str
    rules Sequence[GetIsSecurityGroupRule]
    (List of Objects) The rules associated with security group. Each rule has following attributes.
    tags Sequence[str]
    Tags associated with the security group.
    vpc str
    vpc_name str
    accessTags List<String>
    (List) Access management tags associated for the security group.
    crn String
    The CRN of the security group.
    id String
    (String) The ID of the security group.
    name String
    resourceControllerUrl String
    resourceCrn String
    resourceGroup String
    resourceGroupName String
    resourceName String
    rules List<Property Map>
    (List of Objects) The rules associated with security group. Each rule has following attributes.
    tags List<String>
    Tags associated with the security group.
    vpc String
    vpcName String

    Supporting Types

    GetIsSecurityGroupRule

    Code double
    (String) The traffic code to allow.
    Direction string
    (String) Direction of traffic to enforce, either inbound or outbound.
    IpVersion string
    (String) IP version: IPv4
    Locals List<GetIsSecurityGroupRuleLocal>
    (String) The local IP address or range of local IP addresses to which this rule will allow inbound traffic (or from which, for outbound traffic). A CIDR block of 0.0.0.0/0 allows traffic to all local IP addresses (or from all local IP addresses, for outbound rules). an IP address, a CIDR block.
    PortMax double
    (Integer) The TCP/UDP port range that includes the maximum bound.
    PortMin double
    (Integer) The TCP/UDP port range that includes the minimum bound.
    Protocol string
    (String) The type of the protocol all, icmp, tcp, udp.
    Remote string
    (Integer) Security group ID, an IP address, a CIDR block, or a single security group identifier.
    RuleId string
    (String) ID of the rule.
    Type double
    (String) The traffic type to allow.
    Code float64
    (String) The traffic code to allow.
    Direction string
    (String) Direction of traffic to enforce, either inbound or outbound.
    IpVersion string
    (String) IP version: IPv4
    Locals []GetIsSecurityGroupRuleLocal
    (String) The local IP address or range of local IP addresses to which this rule will allow inbound traffic (or from which, for outbound traffic). A CIDR block of 0.0.0.0/0 allows traffic to all local IP addresses (or from all local IP addresses, for outbound rules). an IP address, a CIDR block.
    PortMax float64
    (Integer) The TCP/UDP port range that includes the maximum bound.
    PortMin float64
    (Integer) The TCP/UDP port range that includes the minimum bound.
    Protocol string
    (String) The type of the protocol all, icmp, tcp, udp.
    Remote string
    (Integer) Security group ID, an IP address, a CIDR block, or a single security group identifier.
    RuleId string
    (String) ID of the rule.
    Type float64
    (String) The traffic type to allow.
    code Double
    (String) The traffic code to allow.
    direction String
    (String) Direction of traffic to enforce, either inbound or outbound.
    ipVersion String
    (String) IP version: IPv4
    locals List<GetIsSecurityGroupRuleLocal>
    (String) The local IP address or range of local IP addresses to which this rule will allow inbound traffic (or from which, for outbound traffic). A CIDR block of 0.0.0.0/0 allows traffic to all local IP addresses (or from all local IP addresses, for outbound rules). an IP address, a CIDR block.
    portMax Double
    (Integer) The TCP/UDP port range that includes the maximum bound.
    portMin Double
    (Integer) The TCP/UDP port range that includes the minimum bound.
    protocol String
    (String) The type of the protocol all, icmp, tcp, udp.
    remote String
    (Integer) Security group ID, an IP address, a CIDR block, or a single security group identifier.
    ruleId String
    (String) ID of the rule.
    type Double
    (String) The traffic type to allow.
    code number
    (String) The traffic code to allow.
    direction string
    (String) Direction of traffic to enforce, either inbound or outbound.
    ipVersion string
    (String) IP version: IPv4
    locals GetIsSecurityGroupRuleLocal[]
    (String) The local IP address or range of local IP addresses to which this rule will allow inbound traffic (or from which, for outbound traffic). A CIDR block of 0.0.0.0/0 allows traffic to all local IP addresses (or from all local IP addresses, for outbound rules). an IP address, a CIDR block.
    portMax number
    (Integer) The TCP/UDP port range that includes the maximum bound.
    portMin number
    (Integer) The TCP/UDP port range that includes the minimum bound.
    protocol string
    (String) The type of the protocol all, icmp, tcp, udp.
    remote string
    (Integer) Security group ID, an IP address, a CIDR block, or a single security group identifier.
    ruleId string
    (String) ID of the rule.
    type number
    (String) The traffic type to allow.
    code float
    (String) The traffic code to allow.
    direction str
    (String) Direction of traffic to enforce, either inbound or outbound.
    ip_version str
    (String) IP version: IPv4
    locals Sequence[GetIsSecurityGroupRuleLocal]
    (String) The local IP address or range of local IP addresses to which this rule will allow inbound traffic (or from which, for outbound traffic). A CIDR block of 0.0.0.0/0 allows traffic to all local IP addresses (or from all local IP addresses, for outbound rules). an IP address, a CIDR block.
    port_max float
    (Integer) The TCP/UDP port range that includes the maximum bound.
    port_min float
    (Integer) The TCP/UDP port range that includes the minimum bound.
    protocol str
    (String) The type of the protocol all, icmp, tcp, udp.
    remote str
    (Integer) Security group ID, an IP address, a CIDR block, or a single security group identifier.
    rule_id str
    (String) ID of the rule.
    type float
    (String) The traffic type to allow.
    code Number
    (String) The traffic code to allow.
    direction String
    (String) Direction of traffic to enforce, either inbound or outbound.
    ipVersion String
    (String) IP version: IPv4
    locals List<Property Map>
    (String) The local IP address or range of local IP addresses to which this rule will allow inbound traffic (or from which, for outbound traffic). A CIDR block of 0.0.0.0/0 allows traffic to all local IP addresses (or from all local IP addresses, for outbound rules). an IP address, a CIDR block.
    portMax Number
    (Integer) The TCP/UDP port range that includes the maximum bound.
    portMin Number
    (Integer) The TCP/UDP port range that includes the minimum bound.
    protocol String
    (String) The type of the protocol all, icmp, tcp, udp.
    remote String
    (Integer) Security group ID, an IP address, a CIDR block, or a single security group identifier.
    ruleId String
    (String) ID of the rule.
    type Number
    (String) The traffic type to allow.

    GetIsSecurityGroupRuleLocal

    Address string
    (String) The IP address.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
    CidrBlock string
    (String) The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
    Address string
    (String) The IP address.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
    CidrBlock string
    (String) The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
    address String
    (String) The IP address.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
    cidrBlock String
    (String) The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
    address string
    (String) The IP address.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
    cidrBlock string
    (String) The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
    address str
    (String) The IP address.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
    cidr_block str
    (String) The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
    address String
    (String) The IP address.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
    cidrBlock String
    (String) The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud