ibm.getIsSecurityGroup
Explore with Pulumi AI
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.
- Resource
Group 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)
- Vpc
Name 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.
- Resource
Group 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)
- Vpc
Name 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.
- resource
Group 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)
- vpc
Name 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.
- resource
Group 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)
- vpc
Name 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.
- resource
Group 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)
- vpc
Name 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:
- 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
- Resource
Controller stringUrl - Resource
Crn string - Resource
Group string - Resource
Group stringName - Resource
Name string - Rules
List<Get
Is Security Group Rule> - (List of Objects) The rules associated with security group. Each rule has following attributes.
- List<string>
- Tags associated with the security group.
- Vpc string
- Vpc
Name string
- []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
- Resource
Controller stringUrl - Resource
Crn string - Resource
Group string - Resource
Group stringName - Resource
Name string - Rules
[]Get
Is Security Group Rule Type - (List of Objects) The rules associated with security group. Each rule has following attributes.
- []string
- Tags associated with the security group.
- Vpc string
- Vpc
Name string
- 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
- resource
Controller StringUrl - resource
Crn String - resource
Group String - resource
Group StringName - resource
Name String - rules
List<Get
Is Security Group Rule> - (List of Objects) The rules associated with security group. Each rule has following attributes.
- List<String>
- Tags associated with the security group.
- vpc String
- vpc
Name String
- 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
- resource
Controller stringUrl - resource
Crn string - resource
Group string - resource
Group stringName - resource
Name string - rules
Get
Is Security Group Rule[] - (List of Objects) The rules associated with security group. Each rule has following attributes.
- string[]
- Tags associated with the security group.
- vpc string
- vpc
Name string
- 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_ strurl - resource_
crn str - resource_
group str - resource_
group_ strname - resource_
name str - rules
Sequence[Get
Is Security Group Rule] - (List of Objects) The rules associated with security group. Each rule has following attributes.
- Sequence[str]
- Tags associated with the security group.
- vpc str
- vpc_
name str
- 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
- resource
Controller StringUrl - resource
Crn String - resource
Group String - resource
Group StringName - resource
Name String - rules List<Property Map>
- (List of Objects) The rules associated with security group. Each rule has following attributes.
- List<String>
- Tags associated with the security group.
- vpc String
- vpc
Name String
Supporting Types
GetIsSecurityGroupRule
- Code double
- (String) The traffic code to allow.
- Direction string
- (String) Direction of traffic to enforce, either inbound or outbound.
- Ip
Version string - (String) IP version: IPv4
- Locals
List<Get
Is Security Group Rule Local> - (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 double - (Integer) The TCP/UDP port range that includes the maximum bound.
- Port
Min 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.
- Rule
Id 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.
- Ip
Version string - (String) IP version: IPv4
- Locals
[]Get
Is Security Group Rule Local - (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 float64 - (Integer) The TCP/UDP port range that includes the maximum bound.
- Port
Min 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.
- Rule
Id 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.
- ip
Version String - (String) IP version: IPv4
- locals
List<Get
Is Security Group Rule Local> - (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 Double - (Integer) The TCP/UDP port range that includes the maximum bound.
- port
Min 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.
- rule
Id 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.
- ip
Version string - (String) IP version: IPv4
- locals
Get
Is Security Group Rule Local[] - (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 number - (Integer) The TCP/UDP port range that includes the maximum bound.
- port
Min 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.
- rule
Id 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[Get
Is Security Group Rule Local] - (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.
- ip
Version 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. - port
Max Number - (Integer) The TCP/UDP port range that includes the maximum bound.
- port
Min 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.
- rule
Id 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.
- Cidr
Block 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.
- Cidr
Block 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.
- cidr
Block 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.
- cidr
Block 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.
- cidr
Block 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.