pulumi_wasm_providers_aws_mini::ec2::instance

Struct InstanceResult

source
pub struct InstanceResult {
Show 58 fields pub ami: Output<String>, pub arn: Output<String>, pub associate_public_ip_address: Output<bool>, pub availability_zone: Output<String>, pub capacity_reservation_specification: Output<InstanceCapacityReservationSpecification>, pub cpu_core_count: Output<i32>, pub cpu_options: Output<InstanceCpuOptions>, pub cpu_threads_per_core: Output<i32>, pub credit_specification: Output<Option<InstanceCreditSpecification>>, pub disable_api_stop: Output<bool>, pub disable_api_termination: Output<bool>, pub ebs_block_devices: Output<Vec<InstanceEbsBlockDevice>>, pub ebs_optimized: Output<bool>, pub enable_primary_ipv6: Output<bool>, pub enclave_options: Output<InstanceEnclaveOptions>, pub ephemeral_block_devices: Output<Vec<InstanceEphemeralBlockDevice>>, pub get_password_data: Output<Option<bool>>, pub hibernation: Output<Option<bool>>, pub host_id: Output<String>, pub host_resource_group_arn: Output<String>, pub iam_instance_profile: Output<String>, pub instance_initiated_shutdown_behavior: Output<String>, pub instance_lifecycle: Output<String>, pub instance_market_options: Output<InstanceInstanceMarketOptions>, pub instance_state: Output<String>, pub instance_type: Output<String>, pub ipv6_address_count: Output<i32>, pub ipv6_addresses: Output<Vec<String>>, pub key_name: Output<String>, pub launch_template: Output<Option<InstanceLaunchTemplate>>, pub maintenance_options: Output<InstanceMaintenanceOptions>, pub metadata_options: Output<InstanceMetadataOptions>, pub monitoring: Output<bool>, pub network_interfaces: Output<Vec<InstanceNetworkInterface>>, pub outpost_arn: Output<String>, pub password_data: Output<String>, pub placement_group: Output<String>, pub placement_partition_number: Output<i32>, pub primary_network_interface_id: Output<String>, pub private_dns: Output<String>, pub private_dns_name_options: Output<InstancePrivateDnsNameOptions>, pub private_ip: Output<String>, pub public_dns: Output<String>, pub public_ip: Output<String>, pub root_block_device: Output<InstanceRootBlockDevice>, pub secondary_private_ips: Output<Vec<String>>, pub security_groups: Output<Vec<String>>, pub source_dest_check: Output<Option<bool>>, pub spot_instance_request_id: Output<String>, pub subnet_id: Output<String>, pub tags: Output<Option<HashMap<String, String>>>, pub tags_all: Output<HashMap<String, String>>, pub tenancy: Output<String>, pub user_data: Output<String>, pub user_data_base64: Output<String>, pub user_data_replace_on_change: Output<Option<bool>>, pub volume_tags: Output<Option<HashMap<String, String>>>, pub vpc_security_group_ids: Output<Vec<String>>,
}

Fields§

§ami: Output<String>

AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.

§arn: Output<String>

ARN of the instance.

§associate_public_ip_address: Output<bool>

Whether to associate a public IP address with an instance in a VPC.

§availability_zone: Output<String>

AZ to start the instance in.

§capacity_reservation_specification: Output<InstanceCapacityReservationSpecification>

Describes an instance’s Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

§cpu_core_count: Output<i32>

Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

§cpu_options: Output<InstanceCpuOptions>

The CPU options for the instance. See CPU Options below for more details.

§cpu_threads_per_core: Output<i32>

If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

§credit_specification: Output<Option<InstanceCreditSpecification>>

Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.

§disable_api_stop: Output<bool>

If true, enables EC2 Instance Stop Protection.

§disable_api_termination: Output<bool>§ebs_block_devices: Output<Vec<InstanceEbsBlockDevice>>

One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.

§ebs_optimized: Output<bool>

If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.

§enable_primary_ipv6: Output<bool>

Whether to assign a primary IPv6 Global Unicast Address (GUA) to the instance when launched in a dual-stack or IPv6-only subnet. A primary IPv6 address ensures a consistent IPv6 address for the instance and is automatically assigned by AWS to the ENI. Once enabled, the first IPv6 GUA becomes the primary IPv6 address and cannot be disabled. The primary IPv6 address remains until the instance is terminated or the ENI is detached. Disabling enable_primary_ipv6 after it has been enabled forces recreation of the instance.

§enclave_options: Output<InstanceEnclaveOptions>

Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.

§ephemeral_block_devices: Output<Vec<InstanceEphemeralBlockDevice>>

One or more configuration blocks to customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.

§get_password_data: Output<Option<bool>>

If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.

§hibernation: Output<Option<bool>>

If true, the launched EC2 instance will support hibernation.

§host_id: Output<String>

ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.

§host_resource_group_arn: Output<String>

ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.

§iam_instance_profile: Output<String>

IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.

§instance_initiated_shutdown_behavior: Output<String>

Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.

§instance_lifecycle: Output<String>

Indicates whether this is a Spot Instance or a Scheduled Instance.

§instance_market_options: Output<InstanceInstanceMarketOptions>

Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.

§instance_state: Output<String>

State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.

§instance_type: Output<String>

Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.

§ipv6_address_count: Output<i32>

Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.

§ipv6_addresses: Output<Vec<String>>

Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface

§key_name: Output<String>

Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.

§launch_template: Output<Option<InstanceLaunchTemplate>>

Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.

§maintenance_options: Output<InstanceMaintenanceOptions>

Maintenance and recovery options for the instance. See Maintenance Options below for more details.

§metadata_options: Output<InstanceMetadataOptions>

Customize the metadata options of the instance. See Metadata Options below for more details.

§monitoring: Output<bool>

If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)

§network_interfaces: Output<Vec<InstanceNetworkInterface>>

Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.

§outpost_arn: Output<String>

ARN of the Outpost the instance is assigned to.

§password_data: Output<String>

Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password for instances running Microsoft Windows. This attribute is only exported if get_password_data is true. Note that this encrypted value will be stored in the state file, as with all exported attributes. See GetPasswordData for more information.

§placement_group: Output<String>

Placement Group to start the instance in.

§placement_partition_number: Output<i32>

Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource’s strategy argument is set to "partition".

§primary_network_interface_id: Output<String>

ID of the instance’s primary network interface.

§private_dns: Output<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_dns_name_options: Output<InstancePrivateDnsNameOptions>

Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.

§private_ip: Output<String>

Private IP address to associate with the instance in a VPC.

§public_dns: Output<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: Output<String>

Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP’s address directly and not use public_ip as this field will change after the EIP is attached.

§root_block_device: Output<InstanceRootBlockDevice>

Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.

§secondary_private_ips: Output<Vec<String>>

List of secondary private IPv4 addresses to assign to the instance’s primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.

§security_groups: Output<Vec<String>>

List of security group names to associate with.

NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

§source_dest_check: Output<Option<bool>>

Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.

§spot_instance_request_id: Output<String>

If the request is a Spot Instance request, the ID of the request.

§subnet_id: Output<String>

VPC Subnet ID to launch in.

§tags: Output<Option<HashMap<String, String>>>

Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

§tags_all: Output<HashMap<String, String>>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

§tenancy: Output<String>

Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.

§user_data: Output<String>

User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate of the EC2 instance.

§user_data_base64: Output<String>

Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate of the EC2 instance.

§user_data_replace_on_change: Output<Option<bool>>

When used in combination with user_data or user_data_base64 will trigger a destroy and recreate of the EC2 instance when set to true. Defaults to false if not set.

§volume_tags: Output<Option<HashMap<String, String>>>

Map of tags to assign, at instance-creation time, to root and EBS volumes.

NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

§vpc_security_group_ids: Output<Vec<String>>

List of security group IDs to associate with.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.