alicloud.bastionhost.HostAttachment
Provides a Bastion Host Host Attachment resource to add host into one host group.
NOTE: Available in v1.135.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.BastionHost.HostAttachment("example", new()
{
HostGroupId = "6",
HostId = "15",
InstanceId = "bastionhost-cn-tl32bh0no30",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/bastionhost"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bastionhost.NewHostAttachment(ctx, "example", &bastionhost.HostAttachmentArgs{
HostGroupId: pulumi.String("6"),
HostId: pulumi.String("15"),
InstanceId: pulumi.String("bastionhost-cn-tl32bh0no30"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.bastionhost.HostAttachment;
import com.pulumi.alicloud.bastionhost.HostAttachmentArgs;
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 HostAttachment("example", HostAttachmentArgs.builder()
.hostGroupId("6")
.hostId("15")
.instanceId("bastionhost-cn-tl32bh0no30")
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.bastionhost.HostAttachment("example",
host_group_id="6",
host_id="15",
instance_id="bastionhost-cn-tl32bh0no30")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.bastionhost.HostAttachment("example", {
hostGroupId: "6",
hostId: "15",
instanceId: "bastionhost-cn-tl32bh0no30",
});
resources:
example:
type: alicloud:bastionhost:HostAttachment
properties:
hostGroupId: '6'
hostId: '15'
instanceId: bastionhost-cn-tl32bh0no30
Create HostAttachment Resource
new HostAttachment(name: string, args: HostAttachmentArgs, opts?: CustomResourceOptions);
@overload
def HostAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
host_group_id: Optional[str] = None,
host_id: Optional[str] = None,
instance_id: Optional[str] = None)
@overload
def HostAttachment(resource_name: str,
args: HostAttachmentArgs,
opts: Optional[ResourceOptions] = None)
func NewHostAttachment(ctx *Context, name string, args HostAttachmentArgs, opts ...ResourceOption) (*HostAttachment, error)
public HostAttachment(string name, HostAttachmentArgs args, CustomResourceOptions? opts = null)
public HostAttachment(String name, HostAttachmentArgs args)
public HostAttachment(String name, HostAttachmentArgs args, CustomResourceOptions options)
type: alicloud:bastionhost:HostAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HostAttachmentArgs
- 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 HostAttachmentArgs
- 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 HostAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HostAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HostAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
HostAttachment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The HostAttachment resource accepts the following input properties:
- Host
Group stringId Specifies the added to the host group ID.
- Host
Id string Specified to be part of a host group of host ID.
- Instance
Id string The bastion host instance id.
- Host
Group stringId Specifies the added to the host group ID.
- Host
Id string Specified to be part of a host group of host ID.
- Instance
Id string The bastion host instance id.
- host
Group StringId Specifies the added to the host group ID.
- host
Id String Specified to be part of a host group of host ID.
- instance
Id String The bastion host instance id.
- host
Group stringId Specifies the added to the host group ID.
- host
Id string Specified to be part of a host group of host ID.
- instance
Id string The bastion host instance id.
- host_
group_ strid Specifies the added to the host group ID.
- host_
id str Specified to be part of a host group of host ID.
- instance_
id str The bastion host instance id.
- host
Group StringId Specifies the added to the host group ID.
- host
Id String Specified to be part of a host group of host ID.
- instance
Id String The bastion host instance id.
Outputs
All input properties are implicitly available as output properties. Additionally, the HostAttachment resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing HostAttachment Resource
Get an existing HostAttachment 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?: HostAttachmentState, opts?: CustomResourceOptions): HostAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
host_group_id: Optional[str] = None,
host_id: Optional[str] = None,
instance_id: Optional[str] = None) -> HostAttachment
func GetHostAttachment(ctx *Context, name string, id IDInput, state *HostAttachmentState, opts ...ResourceOption) (*HostAttachment, error)
public static HostAttachment Get(string name, Input<string> id, HostAttachmentState? state, CustomResourceOptions? opts = null)
public static HostAttachment get(String name, Output<String> id, HostAttachmentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Host
Group stringId Specifies the added to the host group ID.
- Host
Id string Specified to be part of a host group of host ID.
- Instance
Id string The bastion host instance id.
- Host
Group stringId Specifies the added to the host group ID.
- Host
Id string Specified to be part of a host group of host ID.
- Instance
Id string The bastion host instance id.
- host
Group StringId Specifies the added to the host group ID.
- host
Id String Specified to be part of a host group of host ID.
- instance
Id String The bastion host instance id.
- host
Group stringId Specifies the added to the host group ID.
- host
Id string Specified to be part of a host group of host ID.
- instance
Id string The bastion host instance id.
- host_
group_ strid Specifies the added to the host group ID.
- host_
id str Specified to be part of a host group of host ID.
- instance_
id str The bastion host instance id.
- host
Group StringId Specifies the added to the host group ID.
- host
Id String Specified to be part of a host group of host ID.
- instance
Id String The bastion host instance id.
Import
Bastion Host Host Attachment can be imported using the id, e.g.
$ pulumi import alicloud:bastionhost/hostAttachment:HostAttachment example <instance_id>:<host_group_id>:<host_id>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.