ibm.getIsSecurityGroupTarget
Explore with Pulumi AI
Retrieve information of an existing security group target as a read only data source. For more information, about security group target, see required permissions.
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) {
    }
}
{}
Example Usage
In the following example, you can create a security group target:
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const example = ibm.getIsSecurityGroupTarget({
    securityGroup: ibm_is_security_group.example.id,
    name: "example-security-group-target",
});
import pulumi
import pulumi_ibm as ibm
example = ibm.get_is_security_group_target(security_group=ibm_is_security_group["example"]["id"],
    name="example-security-group-target")
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ibm.LookupIsSecurityGroupTarget(ctx, &ibm.LookupIsSecurityGroupTargetArgs{
			SecurityGroup: ibm_is_security_group.Example.Id,
			Name:          "example-security-group-target",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() => 
{
    var example = Ibm.GetIsSecurityGroupTarget.Invoke(new()
    {
        SecurityGroup = ibm_is_security_group.Example.Id,
        Name = "example-security-group-target",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetIsSecurityGroupTargetArgs;
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 example = IbmFunctions.getIsSecurityGroupTarget(GetIsSecurityGroupTargetArgs.builder()
            .securityGroup(ibm_is_security_group.example().id())
            .name("example-security-group-target")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: ibm:getIsSecurityGroupTarget
      arguments:
        securityGroup: ${ibm_is_security_group.example.id}
        name: example-security-group-target
Using getIsSecurityGroupTarget
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 getIsSecurityGroupTarget(args: GetIsSecurityGroupTargetArgs, opts?: InvokeOptions): Promise<GetIsSecurityGroupTargetResult>
function getIsSecurityGroupTargetOutput(args: GetIsSecurityGroupTargetOutputArgs, opts?: InvokeOptions): Output<GetIsSecurityGroupTargetResult>def get_is_security_group_target(id: Optional[str] = None,
                                 name: Optional[str] = None,
                                 security_group: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetIsSecurityGroupTargetResult
def get_is_security_group_target_output(id: Optional[pulumi.Input[str]] = None,
                                 name: Optional[pulumi.Input[str]] = None,
                                 security_group: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetIsSecurityGroupTargetResult]func LookupIsSecurityGroupTarget(ctx *Context, args *LookupIsSecurityGroupTargetArgs, opts ...InvokeOption) (*LookupIsSecurityGroupTargetResult, error)
func LookupIsSecurityGroupTargetOutput(ctx *Context, args *LookupIsSecurityGroupTargetOutputArgs, opts ...InvokeOption) LookupIsSecurityGroupTargetResultOutput> Note: This function is named LookupIsSecurityGroupTarget in the Go SDK.
public static class GetIsSecurityGroupTarget 
{
    public static Task<GetIsSecurityGroupTargetResult> InvokeAsync(GetIsSecurityGroupTargetArgs args, InvokeOptions? opts = null)
    public static Output<GetIsSecurityGroupTargetResult> Invoke(GetIsSecurityGroupTargetInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetIsSecurityGroupTargetResult> getIsSecurityGroupTarget(GetIsSecurityGroupTargetArgs args, InvokeOptions options)
public static Output<GetIsSecurityGroupTargetResult> getIsSecurityGroupTarget(GetIsSecurityGroupTargetArgs args, InvokeOptions options)
fn::invoke:
  function: ibm:index/getIsSecurityGroupTarget:getIsSecurityGroupTarget
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
 - The user defined name of the target.
 - Security
Group string - The security group identifier.
 - Id string
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. 
- Name string
 - The user defined name of the target.
 - Security
Group string - The security group identifier.
 - Id string
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. 
- name String
 - The user defined name of the target.
 - security
Group String - The security group identifier.
 - id String
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. 
- name string
 - The user defined name of the target.
 - security
Group string - The security group identifier.
 - id string
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. 
- name str
 - The user defined name of the target.
 - security_
group str - The security group identifier.
 - id str
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. 
- name String
 - The user defined name of the target.
 - security
Group String - The security group identifier.
 - id String
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. 
getIsSecurityGroupTarget Result
The following output properties are available:
- Crn string
 - (String) The CRN for this target.
 - Id string
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. - More
Info string - (String) Link to documentation about deleted resources.
 - Name string
 - (String) The user defined name of the target.
 - Resource
Type string - (String) The resource type.
 - Security
Group string - Target string
 
- Crn string
 - (String) The CRN for this target.
 - Id string
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. - More
Info string - (String) Link to documentation about deleted resources.
 - Name string
 - (String) The user defined name of the target.
 - Resource
Type string - (String) The resource type.
 - Security
Group string - Target string
 
- crn String
 - (String) The CRN for this target.
 - id String
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. - more
Info String - (String) Link to documentation about deleted resources.
 - name String
 - (String) The user defined name of the target.
 - resource
Type String - (String) The resource type.
 - security
Group String - target String
 
- crn string
 - (String) The CRN for this target.
 - id string
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. - more
Info string - (String) Link to documentation about deleted resources.
 - name string
 - (String) The user defined name of the target.
 - resource
Type string - (String) The resource type.
 - security
Group string - target string
 
- crn str
 - (String) The CRN for this target.
 - id str
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. - more_
info str - (String) Link to documentation about deleted resources.
 - name str
 - (String) The user defined name of the target.
 - resource_
type str - (String) The resource type.
 - security_
group str - target str
 
- crn String
 - (String) The CRN for this target.
 - id String
 - (String) The unique identifier of the security group target. The ID is composed of <
security_group_id>/<target_id>. - more
Info String - (String) Link to documentation about deleted resources.
 - name String
 - (String) The user defined name of the target.
 - resource
Type String - (String) The resource type.
 - security
Group String - target String
 
Package Details
- Repository
 - ibm ibm-cloud/terraform-provider-ibm
 - License
 - Notes
 - This Pulumi package is based on the 
ibmTerraform Provider.