Class Instance
Provides an OpsWorks instance resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var my_instance = new Aws.OpsWorks.Instance("my-instance", new Aws.OpsWorks.InstanceArgs
{
InstanceType = "t2.micro",
LayerIds =
{
aws_opsworks_custom_layer.My_layer.Id,
},
Os = "Amazon Linux 2015.09",
StackId = aws_opsworks_stack.Main.Id,
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.
The root_block_device mapping supports the following:
volume_type - (Optional) The type of volume. Can be "standard", "gp2",
or "io1". (Default: "standard").
volume_size - (Optional) The size of the volume in gigabytes.
iops - (Optional) The amount of provisioned
IOPS.
This must be set with a volume_type of "io1".
delete_on_termination - (Optional) Whether the volume should be destroyed
on instance termination (Default: true).
Modifying any of the root_block_device settings requires resource
replacement.
Each ebs_block_device supports the following:
device_name - The name of the device to mount.
snapshot_id - (Optional) The Snapshot ID to mount.
volume_type - (Optional) The type of volume. Can be "standard", "gp2",
or "io1". (Default: "standard").
volume_size - (Optional) The size of the volume in gigabytes.
iops - (Optional) The amount of provisioned
IOPS.
This must be set with a volume_type of "io1".
delete_on_termination - (Optional) Whether the volume should be destroyed
on instance termination (Default: true).
Modifying any ebs_block_device currently requires resource replacement.
Each ephemeral_block_device supports the following:
device_name - The 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}".
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 the up command with the --replace argument.
Inheritance
System.Object
Instance
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Pulumi.Aws.dll
Syntax
public class Instance : CustomResource
Constructors
View Source
Instance(String, InstanceArgs, CustomResourceOptions)
Create a Instance resource with the given unique name, arguments, and options.
Declaration
public Instance(string name, InstanceArgs args, CustomResourceOptions options = null)
Parameters
| Type |
Name |
Description |
| System.String |
name |
The unique name of the resource
|
| InstanceArgs |
args |
The arguments used to populate this resource's properties
|
| CustomResourceOptions |
options |
A bag of options that control this resource's behavior
|
Properties
View Source
AgentVersion
The AWS OpsWorks agent to install. Defaults to "INHERIT".
Declaration
public Output<string> AgentVersion { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
AmiId
The AMI to use for the instance. If an AMI is specified, os must be "Custom".
Declaration
public Output<string> AmiId { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Architecture
Machine architecture for created instances. Can be either "x86_64" (the default) or "i386"
Declaration
public Output<string> Architecture { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
AutoScalingType
Creates load-based or time-based instances. If set, can be either: "load" or "timer".
Declaration
public Output<string> AutoScalingType { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
AvailabilityZone
Name of the availability zone where instances will be created
by default.
Declaration
public Output<string> AvailabilityZone { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
CreatedAt
Declaration
public Output<string> CreatedAt { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
DeleteEbs
Declaration
public Output<bool?> DeleteEbs { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
DeleteEip
Declaration
public Output<bool?> DeleteEip { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
EbsBlockDevices
Additional EBS block devices to attach to the
instance. See Block Devices below for details.
Declaration
public Output<ImmutableArray<InstanceEbsBlockDevice>> EbsBlockDevices { get; }
Property Value
View Source
EbsOptimized
If true, the launched EC2 instance will be EBS-optimized.
Declaration
public Output<bool?> EbsOptimized { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
Ec2InstanceId
Declaration
public Output<string> Ec2InstanceId { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
EcsClusterArn
Declaration
public Output<string> EcsClusterArn { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
ElasticIp
Declaration
public Output<string> ElasticIp { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
EphemeralBlockDevices
Customize Ephemeral (also known as
"Instance Store") volumes on the instance. See Block Devices below for details.
Declaration
public Output<ImmutableArray<InstanceEphemeralBlockDevice>> EphemeralBlockDevices { get; }
Property Value
View Source
Hostname
The instance's host name.
Declaration
public Output<string> Hostname { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
InfrastructureClass
Declaration
public Output<string> InfrastructureClass { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
InstallUpdatesOnBoot
Controls where to install OS and package updates when the instance boots. Defaults to true.
Declaration
public Output<bool?> InstallUpdatesOnBoot { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
InstanceProfileArn
Declaration
public Output<string> InstanceProfileArn { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
InstanceType
The type of instance to start
Declaration
public Output<string> InstanceType { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
LastServiceErrorId
Declaration
public Output<string> LastServiceErrorId { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
LayerIds
The ids of the layers the instance will belong to.
Declaration
public Output<ImmutableArray<string>> LayerIds { get; }
Property Value
| Type |
Description |
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
|
View Source
Os
Name of operating system that will be installed.
Declaration
public Output<string> Os { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Declaration
public Output<string> Platform { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
PrivateDns
The 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
Declaration
public Output<string> PrivateDns { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
PrivateIp
The private IP address assigned to the instance
Declaration
public Output<string> PrivateIp { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
PublicDns
The public DNS name assigned to the instance. For EC2-VPC, this
is only available if you've enabled DNS hostnames for your VPC
Declaration
public Output<string> PublicDns { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
PublicIp
The public IP address assigned to the instance, if applicable.
Declaration
public Output<string> PublicIp { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
RegisteredBy
Declaration
public Output<string> RegisteredBy { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
ReportedAgentVersion
Declaration
public Output<string> ReportedAgentVersion { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
ReportedOsFamily
Declaration
public Output<string> ReportedOsFamily { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
ReportedOsName
Declaration
public Output<string> ReportedOsName { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
ReportedOsVersion
Declaration
public Output<string> ReportedOsVersion { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
RootBlockDevices
Customize details about the root block
device of the instance. See Block Devices below for details.
Declaration
public Output<ImmutableArray<InstanceRootBlockDevice>> RootBlockDevices { get; }
Property Value
View Source
RootDeviceType
Name of the type of root device instances will have by default. Can be either "ebs" or "instance-store"
Declaration
public Output<string> RootDeviceType { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
RootDeviceVolumeId
Declaration
public Output<string> RootDeviceVolumeId { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
SecurityGroupIds
The associated security groups.
Declaration
public Output<ImmutableArray<string>> SecurityGroupIds { get; }
Property Value
| Type |
Description |
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
|
View Source
SshHostDsaKeyFingerprint
Declaration
public Output<string> SshHostDsaKeyFingerprint { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
SshHostRsaKeyFingerprint
Declaration
public Output<string> SshHostRsaKeyFingerprint { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
SshKeyName
Name of the SSH keypair that instances will have by default.
Declaration
public Output<string> SshKeyName { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
StackId
The id of the stack the instance will belong to.
Declaration
public Output<string> StackId { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
State
The desired state of the instance. Can be either "running" or "stopped".
Declaration
public Output<string> State { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Status
Declaration
public Output<string> Status { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
SubnetId
Declaration
public Output<string> SubnetId { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Tenancy
Instance tenancy to use. Can be one of "default", "dedicated" or "host"
Declaration
public Output<string> Tenancy { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
VirtualizationType
Keyword to choose what virtualization mode created instances
will use. Can be either "paravirtual" or "hvm".
Declaration
public Output<string> VirtualizationType { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
Methods
View Source
Get an existing Instance resource's state with the given name, ID, and optional extra
properties used to qualify the lookup.
Declaration
public static Instance Get(string name, Input<string> id, InstanceState state = null, CustomResourceOptions options = null)
Parameters
| Type |
Name |
Description |
| System.String |
name |
The unique name of the resulting resource.
|
| Input<System.String> |
id |
The unique provider ID of the resource to lookup.
|
| InstanceState |
state |
Any extra arguments used during the lookup.
|
| CustomResourceOptions |
options |
A bag of options that control this resource's behavior
|
Returns