Come join Pulumi for the industry's first Cloud Engineering Summit! October 7–8. Save Your Spot

This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.

ec2

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

class pulumi_aws.ec2.Ami(resource_name, opts=None, architecture=None, description=None, ebs_block_devices=None, ena_support=None, ephemeral_block_devices=None, image_location=None, kernel_id=None, name=None, ramdisk_id=None, root_device_name=None, sriov_net_support=None, tags=None, virtualization_type=None, __props__=None, __name__=None, __opts__=None)

The AMI resource allows the creation and management of a completely-custom Amazon Machine Image (AMI).

If you just want to duplicate an existing AMI, possibly copying it to another region, it’s better to use ec2.AmiCopy instead.

If you just want to share an existing AMI with another AWS account, it’s better to use ec2.AmiLaunchPermission instead.

import pulumi
import pulumi_aws as aws

# Create an AMI that will start a machine whose root device is backed by
# an EBS volume populated from a snapshot. It is assumed that such a snapshot
# already exists with the id "snap-xxxxxxxx".
example = aws.ec2.Ami("example",
    ebs_block_devices=[{
        "device_name": "/dev/xvda",
        "snapshot_id": "snap-xxxxxxxx",
        "volume_size": 8,
    }],
    root_device_name="/dev/xvda",
    virtualization_type="hvm")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • architecture (pulumi.Input[str]) – Machine architecture for created instances. Defaults to “x86_64”.

  • description (pulumi.Input[str]) – A longer, human-readable description for the AMI.

  • ebs_block_devices (pulumi.Input[list]) – Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.

  • ena_support (pulumi.Input[bool]) – Specifies whether enhanced networking with ENA is enabled. Defaults to false.

  • ephemeral_block_devices (pulumi.Input[list]) – Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.

  • image_location (pulumi.Input[str]) – Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.

  • kernel_id (pulumi.Input[str]) – The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.

  • name (pulumi.Input[str]) – A region-unique name for the AMI.

  • ramdisk_id (pulumi.Input[str]) – The id of an initrd image (ARI) that will be used when booting the created instances.

  • root_device_name (pulumi.Input[str]) – The name of the root device (for example, /dev/sda1, or /dev/xvda).

  • sriov_net_support (pulumi.Input[str]) – When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • virtualization_type (pulumi.Input[str]) – Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.

The ebs_block_devices object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • encrypted (pulumi.Input[bool]) - Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • iops (pulumi.Input[float]) - Number of I/O operations per second the created volumes will support.

  • snapshot_id (pulumi.Input[str]) - The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.

  • volume_size (pulumi.Input[float]) - The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.

  • volumeType (pulumi.Input[str]) - The type of EBS volume to create. Can be one of “standard” (the default), “io1” or “gp2”.

The ephemeral_block_devices object supports the following:

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • virtualName (pulumi.Input[str]) - A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.

architecture: pulumi.Output[str] = None

Machine architecture for created instances. Defaults to “x86_64”.

description: pulumi.Output[str] = None

A longer, human-readable description for the AMI.

ebs_block_devices: pulumi.Output[list] = None

Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.

  • deleteOnTermination (bool) - Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.

  • device_name (str) - The path at which the device is exposed to created instances.

  • encrypted (bool) - Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • iops (float) - Number of I/O operations per second the created volumes will support.

  • snapshot_id (str) - The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.

  • volume_size (float) - The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.

  • volumeType (str) - The type of EBS volume to create. Can be one of “standard” (the default), “io1” or “gp2”.

ena_support: pulumi.Output[bool] = None

Specifies whether enhanced networking with ENA is enabled. Defaults to false.

ephemeral_block_devices: pulumi.Output[list] = None

Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.

  • device_name (str) - The path at which the device is exposed to created instances.

  • virtualName (str) - A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.

image_location: pulumi.Output[str] = None

Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.

kernel_id: pulumi.Output[str] = None

The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.

name: pulumi.Output[str] = None

A region-unique name for the AMI.

ramdisk_id: pulumi.Output[str] = None

The id of an initrd image (ARI) that will be used when booting the created instances.

root_device_name: pulumi.Output[str] = None

The name of the root device (for example, /dev/sda1, or /dev/xvda).

root_snapshot_id: pulumi.Output[str] = None

The Snapshot ID for the root volume (for EBS-backed AMIs)

sriov_net_support: pulumi.Output[str] = None

When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

virtualization_type: pulumi.Output[str] = None

Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.

static get(resource_name, id, opts=None, architecture=None, description=None, ebs_block_devices=None, ena_support=None, ephemeral_block_devices=None, image_location=None, kernel_id=None, manage_ebs_snapshots=None, name=None, ramdisk_id=None, root_device_name=None, root_snapshot_id=None, sriov_net_support=None, tags=None, virtualization_type=None)

Get an existing Ami resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • architecture (pulumi.Input[str]) – Machine architecture for created instances. Defaults to “x86_64”.

  • description (pulumi.Input[str]) – A longer, human-readable description for the AMI.

  • ebs_block_devices (pulumi.Input[list]) – Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.

  • ena_support (pulumi.Input[bool]) – Specifies whether enhanced networking with ENA is enabled. Defaults to false.

  • ephemeral_block_devices (pulumi.Input[list]) – Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.

  • image_location (pulumi.Input[str]) – Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.

  • kernel_id (pulumi.Input[str]) – The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.

  • name (pulumi.Input[str]) – A region-unique name for the AMI.

  • ramdisk_id (pulumi.Input[str]) – The id of an initrd image (ARI) that will be used when booting the created instances.

  • root_device_name (pulumi.Input[str]) – The name of the root device (for example, /dev/sda1, or /dev/xvda).

  • root_snapshot_id (pulumi.Input[str]) – The Snapshot ID for the root volume (for EBS-backed AMIs)

  • sriov_net_support (pulumi.Input[str]) – When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • virtualization_type (pulumi.Input[str]) – Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.

The ebs_block_devices object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • encrypted (pulumi.Input[bool]) - Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • iops (pulumi.Input[float]) - Number of I/O operations per second the created volumes will support.

  • snapshot_id (pulumi.Input[str]) - The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.

  • volume_size (pulumi.Input[float]) - The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.

  • volumeType (pulumi.Input[str]) - The type of EBS volume to create. Can be one of “standard” (the default), “io1” or “gp2”.

The ephemeral_block_devices object supports the following:

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • virtualName (pulumi.Input[str]) - A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.AmiCopy(resource_name, opts=None, description=None, ebs_block_devices=None, encrypted=None, ephemeral_block_devices=None, kms_key_id=None, name=None, source_ami_id=None, source_ami_region=None, tags=None, __props__=None, __name__=None, __opts__=None)

The “AMI copy” resource allows duplication of an Amazon Machine Image (AMI), including cross-region copies.

If the source AMI has associated EBS snapshots, those will also be duplicated along with the AMI.

This is useful for taking a single AMI provisioned in one region and making it available in another for a multi-region deployment.

Copying an AMI can take several minutes. The creation of this resource will block until the new AMI is available for use on new instances.

import pulumi
import pulumi_aws as aws

example = aws.ec2.AmiCopy("example",
    description="A copy of ami-xxxxxxxx",
    source_ami_id="ami-xxxxxxxx",
    source_ami_region="us-west-1",
    tags={
        "Name": "HelloWorld",
    })
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A longer, human-readable description for the AMI.

  • ebs_block_devices (pulumi.Input[list]) – Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.

  • encrypted (pulumi.Input[bool]) – Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • ephemeral_block_devices (pulumi.Input[list]) – Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.

  • kms_key_id (pulumi.Input[str]) – The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when encrypting the snapshots of an image during a copy operation. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used

  • name (pulumi.Input[str]) – A region-unique name for the AMI.

  • source_ami_id (pulumi.Input[str]) – The id of the AMI to copy. This id must be valid in the region given by source_ami_region.

  • source_ami_region (pulumi.Input[str]) – The region from which the AMI will be copied. This may be the same as the AWS provider region in order to create a copy within the same region.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

The ebs_block_devices object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • encrypted (pulumi.Input[bool]) - Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • iops (pulumi.Input[float]) - Number of I/O operations per second the created volumes will support.

  • snapshot_id (pulumi.Input[str]) - The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.

  • volume_size (pulumi.Input[float]) - The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.

  • volumeType (pulumi.Input[str]) - The type of EBS volume to create. Can be one of “standard” (the default), “io1” or “gp2”.

The ephemeral_block_devices object supports the following:

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • virtualName (pulumi.Input[str]) - A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.

architecture: pulumi.Output[str] = None

Machine architecture for created instances. Defaults to “x86_64”.

description: pulumi.Output[str] = None

A longer, human-readable description for the AMI.

ebs_block_devices: pulumi.Output[list] = None

Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.

  • deleteOnTermination (bool) - Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.

  • device_name (str) - The path at which the device is exposed to created instances.

  • encrypted (bool) - Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • iops (float) - Number of I/O operations per second the created volumes will support.

  • snapshot_id (str) - The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.

  • volume_size (float) - The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.

  • volumeType (str) - The type of EBS volume to create. Can be one of “standard” (the default), “io1” or “gp2”.

ena_support: pulumi.Output[bool] = None

Specifies whether enhanced networking with ENA is enabled. Defaults to false.

encrypted: pulumi.Output[bool] = None

Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

ephemeral_block_devices: pulumi.Output[list] = None

Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.

  • device_name (str) - The path at which the device is exposed to created instances.

  • virtualName (str) - A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.

image_location: pulumi.Output[str] = None

Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.

kernel_id: pulumi.Output[str] = None

The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.

kms_key_id: pulumi.Output[str] = None

The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when encrypting the snapshots of an image during a copy operation. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used

name: pulumi.Output[str] = None

A region-unique name for the AMI.

ramdisk_id: pulumi.Output[str] = None

The id of an initrd image (ARI) that will be used when booting the created instances.

root_device_name: pulumi.Output[str] = None

The name of the root device (for example, /dev/sda1, or /dev/xvda).

source_ami_id: pulumi.Output[str] = None

The id of the AMI to copy. This id must be valid in the region given by source_ami_region.

source_ami_region: pulumi.Output[str] = None

The region from which the AMI will be copied. This may be the same as the AWS provider region in order to create a copy within the same region.

sriov_net_support: pulumi.Output[str] = None

When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

virtualization_type: pulumi.Output[str] = None

Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.

static get(resource_name, id, opts=None, architecture=None, description=None, ebs_block_devices=None, ena_support=None, encrypted=None, ephemeral_block_devices=None, image_location=None, kernel_id=None, kms_key_id=None, manage_ebs_snapshots=None, name=None, ramdisk_id=None, root_device_name=None, root_snapshot_id=None, source_ami_id=None, source_ami_region=None, sriov_net_support=None, tags=None, virtualization_type=None)

Get an existing AmiCopy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • architecture (pulumi.Input[str]) – Machine architecture for created instances. Defaults to “x86_64”.

  • description (pulumi.Input[str]) – A longer, human-readable description for the AMI.

  • ebs_block_devices (pulumi.Input[list]) – Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.

  • ena_support (pulumi.Input[bool]) – Specifies whether enhanced networking with ENA is enabled. Defaults to false.

  • encrypted (pulumi.Input[bool]) – Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • ephemeral_block_devices (pulumi.Input[list]) – Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.

  • image_location (pulumi.Input[str]) – Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.

  • kernel_id (pulumi.Input[str]) – The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.

  • kms_key_id (pulumi.Input[str]) – The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when encrypting the snapshots of an image during a copy operation. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used

  • name (pulumi.Input[str]) – A region-unique name for the AMI.

  • ramdisk_id (pulumi.Input[str]) – The id of an initrd image (ARI) that will be used when booting the created instances.

  • root_device_name (pulumi.Input[str]) – The name of the root device (for example, /dev/sda1, or /dev/xvda).

  • source_ami_id (pulumi.Input[str]) – The id of the AMI to copy. This id must be valid in the region given by source_ami_region.

  • source_ami_region (pulumi.Input[str]) – The region from which the AMI will be copied. This may be the same as the AWS provider region in order to create a copy within the same region.

  • sriov_net_support (pulumi.Input[str]) – When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • virtualization_type (pulumi.Input[str]) – Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.

The ebs_block_devices object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • encrypted (pulumi.Input[bool]) - Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • iops (pulumi.Input[float]) - Number of I/O operations per second the created volumes will support.

  • snapshot_id (pulumi.Input[str]) - The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.

  • volume_size (pulumi.Input[float]) - The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.

  • volumeType (pulumi.Input[str]) - The type of EBS volume to create. Can be one of “standard” (the default), “io1” or “gp2”.

The ephemeral_block_devices object supports the following:

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • virtualName (pulumi.Input[str]) - A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.AmiFromInstance(resource_name, opts=None, description=None, ebs_block_devices=None, ephemeral_block_devices=None, name=None, snapshot_without_reboot=None, source_instance_id=None, tags=None, __props__=None, __name__=None, __opts__=None)

The “AMI from instance” resource allows the creation of an Amazon Machine Image (AMI) modelled after an existing EBS-backed EC2 instance.

The created AMI will refer to implicitly-created snapshots of the instance’s EBS volumes and mimick its assigned block device configuration at the time the resource is created.

This resource is best applied to an instance that is stopped when this instance is created, so that the contents of the created image are predictable. When applied to an instance that is running, the instance will be stopped before taking the snapshots and then started back up again, resulting in a period of downtime.

Note that the source instance is inspected only at the initial creation of this resource. Ongoing updates to the referenced instance will not be propagated into the generated AMI. Users may taint or otherwise recreate the resource in order to produce a fresh snapshot.

import pulumi
import pulumi_aws as aws

example = aws.ec2.AmiFromInstance("example", source_instance_id="i-xxxxxxxx")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A longer, human-readable description for the AMI.

  • ebs_block_devices (pulumi.Input[list]) – Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.

  • ephemeral_block_devices (pulumi.Input[list]) – Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.

  • name (pulumi.Input[str]) – A region-unique name for the AMI.

  • snapshot_without_reboot (pulumi.Input[bool]) – Boolean that overrides the behavior of stopping the instance before snapshotting. This is risky since it may cause a snapshot of an inconsistent filesystem state, but can be used to avoid downtime if the user otherwise guarantees that no filesystem writes will be underway at the time of snapshot.

  • source_instance_id (pulumi.Input[str]) – The id of the instance to use as the basis of the AMI.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

The ebs_block_devices object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • encrypted (pulumi.Input[bool]) - Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • iops (pulumi.Input[float]) - Number of I/O operations per second the created volumes will support.

  • snapshot_id (pulumi.Input[str]) - The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.

  • volume_size (pulumi.Input[float]) - The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.

  • volumeType (pulumi.Input[str]) - The type of EBS volume to create. Can be one of “standard” (the default), “io1” or “gp2”.

The ephemeral_block_devices object supports the following:

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • virtualName (pulumi.Input[str]) - A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.

architecture: pulumi.Output[str] = None

Machine architecture for created instances. Defaults to “x86_64”.

description: pulumi.Output[str] = None

A longer, human-readable description for the AMI.

ebs_block_devices: pulumi.Output[list] = None

Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.

  • deleteOnTermination (bool) - Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.

  • device_name (str) - The path at which the device is exposed to created instances.

  • encrypted (bool) - Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • iops (float) - Number of I/O operations per second the created volumes will support.

  • snapshot_id (str) - The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.

  • volume_size (float) - The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.

  • volumeType (str) - The type of EBS volume to create. Can be one of “standard” (the default), “io1” or “gp2”.

ena_support: pulumi.Output[bool] = None

Specifies whether enhanced networking with ENA is enabled. Defaults to false.

ephemeral_block_devices: pulumi.Output[list] = None

Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.

  • device_name (str) - The path at which the device is exposed to created instances.

  • virtualName (str) - A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.

image_location: pulumi.Output[str] = None

Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.

kernel_id: pulumi.Output[str] = None

The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.

name: pulumi.Output[str] = None

A region-unique name for the AMI.

ramdisk_id: pulumi.Output[str] = None

The id of an initrd image (ARI) that will be used when booting the created instances.

root_device_name: pulumi.Output[str] = None

The name of the root device (for example, /dev/sda1, or /dev/xvda).

snapshot_without_reboot: pulumi.Output[bool] = None

Boolean that overrides the behavior of stopping the instance before snapshotting. This is risky since it may cause a snapshot of an inconsistent filesystem state, but can be used to avoid downtime if the user otherwise guarantees that no filesystem writes will be underway at the time of snapshot.

source_instance_id: pulumi.Output[str] = None

The id of the instance to use as the basis of the AMI.

sriov_net_support: pulumi.Output[str] = None

When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

virtualization_type: pulumi.Output[str] = None

Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.

static get(resource_name, id, opts=None, architecture=None, description=None, ebs_block_devices=None, ena_support=None, ephemeral_block_devices=None, image_location=None, kernel_id=None, manage_ebs_snapshots=None, name=None, ramdisk_id=None, root_device_name=None, root_snapshot_id=None, snapshot_without_reboot=None, source_instance_id=None, sriov_net_support=None, tags=None, virtualization_type=None)

Get an existing AmiFromInstance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • architecture (pulumi.Input[str]) – Machine architecture for created instances. Defaults to “x86_64”.

  • description (pulumi.Input[str]) – A longer, human-readable description for the AMI.

  • ebs_block_devices (pulumi.Input[list]) – Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.

  • ena_support (pulumi.Input[bool]) – Specifies whether enhanced networking with ENA is enabled. Defaults to false.

  • ephemeral_block_devices (pulumi.Input[list]) – Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.

  • image_location (pulumi.Input[str]) – Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.

  • kernel_id (pulumi.Input[str]) – The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.

  • name (pulumi.Input[str]) – A region-unique name for the AMI.

  • ramdisk_id (pulumi.Input[str]) – The id of an initrd image (ARI) that will be used when booting the created instances.

  • root_device_name (pulumi.Input[str]) – The name of the root device (for example, /dev/sda1, or /dev/xvda).

  • snapshot_without_reboot (pulumi.Input[bool]) – Boolean that overrides the behavior of stopping the instance before snapshotting. This is risky since it may cause a snapshot of an inconsistent filesystem state, but can be used to avoid downtime if the user otherwise guarantees that no filesystem writes will be underway at the time of snapshot.

  • source_instance_id (pulumi.Input[str]) – The id of the instance to use as the basis of the AMI.

  • sriov_net_support (pulumi.Input[str]) – When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • virtualization_type (pulumi.Input[str]) – Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.

The ebs_block_devices object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • encrypted (pulumi.Input[bool]) - Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.

  • iops (pulumi.Input[float]) - Number of I/O operations per second the created volumes will support.

  • snapshot_id (pulumi.Input[str]) - The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.

  • volume_size (pulumi.Input[float]) - The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.

  • volumeType (pulumi.Input[str]) - The type of EBS volume to create. Can be one of “standard” (the default), “io1” or “gp2”.

The ephemeral_block_devices object supports the following:

  • device_name (pulumi.Input[str]) - The path at which the device is exposed to created instances.

  • virtualName (pulumi.Input[str]) - A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.AmiLaunchPermission(resource_name, opts=None, account_id=None, image_id=None, __props__=None, __name__=None, __opts__=None)

Adds launch permission to Amazon Machine Image (AMI) from another AWS account.

import pulumi
import pulumi_aws as aws

example = aws.ec2.AmiLaunchPermission("example",
    account_id="123456789012",
    image_id="ami-12345678")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_id (pulumi.Input[str]) – An AWS Account ID to add launch permissions.

  • image_id (pulumi.Input[str]) – A region-unique name for the AMI.

account_id: pulumi.Output[str] = None

An AWS Account ID to add launch permissions.

image_id: pulumi.Output[str] = None

A region-unique name for the AMI.

static get(resource_name, id, opts=None, account_id=None, image_id=None)

Get an existing AmiLaunchPermission resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_id (pulumi.Input[str]) – An AWS Account ID to add launch permissions.

  • image_id (pulumi.Input[str]) – A region-unique name for the AMI.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.AvailabilityZoneGroup(resource_name, opts=None, group_name=None, opt_in_status=None, __props__=None, __name__=None, __opts__=None)

Manages an EC2 Availability Zone Group, such as updating its opt-in status.

NOTE: This is an advanced resource. The provider will automatically assume management of the EC2 Availability Zone Group without import and perform no actions on removal from configuration.

import pulumi
import pulumi_aws as aws

example = aws.ec2.AvailabilityZoneGroup("example",
    group_name="us-west-2-lax-1",
    opt_in_status="opted-in")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • group_name (pulumi.Input[str]) – Name of the Availability Zone Group.

  • opt_in_status (pulumi.Input[str]) – Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.

group_name: pulumi.Output[str] = None

Name of the Availability Zone Group.

opt_in_status: pulumi.Output[str] = None

Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.

static get(resource_name, id, opts=None, group_name=None, opt_in_status=None)

Get an existing AvailabilityZoneGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • group_name (pulumi.Input[str]) – Name of the Availability Zone Group.

  • opt_in_status (pulumi.Input[str]) – Indicates whether to enable or disable Availability Zone Group. Valid values: opted-in or not-opted-in.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.AwaitableGetCoipPoolResult(filters=None, id=None, local_gateway_route_table_id=None, pool_cidrs=None, pool_id=None, tags=None)
class pulumi_aws.ec2.AwaitableGetCoipPoolsResult(filters=None, id=None, pool_ids=None, tags=None)
class pulumi_aws.ec2.AwaitableGetCustomerGatewayResult(bgp_asn=None, filters=None, id=None, ip_address=None, tags=None, type=None)
class pulumi_aws.ec2.AwaitableGetInstanceResult(ami=None, arn=None, associate_public_ip_address=None, availability_zone=None, credit_specifications=None, disable_api_termination=None, ebs_block_devices=None, ebs_optimized=None, ephemeral_block_devices=None, filters=None, get_password_data=None, get_user_data=None, host_id=None, iam_instance_profile=None, id=None, instance_id=None, instance_state=None, instance_tags=None, instance_type=None, key_name=None, metadata_options=None, monitoring=None, network_interface_id=None, outpost_arn=None, password_data=None, placement_group=None, private_dns=None, private_ip=None, public_dns=None, public_ip=None, root_block_devices=None, security_groups=None, source_dest_check=None, subnet_id=None, tags=None, tenancy=None, user_data=None, user_data_base64=None, vpc_security_group_ids=None)
class pulumi_aws.ec2.AwaitableGetInstanceTypeOfferingResult(filters=None, id=None, instance_type=None, location_type=None, preferred_instance_types=None)
class pulumi_aws.ec2.AwaitableGetInstanceTypeOfferingsResult(filters=None, id=None, instance_types=None, location_type=None)
class pulumi_aws.ec2.AwaitableGetInstancesResult(filters=None, id=None, ids=None, instance_state_names=None, instance_tags=None, private_ips=None, public_ips=None)
class pulumi_aws.ec2.AwaitableGetInternetGatewayResult(arn=None, attachments=None, filters=None, id=None, internet_gateway_id=None, owner_id=None, tags=None)
class pulumi_aws.ec2.AwaitableGetLaunchConfigurationResult(arn=None, associate_public_ip_address=None, ebs_block_devices=None, ebs_optimized=None, enable_monitoring=None, ephemeral_block_devices=None, iam_instance_profile=None, id=None, image_id=None, instance_type=None, key_name=None, name=None, placement_tenancy=None, root_block_devices=None, security_groups=None, spot_price=None, user_data=None, vpc_classic_link_id=None, vpc_classic_link_security_groups=None)
class pulumi_aws.ec2.AwaitableGetLaunchTemplateResult(arn=None, block_device_mappings=None, credit_specifications=None, default_version=None, description=None, disable_api_termination=None, ebs_optimized=None, elastic_gpu_specifications=None, filters=None, hibernation_options=None, iam_instance_profiles=None, id=None, image_id=None, instance_initiated_shutdown_behavior=None, instance_market_options=None, instance_type=None, kernel_id=None, key_name=None, latest_version=None, metadata_options=None, monitorings=None, name=None, network_interfaces=None, placements=None, ram_disk_id=None, security_group_names=None, tag_specifications=None, tags=None, user_data=None, vpc_security_group_ids=None)
class pulumi_aws.ec2.AwaitableGetLocalGatewayResult(filters=None, id=None, outpost_arn=None, owner_id=None, state=None, tags=None)
class pulumi_aws.ec2.AwaitableGetLocalGatewayRouteTableResult(filters=None, id=None, local_gateway_id=None, local_gateway_route_table_id=None, outpost_arn=None, state=None, tags=None)
class pulumi_aws.ec2.AwaitableGetLocalGatewayRouteTablesResult(filters=None, id=None, ids=None, tags=None)
class pulumi_aws.ec2.AwaitableGetLocalGatewayVirtualInterfaceGroupResult(filters=None, id=None, local_gateway_id=None, local_gateway_virtual_interface_ids=None, tags=None)
class pulumi_aws.ec2.AwaitableGetLocalGatewayVirtualInterfaceGroupsResult(filters=None, id=None, ids=None, local_gateway_virtual_interface_ids=None, tags=None)
class pulumi_aws.ec2.AwaitableGetLocalGatewayVirtualInterfaceResult(filters=None, id=None, local_address=None, local_bgp_asn=None, local_gateway_id=None, local_gateway_virtual_interface_ids=None, peer_address=None, peer_bgp_asn=None, tags=None, vlan=None)
class pulumi_aws.ec2.AwaitableGetLocalGatewaysResult(filters=None, id=None, ids=None, tags=None)
class pulumi_aws.ec2.AwaitableGetNatGatewayResult(allocation_id=None, filters=None, id=None, network_interface_id=None, private_ip=None, public_ip=None, state=None, subnet_id=None, tags=None, vpc_id=None)
class pulumi_aws.ec2.AwaitableGetNetworkAclsResult(filters=None, id=None, ids=None, tags=None, vpc_id=None)
class pulumi_aws.ec2.AwaitableGetNetworkInterfaceResult(associations=None, attachments=None, availability_zone=None, description=None, filters=None, id=None, interface_type=None, ipv6_addresses=None, mac_address=None, outpost_arn=None, owner_id=None, private_dns_name=None, private_ip=None, private_ips=None, requester_id=None, security_groups=None, subnet_id=None, tags=None, vpc_id=None)
class pulumi_aws.ec2.AwaitableGetNetworkInterfacesResult(filters=None, id=None, ids=None, tags=None)
class pulumi_aws.ec2.AwaitableGetRouteResult(destination_cidr_block=None, destination_ipv6_cidr_block=None, egress_only_gateway_id=None, gateway_id=None, id=None, instance_id=None, nat_gateway_id=None, network_interface_id=None, route_table_id=None, transit_gateway_id=None, vpc_peering_connection_id=None)
class pulumi_aws.ec2.AwaitableGetRouteTableResult(associations=None, filters=None, gateway_id=None, id=None, owner_id=None, route_table_id=None, routes=None, subnet_id=None, tags=None, vpc_id=None)
class pulumi_aws.ec2.AwaitableGetRouteTablesResult(filters=None, id=None, ids=None, tags=None, vpc_id=None)
class pulumi_aws.ec2.AwaitableGetSecurityGroupResult(arn=None, description=None, filters=None, id=None, name=None, tags=None, vpc_id=None)
class pulumi_aws.ec2.AwaitableGetSecurityGroupsResult(filters=None, id=None, ids=None, tags=None, vpc_ids=None)
class pulumi_aws.ec2.AwaitableGetSubnetIdsResult(filters=None, id=None, ids=None, tags=None, vpc_id=None)
class pulumi_aws.ec2.AwaitableGetSubnetResult(arn=None, assign_ipv6_address_on_creation=None, availability_zone=None, availability_zone_id=None, cidr_block=None, default_for_az=None, filters=None, id=None, ipv6_cidr_block=None, ipv6_cidr_block_association_id=None, map_public_ip_on_launch=None, outpost_arn=None, owner_id=None, state=None, tags=None, vpc_id=None)
class pulumi_aws.ec2.AwaitableGetVpcDhcpOptionsResult(arn=None, dhcp_options_id=None, domain_name=None, domain_name_servers=None, filters=None, id=None, netbios_name_servers=None, netbios_node_type=None, ntp_servers=None, owner_id=None, tags=None)
class pulumi_aws.ec2.AwaitableGetVpcEndpointResult(cidr_blocks=None, dns_entries=None, filters=None, id=None, network_interface_ids=None, owner_id=None, policy=None, prefix_list_id=None, private_dns_enabled=None, requester_managed=None, route_table_ids=None, security_group_ids=None, service_name=None, state=None, subnet_ids=None, tags=None, vpc_endpoint_type=None, vpc_id=None)
class pulumi_aws.ec2.AwaitableGetVpcEndpointServiceResult(acceptance_required=None, availability_zones=None, base_endpoint_dns_names=None, filters=None, id=None, manages_vpc_endpoints=None, owner=None, private_dns_name=None, service=None, service_id=None, service_name=None, service_type=None, tags=None, vpc_endpoint_policy_supported=None)
class pulumi_aws.ec2.AwaitableGetVpcPeeringConnectionResult(accepter=None, cidr_block=None, filters=None, id=None, owner_id=None, peer_cidr_block=None, peer_owner_id=None, peer_region=None, peer_vpc_id=None, region=None, requester=None, status=None, tags=None, vpc_id=None)
class pulumi_aws.ec2.AwaitableGetVpcResult(arn=None, cidr_block=None, cidr_block_associations=None, default=None, dhcp_options_id=None, enable_dns_hostnames=None, enable_dns_support=None, filters=None, id=None, instance_tenancy=None, ipv6_association_id=None, ipv6_cidr_block=None, main_route_table_id=None, owner_id=None, state=None, tags=None)
class pulumi_aws.ec2.AwaitableGetVpcsResult(filters=None, id=None, ids=None, tags=None)
class pulumi_aws.ec2.AwaitableGetVpnGatewayResult(amazon_side_asn=None, attached_vpc_id=None, availability_zone=None, filters=None, id=None, state=None, tags=None)
class pulumi_aws.ec2.CapacityReservation(resource_name, opts=None, availability_zone=None, ebs_optimized=None, end_date=None, end_date_type=None, ephemeral_storage=None, instance_count=None, instance_match_criteria=None, instance_platform=None, instance_type=None, tags=None, tenancy=None, __props__=None, __name__=None, __opts__=None)

Provides an EC2 Capacity Reservation. This allows you to reserve capacity for your Amazon EC2 instances in a specific Availability Zone for any duration.

import pulumi
import pulumi_aws as aws

default = aws.ec2.CapacityReservation("default",
    availability_zone="eu-west-1a",
    instance_count=1,
    instance_platform="Linux/UNIX",
    instance_type="t2.micro")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • availability_zone (pulumi.Input[str]) – The Availability Zone in which to create the Capacity Reservation.

  • ebs_optimized (pulumi.Input[bool]) – Indicates whether the Capacity Reservation supports EBS-optimized instances.

  • end_date (pulumi.Input[str]) – The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)

  • end_date_type (pulumi.Input[str]) – Indicates the way in which the Capacity Reservation ends. Specify either unlimited or limited.

  • ephemeral_storage (pulumi.Input[bool]) – Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

  • instance_count (pulumi.Input[float]) – The number of instances for which to reserve capacity.

  • instance_match_criteria (pulumi.Input[str]) – Indicates the type of instance launches that the Capacity Reservation accepts. Specify either open or targeted.

  • instance_platform (pulumi.Input[str]) – The type of operating system for which to reserve capacity. Valid options are Linux/UNIX, Red Hat Enterprise Linux, SUSE Linux, Windows, Windows with SQL Server, Windows with SQL Server Enterprise, Windows with SQL Server Standard or Windows with SQL Server Web.

  • instance_type (pulumi.Input[str]) – The instance type for which to reserve capacity.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • tenancy (pulumi.Input[str]) – Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.

arn: pulumi.Output[str] = None

The ARN of the Capacity Reservation.

availability_zone: pulumi.Output[str] = None

The Availability Zone in which to create the Capacity Reservation.

ebs_optimized: pulumi.Output[bool] = None

Indicates whether the Capacity Reservation supports EBS-optimized instances.

end_date: pulumi.Output[str] = None

The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)

end_date_type: pulumi.Output[str] = None

Indicates the way in which the Capacity Reservation ends. Specify either unlimited or limited.

ephemeral_storage: pulumi.Output[bool] = None

Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

instance_count: pulumi.Output[float] = None

The number of instances for which to reserve capacity.

instance_match_criteria: pulumi.Output[str] = None

Indicates the type of instance launches that the Capacity Reservation accepts. Specify either open or targeted.

instance_platform: pulumi.Output[str] = None

The type of operating system for which to reserve capacity. Valid options are Linux/UNIX, Red Hat Enterprise Linux, SUSE Linux, Windows, Windows with SQL Server, Windows with SQL Server Enterprise, Windows with SQL Server Standard or Windows with SQL Server Web.

instance_type: pulumi.Output[str] = None

The instance type for which to reserve capacity.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

tenancy: pulumi.Output[str] = None

Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.

static get(resource_name, id, opts=None, arn=None, availability_zone=None, ebs_optimized=None, end_date=None, end_date_type=None, ephemeral_storage=None, instance_count=None, instance_match_criteria=None, instance_platform=None, instance_type=None, tags=None, tenancy=None)

Get an existing CapacityReservation resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – The ARN of the Capacity Reservation.

  • availability_zone (pulumi.Input[str]) – The Availability Zone in which to create the Capacity Reservation.

  • ebs_optimized (pulumi.Input[bool]) – Indicates whether the Capacity Reservation supports EBS-optimized instances.

  • end_date (pulumi.Input[str]) –

    The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ)

  • end_date_type (pulumi.Input[str]) – Indicates the way in which the Capacity Reservation ends. Specify either unlimited or limited.

  • ephemeral_storage (pulumi.Input[bool]) – Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

  • instance_count (pulumi.Input[float]) – The number of instances for which to reserve capacity.

  • instance_match_criteria (pulumi.Input[str]) – Indicates the type of instance launches that the Capacity Reservation accepts. Specify either open or targeted.

  • instance_platform (pulumi.Input[str]) – The type of operating system for which to reserve capacity. Valid options are Linux/UNIX, Red Hat Enterprise Linux, SUSE Linux, Windows, Windows with SQL Server, Windows with SQL Server Enterprise, Windows with SQL Server Standard or Windows with SQL Server Web.

  • instance_type (pulumi.Input[str]) – The instance type for which to reserve capacity.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • tenancy (pulumi.Input[str]) – Indicates the tenancy of the Capacity Reservation. Specify either default or dedicated.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.CustomerGateway(resource_name, opts=None, bgp_asn=None, ip_address=None, tags=None, type=None, __props__=None, __name__=None, __opts__=None)

Provides a customer gateway inside a VPC. These objects can be connected to VPN gateways via VPN connections, and allow you to establish tunnels between your network and the VPC.

import pulumi
import pulumi_aws as aws

main = aws.ec2.CustomerGateway("main",
    bgp_asn=65000,
    ip_address="172.83.124.10",
    tags={
        "Name": "main-customer-gateway",
    },
    type="ipsec.1")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • bgp_asn (pulumi.Input[float]) – The gateway’s Border Gateway Protocol (BGP) Autonomous System Number (ASN).

  • ip_address (pulumi.Input[str]) – The IP address of the gateway’s Internet-routable external interface.

  • tags (pulumi.Input[dict]) – Tags to apply to the gateway.

  • type (pulumi.Input[str]) – The type of customer gateway. The only type AWS supports at this time is “ipsec.1”.

bgp_asn: pulumi.Output[float] = None

The gateway’s Border Gateway Protocol (BGP) Autonomous System Number (ASN).

ip_address: pulumi.Output[str] = None

The IP address of the gateway’s Internet-routable external interface.

tags: pulumi.Output[dict] = None

Tags to apply to the gateway.

type: pulumi.Output[str] = None

The type of customer gateway. The only type AWS supports at this time is “ipsec.1”.

static get(resource_name, id, opts=None, bgp_asn=None, ip_address=None, tags=None, type=None)

Get an existing CustomerGateway resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • bgp_asn (pulumi.Input[float]) – The gateway’s Border Gateway Protocol (BGP) Autonomous System Number (ASN).

  • ip_address (pulumi.Input[str]) – The IP address of the gateway’s Internet-routable external interface.

  • tags (pulumi.Input[dict]) – Tags to apply to the gateway.

  • type (pulumi.Input[str]) – The type of customer gateway. The only type AWS supports at this time is “ipsec.1”.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.DefaultNetworkAcl(resource_name, opts=None, default_network_acl_id=None, egress=None, ingress=None, subnet_ids=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to manage the default AWS Network ACL. VPC Only.

Each VPC created in AWS comes with a Default Network ACL that can be managed, but not destroyed. This is an advanced resource, and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource.

The ec2.DefaultNetworkAcl behaves differently from normal resources, in that this provider does not create this resource, but instead attempts to “adopt” it into management. We can do this because each VPC created has a Default Network ACL that cannot be destroyed, and is created with a known set of default rules.

When this provider first adopts the Default Network ACL, it immediately removes all rules in the ACL. It then proceeds to create any rules specified in the configuration. This step is required so that only the rules specified in the configuration are created.

This resource treats its inline rules as absolute; only the rules defined inline are created, and any additions/removals external to this resource will result in diffs being shown. For these reasons, this resource is incompatible with the ec2.NetworkAclRule resource.

For more information about Network ACLs, see the AWS Documentation on [Network ACLs][aws-network-acls].

The following config gives the Default Network ACL the same rules that AWS includes, but pulls the resource under management by this provider. This means that any ACL rules added or changed will be detected as drift.

import pulumi
import pulumi_aws as aws

mainvpc = aws.ec2.Vpc("mainvpc", cidr_block="10.1.0.0/16")
default = aws.ec2.DefaultNetworkAcl("default",
    default_network_acl_id=mainvpc.default_network_acl_id,
    ingress=[{
        "protocol": -1,
        "ruleNo": 100,
        "action": "allow",
        "cidr_block": mainvpc.cidr_block,
        "from_port": 0,
        "to_port": 0,
    }],
    egress=[{
        "protocol": -1,
        "ruleNo": 100,
        "action": "allow",
        "cidr_block": "0.0.0.0/0",
        "from_port": 0,
        "to_port": 0,
    }])

The following denies all Egress traffic by omitting any egress rules, while including the default ingress rule to allow all traffic.

import pulumi
import pulumi_aws as aws

mainvpc = aws.ec2.Vpc("mainvpc", cidr_block="10.1.0.0/16")
default = aws.ec2.DefaultNetworkAcl("default",
    default_network_acl_id=mainvpc.default_network_acl_id,
    ingress=[{
        "protocol": -1,
        "ruleNo": 100,
        "action": "allow",
        "cidr_block": mainvpc.cidr_block,
        "from_port": 0,
        "to_port": 0,
    }])

This config denies all traffic in the Default ACL. This can be useful if you want a locked down default to force all resources in the VPC to assign a non-default ACL.

import pulumi
import pulumi_aws as aws

mainvpc = aws.ec2.Vpc("mainvpc", cidr_block="10.1.0.0/16")
default = aws.ec2.DefaultNetworkAcl("default", default_network_acl_id=mainvpc.default_network_acl_id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • default_network_acl_id (pulumi.Input[str]) – The Network ACL ID to manage. This attribute is exported from ec2.Vpc, or manually found via the AWS Console.

  • egress (pulumi.Input[list]) – Specifies an egress rule. Parameters defined below.

  • ingress (pulumi.Input[list]) – Specifies an ingress rule. Parameters defined below.

  • subnet_ids (pulumi.Input[list]) – A list of Subnet IDs to apply the ACL to. See the notes below on managing Subnets in the Default Network ACL

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

The egress object supports the following:

  • action (pulumi.Input[str]) - The action to take.

  • cidr_block (pulumi.Input[str]) - The CIDR block to match. This must be a valid network mask.

  • from_port (pulumi.Input[float]) - The from port to match.

  • icmp_code (pulumi.Input[float]) - The ICMP type code to be used. Default 0.

  • icmp_type (pulumi.Input[float]) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (pulumi.Input[str]) - The IPv6 CIDR block.

  • protocol (pulumi.Input[str]) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (pulumi.Input[float]) - The rule number. Used for ordering.

  • to_port (pulumi.Input[float]) - The to port to match.

The ingress object supports the following:

  • action (pulumi.Input[str]) - The action to take.

  • cidr_block (pulumi.Input[str]) - The CIDR block to match. This must be a valid network mask.

  • from_port (pulumi.Input[float]) - The from port to match.

  • icmp_code (pulumi.Input[float]) - The ICMP type code to be used. Default 0.

  • icmp_type (pulumi.Input[float]) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (pulumi.Input[str]) - The IPv6 CIDR block.

  • protocol (pulumi.Input[str]) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (pulumi.Input[float]) - The rule number. Used for ordering.

  • to_port (pulumi.Input[float]) - The to port to match.

default_network_acl_id: pulumi.Output[str] = None

The Network ACL ID to manage. This attribute is exported from ec2.Vpc, or manually found via the AWS Console.

egress: pulumi.Output[list] = None

Specifies an egress rule. Parameters defined below.

  • action (str) - The action to take.

  • cidr_block (str) - The CIDR block to match. This must be a valid network mask.

  • from_port (float) - The from port to match.

  • icmp_code (float) - The ICMP type code to be used. Default 0.

  • icmp_type (float) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (str) - The IPv6 CIDR block.

  • protocol (str) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (float) - The rule number. Used for ordering.

  • to_port (float) - The to port to match.

ingress: pulumi.Output[list] = None

Specifies an ingress rule. Parameters defined below.

  • action (str) - The action to take.

  • cidr_block (str) - The CIDR block to match. This must be a valid network mask.

  • from_port (float) - The from port to match.

  • icmp_code (float) - The ICMP type code to be used. Default 0.

  • icmp_type (float) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (str) - The IPv6 CIDR block.

  • protocol (str) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (float) - The rule number. Used for ordering.

  • to_port (float) - The to port to match.

owner_id: pulumi.Output[str] = None

The ID of the AWS account that owns the Default Network ACL

subnet_ids: pulumi.Output[list] = None

A list of Subnet IDs to apply the ACL to. See the notes below on managing Subnets in the Default Network ACL

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

vpc_id: pulumi.Output[str] = None

The ID of the associated VPC

static get(resource_name, id, opts=None, default_network_acl_id=None, egress=None, ingress=None, owner_id=None, subnet_ids=None, tags=None, vpc_id=None)

Get an existing DefaultNetworkAcl resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • default_network_acl_id (pulumi.Input[str]) – The Network ACL ID to manage. This attribute is exported from ec2.Vpc, or manually found via the AWS Console.

  • egress (pulumi.Input[list]) – Specifies an egress rule. Parameters defined below.

  • ingress (pulumi.Input[list]) – Specifies an ingress rule. Parameters defined below.

  • owner_id (pulumi.Input[str]) – The ID of the AWS account that owns the Default Network ACL

  • subnet_ids (pulumi.Input[list]) – A list of Subnet IDs to apply the ACL to. See the notes below on managing Subnets in the Default Network ACL

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The ID of the associated VPC

The egress object supports the following:

  • action (pulumi.Input[str]) - The action to take.

  • cidr_block (pulumi.Input[str]) - The CIDR block to match. This must be a valid network mask.

  • from_port (pulumi.Input[float]) - The from port to match.

  • icmp_code (pulumi.Input[float]) - The ICMP type code to be used. Default 0.

  • icmp_type (pulumi.Input[float]) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (pulumi.Input[str]) - The IPv6 CIDR block.

  • protocol (pulumi.Input[str]) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (pulumi.Input[float]) - The rule number. Used for ordering.

  • to_port (pulumi.Input[float]) - The to port to match.

The ingress object supports the following:

  • action (pulumi.Input[str]) - The action to take.

  • cidr_block (pulumi.Input[str]) - The CIDR block to match. This must be a valid network mask.

  • from_port (pulumi.Input[float]) - The from port to match.

  • icmp_code (pulumi.Input[float]) - The ICMP type code to be used. Default 0.

  • icmp_type (pulumi.Input[float]) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (pulumi.Input[str]) - The IPv6 CIDR block.

  • protocol (pulumi.Input[str]) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (pulumi.Input[float]) - The rule number. Used for ordering.

  • to_port (pulumi.Input[float]) - The to port to match.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.DefaultRouteTable(resource_name, opts=None, default_route_table_id=None, propagating_vgws=None, routes=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to manage a Default VPC Routing Table.

Each VPC created in AWS comes with a Default Route Table that can be managed, but not destroyed. This is an advanced resource, and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource. It is recommended you do not use both ec2.DefaultRouteTable to manage the default route table and use the ec2.MainRouteTableAssociation, due to possible conflict in routes.

The ec2.DefaultRouteTable behaves differently from normal resources, in that this provider does not create this resource, but instead attempts to “adopt” it into management. We can do this because each VPC created has a Default Route Table that cannot be destroyed, and is created with a single route.

When this provider first adopts the Default Route Table, it immediately removes all defined routes. It then proceeds to create any routes specified in the configuration. This step is required so that only the routes specified in the configuration present in the Default Route Table.

For more information about Route Tables, see the AWS Documentation on [Route Tables][aws-route-tables].

For more information about managing normal Route Tables in this provider, see our documentation on [ec2.RouteTable][tf-route-tables].

NOTE on Route Tables and Routes: This provider currently provides both a standalone Route resource and a Route Table resource with routes defined in-line. At this time you cannot use a Route Table with in-line routes in conjunction with any Route resources. Doing so will cause a conflict of rule settings and will overwrite routes.

import pulumi
import pulumi_aws as aws

default_route_table = aws.ec2.DefaultRouteTable("defaultRouteTable",
    default_route_table_id=aws_vpc["foo"]["default_route_table_id"],
    routes=[{}],
    tags={
        "Name": "default table",
    })
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • default_route_table_id (pulumi.Input[str]) – The ID of the Default Routing Table.

  • propagating_vgws (pulumi.Input[list]) – A list of virtual gateways for propagation.

  • routes (pulumi.Input[list]) – A list of route objects. Their keys are documented below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

The routes object supports the following:

  • cidr_block (pulumi.Input[str]) - The CIDR block of the route.

  • egress_only_gateway_id (pulumi.Input[str]) - Identifier of a VPC Egress Only Internet Gateway.

  • gateway_id (pulumi.Input[str]) - Identifier of a VPC internet gateway or a virtual private gateway.

  • instance_id (pulumi.Input[str]) - Identifier of an EC2 instance.

  • ipv6_cidr_block (pulumi.Input[str]) - The Ipv6 CIDR block of the route

  • nat_gateway_id (pulumi.Input[str]) - Identifier of a VPC NAT gateway.

  • network_interface_id (pulumi.Input[str]) - Identifier of an EC2 network interface.

  • transit_gateway_id (pulumi.Input[str]) - Identifier of an EC2 Transit Gateway.

  • vpc_peering_connection_id (pulumi.Input[str]) - Identifier of a VPC peering connection.

default_route_table_id: pulumi.Output[str] = None

The ID of the Default Routing Table.

owner_id: pulumi.Output[str] = None

The ID of the AWS account that owns the route table

propagating_vgws: pulumi.Output[list] = None

A list of virtual gateways for propagation.

routes: pulumi.Output[list] = None

A list of route objects. Their keys are documented below.

  • cidr_block (str) - The CIDR block of the route.

  • egress_only_gateway_id (str) - Identifier of a VPC Egress Only Internet Gateway.

  • gateway_id (str) - Identifier of a VPC internet gateway or a virtual private gateway.

  • instance_id (str) - Identifier of an EC2 instance.

  • ipv6_cidr_block (str) - The Ipv6 CIDR block of the route

  • nat_gateway_id (str) - Identifier of a VPC NAT gateway.

  • network_interface_id (str) - Identifier of an EC2 network interface.

  • transit_gateway_id (str) - Identifier of an EC2 Transit Gateway.

  • vpc_peering_connection_id (str) - Identifier of a VPC peering connection.

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

static get(resource_name, id, opts=None, default_route_table_id=None, owner_id=None, propagating_vgws=None, routes=None, tags=None, vpc_id=None)

Get an existing DefaultRouteTable resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • default_route_table_id (pulumi.Input[str]) – The ID of the Default Routing Table.

  • owner_id (pulumi.Input[str]) – The ID of the AWS account that owns the route table

  • propagating_vgws (pulumi.Input[list]) – A list of virtual gateways for propagation.

  • routes (pulumi.Input[list]) – A list of route objects. Their keys are documented below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

The routes object supports the following:

  • cidr_block (pulumi.Input[str]) - The CIDR block of the route.

  • egress_only_gateway_id (pulumi.Input[str]) - Identifier of a VPC Egress Only Internet Gateway.

  • gateway_id (pulumi.Input[str]) - Identifier of a VPC internet gateway or a virtual private gateway.

  • instance_id (pulumi.Input[str]) - Identifier of an EC2 instance.

  • ipv6_cidr_block (pulumi.Input[str]) - The Ipv6 CIDR block of the route

  • nat_gateway_id (pulumi.Input[str]) - Identifier of a VPC NAT gateway.

  • network_interface_id (pulumi.Input[str]) - Identifier of an EC2 network interface.

  • transit_gateway_id (pulumi.Input[str]) - Identifier of an EC2 Transit Gateway.

  • vpc_peering_connection_id (pulumi.Input[str]) - Identifier of a VPC peering connection.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.DefaultSecurityGroup(resource_name, opts=None, egress=None, ingress=None, revoke_rules_on_delete=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to manage the default AWS Security Group.

For EC2 Classic accounts, each region comes with a Default Security Group. Additionally, each VPC created in AWS comes with a Default Security Group that can be managed, but not destroyed. This is an advanced resource, and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource.

The ec2.DefaultSecurityGroup behaves differently from normal resources, in that this provider does not create this resource, but instead “adopts” it into management. We can do this because these default security groups cannot be destroyed, and are created with a known set of default ingress/egress rules.

When this provider first adopts the Default Security Group, it immediately removes all ingress and egress rules in the Security Group. It then proceeds to create any rules specified in the configuration. This step is required so that only the rules specified in the configuration are created.

This resource treats its inline rules as absolute; only the rules defined inline are created, and any additions/removals external to this resource will result in diff shown. For these reasons, this resource is incompatible with the ec2.SecurityGroupRule resource.

For more information about Default Security Groups, see the AWS Documentation on [Default Security Groups][aws-default-security-groups].

The following config gives the Default Security Group the same rules that AWS provides by default, but pulls the resource under management by this provider. This means that any ingress or egress rules added or changed will be detected as drift.

import pulumi
import pulumi_aws as aws

mainvpc = aws.ec2.Vpc("mainvpc", cidr_block="10.1.0.0/16")
default = aws.ec2.DefaultSecurityGroup("default",
    egress=[{
        "cidr_blocks": ["0.0.0.0/0"],
        "from_port": 0,
        "protocol": "-1",
        "to_port": 0,
    }],
    ingress=[{
        "from_port": 0,
        "protocol": -1,
        "self": True,
        "to_port": 0,
    }],
    vpc_id=mainvpc.id)

The following denies all Egress traffic by omitting any egress rules, while including the default ingress rule to allow all traffic.

import pulumi
import pulumi_aws as aws

mainvpc = aws.ec2.Vpc("mainvpc", cidr_block="10.1.0.0/16")
default = aws.ec2.DefaultSecurityGroup("default",
    ingress=[{
        "from_port": 0,
        "protocol": -1,
        "self": True,
        "to_port": 0,
    }],
    vpc_id=mainvpc.id)

With the exceptions mentioned above, ec2.DefaultSecurityGroup should identical behavior to ec2.SecurityGroup. Please consult AWS_SECURITY_GROUP for further usage documentation.

Each AWS VPC (or region, if using EC2 Classic) comes with a Default Security Group that cannot be deleted. The ec2.DefaultSecurityGroup allows you to manage this Security Group, but this provider cannot destroy it. Removing this resource from your configuration will remove it from your statefile and management, but will not destroy the Security Group. All ingress or egress rules will be left as they are at the time of removal. You can resume managing them via the AWS Console.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • egress (pulumi.Input[list]) – Can be specified multiple times for each egress rule. Each egress block supports fields documented below.

  • ingress (pulumi.Input[list]) – Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The VPC ID. Note that changing the ``vpc_id`` will *not* restore any default security group rules that were modified, added, or removed. It will be left in its current state

The egress object supports the following:

  • cidr_blocks (pulumi.Input[list])

  • description (pulumi.Input[str]) - The description of the security group

  • from_port (pulumi.Input[float])

  • ipv6_cidr_blocks (pulumi.Input[list])

  • prefix_list_ids (pulumi.Input[list])

  • protocol (pulumi.Input[str])

  • security_groups (pulumi.Input[list])

  • self (pulumi.Input[bool])

  • to_port (pulumi.Input[float])

The ingress object supports the following:

  • cidr_blocks (pulumi.Input[list])

  • description (pulumi.Input[str]) - The description of the security group

  • from_port (pulumi.Input[float])

  • ipv6_cidr_blocks (pulumi.Input[list])

  • prefix_list_ids (pulumi.Input[list])

  • protocol (pulumi.Input[str])

  • security_groups (pulumi.Input[list])

  • self (pulumi.Input[bool])

  • to_port (pulumi.Input[float])

description: pulumi.Output[str] = None

The description of the security group

egress: pulumi.Output[list] = None

Can be specified multiple times for each egress rule. Each egress block supports fields documented below.

  • cidr_blocks (list)

  • description (str) - The description of the security group

  • from_port (float)

  • ipv6_cidr_blocks (list)

  • prefix_list_ids (list)

  • protocol (str)

  • security_groups (list)

  • self (bool)

  • to_port (float)

ingress: pulumi.Output[list] = None

Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below.

  • cidr_blocks (list)

  • description (str) - The description of the security group

  • from_port (float)

  • ipv6_cidr_blocks (list)

  • prefix_list_ids (list)

  • protocol (str)

  • security_groups (list)

  • self (bool)

  • to_port (float)

name: pulumi.Output[str] = None

The name of the security group

owner_id: pulumi.Output[str] = None

The owner ID.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

vpc_id: pulumi.Output[str] = None

The VPC ID. Note that changing the ``vpc_id`` will *not* restore any default security group rules that were modified, added, or removed. It will be left in its current state

static get(resource_name, id, opts=None, arn=None, description=None, egress=None, ingress=None, name=None, owner_id=None, revoke_rules_on_delete=None, tags=None, vpc_id=None)

Get an existing DefaultSecurityGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – The description of the security group

  • egress (pulumi.Input[list]) – Can be specified multiple times for each egress rule. Each egress block supports fields documented below.

  • ingress (pulumi.Input[list]) – Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below.

  • name (pulumi.Input[str]) – The name of the security group

  • owner_id (pulumi.Input[str]) – The owner ID.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The VPC ID. Note that changing the ``vpc_id`` will *not* restore any default security group rules that were modified, added, or removed. It will be left in its current state

The egress object supports the following:

  • cidr_blocks (pulumi.Input[list])

  • description (pulumi.Input[str]) - The description of the security group

  • from_port (pulumi.Input[float])

  • ipv6_cidr_blocks (pulumi.Input[list])

  • prefix_list_ids (pulumi.Input[list])

  • protocol (pulumi.Input[str])

  • security_groups (pulumi.Input[list])

  • self (pulumi.Input[bool])

  • to_port (pulumi.Input[float])

The ingress object supports the following:

  • cidr_blocks (pulumi.Input[list])

  • description (pulumi.Input[str]) - The description of the security group

  • from_port (pulumi.Input[float])

  • ipv6_cidr_blocks (pulumi.Input[list])

  • prefix_list_ids (pulumi.Input[list])

  • protocol (pulumi.Input[str])

  • security_groups (pulumi.Input[list])

  • self (pulumi.Input[bool])

  • to_port (pulumi.Input[float])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.DefaultSubnet(resource_name, opts=None, availability_zone=None, map_public_ip_on_launch=None, outpost_arn=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to manage a default AWS VPC subnet in the current region.

The ec2.DefaultSubnet behaves differently from normal resources, in that this provider does not create this resource, but instead “adopts” it into management.

import pulumi
import pulumi_aws as aws

default_az1 = aws.ec2.DefaultSubnet("defaultAz1",
    availability_zone="us-west-2a",
    tags={
        "Name": "Default subnet for us-west-2a",
    })
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • map_public_ip_on_launch (pulumi.Input[bool]) – Specify true to indicate that instances launched into the subnet should be assigned a public IP address.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

cidr_block: pulumi.Output[str] = None

The CIDR block for the subnet.

ipv6_cidr_block: pulumi.Output[str] = None

The IPv6 CIDR block.

map_public_ip_on_launch: pulumi.Output[bool] = None

Specify true to indicate that instances launched into the subnet should be assigned a public IP address.

owner_id: pulumi.Output[str] = None

The ID of the AWS account that owns the subnet.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

vpc_id: pulumi.Output[str] = None

The VPC ID.

static get(resource_name, id, opts=None, arn=None, assign_ipv6_address_on_creation=None, availability_zone=None, availability_zone_id=None, cidr_block=None, ipv6_cidr_block=None, ipv6_cidr_block_association_id=None, map_public_ip_on_launch=None, outpost_arn=None, owner_id=None, tags=None, vpc_id=None)

Get an existing DefaultSubnet resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cidr_block (pulumi.Input[str]) – The CIDR block for the subnet.

  • ipv6_cidr_block (pulumi.Input[str]) – The IPv6 CIDR block.

  • map_public_ip_on_launch (pulumi.Input[bool]) – Specify true to indicate that instances launched into the subnet should be assigned a public IP address.

  • owner_id (pulumi.Input[str]) – The ID of the AWS account that owns the subnet.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The VPC ID.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.DefaultVpc(resource_name, opts=None, enable_classiclink=None, enable_classiclink_dns_support=None, enable_dns_hostnames=None, enable_dns_support=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to manage the default AWS VPC in the current region.

For AWS accounts created after 2013-12-04, each region comes with a Default VPC. This is an advanced resource, and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource.

The ec2.DefaultVpc behaves differently from normal resources, in that this provider does not create this resource, but instead “adopts” it into management.

import pulumi
import pulumi_aws as aws

default = aws.ec2.DefaultVpc("default", tags={
    "Name": "Default VPC",
})
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • enable_classiclink (pulumi.Input[bool]) – A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

  • enable_dns_hostnames (pulumi.Input[bool]) – A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

  • enable_dns_support (pulumi.Input[bool]) – A boolean flag to enable/disable DNS support in the VPC. Defaults true.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

arn: pulumi.Output[str] = None

Amazon Resource Name (ARN) of VPC

assign_generated_ipv6_cidr_block: pulumi.Output[bool] = None

Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned

cidr_block: pulumi.Output[str] = None

The CIDR block of the VPC

default_network_acl_id: pulumi.Output[str] = None

The ID of the network ACL created by default on VPC creation

default_route_table_id: pulumi.Output[str] = None

The ID of the route table created by default on VPC creation

default_security_group_id: pulumi.Output[str] = None

The ID of the security group created by default on VPC creation

A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

enable_dns_hostnames: pulumi.Output[bool] = None

A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

enable_dns_support: pulumi.Output[bool] = None

A boolean flag to enable/disable DNS support in the VPC. Defaults true.

instance_tenancy: pulumi.Output[str] = None

Tenancy of instances spin up within VPC.

ipv6_association_id: pulumi.Output[str] = None

The association ID for the IPv6 CIDR block of the VPC

ipv6_cidr_block: pulumi.Output[str] = None

The IPv6 CIDR block of the VPC

main_route_table_id: pulumi.Output[str] = None

The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an ec2.MainRouteTableAssociation

owner_id: pulumi.Output[str] = None

The ID of the AWS account that owns the VPC.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

static get(resource_name, id, opts=None, arn=None, assign_generated_ipv6_cidr_block=None, cidr_block=None, default_network_acl_id=None, default_route_table_id=None, default_security_group_id=None, dhcp_options_id=None, enable_classiclink=None, enable_classiclink_dns_support=None, enable_dns_hostnames=None, enable_dns_support=None, instance_tenancy=None, ipv6_association_id=None, ipv6_cidr_block=None, main_route_table_id=None, owner_id=None, tags=None)

Get an existing DefaultVpc resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – Amazon Resource Name (ARN) of VPC

  • assign_generated_ipv6_cidr_block (pulumi.Input[bool]) – Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned

  • cidr_block (pulumi.Input[str]) – The CIDR block of the VPC

  • default_network_acl_id (pulumi.Input[str]) – The ID of the network ACL created by default on VPC creation

  • default_route_table_id (pulumi.Input[str]) – The ID of the route table created by default on VPC creation

  • default_security_group_id (pulumi.Input[str]) – The ID of the security group created by default on VPC creation

  • enable_classiclink (pulumi.Input[bool]) –

    A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

  • enable_dns_hostnames (pulumi.Input[bool]) – A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

  • enable_dns_support (pulumi.Input[bool]) – A boolean flag to enable/disable DNS support in the VPC. Defaults true.

  • instance_tenancy (pulumi.Input[str]) – Tenancy of instances spin up within VPC.

  • ipv6_association_id (pulumi.Input[str]) – The association ID for the IPv6 CIDR block of the VPC

  • ipv6_cidr_block (pulumi.Input[str]) – The IPv6 CIDR block of the VPC

  • main_route_table_id (pulumi.Input[str]) – The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an ec2.MainRouteTableAssociation

  • owner_id (pulumi.Input[str]) – The ID of the AWS account that owns the VPC.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.DefaultVpcDhcpOptions(resource_name, opts=None, netbios_name_servers=None, netbios_node_type=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to manage the default AWS DHCP Options Set in the current region.

Each AWS region comes with a default set of DHCP options. This is an advanced resource, and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource.

The ec2.DefaultVpcDhcpOptions behaves differently from normal resources, in that this provider does not create this resource, but instead “adopts” it into management.

import pulumi
import pulumi_aws as aws

default = aws.ec2.DefaultVpcDhcpOptions("default", tags={
    "Name": "Default DHCP Option Set",
})
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • netbios_name_servers (pulumi.Input[list]) – List of NETBIOS name servers.

  • netbios_node_type (pulumi.Input[str]) – The NetBIOS node type (1, 2, 4, or 8). AWS recommends to specify 2 since broadcast and multicast are not supported in their network. For more information about these node types, see RFC 2132.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

arn: pulumi.Output[str] = None

The ARN of the DHCP Options Set.

netbios_name_servers: pulumi.Output[list] = None

List of NETBIOS name servers.

netbios_node_type: pulumi.Output[str] = None

The NetBIOS node type (1, 2, 4, or 8). AWS recommends to specify 2 since broadcast and multicast are not supported in their network. For more information about these node types, see RFC 2132.

owner_id: pulumi.Output[str] = None

The ID of the AWS account that owns the DHCP options set.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

static get(resource_name, id, opts=None, arn=None, domain_name=None, domain_name_servers=None, netbios_name_servers=None, netbios_node_type=None, ntp_servers=None, owner_id=None, tags=None)

Get an existing DefaultVpcDhcpOptions resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – The ARN of the DHCP Options Set.

  • netbios_name_servers (pulumi.Input[list]) – List of NETBIOS name servers.

  • netbios_node_type (pulumi.Input[str]) –

    The NetBIOS node type (1, 2, 4, or 8). AWS recommends to specify 2 since broadcast and multicast are not supported in their network. For more information about these node types, see RFC 2132.

  • owner_id (pulumi.Input[str]) – The ID of the AWS account that owns the DHCP options set.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.EgressOnlyInternetGateway(resource_name, opts=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)

[IPv6 only] Creates an egress-only Internet gateway for your VPC. An egress-only Internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the Internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance.

import pulumi
import pulumi_aws as aws

example_vpc = aws.ec2.Vpc("exampleVpc",
    assign_generated_ipv6_cidr_block=True,
    cidr_block="10.1.0.0/16")
example_egress_only_internet_gateway = aws.ec2.EgressOnlyInternetGateway("exampleEgressOnlyInternetGateway",
    tags={
        "Name": "main",
    },
    vpc_id=example_vpc.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The VPC ID to create in.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

vpc_id: pulumi.Output[str] = None

The VPC ID to create in.

static get(resource_name, id, opts=None, tags=None, vpc_id=None)

Get an existing EgressOnlyInternetGateway resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The VPC ID to create in.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.Eip(resource_name, opts=None, associate_with_private_ip=None, customer_owned_ipv4_pool=None, instance=None, network_interface=None, public_ipv4_pool=None, tags=None, vpc=None, __props__=None, __name__=None, __opts__=None)

Provides an Elastic IP resource.

Note: EIP may require IGW to exist prior to association. Use depends_on to set an explicit dependency on the IGW.

Note: Do not use network_interface to associate the EIP to lb.LoadBalancer or ec2.NatGateway resources. Instead use the allocation_id available in those resources to allow AWS to manage the association, otherwise you will see AuthFailure errors.

import pulumi
import pulumi_aws as aws

lb = aws.ec2.Eip("lb",
    instance=aws_instance["web"]["id"],
    vpc=True)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • associate_with_private_ip (pulumi.Input[str]) – A user specified primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

  • customer_owned_ipv4_pool (pulumi.Input[str]) – The ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide

  • instance (pulumi.Input[str]) – EC2 instance ID.

  • network_interface (pulumi.Input[str]) – Network interface ID to associate with.

  • public_ipv4_pool (pulumi.Input[str]) – EC2 IPv4 address pool identifier or amazon. This option is only available for VPC EIPs.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • vpc (pulumi.Input[bool]) – Boolean if the EIP is in a VPC or not.

associate_with_private_ip: pulumi.Output[str] = None

A user specified primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

customer_owned_ip: pulumi.Output[str] = None

Customer owned IP.

customer_owned_ipv4_pool: pulumi.Output[str] = None

The ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide

instance: pulumi.Output[str] = None

EC2 instance ID.

network_interface: pulumi.Output[str] = None

Network interface ID to associate with.

private_dns: pulumi.Output[str] = None

The Private DNS associated with the Elastic IP address (if in VPC).

private_ip: pulumi.Output[str] = None

Contains the private IP address (if in VPC).

public_dns: pulumi.Output[str] = None

Public DNS associated with the Elastic IP address.

public_ip: pulumi.Output[str] = None

Contains the public IP address.

public_ipv4_pool: pulumi.Output[str] = None

EC2 IPv4 address pool identifier or amazon. This option is only available for VPC EIPs.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

vpc: pulumi.Output[bool] = None

Boolean if the EIP is in a VPC or not.

static get(resource_name, id, opts=None, allocation_id=None, associate_with_private_ip=None, association_id=None, customer_owned_ip=None, customer_owned_ipv4_pool=None, domain=None, instance=None, network_interface=None, private_dns=None, private_ip=None, public_dns=None, public_ip=None, public_ipv4_pool=None, tags=None, vpc=None)

Get an existing Eip resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • associate_with_private_ip (pulumi.Input[str]) – A user specified primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

  • customer_owned_ip (pulumi.Input[str]) – Customer owned IP.

  • customer_owned_ipv4_pool (pulumi.Input[str]) –

    The ID of a customer-owned address pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide

  • instance (pulumi.Input[str]) – EC2 instance ID.

  • network_interface (pulumi.Input[str]) – Network interface ID to associate with.

  • private_dns (pulumi.Input[str]) – The Private DNS associated with the Elastic IP address (if in VPC).

  • private_ip (pulumi.Input[str]) – Contains the private IP address (if in VPC).

  • public_dns (pulumi.Input[str]) – Public DNS associated with the Elastic IP address.

  • public_ip (pulumi.Input[str]) – Contains the public IP address.

  • public_ipv4_pool (pulumi.Input[str]) – EC2 IPv4 address pool identifier or amazon. This option is only available for VPC EIPs.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • vpc (pulumi.Input[bool]) – Boolean if the EIP is in a VPC or not.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.EipAssociation(resource_name, opts=None, allocation_id=None, allow_reassociation=None, instance_id=None, network_interface_id=None, private_ip_address=None, public_ip=None, __props__=None, __name__=None, __opts__=None)

Provides an AWS EIP Association as a top level resource, to associate and disassociate Elastic IPs from AWS Instances and Network Interfaces.

NOTE: Do not use this resource to associate an EIP to lb.LoadBalancer or ec2.NatGateway resources. Instead use the allocation_id available in those resources to allow AWS to manage the association, otherwise you will see AuthFailure errors.

NOTE: ec2.EipAssociation is useful in scenarios where EIPs are either pre-existing or distributed to customers or users and therefore cannot be changed.

import pulumi
import pulumi_aws as aws

web = aws.ec2.Instance("web",
    ami="ami-21f78e11",
    availability_zone="us-west-2a",
    instance_type="t1.micro",
    tags={
        "Name": "HelloWorld",
    })
example = aws.ec2.Eip("example", vpc=True)
eip_assoc = aws.ec2.EipAssociation("eipAssoc",
    allocation_id=example.id,
    instance_id=web.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • allocation_id (pulumi.Input[str]) – The allocation ID. This is required for EC2-VPC.

  • allow_reassociation (pulumi.Input[bool]) – Whether to allow an Elastic IP to be re-associated. Defaults to true in VPC.

  • instance_id (pulumi.Input[str]) – The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.

  • network_interface_id (pulumi.Input[str]) – The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

  • private_ip_address (pulumi.Input[str]) – The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

  • public_ip (pulumi.Input[str]) – The Elastic IP address. This is required for EC2-Classic.

allocation_id: pulumi.Output[str] = None

The allocation ID. This is required for EC2-VPC.

allow_reassociation: pulumi.Output[bool] = None

Whether to allow an Elastic IP to be re-associated. Defaults to true in VPC.

instance_id: pulumi.Output[str] = None

The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.

network_interface_id: pulumi.Output[str] = None

The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

private_ip_address: pulumi.Output[str] = None

The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

public_ip: pulumi.Output[str] = None

The Elastic IP address. This is required for EC2-Classic.

static get(resource_name, id, opts=None, allocation_id=None, allow_reassociation=None, instance_id=None, network_interface_id=None, private_ip_address=None, public_ip=None)

Get an existing EipAssociation resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • allocation_id (pulumi.Input[str]) – The allocation ID. This is required for EC2-VPC.

  • allow_reassociation (pulumi.Input[bool]) – Whether to allow an Elastic IP to be re-associated. Defaults to true in VPC.

  • instance_id (pulumi.Input[str]) – The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.

  • network_interface_id (pulumi.Input[str]) – The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

  • private_ip_address (pulumi.Input[str]) – The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

  • public_ip (pulumi.Input[str]) – The Elastic IP address. This is required for EC2-Classic.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.Fleet(resource_name, opts=None, excess_capacity_termination_policy=None, launch_template_config=None, on_demand_options=None, replace_unhealthy_instances=None, spot_options=None, tags=None, target_capacity_specification=None, terminate_instances=None, terminate_instances_with_expiration=None, type=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to manage EC2 Fleets.

import pulumi
import pulumi_aws as aws

example = aws.ec2.Fleet("example",
    launch_template_config={
        "launchTemplateSpecification": {
            "launchTemplateId": aws_launch_template["example"]["id"],
            "version": aws_launch_template["example"]["latest_version"],
        },
    },
    target_capacity_specification={
        "defaultTargetCapacityType": "spot",
        "totalTargetCapacity": 5,
    })
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • excess_capacity_termination_policy (pulumi.Input[str]) – Whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2. Valid values: no-termination, termination. Defaults to termination.

  • launch_template_config (pulumi.Input[dict]) – Nested argument containing EC2 Launch Template configurations. Defined below.

  • on_demand_options (pulumi.Input[dict]) – Nested argument containing On-Demand configurations. Defined below.

  • replace_unhealthy_instances (pulumi.Input[bool]) – Whether EC2 Fleet should replace unhealthy instances. Defaults to false.

  • spot_options (pulumi.Input[dict]) – Nested argument containing Spot configurations. Defined below.

  • tags (pulumi.Input[dict]) – Map of Fleet tags. To tag instances at launch, specify the tags in the Launch Template.

  • target_capacity_specification (pulumi.Input[dict]) – Nested argument containing target capacity configurations. Defined below.

  • terminate_instances (pulumi.Input[bool]) – Whether to terminate instances for an EC2 Fleet if it is deleted successfully. Defaults to false.

  • terminate_instances_with_expiration (pulumi.Input[bool]) – Whether running instances should be terminated when the EC2 Fleet expires. Defaults to false.

  • type (pulumi.Input[str]) – The type of request. Indicates whether the EC2 Fleet only requests the target capacity, or also attempts to maintain it. Valid values: maintain, request. Defaults to maintain.

The launch_template_config object supports the following:

  • launchTemplateSpecification (pulumi.Input[dict]) - Nested argument containing EC2 Launch Template to use. Defined below.

    • launchTemplateId (pulumi.Input[str]) - ID of the launch template.

    • launchTemplateName (pulumi.Input[str]) - Name of the launch template.

    • version (pulumi.Input[str]) - Version number of the launch template.

  • overrides (pulumi.Input[list]) - Nested argument(s) containing parameters to override the same parameters in the Launch Template. Defined below.

    • availability_zone (pulumi.Input[str]) - Availability Zone in which to launch the instances.

    • instance_type (pulumi.Input[str]) - Instance type.

    • maxPrice (pulumi.Input[str]) - Maximum price per unit hour that you are willing to pay for a Spot Instance.

    • priority (pulumi.Input[float]) - Priority for the launch template override. If on_demand_options allocation_strategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity. The highest priority is launched first. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. Valid values are whole numbers starting at 0.

    • subnet_id (pulumi.Input[str]) - ID of the subnet in which to launch the instances.

    • weightedCapacity (pulumi.Input[float]) - Number of units provided by the specified instance type.

The on_demand_options object supports the following:

  • allocation_strategy (pulumi.Input[str]) - How to allocate the target capacity across the Spot pools. Valid values: diversified, lowestPrice. Default: lowestPrice.

The spot_options object supports the following:

  • allocation_strategy (pulumi.Input[str]) - How to allocate the target capacity across the Spot pools. Valid values: diversified, lowestPrice. Default: lowestPrice.

  • instanceInterruptionBehavior (pulumi.Input[str]) - Behavior when a Spot Instance is interrupted. Valid values: hibernate, stop, terminate. Default: terminate.

  • instance_pools_to_use_count (pulumi.Input[float]) - Number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot allocation_strategy is set to lowestPrice. Default: 1.

The target_capacity_specification object supports the following:

  • defaultTargetCapacityType (pulumi.Input[str]) - Default target capacity type. Valid values: on-demand, spot.

  • onDemandTargetCapacity (pulumi.Input[float]) - The number of On-Demand units to request.

  • spotTargetCapacity (pulumi.Input[float]) - The number of Spot units to request.

  • totalTargetCapacity (pulumi.Input[float]) - The number of units to request, filled using default_target_capacity_type.

excess_capacity_termination_policy: pulumi.Output[str] = None

Whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2. Valid values: no-termination, termination. Defaults to termination.

launch_template_config: pulumi.Output[dict] = None

Nested argument containing EC2 Launch Template configurations. Defined below.

  • launchTemplateSpecification (dict) - Nested argument containing EC2 Launch Template to use. Defined below.

    • launchTemplateId (str) - ID of the launch template.

    • launchTemplateName (str) - Name of the launch template.

    • version (str) - Version number of the launch template.

  • overrides (list) - Nested argument(s) containing parameters to override the same parameters in the Launch Template. Defined below.

    • availability_zone (str) - Availability Zone in which to launch the instances.

    • instance_type (str) - Instance type.

    • maxPrice (str) - Maximum price per unit hour that you are willing to pay for a Spot Instance.

    • priority (float) - Priority for the launch template override. If on_demand_options allocation_strategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity. The highest priority is launched first. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. Valid values are whole numbers starting at 0.

    • subnet_id (str) - ID of the subnet in which to launch the instances.

    • weightedCapacity (float) - Number of units provided by the specified instance type.

on_demand_options: pulumi.Output[dict] = None

Nested argument containing On-Demand configurations. Defined below.

  • allocation_strategy (str) - How to allocate the target capacity across the Spot pools. Valid values: diversified, lowestPrice. Default: lowestPrice.

replace_unhealthy_instances: pulumi.Output[bool] = None

Whether EC2 Fleet should replace unhealthy instances. Defaults to false.

spot_options: pulumi.Output[dict] = None

Nested argument containing Spot configurations. Defined below.

  • allocation_strategy (str) - How to allocate the target capacity across the Spot pools. Valid values: diversified, lowestPrice. Default: lowestPrice.

  • instanceInterruptionBehavior (str) - Behavior when a Spot Instance is interrupted. Valid values: hibernate, stop, terminate. Default: terminate.

  • instance_pools_to_use_count (float) - Number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot allocation_strategy is set to lowestPrice. Default: 1.

tags: pulumi.Output[dict] = None

Map of Fleet tags. To tag instances at launch, specify the tags in the Launch Template.

target_capacity_specification: pulumi.Output[dict] = None

Nested argument containing target capacity configurations. Defined below.

  • defaultTargetCapacityType (str) - Default target capacity type. Valid values: on-demand, spot.

  • onDemandTargetCapacity (float) - The number of On-Demand units to request.

  • spotTargetCapacity (float) - The number of Spot units to request.

  • totalTargetCapacity (float) - The number of units to request, filled using default_target_capacity_type.

terminate_instances: pulumi.Output[bool] = None

Whether to terminate instances for an EC2 Fleet if it is deleted successfully. Defaults to false.

terminate_instances_with_expiration: pulumi.Output[bool] = None

Whether running instances should be terminated when the EC2 Fleet expires. Defaults to false.

type: pulumi.Output[str] = None

The type of request. Indicates whether the EC2 Fleet only requests the target capacity, or also attempts to maintain it. Valid values: maintain, request. Defaults to maintain.

static get(resource_name, id, opts=None, excess_capacity_termination_policy=None, launch_template_config=None, on_demand_options=None, replace_unhealthy_instances=None, spot_options=None, tags=None, target_capacity_specification=None, terminate_instances=None, terminate_instances_with_expiration=None, type=None)

Get an existing Fleet resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • excess_capacity_termination_policy (pulumi.Input[str]) – Whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2. Valid values: no-termination, termination. Defaults to termination.

  • launch_template_config (pulumi.Input[dict]) – Nested argument containing EC2 Launch Template configurations. Defined below.

  • on_demand_options (pulumi.Input[dict]) – Nested argument containing On-Demand configurations. Defined below.

  • replace_unhealthy_instances (pulumi.Input[bool]) – Whether EC2 Fleet should replace unhealthy instances. Defaults to false.

  • spot_options (pulumi.Input[dict]) – Nested argument containing Spot configurations. Defined below.

  • tags (pulumi.Input[dict]) – Map of Fleet tags. To tag instances at launch, specify the tags in the Launch Template.

  • target_capacity_specification (pulumi.Input[dict]) – Nested argument containing target capacity configurations. Defined below.

  • terminate_instances (pulumi.Input[bool]) – Whether to terminate instances for an EC2 Fleet if it is deleted successfully. Defaults to false.

  • terminate_instances_with_expiration (pulumi.Input[bool]) – Whether running instances should be terminated when the EC2 Fleet expires. Defaults to false.

  • type (pulumi.Input[str]) – The type of request. Indicates whether the EC2 Fleet only requests the target capacity, or also attempts to maintain it. Valid values: maintain, request. Defaults to maintain.

The launch_template_config object supports the following:

  • launchTemplateSpecification (pulumi.Input[dict]) - Nested argument containing EC2 Launch Template to use. Defined below.

    • launchTemplateId (pulumi.Input[str]) - ID of the launch template.

    • launchTemplateName (pulumi.Input[str]) - Name of the launch template.

    • version (pulumi.Input[str]) - Version number of the launch template.

  • overrides (pulumi.Input[list]) - Nested argument(s) containing parameters to override the same parameters in the Launch Template. Defined below.

    • availability_zone (pulumi.Input[str]) - Availability Zone in which to launch the instances.

    • instance_type (pulumi.Input[str]) - Instance type.

    • maxPrice (pulumi.Input[str]) - Maximum price per unit hour that you are willing to pay for a Spot Instance.

    • priority (pulumi.Input[float]) - Priority for the launch template override. If on_demand_options allocation_strategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity. The highest priority is launched first. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. Valid values are whole numbers starting at 0.

    • subnet_id (pulumi.Input[str]) - ID of the subnet in which to launch the instances.

    • weightedCapacity (pulumi.Input[float]) - Number of units provided by the specified instance type.

The on_demand_options object supports the following:

  • allocation_strategy (pulumi.Input[str]) - How to allocate the target capacity across the Spot pools. Valid values: diversified, lowestPrice. Default: lowestPrice.

The spot_options object supports the following:

  • allocation_strategy (pulumi.Input[str]) - How to allocate the target capacity across the Spot pools. Valid values: diversified, lowestPrice. Default: lowestPrice.

  • instanceInterruptionBehavior (pulumi.Input[str]) - Behavior when a Spot Instance is interrupted. Valid values: hibernate, stop, terminate. Default: terminate.

  • instance_pools_to_use_count (pulumi.Input[float]) - Number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot allocation_strategy is set to lowestPrice. Default: 1.

The target_capacity_specification object supports the following:

  • defaultTargetCapacityType (pulumi.Input[str]) - Default target capacity type. Valid values: on-demand, spot.

  • onDemandTargetCapacity (pulumi.Input[float]) - The number of On-Demand units to request.

  • spotTargetCapacity (pulumi.Input[float]) - The number of Spot units to request.

  • totalTargetCapacity (pulumi.Input[float]) - The number of units to request, filled using default_target_capacity_type.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.FlowLog(resource_name, opts=None, eni_id=None, iam_role_arn=None, log_destination=None, log_destination_type=None, log_format=None, log_group_name=None, max_aggregation_interval=None, subnet_id=None, tags=None, traffic_type=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)

Provides a VPC/Subnet/ENI Flow Log to capture IP traffic for a specific network interface, subnet, or VPC. Logs are sent to a CloudWatch Log Group or a S3 Bucket.

import pulumi
import pulumi_aws as aws

example_log_group = aws.cloudwatch.LogGroup("exampleLogGroup")
example_role = aws.iam.Role("exampleRole", assume_role_policy="""{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": "vpc-flow-logs.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}

""")
example_flow_log = aws.ec2.FlowLog("exampleFlowLog",
    iam_role_arn=example_role.arn,
    log_destination=example_log_group.arn,
    traffic_type="ALL",
    vpc_id=aws_vpc["example"]["id"])
example_role_policy = aws.iam.RolePolicy("exampleRolePolicy",
    policy="""{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:PutLogEvents",
        "logs:DescribeLogGroups",
        "logs:DescribeLogStreams"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}

""",
    role=example_role.id)
import pulumi
import pulumi_aws as aws

example_bucket = aws.s3.Bucket("exampleBucket")
example_flow_log = aws.ec2.FlowLog("exampleFlowLog",
    log_destination=example_bucket.arn,
    log_destination_type="s3",
    traffic_type="ALL",
    vpc_id=aws_vpc["example"]["id"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • eni_id (pulumi.Input[str]) – Elastic Network Interface ID to attach to

  • iam_role_arn (pulumi.Input[str]) – The ARN for the IAM role that’s used to post flow logs to a CloudWatch Logs log group

  • log_destination (pulumi.Input[str]) – The ARN of the logging destination.

  • log_destination_type (pulumi.Input[str]) – The type of the logging destination. Valid values: cloud-watch-logs, s3. Default: cloud-watch-logs.

  • log_format (pulumi.Input[str]) – The fields to include in the flow log record, in the order in which they should appear.

  • log_group_name (pulumi.Input[str]) – Deprecated: Use log_destination instead. The name of the CloudWatch log group.

  • max_aggregation_interval (pulumi.Input[float]) – The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. Valid Values: 60 seconds (1 minute) or 600 seconds (10 minutes). Default: 600.

  • subnet_id (pulumi.Input[str]) – Subnet ID to attach to

  • tags (pulumi.Input[dict]) – Key-value map of resource tags

  • traffic_type (pulumi.Input[str]) – The type of traffic to capture. Valid values: ACCEPT,REJECT, ALL.

  • vpc_id (pulumi.Input[str]) – VPC ID to attach to

arn: pulumi.Output[str] = None

The ARN of the Flow Log.

eni_id: pulumi.Output[str] = None

Elastic Network Interface ID to attach to

iam_role_arn: pulumi.Output[str] = None

The ARN for the IAM role that’s used to post flow logs to a CloudWatch Logs log group

log_destination: pulumi.Output[str] = None

The ARN of the logging destination.

log_destination_type: pulumi.Output[str] = None

The type of the logging destination. Valid values: cloud-watch-logs, s3. Default: cloud-watch-logs.

log_format: pulumi.Output[str] = None

The fields to include in the flow log record, in the order in which they should appear.

log_group_name: pulumi.Output[str] = None

Deprecated: Use log_destination instead. The name of the CloudWatch log group.

max_aggregation_interval: pulumi.Output[float] = None

The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. Valid Values: 60 seconds (1 minute) or 600 seconds (10 minutes). Default: 600.

subnet_id: pulumi.Output[str] = None

Subnet ID to attach to

tags: pulumi.Output[dict] = None

Key-value map of resource tags

traffic_type: pulumi.Output[str] = None

The type of traffic to capture. Valid values: ACCEPT,REJECT, ALL.

vpc_id: pulumi.Output[str] = None

VPC ID to attach to

static get(resource_name, id, opts=None, arn=None, eni_id=None, iam_role_arn=None, log_destination=None, log_destination_type=None, log_format=None, log_group_name=None, max_aggregation_interval=None, subnet_id=None, tags=None, traffic_type=None, vpc_id=None)

Get an existing FlowLog resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – The ARN of the Flow Log.

  • eni_id (pulumi.Input[str]) – Elastic Network Interface ID to attach to

  • iam_role_arn (pulumi.Input[str]) – The ARN for the IAM role that’s used to post flow logs to a CloudWatch Logs log group

  • log_destination (pulumi.Input[str]) – The ARN of the logging destination.

  • log_destination_type (pulumi.Input[str]) – The type of the logging destination. Valid values: cloud-watch-logs, s3. Default: cloud-watch-logs.

  • log_format (pulumi.Input[str]) – The fields to include in the flow log record, in the order in which they should appear.

  • log_group_name (pulumi.Input[str]) – Deprecated: Use log_destination instead. The name of the CloudWatch log group.

  • max_aggregation_interval (pulumi.Input[float]) – The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. Valid Values: 60 seconds (1 minute) or 600 seconds (10 minutes). Default: 600.

  • subnet_id (pulumi.Input[str]) – Subnet ID to attach to

  • tags (pulumi.Input[dict]) – Key-value map of resource tags

  • traffic_type (pulumi.Input[str]) – The type of traffic to capture. Valid values: ACCEPT,REJECT, ALL.

  • vpc_id (pulumi.Input[str]) – VPC ID to attach to

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.GetCoipPoolResult(filters=None, id=None, local_gateway_route_table_id=None, pool_cidrs=None, pool_id=None, tags=None)

A collection of values returned by getCoipPool.

id = None

The provider-assigned unique ID for this managed resource.

pool_cidrs = None

Set of CIDR blocks in pool

class pulumi_aws.ec2.GetCoipPoolsResult(filters=None, id=None, pool_ids=None, tags=None)

A collection of values returned by getCoipPools.

id = None

The provider-assigned unique ID for this managed resource.

pool_ids = None

Set of COIP Pool Identifiers

class pulumi_aws.ec2.GetCustomerGatewayResult(bgp_asn=None, filters=None, id=None, ip_address=None, tags=None, type=None)

A collection of values returned by getCustomerGateway.

bgp_asn = None

(Optional) The gateway’s Border Gateway Protocol (BGP) Autonomous System Number (ASN).

ip_address = None

(Optional) The IP address of the gateway’s Internet-routable external interface.

tags = None

Map of key-value pairs assigned to the gateway.

type = None

(Optional) The type of customer gateway. The only type AWS supports at this time is “ipsec.1”.

class pulumi_aws.ec2.GetInstanceResult(ami=None, arn=None, associate_public_ip_address=None, availability_zone=None, credit_specifications=None, disable_api_termination=None, ebs_block_devices=None, ebs_optimized=None, ephemeral_block_devices=None, filters=None, get_password_data=None, get_user_data=None, host_id=None, iam_instance_profile=None, id=None, instance_id=None, instance_state=None, instance_tags=None, instance_type=None, key_name=None, metadata_options=None, monitoring=None, network_interface_id=None, outpost_arn=None, password_data=None, placement_group=None, private_dns=None, private_ip=None, public_dns=None, public_ip=None, root_block_devices=None, security_groups=None, source_dest_check=None, subnet_id=None, tags=None, tenancy=None, user_data=None, user_data_base64=None, vpc_security_group_ids=None)

A collection of values returned by getInstance.

ami = None

The ID of the AMI used to launch the instance.

arn = None

The ARN of the instance.

associate_public_ip_address = None

Whether or not the Instance is associated with a public IP address or not (Boolean).

availability_zone = None

The availability zone of the Instance.

credit_specifications = None

The credit specification of the Instance.

ebs_block_devices = None

The EBS block device mappings of the Instance.

ebs_optimized = None

Whether the Instance is EBS optimized or not (Boolean).

ephemeral_block_devices = None

The ephemeral block device mappings of the Instance.

host_id = None

The Id of the dedicated host the instance will be assigned to.

iam_instance_profile = None

The name of the instance profile associated with the Instance.

id = None

The provider-assigned unique ID for this managed resource.

instance_state = None

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

instance_type = None

The type of the Instance.

key_name = None

The key name of the Instance.

metadata_options = None

The metadata options of the Instance.

monitoring = None

Whether detailed monitoring is enabled or disabled for the Instance (Boolean).

network_interface_id = None

The ID of the network interface that was created with the Instance.

outpost_arn = None

The Amazon Resource Name (ARN) of the Outpost.

password_data = None

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. See GetPasswordData for more information.

placement_group = None

The placement group of the Instance.

private_dns = None

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.

private_ip = None

The private IP address assigned to the Instance.

public_dns = None

The 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 = None

The public IP address assigned to the Instance, if applicable. NOTE: If you are using an 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_devices = None

The root block device mappings of the Instance

security_groups = None

The associated security groups.

source_dest_check = None

Whether the network interface performs source/destination checking (Boolean).

subnet_id = None

The VPC subnet ID.

tags = None

A mapping of tags assigned to the Instance.

tenancy = None

The tenancy of the instance: dedicated, default, host.

user_data = None

SHA-1 hash of User Data supplied to the Instance.

user_data_base64 = None

Base64 encoded contents of User Data supplied to the Instance. This attribute is only exported if get_user_data is true.

vpc_security_group_ids = None

The associated security groups in a non-default VPC.

class pulumi_aws.ec2.GetInstanceTypeOfferingResult(filters=None, id=None, instance_type=None, location_type=None, preferred_instance_types=None)

A collection of values returned by getInstanceTypeOffering.

id = None

The provider-assigned unique ID for this managed resource.

instance_type = None

EC2 Instance Type.

class pulumi_aws.ec2.GetInstanceTypeOfferingsResult(filters=None, id=None, instance_types=None, location_type=None)

A collection of values returned by getInstanceTypeOfferings.

id = None

The provider-assigned unique ID for this managed resource.

instance_types = None

Set of EC2 Instance Types.

class pulumi_aws.ec2.GetInstancesResult(filters=None, id=None, ids=None, instance_state_names=None, instance_tags=None, private_ips=None, public_ips=None)

A collection of values returned by getInstances.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

IDs of instances found through the filter

private_ips = None

Private IP addresses of instances found through the filter

public_ips = None

Public IP addresses of instances found through the filter

class pulumi_aws.ec2.GetInternetGatewayResult(arn=None, attachments=None, filters=None, id=None, internet_gateway_id=None, owner_id=None, tags=None)

A collection of values returned by getInternetGateway.

arn = None

The ARN of the Internet Gateway.

id = None

The provider-assigned unique ID for this managed resource.

owner_id = None

The ID of the AWS account that owns the internet gateway.

class pulumi_aws.ec2.GetLaunchConfigurationResult(arn=None, associate_public_ip_address=None, ebs_block_devices=None, ebs_optimized=None, enable_monitoring=None, ephemeral_block_devices=None, iam_instance_profile=None, id=None, image_id=None, instance_type=None, key_name=None, name=None, placement_tenancy=None, root_block_devices=None, security_groups=None, spot_price=None, user_data=None, vpc_classic_link_id=None, vpc_classic_link_security_groups=None)

A collection of values returned by getLaunchConfiguration.

arn = None

The Amazon Resource Name of the launch configuration.

associate_public_ip_address = None

Whether a Public IP address is associated with the instance.

ebs_block_devices = None

The EBS Block Devices attached to the instance.

ebs_optimized = None

Whether the launched EC2 instance will be EBS-optimized.

enable_monitoring = None

Whether Detailed Monitoring is Enabled.

ephemeral_block_devices = None

The Ephemeral volumes on the instance.

iam_instance_profile = None

The IAM Instance Profile to associate with launched instances.

id = None

The provider-assigned unique ID for this managed resource.

image_id = None

The EC2 Image ID of the instance.

instance_type = None

The Instance Type of the instance to launch.

key_name = None

The Key Name that should be used for the instance.

name = None

The Name of the launch configuration.

placement_tenancy = None

The Tenancy of the instance.

root_block_devices = None

The Root Block Device of the instance.

security_groups = None

A list of associated Security Group IDS.

spot_price = None

The Price to use for reserving Spot instances.

user_data = None

The User Data of the instance.

The ID of a ClassicLink-enabled VPC.

The IDs of one or more Security Groups for the specified ClassicLink-enabled VPC.

class pulumi_aws.ec2.GetLaunchTemplateResult(arn=None, block_device_mappings=None, credit_specifications=None, default_version=None, description=None, disable_api_termination=None, ebs_optimized=None, elastic_gpu_specifications=None, filters=None, hibernation_options=None, iam_instance_profiles=None, id=None, image_id=None, instance_initiated_shutdown_behavior=None, instance_market_options=None, instance_type=None, kernel_id=None, key_name=None, latest_version=None, metadata_options=None, monitorings=None, name=None, network_interfaces=None, placements=None, ram_disk_id=None, security_group_names=None, tag_specifications=None, tags=None, user_data=None, vpc_security_group_ids=None)

A collection of values returned by getLaunchTemplate.

arn = None

Amazon Resource Name (ARN) of the launch template.

block_device_mappings = None

Specify volumes to attach to the instance besides the volumes specified by the AMI.

credit_specifications = None

Customize the credit specification of the instance. See Credit Specification below for more details.

default_version = None

The default version of the launch template.

description = None

Description of the launch template.

disable_api_termination = None

If true, enables EC2 Instance Termination Protection

ebs_optimized = None

If true, the launched EC2 instance will be EBS-optimized.

elastic_gpu_specifications = None

The elastic GPU to attach to the instance. See Elastic GPU below for more details.

hibernation_options = None

The hibernation options for the instance.

iam_instance_profiles = None

The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.

id = None

The provider-assigned unique ID for this managed resource.

image_id = None

The AMI from which to launch the instance.

instance_initiated_shutdown_behavior = None

Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).

instance_market_options = None

The market (purchasing) option for the instance. below for details.

instance_type = None

The type of the instance.

kernel_id = None

The kernel ID.

key_name = None

The key name to use for the instance.

latest_version = None

The latest version of the launch template.

metadata_options = None

The metadata options for the instance.

monitorings = None

The monitoring option for the instance.

network_interfaces = None

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

placements = None

The placement of the instance.

ram_disk_id = None

The ID of the RAM disk.

security_group_names = None

A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.

tag_specifications = None

The tags to apply to the resources during launch.

tags = None

(Optional) A map of tags to assign to the launch template.

user_data = None

The Base64-encoded user data to provide when launching the instance.

vpc_security_group_ids = None

A list of security group IDs to associate with.

class pulumi_aws.ec2.GetLocalGatewayResult(filters=None, id=None, outpost_arn=None, owner_id=None, state=None, tags=None)

A collection of values returned by getLocalGateway.

outpost_arn = None

Amazon Resource Name (ARN) of Outpost

owner_id = None

AWS account identifier that owns the Local Gateway.

state = None

State of the local gateway.

class pulumi_aws.ec2.GetLocalGatewayRouteTableResult(filters=None, id=None, local_gateway_id=None, local_gateway_route_table_id=None, outpost_arn=None, state=None, tags=None)

A collection of values returned by getLocalGatewayRouteTable.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_aws.ec2.GetLocalGatewayRouteTablesResult(filters=None, id=None, ids=None, tags=None)

A collection of values returned by getLocalGatewayRouteTables.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

Set of Local Gateway Route Table identifiers

class pulumi_aws.ec2.GetLocalGatewayVirtualInterfaceGroupResult(filters=None, id=None, local_gateway_id=None, local_gateway_virtual_interface_ids=None, tags=None)

A collection of values returned by getLocalGatewayVirtualInterfaceGroup.

local_gateway_virtual_interface_ids = None

Set of EC2 Local Gateway Virtual Interface identifiers.

class pulumi_aws.ec2.GetLocalGatewayVirtualInterfaceGroupsResult(filters=None, id=None, ids=None, local_gateway_virtual_interface_ids=None, tags=None)

A collection of values returned by getLocalGatewayVirtualInterfaceGroups.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

Set of EC2 Local Gateway Virtual Interface Group identifiers.

local_gateway_virtual_interface_ids = None

Set of EC2 Local Gateway Virtual Interface identifiers.

class pulumi_aws.ec2.GetLocalGatewayVirtualInterfaceResult(filters=None, id=None, local_address=None, local_bgp_asn=None, local_gateway_id=None, local_gateway_virtual_interface_ids=None, peer_address=None, peer_bgp_asn=None, tags=None, vlan=None)

A collection of values returned by getLocalGatewayVirtualInterface.

local_address = None

Local address.

local_bgp_asn = None

Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the EC2 Local Gateway.

local_gateway_id = None

Identifier of the EC2 Local Gateway.

peer_address = None

Peer address.

peer_bgp_asn = None

Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the peer.

vlan = None

Virtual Local Area Network.

class pulumi_aws.ec2.GetLocalGatewaysResult(filters=None, id=None, ids=None, tags=None)

A collection of values returned by getLocalGateways.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

Set of all the Local Gateway identifiers

class pulumi_aws.ec2.GetNatGatewayResult(allocation_id=None, filters=None, id=None, network_interface_id=None, private_ip=None, public_ip=None, state=None, subnet_id=None, tags=None, vpc_id=None)

A collection of values returned by getNatGateway.

allocation_id = None

The Id of the EIP allocated to the selected Nat Gateway.

network_interface_id = None

The Id of the ENI allocated to the selected Nat Gateway.

private_ip = None

The private Ip address of the selected Nat Gateway.

public_ip = None

The public Ip (EIP) address of the selected Nat Gateway.

class pulumi_aws.ec2.GetNetworkAclsResult(filters=None, id=None, ids=None, tags=None, vpc_id=None)

A collection of values returned by getNetworkAcls.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

A list of all the network ACL ids found. This data source will fail if none are found.

class pulumi_aws.ec2.GetNetworkInterfaceResult(associations=None, attachments=None, availability_zone=None, description=None, filters=None, id=None, interface_type=None, ipv6_addresses=None, mac_address=None, outpost_arn=None, owner_id=None, private_dns_name=None, private_ip=None, private_ips=None, requester_id=None, security_groups=None, subnet_id=None, tags=None, vpc_id=None)

A collection of values returned by getNetworkInterface.

associations = None

The association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.

availability_zone = None

The Availability Zone.

description = None

Description of the network interface.

interface_type = None

The type of interface.

ipv6_addresses = None

List of IPv6 addresses to assign to the ENI.

mac_address = None

The MAC address.

outpost_arn = None

The Amazon Resource Name (ARN) of the Outpost.

owner_id = None

The AWS account ID of the owner of the network interface.

private_dns_name = None

The private DNS name.

private_ip = None

The private IPv4 address of the network interface within the subnet.

private_ips = None

The private IPv4 addresses associated with the network interface.

requester_id = None

The ID of the entity that launched the instance on your behalf.

security_groups = None

The list of security groups for the network interface.

subnet_id = None

The ID of the subnet.

tags = None

Any tags assigned to the network interface.

vpc_id = None

The ID of the VPC.

class pulumi_aws.ec2.GetNetworkInterfacesResult(filters=None, id=None, ids=None, tags=None)

A collection of values returned by getNetworkInterfaces.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

A list of all the network interface ids found. This data source will fail if none are found.

class pulumi_aws.ec2.GetRouteResult(destination_cidr_block=None, destination_ipv6_cidr_block=None, egress_only_gateway_id=None, gateway_id=None, id=None, instance_id=None, nat_gateway_id=None, network_interface_id=None, route_table_id=None, transit_gateway_id=None, vpc_peering_connection_id=None)

A collection of values returned by getRoute.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_aws.ec2.GetRouteTableResult(associations=None, filters=None, gateway_id=None, id=None, owner_id=None, route_table_id=None, routes=None, subnet_id=None, tags=None, vpc_id=None)

A collection of values returned by getRouteTable.

gateway_id = None

The Gateway ID. Only set when associated with an Internet Gateway or Virtual Private Gateway.

id = None

The provider-assigned unique ID for this managed resource.

owner_id = None

The ID of the AWS account that owns the route table

route_table_id = None

The Route Table ID.

subnet_id = None

The Subnet ID. Only set when associated with a Subnet.

class pulumi_aws.ec2.GetRouteTablesResult(filters=None, id=None, ids=None, tags=None, vpc_id=None)

A collection of values returned by getRouteTables.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

A set of all the route table ids found. This data source will fail if none are found.

class pulumi_aws.ec2.GetSecurityGroupResult(arn=None, description=None, filters=None, id=None, name=None, tags=None, vpc_id=None)

A collection of values returned by getSecurityGroup.

arn = None

The computed ARN of the security group.

description = None

The description of the security group.

class pulumi_aws.ec2.GetSecurityGroupsResult(filters=None, id=None, ids=None, tags=None, vpc_ids=None)

A collection of values returned by getSecurityGroups.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

IDs of the matches security groups.

vpc_ids = None

The VPC IDs of the matched security groups. The data source’s tag or filter will span VPCs unless the vpc-id filter is also used.

class pulumi_aws.ec2.GetSubnetIdsResult(filters=None, id=None, ids=None, tags=None, vpc_id=None)

A collection of values returned by getSubnetIds.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

A set of all the subnet ids found. This data source will fail if none are found.

class pulumi_aws.ec2.GetSubnetResult(arn=None, assign_ipv6_address_on_creation=None, availability_zone=None, availability_zone_id=None, cidr_block=None, default_for_az=None, filters=None, id=None, ipv6_cidr_block=None, ipv6_cidr_block_association_id=None, map_public_ip_on_launch=None, outpost_arn=None, owner_id=None, state=None, tags=None, vpc_id=None)

A collection of values returned by getSubnet.

arn = None

The ARN of the subnet.

outpost_arn = None

The Amazon Resource Name (ARN) of the Outpost.

owner_id = None

The ID of the AWS account that owns the subnet.

class pulumi_aws.ec2.GetVpcDhcpOptionsResult(arn=None, dhcp_options_id=None, domain_name=None, domain_name_servers=None, filters=None, id=None, netbios_name_servers=None, netbios_node_type=None, ntp_servers=None, owner_id=None, tags=None)

A collection of values returned by getVpcDhcpOptions.

arn = None

The ARN of the DHCP Options Set.

dhcp_options_id = None

EC2 DHCP Options ID

domain_name = None

The suffix domain name to used when resolving non Fully Qualified Domain Names. e.g. the search value in the /etc/resolv.conf file.

domain_name_servers = None

List of name servers.

id = None

The provider-assigned unique ID for this managed resource.

netbios_name_servers = None

List of NETBIOS name servers.

netbios_node_type = None

The NetBIOS node type (1, 2, 4, or 8). For more information about these node types, see RFC 2132.

ntp_servers = None

List of NTP servers.

owner_id = None

The ID of the AWS account that owns the DHCP options set.

tags = None

A map of tags assigned to the resource.

class pulumi_aws.ec2.GetVpcEndpointResult(cidr_blocks=None, dns_entries=None, filters=None, id=None, network_interface_ids=None, owner_id=None, policy=None, prefix_list_id=None, private_dns_enabled=None, requester_managed=None, route_table_ids=None, security_group_ids=None, service_name=None, state=None, subnet_ids=None, tags=None, vpc_endpoint_type=None, vpc_id=None)

A collection of values returned by getVpcEndpoint.

cidr_blocks = None

The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type Gateway.

dns_entries = None

The DNS entries for the VPC Endpoint. Applicable for endpoints of type Interface. DNS blocks are documented below.

network_interface_ids = None

One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type Interface.

owner_id = None

The ID of the AWS account that owns the VPC endpoint.

policy = None

The policy document associated with the VPC Endpoint. Applicable for endpoints of type Gateway.

prefix_list_id = None

The prefix list ID of the exposed AWS service. Applicable for endpoints of type Gateway.

private_dns_enabled = None

Whether or not the VPC is associated with a private hosted zone - true or false. Applicable for endpoints of type Interface.

requester_managed = None

Whether or not the VPC Endpoint is being managed by its service - true or false.

route_table_ids = None

One or more route tables associated with the VPC Endpoint. Applicable for endpoints of type Gateway.

security_group_ids = None

One or more security groups associated with the network interfaces. Applicable for endpoints of type Interface.

subnet_ids = None

One or more subnets in which the VPC Endpoint is located. Applicable for endpoints of type Interface.

vpc_endpoint_type = None

The VPC Endpoint type, Gateway or Interface.

class pulumi_aws.ec2.GetVpcEndpointServiceResult(acceptance_required=None, availability_zones=None, base_endpoint_dns_names=None, filters=None, id=None, manages_vpc_endpoints=None, owner=None, private_dns_name=None, service=None, service_id=None, service_name=None, service_type=None, tags=None, vpc_endpoint_policy_supported=None)

A collection of values returned by getVpcEndpointService.

acceptance_required = None

Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - true or false.

availability_zones = None

The Availability Zones in which the service is available.

base_endpoint_dns_names = None

The DNS names for the service.

id = None

The provider-assigned unique ID for this managed resource.

manages_vpc_endpoints = None

Whether or not the service manages its VPC endpoints - true or false.

owner = None

The AWS account ID of the service owner or amazon.

private_dns_name = None

The private DNS name for the service.

service_id = None

The ID of the endpoint service.

service_type = None

The service type, Gateway or Interface.

tags = None

A map of tags assigned to the resource.

vpc_endpoint_policy_supported = None

Whether or not the service supports endpoint policies - true or false.

class pulumi_aws.ec2.GetVpcPeeringConnectionResult(accepter=None, cidr_block=None, filters=None, id=None, owner_id=None, peer_cidr_block=None, peer_owner_id=None, peer_region=None, peer_vpc_id=None, region=None, requester=None, status=None, tags=None, vpc_id=None)

A collection of values returned by getVpcPeeringConnection.

accepter = None

A configuration block that describes [VPC Peering Connection] (https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options set for the accepter VPC.

requester = None

A configuration block that describes [VPC Peering Connection] (https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options set for the requester VPC.

class pulumi_aws.ec2.GetVpcResult(arn=None, cidr_block=None, cidr_block_associations=None, default=None, dhcp_options_id=None, enable_dns_hostnames=None, enable_dns_support=None, filters=None, id=None, instance_tenancy=None, ipv6_association_id=None, ipv6_cidr_block=None, main_route_table_id=None, owner_id=None, state=None, tags=None)

A collection of values returned by getVpc.

arn = None

Amazon Resource Name (ARN) of VPC

cidr_block = None

The CIDR block for the association.

enable_dns_hostnames = None

Whether or not the VPC has DNS hostname support

enable_dns_support = None

Whether or not the VPC has DNS support

instance_tenancy = None

The allowed tenancy of instances launched into the selected VPC. May be any of "default", "dedicated", or "host".

ipv6_association_id = None

The association ID for the IPv6 CIDR block.

ipv6_cidr_block = None

The IPv6 CIDR block.

main_route_table_id = None

The ID of the main route table associated with this VPC.

owner_id = None

The ID of the AWS account that owns the VPC.

state = None

The State of the association.

class pulumi_aws.ec2.GetVpcsResult(filters=None, id=None, ids=None, tags=None)

A collection of values returned by getVpcs.

id = None

The provider-assigned unique ID for this managed resource.

ids = None

A list of all the VPC Ids found. This data source will fail if none are found.

class pulumi_aws.ec2.GetVpnGatewayResult(amazon_side_asn=None, attached_vpc_id=None, availability_zone=None, filters=None, id=None, state=None, tags=None)

A collection of values returned by getVpnGateway.

class pulumi_aws.ec2.Instance(resource_name, opts=None, ami=None, associate_public_ip_address=None, availability_zone=None, cpu_core_count=None, cpu_threads_per_core=None, credit_specification=None, disable_api_termination=None, ebs_block_devices=None, ebs_optimized=None, ephemeral_block_devices=None, get_password_data=None, hibernation=None, host_id=None, iam_instance_profile=None, instance_initiated_shutdown_behavior=None, instance_type=None, ipv6_address_count=None, ipv6_addresses=None, key_name=None, metadata_options=None, monitoring=None, network_interfaces=None, placement_group=None, private_ip=None, root_block_device=None, security_groups=None, source_dest_check=None, subnet_id=None, tags=None, tenancy=None, user_data=None, user_data_base64=None, volume_tags=None, vpc_security_group_ids=None, __props__=None, __name__=None, __opts__=None)

Provides an EC2 instance resource. This allows instances to be created, updated, and deleted.

import pulumi
import pulumi_aws as aws

ubuntu = aws.get_ami(filters=[
        {
            "name": "name",
            "values": ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"],
        },
        {
            "name": "virtualization-type",
            "values": ["hvm"],
        },
    ],
    most_recent=True,
    owners=["099720109477"])
web = aws.ec2.Instance("web",
    ami=ubuntu.id,
    instance_type="t2.micro",
    tags={
        "Name": "HelloWorld",
    })
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • ami (pulumi.Input[str]) – The AMI to use for the instance.

  • associate_public_ip_address (pulumi.Input[bool]) – Associate a public ip address with an instance in a VPC. Boolean value.

  • availability_zone (pulumi.Input[str]) – The AZ to start the instance in.

  • cpu_core_count (pulumi.Input[float]) – 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_threads_per_core (pulumi.Input[float]) – If set to to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

  • credit_specification (pulumi.Input[dict]) – Customize the credit specification of the instance. See Credit Specification below for more details.

  • disable_api_termination (pulumi.Input[bool]) –

    If true, enables EC2 Instance Termination Protection

  • ebs_block_devices (pulumi.Input[list]) – 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.

  • ebs_optimized (pulumi.Input[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.

  • ephemeral_block_devices (pulumi.Input[list]) – Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

  • get_password_data (pulumi.Input[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 (pulumi.Input[bool]) – If true, the launched EC2 instance will support hibernation.

  • host_id (pulumi.Input[str]) – The 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.

  • iam_instance_profile (pulumi.Input[dict]) – The 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 (pulumi.Input[str]) – 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_type (pulumi.Input[str]) – The type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance.

  • ipv6_address_count (pulumi.Input[float]) – A 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 (pulumi.Input[list]) – Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface

  • key_name (pulumi.Input[str]) – The key name of the Key Pair to use for the instance; which can be managed using the ec2.KeyPair resource.

  • metadata_options (pulumi.Input[dict]) – Customize the metadata options of the instance. See Metadata Options below for more details.

  • monitoring (pulumi.Input[bool]) – If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)

  • network_interfaces (pulumi.Input[list]) – Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.

  • placement_group (pulumi.Input[str]) – The Placement Group to start the instance in.

  • private_ip (pulumi.Input[str]) – Private IP address to associate with the instance in a VPC.

  • root_block_device (pulumi.Input[dict]) – Customize details about the root block device of the instance. See Block Devices below for details.

  • security_groups (pulumi.Input[list]) – A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.

  • source_dest_check (pulumi.Input[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.

  • subnet_id (pulumi.Input[str]) – The VPC Subnet ID to launch in.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • tenancy (pulumi.Input[str]) – The 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.

  • user_data (pulumi.Input[str]) – The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

  • user_data_base64 (pulumi.Input[str]) – 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.

  • volume_tags (pulumi.Input[dict]) – A map of tags to assign to the devices created by the instance at launch time.

  • vpc_security_group_ids (pulumi.Input[list]) – A list of security group IDs to associate with.

The credit_specification object supports the following:

  • cpuCredits (pulumi.Input[str]) - The credit option for CPU usage. Can be "standard" or "unlimited". T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.

The ebs_block_devices object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Whether the volume should be destroyed on instance termination (Default: true).

  • device_name (pulumi.Input[str]) - The name of the device to mount.

  • encrypted (pulumi.Input[bool]) - Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id. Must be configured to perform drift detection.

  • iops (pulumi.Input[float]) - The amount of provisioned IOPS. This must be set with a volume_type of "io1".

  • kms_key_id (pulumi.Input[str]) - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.

  • snapshot_id (pulumi.Input[str]) - The Snapshot ID to mount.

  • volume_id (pulumi.Input[str])

  • volume_size (pulumi.Input[float]) - The size of the volume in gibibytes (GiB).

  • volumeType (pulumi.Input[str]) - The type of volume. Can be "standard", "gp2", or "io1". (Default: "gp2").

The ephemeral_block_devices object supports the following:

  • device_name (pulumi.Input[str]) - The name of the block device to mount on the instance.

  • noDevice (pulumi.Input[bool]) - Suppresses the specified device included in the AMI’s block device mapping.

  • virtualName (pulumi.Input[str]) - The Instance Store Device Name (e.g. "ephemeral0").

The metadata_options object supports the following:

  • httpEndpoint (pulumi.Input[str]) - Whether the metadata service is available. Can be "enabled" or "disabled". (Default: "enabled").

  • httpPutResponseHopLimit (pulumi.Input[float]) - The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Can be an integer from 1 to 64. (Default: 1).

  • httpTokens (pulumi.Input[str]) - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2. Can be "optional" or "required". (Default: "optional").

The network_interfaces object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.

  • device_index (pulumi.Input[float]) - The integer index of the network interface attachment. Limited by instance type.

  • network_interface_id (pulumi.Input[str]) - The ID of the network interface to attach.

The root_block_device object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Whether the volume should be destroyed on instance termination (Default: true).

  • device_name (pulumi.Input[str]) - The name of the device to mount.

  • encrypted (pulumi.Input[bool]) - Enable volume encryption. (Default: false). Must be configured to perform drift detection.

  • iops (pulumi.Input[float]) - The amount of provisioned IOPS. This is only valid for volume_type of "io1", and must be specified if using that type

  • kms_key_id (pulumi.Input[str]) - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.

  • volume_id (pulumi.Input[str])

  • volume_size (pulumi.Input[float]) - The size of the volume in gibibytes (GiB).

  • volumeType (pulumi.Input[str]) - The type of volume. Can be "standard", "gp2", "io1", "sc1", or "st1". (Default: "standard").

ami: pulumi.Output[str] = None

The AMI to use for the instance.

arn: pulumi.Output[str] = None

The ARN of the instance.

associate_public_ip_address: pulumi.Output[bool] = None

Associate a public ip address with an instance in a VPC. Boolean value.

availability_zone: pulumi.Output[str] = None

The AZ to start the instance in.

cpu_core_count: pulumi.Output[float] = None

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_threads_per_core: pulumi.Output[float] = None

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

credit_specification: pulumi.Output[dict] = None

Customize the credit specification of the instance. See Credit Specification below for more details.

  • cpuCredits (str) - The credit option for CPU usage. Can be "standard" or "unlimited". T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.

disable_api_termination: pulumi.Output[bool] = None

If true, enables EC2 Instance Termination Protection

ebs_block_devices: pulumi.Output[list] = None

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.

  • deleteOnTermination (bool) - Whether the volume should be destroyed on instance termination (Default: true).

  • device_name (str) - The name of the device to mount.

  • encrypted (bool) - Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id. Must be configured to perform drift detection.

  • iops (float) - The amount of provisioned IOPS. This must be set with a volume_type of "io1".

  • kms_key_id (str) - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.

  • snapshot_id (str) - The Snapshot ID to mount.

  • volume_id (str)

  • volume_size (float) - The size of the volume in gibibytes (GiB).

  • volumeType (str) - The type of volume. Can be "standard", "gp2", or "io1". (Default: "gp2").

ebs_optimized: pulumi.Output[bool] = None

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.

ephemeral_block_devices: pulumi.Output[list] = None

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

  • device_name (str) - The name of the block device to mount on the instance.

  • noDevice (bool) - Suppresses the specified device included in the AMI’s block device mapping.

  • virtualName (str) - The Instance Store Device Name (e.g. "ephemeral0").

get_password_data: pulumi.Output[bool] = None

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: pulumi.Output[bool] = None

If true, the launched EC2 instance will support hibernation.

host_id: pulumi.Output[str] = None

The 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.

iam_instance_profile: pulumi.Output[str] = None

The 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: pulumi.Output[str] = None

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_state: pulumi.Output[str] = None

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

instance_type: pulumi.Output[str] = None

The type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance.

ipv6_address_count: pulumi.Output[float] = None

A 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: pulumi.Output[list] = None

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

key_name: pulumi.Output[str] = None

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

metadata_options: pulumi.Output[dict] = None

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

  • httpEndpoint (str) - Whether the metadata service is available. Can be "enabled" or "disabled". (Default: "enabled").

  • httpPutResponseHopLimit (float) - The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Can be an integer from 1 to 64. (Default: 1).

  • httpTokens (str) - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2. Can be "optional" or "required". (Default: "optional").

monitoring: pulumi.Output[bool] = None

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

network_interfaces: pulumi.Output[list] = None

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

  • deleteOnTermination (bool) - Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.

  • device_index (float) - The integer index of the network interface attachment. Limited by instance type.

  • network_interface_id (str) - The ID of the network interface to attach.

outpost_arn: pulumi.Output[str] = None

The ARN of the Outpost the instance is assigned to.

password_data: pulumi.Output[str] = None

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: pulumi.Output[str] = None

The Placement Group to start the instance in.

primary_network_interface_id: pulumi.Output[str] = None

The ID of the instance’s primary network interface.

private_dns: pulumi.Output[str] = None

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

private_ip: pulumi.Output[str] = None

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

public_dns: pulumi.Output[str] = None

The 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: pulumi.Output[str] = None

The public IP address assigned to the instance, if applicable. NOTE: If you are using an 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: pulumi.Output[dict] = None

Customize details about the root block device of the instance. See Block Devices below for details.

  • deleteOnTermination (bool) - Whether the volume should be destroyed on instance termination (Default: true).

  • device_name (str) - The name of the device to mount.

  • encrypted (bool) - Enable volume encryption. (Default: false). Must be configured to perform drift detection.

  • iops (float) - The amount of provisioned IOPS. This is only valid for volume_type of "io1", and must be specified if using that type

  • kms_key_id (str) - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.

  • volume_id (str)

  • volume_size (float) - The size of the volume in gibibytes (GiB).

  • volumeType (str) - The type of volume. Can be "standard", "gp2", "io1", "sc1", or "st1". (Default: "standard").

security_groups: pulumi.Output[list] = None

A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.

source_dest_check: pulumi.Output[bool] = None

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

subnet_id: pulumi.Output[str] = None

The VPC Subnet ID to launch in.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

tenancy: pulumi.Output[str] = None

The 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.

user_data: pulumi.Output[str] = None

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

user_data_base64: pulumi.Output[str] = None

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.

volume_tags: pulumi.Output[dict] = None

A map of tags to assign to the devices created by the instance at launch time.

vpc_security_group_ids: pulumi.Output[list] = None

A list of security group IDs to associate with.

static get(resource_name, id, opts=None, ami=None, arn=None, associate_public_ip_address=None, availability_zone=None, cpu_core_count=None, cpu_threads_per_core=None, credit_specification=None, disable_api_termination=None, ebs_block_devices=None, ebs_optimized=None, ephemeral_block_devices=None, get_password_data=None, hibernation=None, host_id=None, iam_instance_profile=None, instance_initiated_shutdown_behavior=None, instance_state=None, instance_type=None, ipv6_address_count=None, ipv6_addresses=None, key_name=None, metadata_options=None, monitoring=None, network_interfaces=None, outpost_arn=None, password_data=None, placement_group=None, primary_network_interface_id=None, private_dns=None, private_ip=None, public_dns=None, public_ip=None, root_block_device=None, security_groups=None, source_dest_check=None, subnet_id=None, tags=None, tenancy=None, user_data=None, user_data_base64=None, volume_tags=None, vpc_security_group_ids=None)

Get an existing Instance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • ami (pulumi.Input[str]) – The AMI to use for the instance.

  • arn (pulumi.Input[str]) – The ARN of the instance.

  • associate_public_ip_address (pulumi.Input[bool]) – Associate a public ip address with an instance in a VPC. Boolean value.

  • availability_zone (pulumi.Input[str]) – The AZ to start the instance in.

  • cpu_core_count (pulumi.Input[float]) –

    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_threads_per_core (pulumi.Input[float]) –

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

  • credit_specification (pulumi.Input[dict]) – Customize the credit specification of the instance. See Credit Specification below for more details.

  • disable_api_termination (pulumi.Input[bool]) –

    If true, enables EC2 Instance Termination Protection

  • ebs_block_devices (pulumi.Input[list]) – 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.

  • ebs_optimized (pulumi.Input[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.

  • ephemeral_block_devices (pulumi.Input[list]) – Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

  • get_password_data (pulumi.Input[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 (pulumi.Input[bool]) – If true, the launched EC2 instance will support hibernation.

  • host_id (pulumi.Input[str]) – The 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.

  • iam_instance_profile (pulumi.Input[dict]) –

    The 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 (pulumi.Input[str]) –

    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_state (pulumi.Input[str]) –

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

  • instance_type (pulumi.Input[str]) – The type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance.

  • ipv6_address_count (pulumi.Input[float]) – A 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 (pulumi.Input[list]) – Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface

  • key_name (pulumi.Input[str]) – The key name of the Key Pair to use for the instance; which can be managed using the ec2.KeyPair resource.

  • metadata_options (pulumi.Input[dict]) – Customize the metadata options of the instance. See Metadata Options below for more details.

  • monitoring (pulumi.Input[bool]) – If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)

  • network_interfaces (pulumi.Input[list]) – Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.

  • outpost_arn (pulumi.Input[str]) – The ARN of the Outpost the instance is assigned to.

  • password_data (pulumi.Input[str]) –

    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 (pulumi.Input[str]) – The Placement Group to start the instance in.

  • primary_network_interface_id (pulumi.Input[str]) – The ID of the instance’s primary network interface.

  • private_dns (pulumi.Input[str]) – 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

  • private_ip (pulumi.Input[str]) – Private IP address to associate with the instance in a VPC.

  • public_dns (pulumi.Input[str]) – The 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 (pulumi.Input[str]) – The public IP address assigned to the instance, if applicable. NOTE: If you are using an 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 (pulumi.Input[dict]) – Customize details about the root block device of the instance. See Block Devices below for details.

  • security_groups (pulumi.Input[list]) – A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.

  • source_dest_check (pulumi.Input[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.

  • subnet_id (pulumi.Input[str]) – The VPC Subnet ID to launch in.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • tenancy (pulumi.Input[str]) – The 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.

  • user_data (pulumi.Input[str]) – The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

  • user_data_base64 (pulumi.Input[str]) – 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.

  • volume_tags (pulumi.Input[dict]) – A map of tags to assign to the devices created by the instance at launch time.

  • vpc_security_group_ids (pulumi.Input[list]) – A list of security group IDs to associate with.

The credit_specification object supports the following:

  • cpuCredits (pulumi.Input[str]) - The credit option for CPU usage. Can be "standard" or "unlimited". T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.

The ebs_block_devices object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Whether the volume should be destroyed on instance termination (Default: true).

  • device_name (pulumi.Input[str]) - The name of the device to mount.

  • encrypted (pulumi.Input[bool]) - Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id. Must be configured to perform drift detection.

  • iops (pulumi.Input[float]) - The amount of provisioned IOPS. This must be set with a volume_type of "io1".

  • kms_key_id (pulumi.Input[str]) - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.

  • snapshot_id (pulumi.Input[str]) - The Snapshot ID to mount.

  • volume_id (pulumi.Input[str])

  • volume_size (pulumi.Input[float]) - The size of the volume in gibibytes (GiB).

  • volumeType (pulumi.Input[str]) - The type of volume. Can be "standard", "gp2", or "io1". (Default: "gp2").

The ephemeral_block_devices object supports the following:

  • device_name (pulumi.Input[str]) - The name of the block device to mount on the instance.

  • noDevice (pulumi.Input[bool]) - Suppresses the specified device included in the AMI’s block device mapping.

  • virtualName (pulumi.Input[str]) - The Instance Store Device Name (e.g. "ephemeral0").

The metadata_options object supports the following:

  • httpEndpoint (pulumi.Input[str]) - Whether the metadata service is available. Can be "enabled" or "disabled". (Default: "enabled").

  • httpPutResponseHopLimit (pulumi.Input[float]) - The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Can be an integer from 1 to 64. (Default: 1).

  • httpTokens (pulumi.Input[str]) - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2. Can be "optional" or "required". (Default: "optional").

The network_interfaces object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.

  • device_index (pulumi.Input[float]) - The integer index of the network interface attachment. Limited by instance type.

  • network_interface_id (pulumi.Input[str]) - The ID of the network interface to attach.

The root_block_device object supports the following:

  • deleteOnTermination (pulumi.Input[bool]) - Whether the volume should be destroyed on instance termination (Default: true).

  • device_name (pulumi.Input[str]) - The name of the device to mount.

  • encrypted (pulumi.Input[bool]) - Enable volume encryption. (Default: false). Must be configured to perform drift detection.

  • iops (pulumi.Input[float]) - The amount of provisioned IOPS. This is only valid for volume_type of "io1", and must be specified if using that type

  • kms_key_id (pulumi.Input[str]) - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.

  • volume_id (pulumi.Input[str])

  • volume_size (pulumi.Input[float]) - The size of the volume in gibibytes (GiB).

  • volumeType (pulumi.Input[str]) - The type of volume. Can be "standard", "gp2", "io1", "sc1", or "st1". (Default: "standard").

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.InternetGateway(resource_name, opts=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to create a VPC Internet Gateway.

import pulumi
import pulumi_aws as aws

gw = aws.ec2.InternetGateway("gw",
    tags={
        "Name": "main",
    },
    vpc_id=aws_vpc["main"]["id"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The VPC ID to create in.

arn: pulumi.Output[str] = None

The ARN of the Internet Gateway.

owner_id: pulumi.Output[str] = None

The ID of the AWS account that owns the internet gateway.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

vpc_id: pulumi.Output[str] = None

The VPC ID to create in.

static get(resource_name, id, opts=None, arn=None, owner_id=None, tags=None, vpc_id=None)

Get an existing InternetGateway resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – The ARN of the Internet Gateway.

  • owner_id (pulumi.Input[str]) – The ID of the AWS account that owns the internet gateway.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The VPC ID to create in.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.KeyPair(resource_name, opts=None, key_name=None, key_name_prefix=None, public_key=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides an EC2 key pair resource. A key pair is used to control login access to EC2 instances.

Currently this resource requires an existing user-supplied key pair. This key pair’s public key will be registered with AWS to allow logging-in to EC2 instances.

When importing an existing key pair the public key material may be in any format supported by AWS. Supported formats (per the AWS documentation) are:

  • OpenSSH public key format (the format in ~/.ssh/authorized_keys)

  • Base64 encoded DER format

  • SSH public key file format as specified in RFC4716

import pulumi
import pulumi_aws as aws

deployer = aws.ec2.KeyPair("deployer", public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 email@example.com")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • key_name (pulumi.Input[str]) – The name for the key pair.

  • key_name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with key_name.

  • public_key (pulumi.Input[str]) – The public key material.

  • tags (pulumi.Input[dict]) – Key-value map of resource tags

arn: pulumi.Output[str] = None

The key pair ARN.

fingerprint: pulumi.Output[str] = None

The MD5 public key fingerprint as specified in section 4 of RFC 4716.

key_name: pulumi.Output[str] = None

The name for the key pair.

key_name_prefix: pulumi.Output[str] = None

Creates a unique name beginning with the specified prefix. Conflicts with key_name.

key_pair_id: pulumi.Output[str] = None

The key pair ID.

public_key: pulumi.Output[str] = None

The public key material.

tags: pulumi.Output[dict] = None

Key-value map of resource tags

static get(resource_name, id, opts=None, arn=None, fingerprint=None, key_name=None, key_name_prefix=None, key_pair_id=None, public_key=None, tags=None)

Get an existing KeyPair resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – The key pair ARN.

  • fingerprint (pulumi.Input[str]) – The MD5 public key fingerprint as specified in section 4 of RFC 4716.

  • key_name (pulumi.Input[str]) – The name for the key pair.

  • key_name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with key_name.

  • key_pair_id (pulumi.Input[str]) – The key pair ID.

  • public_key (pulumi.Input[str]) – The public key material.

  • tags (pulumi.Input[dict]) – Key-value map of resource tags

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.LaunchConfiguration(resource_name, opts=None, associate_public_ip_address=None, ebs_block_devices=None, ebs_optimized=None, enable_monitoring=None, ephemeral_block_devices=None, iam_instance_profile=None, image_id=None, instance_type=None, key_name=None, name=None, name_prefix=None, placement_tenancy=None, root_block_device=None, security_groups=None, spot_price=None, user_data=None, user_data_base64=None, vpc_classic_link_id=None, vpc_classic_link_security_groups=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to create a new launch configuration, used for autoscaling groups.

import pulumi
import pulumi_aws as aws

ubuntu = aws.get_ami(filters=[
        {
            "name": "name",
            "values": ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"],
        },
        {
            "name": "virtualization-type",
            "values": ["hvm"],
        },
    ],
    most_recent=True,
    owners=["099720109477"])
as_conf = aws.ec2.LaunchConfiguration("asConf",
    image_id=ubuntu.id,
    instance_type="t2.micro")

Launch Configurations cannot be updated after creation with the Amazon Web Service API. In order to update a Launch Configuration, this provider will destroy the existing resource and create a replacement. In order to effectively use a Launch Configuration resource with an AutoScaling Group resource, it’s recommended to specify create_before_destroy in a lifecycle block. Either omit the Launch Configuration name attribute, or specify a partial name with name_prefix. Example:

import pulumi
import pulumi_aws as aws

ubuntu = aws.get_ami(filters=[
        {
            "name": "name",
            "values": ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"],
        },
        {
            "name": "virtualization-type",
            "values": ["hvm"],
        },
    ],
    most_recent=True,
    owners=["099720109477"])
as_conf = aws.ec2.LaunchConfiguration("asConf",
    image_id=ubuntu.id,
    instance_type="t2.micro",
    name_prefix="lc-example-")
bar = aws.autoscaling.Group("bar",
    launch_configuration=as_conf.name,
    max_size=2,
    min_size=1)

With this setup this provider generates a unique name for your Launch Configuration and can then update the AutoScaling Group without conflict before destroying the previous Launch Configuration.

Launch configurations can set the spot instance pricing to be used for the Auto Scaling Group to reserve instances. Simply specifying the spot_price parameter will set the price on the Launch Configuration which will attempt to reserve your instances at this price. See the AWS Spot Instance documentation for more information or how to launch Spot Instances with this provider.

import pulumi
import pulumi_aws as aws

ubuntu = aws.get_ami(filters=[
        {
            "name": "name",
            "values": ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"],
        },
        {
            "name": "virtualization-type",
            "values": ["hvm"],
        },
    ],
    most_recent=True,
    owners=["099720109477"])
as_conf = aws.ec2.LaunchConfiguration("asConf",
    image_id=ubuntu.id,
    instance_type="m4.large",
    spot_price="0.001")
bar = aws.autoscaling.Group("bar", launch_configuration=as_conf.name)

Each of the *_block_device attributes controls a portion of the AWS Launch Configuration’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).

  • encrypted - (Optional) Whether the volume should be encrypted or not. (Default: false).

Modifying any of the root_block_device settings requires resource replacement.

Each ebs_block_device supports the following:

  • device_name - (Required) 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).

  • encrypted - (Optional) Whether the volume should be encrypted or not. Do not use this option if you are using snapshot_id as the encrypted flag will be determined by the snapshot. (Default: false).

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: Changes to *_block_device configuration of existing resources cannot currently be detected by this provider. After updating to block device configuration, resource recreation can be manually triggered by using the ``up` command with the –replace argument <https://www.pulumi.com/docs/reference/cli/pulumi_up/>`_.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • associate_public_ip_address (pulumi.Input[bool]) – Associate a public ip address with an instance in a VPC.

  • ebs_block_devices (pulumi.Input[list]) – Additional EBS block devices to attach to the instance. See Block Devices below for details.

  • ebs_optimized (pulumi.Input[bool]) – If true, the launched EC2 instance will be EBS-optimized.

  • enable_monitoring (pulumi.Input[bool]) – Enables/disables detailed monitoring. This is enabled by default.

  • ephemeral_block_devices (pulumi.Input[list]) – Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

  • iam_instance_profile (pulumi.Input[dict]) – The name attribute of the IAM instance profile to associate with launched instances.

  • image_id (pulumi.Input[str]) – The EC2 image ID to launch.

  • instance_type (pulumi.Input[str]) – The size of instance to launch.

  • key_name (pulumi.Input[str]) – The key name that should be used for the instance.

  • name (pulumi.Input[str]) – The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

  • name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with name.

  • placement_tenancy (pulumi.Input[str]) – The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

  • root_block_device (pulumi.Input[dict]) – Customize details about the root block device of the instance. See Block Devices below for details.

  • security_groups (pulumi.Input[list]) – A list of associated security group IDS.

  • spot_price (pulumi.Input[str]) – The maximum price to use for reserving spot instances.

  • user_data (pulumi.Input[str]) – The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

  • user_data_base64 (pulumi.Input[str]) – 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.

  • vpc_classic_link_id (pulumi.Input[str]) – The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

  • vpc_classic_link_security_groups (pulumi.Input[list]) – The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

The ebs_block_devices object supports the following:

  • deleteOnTermination (pulumi.Input[bool])

  • device_name (pulumi.Input[str])

  • encrypted (pulumi.Input[bool])

  • iops (pulumi.Input[float])

  • noDevice (pulumi.Input[bool])

  • snapshot_id (pulumi.Input[str])

  • volume_size (pulumi.Input[float])

  • volumeType (pulumi.Input[str])

The ephemeral_block_devices object supports the following:

  • device_name (pulumi.Input[str])

  • virtualName (pulumi.Input[str])

The root_block_device object supports the following:

  • deleteOnTermination (pulumi.Input[bool])

  • encrypted (pulumi.Input[bool])

  • iops (pulumi.Input[float])

  • volume_size (pulumi.Input[float])

  • volumeType (pulumi.Input[str])

arn: pulumi.Output[str] = None

The Amazon Resource Name of the launch configuration.

associate_public_ip_address: pulumi.Output[bool] = None

Associate a public ip address with an instance in a VPC.

ebs_block_devices: pulumi.Output[list] = None

Additional EBS block devices to attach to the instance. See Block Devices below for details.

  • deleteOnTermination (bool)

  • device_name (str)

  • encrypted (bool)

  • iops (float)

  • noDevice (bool)

  • snapshot_id (str)

  • volume_size (float)

  • volumeType (str)

ebs_optimized: pulumi.Output[bool] = None

If true, the launched EC2 instance will be EBS-optimized.

enable_monitoring: pulumi.Output[bool] = None

Enables/disables detailed monitoring. This is enabled by default.

ephemeral_block_devices: pulumi.Output[list] = None

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

  • device_name (str)

  • virtualName (str)

iam_instance_profile: pulumi.Output[str] = None

The name attribute of the IAM instance profile to associate with launched instances.

image_id: pulumi.Output[str] = None

The EC2 image ID to launch.

instance_type: pulumi.Output[str] = None

The size of instance to launch.

key_name: pulumi.Output[str] = None

The key name that should be used for the instance.

name: pulumi.Output[str] = None

The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

name_prefix: pulumi.Output[str] = None

Creates a unique name beginning with the specified prefix. Conflicts with name.

placement_tenancy: pulumi.Output[str] = None

The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

root_block_device: pulumi.Output[dict] = None

Customize details about the root block device of the instance. See Block Devices below for details.

  • deleteOnTermination (bool)

  • encrypted (bool)

  • iops (float)

  • volume_size (float)

  • volumeType (str)

security_groups: pulumi.Output[list] = None

A list of associated security group IDS.

spot_price: pulumi.Output[str] = None

The maximum price to use for reserving spot instances.

user_data: pulumi.Output[str] = None

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

user_data_base64: pulumi.Output[str] = None

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.

The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

static get(resource_name, id, opts=None, arn=None, associate_public_ip_address=None, ebs_block_devices=None, ebs_optimized=None, enable_monitoring=None, ephemeral_block_devices=None, iam_instance_profile=None, image_id=None, instance_type=None, key_name=None, name=None, name_prefix=None, placement_tenancy=None, root_block_device=None, security_groups=None, spot_price=None, user_data=None, user_data_base64=None, vpc_classic_link_id=None, vpc_classic_link_security_groups=None)

Get an existing LaunchConfiguration resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – The Amazon Resource Name of the launch configuration.

  • associate_public_ip_address (pulumi.Input[bool]) – Associate a public ip address with an instance in a VPC.

  • ebs_block_devices (pulumi.Input[list]) – Additional EBS block devices to attach to the instance. See Block Devices below for details.

  • ebs_optimized (pulumi.Input[bool]) – If true, the launched EC2 instance will be EBS-optimized.

  • enable_monitoring (pulumi.Input[bool]) – Enables/disables detailed monitoring. This is enabled by default.

  • ephemeral_block_devices (pulumi.Input[list]) – Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

  • iam_instance_profile (pulumi.Input[dict]) – The name attribute of the IAM instance profile to associate with launched instances.

  • image_id (pulumi.Input[str]) – The EC2 image ID to launch.

  • instance_type (pulumi.Input[str]) – The size of instance to launch.

  • key_name (pulumi.Input[str]) – The key name that should be used for the instance.

  • name (pulumi.Input[str]) – The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

  • name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with name.

  • placement_tenancy (pulumi.Input[str]) –

    The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

  • root_block_device (pulumi.Input[dict]) – Customize details about the root block device of the instance. See Block Devices below for details.

  • security_groups (pulumi.Input[list]) – A list of associated security group IDS.

  • spot_price (pulumi.Input[str]) – The maximum price to use for reserving spot instances.

  • user_data (pulumi.Input[str]) – The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

  • user_data_base64 (pulumi.Input[str]) – 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.

  • vpc_classic_link_id (pulumi.Input[str]) – The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

  • vpc_classic_link_security_groups (pulumi.Input[list]) – The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

The ebs_block_devices object supports the following:

  • deleteOnTermination (pulumi.Input[bool])

  • device_name (pulumi.Input[str])

  • encrypted (pulumi.Input[bool])

  • iops (pulumi.Input[float])

  • noDevice (pulumi.Input[bool])

  • snapshot_id (pulumi.Input[str])

  • volume_size (pulumi.Input[float])

  • volumeType (pulumi.Input[str])

The ephemeral_block_devices object supports the following:

  • device_name (pulumi.Input[str])

  • virtualName (pulumi.Input[str])

The root_block_device object supports the following:

  • deleteOnTermination (pulumi.Input[bool])

  • encrypted (pulumi.Input[bool])

  • iops (pulumi.Input[float])

  • volume_size (pulumi.Input[float])

  • volumeType (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.LaunchTemplate(resource_name, opts=None, block_device_mappings=None, capacity_reservation_specification=None, cpu_options=None, credit_specification=None, description=None, disable_api_termination=None, ebs_optimized=None, elastic_gpu_specifications=None, elastic_inference_accelerator=None, hibernation_options=None, iam_instance_profile=None, image_id=None, instance_initiated_shutdown_behavior=None, instance_market_options=None, instance_type=None, kernel_id=None, key_name=None, license_specifications=None, metadata_options=None, monitoring=None, name=None, name_prefix=None, network_interfaces=None, placement=None, ram_disk_id=None, security_group_names=None, tag_specifications=None, tags=None, user_data=None, vpc_security_group_ids=None, __props__=None, __name__=None, __opts__=None)

Provides an EC2 launch template resource. Can be used to create instances or auto scaling groups.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • block_device_mappings (pulumi.Input[list]) – Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.

  • capacity_reservation_specification (pulumi.Input[dict]) – Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.

  • cpu_options (pulumi.Input[dict]) – The CPU options for the instance. See CPU Options below for more details.

  • credit_specification (pulumi.Input[dict]) – Customize the credit specification of the instance. See Credit Specification below for more details.

  • description (pulumi.Input[str]) – Description of the launch template.

  • disable_api_termination (pulumi.Input[bool]) –

    If true, enables EC2 Instance Termination Protection

  • ebs_optimized (pulumi.Input[str]) – If true, the launched EC2 instance will be EBS-optimized.

  • elastic_gpu_specifications (pulumi.Input[list]) – The elastic GPU to attach to the instance. See Elastic GPU below for more details.

  • elastic_inference_accelerator (pulumi.Input[dict]) – Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.

  • hibernation_options (pulumi.Input[dict]) – The hibernation options for the instance. See Hibernation Options below for more details.

  • iam_instance_profile (pulumi.Input[dict]) – The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.

  • image_id (pulumi.Input[str]) – The AMI from which to launch the instance.

  • instance_initiated_shutdown_behavior (pulumi.Input[str]) – Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).

  • instance_market_options (pulumi.Input[dict]) – The market (purchasing) option for the instance. See Market Options below for details.

  • instance_type (pulumi.Input[str]) – The type of the instance.

  • kernel_id (pulumi.Input[str]) – The kernel ID.

  • key_name (pulumi.Input[str]) – The key name to use for the instance.

  • license_specifications (pulumi.Input[list]) – A list of license specifications to associate with. See License Specification below for more details.

  • metadata_options (pulumi.Input[dict]) – Customize the metadata options for the instance. See Metadata Options below for more details.

  • monitoring (pulumi.Input[dict]) – The monitoring option for the instance. See Monitoring below for more details.

  • name (pulumi.Input[str]) – The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.

  • name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with name.

  • network_interfaces (pulumi.Input[list]) – Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.

  • placement (pulumi.Input[dict]) – The placement of the instance. See Placement below for more details.

  • ram_disk_id (pulumi.Input[str]) – The ID of the RAM disk.

  • security_group_names (pulumi.Input[list]) – A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.

  • tag_specifications (pulumi.Input[list]) – The tags to apply to the resources during launch. See Tag Specifications below for more details.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the launch template.

  • user_data (pulumi.Input[str]) – The Base64-encoded user data to provide when launching the instance.

  • vpc_security_group_ids (pulumi.Input[list]) – A list of security group IDs to associate with.

The block_device_mappings object supports the following:

  • device_name (pulumi.Input[str]) - The name of the device to mount.

  • ebs (pulumi.Input[dict]) - Configure EBS volume properties.

    • deleteOnTermination (pulumi.Input[str]) - Whether the volume should be destroyed on instance termination. Defaults to false if not set. See Preserving Amazon EBS Volumes on Instance Termination for more information.

    • encrypted (pulumi.Input[str]) - Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id.

    • iops (pulumi.Input[float]) - The amount of provisioned IOPS. This must be set with a volume_type of "io1".

    • kms_key_id (pulumi.Input[str]) - The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. encrypted must be set to true when this is set.

    • snapshot_id (pulumi.Input[str]) - The Snapshot ID to mount.

    • volume_size (pulumi.Input[float]) - The size of the volume in gigabytes.

    • volumeType (pulumi.Input[str]) - The type of volume. Can be "standard", "gp2", or "io1". (Default: "standard").

  • noDevice (pulumi.Input[str]) - Suppresses the specified device included in the AMI’s block device mapping.

  • virtualName (pulumi.Input[str]) - The Instance Store Device Name (e.g. "ephemeral0").

The capacity_reservation_specification object supports the following:

  • capacityReservationPreference (pulumi.Input[str]) - Indicates the instance’s Capacity Reservation preferences. Can be open or none. (Default none).

  • capacityReservationTarget (pulumi.Input[dict]) - Used to target a specific Capacity Reservation:

    • capacityReservationId (pulumi.Input[str]) - The ID of the Capacity Reservation to target.

The cpu_options object supports the following:

  • coreCount (pulumi.Input[float]) - The number of CPU cores for the instance.

  • threadsPerCore (pulumi.Input[float]) - The number of threads per CPU core. To disable Intel Hyper-Threading Technology for the instance, specify a value of 1. Otherwise, specify the default value of 2.

The credit_specification object supports the following:

  • cpuCredits (pulumi.Input[str]) - The credit option for CPU usage. Can be "standard" or "unlimited". T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.

The elastic_gpu_specifications object supports the following:

The elastic_inference_accelerator object supports the following:

  • type (pulumi.Input[str]) - Accelerator type.

The hibernation_options object supports the following:

  • configured (pulumi.Input[bool]) - If set to true, the launched EC2 instance will hibernation enabled.

The iam_instance_profile object supports the following:

  • arn (pulumi.Input[str]) - The Amazon Resource Name (ARN) of the instance profile.

  • name (pulumi.Input[str]) - The name of the instance profile.

The instance_market_options object supports the following:

  • marketType (pulumi.Input[str]) - The market type. Can be spot.

  • spot_options (pulumi.Input[dict]) - The options for Spot Instance

    • block_duration_minutes (pulumi.Input[float]) - The required duration in minutes. This value must be a multiple of 60.

    • instanceInterruptionBehavior (pulumi.Input[str]) - The behavior when a Spot Instance is interrupted. Can be hibernate, stop, or terminate. (Default: terminate).

    • maxPrice (pulumi.Input[str]) - The maximum hourly price you’re willing to pay for the Spot Instances.

    • spotInstanceType (pulumi.Input[str]) - The Spot Instance request type. Can be one-time, or persistent.

    • valid_until (pulumi.Input[str]) - The end date of the request.

The license_specifications object supports the following:

  • license_configuration_arn (pulumi.Input[str]) - ARN of the license configuration.

The metadata_options object supports the following:

  • httpEndpoint (pulumi.Input[str]) - Whether the metadata service is available. Can be "enabled" or "disabled". (Default: "enabled").

  • httpPutResponseHopLimit (pulumi.Input[float]) - The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Can be an integer from 1 to 64. (Default: 1).

  • httpTokens (pulumi.Input[str]) - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2. Can be "optional" or "required". (Default: "optional").

The monitoring object supports the following:

  • enabled (pulumi.Input[bool]) - If true, the launched EC2 instance will have detailed monitoring enabled.

The network_interfaces object supports the following:

  • associate_public_ip_address (pulumi.Input[str]) - Associate a public ip address with the network interface. Boolean value.

  • deleteOnTermination (pulumi.Input[bool]) - Whether the network interface should be destroyed on instance termination. Defaults to false if not set.

  • description (pulumi.Input[str]) - Description of the network interface.

  • device_index (pulumi.Input[float]) - The integer index of the network interface attachment.

  • ipv4AddressCount (pulumi.Input[float]) - The number of secondary private IPv4 addresses to assign to a network interface. Conflicts with ipv4_addresses

  • ipv4Addresses (pulumi.Input[list]) - One or more private IPv4 addresses to associate. Conflicts with ipv4_address_count

  • ipv6_address_count (pulumi.Input[float]) - The number of IPv6 addresses to assign to a network interface. Conflicts with ipv6_addresses

  • ipv6_addresses (pulumi.Input[list]) - One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with ipv6_address_count

  • network_interface_id (pulumi.Input[str]) - The ID of the network interface to attach.

  • private_ip_address (pulumi.Input[str]) - The primary private IPv4 address.

  • security_groups (pulumi.Input[list]) - A list of security group IDs to associate.

  • subnet_id (pulumi.Input[str]) - The VPC Subnet ID to associate.

The placement object supports the following:

  • affinity (pulumi.Input[str]) - The affinity setting for an instance on a Dedicated Host.

  • availability_zone (pulumi.Input[str]) - The Availability Zone for the instance.

  • group_name (pulumi.Input[str]) - The name of the placement group for the instance.

  • host_id (pulumi.Input[str]) - The ID of the Dedicated Host for the instance.

  • partitionNumber (pulumi.Input[float]) - The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.

  • spreadDomain (pulumi.Input[str]) - Reserved for future use.

  • tenancy (pulumi.Input[str]) - The tenancy of the instance (if the instance is running in a VPC). Can be default, dedicated, or host.

The tag_specifications object supports the following:

  • resource_type (pulumi.Input[str]) - The type of resource to tag. Valid values are instance and volume.

  • tags (pulumi.Input[dict]) - A map of tags to assign to the resource.

arn: pulumi.Output[str] = None

The Amazon Resource Name (ARN) of the instance profile.

block_device_mappings: pulumi.Output[list] = None

Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.

  • device_name (str) - The name of the device to mount.

  • ebs (dict) - Configure EBS volume properties.

    • deleteOnTermination (str) - Whether the volume should be destroyed on instance termination. Defaults to false if not set. See Preserving Amazon EBS Volumes on Instance Termination for more information.

    • encrypted (str) - Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id.

    • iops (float) - The amount of provisioned IOPS. This must be set with a volume_type of "io1".

    • kms_key_id (str) - The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. encrypted must be set to true when this is set.

    • snapshot_id (str) - The Snapshot ID to mount.

    • volume_size (float) - The size of the volume in gigabytes.

    • volumeType (str) - The type of volume. Can be "standard", "gp2", or "io1". (Default: "standard").

  • noDevice (str) - Suppresses the specified device included in the AMI’s block device mapping.

  • virtualName (str) - The Instance Store Device Name (e.g. "ephemeral0").

capacity_reservation_specification: pulumi.Output[dict] = None

Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.

  • capacityReservationPreference (str) - Indicates the instance’s Capacity Reservation preferences. Can be open or none. (Default none).

  • capacityReservationTarget (dict) - Used to target a specific Capacity Reservation:

    • capacityReservationId (str) - The ID of the Capacity Reservation to target.

cpu_options: pulumi.Output[dict] = None

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

  • coreCount (float) - The number of CPU cores for the instance.

  • threadsPerCore (float) - The number of threads per CPU core. To disable Intel Hyper-Threading Technology for the instance, specify a value of 1. Otherwise, specify the default value of 2.

credit_specification: pulumi.Output[dict] = None

Customize the credit specification of the instance. See Credit Specification below for more details.

  • cpuCredits (str) - The credit option for CPU usage. Can be "standard" or "unlimited". T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.

default_version: pulumi.Output[float] = None

The default version of the launch template.

description: pulumi.Output[str] = None

Description of the launch template.

disable_api_termination: pulumi.Output[bool] = None

If true, enables EC2 Instance Termination Protection

ebs_optimized: pulumi.Output[str] = None

If true, the launched EC2 instance will be EBS-optimized.

elastic_gpu_specifications: pulumi.Output[list] = None

The elastic GPU to attach to the instance. See Elastic GPU below for more details.

elastic_inference_accelerator: pulumi.Output[dict] = None

Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.

  • type (str) - Accelerator type.

hibernation_options: pulumi.Output[dict] = None

The hibernation options for the instance. See Hibernation Options below for more details.

  • configured (bool) - If set to true, the launched EC2 instance will hibernation enabled.

iam_instance_profile: pulumi.Output[dict] = None

The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.

  • arn (str) - The Amazon Resource Name (ARN) of the instance profile.

  • name (str) - The name of the instance profile.

image_id: pulumi.Output[str] = None

The AMI from which to launch the instance.

instance_initiated_shutdown_behavior: pulumi.Output[str] = None

Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).

instance_market_options: pulumi.Output[dict] = None

The market (purchasing) option for the instance. See Market Options below for details.

  • marketType (str) - The market type. Can be spot.

  • spot_options (dict) - The options for Spot Instance

    • block_duration_minutes (float) - The required duration in minutes. This value must be a multiple of 60.

    • instanceInterruptionBehavior (str) - The behavior when a Spot Instance is interrupted. Can be hibernate, stop, or terminate. (Default: terminate).

    • maxPrice (str) - The maximum hourly price you’re willing to pay for the Spot Instances.

    • spotInstanceType (str) - The Spot Instance request type. Can be one-time, or persistent.

    • valid_until (str) - The end date of the request.

instance_type: pulumi.Output[str] = None

The type of the instance.

kernel_id: pulumi.Output[str] = None

The kernel ID.

key_name: pulumi.Output[str] = None

The key name to use for the instance.

latest_version: pulumi.Output[float] = None

The latest version of the launch template.

license_specifications: pulumi.Output[list] = None

A list of license specifications to associate with. See License Specification below for more details.

  • license_configuration_arn (str) - ARN of the license configuration.

metadata_options: pulumi.Output[dict] = None

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

  • httpEndpoint (str) - Whether the metadata service is available. Can be "enabled" or "disabled". (Default: "enabled").

  • httpPutResponseHopLimit (float) - The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Can be an integer from 1 to 64. (Default: 1).

  • httpTokens (str) - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2. Can be "optional" or "required". (Default: "optional").

monitoring: pulumi.Output[dict] = None

The monitoring option for the instance. See Monitoring below for more details.

  • enabled (bool) - If true, the launched EC2 instance will have detailed monitoring enabled.

name: pulumi.Output[str] = None

The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.

name_prefix: pulumi.Output[str] = None

Creates a unique name beginning with the specified prefix. Conflicts with name.

network_interfaces: pulumi.Output[list] = None

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

  • associate_public_ip_address (str) - Associate a public ip address with the network interface. Boolean value.

  • deleteOnTermination (bool) - Whether the network interface should be destroyed on instance termination. Defaults to false if not set.

  • description (str) - Description of the network interface.

  • device_index (float) - The integer index of the network interface attachment.

  • ipv4AddressCount (float) - The number of secondary private IPv4 addresses to assign to a network interface. Conflicts with ipv4_addresses

  • ipv4Addresses (list) - One or more private IPv4 addresses to associate. Conflicts with ipv4_address_count

  • ipv6_address_count (float) - The number of IPv6 addresses to assign to a network interface. Conflicts with ipv6_addresses

  • ipv6_addresses (list) - One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with ipv6_address_count

  • network_interface_id (str) - The ID of the network interface to attach.

  • private_ip_address (str) - The primary private IPv4 address.

  • security_groups (list) - A list of security group IDs to associate.

  • subnet_id (str) - The VPC Subnet ID to associate.

placement: pulumi.Output[dict] = None

The placement of the instance. See Placement below for more details.

  • affinity (str) - The affinity setting for an instance on a Dedicated Host.

  • availability_zone (str) - The Availability Zone for the instance.

  • group_name (str) - The name of the placement group for the instance.

  • host_id (str) - The ID of the Dedicated Host for the instance.

  • partitionNumber (float) - The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.

  • spreadDomain (str) - Reserved for future use.

  • tenancy (str) - The tenancy of the instance (if the instance is running in a VPC). Can be default, dedicated, or host.

ram_disk_id: pulumi.Output[str] = None

The ID of the RAM disk.

security_group_names: pulumi.Output[list] = None

A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.

tag_specifications: pulumi.Output[list] = None

The tags to apply to the resources during launch. See Tag Specifications below for more details.

  • resource_type (str) - The type of resource to tag. Valid values are instance and volume.

  • tags (dict) - A map of tags to assign to the resource.

tags: pulumi.Output[dict] = None

A map of tags to assign to the launch template.

user_data: pulumi.Output[str] = None

The Base64-encoded user data to provide when launching the instance.

vpc_security_group_ids: pulumi.Output[list] = None

A list of security group IDs to associate with.

static get(resource_name, id, opts=None, arn=None, block_device_mappings=None, capacity_reservation_specification=None, cpu_options=None, credit_specification=None, default_version=None, description=None, disable_api_termination=None, ebs_optimized=None, elastic_gpu_specifications=None, elastic_inference_accelerator=None, hibernation_options=None, iam_instance_profile=None, image_id=None, instance_initiated_shutdown_behavior=None, instance_market_options=None, instance_type=None, kernel_id=None, key_name=None, latest_version=None, license_specifications=None, metadata_options=None, monitoring=None, name=None, name_prefix=None, network_interfaces=None, placement=None, ram_disk_id=None, security_group_names=None, tag_specifications=None, tags=None, user_data=None, vpc_security_group_ids=None)

Get an existing LaunchTemplate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) of the instance profile.

  • block_device_mappings (pulumi.Input[list]) – Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.

  • capacity_reservation_specification (pulumi.Input[dict]) – Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.

  • cpu_options (pulumi.Input[dict]) – The CPU options for the instance. See CPU Options below for more details.

  • credit_specification (pulumi.Input[dict]) – Customize the credit specification of the instance. See Credit Specification below for more details.

  • default_version (pulumi.Input[float]) – The default version of the launch template.

  • description (pulumi.Input[str]) – Description of the launch template.

  • disable_api_termination (pulumi.Input[bool]) –

    If true, enables EC2 Instance Termination Protection

  • ebs_optimized (pulumi.Input[str]) – If true, the launched EC2 instance will be EBS-optimized.

  • elastic_gpu_specifications (pulumi.Input[list]) – The elastic GPU to attach to the instance. See Elastic GPU below for more details.

  • elastic_inference_accelerator (pulumi.Input[dict]) – Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.

  • hibernation_options (pulumi.Input[dict]) – The hibernation options for the instance. See Hibernation Options below for more details.

  • iam_instance_profile (pulumi.Input[dict]) – The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.

  • image_id (pulumi.Input[str]) – The AMI from which to launch the instance.

  • instance_initiated_shutdown_behavior (pulumi.Input[str]) – Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).

  • instance_market_options (pulumi.Input[dict]) – The market (purchasing) option for the instance. See Market Options below for details.

  • instance_type (pulumi.Input[str]) – The type of the instance.

  • kernel_id (pulumi.Input[str]) – The kernel ID.

  • key_name (pulumi.Input[str]) – The key name to use for the instance.

  • latest_version (pulumi.Input[float]) – The latest version of the launch template.

  • license_specifications (pulumi.Input[list]) – A list of license specifications to associate with. See License Specification below for more details.

  • metadata_options (pulumi.Input[dict]) – Customize the metadata options for the instance. See Metadata Options below for more details.

  • monitoring (pulumi.Input[dict]) – The monitoring option for the instance. See Monitoring below for more details.

  • name (pulumi.Input[str]) – The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.

  • name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with name.

  • network_interfaces (pulumi.Input[list]) – Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.

  • placement (pulumi.Input[dict]) – The placement of the instance. See Placement below for more details.

  • ram_disk_id (pulumi.Input[str]) – The ID of the RAM disk.

  • security_group_names (pulumi.Input[list]) – A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.

  • tag_specifications (pulumi.Input[list]) – The tags to apply to the resources during launch. See Tag Specifications below for more details.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the launch template.

  • user_data (pulumi.Input[str]) – The Base64-encoded user data to provide when launching the instance.

  • vpc_security_group_ids (pulumi.Input[list]) – A list of security group IDs to associate with.

The block_device_mappings object supports the following:

  • device_name (pulumi.Input[str]) - The name of the device to mount.

  • ebs (pulumi.Input[dict]) - Configure EBS volume properties.

    • deleteOnTermination (pulumi.Input[str]) - Whether the volume should be destroyed on instance termination. Defaults to false if not set. See Preserving Amazon EBS Volumes on Instance Termination for more information.

    • encrypted (pulumi.Input[str]) - Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id.

    • iops (pulumi.Input[float]) - The amount of provisioned IOPS. This must be set with a volume_type of "io1".

    • kms_key_id (pulumi.Input[str]) - The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. encrypted must be set to true when this is set.

    • snapshot_id (pulumi.Input[str]) - The Snapshot ID to mount.

    • volume_size (pulumi.Input[float]) - The size of the volume in gigabytes.

    • volumeType (pulumi.Input[str]) - The type of volume. Can be "standard", "gp2", or "io1". (Default: "standard").

  • noDevice (pulumi.Input[str]) - Suppresses the specified device included in the AMI’s block device mapping.

  • virtualName (pulumi.Input[str]) - The Instance Store Device Name (e.g. "ephemeral0").

The capacity_reservation_specification object supports the following:

  • capacityReservationPreference (pulumi.Input[str]) - Indicates the instance’s Capacity Reservation preferences. Can be open or none. (Default none).

  • capacityReservationTarget (pulumi.Input[dict]) - Used to target a specific Capacity Reservation:

    • capacityReservationId (pulumi.Input[str]) - The ID of the Capacity Reservation to target.

The cpu_options object supports the following:

  • coreCount (pulumi.Input[float]) - The number of CPU cores for the instance.

  • threadsPerCore (pulumi.Input[float]) - The number of threads per CPU core. To disable Intel Hyper-Threading Technology for the instance, specify a value of 1. Otherwise, specify the default value of 2.

The credit_specification object supports the following:

  • cpuCredits (pulumi.Input[str]) - The credit option for CPU usage. Can be "standard" or "unlimited". T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.

The elastic_gpu_specifications object supports the following:

The elastic_inference_accelerator object supports the following:

  • type (pulumi.Input[str]) - Accelerator type.

The hibernation_options object supports the following:

  • configured (pulumi.Input[bool]) - If set to true, the launched EC2 instance will hibernation enabled.

The iam_instance_profile object supports the following:

  • arn (pulumi.Input[str]) - The Amazon Resource Name (ARN) of the instance profile.

  • name (pulumi.Input[str]) - The name of the instance profile.

The instance_market_options object supports the following:

  • marketType (pulumi.Input[str]) - The market type. Can be spot.

  • spot_options (pulumi.Input[dict]) - The options for Spot Instance

    • block_duration_minutes (pulumi.Input[float]) - The required duration in minutes. This value must be a multiple of 60.

    • instanceInterruptionBehavior (pulumi.Input[str]) - The behavior when a Spot Instance is interrupted. Can be hibernate, stop, or terminate. (Default: terminate).

    • maxPrice (pulumi.Input[str]) - The maximum hourly price you’re willing to pay for the Spot Instances.

    • spotInstanceType (pulumi.Input[str]) - The Spot Instance request type. Can be one-time, or persistent.

    • valid_until (pulumi.Input[str]) - The end date of the request.

The license_specifications object supports the following:

  • license_configuration_arn (pulumi.Input[str]) - ARN of the license configuration.

The metadata_options object supports the following:

  • httpEndpoint (pulumi.Input[str]) - Whether the metadata service is available. Can be "enabled" or "disabled". (Default: "enabled").

  • httpPutResponseHopLimit (pulumi.Input[float]) - The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Can be an integer from 1 to 64. (Default: 1).

  • httpTokens (pulumi.Input[str]) - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2. Can be "optional" or "required". (Default: "optional").

The monitoring object supports the following:

  • enabled (pulumi.Input[bool]) - If true, the launched EC2 instance will have detailed monitoring enabled.

The network_interfaces object supports the following:

  • associate_public_ip_address (pulumi.Input[str]) - Associate a public ip address with the network interface. Boolean value.

  • deleteOnTermination (pulumi.Input[bool]) - Whether the network interface should be destroyed on instance termination. Defaults to false if not set.

  • description (pulumi.Input[str]) - Description of the network interface.

  • device_index (pulumi.Input[float]) - The integer index of the network interface attachment.

  • ipv4AddressCount (pulumi.Input[float]) - The number of secondary private IPv4 addresses to assign to a network interface. Conflicts with ipv4_addresses

  • ipv4Addresses (pulumi.Input[list]) - One or more private IPv4 addresses to associate. Conflicts with ipv4_address_count

  • ipv6_address_count (pulumi.Input[float]) - The number of IPv6 addresses to assign to a network interface. Conflicts with ipv6_addresses

  • ipv6_addresses (pulumi.Input[list]) - One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with ipv6_address_count

  • network_interface_id (pulumi.Input[str]) - The ID of the network interface to attach.

  • private_ip_address (pulumi.Input[str]) - The primary private IPv4 address.

  • security_groups (pulumi.Input[list]) - A list of security group IDs to associate.

  • subnet_id (pulumi.Input[str]) - The VPC Subnet ID to associate.

The placement object supports the following:

  • affinity (pulumi.Input[str]) - The affinity setting for an instance on a Dedicated Host.

  • availability_zone (pulumi.Input[str]) - The Availability Zone for the instance.

  • group_name (pulumi.Input[str]) - The name of the placement group for the instance.

  • host_id (pulumi.Input[str]) - The ID of the Dedicated Host for the instance.

  • partitionNumber (pulumi.Input[float]) - The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.

  • spreadDomain (pulumi.Input[str]) - Reserved for future use.

  • tenancy (pulumi.Input[str]) - The tenancy of the instance (if the instance is running in a VPC). Can be default, dedicated, or host.

The tag_specifications object supports the following:

  • resource_type (pulumi.Input[str]) - The type of resource to tag. Valid values are instance and volume.

  • tags (pulumi.Input[dict]) - A map of tags to assign to the resource.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.LocalGatewayRoute(resource_name, opts=None, destination_cidr_block=None, local_gateway_route_table_id=None, local_gateway_virtual_interface_group_id=None, __props__=None, __name__=None, __opts__=None)

Manages an EC2 Local Gateway Route. More information can be found in the Outposts User Guide.

import pulumi
import pulumi_aws as aws

example = aws.ec2.LocalGatewayRoute("example",
    destination_cidr_block="172.16.0.0/16",
    local_gateway_route_table_id=data["aws_ec2_local_gateway_route_table"]["example"]["id"],
    local_gateway_virtual_interface_group_id=data["aws_ec2_local_gateway_virtual_interface_group"]["example"]["id"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • destination_cidr_block (pulumi.Input[str]) – IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.

  • local_gateway_route_table_id (pulumi.Input[str]) – Identifier of EC2 Local Gateway Route Table.

  • local_gateway_virtual_interface_group_id (pulumi.Input[str]) – Identifier of EC2 Local Gateway Virtual Interface Group.

destination_cidr_block: pulumi.Output[str] = None

IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.

local_gateway_route_table_id: pulumi.Output[str] = None

Identifier of EC2 Local Gateway Route Table.

local_gateway_virtual_interface_group_id: pulumi.Output[str] = None

Identifier of EC2 Local Gateway Virtual Interface Group.

static get(resource_name, id, opts=None, destination_cidr_block=None, local_gateway_route_table_id=None, local_gateway_virtual_interface_group_id=None)

Get an existing LocalGatewayRoute resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • destination_cidr_block (pulumi.Input[str]) – IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.

  • local_gateway_route_table_id (pulumi.Input[str]) – Identifier of EC2 Local Gateway Route Table.

  • local_gateway_virtual_interface_group_id (pulumi.Input[str]) – Identifier of EC2 Local Gateway Virtual Interface Group.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.LocalGatewayRouteTableVpcAssociation(resource_name, opts=None, local_gateway_route_table_id=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)

Manages an EC2 Local Gateway Route Table VPC Association. More information can be found in the Outposts User Guide.

import pulumi
import pulumi_aws as aws

example_local_gateway_route_table = aws.ec2.get_local_gateway_route_table(outpost_arn="arn:aws:outposts:us-west-2:123456789012:outpost/op-1234567890abcdef")
example_vpc = aws.ec2.Vpc("exampleVpc", cidr_block="10.0.0.0/16")
example_local_gateway_route_table_vpc_association = aws.ec2.LocalGatewayRouteTableVpcAssociation("exampleLocalGatewayRouteTableVpcAssociation",
    local_gateway_route_table_id=example_local_gateway_route_table.id,
    vpc_id=example_vpc.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • local_gateway_route_table_id (pulumi.Input[str]) – Identifier of EC2 Local Gateway Route Table.

  • tags (pulumi.Input[dict]) – Key-value map of resource tags.

  • vpc_id (pulumi.Input[str]) – Identifier of EC2 VPC.

local_gateway_route_table_id: pulumi.Output[str] = None

Identifier of EC2 Local Gateway Route Table.

tags: pulumi.Output[dict] = None

Key-value map of resource tags.

vpc_id: pulumi.Output[str] = None

Identifier of EC2 VPC.

static get(resource_name, id, opts=None, local_gateway_id=None, local_gateway_route_table_id=None, tags=None, vpc_id=None)

Get an existing LocalGatewayRouteTableVpcAssociation resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • local_gateway_route_table_id (pulumi.Input[str]) – Identifier of EC2 Local Gateway Route Table.

  • tags (pulumi.Input[dict]) – Key-value map of resource tags.

  • vpc_id (pulumi.Input[str]) – Identifier of EC2 VPC.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.MainRouteTableAssociation(resource_name, opts=None, route_table_id=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)

Provides a resource for managing the main routing table of a VPC.

import pulumi
import pulumi_aws as aws

main_route_table_association = aws.ec2.MainRouteTableAssociation("mainRouteTableAssociation",
    route_table_id=aws_route_table["bar"]["id"],
    vpc_id=aws_vpc["foo"]["id"])

On VPC creation, the AWS API always creates an initial Main Route Table. This resource records the ID of that Route Table under original_route_table_id. The “Delete” action for a main_route_table_association consists of resetting this original table as the Main Route Table for the VPC. You’ll see this additional Route Table in the AWS console; it must remain intact in order for the main_route_table_association delete to work properly.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • route_table_id (pulumi.Input[str]) – The ID of the Route Table to set as the new main route table for the target VPC

  • vpc_id (pulumi.Input[str]) – The ID of the VPC whose main route table should be set

original_route_table_id: pulumi.Output[str] = None

Used internally, see Notes below

route_table_id: pulumi.Output[str] = None

The ID of the Route Table to set as the new main route table for the target VPC

vpc_id: pulumi.Output[str] = None

The ID of the VPC whose main route table should be set

static get(resource_name, id, opts=None, original_route_table_id=None, route_table_id=None, vpc_id=None)

Get an existing MainRouteTableAssociation resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • original_route_table_id (pulumi.Input[str]) – Used internally, see Notes below

  • route_table_id (pulumi.Input[str]) – The ID of the Route Table to set as the new main route table for the target VPC

  • vpc_id (pulumi.Input[str]) – The ID of the VPC whose main route table should be set

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.NatGateway(resource_name, opts=None, allocation_id=None, subnet_id=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to create a VPC NAT Gateway.

import pulumi
import pulumi_aws as aws

gw = aws.ec2.NatGateway("gw",
    allocation_id=aws_eip["nat"]["id"],
    subnet_id=aws_subnet["example"]["id"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • allocation_id (pulumi.Input[str]) – The Allocation ID of the Elastic IP address for the gateway.

  • subnet_id (pulumi.Input[str]) – The Subnet ID of the subnet in which to place the gateway.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

allocation_id: pulumi.Output[str] = None

The Allocation ID of the Elastic IP address for the gateway.

network_interface_id: pulumi.Output[str] = None

The ENI ID of the network interface created by the NAT gateway.

private_ip: pulumi.Output[str] = None

The private IP address of the NAT Gateway.

public_ip: pulumi.Output[str] = None

The public IP address of the NAT Gateway.

subnet_id: pulumi.Output[str] = None

The Subnet ID of the subnet in which to place the gateway.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

static get(resource_name, id, opts=None, allocation_id=None, network_interface_id=None, private_ip=None, public_ip=None, subnet_id=None, tags=None)

Get an existing NatGateway resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • allocation_id (pulumi.Input[str]) – The Allocation ID of the Elastic IP address for the gateway.

  • network_interface_id (pulumi.Input[str]) – The ENI ID of the network interface created by the NAT gateway.

  • private_ip (pulumi.Input[str]) – The private IP address of the NAT Gateway.

  • public_ip (pulumi.Input[str]) – The public IP address of the NAT Gateway.

  • subnet_id (pulumi.Input[str]) – The Subnet ID of the subnet in which to place the gateway.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.NetworkAcl(resource_name, opts=None, egress=None, ingress=None, subnet_ids=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)

Provides an network ACL resource. You might set up network ACLs with rules similar to your security groups in order to add an additional layer of security to your VPC.

NOTE on Network ACLs and Network ACL Rules: This provider currently provides both a standalone Network ACL Rule resource and a Network ACL resource with rules defined in-line. At this time you cannot use a Network ACL with in-line rules in conjunction with any Network ACL Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules.

import pulumi
import pulumi_aws as aws

main = aws.ec2.NetworkAcl("main",
    egress=[{
        "action": "allow",
        "cidr_block": "10.3.0.0/18",
        "from_port": 443,
        "protocol": "tcp",
        "ruleNo": 200,
        "to_port": 443,
    }],
    ingress=[{
        "action": "allow",
        "cidr_block": "10.3.0.0/18",
        "from_port": 80,
        "protocol": "tcp",
        "ruleNo": 100,
        "to_port": 80,
    }],
    tags={
        "Name": "main",
    },
    vpc_id=aws_vpc["main"]["id"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • egress (pulumi.Input[list]) – Specifies an egress rule. Parameters defined below.

  • ingress (pulumi.Input[list]) – Specifies an ingress rule. Parameters defined below.

  • subnet_ids (pulumi.Input[list]) – A list of Subnet IDs to apply the ACL to

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The ID of the associated VPC.

The egress object supports the following:

  • action (pulumi.Input[str]) - The action to take.

  • cidr_block (pulumi.Input[str]) - The CIDR block to match. This must be a valid network mask.

  • from_port (pulumi.Input[float]) - The from port to match.

  • icmp_code (pulumi.Input[float]) - The ICMP type code to be used. Default 0.

  • icmp_type (pulumi.Input[float]) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (pulumi.Input[str]) - The IPv6 CIDR block.

  • protocol (pulumi.Input[str]) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (pulumi.Input[float]) - The rule number. Used for ordering.

  • to_port (pulumi.Input[float]) - The to port to match.

The ingress object supports the following:

  • action (pulumi.Input[str]) - The action to take.

  • cidr_block (pulumi.Input[str]) - The CIDR block to match. This must be a valid network mask.

  • from_port (pulumi.Input[float]) - The from port to match.

  • icmp_code (pulumi.Input[float]) - The ICMP type code to be used. Default 0.

  • icmp_type (pulumi.Input[float]) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (pulumi.Input[str]) - The IPv6 CIDR block.

  • protocol (pulumi.Input[str]) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (pulumi.Input[float]) - The rule number. Used for ordering.

  • to_port (pulumi.Input[float]) - The to port to match.

egress: pulumi.Output[list] = None

Specifies an egress rule. Parameters defined below.

  • action (str) - The action to take.

  • cidr_block (str) - The CIDR block to match. This must be a valid network mask.

  • from_port (float) - The from port to match.

  • icmp_code (float) - The ICMP type code to be used. Default 0.

  • icmp_type (float) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (str) - The IPv6 CIDR block.

  • protocol (str) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (float) - The rule number. Used for ordering.

  • to_port (float) - The to port to match.

ingress: pulumi.Output[list] = None

Specifies an ingress rule. Parameters defined below.

  • action (str) - The action to take.

  • cidr_block (str) - The CIDR block to match. This must be a valid network mask.

  • from_port (float) - The from port to match.

  • icmp_code (float) - The ICMP type code to be used. Default 0.

  • icmp_type (float) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (str) - The IPv6 CIDR block.

  • protocol (str) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (float) - The rule number. Used for ordering.

  • to_port (float) - The to port to match.

owner_id: pulumi.Output[str] = None

The ID of the AWS account that owns the network ACL.

subnet_ids: pulumi.Output[list] = None

A list of Subnet IDs to apply the ACL to

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

vpc_id: pulumi.Output[str] = None

The ID of the associated VPC.

static get(resource_name, id, opts=None, egress=None, ingress=None, owner_id=None, subnet_ids=None, tags=None, vpc_id=None)

Get an existing NetworkAcl resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • egress (pulumi.Input[list]) – Specifies an egress rule. Parameters defined below.

  • ingress (pulumi.Input[list]) – Specifies an ingress rule. Parameters defined below.

  • owner_id (pulumi.Input[str]) – The ID of the AWS account that owns the network ACL.

  • subnet_ids (pulumi.Input[list]) – A list of Subnet IDs to apply the ACL to

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The ID of the associated VPC.

The egress object supports the following:

  • action (pulumi.Input[str]) - The action to take.

  • cidr_block (pulumi.Input[str]) - The CIDR block to match. This must be a valid network mask.

  • from_port (pulumi.Input[float]) - The from port to match.

  • icmp_code (pulumi.Input[float]) - The ICMP type code to be used. Default 0.

  • icmp_type (pulumi.Input[float]) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (pulumi.Input[str]) - The IPv6 CIDR block.

  • protocol (pulumi.Input[str]) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (pulumi.Input[float]) - The rule number. Used for ordering.

  • to_port (pulumi.Input[float]) - The to port to match.

The ingress object supports the following:

  • action (pulumi.Input[str]) - The action to take.

  • cidr_block (pulumi.Input[str]) - The CIDR block to match. This must be a valid network mask.

  • from_port (pulumi.Input[float]) - The from port to match.

  • icmp_code (pulumi.Input[float]) - The ICMP type code to be used. Default 0.

  • icmp_type (pulumi.Input[float]) - The ICMP type to be used. Default 0.

  • ipv6_cidr_block (pulumi.Input[str]) - The IPv6 CIDR block.

  • protocol (pulumi.Input[str]) - The protocol to match. If using the -1 ‘all’ protocol, you must specify a from and to port of 0.

  • ruleNo (pulumi.Input[float]) - The rule number. Used for ordering.

  • to_port (pulumi.Input[float]) - The to port to match.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.NetworkAclRule(resource_name, opts=None, cidr_block=None, egress=None, from_port=None, icmp_code=None, icmp_type=None, ipv6_cidr_block=None, network_acl_id=None, protocol=None, rule_action=None, rule_number=None, to_port=None, __props__=None, __name__=None, __opts__=None)

Creates an entry (a rule) in a network ACL with the specified rule number.

NOTE on Network ACLs and Network ACL Rules: This provider currently provides both a standalone Network ACL Rule resource and a Network ACL resource with rules defined in-line. At this time you cannot use a Network ACL with in-line rules in conjunction with any Network ACL Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules.

import pulumi
import pulumi_aws as aws

bar_network_acl = aws.ec2.NetworkAcl("barNetworkAcl", vpc_id=aws_vpc["foo"]["id"])
bar_network_acl_rule = aws.ec2.NetworkAclRule("barNetworkAclRule",
    network_acl_id=bar_network_acl.id,
    rule_number=200,
    egress=False,
    protocol="tcp",
    rule_action="allow",
    cidr_block=aws_vpc["foo"]["cidr_block"],
    from_port=22,
    to_port=22)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cidr_block (pulumi.Input[str]) – The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ).

  • egress (pulumi.Input[bool]) – Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet). Default false.

  • from_port (pulumi.Input[float]) – The from port to match.

  • icmp_code (pulumi.Input[str]) – ICMP protocol: The ICMP code. Required if specifying ICMP for the protocol. e.g. -1

  • icmp_type (pulumi.Input[str]) – ICMP protocol: The ICMP type. Required if specifying ICMP for the protocol. e.g. -1

  • ipv6_cidr_block (pulumi.Input[str]) – The IPv6 CIDR block to allow or deny.

  • network_acl_id (pulumi.Input[str]) – The ID of the network ACL.

  • protocol (pulumi.Input[str]) – The protocol. A value of -1 means all protocols.

  • rule_action (pulumi.Input[str]) – Indicates whether to allow or deny the traffic that matches the rule. Accepted values: allow | deny

  • rule_number (pulumi.Input[float]) – The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.

  • to_port (pulumi.Input[float]) – The to port to match.

cidr_block: pulumi.Output[str] = None

The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ).

egress: pulumi.Output[bool] = None

Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet). Default false.

from_port: pulumi.Output[float] = None

The from port to match.

icmp_code: pulumi.Output[str] = None

ICMP protocol: The ICMP code. Required if specifying ICMP for the protocol. e.g. -1

icmp_type: pulumi.Output[str] = None

ICMP protocol: The ICMP type. Required if specifying ICMP for the protocol. e.g. -1

ipv6_cidr_block: pulumi.Output[str] = None

The IPv6 CIDR block to allow or deny.

network_acl_id: pulumi.Output[str] = None

The ID of the network ACL.

protocol: pulumi.Output[str] = None

The protocol. A value of -1 means all protocols.

rule_action: pulumi.Output[str] = None

Indicates whether to allow or deny the traffic that matches the rule. Accepted values: allow | deny

rule_number: pulumi.Output[float] = None

The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.

to_port: pulumi.Output[float] = None

The to port to match.

static get(resource_name, id, opts=None, cidr_block=None, egress=None, from_port=None, icmp_code=None, icmp_type=None, ipv6_cidr_block=None, network_acl_id=None, protocol=None, rule_action=None, rule_number=None, to_port=None)

Get an existing NetworkAclRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cidr_block (pulumi.Input[str]) – The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ).

  • egress (pulumi.Input[bool]) – Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet). Default false.

  • from_port (pulumi.Input[float]) – The from port to match.

  • icmp_code (pulumi.Input[str]) – ICMP protocol: The ICMP code. Required if specifying ICMP for the protocol. e.g. -1

  • icmp_type (pulumi.Input[str]) – ICMP protocol: The ICMP type. Required if specifying ICMP for the protocol. e.g. -1

  • ipv6_cidr_block (pulumi.Input[str]) – The IPv6 CIDR block to allow or deny.

  • network_acl_id (pulumi.Input[str]) – The ID of the network ACL.

  • protocol (pulumi.Input[str]) – The protocol. A value of -1 means all protocols.

  • rule_action (pulumi.Input[str]) – Indicates whether to allow or deny the traffic that matches the rule. Accepted values: allow | deny

  • rule_number (pulumi.Input[float]) – The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.

  • to_port (pulumi.Input[float]) – The to port to match.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.NetworkInterface(resource_name, opts=None, attachments=None, description=None, private_ip=None, private_ips=None, private_ips_count=None, security_groups=None, source_dest_check=None, subnet_id=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides an Elastic network interface (ENI) resource.

import pulumi
import pulumi_aws as aws

test = aws.ec2.NetworkInterface("test",
    attachments=[{
        "device_index": 1,
        "instance": aws_instance["test"]["id"],
    }],
    private_ips=["10.0.0.50"],
    security_groups=[aws_security_group["web"]["id"]],
    subnet_id=aws_subnet["public_a"]["id"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • attachments (pulumi.Input[list]) – Block to define the attachment of the ENI. Documented below.

  • description (pulumi.Input[str]) – A description for the network interface.

  • private_ips (pulumi.Input[list]) – List of private IPs to assign to the ENI.

  • private_ips_count (pulumi.Input[float]) – Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + private_ips_count, as a primary private IP will be assiged to an ENI by default.

  • security_groups (pulumi.Input[list]) – List of security group IDs to assign to the ENI.

  • source_dest_check (pulumi.Input[bool]) – Whether to enable source destination checking for the ENI. Default true.

  • subnet_id (pulumi.Input[str]) – Subnet ID to create the ENI in.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

The attachments object supports the following:

  • attachment_id (pulumi.Input[str])

  • device_index (pulumi.Input[float]) - Integer to define the devices index.

  • instance (pulumi.Input[str]) - ID of the instance to attach to.

attachments: pulumi.Output[list] = None

Block to define the attachment of the ENI. Documented below.

  • attachment_id (str)

  • device_index (float) - Integer to define the devices index.

  • instance (str) - ID of the instance to attach to.

description: pulumi.Output[str] = None

A description for the network interface.

mac_address: pulumi.Output[str] = None

The MAC address of the network interface.

private_dns_name: pulumi.Output[str] = None

The private DNS name of the network interface (IPv4).

private_ips: pulumi.Output[list] = None

List of private IPs to assign to the ENI.

private_ips_count: pulumi.Output[float] = None

Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + private_ips_count, as a primary private IP will be assiged to an ENI by default.

security_groups: pulumi.Output[list] = None

List of security group IDs to assign to the ENI.

source_dest_check: pulumi.Output[bool] = None

Whether to enable source destination checking for the ENI. Default true.

subnet_id: pulumi.Output[str] = None

Subnet ID to create the ENI in.

tags: pulumi.Output[dict] = None

A map of tags to assign to the resource.

static get(resource_name, id, opts=None, attachments=None, description=None, mac_address=None, outpost_arn=None, private_dns_name=None, private_ip=None, private_ips=None, private_ips_count=None, security_groups=None, source_dest_check=None, subnet_id=None, tags=None)

Get an existing NetworkInterface resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • attachments (pulumi.Input[list]) – Block to define the attachment of the ENI. Documented below.

  • description (pulumi.Input[str]) – A description for the network interface.

  • mac_address (pulumi.Input[str]) – The MAC address of the network interface.

  • private_dns_name (pulumi.Input[str]) – The private DNS name of the network interface (IPv4).

  • private_ips (pulumi.Input[list]) – List of private IPs to assign to the ENI.

  • private_ips_count (pulumi.Input[float]) – Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + private_ips_count, as a primary private IP will be assiged to an ENI by default.

  • security_groups (pulumi.Input[list]) – List of security group IDs to assign to the ENI.

  • source_dest_check (pulumi.Input[bool]) – Whether to enable source destination checking for the ENI. Default true.

  • subnet_id (pulumi.Input[str]) – Subnet ID to create the ENI in.

  • tags (pulumi.Input[dict]) – A map of tags to assign to the resource.

The attachments object supports the following:

  • attachment_id (pulumi.Input[str])

  • device_index (pulumi.Input[float]) - Integer to define the devices index.

  • instance (pulumi.Input[str]) - ID of the instance to attach to.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.NetworkInterfaceAttachment(resource_name, opts=None, device_index=None, instance_id=None, network_interface_id=None, __props__=None, __name__=None, __opts__=None)

Attach an Elastic network interface (ENI) resource with EC2 instance.

import pulumi
import pulumi_aws as aws

test = aws.ec2.NetworkInterfaceAttachment("test",
    device_index=0,
    instance_id=aws_instance["test"]["id"],
    network_interface_id=aws_network_interface["test"]["id"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • device_index (pulumi.Input[float]) – Network interface index (int).

  • instance_id (pulumi.Input[str]) – Instance ID to attach.

  • network_interface_id (pulumi.Input[str]) – ENI ID to attach.

attachment_id: pulumi.Output[str] = None

The ENI Attachment ID.

device_index: pulumi.Output[float] = None

Network interface index (int).

instance_id: pulumi.Output[str] = None

Instance ID to attach.

network_interface_id: pulumi.Output[str] = None

ENI ID to attach.

status: pulumi.Output[str] = None

The status of the Network Interface Attachment.

static get(resource_name, id, opts=None, attachment_id=None, device_index=None, instance_id=None, network_interface_id=None, status=None)

Get an existing NetworkInterfaceAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • attachment_id (pulumi.Input[str]) – The ENI Attachment ID.

  • device_index (pulumi.Input[float]) – Network interface index (int).

  • instance_id (pulumi.Input[str]) – Instance ID to attach.

  • network_interface_id (pulumi.Input[str]) – ENI ID to attach.

  • status (pulumi.Input[str]) – The status of the Network Interface Attachment.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.NetworkInterfaceSecurityGroupAttachment(resource_name, opts=None, network_interface_id=None, security_group_id=None, __props__=None, __name__=None, __opts__=None)

This resource attaches a security group to an Elastic Network Interface (ENI). It can be used to attach a security group to any existing ENI, be it a secondary ENI or one attached as the primary interface on an instance.

NOTE on instances, interfaces, and security groups: This provider currently provides the capability to assign security groups via the ``ec2.Instance` <https://www.terraform.io/docs/providers/aws/d/instance.html>`_ and the ``ec2.NetworkInterface` <https://www.terraform.io/docs/providers/aws/r/network_interface.html>`_ resources. Using this resource in conjunction with security groups provided in-line in those resources will cause conflicts, and will lead to spurious diffs and undefined behavior - please use one or the other.

import pulumi
import pulumi_aws as aws

ami = aws.get_ami(filters=[{
        "name": "name",
        "values": ["amzn-ami-hvm-*"],
    }],
    most_recent=True,
    owners=["amazon"])
instance = aws.ec2.Instance("instance",
    ami=ami.id,
    instance_type="t2.micro",
    tags={
        "type": "test-instance",
    })
sg = aws.ec2.SecurityGroup("sg", tags={
    "type": "test-security-group",
})
sg_attachment = aws.ec2.NetworkInterfaceSecurityGroupAttachment("sgAttachment",
    network_interface_id=instance.primary_network_interface_id,
    security_group_id=sg.id)

There are no outputs for this resource.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • network_interface_id (pulumi.Input[str]) – The ID of the network interface to attach to.

  • security_group_id (pulumi.Input[str]) – The ID of the security group.

network_interface_id: pulumi.Output[str] = None

The ID of the network interface to attach to.

security_group_id: pulumi.Output[str] = None

The ID of the security group.

static get(resource_name, id, opts=None, network_interface_id=None, security_group_id=None)

Get an existing NetworkInterfaceSecurityGroupAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • network_interface_id (pulumi.Input[str]) – The ID of the network interface to attach to.

  • security_group_id (pulumi.Input[str]) – The ID of the security group.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.PeeringConnectionOptions(resource_name, opts=None, accepter=None, requester=None, vpc_peering_connection_id=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to manage VPC peering connection options.

NOTE on VPC Peering Connections and VPC Peering Connection Options: This provider provides both a standalone VPC Peering Connection Options and a VPC Peering Connection resource with accepter and requester attributes. Do not manage options for the same VPC peering connection in both a VPC Peering Connection resource and a VPC Peering Connection Options resource. Doing so will cause a conflict of options and will overwrite the options. Using a VPC Peering Connection Options resource decouples management of the connection options from management of the VPC Peering Connection and allows options to be set correctly in cross-region and cross-account scenarios.

Basic usage:

import pulumi
import pulumi_aws as aws

foo_vpc = aws.ec2.Vpc("fooVpc", cidr_block="10.0.0.0/16")
bar = aws.ec2.Vpc("bar", cidr_block="10.1.0.0/16")
foo_vpc_peering_connection = aws.ec2.VpcPeeringConnection("fooVpcPeeringConnection",
    auto_accept=True,
    peer_vpc_id=bar.id,
    vpc_id=foo_vpc.id)
foo_peering_connection_options = aws.ec2.PeeringConnectionOptions("fooPeeringConnectionOptions",
    accepter={
        "allowRemoteVpcDnsResolution": True,
    },
    requester={
        "allowClassicLinkToRemoteVpc": True,
        "allowVpcToRemoteClassicLink": True,
    },
    vpc_peering_connection_id=foo_vpc_peering_connection.id)

Basic cross-account usage:

import pulumi
import pulumi_aws as aws
import pulumi_pulumi as pulumi

requester = pulumi.providers.Aws("requester")
accepter = pulumi.providers.Aws("accepter")
main = aws.ec2.Vpc("main",
    cidr_block="10.0.0.0/16",
    enable_dns_hostnames=True,
    enable_dns_support=True)
peer_vpc = aws.ec2.Vpc("peerVpc",
    cidr_block="10.1.0.0/16",
    enable_dns_hostnames=True,
    enable_dns_support=True)
peer_caller_identity = aws.get_caller_identity()
peer_vpc_peering_connection = aws.ec2.VpcPeeringConnection("peerVpcPeeringConnection",
    auto_accept=False,
    peer_owner_id=peer_caller_identity.account_id,
    peer_vpc_id=peer_vpc.id,
    tags={
        "Side": "Requester",
    },
    vpc_id=main.id)
peer_vpc_peering_connection_accepter = aws.ec2.VpcPeeringConnectionAccepter("peerVpcPeeringConnectionAccepter",
    auto_accept=True,
    tags={
        "Side": "Accepter",
    },
    vpc_peering_connection_id=peer_vpc_peering_connection.id)
requester_peering_connection_options = aws.ec2.PeeringConnectionOptions("requesterPeeringConnectionOptions",
    requester={
        "allowRemoteVpcDnsResolution": True,
    },
    vpc_peering_connection_id=peer_vpc_peering_connection_accepter.id)
accepter_peering_connection_options = aws.ec2.PeeringConnectionOptions("accepterPeeringConnectionOptions",
    accepter={
        "allowRemoteVpcDnsResolution": True,
    },
    vpc_peering_connection_id=peer_vpc_peering_connection_accepter.id)
Parameters

The accepter object supports the following:

  • allowClassicLinkToRemoteVpc (pulumi.Input[bool]) - Allow a local linked EC2-Classic instance to communicate with instances in a peer VPC. This enables an outbound communication from the local ClassicLink connection to the remote VPC. This option is not supported for inter-region VPC peering.

  • allowRemoteVpcDnsResolution (pulumi.Input[bool]) - Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

  • allowVpcToRemoteClassicLink (pulumi.Input[bool]) - Allow a local VPC to communicate with a linked EC2-Classic instance in a peer VPC. This enables an outbound communication from the local VPC to the remote ClassicLink connection. This option is not supported for inter-region VPC peering.

The requester object supports the following:

  • allowClassicLinkToRemoteVpc (pulumi.Input[bool]) - Allow a local linked EC2-Classic instance to communicate with instances in a peer VPC. This enables an outbound communication from the local ClassicLink connection to the remote VPC. This option is not supported for inter-region VPC peering.

  • allowRemoteVpcDnsResolution (pulumi.Input[bool]) - Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

  • allowVpcToRemoteClassicLink (pulumi.Input[bool]) - Allow a local VPC to communicate with a linked EC2-Classic instance in a peer VPC. This enables an outbound communication from the local VPC to the remote ClassicLink connection. This option is not supported for inter-region VPC peering.

accepter: pulumi.Output[dict] = None

An optional configuration block that allows for [VPC Peering Connection] (https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that accepts the peering connection (a maximum of one).

  • allowClassicLinkToRemoteVpc (bool) - Allow a local linked EC2-Classic instance to communicate with instances in a peer VPC. This enables an outbound communication from the local ClassicLink connection to the remote VPC. This option is not supported for inter-region VPC peering.

  • allowRemoteVpcDnsResolution (bool) - Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

  • allowVpcToRemoteClassicLink (bool) - Allow a local VPC to communicate with a linked EC2-Classic instance in a peer VPC. This enables an outbound communication from the local VPC to the remote ClassicLink connection. This option is not supported for inter-region VPC peering.

requester: pulumi.Output[dict] = None

A optional configuration block that allows for [VPC Peering Connection] (https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) options to be set for the VPC that requests the peering connection (a maximum of one).

  • allowClassicLinkToRemoteVpc (bool) - Allow a local linked EC2-Classic instance to communicate with instances in a peer VPC. This enables an outbound communication from the local ClassicLink connection to the remote VPC. This option is not supported for inter-region VPC peering.

  • allowRemoteVpcDnsResolution (bool) - Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

  • allowVpcToRemoteClassicLink (bool) - Allow a local VPC to communicate with a linked EC2-Classic instance in a peer VPC. This enables an outbound communication from the local VPC to the remote ClassicLink connection. This option is not supported for inter-region VPC peering.

vpc_peering_connection_id: pulumi.Output[str] = None

The ID of the requester VPC peering connection.

static get(resource_name, id, opts=None, accepter=None, requester=None, vpc_peering_connection_id=None)

Get an existing PeeringConnectionOptions resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters

The accepter object supports the following:

  • allowClassicLinkToRemoteVpc (pulumi.Input[bool]) - Allow a local linked EC2-Classic instance to communicate with instances in a peer VPC. This enables an outbound communication from the local ClassicLink connection to the remote VPC. This option is not supported for inter-region VPC peering.

  • allowRemoteVpcDnsResolution (pulumi.Input[bool]) - Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

  • allowVpcToRemoteClassicLink (pulumi.Input[bool]) - Allow a local VPC to communicate with a linked EC2-Classic instance in a peer VPC. This enables an outbound communication from the local VPC to the remote ClassicLink connection. This option is not supported for inter-region VPC peering.

The requester object supports the following:

  • allowClassicLinkToRemoteVpc (pulumi.Input[bool]) - Allow a local linked EC2-Classic instance to communicate with instances in a peer VPC. This enables an outbound communication from the local ClassicLink connection to the remote VPC. This option is not supported for inter-region VPC peering.

  • allowRemoteVpcDnsResolution (pulumi.Input[bool]) - Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

  • allowVpcToRemoteClassicLink (pulumi.Input[bool]) - Allow a local VPC to communicate with a linked EC2-Classic instance in a peer VPC. This enables an outbound communication from the local VPC to the remote ClassicLink connection. This option is not supported for inter-region VPC peering.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.PlacementGroup(resource_name, opts=None, name=None, strategy=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides an EC2 placement group. Read more about placement groups in AWS Docs.

import pulumi
import pulumi_aws as aws

web = aws.ec2.PlacementGroup("web", strategy="cluster")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – The name of the placement group.

  • strategy (pulumi.Input[str]) – The placement strategy. Can be "cluster", "partition" or "spread".

  • tags (pulumi.Input[dict]) – Key-value map of resource tags.

name: pulumi.Output[str] = None

The name of the placement group.

placement_group_id: pulumi.Output[str] = None

The ID of the placement group.

strategy: pulumi.Output[str] = None

The placement strategy. Can be "cluster", "partition" or "spread".

tags: pulumi.Output[dict] = None

Key-value map of resource tags.

static get(resource_name, id, opts=None, name=None, placement_group_id=None, strategy=None, tags=None)

Get an existing PlacementGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – The name of the placement group.

  • placement_group_id (pulumi.Input[str]) – The ID of the placement group.

  • strategy (pulumi.Input[str]) – The placement strategy. Can be "cluster", "partition" or "spread".

  • tags (pulumi.Input[dict]) – Key-value map of resource tags.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.ProxyProtocolPolicy(resource_name, opts=None, instance_ports=None, load_balancer=None, __props__=None, __name__=None, __opts__=None)

Provides a proxy protocol policy, which allows an ELB to carry a client connection information to a backend.

import pulumi
import pulumi_aws as aws

lb = aws.elb.LoadBalancer("lb",
    availability_zones=["us-east-1a"],
    listeners=[
        {
            "instance_port": 25,
            "instanceProtocol": "tcp",
            "lb_port": 25,
            "lbProtocol": "tcp",
        },
        {
            "instance_port": 587,
            "instanceProtocol": "tcp",
            "lb_port": 587,
            "lbProtocol": "tcp",
        },
    ])
smtp = aws.ec2.ProxyProtocolPolicy("smtp",
    instance_ports=[
        "25",
        "587",
    ],
    load_balancer=lb.name)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • instance_ports (pulumi.Input[list]) – List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.

  • load_balancer (pulumi.Input[str]) – The load balancer to which the policy should be attached.

instance_ports: pulumi.Output[list] = None

List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.

load_balancer: pulumi.Output[str] = None

The load balancer to which the policy should be attached.

static get(resource_name, id, opts=None, instance_ports=None, load_balancer=None)

Get an existing ProxyProtocolPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • instance_ports (pulumi.Input[list]) – List of instance ports to which the policy should be applied. This can be specified if the protocol is SSL or TCP.

  • load_balancer (pulumi.Input[str]) – The load balancer to which the policy should be attached.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.Route(resource_name, opts=None, destination_cidr_block=None, destination_ipv6_cidr_block=None, egress_only_gateway_id=None, gateway_id=None, instance_id=None, nat_gateway_id=None, network_interface_id=None, route_table_id=None, transit_gateway_id=None, vpc_peering_connection_id=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to create a routing table entry (a route) in a VPC routing table.

NOTE on Route Tables and Routes: This provider currently provides both a standalone Route resource and a Route Table resource with routes defined in-line. At this time you cannot use a Route Table with in-line routes in conjunction with any Route resources. Doing so will cause a conflict of rule settings and will overwrite rules.

import pulumi
import pulumi_aws as aws

route = aws.ec2.Route("route",
    route_table_id="rtb-4fbb3ac4",
    destination_cidr_block="10.0.1.0/22",
    vpc_peering_connection_id="pcx-45ff3dc1")
import pulumi
import pulumi_aws as aws

vpc = aws.ec2.Vpc("vpc",
    assign_generated_ipv6_cidr_block=True,
    cidr_block="10.1.0.0/16")
egress = aws.ec2.EgressOnlyInternetGateway("egress", vpc_id=vpc.id)
route = aws.ec2.Route("route",
    destination_ipv6_cidr_block="::/0",
    egress_only_gateway_id=egress.id,
    route_table_id="rtb-4fbb3ac4")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • destination_cidr_block (pulumi.Input[str]) – The destination CIDR block.

  • destination_ipv6_cidr_block (pulumi.Input[str]) – The destination IPv6 CIDR block.

  • egress_only_gateway_id (pulumi.Input[str]) – Identifier of a VPC Egress Only Internet Gateway.

  • gateway_id (pulumi.Input[str]) – Identifier of a VPC internet gateway or a virtual private gateway.

  • instance_id (pulumi.Input[str]) – Identifier of an EC2 instance.

  • nat_gateway_id (pulumi.Input[str]) – Identifier of a VPC NAT gateway.

  • network_interface_id (pulumi.Input[str]) – Identifier of an EC2 network interface.

  • route_table_id (pulumi.Input[str]) – The ID of the routing table.

  • transit_gateway_id (pulumi.Input[str]) – Identifier of an EC2 Transit Gateway.

  • vpc_peering_connection_id (pulumi.Input[str]) – Identifier of a VPC peering connection.

destination_cidr_block: pulumi.Output[str] = None

The destination CIDR block.

destination_ipv6_cidr_block: pulumi.Output[str] = None

The destination IPv6 CIDR block.

egress_only_gateway_id: pulumi.Output[str] = None

Identifier of a VPC Egress Only Internet Gateway.

gateway_id: pulumi.Output[str] = None

Identifier of a VPC internet gateway or a virtual private gateway.

instance_id: pulumi.Output[str] = None

Identifier of an EC2 instance.

nat_gateway_id: pulumi.Output[str] = None

Identifier of a VPC NAT gateway.

network_interface_id: pulumi.Output[str] = None

Identifier of an EC2 network interface.

route_table_id: pulumi.Output[str] = None

The ID of the routing table.

transit_gateway_id: pulumi.Output[str] = None

Identifier of an EC2 Transit Gateway.

vpc_peering_connection_id: pulumi.Output[str] = None

Identifier of a VPC peering connection.

static get(resource_name, id, opts=None, destination_cidr_block=None, destination_ipv6_cidr_block=None, destination_prefix_list_id=None, egress_only_gateway_id=None, gateway_id=None, instance_id=None, instance_owner_id=None, nat_gateway_id=None, network_interface_id=None, origin=None, route_table_id=None, state=None, transit_gateway_id=None, vpc_peering_connection_id=None)

Get an existing Route resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • destination_cidr_block (pulumi.Input[str]) – The destination CIDR block.

  • destination_ipv6_cidr_block (pulumi.Input[str]) – The destination IPv6 CIDR block.

  • egress_only_gateway_id (pulumi.Input[str]) – Identifier of a VPC Egress Only Internet Gateway.

  • gateway_id (pulumi.Input[str]) – Identifier of a VPC internet gateway or a virtual private gateway.

  • instance_id (pulumi.Input[str]) – Identifier of an EC2 instance.

  • nat_gateway_id (pulumi.Input[str]) – Identifier of a VPC NAT gateway.

  • network_interface_id (pulumi.Input[str]) – Identifier of an EC2 network interface.

  • route_table_id (pulumi.Input[str]) – The ID of the routing table.

  • transit_gateway_id (pulumi.Input[str]) – Identifier of an EC2 Transit Gateway.

  • vpc_peering_connection_id (pulumi.Input[str]) – Identifier of a VPC peering connection.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.RouteTable(resource_name, opts=None, propagating_vgws=None, routes=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to create a VPC routing table.

NOTE on Route Tables and Routes: This provider currently provides both a standalone Route resource and a Route Table resource with routes defined in-line. At this time you cannot use a Route Table with in-line routes in conjunction with any Route resources. Doing so will cause a conflict of rule settings and will overwrite rules.

NOTE on ``gateway_id`` and ``nat_gateway_id``: The AWS API is very forgiving with these two attributes and the ec2.RouteTable resource can be created with a NAT ID specified as a Gateway ID attribute. This will lead to a permanent diff between your configuration and statefile, as the API returns the correct parameters in the returned route table. If you’re experiencing constant diffs in your ec2.RouteTable resources, the first thing to check is whether or not you’re specifying a NAT ID instead of a Gateway ID, or vice-versa.

NOTE on ``propagating_vgws`` and the ``ec2.VpnGatewayRoutePropagation`` resource: If the propagating_vgws argument is present, it’s not supported to also define route propagations using ec2.VpnGatewayRoutePropagation, since this resource will delete any propagating gateways not explicitly listed in propagating_vgws. Omit this argument when defining route propagation using the separate resource.

import pulumi
import pulumi_aws as aws

route_table = aws.ec2.RouteTable("routeTable",
    routes=[
        {
            "cidr_block": "10.0.1.0/24",
            "gateway_id": aws_internet_gateway["main"]["id"],
        },
        {
            "egress_only_gateway_id": aws_egress_only_internet_gateway["foo"]["id"],
            "ipv6_cidr_block": "::/0",
        },
    ],
    tags={
        "Name": "main",
    },
    vpc_id=aws_vpc["default"]["id"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • propagating_vgws (pulumi.Input[list]) – A list of virtual gateways for propagation.

  • routes (pulumi.Input[list]) – A list of route objects. Their keys are documented below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The VPC ID.

The routes object supports the following:

  • cidr_block (pulumi.Input[str]) - The CIDR block of the route.

  • egress_only_gateway_id (pulumi.Input[str]) - Identifier of a VPC Egress Only Internet Gateway.

  • gateway_id (pulumi.Input[str]) - Identifier of a VPC internet gateway or a virtual private gateway.

  • instance_id (pulumi.Input[str]) - Identifier of an EC2 instance.

  • ipv6_cidr_block (pulumi.Input[str]) - The Ipv6 CIDR block of the route.

  • nat_gateway_id (pulumi.Input[str]) - Identifier of a VPC NAT gateway.

  • network_interface_id (pulumi.Input[str]) - Identifier of an EC2 network interface.

  • transit_gateway_id (pulumi.Input[str]) - Identifier of an EC2 Transit Gateway.

  • vpc_peering_connection_id (pulumi.Input[str]) - Identifier of a VPC peering connection.

owner_id: pulumi.Output[str] = None

The ID of the AWS account that owns the route table.

propagating_vgws: pulumi.Output[list] = None

A list of virtual gateways for propagation.

routes: pulumi.Output[list] = None

A list of route objects. Their keys are documented below.

  • cidr_block (str) - The CIDR block of the route.

  • egress_only_gateway_id (str) - Identifier of a VPC Egress Only Internet Gateway.

  • gateway_id (str) - Identifier of a VPC internet gateway or a virtual private gateway.

  • instance_id (str) - Identifier of an EC2 instance.

  • ipv6_cidr_block (str) - The Ipv6 CIDR block of the route.

  • nat_gateway_id (str) - Identifier of a VPC NAT gateway.

  • network_interface_id (str) - Identifier of an EC2 network interface.

  • transit_gateway_id (str) - Identifier of an EC2 Transit Gateway.

  • vpc_peering_connection_id (str) - Identifier of a VPC peering connection.

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

vpc_id: pulumi.Output[str] = None

The VPC ID.

static get(resource_name, id, opts=None, owner_id=None, propagating_vgws=None, routes=None, tags=None, vpc_id=None)

Get an existing RouteTable resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • owner_id (pulumi.Input[str]) – The ID of the AWS account that owns the route table.

  • propagating_vgws (pulumi.Input[list]) – A list of virtual gateways for propagation.

  • routes (pulumi.Input[list]) – A list of route objects. Their keys are documented below.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • vpc_id (pulumi.Input[str]) – The VPC ID.

The routes object supports the following:

  • cidr_block (pulumi.Input[str]) - The CIDR block of the route.

  • egress_only_gateway_id (pulumi.Input[str]) - Identifier of a VPC Egress Only Internet Gateway.

  • gateway_id (pulumi.Input[str]) - Identifier of a VPC internet gateway or a virtual private gateway.

  • instance_id (pulumi.Input[str]) - Identifier of an EC2 instance.

  • ipv6_cidr_block (pulumi.Input[str]) - The Ipv6 CIDR block of the route.

  • nat_gateway_id (pulumi.Input[str]) - Identifier of a VPC NAT gateway.

  • network_interface_id (pulumi.Input[str]) - Identifier of an EC2 network interface.

  • transit_gateway_id (pulumi.Input[str]) - Identifier of an EC2 Transit Gateway.

  • vpc_peering_connection_id (pulumi.Input[str]) - Identifier of a VPC peering connection.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.ec2.RouteTableAssociation(resource_name, opts=None, gateway_id=None, route_table_id=None, subnet_id=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to create an association between a route table and a subnet or a route table and an internet gateway or virtual private gateway.

import pulumi
import pulumi_aws as aws

route_table_association = aws.ec2.RouteTableAssociation("routeTableAssociation",
    subnet_id=aws_subnet["foo"]["id"],
    route_table_id=aws_route_table["bar"]["id"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • gateway_id (pulumi.Input[str]) – The gateway ID to create an association. Conflicts with subnet_id.

  • route_table_id (pulumi.Input[str]) – The ID of the routing table to associate with.

  • subnet_id (pulumi.Input[str]) – The subnet ID to create an association. Conflicts with gateway_id.

gateway_id: pulumi.Output[str] = None

The gateway ID to create an association. Conflicts with subnet_id.

route_table_id: pulumi.Output[str] = None

The ID of the routing table to associate with.

subnet_id: pulumi.Output[str] = None