ibm.IsSecurityGroupTarget
Explore with Pulumi AI
Example Usage
Sample to create a security group target.
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const example = new ibm.IsSecurityGroupTarget("example", {
securityGroup: ibm_is_security_group.example.id,
target: ibm_is_lb.example.id,
});
import pulumi
import pulumi_ibm as ibm
example = ibm.IsSecurityGroupTarget("example",
security_group=ibm_is_security_group["example"]["id"],
target=ibm_is_lb["example"]["id"])
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.NewIsSecurityGroupTarget(ctx, "example", &ibm.IsSecurityGroupTargetArgs{
SecurityGroup: pulumi.Any(ibm_is_security_group.Example.Id),
Target: pulumi.Any(ibm_is_lb.Example.Id),
})
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 = new Ibm.IsSecurityGroupTarget("example", new()
{
SecurityGroup = ibm_is_security_group.Example.Id,
Target = ibm_is_lb.Example.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IsSecurityGroupTarget;
import com.pulumi.ibm.IsSecurityGroupTargetArgs;
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) {
var example = new IsSecurityGroupTarget("example", IsSecurityGroupTargetArgs.builder()
.securityGroup(ibm_is_security_group.example().id())
.target(ibm_is_lb.example().id())
.build());
}
}
resources:
example:
type: ibm:IsSecurityGroupTarget
properties:
securityGroup: ${ibm_is_security_group.example.id}
target: ${ibm_is_lb.example.id}
Create IsSecurityGroupTarget Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IsSecurityGroupTarget(name: string, args: IsSecurityGroupTargetArgs, opts?: CustomResourceOptions);
@overload
def IsSecurityGroupTarget(resource_name: str,
args: IsSecurityGroupTargetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IsSecurityGroupTarget(resource_name: str,
opts: Optional[ResourceOptions] = None,
security_group: Optional[str] = None,
target: Optional[str] = None,
is_security_group_target_id: Optional[str] = None,
timeouts: Optional[IsSecurityGroupTargetTimeoutsArgs] = None)
func NewIsSecurityGroupTarget(ctx *Context, name string, args IsSecurityGroupTargetArgs, opts ...ResourceOption) (*IsSecurityGroupTarget, error)
public IsSecurityGroupTarget(string name, IsSecurityGroupTargetArgs args, CustomResourceOptions? opts = null)
public IsSecurityGroupTarget(String name, IsSecurityGroupTargetArgs args)
public IsSecurityGroupTarget(String name, IsSecurityGroupTargetArgs args, CustomResourceOptions options)
type: ibm:IsSecurityGroupTarget
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args IsSecurityGroupTargetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args IsSecurityGroupTargetArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args IsSecurityGroupTargetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IsSecurityGroupTargetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IsSecurityGroupTargetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var isSecurityGroupTargetResource = new Ibm.IsSecurityGroupTarget("isSecurityGroupTargetResource", new()
{
SecurityGroup = "string",
Target = "string",
IsSecurityGroupTargetId = "string",
Timeouts = new Ibm.Inputs.IsSecurityGroupTargetTimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := ibm.NewIsSecurityGroupTarget(ctx, "isSecurityGroupTargetResource", &ibm.IsSecurityGroupTargetArgs{
SecurityGroup: pulumi.String("string"),
Target: pulumi.String("string"),
IsSecurityGroupTargetId: pulumi.String("string"),
Timeouts: &ibm.IsSecurityGroupTargetTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var isSecurityGroupTargetResource = new IsSecurityGroupTarget("isSecurityGroupTargetResource", IsSecurityGroupTargetArgs.builder()
.securityGroup("string")
.target("string")
.isSecurityGroupTargetId("string")
.timeouts(IsSecurityGroupTargetTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
is_security_group_target_resource = ibm.IsSecurityGroupTarget("isSecurityGroupTargetResource",
security_group="string",
target="string",
is_security_group_target_id="string",
timeouts={
"create": "string",
"delete": "string",
})
const isSecurityGroupTargetResource = new ibm.IsSecurityGroupTarget("isSecurityGroupTargetResource", {
securityGroup: "string",
target: "string",
isSecurityGroupTargetId: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: ibm:IsSecurityGroupTarget
properties:
isSecurityGroupTargetId: string
securityGroup: string
target: string
timeouts:
create: string
delete: string
IsSecurityGroupTarget Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The IsSecurityGroupTarget resource accepts the following input properties:
- Security
Group string - The security group identifier.
- Target string
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- Is
Security stringGroup Target Id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - Timeouts
Is
Security Group Target Timeouts
- Security
Group string - The security group identifier.
- Target string
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- Is
Security stringGroup Target Id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - Timeouts
Is
Security Group Target Timeouts Args
- security
Group String - The security group identifier.
- target String
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- is
Security StringGroup Target Id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - timeouts
Is
Security Group Target Timeouts
- security
Group string - The security group identifier.
- target string
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- is
Security stringGroup Target Id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - timeouts
Is
Security Group Target Timeouts
- security_
group str - The security group identifier.
- target str
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- is_
security_ strgroup_ target_ id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - timeouts
Is
Security Group Target Timeouts Args
- security
Group String - The security group identifier.
- target String
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- is
Security StringGroup Target Id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the IsSecurityGroupTarget resource produces the following output properties:
- Crn string
- (String) The CRN for this target.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- (String) The user-defined name of the target.
- Resource
Type string - (String) The resource type.
- Crn string
- (String) The CRN for this target.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- (String) The user-defined name of the target.
- Resource
Type string - (String) The resource type.
- crn String
- (String) The CRN for this target.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- (String) The user-defined name of the target.
- resource
Type String - (String) The resource type.
- crn string
- (String) The CRN for this target.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- (String) The user-defined name of the target.
- resource
Type string - (String) The resource type.
- crn str
- (String) The CRN for this target.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- (String) The user-defined name of the target.
- resource_
type str - (String) The resource type.
- crn String
- (String) The CRN for this target.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- (String) The user-defined name of the target.
- resource
Type String - (String) The resource type.
Look up Existing IsSecurityGroupTarget Resource
Get an existing IsSecurityGroupTarget resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: IsSecurityGroupTargetState, opts?: CustomResourceOptions): IsSecurityGroupTarget
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
crn: Optional[str] = None,
is_security_group_target_id: Optional[str] = None,
name: Optional[str] = None,
resource_type: Optional[str] = None,
security_group: Optional[str] = None,
target: Optional[str] = None,
timeouts: Optional[IsSecurityGroupTargetTimeoutsArgs] = None) -> IsSecurityGroupTarget
func GetIsSecurityGroupTarget(ctx *Context, name string, id IDInput, state *IsSecurityGroupTargetState, opts ...ResourceOption) (*IsSecurityGroupTarget, error)
public static IsSecurityGroupTarget Get(string name, Input<string> id, IsSecurityGroupTargetState? state, CustomResourceOptions? opts = null)
public static IsSecurityGroupTarget get(String name, Output<String> id, IsSecurityGroupTargetState state, CustomResourceOptions options)
resources: _: type: ibm:IsSecurityGroupTarget get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Crn string
- (String) The CRN for this target.
- Is
Security stringGroup Target Id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - Name string
- (String) The user-defined name of the target.
- Resource
Type string - (String) The resource type.
- Security
Group string - The security group identifier.
- Target string
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- Timeouts
Is
Security Group Target Timeouts
- Crn string
- (String) The CRN for this target.
- Is
Security stringGroup Target Id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - Name string
- (String) The user-defined name of the target.
- Resource
Type string - (String) The resource type.
- Security
Group string - The security group identifier.
- Target string
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- Timeouts
Is
Security Group Target Timeouts Args
- crn String
- (String) The CRN for this target.
- is
Security StringGroup Target Id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - name String
- (String) The user-defined name of the target.
- resource
Type String - (String) The resource type.
- security
Group String - The security group identifier.
- target String
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- timeouts
Is
Security Group Target Timeouts
- crn string
- (String) The CRN for this target.
- is
Security stringGroup Target Id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - name string
- (String) The user-defined name of the target.
- resource
Type string - (String) The resource type.
- security
Group string - The security group identifier.
- target string
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- timeouts
Is
Security Group Target Timeouts
- crn str
- (String) The CRN for this target.
- is_
security_ strgroup_ target_ id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - name str
- (String) The user-defined name of the target.
- resource_
type str - (String) The resource type.
- security_
group str - The security group identifier.
- target str
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- timeouts
Is
Security Group Target Timeouts Args
- crn String
- (String) The CRN for this target.
- is
Security StringGroup Target Id - (String) The unique identifier of the security group target. The id is composed of <
security_group_id
>/<target_id
>. - name String
- (String) The user-defined name of the target.
- resource
Type String - (String) The resource type.
- security
Group String - The security group identifier.
- target String
The security group target identifier.
Target should be one of the below: •
network interface
identifier. •application load balancer
identifier. •endpoint gateway
identifier. •VPN Server
identifier. •Virtual network interface
identifier.- timeouts Property Map
Supporting Types
IsSecurityGroupTargetTimeouts, IsSecurityGroupTargetTimeoutsArgs
Import
The ibm_is_security_group_target
resource can be imported by using security group ID and target ID.
Example
$ pulumi import ibm:index/isSecurityGroupTarget:IsSecurityGroupTarget example r006-6c6528a7-26de-4438-9685-bf2f6bbcb1ad/r006-5b77aa07-7dfb-4c74-a1bd-904123123cbe198
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.