aws.opsworks.Instance
Explore with Pulumi AI
Provides an OpsWorks instance resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const my_instance = new aws.opsworks.Instance("my-instance", {
stackId: main.id,
layerIds: [my_layer.id],
instanceType: "t2.micro",
os: "Amazon Linux 2015.09",
state: "stopped",
});
import pulumi
import pulumi_aws as aws
my_instance = aws.opsworks.Instance("my-instance",
stack_id=main["id"],
layer_ids=[my_layer["id"]],
instance_type="t2.micro",
os="Amazon Linux 2015.09",
state="stopped")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opsworks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opsworks.NewInstance(ctx, "my-instance", &opsworks.InstanceArgs{
StackId: pulumi.Any(main.Id),
LayerIds: pulumi.StringArray{
my_layer.Id,
},
InstanceType: pulumi.String("t2.micro"),
Os: pulumi.String("Amazon Linux 2015.09"),
State: pulumi.String("stopped"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var my_instance = new Aws.OpsWorks.Instance("my-instance", new()
{
StackId = main.Id,
LayerIds = new[]
{
my_layer.Id,
},
InstanceType = "t2.micro",
Os = "Amazon Linux 2015.09",
State = "stopped",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.opsworks.Instance;
import com.pulumi.aws.opsworks.InstanceArgs;
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 my_instance = new Instance("my-instance", InstanceArgs.builder()
.stackId(main.id())
.layerIds(my_layer.id())
.instanceType("t2.micro")
.os("Amazon Linux 2015.09")
.state("stopped")
.build());
}
}
resources:
my-instance:
type: aws:opsworks:Instance
properties:
stackId: ${main.id}
layerIds:
- ${["my-layer"].id}
instanceType: t2.micro
os: Amazon Linux 2015.09
state: stopped
Block devices
Each of the *_block_device
attributes controls a portion of the AWS
Instance’s “Block Device Mapping”. It’s a good idea to familiarize yourself with AWS’s Block Device
Mapping docs
to understand the implications of using these attributes.
ebs_block_device
delete_on_termination
- (Optional) Whether the volume should be destroyed on instance termination. Default istrue
.device_name
- (Required) Name of the device to mount.iops
- (Optional) Amount of provisioned IOPS. This must be set with avolume_type
ofio1
.snapshot_id
- (Optional) Snapshot ID to mount.volume_size
- (Optional) Size of the volume in gigabytes.volume_type
- (Optional) Type of volume. Valid values arestandard
,gp2
, orio1
. Default isstandard
.
Modifying any ebs_block_device
currently requires resource replacement.
ephemeral_block_device
device_name
- Name of the block device to mount on the instance.virtual_name
- The Instance Store Device Name (e.g.,ephemeral0
).
Each AWS Instance type has a different set of Instance Store block devices
available for attachment. AWS publishes a
list
of which ephemeral devices are available on each type. The devices are always
identified by the virtual_name
in the format ephemeral{0..N}
.
root_block_device
delete_on_termination
- (Optional) Whether the volume should be destroyed on instance termination. Default istrue
.iops
- (Optional) Amount of provisioned IOPS. This must be set with avolume_type
ofio1
.volume_size
- (Optional) Size of the volume in gigabytes.volume_type
- (Optional) Type of volume. Valid values arestandard
,gp2
, orio1
. Default isstandard
.
Modifying any of the root_block_device
settings requires resource
replacement.
NOTE: Currently, changes to
*_block_device
configuration of existing resources cannot be automatically detected by this provider. After making updates to block device configuration, resource recreation can be manually triggered by using theup
command with the –replace argument.
Create Instance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
args: InstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
layer_ids: Optional[Sequence[str]] = None,
stack_id: Optional[str] = None,
infrastructure_class: Optional[str] = None,
subnet_id: Optional[str] = None,
availability_zone: Optional[str] = None,
created_at: Optional[str] = None,
delete_ebs: Optional[bool] = None,
delete_eip: Optional[bool] = None,
ebs_block_devices: Optional[Sequence[InstanceEbsBlockDeviceArgs]] = None,
ebs_optimized: Optional[bool] = None,
ecs_cluster_arn: Optional[str] = None,
elastic_ip: Optional[str] = None,
ephemeral_block_devices: Optional[Sequence[InstanceEphemeralBlockDeviceArgs]] = None,
hostname: Optional[str] = None,
virtualization_type: Optional[str] = None,
auto_scaling_type: Optional[str] = None,
root_block_devices: Optional[Sequence[InstanceRootBlockDeviceArgs]] = None,
instance_type: Optional[str] = None,
architecture: Optional[str] = None,
os: Optional[str] = None,
instance_profile_arn: Optional[str] = None,
root_device_type: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
ssh_key_name: Optional[str] = None,
ami_id: Optional[str] = None,
state: Optional[str] = None,
status: Optional[str] = None,
install_updates_on_boot: Optional[bool] = None,
tenancy: Optional[str] = None,
agent_version: Optional[str] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: aws:opsworks:Instance
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 InstanceArgs
- 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 InstanceArgs
- 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 InstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceArgs
- 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 exampleinstanceResourceResourceFromOpsworksinstance = new Aws.OpsWorks.Instance("exampleinstanceResourceResourceFromOpsworksinstance", new()
{
LayerIds = new[]
{
"string",
},
StackId = "string",
InfrastructureClass = "string",
SubnetId = "string",
AvailabilityZone = "string",
CreatedAt = "string",
DeleteEbs = false,
DeleteEip = false,
EbsBlockDevices = new[]
{
new Aws.OpsWorks.Inputs.InstanceEbsBlockDeviceArgs
{
DeviceName = "string",
DeleteOnTermination = false,
Iops = 0,
SnapshotId = "string",
VolumeSize = 0,
VolumeType = "string",
},
},
EbsOptimized = false,
EcsClusterArn = "string",
ElasticIp = "string",
EphemeralBlockDevices = new[]
{
new Aws.OpsWorks.Inputs.InstanceEphemeralBlockDeviceArgs
{
DeviceName = "string",
VirtualName = "string",
},
},
Hostname = "string",
VirtualizationType = "string",
AutoScalingType = "string",
RootBlockDevices = new[]
{
new Aws.OpsWorks.Inputs.InstanceRootBlockDeviceArgs
{
DeleteOnTermination = false,
Iops = 0,
VolumeSize = 0,
VolumeType = "string",
},
},
InstanceType = "string",
Architecture = "string",
Os = "string",
InstanceProfileArn = "string",
RootDeviceType = "string",
SecurityGroupIds = new[]
{
"string",
},
SshKeyName = "string",
AmiId = "string",
State = "string",
Status = "string",
InstallUpdatesOnBoot = false,
Tenancy = "string",
AgentVersion = "string",
});
example, err := opsworks.NewInstance(ctx, "exampleinstanceResourceResourceFromOpsworksinstance", &opsworks.InstanceArgs{
LayerIds: pulumi.StringArray{
pulumi.String("string"),
},
StackId: pulumi.String("string"),
InfrastructureClass: pulumi.String("string"),
SubnetId: pulumi.String("string"),
AvailabilityZone: pulumi.String("string"),
CreatedAt: pulumi.String("string"),
DeleteEbs: pulumi.Bool(false),
DeleteEip: pulumi.Bool(false),
EbsBlockDevices: opsworks.InstanceEbsBlockDeviceArray{
&opsworks.InstanceEbsBlockDeviceArgs{
DeviceName: pulumi.String("string"),
DeleteOnTermination: pulumi.Bool(false),
Iops: pulumi.Int(0),
SnapshotId: pulumi.String("string"),
VolumeSize: pulumi.Int(0),
VolumeType: pulumi.String("string"),
},
},
EbsOptimized: pulumi.Bool(false),
EcsClusterArn: pulumi.String("string"),
ElasticIp: pulumi.String("string"),
EphemeralBlockDevices: opsworks.InstanceEphemeralBlockDeviceArray{
&opsworks.InstanceEphemeralBlockDeviceArgs{
DeviceName: pulumi.String("string"),
VirtualName: pulumi.String("string"),
},
},
Hostname: pulumi.String("string"),
VirtualizationType: pulumi.String("string"),
AutoScalingType: pulumi.String("string"),
RootBlockDevices: opsworks.InstanceRootBlockDeviceArray{
&opsworks.InstanceRootBlockDeviceArgs{
DeleteOnTermination: pulumi.Bool(false),
Iops: pulumi.Int(0),
VolumeSize: pulumi.Int(0),
VolumeType: pulumi.String("string"),
},
},
InstanceType: pulumi.String("string"),
Architecture: pulumi.String("string"),
Os: pulumi.String("string"),
InstanceProfileArn: pulumi.String("string"),
RootDeviceType: pulumi.String("string"),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
SshKeyName: pulumi.String("string"),
AmiId: pulumi.String("string"),
State: pulumi.String("string"),
Status: pulumi.String("string"),
InstallUpdatesOnBoot: pulumi.Bool(false),
Tenancy: pulumi.String("string"),
AgentVersion: pulumi.String("string"),
})
var exampleinstanceResourceResourceFromOpsworksinstance = new Instance("exampleinstanceResourceResourceFromOpsworksinstance", InstanceArgs.builder()
.layerIds("string")
.stackId("string")
.infrastructureClass("string")
.subnetId("string")
.availabilityZone("string")
.createdAt("string")
.deleteEbs(false)
.deleteEip(false)
.ebsBlockDevices(InstanceEbsBlockDeviceArgs.builder()
.deviceName("string")
.deleteOnTermination(false)
.iops(0)
.snapshotId("string")
.volumeSize(0)
.volumeType("string")
.build())
.ebsOptimized(false)
.ecsClusterArn("string")
.elasticIp("string")
.ephemeralBlockDevices(InstanceEphemeralBlockDeviceArgs.builder()
.deviceName("string")
.virtualName("string")
.build())
.hostname("string")
.virtualizationType("string")
.autoScalingType("string")
.rootBlockDevices(InstanceRootBlockDeviceArgs.builder()
.deleteOnTermination(false)
.iops(0)
.volumeSize(0)
.volumeType("string")
.build())
.instanceType("string")
.architecture("string")
.os("string")
.instanceProfileArn("string")
.rootDeviceType("string")
.securityGroupIds("string")
.sshKeyName("string")
.amiId("string")
.state("string")
.status("string")
.installUpdatesOnBoot(false)
.tenancy("string")
.agentVersion("string")
.build());
exampleinstance_resource_resource_from_opsworksinstance = aws.opsworks.Instance("exampleinstanceResourceResourceFromOpsworksinstance",
layer_ids=["string"],
stack_id="string",
infrastructure_class="string",
subnet_id="string",
availability_zone="string",
created_at="string",
delete_ebs=False,
delete_eip=False,
ebs_block_devices=[{
"deviceName": "string",
"deleteOnTermination": False,
"iops": 0,
"snapshotId": "string",
"volumeSize": 0,
"volumeType": "string",
}],
ebs_optimized=False,
ecs_cluster_arn="string",
elastic_ip="string",
ephemeral_block_devices=[{
"deviceName": "string",
"virtualName": "string",
}],
hostname="string",
virtualization_type="string",
auto_scaling_type="string",
root_block_devices=[{
"deleteOnTermination": False,
"iops": 0,
"volumeSize": 0,
"volumeType": "string",
}],
instance_type="string",
architecture="string",
os="string",
instance_profile_arn="string",
root_device_type="string",
security_group_ids=["string"],
ssh_key_name="string",
ami_id="string",
state="string",
status="string",
install_updates_on_boot=False,
tenancy="string",
agent_version="string")
const exampleinstanceResourceResourceFromOpsworksinstance = new aws.opsworks.Instance("exampleinstanceResourceResourceFromOpsworksinstance", {
layerIds: ["string"],
stackId: "string",
infrastructureClass: "string",
subnetId: "string",
availabilityZone: "string",
createdAt: "string",
deleteEbs: false,
deleteEip: false,
ebsBlockDevices: [{
deviceName: "string",
deleteOnTermination: false,
iops: 0,
snapshotId: "string",
volumeSize: 0,
volumeType: "string",
}],
ebsOptimized: false,
ecsClusterArn: "string",
elasticIp: "string",
ephemeralBlockDevices: [{
deviceName: "string",
virtualName: "string",
}],
hostname: "string",
virtualizationType: "string",
autoScalingType: "string",
rootBlockDevices: [{
deleteOnTermination: false,
iops: 0,
volumeSize: 0,
volumeType: "string",
}],
instanceType: "string",
architecture: "string",
os: "string",
instanceProfileArn: "string",
rootDeviceType: "string",
securityGroupIds: ["string"],
sshKeyName: "string",
amiId: "string",
state: "string",
status: "string",
installUpdatesOnBoot: false,
tenancy: "string",
agentVersion: "string",
});
type: aws:opsworks:Instance
properties:
agentVersion: string
amiId: string
architecture: string
autoScalingType: string
availabilityZone: string
createdAt: string
deleteEbs: false
deleteEip: false
ebsBlockDevices:
- deleteOnTermination: false
deviceName: string
iops: 0
snapshotId: string
volumeSize: 0
volumeType: string
ebsOptimized: false
ecsClusterArn: string
elasticIp: string
ephemeralBlockDevices:
- deviceName: string
virtualName: string
hostname: string
infrastructureClass: string
installUpdatesOnBoot: false
instanceProfileArn: string
instanceType: string
layerIds:
- string
os: string
rootBlockDevices:
- deleteOnTermination: false
iops: 0
volumeSize: 0
volumeType: string
rootDeviceType: string
securityGroupIds:
- string
sshKeyName: string
stackId: string
state: string
status: string
subnetId: string
tenancy: string
virtualizationType: string
Instance 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 Instance resource accepts the following input properties:
- Layer
Ids List<string> - List of the layers the instance will belong to.
- Stack
Id string Identifier of the stack the instance will belong to.
The following arguments are optional:
- Agent
Version string - OpsWorks agent to install. Default is
INHERIT
. - Ami
Id string - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - Architecture string
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - Auto
Scaling stringType - Creates load-based or time-based instances. Valid values are
load
,timer
. - Availability
Zone string - Name of the availability zone where instances will be created by default.
- Created
At string - Time that the instance was created.
- Delete
Ebs bool - Whether to delete EBS volume on deletion. Default is
true
. - Delete
Eip bool - Whether to delete the Elastic IP on deletion.
- Ebs
Block List<InstanceDevices Ebs Block Device> - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- Ebs
Optimized bool - Whether the launched EC2 instance will be EBS-optimized.
- Ecs
Cluster stringArn - ECS cluster's ARN for container instances.
- Elastic
Ip string - Instance Elastic IP address.
- Ephemeral
Block List<InstanceDevices Ephemeral Block Device> - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- Hostname string
- Instance's host name.
- Infrastructure
Class string - For registered instances, infrastructure class: ec2 or on-premises.
- Install
Updates boolOn Boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - Instance
Profile stringArn - ARN of the instance's IAM profile.
- Instance
Type string - Type of instance to start.
- Os string
- Name of operating system that will be installed.
- Root
Block List<InstanceDevices Root Block Device> - Configuration block for the root block device of the instance. See Block Devices below.
- Root
Device stringType - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - Security
Group List<string>Ids - Associated security groups.
- Ssh
Key stringName - Name of the SSH keypair that instances will have by default.
- State string
- Desired state of the instance. Valid values are
running
orstopped
. - Status string
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - Subnet
Id string - Subnet ID to attach to.
- Tenancy string
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - Virtualization
Type string - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
- Layer
Ids []string - List of the layers the instance will belong to.
- Stack
Id string Identifier of the stack the instance will belong to.
The following arguments are optional:
- Agent
Version string - OpsWorks agent to install. Default is
INHERIT
. - Ami
Id string - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - Architecture string
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - Auto
Scaling stringType - Creates load-based or time-based instances. Valid values are
load
,timer
. - Availability
Zone string - Name of the availability zone where instances will be created by default.
- Created
At string - Time that the instance was created.
- Delete
Ebs bool - Whether to delete EBS volume on deletion. Default is
true
. - Delete
Eip bool - Whether to delete the Elastic IP on deletion.
- Ebs
Block []InstanceDevices Ebs Block Device Args - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- Ebs
Optimized bool - Whether the launched EC2 instance will be EBS-optimized.
- Ecs
Cluster stringArn - ECS cluster's ARN for container instances.
- Elastic
Ip string - Instance Elastic IP address.
- Ephemeral
Block []InstanceDevices Ephemeral Block Device Args - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- Hostname string
- Instance's host name.
- Infrastructure
Class string - For registered instances, infrastructure class: ec2 or on-premises.
- Install
Updates boolOn Boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - Instance
Profile stringArn - ARN of the instance's IAM profile.
- Instance
Type string - Type of instance to start.
- Os string
- Name of operating system that will be installed.
- Root
Block []InstanceDevices Root Block Device Args - Configuration block for the root block device of the instance. See Block Devices below.
- Root
Device stringType - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - Security
Group []stringIds - Associated security groups.
- Ssh
Key stringName - Name of the SSH keypair that instances will have by default.
- State string
- Desired state of the instance. Valid values are
running
orstopped
. - Status string
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - Subnet
Id string - Subnet ID to attach to.
- Tenancy string
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - Virtualization
Type string - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
- layer
Ids List<String> - List of the layers the instance will belong to.
- stack
Id String Identifier of the stack the instance will belong to.
The following arguments are optional:
- agent
Version String - OpsWorks agent to install. Default is
INHERIT
. - ami
Id String - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - architecture String
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - auto
Scaling StringType - Creates load-based or time-based instances. Valid values are
load
,timer
. - availability
Zone String - Name of the availability zone where instances will be created by default.
- created
At String - Time that the instance was created.
- delete
Ebs Boolean - Whether to delete EBS volume on deletion. Default is
true
. - delete
Eip Boolean - Whether to delete the Elastic IP on deletion.
- ebs
Block List<InstanceDevices Ebs Block Device> - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- ebs
Optimized Boolean - Whether the launched EC2 instance will be EBS-optimized.
- ecs
Cluster StringArn - ECS cluster's ARN for container instances.
- elastic
Ip String - Instance Elastic IP address.
- ephemeral
Block List<InstanceDevices Ephemeral Block Device> - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- hostname String
- Instance's host name.
- infrastructure
Class String - For registered instances, infrastructure class: ec2 or on-premises.
- install
Updates BooleanOn Boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - instance
Profile StringArn - ARN of the instance's IAM profile.
- instance
Type String - Type of instance to start.
- os String
- Name of operating system that will be installed.
- root
Block List<InstanceDevices Root Block Device> - Configuration block for the root block device of the instance. See Block Devices below.
- root
Device StringType - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - security
Group List<String>Ids - Associated security groups.
- ssh
Key StringName - Name of the SSH keypair that instances will have by default.
- state String
- Desired state of the instance. Valid values are
running
orstopped
. - status String
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - subnet
Id String - Subnet ID to attach to.
- tenancy String
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - virtualization
Type String - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
- layer
Ids string[] - List of the layers the instance will belong to.
- stack
Id string Identifier of the stack the instance will belong to.
The following arguments are optional:
- agent
Version string - OpsWorks agent to install. Default is
INHERIT
. - ami
Id string - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - architecture string
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - auto
Scaling stringType - Creates load-based or time-based instances. Valid values are
load
,timer
. - availability
Zone string - Name of the availability zone where instances will be created by default.
- created
At string - Time that the instance was created.
- delete
Ebs boolean - Whether to delete EBS volume on deletion. Default is
true
. - delete
Eip boolean - Whether to delete the Elastic IP on deletion.
- ebs
Block InstanceDevices Ebs Block Device[] - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- ebs
Optimized boolean - Whether the launched EC2 instance will be EBS-optimized.
- ecs
Cluster stringArn - ECS cluster's ARN for container instances.
- elastic
Ip string - Instance Elastic IP address.
- ephemeral
Block InstanceDevices Ephemeral Block Device[] - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- hostname string
- Instance's host name.
- infrastructure
Class string - For registered instances, infrastructure class: ec2 or on-premises.
- install
Updates booleanOn Boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - instance
Profile stringArn - ARN of the instance's IAM profile.
- instance
Type string - Type of instance to start.
- os string
- Name of operating system that will be installed.
- root
Block InstanceDevices Root Block Device[] - Configuration block for the root block device of the instance. See Block Devices below.
- root
Device stringType - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - security
Group string[]Ids - Associated security groups.
- ssh
Key stringName - Name of the SSH keypair that instances will have by default.
- state string
- Desired state of the instance. Valid values are
running
orstopped
. - status string
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - subnet
Id string - Subnet ID to attach to.
- tenancy string
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - virtualization
Type string - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
- layer_
ids Sequence[str] - List of the layers the instance will belong to.
- stack_
id str Identifier of the stack the instance will belong to.
The following arguments are optional:
- agent_
version str - OpsWorks agent to install. Default is
INHERIT
. - ami_
id str - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - architecture str
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - auto_
scaling_ strtype - Creates load-based or time-based instances. Valid values are
load
,timer
. - availability_
zone str - Name of the availability zone where instances will be created by default.
- created_
at str - Time that the instance was created.
- delete_
ebs bool - Whether to delete EBS volume on deletion. Default is
true
. - delete_
eip bool - Whether to delete the Elastic IP on deletion.
- ebs_
block_ Sequence[Instancedevices Ebs Block Device Args] - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- ebs_
optimized bool - Whether the launched EC2 instance will be EBS-optimized.
- ecs_
cluster_ strarn - ECS cluster's ARN for container instances.
- elastic_
ip str - Instance Elastic IP address.
- ephemeral_
block_ Sequence[Instancedevices Ephemeral Block Device Args] - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- hostname str
- Instance's host name.
- infrastructure_
class str - For registered instances, infrastructure class: ec2 or on-premises.
- install_
updates_ boolon_ boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - instance_
profile_ strarn - ARN of the instance's IAM profile.
- instance_
type str - Type of instance to start.
- os str
- Name of operating system that will be installed.
- root_
block_ Sequence[Instancedevices Root Block Device Args] - Configuration block for the root block device of the instance. See Block Devices below.
- root_
device_ strtype - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - security_
group_ Sequence[str]ids - Associated security groups.
- ssh_
key_ strname - Name of the SSH keypair that instances will have by default.
- state str
- Desired state of the instance. Valid values are
running
orstopped
. - status str
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - subnet_
id str - Subnet ID to attach to.
- tenancy str
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - virtualization_
type str - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
- layer
Ids List<String> - List of the layers the instance will belong to.
- stack
Id String Identifier of the stack the instance will belong to.
The following arguments are optional:
- agent
Version String - OpsWorks agent to install. Default is
INHERIT
. - ami
Id String - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - architecture String
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - auto
Scaling StringType - Creates load-based or time-based instances. Valid values are
load
,timer
. - availability
Zone String - Name of the availability zone where instances will be created by default.
- created
At String - Time that the instance was created.
- delete
Ebs Boolean - Whether to delete EBS volume on deletion. Default is
true
. - delete
Eip Boolean - Whether to delete the Elastic IP on deletion.
- ebs
Block List<Property Map>Devices - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- ebs
Optimized Boolean - Whether the launched EC2 instance will be EBS-optimized.
- ecs
Cluster StringArn - ECS cluster's ARN for container instances.
- elastic
Ip String - Instance Elastic IP address.
- ephemeral
Block List<Property Map>Devices - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- hostname String
- Instance's host name.
- infrastructure
Class String - For registered instances, infrastructure class: ec2 or on-premises.
- install
Updates BooleanOn Boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - instance
Profile StringArn - ARN of the instance's IAM profile.
- instance
Type String - Type of instance to start.
- os String
- Name of operating system that will be installed.
- root
Block List<Property Map>Devices - Configuration block for the root block device of the instance. See Block Devices below.
- root
Device StringType - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - security
Group List<String>Ids - Associated security groups.
- ssh
Key StringName - Name of the SSH keypair that instances will have by default.
- state String
- Desired state of the instance. Valid values are
running
orstopped
. - status String
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - subnet
Id String - Subnet ID to attach to.
- tenancy String
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - virtualization
Type String - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Ec2Instance
Id string - EC2 instance ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Service stringError Id - ID of the last service error.
- Platform string
- Instance's platform.
- Private
Dns string - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- Private
Ip string - Private IP address assigned to the instance.
- Public
Dns string - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- Public
Ip string - Public IP address assigned to the instance, if applicable.
- Registered
By string - For registered instances, who performed the registration.
- Reported
Agent stringVersion - Instance's reported AWS OpsWorks Stacks agent version.
- Reported
Os stringFamily - For registered instances, the reported operating system family.
- Reported
Os stringName - For registered instances, the reported operating system name.
- Reported
Os stringVersion - For registered instances, the reported operating system version.
- Root
Device stringVolume Id - Root device volume ID.
- Ssh
Host stringDsa Key Fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- Ssh
Host stringRsa Key Fingerprint - SSH key's RSA fingerprint.
- Ec2Instance
Id string - EC2 instance ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Service stringError Id - ID of the last service error.
- Platform string
- Instance's platform.
- Private
Dns string - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- Private
Ip string - Private IP address assigned to the instance.
- Public
Dns string - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- Public
Ip string - Public IP address assigned to the instance, if applicable.
- Registered
By string - For registered instances, who performed the registration.
- Reported
Agent stringVersion - Instance's reported AWS OpsWorks Stacks agent version.
- Reported
Os stringFamily - For registered instances, the reported operating system family.
- Reported
Os stringName - For registered instances, the reported operating system name.
- Reported
Os stringVersion - For registered instances, the reported operating system version.
- Root
Device stringVolume Id - Root device volume ID.
- Ssh
Host stringDsa Key Fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- Ssh
Host stringRsa Key Fingerprint - SSH key's RSA fingerprint.
- ec2Instance
Id String - EC2 instance ID.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Service StringError Id - ID of the last service error.
- platform String
- Instance's platform.
- private
Dns String - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- private
Ip String - Private IP address assigned to the instance.
- public
Dns String - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- public
Ip String - Public IP address assigned to the instance, if applicable.
- registered
By String - For registered instances, who performed the registration.
- reported
Agent StringVersion - Instance's reported AWS OpsWorks Stacks agent version.
- reported
Os StringFamily - For registered instances, the reported operating system family.
- reported
Os StringName - For registered instances, the reported operating system name.
- reported
Os StringVersion - For registered instances, the reported operating system version.
- root
Device StringVolume Id - Root device volume ID.
- ssh
Host StringDsa Key Fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- ssh
Host StringRsa Key Fingerprint - SSH key's RSA fingerprint.
- ec2Instance
Id string - EC2 instance ID.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Service stringError Id - ID of the last service error.
- platform string
- Instance's platform.
- private
Dns string - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- private
Ip string - Private IP address assigned to the instance.
- public
Dns string - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- public
Ip string - Public IP address assigned to the instance, if applicable.
- registered
By string - For registered instances, who performed the registration.
- reported
Agent stringVersion - Instance's reported AWS OpsWorks Stacks agent version.
- reported
Os stringFamily - For registered instances, the reported operating system family.
- reported
Os stringName - For registered instances, the reported operating system name.
- reported
Os stringVersion - For registered instances, the reported operating system version.
- root
Device stringVolume Id - Root device volume ID.
- ssh
Host stringDsa Key Fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- ssh
Host stringRsa Key Fingerprint - SSH key's RSA fingerprint.
- ec2_
instance_ strid - EC2 instance ID.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
service_ strerror_ id - ID of the last service error.
- platform str
- Instance's platform.
- private_
dns str - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- private_
ip str - Private IP address assigned to the instance.
- public_
dns str - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- public_
ip str - Public IP address assigned to the instance, if applicable.
- registered_
by str - For registered instances, who performed the registration.
- reported_
agent_ strversion - Instance's reported AWS OpsWorks Stacks agent version.
- reported_
os_ strfamily - For registered instances, the reported operating system family.
- reported_
os_ strname - For registered instances, the reported operating system name.
- reported_
os_ strversion - For registered instances, the reported operating system version.
- root_
device_ strvolume_ id - Root device volume ID.
- ssh_
host_ strdsa_ key_ fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- ssh_
host_ strrsa_ key_ fingerprint - SSH key's RSA fingerprint.
- ec2Instance
Id String - EC2 instance ID.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Service StringError Id - ID of the last service error.
- platform String
- Instance's platform.
- private
Dns String - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- private
Ip String - Private IP address assigned to the instance.
- public
Dns String - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- public
Ip String - Public IP address assigned to the instance, if applicable.
- registered
By String - For registered instances, who performed the registration.
- reported
Agent StringVersion - Instance's reported AWS OpsWorks Stacks agent version.
- reported
Os StringFamily - For registered instances, the reported operating system family.
- reported
Os StringName - For registered instances, the reported operating system name.
- reported
Os StringVersion - For registered instances, the reported operating system version.
- root
Device StringVolume Id - Root device volume ID.
- ssh
Host StringDsa Key Fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- ssh
Host StringRsa Key Fingerprint - SSH key's RSA fingerprint.
Look up Existing Instance Resource
Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
agent_version: Optional[str] = None,
ami_id: Optional[str] = None,
architecture: Optional[str] = None,
auto_scaling_type: Optional[str] = None,
availability_zone: Optional[str] = None,
created_at: Optional[str] = None,
delete_ebs: Optional[bool] = None,
delete_eip: Optional[bool] = None,
ebs_block_devices: Optional[Sequence[InstanceEbsBlockDeviceArgs]] = None,
ebs_optimized: Optional[bool] = None,
ec2_instance_id: Optional[str] = None,
ecs_cluster_arn: Optional[str] = None,
elastic_ip: Optional[str] = None,
ephemeral_block_devices: Optional[Sequence[InstanceEphemeralBlockDeviceArgs]] = None,
hostname: Optional[str] = None,
infrastructure_class: Optional[str] = None,
install_updates_on_boot: Optional[bool] = None,
instance_profile_arn: Optional[str] = None,
instance_type: Optional[str] = None,
last_service_error_id: Optional[str] = None,
layer_ids: Optional[Sequence[str]] = None,
os: Optional[str] = None,
platform: Optional[str] = None,
private_dns: Optional[str] = None,
private_ip: Optional[str] = None,
public_dns: Optional[str] = None,
public_ip: Optional[str] = None,
registered_by: Optional[str] = None,
reported_agent_version: Optional[str] = None,
reported_os_family: Optional[str] = None,
reported_os_name: Optional[str] = None,
reported_os_version: Optional[str] = None,
root_block_devices: Optional[Sequence[InstanceRootBlockDeviceArgs]] = None,
root_device_type: Optional[str] = None,
root_device_volume_id: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
ssh_host_dsa_key_fingerprint: Optional[str] = None,
ssh_host_rsa_key_fingerprint: Optional[str] = None,
ssh_key_name: Optional[str] = None,
stack_id: Optional[str] = None,
state: Optional[str] = None,
status: Optional[str] = None,
subnet_id: Optional[str] = None,
tenancy: Optional[str] = None,
virtualization_type: Optional[str] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState 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.
- Agent
Version string - OpsWorks agent to install. Default is
INHERIT
. - Ami
Id string - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - Architecture string
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - Auto
Scaling stringType - Creates load-based or time-based instances. Valid values are
load
,timer
. - Availability
Zone string - Name of the availability zone where instances will be created by default.
- Created
At string - Time that the instance was created.
- Delete
Ebs bool - Whether to delete EBS volume on deletion. Default is
true
. - Delete
Eip bool - Whether to delete the Elastic IP on deletion.
- Ebs
Block List<InstanceDevices Ebs Block Device> - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- Ebs
Optimized bool - Whether the launched EC2 instance will be EBS-optimized.
- Ec2Instance
Id string - EC2 instance ID.
- Ecs
Cluster stringArn - ECS cluster's ARN for container instances.
- Elastic
Ip string - Instance Elastic IP address.
- Ephemeral
Block List<InstanceDevices Ephemeral Block Device> - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- Hostname string
- Instance's host name.
- Infrastructure
Class string - For registered instances, infrastructure class: ec2 or on-premises.
- Install
Updates boolOn Boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - Instance
Profile stringArn - ARN of the instance's IAM profile.
- Instance
Type string - Type of instance to start.
- Last
Service stringError Id - ID of the last service error.
- Layer
Ids List<string> - List of the layers the instance will belong to.
- Os string
- Name of operating system that will be installed.
- Platform string
- Instance's platform.
- Private
Dns string - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- Private
Ip string - Private IP address assigned to the instance.
- Public
Dns string - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- Public
Ip string - Public IP address assigned to the instance, if applicable.
- Registered
By string - For registered instances, who performed the registration.
- Reported
Agent stringVersion - Instance's reported AWS OpsWorks Stacks agent version.
- Reported
Os stringFamily - For registered instances, the reported operating system family.
- Reported
Os stringName - For registered instances, the reported operating system name.
- Reported
Os stringVersion - For registered instances, the reported operating system version.
- Root
Block List<InstanceDevices Root Block Device> - Configuration block for the root block device of the instance. See Block Devices below.
- Root
Device stringType - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - Root
Device stringVolume Id - Root device volume ID.
- Security
Group List<string>Ids - Associated security groups.
- Ssh
Host stringDsa Key Fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- Ssh
Host stringRsa Key Fingerprint - SSH key's RSA fingerprint.
- Ssh
Key stringName - Name of the SSH keypair that instances will have by default.
- Stack
Id string Identifier of the stack the instance will belong to.
The following arguments are optional:
- State string
- Desired state of the instance. Valid values are
running
orstopped
. - Status string
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - Subnet
Id string - Subnet ID to attach to.
- Tenancy string
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - Virtualization
Type string - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
- Agent
Version string - OpsWorks agent to install. Default is
INHERIT
. - Ami
Id string - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - Architecture string
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - Auto
Scaling stringType - Creates load-based or time-based instances. Valid values are
load
,timer
. - Availability
Zone string - Name of the availability zone where instances will be created by default.
- Created
At string - Time that the instance was created.
- Delete
Ebs bool - Whether to delete EBS volume on deletion. Default is
true
. - Delete
Eip bool - Whether to delete the Elastic IP on deletion.
- Ebs
Block []InstanceDevices Ebs Block Device Args - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- Ebs
Optimized bool - Whether the launched EC2 instance will be EBS-optimized.
- Ec2Instance
Id string - EC2 instance ID.
- Ecs
Cluster stringArn - ECS cluster's ARN for container instances.
- Elastic
Ip string - Instance Elastic IP address.
- Ephemeral
Block []InstanceDevices Ephemeral Block Device Args - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- Hostname string
- Instance's host name.
- Infrastructure
Class string - For registered instances, infrastructure class: ec2 or on-premises.
- Install
Updates boolOn Boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - Instance
Profile stringArn - ARN of the instance's IAM profile.
- Instance
Type string - Type of instance to start.
- Last
Service stringError Id - ID of the last service error.
- Layer
Ids []string - List of the layers the instance will belong to.
- Os string
- Name of operating system that will be installed.
- Platform string
- Instance's platform.
- Private
Dns string - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- Private
Ip string - Private IP address assigned to the instance.
- Public
Dns string - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- Public
Ip string - Public IP address assigned to the instance, if applicable.
- Registered
By string - For registered instances, who performed the registration.
- Reported
Agent stringVersion - Instance's reported AWS OpsWorks Stacks agent version.
- Reported
Os stringFamily - For registered instances, the reported operating system family.
- Reported
Os stringName - For registered instances, the reported operating system name.
- Reported
Os stringVersion - For registered instances, the reported operating system version.
- Root
Block []InstanceDevices Root Block Device Args - Configuration block for the root block device of the instance. See Block Devices below.
- Root
Device stringType - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - Root
Device stringVolume Id - Root device volume ID.
- Security
Group []stringIds - Associated security groups.
- Ssh
Host stringDsa Key Fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- Ssh
Host stringRsa Key Fingerprint - SSH key's RSA fingerprint.
- Ssh
Key stringName - Name of the SSH keypair that instances will have by default.
- Stack
Id string Identifier of the stack the instance will belong to.
The following arguments are optional:
- State string
- Desired state of the instance. Valid values are
running
orstopped
. - Status string
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - Subnet
Id string - Subnet ID to attach to.
- Tenancy string
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - Virtualization
Type string - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
- agent
Version String - OpsWorks agent to install. Default is
INHERIT
. - ami
Id String - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - architecture String
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - auto
Scaling StringType - Creates load-based or time-based instances. Valid values are
load
,timer
. - availability
Zone String - Name of the availability zone where instances will be created by default.
- created
At String - Time that the instance was created.
- delete
Ebs Boolean - Whether to delete EBS volume on deletion. Default is
true
. - delete
Eip Boolean - Whether to delete the Elastic IP on deletion.
- ebs
Block List<InstanceDevices Ebs Block Device> - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- ebs
Optimized Boolean - Whether the launched EC2 instance will be EBS-optimized.
- ec2Instance
Id String - EC2 instance ID.
- ecs
Cluster StringArn - ECS cluster's ARN for container instances.
- elastic
Ip String - Instance Elastic IP address.
- ephemeral
Block List<InstanceDevices Ephemeral Block Device> - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- hostname String
- Instance's host name.
- infrastructure
Class String - For registered instances, infrastructure class: ec2 or on-premises.
- install
Updates BooleanOn Boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - instance
Profile StringArn - ARN of the instance's IAM profile.
- instance
Type String - Type of instance to start.
- last
Service StringError Id - ID of the last service error.
- layer
Ids List<String> - List of the layers the instance will belong to.
- os String
- Name of operating system that will be installed.
- platform String
- Instance's platform.
- private
Dns String - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- private
Ip String - Private IP address assigned to the instance.
- public
Dns String - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- public
Ip String - Public IP address assigned to the instance, if applicable.
- registered
By String - For registered instances, who performed the registration.
- reported
Agent StringVersion - Instance's reported AWS OpsWorks Stacks agent version.
- reported
Os StringFamily - For registered instances, the reported operating system family.
- reported
Os StringName - For registered instances, the reported operating system name.
- reported
Os StringVersion - For registered instances, the reported operating system version.
- root
Block List<InstanceDevices Root Block Device> - Configuration block for the root block device of the instance. See Block Devices below.
- root
Device StringType - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - root
Device StringVolume Id - Root device volume ID.
- security
Group List<String>Ids - Associated security groups.
- ssh
Host StringDsa Key Fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- ssh
Host StringRsa Key Fingerprint - SSH key's RSA fingerprint.
- ssh
Key StringName - Name of the SSH keypair that instances will have by default.
- stack
Id String Identifier of the stack the instance will belong to.
The following arguments are optional:
- state String
- Desired state of the instance. Valid values are
running
orstopped
. - status String
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - subnet
Id String - Subnet ID to attach to.
- tenancy String
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - virtualization
Type String - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
- agent
Version string - OpsWorks agent to install. Default is
INHERIT
. - ami
Id string - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - architecture string
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - auto
Scaling stringType - Creates load-based or time-based instances. Valid values are
load
,timer
. - availability
Zone string - Name of the availability zone where instances will be created by default.
- created
At string - Time that the instance was created.
- delete
Ebs boolean - Whether to delete EBS volume on deletion. Default is
true
. - delete
Eip boolean - Whether to delete the Elastic IP on deletion.
- ebs
Block InstanceDevices Ebs Block Device[] - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- ebs
Optimized boolean - Whether the launched EC2 instance will be EBS-optimized.
- ec2Instance
Id string - EC2 instance ID.
- ecs
Cluster stringArn - ECS cluster's ARN for container instances.
- elastic
Ip string - Instance Elastic IP address.
- ephemeral
Block InstanceDevices Ephemeral Block Device[] - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- hostname string
- Instance's host name.
- infrastructure
Class string - For registered instances, infrastructure class: ec2 or on-premises.
- install
Updates booleanOn Boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - instance
Profile stringArn - ARN of the instance's IAM profile.
- instance
Type string - Type of instance to start.
- last
Service stringError Id - ID of the last service error.
- layer
Ids string[] - List of the layers the instance will belong to.
- os string
- Name of operating system that will be installed.
- platform string
- Instance's platform.
- private
Dns string - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- private
Ip string - Private IP address assigned to the instance.
- public
Dns string - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- public
Ip string - Public IP address assigned to the instance, if applicable.
- registered
By string - For registered instances, who performed the registration.
- reported
Agent stringVersion - Instance's reported AWS OpsWorks Stacks agent version.
- reported
Os stringFamily - For registered instances, the reported operating system family.
- reported
Os stringName - For registered instances, the reported operating system name.
- reported
Os stringVersion - For registered instances, the reported operating system version.
- root
Block InstanceDevices Root Block Device[] - Configuration block for the root block device of the instance. See Block Devices below.
- root
Device stringType - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - root
Device stringVolume Id - Root device volume ID.
- security
Group string[]Ids - Associated security groups.
- ssh
Host stringDsa Key Fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- ssh
Host stringRsa Key Fingerprint - SSH key's RSA fingerprint.
- ssh
Key stringName - Name of the SSH keypair that instances will have by default.
- stack
Id string Identifier of the stack the instance will belong to.
The following arguments are optional:
- state string
- Desired state of the instance. Valid values are
running
orstopped
. - status string
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - subnet
Id string - Subnet ID to attach to.
- tenancy string
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - virtualization
Type string - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
- agent_
version str - OpsWorks agent to install. Default is
INHERIT
. - ami_
id str - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - architecture str
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - auto_
scaling_ strtype - Creates load-based or time-based instances. Valid values are
load
,timer
. - availability_
zone str - Name of the availability zone where instances will be created by default.
- created_
at str - Time that the instance was created.
- delete_
ebs bool - Whether to delete EBS volume on deletion. Default is
true
. - delete_
eip bool - Whether to delete the Elastic IP on deletion.
- ebs_
block_ Sequence[Instancedevices Ebs Block Device Args] - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- ebs_
optimized bool - Whether the launched EC2 instance will be EBS-optimized.
- ec2_
instance_ strid - EC2 instance ID.
- ecs_
cluster_ strarn - ECS cluster's ARN for container instances.
- elastic_
ip str - Instance Elastic IP address.
- ephemeral_
block_ Sequence[Instancedevices Ephemeral Block Device Args] - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- hostname str
- Instance's host name.
- infrastructure_
class str - For registered instances, infrastructure class: ec2 or on-premises.
- install_
updates_ boolon_ boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - instance_
profile_ strarn - ARN of the instance's IAM profile.
- instance_
type str - Type of instance to start.
- last_
service_ strerror_ id - ID of the last service error.
- layer_
ids Sequence[str] - List of the layers the instance will belong to.
- os str
- Name of operating system that will be installed.
- platform str
- Instance's platform.
- private_
dns str - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- private_
ip str - Private IP address assigned to the instance.
- public_
dns str - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- public_
ip str - Public IP address assigned to the instance, if applicable.
- registered_
by str - For registered instances, who performed the registration.
- reported_
agent_ strversion - Instance's reported AWS OpsWorks Stacks agent version.
- reported_
os_ strfamily - For registered instances, the reported operating system family.
- reported_
os_ strname - For registered instances, the reported operating system name.
- reported_
os_ strversion - For registered instances, the reported operating system version.
- root_
block_ Sequence[Instancedevices Root Block Device Args] - Configuration block for the root block device of the instance. See Block Devices below.
- root_
device_ strtype - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - root_
device_ strvolume_ id - Root device volume ID.
- security_
group_ Sequence[str]ids - Associated security groups.
- ssh_
host_ strdsa_ key_ fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- ssh_
host_ strrsa_ key_ fingerprint - SSH key's RSA fingerprint.
- ssh_
key_ strname - Name of the SSH keypair that instances will have by default.
- stack_
id str Identifier of the stack the instance will belong to.
The following arguments are optional:
- state str
- Desired state of the instance. Valid values are
running
orstopped
. - status str
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - subnet_
id str - Subnet ID to attach to.
- tenancy str
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - virtualization_
type str - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
- agent
Version String - OpsWorks agent to install. Default is
INHERIT
. - ami
Id String - AMI to use for the instance. If an AMI is specified,
os
must beCustom
. - architecture String
- Machine architecture for created instances. Valid values are
x86_64
ori386
. The default isx86_64
. - auto
Scaling StringType - Creates load-based or time-based instances. Valid values are
load
,timer
. - availability
Zone String - Name of the availability zone where instances will be created by default.
- created
At String - Time that the instance was created.
- delete
Ebs Boolean - Whether to delete EBS volume on deletion. Default is
true
. - delete
Eip Boolean - Whether to delete the Elastic IP on deletion.
- ebs
Block List<Property Map>Devices - Configuration block for additional EBS block devices to attach to the instance. See Block Devices below.
- ebs
Optimized Boolean - Whether the launched EC2 instance will be EBS-optimized.
- ec2Instance
Id String - EC2 instance ID.
- ecs
Cluster StringArn - ECS cluster's ARN for container instances.
- elastic
Ip String - Instance Elastic IP address.
- ephemeral
Block List<Property Map>Devices - Configuration block for ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below.
- hostname String
- Instance's host name.
- infrastructure
Class String - For registered instances, infrastructure class: ec2 or on-premises.
- install
Updates BooleanOn Boot - Controls where to install OS and package updates when the instance boots. Default is
true
. - instance
Profile StringArn - ARN of the instance's IAM profile.
- instance
Type String - Type of instance to start.
- last
Service StringError Id - ID of the last service error.
- layer
Ids List<String> - List of the layers the instance will belong to.
- os String
- Name of operating system that will be installed.
- platform String
- Instance's platform.
- private
Dns String - Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
- private
Ip String - Private IP address assigned to the instance.
- public
Dns String - Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
- public
Ip String - Public IP address assigned to the instance, if applicable.
- registered
By String - For registered instances, who performed the registration.
- reported
Agent StringVersion - Instance's reported AWS OpsWorks Stacks agent version.
- reported
Os StringFamily - For registered instances, the reported operating system family.
- reported
Os StringName - For registered instances, the reported operating system name.
- reported
Os StringVersion - For registered instances, the reported operating system version.
- root
Block List<Property Map>Devices - Configuration block for the root block device of the instance. See Block Devices below.
- root
Device StringType - Name of the type of root device instances will have by default. Valid values are
ebs
orinstance-store
. - root
Device StringVolume Id - Root device volume ID.
- security
Group List<String>Ids - Associated security groups.
- ssh
Host StringDsa Key Fingerprint - SSH key's Deep Security Agent (DSA) fingerprint.
- ssh
Host StringRsa Key Fingerprint - SSH key's RSA fingerprint.
- ssh
Key StringName - Name of the SSH keypair that instances will have by default.
- stack
Id String Identifier of the stack the instance will belong to.
The following arguments are optional:
- state String
- Desired state of the instance. Valid values are
running
orstopped
. - status String
- Instance status. Will be one of
booting
,connection_lost
,online
,pending
,rebooting
,requested
,running_setup
,setup_failed
,shutting_down
,start_failed
,stop_failed
,stopped
,stopping
,terminated
, orterminating
. - subnet
Id String - Subnet ID to attach to.
- tenancy String
- Instance tenancy to use. Valid values are
default
,dedicated
orhost
. - virtualization
Type String - Keyword to choose what virtualization mode created instances will use. Valid values are
paravirtual
orhvm
.
Supporting Types
InstanceEbsBlockDevice, InstanceEbsBlockDeviceArgs
- Device
Name string - Delete
On boolTermination - Iops int
- Snapshot
Id string - Volume
Size int - Volume
Type string
- Device
Name string - Delete
On boolTermination - Iops int
- Snapshot
Id string - Volume
Size int - Volume
Type string
- device
Name String - delete
On BooleanTermination - iops Integer
- snapshot
Id String - volume
Size Integer - volume
Type String
- device
Name string - delete
On booleanTermination - iops number
- snapshot
Id string - volume
Size number - volume
Type string
- device_
name str - delete_
on_ booltermination - iops int
- snapshot_
id str - volume_
size int - volume_
type str
- device
Name String - delete
On BooleanTermination - iops Number
- snapshot
Id String - volume
Size Number - volume
Type String
InstanceEphemeralBlockDevice, InstanceEphemeralBlockDeviceArgs
- Device
Name string - Virtual
Name string
- Device
Name string - Virtual
Name string
- device
Name String - virtual
Name String
- device
Name string - virtual
Name string
- device_
name str - virtual_
name str
- device
Name String - virtual
Name String
InstanceRootBlockDevice, InstanceRootBlockDeviceArgs
- Delete
On boolTermination - Iops int
- Volume
Size int - Volume
Type string
- Delete
On boolTermination - Iops int
- Volume
Size int - Volume
Type string
- delete
On BooleanTermination - iops Integer
- volume
Size Integer - volume
Type String
- delete
On booleanTermination - iops number
- volume
Size number - volume
Type string
- delete_
on_ booltermination - iops int
- volume_
size int - volume_
type str
- delete
On BooleanTermination - iops Number
- volume
Size Number - volume
Type String
Import
Using pulumi import
, import Opsworks Instances using the instance id
. For example:
$ pulumi import aws:opsworks/instance:Instance my_instance 4d6d1710-ded9-42a1-b08e-b043ad7af1e2
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.