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.AmiCopyinstead.If you just want to share an existing AMI with another AWS account, it’s better to use
ec2.AmiLaunchPermissioninstead.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-bundlecommand 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 withsnapshot_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, thevolume_sizeattribute must be at least as large as the referenced snapshot.volume_size(pulumi.Input[float]) - The size of created volumes in GiB. Ifsnapshot_idis set andvolume_sizeis 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 withsnapshot_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, thevolume_sizeattribute must be at least as large as the referenced snapshot.volume_size(float) - The size of created volumes in GiB. Ifsnapshot_idis set andvolume_sizeis 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-bundlecommand 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.
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-bundlecommand 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 withsnapshot_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, thevolume_sizeattribute must be at least as large as the referenced snapshot.volume_size(pulumi.Input[float]) - The size of created volumes in GiB. Ifsnapshot_idis set andvolume_sizeis 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 withsnapshot_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, thevolume_sizeattribute must be at least as large as the referenced snapshot.volume_size(pulumi.Input[float]) - The size of created volumes in GiB. Ifsnapshot_idis set andvolume_sizeis 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 withsnapshot_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, thevolume_sizeattribute must be at least as large as the referenced snapshot.volume_size(float) - The size of created volumes in GiB. Ifsnapshot_idis set andvolume_sizeis 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-bundlecommand 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.
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-bundlecommand 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 withsnapshot_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, thevolume_sizeattribute must be at least as large as the referenced snapshot.volume_size(pulumi.Input[float]) - The size of created volumes in GiB. Ifsnapshot_idis set andvolume_sizeis 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 withsnapshot_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, thevolume_sizeattribute must be at least as large as the referenced snapshot.volume_size(pulumi.Input[float]) - The size of created volumes in GiB. Ifsnapshot_idis set andvolume_sizeis 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 withsnapshot_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, thevolume_sizeattribute must be at least as large as the referenced snapshot.volume_size(float) - The size of created volumes in GiB. Ifsnapshot_idis set andvolume_sizeis 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-bundlecommand 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.
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-bundlecommand 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 withsnapshot_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, thevolume_sizeattribute must be at least as large as the referenced snapshot.volume_size(pulumi.Input[float]) - The size of created volumes in GiB. Ifsnapshot_idis set andvolume_sizeis 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-inornot-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-inornot-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-inornot-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
unlimitedorlimited.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
openortargeted.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 StandardorWindows 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
defaultordedicated.
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
unlimitedorlimited.
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
openortargeted.
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 StandardorWindows with SQL Server Web.
instance_type: pulumi.Output[str] = None¶The instance type for which to reserve capacity.
A map of tags to assign to the resource.
tenancy: pulumi.Output[str] = None¶Indicates the tenancy of the Capacity Reservation. Specify either
defaultordedicated.
- 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
unlimitedorlimited.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
openortargeted.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 StandardorWindows 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
defaultordedicated.
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 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.DefaultNetworkAclbehaves 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.NetworkAclRuleresource.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
egressrules, while including the defaultingressrule 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
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.DefaultRouteTableto manage the default route table and use theec2.MainRouteTableAssociation, due to possible conflict in routes.The
ec2.DefaultRouteTablebehaves 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 routenat_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 routenat_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.
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 routenat_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.DefaultSecurityGroupbehaves 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.SecurityGroupRuleresource.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
egressrules, while including the defaultingressrule 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.DefaultSecurityGroupshould identical behavior toec2.SecurityGroup. Please consultAWS_SECURITY_GROUPfor further usage documentation.Each AWS VPC (or region, if using EC2 Classic) comes with a Default Security Group that cannot be deleted. The
ec2.DefaultSecurityGroupallows 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 groupfrom_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 groupfrom_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 groupfrom_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 groupfrom_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.
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 groupfrom_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 groupfrom_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.DefaultSubnetbehaves 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.
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.DefaultVpcbehaves 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
enable_classiclink: pulumi.Output[bool] = None¶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.
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.MainRouteTableAssociationowner_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.DefaultVpcDhcpOptionsbehaves 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.
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.
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_onto set an explicit dependency on the IGW.Note: Do not use
network_interfaceto associate the EIP tolb.LoadBalancerorec2.NatGatewayresources. Instead use theallocation_idavailable in those resources to allow AWS to manage the association, otherwise you will seeAuthFailureerrors.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.
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.LoadBalancerorec2.NatGatewayresources. Instead use theallocation_idavailable in those resources to allow AWS to manage the association, otherwise you will seeAuthFailureerrors.NOTE:
ec2.EipAssociationis 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
truein 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
truein 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
truein 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 totermination.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 tomaintain.
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. Ifon_demand_optionsallocation_strategyis set toprioritized, 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 Spotallocation_strategyis set tolowestPrice. 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 usingdefault_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 totermination.
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. Ifon_demand_optionsallocation_strategyis set toprioritized, 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 Spotallocation_strategyis set tolowestPrice. Default:1.
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 usingdefault_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 tomaintain.
- 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 totermination.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 tomaintain.
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. Ifon_demand_optionsallocation_strategyis set toprioritized, 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 Spotallocation_strategyis set tolowestPrice. 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 usingdefault_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_destinationinstead. 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:
60seconds (1 minute) or600seconds (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_destinationinstead. 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:
60seconds (1 minute) or600seconds (10 minutes). Default:600.
subnet_id: pulumi.Output[str] = None¶Subnet ID to attach to
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_destinationinstead. 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:
60seconds (1 minute) or600seconds (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.
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_datais 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.Eipwith your instance, you should refer to the EIP’s address directly and not usepublic_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.
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_datais 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.
vpc_classic_link_id= None¶The ID of a ClassicLink-enabled VPC.
vpc_classic_link_security_groups= None¶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
stoporterminate. (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_idsinstead.
tag_specifications= None¶The tags to apply to the resources during launch.
(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.
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-idfilter 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
searchvalue in the/etc/resolv.conffile.
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.
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 -
trueorfalse. Applicable for endpoints of typeInterface.
requester_managed= None¶Whether or not the VPC Endpoint is being managed by its service -
trueorfalse.
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,
GatewayorInterface.
- 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 -
trueorfalse.
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 -
trueorfalse.
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,
GatewayorInterface.
A map of tags assigned to the resource.
vpc_endpoint_policy_supported= None¶Whether or not the service supports endpoint policies -
trueorfalse.
- 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_dataattribute. 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
stopfor EBS-backed instances andterminatefor 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.KeyPairresource.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_base64instead.user_data_base64 (pulumi.Input[str]) – Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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 withsnapshot_id. Must be configured to perform drift detection.iops(pulumi.Input[float]) - The amount of provisioned IOPS. This must be set with avolume_typeof"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 from1to64. (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 tofalse. Currently, the only valid value isfalse, 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 forvolume_typeof"io1", and must be specified if using that typekms_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 withsnapshot_id. Must be configured to perform drift detection.iops(float) - The amount of provisioned IOPS. This must be set with avolume_typeof"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_dataattribute. 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
stopfor EBS-backed instances andterminatefor 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.KeyPairresource.
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 from1to64. (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 tofalse. Currently, the only valid value isfalse, 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_datais 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.Eipwith your instance, you should refer to the EIP’s address directly and not usepublic_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 forvolume_typeof"io1", and must be specified if using that typekms_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.
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_base64instead.
user_data_base64: pulumi.Output[str] = None¶Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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.
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_dataattribute. 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
stopfor EBS-backed instances andterminatefor 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.KeyPairresource.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_datais 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.Eipwith your instance, you should refer to the EIP’s address directly and not usepublic_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_base64instead.user_data_base64 (pulumi.Input[str]) – Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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 withsnapshot_id. Must be configured to perform drift detection.iops(pulumi.Input[float]) - The amount of provisioned IOPS. This must be set with avolume_typeof"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 from1to64. (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 tofalse. Currently, the only valid value isfalse, 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 forvolume_typeof"io1", and must be specified if using that typekms_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.
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.
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_destroyin a lifecycle block. Either omit the Launch Configurationnameattribute, or specify a partial name withname_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_priceparameter 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_deviceattributes 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_devicemapping 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 avolume_typeof"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_devicesettings requires resource replacement.Each
ebs_block_devicesupports 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 avolume_typeof"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 usingsnapshot_idas the encrypted flag will be determined by the snapshot. (Default:false).
Modifying any
ebs_block_devicecurrently requires resource replacement.Each
ephemeral_block_devicesupports 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_namein the format"ephemeral{0..N}".NOTE: Changes to
*_block_deviceconfiguration 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 detailsroot_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_base64instead.user_data_base64 (pulumi.Input[str]) – Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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_base64instead.
user_data_base64: pulumi.Output[str] = None¶Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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.Output[str] = None¶The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg.
vpc-2730681a)
vpc_classic_link_security_groups: pulumi.Output[list] = None¶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 detailsroot_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_base64instead.user_data_base64 (pulumi.Input[str]) – Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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 Protectionebs_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
stoporterminate. (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_idsinstead.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 tofalseif 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 withsnapshot_id.iops(pulumi.Input[float]) - The amount of provisioned IOPS. This must be set with avolume_typeof"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.encryptedmust be set totruewhen 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 beopenornone. (Defaultnone).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:
type(pulumi.Input[str]) - The Elastic GPU Type
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 totrue, 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 bespot.spot_options(pulumi.Input[dict]) - The options for Spot Instanceblock_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 behibernate,stop, orterminate. (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 beone-time, orpersistent.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 from1to64. (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]) - Iftrue, 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 tofalseif 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 withipv4_addressesipv4Addresses(pulumi.Input[list]) - One or more private IPv4 addresses to associate. Conflicts withipv4_address_countipv6_address_count(pulumi.Input[float]) - The number of IPv6 addresses to assign to a network interface. Conflicts withipv6_addressesipv6_addresses(pulumi.Input[list]) - One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts withipv6_address_countnetwork_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 bedefault,dedicated, orhost.
The tag_specifications object supports the following:
resource_type(pulumi.Input[str]) - The type of resource to tag. Valid values areinstanceandvolume.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 tofalseif 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 withsnapshot_id.iops(float) - The amount of provisioned IOPS. This must be set with avolume_typeof"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.encryptedmust be set totruewhen 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 beopenornone. (Defaultnone).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.
type(str) - The Elastic GPU Type
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 totrue, 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
stoporterminate. (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 bespot.spot_options(dict) - The options for Spot Instanceblock_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 behibernate,stop, orterminate. (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 beone-time, orpersistent.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 from1to64. (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) - Iftrue, 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 tofalseif 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 withipv4_addressesipv4Addresses(list) - One or more private IPv4 addresses to associate. Conflicts withipv4_address_countipv6_address_count(float) - The number of IPv6 addresses to assign to a network interface. Conflicts withipv6_addressesipv6_addresses(list) - One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts withipv6_address_countnetwork_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 bedefault,dedicated, orhost.
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_idsinstead.
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 areinstanceandvolume.tags(dict) - A map of tags to assign to the resource.
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 Protectionebs_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
stoporterminate. (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_idsinstead.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 tofalseif 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 withsnapshot_id.iops(pulumi.Input[float]) - The amount of provisioned IOPS. This must be set with avolume_typeof"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.encryptedmust be set totruewhen 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 beopenornone. (Defaultnone).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:
type(pulumi.Input[str]) - The Elastic GPU Type
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 totrue, 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 bespot.spot_options(pulumi.Input[dict]) - The options for Spot Instanceblock_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 behibernate,stop, orterminate. (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 beone-time, orpersistent.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 from1to64. (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]) - Iftrue, 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 tofalseif 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 withipv4_addressesipv4Addresses(pulumi.Input[list]) - One or more private IPv4 addresses to associate. Conflicts withipv4_address_countipv6_address_count(pulumi.Input[float]) - The number of IPv6 addresses to assign to a network interface. Conflicts withipv6_addressesipv6_addresses(pulumi.Input[list]) - One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts withipv6_address_countnetwork_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 bedefault,dedicated, orhost.
The tag_specifications object supports the following:
resource_type(pulumi.Input[str]) - The type of resource to tag. Valid values areinstanceandvolume.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.
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 amain_route_table_associationconsists 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 themain_route_table_associationdelete 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.
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
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|denyrule_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|denyrule_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.
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
accepterandrequesterattributes. 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
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
accepter (pulumi.Input[dict]) – 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).
requester (pulumi.Input[dict]) – 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).
vpc_peering_connection_id (pulumi.Input[str]) – The ID of the requester VPC peering connection.
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
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.
accepter (pulumi.Input[dict]) – 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).
requester (pulumi.Input[dict]) – 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).
vpc_peering_connection_id (pulumi.Input[str]) – The ID of the requester VPC peering connection.
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".
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.RouteTableresource 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 yourec2.RouteTableresources, 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_vgwsargument is present, it’s not supported to also define route propagations usingec2.VpnGatewayRoutePropagation, since this resource will delete any propagating gateways not explicitly listed inpropagating_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.
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¶The subnet ID to create an association. Conflicts with
gateway_id.
- static
get(resource_name, id, opts=None, gateway_id=None, route_table_id=None, subnet_id=None)¶ Get an existing RouteTableAssociation 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.
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.
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.SecurityGroup(resource_name, opts=None, description=None, egress=None, ingress=None, name=None, name_prefix=None, revoke_rules_on_delete=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a security group resource.
NOTE on Security Groups and Security Group Rules: This provider currently provides both a standalone Security Group Rule resource (a single
ingressoregressrule), and a Security Group resource withingressandegressrules defined in-line. At this time you cannot use a Security Group with in-line rules in conjunction with any Security Group Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules.NOTE: Referencing Security Groups across VPC peering has certain restrictions. More information is available in the VPC Peering User Guide.
NOTE: Due to AWS Lambda improved VPC networking changes that began deploying in September 2019, security groups associated with Lambda Functions can take up to 45 minutes to successfully delete.
import pulumi import pulumi_aws as aws allow_tls = aws.ec2.SecurityGroup("allowTls", description="Allow TLS inbound traffic", vpc_id=aws_vpc["main"]["id"], ingress=[{ "description": "TLS from VPC", "from_port": 443, "to_port": 443, "protocol": "tcp", "cidr_blocks": [aws_vpc["main"]["cidr_block"]], }], egress=[{ "from_port": 0, "to_port": 0, "protocol": "-1", "cidr_blocks": ["0.0.0.0/0"], }], tags={ "Name": "allow_tls", })
Prefix list IDs are managed by AWS internally. Prefix list IDs are associated with a prefix list name, or service name, that is linked to a specific region. Prefix list IDs are exported on VPC Endpoints, so you can use this format:
import pulumi import pulumi_aws as aws # ... my_endpoint = aws.ec2.VpcEndpoint("myEndpoint")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description of this egress rule.
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. If omitted, this provider will assign a random, unique name
name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.revoke_rules_on_delete (pulumi.Input[bool]) – Instruct this provider to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. This is normally not needed, however certain AWS services such as Elastic Map Reduce may automatically add required rules to security groups used with the service, and those rules may contain a cyclic dependency that prevent the security groups from being destroyed without removing the dependency first. Default
falsetags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_id (pulumi.Input[str]) – The VPC ID.
The egress object supports the following:
cidr_blocks(pulumi.Input[list]) - List of CIDR blocks.description(pulumi.Input[str]) - Description of this egress rule.from_port(pulumi.Input[float]) - The start port (or ICMP type number if protocol is “icmp”)ipv6_cidr_blocks(pulumi.Input[list]) - List of IPv6 CIDR blocks.prefix_list_ids(pulumi.Input[list]) - List of prefix list IDs (for allowing access to VPC endpoints)protocol(pulumi.Input[str]) - The protocol. If you select a protocol of “-1” (semantically equivalent to"all", which is not a valid value here), you must specify a “from_port” and “to_port” equal to 0. If not icmp, tcp, udp, or “-1” use the protocol numbersecurity_groups(pulumi.Input[list]) - List of security group Group Names if using EC2-Classic, or Group IDs if using a VPC.self(pulumi.Input[bool]) - If true, the security group itself will be added as a source to this egress rule.to_port(pulumi.Input[float]) - The end range port (or ICMP code if protocol is “icmp”).
The ingress object supports the following:
cidr_blocks(pulumi.Input[list]) - List of CIDR blocks.description(pulumi.Input[str]) - Description of this egress rule.from_port(pulumi.Input[float]) - The start port (or ICMP type number if protocol is “icmp”)ipv6_cidr_blocks(pulumi.Input[list]) - List of IPv6 CIDR blocks.prefix_list_ids(pulumi.Input[list]) - List of prefix list IDs (for allowing access to VPC endpoints)protocol(pulumi.Input[str]) - The protocol. If you select a protocol of “-1” (semantically equivalent to"all", which is not a valid value here), you must specify a “from_port” and “to_port” equal to 0. If not icmp, tcp, udp, or “-1” use the protocol numbersecurity_groups(pulumi.Input[list]) - List of security group Group Names if using EC2-Classic, or Group IDs if using a VPC.self(pulumi.Input[bool]) - If true, the security group itself will be added as a source to this egress rule.to_port(pulumi.Input[float]) - The end range port (or ICMP code if protocol is “icmp”).
arn: pulumi.Output[str] = None¶The ARN of the security group
description: pulumi.Output[str] = None¶Description of this egress rule.
egress: pulumi.Output[list] = None¶Can be specified multiple times for each egress rule. Each egress block supports fields documented below.
cidr_blocks(list) - List of CIDR blocks.description(str) - Description of this egress rule.from_port(float) - The start port (or ICMP type number if protocol is “icmp”)ipv6_cidr_blocks(list) - List of IPv6 CIDR blocks.prefix_list_ids(list) - List of prefix list IDs (for allowing access to VPC endpoints)protocol(str) - The protocol. If you select a protocol of “-1” (semantically equivalent to"all", which is not a valid value here), you must specify a “from_port” and “to_port” equal to 0. If not icmp, tcp, udp, or “-1” use the protocol numbersecurity_groups(list) - List of security group Group Names if using EC2-Classic, or Group IDs if using a VPC.self(bool) - If true, the security group itself will be added as a source to this egress rule.to_port(float) - The end range port (or ICMP code if protocol is “icmp”).
ingress: pulumi.Output[list] = None¶Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below.
cidr_blocks(list) - List of CIDR blocks.description(str) - Description of this egress rule.from_port(float) - The start port (or ICMP type number if protocol is “icmp”)ipv6_cidr_blocks(list) - List of IPv6 CIDR blocks.prefix_list_ids(list) - List of prefix list IDs (for allowing access to VPC endpoints)protocol(str) - The protocol. If you select a protocol of “-1” (semantically equivalent to"all", which is not a valid value here), you must specify a “from_port” and “to_port” equal to 0. If not icmp, tcp, udp, or “-1” use the protocol numbersecurity_groups(list) - List of security group Group Names if using EC2-Classic, or Group IDs if using a VPC.self(bool) - If true, the security group itself will be added as a source to this egress rule.to_port(float) - The end range port (or ICMP code if protocol is “icmp”).
name: pulumi.Output[str] = None¶The name of the security group. If omitted, this provider will assign a random, unique name
name_prefix: pulumi.Output[str] = None¶Creates a unique name beginning with the specified prefix. Conflicts with
name.
owner_id: pulumi.Output[str] = None¶The owner ID.
revoke_rules_on_delete: pulumi.Output[bool] = None¶Instruct this provider to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. This is normally not needed, however certain AWS services such as Elastic Map Reduce may automatically add required rules to security groups used with the service, and those rules may contain a cyclic dependency that prevent the security groups from being destroyed without removing the dependency first. Default
false
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, description=None, egress=None, ingress=None, name=None, name_prefix=None, owner_id=None, revoke_rules_on_delete=None, tags=None, vpc_id=None)¶ Get an existing SecurityGroup 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 security group
description (pulumi.Input[str]) – Description of this egress rule.
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. If omitted, this provider will assign a random, unique name
name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.owner_id (pulumi.Input[str]) – The owner ID.
revoke_rules_on_delete (pulumi.Input[bool]) – Instruct this provider to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. This is normally not needed, however certain AWS services such as Elastic Map Reduce may automatically add required rules to security groups used with the service, and those rules may contain a cyclic dependency that prevent the security groups from being destroyed without removing the dependency first. Default
falsetags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_id (pulumi.Input[str]) – The VPC ID.
The egress object supports the following:
cidr_blocks(pulumi.Input[list]) - List of CIDR blocks.description(pulumi.Input[str]) - Description of this egress rule.from_port(pulumi.Input[float]) - The start port (or ICMP type number if protocol is “icmp”)ipv6_cidr_blocks(pulumi.Input[list]) - List of IPv6 CIDR blocks.prefix_list_ids(pulumi.Input[list]) - List of prefix list IDs (for allowing access to VPC endpoints)protocol(pulumi.Input[str]) - The protocol. If you select a protocol of “-1” (semantically equivalent to"all", which is not a valid value here), you must specify a “from_port” and “to_port” equal to 0. If not icmp, tcp, udp, or “-1” use the protocol numbersecurity_groups(pulumi.Input[list]) - List of security group Group Names if using EC2-Classic, or Group IDs if using a VPC.self(pulumi.Input[bool]) - If true, the security group itself will be added as a source to this egress rule.to_port(pulumi.Input[float]) - The end range port (or ICMP code if protocol is “icmp”).
The ingress object supports the following:
cidr_blocks(pulumi.Input[list]) - List of CIDR blocks.description(pulumi.Input[str]) - Description of this egress rule.from_port(pulumi.Input[float]) - The start port (or ICMP type number if protocol is “icmp”)ipv6_cidr_blocks(pulumi.Input[list]) - List of IPv6 CIDR blocks.prefix_list_ids(pulumi.Input[list]) - List of prefix list IDs (for allowing access to VPC endpoints)protocol(pulumi.Input[str]) - The protocol. If you select a protocol of “-1” (semantically equivalent to"all", which is not a valid value here), you must specify a “from_port” and “to_port” equal to 0. If not icmp, tcp, udp, or “-1” use the protocol numbersecurity_groups(pulumi.Input[list]) - List of security group Group Names if using EC2-Classic, or Group IDs if using a VPC.self(pulumi.Input[bool]) - If true, the security group itself will be added as a source to this egress rule.to_port(pulumi.Input[float]) - The end range port (or ICMP code if protocol is “icmp”).
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.SecurityGroupRule(resource_name, opts=None, cidr_blocks=None, description=None, from_port=None, ipv6_cidr_blocks=None, prefix_list_ids=None, protocol=None, security_group_id=None, self=None, source_security_group_id=None, to_port=None, type=None, __props__=None, __name__=None, __opts__=None)¶ Provides a security group rule resource. Represents a single
ingressoregressgroup rule, which can be added to external Security Groups.NOTE on Security Groups and Security Group Rules: This provider currently provides both a standalone Security Group Rule resource (a single
ingressoregressrule), and a Security Group resource withingressandegressrules defined in-line. At this time you cannot use a Security Group with in-line rules in conjunction with any Security Group Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules.NOTE: Setting
protocol = "all"orprotocol = -1withfrom_portandto_portwill result in the EC2 API creating a security group rule with all ports open. This API behavior cannot be controlled by this provider and may generate warnings in the future.NOTE: Referencing Security Groups across VPC peering has certain restrictions. More information is available in the VPC Peering User Guide.
import pulumi import pulumi_aws as aws example = aws.ec2.SecurityGroupRule("example", type="ingress", from_port=0, to_port=65535, protocol="tcp", cidr_blocks=aws_vpc["example"]["cidr_block"], security_group_id="sg-123456")
Prefix list IDs are manged by AWS internally. Prefix list IDs are associated with a prefix list name, or service name, that is linked to a specific region. Prefix list IDs are exported on VPC Endpoints, so you can use this format:
import pulumi import pulumi_aws as aws # ... my_endpoint = aws.ec2.VpcEndpoint("myEndpoint") allow_all = aws.ec2.SecurityGroupRule("allowAll", from_port=0, prefix_list_ids=[my_endpoint.prefix_list_id], protocol="-1", security_group_id="sg-123456", to_port=0, type="egress")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
cidr_blocks (pulumi.Input[list]) – List of CIDR blocks. Cannot be specified with
source_security_group_id.description (pulumi.Input[str]) – Description of the rule.
from_port (pulumi.Input[float]) – The start port (or ICMP type number if protocol is “icmp” or “icmpv6”).
ipv6_cidr_blocks (pulumi.Input[list]) – List of IPv6 CIDR blocks.
prefix_list_ids (pulumi.Input[list]) – List of prefix list IDs (for allowing access to VPC endpoints). Only valid with
egress.protocol (pulumi.Input[str]) –
The protocol. If not icmp, icmpv6, tcp, udp, or all use the protocol number
security_group_id (pulumi.Input[str]) – The security group to apply this rule to.
self (pulumi.Input[bool]) – If true, the security group itself will be added as a source to this ingress rule. Cannot be specified with
source_security_group_id.source_security_group_id (pulumi.Input[str]) – The security group id to allow access to/from, depending on the
type. Cannot be specified withcidr_blocksandself.to_port (pulumi.Input[float]) – The end port (or ICMP code if protocol is “icmp”).
type (pulumi.Input[str]) – The type of rule being created. Valid options are
ingress(inbound) oregress(outbound).
cidr_blocks: pulumi.Output[list] = None¶List of CIDR blocks. Cannot be specified with
source_security_group_id.
description: pulumi.Output[str] = None¶Description of the rule.
from_port: pulumi.Output[float] = None¶The start port (or ICMP type number if protocol is “icmp” or “icmpv6”).
ipv6_cidr_blocks: pulumi.Output[list] = None¶List of IPv6 CIDR blocks.
prefix_list_ids: pulumi.Output[list] = None¶List of prefix list IDs (for allowing access to VPC endpoints). Only valid with
egress.
protocol: pulumi.Output[str] = None¶The protocol. If not icmp, icmpv6, tcp, udp, or all use the protocol number
security_group_id: pulumi.Output[str] = None¶The security group to apply this rule to.
self: pulumi.Output[bool] = None¶If true, the security group itself will be added as a source to this ingress rule. Cannot be specified with
source_security_group_id.
source_security_group_id: pulumi.Output[str] = None¶The security group id to allow access to/from, depending on the
type. Cannot be specified withcidr_blocksandself.
to_port: pulumi.Output[float] = None¶The end port (or ICMP code if protocol is “icmp”).
type: pulumi.Output[str] = None¶The type of rule being created. Valid options are
ingress(inbound) oregress(outbound).
- static
get(resource_name, id, opts=None, cidr_blocks=None, description=None, from_port=None, ipv6_cidr_blocks=None, prefix_list_ids=None, protocol=None, security_group_id=None, self=None, source_security_group_id=None, to_port=None, type=None)¶ Get an existing SecurityGroupRule 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_blocks (pulumi.Input[list]) – List of CIDR blocks. Cannot be specified with
source_security_group_id.description (pulumi.Input[str]) – Description of the rule.
from_port (pulumi.Input[float]) – The start port (or ICMP type number if protocol is “icmp” or “icmpv6”).
ipv6_cidr_blocks (pulumi.Input[list]) – List of IPv6 CIDR blocks.
prefix_list_ids (pulumi.Input[list]) – List of prefix list IDs (for allowing access to VPC endpoints). Only valid with
egress.protocol (pulumi.Input[str]) –
The protocol. If not icmp, icmpv6, tcp, udp, or all use the protocol number
security_group_id (pulumi.Input[str]) – The security group to apply this rule to.
self (pulumi.Input[bool]) – If true, the security group itself will be added as a source to this ingress rule. Cannot be specified with
source_security_group_id.source_security_group_id (pulumi.Input[str]) – The security group id to allow access to/from, depending on the
type. Cannot be specified withcidr_blocksandself.to_port (pulumi.Input[float]) – The end port (or ICMP code if protocol is “icmp”).
type (pulumi.Input[str]) – The type of rule being created. Valid options are
ingress(inbound) oregress(outbound).
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.SnapshotCreateVolumePermission(resource_name, opts=None, account_id=None, snapshot_id=None, __props__=None, __name__=None, __opts__=None)¶ Adds permission to create volumes off of a given EBS Snapshot.
import pulumi import pulumi_aws as aws example = aws.ebs.Volume("example", availability_zone="us-west-2a", size=40) example_snapshot = aws.ebs.Snapshot("exampleSnapshot", volume_id=example.id) example_perm = aws.ec2.SnapshotCreateVolumePermission("examplePerm", account_id="12345678", snapshot_id=example_snapshot.id)
- 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 create volume permissions
snapshot_id (pulumi.Input[str]) – A snapshot ID
account_id: pulumi.Output[str] = None¶An AWS Account ID to add create volume permissions
snapshot_id: pulumi.Output[str] = None¶A snapshot ID
- static
get(resource_name, id, opts=None, account_id=None, snapshot_id=None)¶ Get an existing SnapshotCreateVolumePermission 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 create volume permissions
snapshot_id (pulumi.Input[str]) – A snapshot 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.SpotDatafeedSubscription(resource_name, opts=None, bucket=None, prefix=None, __props__=None, __name__=None, __opts__=None)¶ Note: There is only a single subscription allowed per account.
To help you understand the charges for your Spot instances, Amazon EC2 provides a data feed that describes your Spot instance usage and pricing. This data feed is sent to an Amazon S3 bucket that you specify when you subscribe to the data feed.
import pulumi import pulumi_aws as aws default_bucket = aws.s3.Bucket("defaultBucket") default_spot_datafeed_subscription = aws.ec2.SpotDatafeedSubscription("defaultSpotDatafeedSubscription", bucket=default_bucket.bucket, prefix="my_subdirectory")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
bucket (pulumi.Input[str]) – The Amazon S3 bucket in which to store the Spot instance data feed.
prefix (pulumi.Input[str]) – Path of folder inside bucket to place spot pricing data.
bucket: pulumi.Output[str] = None¶The Amazon S3 bucket in which to store the Spot instance data feed.
prefix: pulumi.Output[str] = None¶Path of folder inside bucket to place spot pricing data.
- static
get(resource_name, id, opts=None, bucket=None, prefix=None)¶ Get an existing SpotDatafeedSubscription 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.
bucket (pulumi.Input[str]) – The Amazon S3 bucket in which to store the Spot instance data feed.
prefix (pulumi.Input[str]) – Path of folder inside bucket to place spot pricing data.
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.SpotFleetRequest(resource_name, opts=None, allocation_strategy=None, excess_capacity_termination_policy=None, fleet_type=None, iam_fleet_role=None, instance_interruption_behaviour=None, instance_pools_to_use_count=None, launch_specifications=None, launch_template_configs=None, load_balancers=None, replace_unhealthy_instances=None, spot_price=None, tags=None, target_capacity=None, target_group_arns=None, terminate_instances_with_expiration=None, valid_from=None, valid_until=None, wait_for_fulfillment=None, __props__=None, __name__=None, __opts__=None)¶ Provides an EC2 Spot Fleet Request resource. This allows a fleet of Spot instances to be requested on the Spot market.
import pulumi import pulumi_aws as aws # Request a Spot fleet cheap_compute = aws.ec2.SpotFleetRequest("cheapCompute", allocation_strategy="diversified", iam_fleet_role="arn:aws:iam::12345678:role/spot-fleet", launch_specifications=[ { "ami": "ami-1234", "iamInstanceProfileArn": aws_iam_instance_profile["example"]["arn"], "instance_type": "m4.10xlarge", "placement_tenancy": "dedicated", "spot_price": "2.793", }, { "ami": "ami-5678", "availability_zone": "us-west-1a", "iamInstanceProfileArn": aws_iam_instance_profile["example"]["arn"], "instance_type": "m4.4xlarge", "key_name": "my-key", "root_block_device": [{ "volume_size": "300", "volumeType": "gp2", }], "spot_price": "1.117", "subnet_id": "subnet-1234", "tags": { "Name": "spot-fleet-example", }, "weightedCapacity": 35, }, ], spot_price="0.03", target_capacity=6, valid_until="2019-11-04T20:44:20Z")
import pulumi import pulumi_aws as aws foo_launch_template = aws.ec2.LaunchTemplate("fooLaunchTemplate", image_id="ami-516b9131", instance_type="m1.small", key_name="some-key", spot_price="0.05") foo_spot_fleet_request = aws.ec2.SpotFleetRequest("fooSpotFleetRequest", iam_fleet_role="arn:aws:iam::12345678:role/spot-fleet", spot_price="0.005", target_capacity=2, valid_until="2019-11-04T20:44:20Z", launch_template_config=[{ "launch_template_specification": { "id": foo_launch_template.id, "version": foo_launch_template.latest_version, }, }])
import pulumi import pulumi_aws as aws foo = aws.ec2.SpotFleetRequest("foo", iam_fleet_role="arn:aws:iam::12345678:role/spot-fleet", launch_specifications=[ { "ami": "ami-d06a90b0", "availability_zone": "us-west-2a", "instance_type": "m1.small", "key_name": "my-key", }, { "ami": "ami-d06a90b0", "availability_zone": "us-west-2a", "instance_type": "m5.large", "key_name": "my-key", }, ], spot_price="0.005", target_capacity=2, valid_until="2019-11-04T20:44:20Z")
import pulumi import pulumi_aws as aws example = aws.ec2.get_subnet_ids(vpc_id=var["vpc_id"]) foo_launch_template = aws.ec2.LaunchTemplate("fooLaunchTemplate", image_id="ami-516b9131", instance_type="m1.small", key_name="some-key", spot_price="0.05") foo_spot_fleet_request = aws.ec2.SpotFleetRequest("fooSpotFleetRequest", iam_fleet_role="arn:aws:iam::12345678:role/spot-fleet", spot_price="0.005", target_capacity=2, valid_until="2019-11-04T20:44:20Z", launch_template_config=[{ "launch_template_specification": { "id": foo_launch_template.id, "version": foo_launch_template.latest_version, }, "overrides": [ { "subnet_id": data["aws_subnets"]["example"]["ids"], }, { "subnet_id": data["aws_subnets"]["example"]["ids"], }, { "subnet_id": data["aws_subnets"]["example"]["ids"], }, ], }])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
allocation_strategy (pulumi.Input[str]) – Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. The default is
lowestPrice.excess_capacity_termination_policy (pulumi.Input[str]) – Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleet_type (pulumi.Input[str]) – The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is
maintain.iam_fleet_role (pulumi.Input[str]) – Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
instance_interruption_behaviour (pulumi.Input[str]) – Indicates whether a Spot instance stops or terminates when it is interrupted. Default is
terminate.instance_pools_to_use_count (pulumi.Input[float]) – The number of Spot pools across which to allocate your target Spot capacity. Valid only when
allocation_strategyis set tolowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.launch_specifications (pulumi.Input[list]) – Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with
launch_template_config. At least one oflaunch_specificationorlaunch_template_configis required.launch_template_configs (pulumi.Input[list]) – Launch template configuration block. See Launch Template Configs below for more details. Conflicts with
launch_specification. At least one oflaunch_specificationorlaunch_template_configis required.load_balancers (pulumi.Input[list]) – A list of elastic load balancer names to add to the Spot fleet.
replace_unhealthy_instances (pulumi.Input[bool]) – Indicates whether Spot fleet should replace unhealthy instances. Default
false.spot_price (pulumi.Input[str]) – The maximum spot bid for this override request.
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
target_capacity (pulumi.Input[float]) – The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
target_group_arns (pulumi.Input[list]) – A list of
alb.TargetGroupARNs, for use with Application Load Balancing.terminate_instances_with_expiration (pulumi.Input[bool]) – Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
valid_from (pulumi.Input[str]) – The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
valid_until (pulumi.Input[str]) –
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. Defaults to 24 hours.
wait_for_fulfillment (pulumi.Input[bool]) – If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
The launch_specifications object supports the following:
ami(pulumi.Input[str])associate_public_ip_address(pulumi.Input[bool])availability_zone(pulumi.Input[str]) - The availability zone in which to place the request.ebs_block_devices(pulumi.Input[list])deleteOnTermination(pulumi.Input[bool])device_name(pulumi.Input[str])encrypted(pulumi.Input[bool])iops(pulumi.Input[float])kms_key_id(pulumi.Input[str])snapshot_id(pulumi.Input[str])volume_size(pulumi.Input[float])volumeType(pulumi.Input[str])
ebs_optimized(pulumi.Input[bool])ephemeral_block_devices(pulumi.Input[list])device_name(pulumi.Input[str])virtualName(pulumi.Input[str])
iam_instance_profile(pulumi.Input[str])iamInstanceProfileArn(pulumi.Input[str])instance_type(pulumi.Input[str]) - The type of instance to request.key_name(pulumi.Input[str])monitoring(pulumi.Input[bool])placement_group(pulumi.Input[str])placement_tenancy(pulumi.Input[str])root_block_devices(pulumi.Input[list])deleteOnTermination(pulumi.Input[bool])encrypted(pulumi.Input[bool])iops(pulumi.Input[float])kms_key_id(pulumi.Input[str])volume_size(pulumi.Input[float])volumeType(pulumi.Input[str])
spot_price(pulumi.Input[str]) - The maximum spot bid for this override request.subnet_id(pulumi.Input[str]) - The subnet in which to launch the requested instance.tags(pulumi.Input[dict]) - A map of tags to assign to the resource.user_data(pulumi.Input[str])vpc_security_group_ids(pulumi.Input[list])weightedCapacity(pulumi.Input[str]) - The capacity added to the fleet by a fulfilled request.
The launch_template_configs object supports the following:
launchTemplateSpecification(pulumi.Input[dict]) - Launch template specification. See Launch Template Specification below for more details.id(pulumi.Input[str]) - The ID of the launch template. Conflicts withname.name(pulumi.Input[str]) - The name of the launch template. Conflicts withid.version(pulumi.Input[str]) - Template version. Unlike the autoscaling equivalent, does not support$Latestor$Default, so use the launch_template resource’s attribute, e.g."${aws_launch_template.foo.latest_version}". It will use the default version if omitted.
overrides(pulumi.Input[list]) - One or more override configurations. See Overrides below for more details.availability_zone(pulumi.Input[str]) - The availability zone in which to place the request.instance_type(pulumi.Input[str]) - The type of instance to request.priority(pulumi.Input[float]) - The priority for the launch template override. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority.spot_price(pulumi.Input[str]) - The maximum spot bid for this override request.subnet_id(pulumi.Input[str]) - The subnet in which to launch the requested instance.weightedCapacity(pulumi.Input[float]) - The capacity added to the fleet by a fulfilled request.
allocation_strategy: pulumi.Output[str] = None¶Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. The default is
lowestPrice.
excess_capacity_termination_policy: pulumi.Output[str] = None¶Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleet_type: pulumi.Output[str] = None¶The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is
maintain.
iam_fleet_role: pulumi.Output[str] = None¶Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
instance_interruption_behaviour: pulumi.Output[str] = None¶Indicates whether a Spot instance stops or terminates when it is interrupted. Default is
terminate.
instance_pools_to_use_count: pulumi.Output[float] = None¶The number of Spot pools across which to allocate your target Spot capacity. Valid only when
allocation_strategyis set tolowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
launch_specifications: pulumi.Output[list] = None¶Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with
launch_template_config. At least one oflaunch_specificationorlaunch_template_configis required.ami(str)associate_public_ip_address(bool)availability_zone(str) - The availability zone in which to place the request.ebs_block_devices(list)deleteOnTermination(bool)device_name(str)encrypted(bool)iops(float)kms_key_id(str)snapshot_id(str)volume_size(float)volumeType(str)
ebs_optimized(bool)ephemeral_block_devices(list)device_name(str)virtualName(str)
iam_instance_profile(str)iamInstanceProfileArn(str)instance_type(str) - The type of instance to request.key_name(str)monitoring(bool)placement_group(str)placement_tenancy(str)root_block_devices(list)deleteOnTermination(bool)encrypted(bool)iops(float)kms_key_id(str)volume_size(float)volumeType(str)
spot_price(str) - The maximum spot bid for this override request.subnet_id(str) - The subnet in which to launch the requested instance.tags(dict) - A map of tags to assign to the resource.user_data(str)vpc_security_group_ids(list)weightedCapacity(str) - The capacity added to the fleet by a fulfilled request.
launch_template_configs: pulumi.Output[list] = None¶Launch template configuration block. See Launch Template Configs below for more details. Conflicts with
launch_specification. At least one oflaunch_specificationorlaunch_template_configis required.launchTemplateSpecification(dict) - Launch template specification. See Launch Template Specification below for more details.id(str) - The ID of the launch template. Conflicts withname.name(str) - The name of the launch template. Conflicts withid.version(str) - Template version. Unlike the autoscaling equivalent, does not support$Latestor$Default, so use the launch_template resource’s attribute, e.g."${aws_launch_template.foo.latest_version}". It will use the default version if omitted.
overrides(list) - One or more override configurations. See Overrides below for more details.availability_zone(str) - The availability zone in which to place the request.instance_type(str) - The type of instance to request.priority(float) - The priority for the launch template override. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority.spot_price(str) - The maximum spot bid for this override request.subnet_id(str) - The subnet in which to launch the requested instance.weightedCapacity(float) - The capacity added to the fleet by a fulfilled request.
load_balancers: pulumi.Output[list] = None¶A list of elastic load balancer names to add to the Spot fleet.
replace_unhealthy_instances: pulumi.Output[bool] = None¶Indicates whether Spot fleet should replace unhealthy instances. Default
false.
spot_price: pulumi.Output[str] = None¶The maximum spot bid for this override request.
spot_request_state: pulumi.Output[str] = None¶The state of the Spot fleet request.
A map of tags to assign to the resource.
target_capacity: pulumi.Output[float] = None¶The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
target_group_arns: pulumi.Output[list] = None¶A list of
alb.TargetGroupARNs, for use with Application Load Balancing.
terminate_instances_with_expiration: pulumi.Output[bool] = None¶Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
valid_from: pulumi.Output[str] = None¶The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
valid_until: pulumi.Output[str] = None¶The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. Defaults to 24 hours.
wait_for_fulfillment: pulumi.Output[bool] = None¶If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
- static
get(resource_name, id, opts=None, allocation_strategy=None, client_token=None, excess_capacity_termination_policy=None, fleet_type=None, iam_fleet_role=None, instance_interruption_behaviour=None, instance_pools_to_use_count=None, launch_specifications=None, launch_template_configs=None, load_balancers=None, replace_unhealthy_instances=None, spot_price=None, spot_request_state=None, tags=None, target_capacity=None, target_group_arns=None, terminate_instances_with_expiration=None, valid_from=None, valid_until=None, wait_for_fulfillment=None)¶ Get an existing SpotFleetRequest 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_strategy (pulumi.Input[str]) – Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. The default is
lowestPrice.excess_capacity_termination_policy (pulumi.Input[str]) – Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleet_type (pulumi.Input[str]) – The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is
maintain.iam_fleet_role (pulumi.Input[str]) – Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
instance_interruption_behaviour (pulumi.Input[str]) – Indicates whether a Spot instance stops or terminates when it is interrupted. Default is
terminate.instance_pools_to_use_count (pulumi.Input[float]) – The number of Spot pools across which to allocate your target Spot capacity. Valid only when
allocation_strategyis set tolowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.launch_specifications (pulumi.Input[list]) – Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with
launch_template_config. At least one oflaunch_specificationorlaunch_template_configis required.launch_template_configs (pulumi.Input[list]) – Launch template configuration block. See Launch Template Configs below for more details. Conflicts with
launch_specification. At least one oflaunch_specificationorlaunch_template_configis required.load_balancers (pulumi.Input[list]) – A list of elastic load balancer names to add to the Spot fleet.
replace_unhealthy_instances (pulumi.Input[bool]) – Indicates whether Spot fleet should replace unhealthy instances. Default
false.spot_price (pulumi.Input[str]) – The maximum spot bid for this override request.
spot_request_state (pulumi.Input[str]) – The state of the Spot fleet request.
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
target_capacity (pulumi.Input[float]) – The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
target_group_arns (pulumi.Input[list]) – A list of
alb.TargetGroupARNs, for use with Application Load Balancing.terminate_instances_with_expiration (pulumi.Input[bool]) – Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
valid_from (pulumi.Input[str]) –
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
valid_until (pulumi.Input[str]) –
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. Defaults to 24 hours.
wait_for_fulfillment (pulumi.Input[bool]) – If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
The launch_specifications object supports the following:
ami(pulumi.Input[str])associate_public_ip_address(pulumi.Input[bool])availability_zone(pulumi.Input[str]) - The availability zone in which to place the request.ebs_block_devices(pulumi.Input[list])deleteOnTermination(pulumi.Input[bool])device_name(pulumi.Input[str])encrypted(pulumi.Input[bool])iops(pulumi.Input[float])kms_key_id(pulumi.Input[str])snapshot_id(pulumi.Input[str])volume_size(pulumi.Input[float])volumeType(pulumi.Input[str])
ebs_optimized(pulumi.Input[bool])ephemeral_block_devices(pulumi.Input[list])device_name(pulumi.Input[str])virtualName(pulumi.Input[str])
iam_instance_profile(pulumi.Input[str])iamInstanceProfileArn(pulumi.Input[str])instance_type(pulumi.Input[str]) - The type of instance to request.key_name(pulumi.Input[str])monitoring(pulumi.Input[bool])placement_group(pulumi.Input[str])placement_tenancy(pulumi.Input[str])root_block_devices(pulumi.Input[list])deleteOnTermination(pulumi.Input[bool])encrypted(pulumi.Input[bool])iops(pulumi.Input[float])kms_key_id(pulumi.Input[str])volume_size(pulumi.Input[float])volumeType(pulumi.Input[str])
spot_price(pulumi.Input[str]) - The maximum spot bid for this override request.subnet_id(pulumi.Input[str]) - The subnet in which to launch the requested instance.tags(pulumi.Input[dict]) - A map of tags to assign to the resource.user_data(pulumi.Input[str])vpc_security_group_ids(pulumi.Input[list])weightedCapacity(pulumi.Input[str]) - The capacity added to the fleet by a fulfilled request.
The launch_template_configs object supports the following:
launchTemplateSpecification(pulumi.Input[dict]) - Launch template specification. See Launch Template Specification below for more details.id(pulumi.Input[str]) - The ID of the launch template. Conflicts withname.name(pulumi.Input[str]) - The name of the launch template. Conflicts withid.version(pulumi.Input[str]) - Template version. Unlike the autoscaling equivalent, does not support$Latestor$Default, so use the launch_template resource’s attribute, e.g."${aws_launch_template.foo.latest_version}". It will use the default version if omitted.
overrides(pulumi.Input[list]) - One or more override configurations. See Overrides below for more details.availability_zone(pulumi.Input[str]) - The availability zone in which to place the request.instance_type(pulumi.Input[str]) - The type of instance to request.priority(pulumi.Input[float]) - The priority for the launch template override. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority.spot_price(pulumi.Input[str]) - The maximum spot bid for this override request.subnet_id(pulumi.Input[str]) - The subnet in which to launch the requested instance.weightedCapacity(pulumi.Input[float]) - The capacity added to the fleet by a fulfilled request.
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.SpotInstanceRequest(resource_name, opts=None, ami=None, associate_public_ip_address=None, availability_zone=None, block_duration_minutes=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_interruption_behaviour=None, instance_type=None, ipv6_address_count=None, ipv6_addresses=None, key_name=None, launch_group=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, spot_price=None, spot_type=None, subnet_id=None, tags=None, tenancy=None, user_data=None, user_data_base64=None, valid_from=None, valid_until=None, volume_tags=None, vpc_security_group_ids=None, wait_for_fulfillment=None, __props__=None, __name__=None, __opts__=None)¶ Provides an EC2 Spot Instance Request resource. This allows instances to be requested on the spot market.
By default this provider creates Spot Instance Requests with a
persistenttype, which means that for the duration of their lifetime, AWS will launch an instance with the configured details if and when the spot market will accept the requested price.On destruction, this provider will make an attempt to terminate the associated Spot Instance if there is one present.
Spot Instances requests with a
one-timetype will close the spot request when the instance is terminated either by the request being below the current spot price availability or by a user.NOTE: Because their behavior depends on the live status of the spot market, Spot Instance Requests have a unique lifecycle that makes them behave differently than other resources. Most importantly: there is no guarantee that a Spot Instance exists to fulfill the request at any given point in time. See the AWS Spot Instance documentation for more information.
import pulumi import pulumi_aws as aws # Request a spot instance at $0.03 cheap_worker = aws.ec2.SpotInstanceRequest("cheapWorker", ami="ami-1234", instance_type="c4.xlarge", spot_price="0.03", tags={ "Name": "CheapWorker", })
- 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.
block_duration_minutes (pulumi.Input[float]) – The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can’t specify an Availability Zone group or a launch group if you specify a duration.
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_dataattribute. 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[str]) –
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
stopfor EBS-backed instances andterminatefor instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.instance_interruption_behaviour (pulumi.Input[str]) – Indicates whether a Spot instance stops or terminates when it is interrupted. Default is
terminateas this is the current AWS behaviour.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.KeyPairresource.launch_group (pulumi.Input[str]) – A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
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.
spot_price (pulumi.Input[str]) – The maximum price to request on the spot market.
spot_type (pulumi.Input[str]) – If set to
one-time, after the instance is terminated, the spot request will be closed.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_base64instead.user_data_base64 (pulumi.Input[str]) – Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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.valid_from (pulumi.Input[str]) –
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
valid_until (pulumi.Input[str]) –
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
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.
wait_for_fulfillment (pulumi.Input[bool]) – If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
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 withsnapshot_id. Must be configured to perform drift detection.iops(pulumi.Input[float]) - The amount of provisioned IOPS. This must be set with avolume_typeof"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 from1to64. (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 tofalse. Currently, the only valid value isfalse, 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 forvolume_typeof"io1", and must be specified if using that typekms_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.
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.
block_duration_minutes: pulumi.Output[float] = None¶The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can’t specify an Availability Zone group or a launch group if you specify a duration.
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 withsnapshot_id. Must be configured to perform drift detection.iops(float) - The amount of provisioned IOPS. This must be set with avolume_typeof"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_dataattribute. 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
stopfor EBS-backed instances andterminatefor instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
instance_interruption_behaviour: pulumi.Output[str] = None¶Indicates whether a Spot instance stops or terminates when it is interrupted. Default is
terminateas this is the current AWS behaviour.
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.KeyPairresource.
launch_group: pulumi.Output[str] = None¶A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
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 from1to64. (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 tofalse. Currently, the only valid value isfalse, 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.
placement_group: pulumi.Output[str] = None¶The Placement Group to start the instance in.
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.
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 forvolume_typeof"io1", and must be specified if using that typekms_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.
spot_bid_status: pulumi.Output[str] = None¶The current bid status of the Spot Instance Request.
spot_request_stateThe current request state of the Spot Instance Request.
spot_instance_id: pulumi.Output[str] = None¶The Instance ID (if any) that is currently fulfilling the Spot Instance request.
spot_price: pulumi.Output[str] = None¶The maximum price to request on the spot market.
spot_type: pulumi.Output[str] = None¶If set to
one-time, after the instance is terminated, the spot request will be closed.
subnet_id: pulumi.Output[str] = None¶The VPC Subnet ID to launch in.
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_base64instead.
user_data_base64: pulumi.Output[str] = None¶Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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.
valid_from: pulumi.Output[str] = None¶The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
valid_until: pulumi.Output[str] = None¶The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
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.
wait_for_fulfillment: pulumi.Output[bool] = None¶If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
- static
get(resource_name, id, opts=None, ami=None, arn=None, associate_public_ip_address=None, availability_zone=None, block_duration_minutes=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_interruption_behaviour=None, instance_state=None, instance_type=None, ipv6_address_count=None, ipv6_addresses=None, key_name=None, launch_group=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, spot_bid_status=None, spot_instance_id=None, spot_price=None, spot_request_state=None, spot_type=None, subnet_id=None, tags=None, tenancy=None, user_data=None, user_data_base64=None, valid_from=None, valid_until=None, volume_tags=None, vpc_security_group_ids=None, wait_for_fulfillment=None)¶ Get an existing SpotInstanceRequest 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.
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.
block_duration_minutes (pulumi.Input[float]) – The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can’t specify an Availability Zone group or a launch group if you specify a duration.
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_dataattribute. 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[str]) –
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
stopfor EBS-backed instances andterminatefor instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.instance_interruption_behaviour (pulumi.Input[str]) – Indicates whether a Spot instance stops or terminates when it is interrupted. Default is
terminateas this is the current AWS behaviour.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.KeyPairresource.launch_group (pulumi.Input[str]) – A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
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_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.
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.
spot_bid_status (pulumi.Input[str]) –
The current bid status of the Spot Instance Request.
* `spot_request_state` The current [request state](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#creating-spot-request-status) of the Spot Instance Request.
- Parameters
spot_instance_id (pulumi.Input[str]) – The Instance ID (if any) that is currently fulfilling the Spot Instance request.
spot_price (pulumi.Input[str]) – The maximum price to request on the spot market.
spot_type (pulumi.Input[str]) – If set to
one-time, after the instance is terminated, the spot request will be closed.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_base64instead.user_data_base64 (pulumi.Input[str]) – Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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.valid_from (pulumi.Input[str]) –
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
valid_until (pulumi.Input[str]) –
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
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.
wait_for_fulfillment (pulumi.Input[bool]) – If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
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 withsnapshot_id. Must be configured to perform drift detection.iops(pulumi.Input[float]) - The amount of provisioned IOPS. This must be set with avolume_typeof"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 from1to64. (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 tofalse. Currently, the only valid value isfalse, 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 forvolume_typeof"io1", and must be specified if using that typekms_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.Subnet(resource_name, opts=None, assign_ipv6_address_on_creation=None, availability_zone=None, availability_zone_id=None, cidr_block=None, ipv6_cidr_block=None, map_public_ip_on_launch=None, outpost_arn=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides an VPC subnet resource.
NOTE: Due to AWS Lambda improved VPC networking changes that began deploying in September 2019, subnets associated with Lambda Functions can take up to 45 minutes to successfully delete.
import pulumi import pulumi_aws as aws main = aws.ec2.Subnet("main", cidr_block="10.0.1.0/24", tags={ "Name": "Main", }, vpc_id=aws_vpc["main"]["id"])
import pulumi import pulumi_aws as aws secondary_cidr = aws.ec2.VpcIpv4CidrBlockAssociation("secondaryCidr", cidr_block="172.2.0.0/16", vpc_id=aws_vpc["main"]["id"]) in_secondary_cidr = aws.ec2.Subnet("inSecondaryCidr", cidr_block="172.2.0.0/24", vpc_id=secondary_cidr.vpc_id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
assign_ipv6_address_on_creation (pulumi.Input[bool]) – Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address. Default is
falseavailability_zone (pulumi.Input[str]) – The AZ for the subnet.
availability_zone_id (pulumi.Input[str]) – The AZ ID of the subnet.
cidr_block (pulumi.Input[str]) – The CIDR block for the subnet.
ipv6_cidr_block (pulumi.Input[str]) – The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.
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. Default is
false.outpost_arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) of the Outpost.
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_id (pulumi.Input[str]) – The VPC ID.
arn: pulumi.Output[str] = None¶The ARN of the subnet.
assign_ipv6_address_on_creation: pulumi.Output[bool] = None¶Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address. Default is
false
availability_zone: pulumi.Output[str] = None¶The AZ for the subnet.
availability_zone_id: pulumi.Output[str] = None¶The AZ ID of the subnet.
cidr_block: pulumi.Output[str] = None¶The CIDR block for the subnet.
ipv6_cidr_block: pulumi.Output[str] = None¶The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.
ipv6_cidr_block_association_id: pulumi.Output[str] = None¶The association ID for 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. Default is
false.
outpost_arn: pulumi.Output[str] = None¶The Amazon Resource Name (ARN) of the Outpost.
owner_id: pulumi.Output[str] = None¶The ID of the AWS account that owns the subnet.
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 Subnet 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 subnet.
assign_ipv6_address_on_creation (pulumi.Input[bool]) – Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address. Default is
falseavailability_zone (pulumi.Input[str]) – The AZ for the subnet.
availability_zone_id (pulumi.Input[str]) – The AZ ID of the subnet.
cidr_block (pulumi.Input[str]) – The CIDR block for the subnet.
ipv6_cidr_block (pulumi.Input[str]) – The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.
ipv6_cidr_block_association_id (pulumi.Input[str]) – The association ID for 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. Default is
false.outpost_arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) of the Outpost.
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.Tag(resource_name, opts=None, key=None, resource_id=None, value=None, __props__=None, __name__=None, __opts__=None)¶ Create a Tag resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] key: The tag name. :param pulumi.Input[str] resource_id: The ID of the EC2 resource to manage the tag for. :param pulumi.Input[str] value: The value of the tag.
key: pulumi.Output[str] = None¶The tag name.
resource_id: pulumi.Output[str] = None¶The ID of the EC2 resource to manage the tag for.
value: pulumi.Output[str] = None¶The value of the tag.
- static
get(resource_name, id, opts=None, key=None, resource_id=None, value=None)¶ Get an existing Tag 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.
key (pulumi.Input[str]) – The tag name.
resource_id (pulumi.Input[str]) – The ID of the EC2 resource to manage the tag for.
value (pulumi.Input[str]) – The value of the tag.
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.TrafficMirrorFilter(resource_name, opts=None, description=None, network_services=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides an Traffic mirror filter.
Read limits and considerations for traffic mirroringimport pulumi import pulumi_aws as aws foo = aws.ec2.TrafficMirrorFilter("foo", description="traffic mirror filter - example", network_services=["amazon-dns"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – A description of the filter.
network_services (pulumi.Input[list]) – List of amazon network services that should be mirrored. Valid values:
amazon-dns.tags (pulumi.Input[dict]) – Key-value map of resource tags.
description: pulumi.Output[str] = None¶A description of the filter.
network_services: pulumi.Output[list] = None¶List of amazon network services that should be mirrored. Valid values:
amazon-dns.
Key-value map of resource tags.
- static
get(resource_name, id, opts=None, description=None, network_services=None, tags=None)¶ Get an existing TrafficMirrorFilter 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]) – A description of the filter.
network_services (pulumi.Input[list]) – List of amazon network services that should be mirrored. Valid values:
amazon-dns.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.TrafficMirrorFilterRule(resource_name, opts=None, description=None, destination_cidr_block=None, destination_port_range=None, protocol=None, rule_action=None, rule_number=None, source_cidr_block=None, source_port_range=None, traffic_direction=None, traffic_mirror_filter_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides an Traffic mirror filter rule.
Read limits and considerations for traffic mirroringimport pulumi import pulumi_aws as aws filter = aws.ec2.TrafficMirrorFilter("filter", description="traffic mirror filter - example", network_services=["amazon-dns"]) ruleout = aws.ec2.TrafficMirrorFilterRule("ruleout", description="test rule", destination_cidr_block="10.0.0.0/8", rule_action="accept", rule_number=1, source_cidr_block="10.0.0.0/8", traffic_direction="egress", traffic_mirror_filter_id=filter.id) rulein = aws.ec2.TrafficMirrorFilterRule("rulein", description="test rule", destination_cidr_block="10.0.0.0/8", destination_port_range={ "from_port": 22, "to_port": 53, }, protocol=6, rule_action="accept", rule_number=1, source_cidr_block="10.0.0.0/8", source_port_range={ "from_port": 0, "to_port": 10, }, traffic_direction="ingress", traffic_mirror_filter_id=filter.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – A description of the traffic mirror filter rule.
destination_cidr_block (pulumi.Input[str]) – The destination CIDR block to assign to the Traffic Mirror rule.
destination_port_range (pulumi.Input[dict]) – The destination port range. Supported only when the protocol is set to TCP(6) or UDP(17). See Traffic mirror port range documented below
protocol (pulumi.Input[float]) – The protocol number, for example 17 (UDP), to assign to the Traffic Mirror rule. For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.
rule_action (pulumi.Input[str]) – The action to take (accept | reject) on the filtered traffic. Valid values are
acceptandrejectrule_number (pulumi.Input[float]) – The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.
source_cidr_block (pulumi.Input[str]) – The source CIDR block to assign to the Traffic Mirror rule.
source_port_range (pulumi.Input[dict]) – The source port range. Supported only when the protocol is set to TCP(6) or UDP(17). See Traffic mirror port range documented below
traffic_direction (pulumi.Input[str]) – The direction of traffic to be captured. Valid values are
ingressandegresstraffic_mirror_filter_id (pulumi.Input[str]) – ID of the traffic mirror filter to which this rule should be added
The destination_port_range object supports the following:
from_port(pulumi.Input[float]) - Starting port of the rangeto_port(pulumi.Input[float]) - Ending port of the range
The source_port_range object supports the following:
from_port(pulumi.Input[float]) - Starting port of the rangeto_port(pulumi.Input[float]) - Ending port of the range
description: pulumi.Output[str] = None¶A description of the traffic mirror filter rule.
destination_cidr_block: pulumi.Output[str] = None¶The destination CIDR block to assign to the Traffic Mirror rule.
destination_port_range: pulumi.Output[dict] = None¶The destination port range. Supported only when the protocol is set to TCP(6) or UDP(17). See Traffic mirror port range documented below
from_port(float) - Starting port of the rangeto_port(float) - Ending port of the range
protocol: pulumi.Output[float] = None¶The protocol number, for example 17 (UDP), to assign to the Traffic Mirror rule. For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.
rule_action: pulumi.Output[str] = None¶The action to take (accept | reject) on the filtered traffic. Valid values are
acceptandreject
rule_number: pulumi.Output[float] = None¶The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.
source_cidr_block: pulumi.Output[str] = None¶The source CIDR block to assign to the Traffic Mirror rule.
source_port_range: pulumi.Output[dict] = None¶The source port range. Supported only when the protocol is set to TCP(6) or UDP(17). See Traffic mirror port range documented below
from_port(float) - Starting port of the rangeto_port(float) - Ending port of the range
traffic_direction: pulumi.Output[str] = None¶The direction of traffic to be captured. Valid values are
ingressandegress
traffic_mirror_filter_id: pulumi.Output[str] = None¶ID of the traffic mirror filter to which this rule should be added
- static
get(resource_name, id, opts=None, description=None, destination_cidr_block=None, destination_port_range=None, protocol=None, rule_action=None, rule_number=None, source_cidr_block=None, source_port_range=None, traffic_direction=None, traffic_mirror_filter_id=None)¶ Get an existing TrafficMirrorFilterRule 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]) – A description of the traffic mirror filter rule.
destination_cidr_block (pulumi.Input[str]) – The destination CIDR block to assign to the Traffic Mirror rule.
destination_port_range (pulumi.Input[dict]) – The destination port range. Supported only when the protocol is set to TCP(6) or UDP(17). See Traffic mirror port range documented below
protocol (pulumi.Input[float]) –
The protocol number, for example 17 (UDP), to assign to the Traffic Mirror rule. For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.
rule_action (pulumi.Input[str]) – The action to take (accept | reject) on the filtered traffic. Valid values are
acceptandrejectrule_number (pulumi.Input[float]) – The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.
source_cidr_block (pulumi.Input[str]) – The source CIDR block to assign to the Traffic Mirror rule.
source_port_range (pulumi.Input[dict]) – The source port range. Supported only when the protocol is set to TCP(6) or UDP(17). See Traffic mirror port range documented below
traffic_direction (pulumi.Input[str]) – The direction of traffic to be captured. Valid values are
ingressandegresstraffic_mirror_filter_id (pulumi.Input[str]) – ID of the traffic mirror filter to which this rule should be added
The destination_port_range object supports the following:
from_port(pulumi.Input[float]) - Starting port of the rangeto_port(pulumi.Input[float]) - Ending port of the range
The source_port_range object supports the following:
from_port(pulumi.Input[float]) - Starting port of the rangeto_port(pulumi.Input[float]) - Ending port of the range
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.TrafficMirrorSession(resource_name, opts=None, description=None, network_interface_id=None, packet_length=None, session_number=None, tags=None, traffic_mirror_filter_id=None, traffic_mirror_target_id=None, virtual_network_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides an Traffic mirror session.
Read limits and considerations for traffic mirroringimport pulumi import pulumi_aws as aws filter = aws.ec2.TrafficMirrorFilter("filter", description="traffic mirror filter - example", network_services=["amazon-dns"]) target = aws.ec2.TrafficMirrorTarget("target", network_load_balancer_arn=aws_lb["lb"]["arn"]) session = aws.ec2.TrafficMirrorSession("session", description="traffic mirror session - example", network_interface_id=aws_instance["test"]["primary_network_interface_id"], traffic_mirror_filter_id=filter.id, traffic_mirror_target_id=target.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – A description of the traffic mirror session.
network_interface_id (pulumi.Input[str]) – ID of the source network interface. Not all network interfaces are eligible as mirror sources. On EC2 instances only nitro based instances support mirroring.
packet_length (pulumi.Input[float]) – The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror.
session_number (pulumi.Input[float]) –
The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
tags (pulumi.Input[dict]) – Key-value map of resource tags.
traffic_mirror_filter_id (pulumi.Input[str]) – ID of the traffic mirror filter to be used
traffic_mirror_target_id (pulumi.Input[str]) – ID of the traffic mirror target to be used
virtual_network_id (pulumi.Input[float]) –
The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at random.
description: pulumi.Output[str] = None¶A description of the traffic mirror session.
network_interface_id: pulumi.Output[str] = None¶ID of the source network interface. Not all network interfaces are eligible as mirror sources. On EC2 instances only nitro based instances support mirroring.
packet_length: pulumi.Output[float] = None¶The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror.
session_number: pulumi.Output[float] = None¶The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
Key-value map of resource tags.
traffic_mirror_filter_id: pulumi.Output[str] = None¶ID of the traffic mirror filter to be used
traffic_mirror_target_id: pulumi.Output[str] = None¶ID of the traffic mirror target to be used
virtual_network_id: pulumi.Output[float] = None¶The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at random.
- static
get(resource_name, id, opts=None, description=None, network_interface_id=None, packet_length=None, session_number=None, tags=None, traffic_mirror_filter_id=None, traffic_mirror_target_id=None, virtual_network_id=None)¶ Get an existing TrafficMirrorSession 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]) – A description of the traffic mirror session.
network_interface_id (pulumi.Input[str]) – ID of the source network interface. Not all network interfaces are eligible as mirror sources. On EC2 instances only nitro based instances support mirroring.
packet_length (pulumi.Input[float]) – The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror.
session_number (pulumi.Input[float]) –
The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
tags (pulumi.Input[dict]) – Key-value map of resource tags.
traffic_mirror_filter_id (pulumi.Input[str]) – ID of the traffic mirror filter to be used
traffic_mirror_target_id (pulumi.Input[str]) – ID of the traffic mirror target to be used
virtual_network_id (pulumi.Input[float]) –
The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at random.
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.TrafficMirrorTarget(resource_name, opts=None, description=None, network_interface_id=None, network_load_balancer_arn=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides an Traffic mirror target.
Read limits and considerations for traffic mirroringimport pulumi import pulumi_aws as aws nlb = aws.ec2.TrafficMirrorTarget("nlb", description="NLB target", network_load_balancer_arn=aws_lb["lb"]["arn"]) eni = aws.ec2.TrafficMirrorTarget("eni", description="ENI target", network_interface_id=aws_instance["test"]["primary_network_interface_id"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – A description of the traffic mirror session.
network_interface_id (pulumi.Input[str]) – The network interface ID that is associated with the target.
network_load_balancer_arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
tags (pulumi.Input[dict]) – Key-value map of resource tags.
arn: pulumi.Output[str] = None¶The ARN of the traffic mirror target.
description: pulumi.Output[str] = None¶A description of the traffic mirror session.
network_interface_id: pulumi.Output[str] = None¶The network interface ID that is associated with the target.
network_load_balancer_arn: pulumi.Output[str] = None¶The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
Key-value map of resource tags.
- static
get(resource_name, id, opts=None, arn=None, description=None, network_interface_id=None, network_load_balancer_arn=None, tags=None)¶ Get an existing TrafficMirrorTarget 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 traffic mirror target.
description (pulumi.Input[str]) – A description of the traffic mirror session.
network_interface_id (pulumi.Input[str]) – The network interface ID that is associated with the target.
network_load_balancer_arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
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.TransitGatewayPeeringAttachmentAccepter(resource_name, opts=None, tags=None, transit_gateway_attachment_id=None, __props__=None, __name__=None, __opts__=None)¶ Manages the accepter’s side of an EC2 Transit Gateway Peering Attachment.
import pulumi import pulumi_aws as aws example = aws.ec2.TransitGatewayPeeringAttachmentAccepter("example", tags={ "Name": "Example cross-account attachment", }, transit_gateway_attachment_id=aws_ec2_transit_gateway_peering_attachment["example"]["id"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
tags (pulumi.Input[dict]) – Key-value tags for the EC2 Transit Gateway Peering Attachment.
transit_gateway_attachment_id (pulumi.Input[str]) – The ID of the EC2 Transit Gateway Peering Attachment to manage.
peer_account_id: pulumi.Output[str] = None¶Identifier of the AWS account that owns the EC2 TGW peering.
peer_transit_gateway_id: pulumi.Output[str] = None¶Identifier of EC2 Transit Gateway to peer with.
Key-value tags for the EC2 Transit Gateway Peering Attachment.
transit_gateway_attachment_id: pulumi.Output[str] = None¶The ID of the EC2 Transit Gateway Peering Attachment to manage.
transit_gateway_id: pulumi.Output[str] = None¶Identifier of EC2 Transit Gateway.
- static
get(resource_name, id, opts=None, peer_account_id=None, peer_region=None, peer_transit_gateway_id=None, tags=None, transit_gateway_attachment_id=None, transit_gateway_id=None)¶ Get an existing TransitGatewayPeeringAttachmentAccepter 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.
peer_account_id (pulumi.Input[str]) – Identifier of the AWS account that owns the EC2 TGW peering.
peer_transit_gateway_id (pulumi.Input[str]) – Identifier of EC2 Transit Gateway to peer with.
tags (pulumi.Input[dict]) – Key-value tags for the EC2 Transit Gateway Peering Attachment.
transit_gateway_attachment_id (pulumi.Input[str]) – The ID of the EC2 Transit Gateway Peering Attachment to manage.
transit_gateway_id (pulumi.Input[str]) – Identifier of EC2 Transit Gateway.
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.VolumeAttachment(resource_name, opts=None, device_name=None, force_detach=None, instance_id=None, skip_destroy=None, volume_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides an AWS EBS Volume Attachment as a top level resource, to attach and detach volumes from AWS Instances.
NOTE on EBS block devices: If you use
ebs_block_deviceon anec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, and treats additional block devices as drift. For this reason,ebs_block_devicecannot be mixed with externalebs.Volume+aws_ebs_volume_attachmentresources for a given instance.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.ebs.Volume("example", availability_zone="us-west-2a", size=1) ebs_att = aws.ec2.VolumeAttachment("ebsAtt", device_name="/dev/sdh", instance_id=web.id, volume_id=example.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
device_name (pulumi.Input[str]) – The device name to expose to the instance (for example,
/dev/sdhorxvdh). See Device Naming on Linux Instances and Device Naming on Windows Instances for more information.force_detach (pulumi.Input[bool]) – Set to
trueif you want to force the volume to detach. Useful if previous attempts failed, but use this option only as a last resort, as this can result in data loss. See Detaching an Amazon EBS Volume from an Instance for more information.instance_id (pulumi.Input[str]) – ID of the Instance to attach to
skip_destroy (pulumi.Input[bool]) – Set this to true if you do not wish to detach the volume from the instance to which it is attached at destroy time, and instead just remove the attachment from this provider state. This is useful when destroying an instance which has volumes created by some other means attached.
volume_id (pulumi.Input[str]) – ID of the Volume to be attached
device_name: pulumi.Output[str] = None¶The device name to expose to the instance (for example,
/dev/sdhorxvdh). See Device Naming on Linux Instances and Device Naming on Windows Instances for more information.
force_detach: pulumi.Output[bool] = None¶Set to
trueif you want to force the volume to detach. Useful if previous attempts failed, but use this option only as a last resort, as this can result in data loss. See Detaching an Amazon EBS Volume from an Instance for more information.
instance_id: pulumi.Output[str] = None¶ID of the Instance to attach to
skip_destroy: pulumi.Output[bool] = None¶Set this to true if you do not wish to detach the volume from the instance to which it is attached at destroy time, and instead just remove the attachment from this provider state. This is useful when destroying an instance which has volumes created by some other means attached.
volume_id: pulumi.Output[str] = None¶ID of the Volume to be attached
- static
get(resource_name, id, opts=None, device_name=None, force_detach=None, instance_id=None, skip_destroy=None, volume_id=None)¶ Get an existing VolumeAttachment 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.
device_name (pulumi.Input[str]) –
The device name to expose to the instance (for example,
/dev/sdhorxvdh). See Device Naming on Linux Instances and Device Naming on Windows Instances for more information.force_detach (pulumi.Input[bool]) –
Set to
trueif you want to force the volume to detach. Useful if previous attempts failed, but use this option only as a last resort, as this can result in data loss. See Detaching an Amazon EBS Volume from an Instance for more information.instance_id (pulumi.Input[str]) – ID of the Instance to attach to
skip_destroy (pulumi.Input[bool]) – Set this to true if you do not wish to detach the volume from the instance to which it is attached at destroy time, and instead just remove the attachment from this provider state. This is useful when destroying an instance which has volumes created by some other means attached.
volume_id (pulumi.Input[str]) – ID of the Volume to 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.Vpc(resource_name, opts=None, assign_generated_ipv6_cidr_block=None, cidr_block=None, enable_classiclink=None, enable_classiclink_dns_support=None, enable_dns_hostnames=None, enable_dns_support=None, instance_tenancy=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides a VPC resource.
import pulumi import pulumi_aws as aws main = aws.ec2.Vpc("main", cidr_block="10.0.0.0/16")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
assign_generated_ipv6_cidr_block (pulumi.Input[bool]) – Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is
false.cidr_block (pulumi.Input[str]) – The CIDR block for the VPC.
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_classiclink_dns_support (pulumi.Input[bool]) – A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.
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]) – A tenancy option for instances launched into the VPC
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¶Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is
false.
cidr_block: pulumi.Output[str] = None¶The CIDR block for 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
enable_classiclink: pulumi.Output[bool] = None¶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_classiclink_dns_support: pulumi.Output[bool] = None¶A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.
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¶A tenancy option for instances launched into the VPC
ipv6_association_id: pulumi.Output[str] = None¶The association ID for the IPv6 CIDR block.
ipv6_cidr_block: pulumi.Output[str] = None¶The IPv6 CIDR block.
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.
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 Vpc 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]) – Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is
false.cidr_block (pulumi.Input[str]) – The CIDR block for 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_classiclink_dns_support (pulumi.Input[bool]) – A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.
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]) – A tenancy option for instances launched into the VPC
ipv6_association_id (pulumi.Input[str]) – The association ID for the IPv6 CIDR block.
ipv6_cidr_block (pulumi.Input[str]) – The IPv6 CIDR block.
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.VpcDhcpOptions(resource_name, opts=None, domain_name=None, domain_name_servers=None, netbios_name_servers=None, netbios_node_type=None, ntp_servers=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides a VPC DHCP Options resource.
import pulumi import pulumi_aws as aws dns_resolver = aws.ec2.VpcDhcpOptions("dnsResolver", domain_name_servers=[ "8.8.8.8", "8.8.4.4", ])
Notice that all arguments are optional but you have to specify at least one argument.
domain_name_servers,netbios_name_servers,ntp_serversare limited by AWS to maximum four servers only.To actually use the DHCP Options Set you need to associate it to a VPC using
ec2.VpcDhcpOptionsAssociation.If you delete a DHCP Options Set, all VPCs using it will be associated to AWS’s
defaultDHCP Option Set.In most cases unless you’re configuring your own DNS you’ll want to set
domain_name_serverstoAmazonProvidedDNS.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
domain_name (pulumi.Input[str]) – the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the
searchvalue in the/etc/resolv.conffile.domain_name_servers (pulumi.Input[list]) – List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.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.
ntp_servers (pulumi.Input[list]) – List of NTP servers to configure.
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.
domain_name: pulumi.Output[str] = None¶the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the
searchvalue in the/etc/resolv.conffile.
domain_name_servers: pulumi.Output[list] = None¶List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.
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.
ntp_servers: pulumi.Output[list] = None¶List of NTP servers to configure.
owner_id: pulumi.Output[str] = None¶The ID of the AWS account that owns the DHCP options set.
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 VpcDhcpOptions 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.
domain_name (pulumi.Input[str]) – the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the
searchvalue in the/etc/resolv.conffile.domain_name_servers (pulumi.Input[list]) – List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.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.
ntp_servers (pulumi.Input[list]) – List of NTP servers to configure.
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.VpcDhcpOptionsAssociation(resource_name, opts=None, dhcp_options_id=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a VPC DHCP Options Association resource.
import pulumi import pulumi_aws as aws dns_resolver = aws.ec2.VpcDhcpOptionsAssociation("dnsResolver", dhcp_options_id=aws_vpc_dhcp_options["foo"]["id"], vpc_id=aws_vpc["foo"]["id"])
You can only associate one DHCP Options Set to a given VPC ID.
Removing the DHCP Options Association automatically sets AWS’s
defaultDHCP Options Set to the VPC.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
dhcp_options_id (pulumi.Input[str]) – The ID of the DHCP Options Set to associate to the VPC.
vpc_id (pulumi.Input[str]) – The ID of the VPC to which we would like to associate a DHCP Options Set.
dhcp_options_id: pulumi.Output[str] = None¶The ID of the DHCP Options Set to associate to the VPC.
vpc_id: pulumi.Output[str] = None¶The ID of the VPC to which we would like to associate a DHCP Options Set.
- static
get(resource_name, id, opts=None, dhcp_options_id=None, vpc_id=None)¶ Get an existing VpcDhcpOptionsAssociation 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.
dhcp_options_id (pulumi.Input[str]) – The ID of the DHCP Options Set to associate to the VPC.
vpc_id (pulumi.Input[str]) – The ID of the VPC to which we would like to associate a DHCP Options 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.VpcEndpoint(resource_name, opts=None, auto_accept=None, policy=None, private_dns_enabled=None, route_table_ids=None, security_group_ids=None, service_name=None, subnet_ids=None, tags=None, vpc_endpoint_type=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a VPC Endpoint resource.
NOTE on VPC Endpoints and VPC Endpoint Associations: This provider provides both standalone VPC Endpoint Associations for Route Tables - (an association between a VPC endpoint and a single
route_table_id) and Subnets - (an association between a VPC endpoint and a singlesubnet_id) and a VPC Endpoint resource withroute_table_idsandsubnet_idsattributes. Do not use the same resource ID in both a VPC Endpoint resource and a VPC Endpoint Association resource. Doing so will cause a conflict of associations and will overwrite the association.import pulumi import pulumi_aws as aws s3 = aws.ec2.VpcEndpoint("s3", service_name="com.amazonaws.us-west-2.s3", vpc_id=aws_vpc["main"]["id"])
import pulumi import pulumi_aws as aws s3 = aws.ec2.VpcEndpoint("s3", service_name="com.amazonaws.us-west-2.s3", tags={ "Environment": "test", }, vpc_id=aws_vpc["main"]["id"])
import pulumi import pulumi_aws as aws ec2 = aws.ec2.VpcEndpoint("ec2", private_dns_enabled=True, security_group_ids=[aws_security_group["sg1"]["id"]], service_name="com.amazonaws.us-west-2.ec2", vpc_endpoint_type="Interface", vpc_id=aws_vpc["main"]["id"])
import pulumi import pulumi_aws as aws ptfe_service_vpc_endpoint = aws.ec2.VpcEndpoint("ptfeServiceVpcEndpoint", private_dns_enabled=False, security_group_ids=[aws_security_group["ptfe_service"]["id"]], service_name=var["ptfe_service"], subnet_ids=[local["subnet_ids"]], vpc_endpoint_type="Interface", vpc_id=var["vpc_id"]) internal = aws.route53.get_zone(name="vpc.internal.", private_zone=True, vpc_id=var["vpc_id"]) ptfe_service_record = aws.route53.Record("ptfeServiceRecord", name=f"ptfe.{internal.name}", records=[ptfe_service_vpc_endpoint.dns_entries[0]["dns_name"]], ttl="300", type="CNAME", zone_id=internal.zone_id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_accept (pulumi.Input[bool]) – Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).
policy (pulumi.Input[str]) – A policy to attach to the endpoint that controls access to the service. Defaults to full access. All
Gatewayand someInterfaceendpoints support policies - see the relevant AWS documentation for more details.private_dns_enabled (pulumi.Input[bool]) – Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type
Interface. Defaults tofalse.route_table_ids (pulumi.Input[list]) – One or more route table IDs. Applicable for endpoints of type
Gateway.security_group_ids (pulumi.Input[list]) – The ID of one or more security groups to associate with the network interface. Required for endpoints of type
Interface.service_name (pulumi.Input[str]) – The service name. For AWS services the service name is usually in the form
com.amazonaws.<region>.<service>(the SageMaker Notebook service is an exception to this rule, the service name is in the formaws.sagemaker.<region>.notebook).subnet_ids (pulumi.Input[list]) – The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type
Interface.tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_endpoint_type (pulumi.Input[str]) – The VPC endpoint type,
GatewayorInterface. Defaults toGateway.vpc_id (pulumi.Input[str]) – The ID of the VPC in which the endpoint will be used.
auto_accept: pulumi.Output[bool] = None¶Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).
cidr_blocks: pulumi.Output[list] = None¶The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type
Gateway.
dns_entries: pulumi.Output[list] = None¶The DNS entries for the VPC Endpoint. Applicable for endpoints of type
Interface. DNS blocks are documented below.dns_name(str) - The DNS name.hosted_zone_id(str) - The ID of the private hosted zone.
network_interface_ids: pulumi.Output[list] = None¶One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type
Interface.
owner_id: pulumi.Output[str] = None¶The ID of the AWS account that owns the VPC endpoint.
policy: pulumi.Output[str] = None¶A policy to attach to the endpoint that controls access to the service. Defaults to full access. All
Gatewayand someInterfaceendpoints support policies - see the relevant AWS documentation for more details.
prefix_list_id: pulumi.Output[str] = None¶The prefix list ID of the exposed AWS service. Applicable for endpoints of type
Gateway.
private_dns_enabled: pulumi.Output[bool] = None¶Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type
Interface. Defaults tofalse.
requester_managed: pulumi.Output[bool] = None¶Whether or not the VPC Endpoint is being managed by its service -
trueorfalse.
route_table_ids: pulumi.Output[list] = None¶One or more route table IDs. Applicable for endpoints of type
Gateway.
security_group_ids: pulumi.Output[list] = None¶The ID of one or more security groups to associate with the network interface. Required for endpoints of type
Interface.
service_name: pulumi.Output[str] = None¶The service name. For AWS services the service name is usually in the form
com.amazonaws.<region>.<service>(the SageMaker Notebook service is an exception to this rule, the service name is in the formaws.sagemaker.<region>.notebook).
state: pulumi.Output[str] = None¶The state of the VPC endpoint.
subnet_ids: pulumi.Output[list] = None¶The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type
Interface.
A map of tags to assign to the resource.
vpc_endpoint_type: pulumi.Output[str] = None¶The VPC endpoint type,
GatewayorInterface. Defaults toGateway.
vpc_id: pulumi.Output[str] = None¶The ID of the VPC in which the endpoint will be used.
- static
get(resource_name, id, opts=None, auto_accept=None, cidr_blocks=None, dns_entries=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)¶ Get an existing VpcEndpoint 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.
auto_accept (pulumi.Input[bool]) – Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).
cidr_blocks (pulumi.Input[list]) – The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type
Gateway.dns_entries (pulumi.Input[list]) – The DNS entries for the VPC Endpoint. Applicable for endpoints of type
Interface. DNS blocks are documented below.network_interface_ids (pulumi.Input[list]) – One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type
Interface.owner_id (pulumi.Input[str]) – The ID of the AWS account that owns the VPC endpoint.
policy (pulumi.Input[str]) –
A policy to attach to the endpoint that controls access to the service. Defaults to full access. All
Gatewayand someInterfaceendpoints support policies - see the relevant AWS documentation for more details.prefix_list_id (pulumi.Input[str]) – The prefix list ID of the exposed AWS service. Applicable for endpoints of type
Gateway.private_dns_enabled (pulumi.Input[bool]) – Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type
Interface. Defaults tofalse.requester_managed (pulumi.Input[bool]) – Whether or not the VPC Endpoint is being managed by its service -
trueorfalse.route_table_ids (pulumi.Input[list]) – One or more route table IDs. Applicable for endpoints of type
Gateway.security_group_ids (pulumi.Input[list]) – The ID of one or more security groups to associate with the network interface. Required for endpoints of type
Interface.service_name (pulumi.Input[str]) – The service name. For AWS services the service name is usually in the form
com.amazonaws.<region>.<service>(the SageMaker Notebook service is an exception to this rule, the service name is in the formaws.sagemaker.<region>.notebook).state (pulumi.Input[str]) – The state of the VPC endpoint.
subnet_ids (pulumi.Input[list]) – The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type
Interface.tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_endpoint_type (pulumi.Input[str]) – The VPC endpoint type,
GatewayorInterface. Defaults toGateway.vpc_id (pulumi.Input[str]) – The ID of the VPC in which the endpoint will be used.
The dns_entries object supports the following:
dns_name(pulumi.Input[str]) - The DNS name.hosted_zone_id(pulumi.Input[str]) - The ID of the private hosted zone.
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.VpcEndpointConnectionNotification(resource_name, opts=None, connection_events=None, connection_notification_arn=None, vpc_endpoint_id=None, vpc_endpoint_service_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a VPC Endpoint connection notification resource. Connection notifications notify subscribers of VPC Endpoint events.
import pulumi import pulumi_aws as aws topic = aws.sns.Topic("topic", policy="""{ "Version":"2012-10-17", "Statement":[{ "Effect": "Allow", "Principal": { "Service": "vpce.amazonaws.com" }, "Action": "SNS:Publish", "Resource": "arn:aws:sns:*:*:vpce-notification-topic" }] } """) foo_vpc_endpoint_service = aws.ec2.VpcEndpointService("fooVpcEndpointService", acceptance_required=False, network_load_balancer_arns=[aws_lb["test"]["arn"]]) foo_vpc_endpoint_connection_notification = aws.ec2.VpcEndpointConnectionNotification("fooVpcEndpointConnectionNotification", connection_events=[ "Accept", "Reject", ], connection_notification_arn=topic.arn, vpc_endpoint_service_id=foo_vpc_endpoint_service.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
connection_events (pulumi.Input[list]) – One or more endpoint events for which to receive notifications.
connection_notification_arn (pulumi.Input[str]) – The ARN of the SNS topic for the notifications.
vpc_endpoint_id (pulumi.Input[str]) – The ID of the VPC Endpoint to receive notifications for.
vpc_endpoint_service_id (pulumi.Input[str]) – The ID of the VPC Endpoint Service to receive notifications for.
connection_events: pulumi.Output[list] = None¶One or more endpoint events for which to receive notifications.
connection_notification_arn: pulumi.Output[str] = None¶The ARN of the SNS topic for the notifications.
notification_type: pulumi.Output[str] = None¶The type of notification.
state: pulumi.Output[str] = None¶The state of the notification.
vpc_endpoint_id: pulumi.Output[str] = None¶The ID of the VPC Endpoint to receive notifications for.
vpc_endpoint_service_id: pulumi.Output[str] = None¶The ID of the VPC Endpoint Service to receive notifications for.
- static
get(resource_name, id, opts=None, connection_events=None, connection_notification_arn=None, notification_type=None, state=None, vpc_endpoint_id=None, vpc_endpoint_service_id=None)¶ Get an existing VpcEndpointConnectionNotification 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.
connection_events (pulumi.Input[list]) –
One or more endpoint events for which to receive notifications.
connection_notification_arn (pulumi.Input[str]) – The ARN of the SNS topic for the notifications.
notification_type (pulumi.Input[str]) – The type of notification.
state (pulumi.Input[str]) – The state of the notification.
vpc_endpoint_id (pulumi.Input[str]) – The ID of the VPC Endpoint to receive notifications for.
vpc_endpoint_service_id (pulumi.Input[str]) – The ID of the VPC Endpoint Service to receive notifications for.
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.VpcEndpointRouteTableAssociation(resource_name, opts=None, route_table_id=None, vpc_endpoint_id=None, __props__=None, __name__=None, __opts__=None)¶ Manages a VPC Endpoint Route Table Association
import pulumi import pulumi_aws as aws example = aws.ec2.VpcEndpointRouteTableAssociation("example", route_table_id=aws_route_table["example"]["id"], vpc_endpoint_id=aws_vpc_endpoint["example"]["id"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
route_table_id (pulumi.Input[str]) – Identifier of the EC2 Route Table to be associated with the VPC Endpoint.
vpc_endpoint_id (pulumi.Input[str]) – Identifier of the VPC Endpoint with which the EC2 Route Table will be associated.
route_table_id: pulumi.Output[str] = None¶Identifier of the EC2 Route Table to be associated with the VPC Endpoint.
vpc_endpoint_id: pulumi.Output[str] = None¶Identifier of the VPC Endpoint with which the EC2 Route Table will be associated.
- static
get(resource_name, id, opts=None, route_table_id=None, vpc_endpoint_id=None)¶ Get an existing VpcEndpointRouteTableAssociation 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.
route_table_id (pulumi.Input[str]) – Identifier of the EC2 Route Table to be associated with the VPC Endpoint.
vpc_endpoint_id (pulumi.Input[str]) – Identifier of the VPC Endpoint with which the EC2 Route Table will be associated.
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.VpcEndpointService(resource_name, opts=None, acceptance_required=None, allowed_principals=None, network_load_balancer_arns=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides a VPC Endpoint Service resource. Service consumers can create an Interface VPC Endpoint to connect to the service.
NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals: This provider provides both a standalone VPC Endpoint Service Allowed Principal resource and a VPC Endpoint Service resource with an
allowed_principalsattribute. Do not use the same principal ARN in both a VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict and will overwrite the association.import pulumi import pulumi_aws as aws example = aws.ec2.VpcEndpointService("example", acceptance_required=False, network_load_balancer_arns=[aws_lb["example"]["arn"]])
import pulumi import pulumi_aws as aws example = aws.ec2.VpcEndpointService("example", acceptance_required=False, network_load_balancer_arns=[aws_lb["example"]["arn"]], tags={ "Environment": "test", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
acceptance_required (pulumi.Input[bool]) – Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.allowed_principals (pulumi.Input[list]) – The ARNs of one or more principals allowed to discover the endpoint service.
network_load_balancer_arns (pulumi.Input[list]) – The ARNs of one or more Network Load Balancers for the endpoint service.
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
acceptance_required: pulumi.Output[bool] = None¶Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.
allowed_principals: pulumi.Output[list] = None¶The ARNs of one or more principals allowed to discover the endpoint service.
availability_zones: pulumi.Output[list] = None¶The Availability Zones in which the service is available.
base_endpoint_dns_names: pulumi.Output[list] = None¶The DNS names for the service.
manages_vpc_endpoints: pulumi.Output[bool] = None¶Whether or not the service manages its VPC endpoints -
trueorfalse.
network_load_balancer_arns: pulumi.Output[list] = None¶The ARNs of one or more Network Load Balancers for the endpoint service.
private_dns_name: pulumi.Output[str] = None¶The private DNS name for the service.
service_name: pulumi.Output[str] = None¶The service name.
service_type: pulumi.Output[str] = None¶The service type,
GatewayorInterface.
state: pulumi.Output[str] = None¶The state of the VPC endpoint service.
A map of tags to assign to the resource.
- static
get(resource_name, id, opts=None, acceptance_required=None, allowed_principals=None, availability_zones=None, base_endpoint_dns_names=None, manages_vpc_endpoints=None, network_load_balancer_arns=None, private_dns_name=None, service_name=None, service_type=None, state=None, tags=None)¶ Get an existing VpcEndpointService 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.
acceptance_required (pulumi.Input[bool]) – Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.allowed_principals (pulumi.Input[list]) – The ARNs of one or more principals allowed to discover the endpoint service.
availability_zones (pulumi.Input[list]) – The Availability Zones in which the service is available.
base_endpoint_dns_names (pulumi.Input[list]) – The DNS names for the service.
manages_vpc_endpoints (pulumi.Input[bool]) – Whether or not the service manages its VPC endpoints -
trueorfalse.network_load_balancer_arns (pulumi.Input[list]) – The ARNs of one or more Network Load Balancers for the endpoint service.
private_dns_name (pulumi.Input[str]) – The private DNS name for the service.
service_name (pulumi.Input[str]) – The service name.
service_type (pulumi.Input[str]) – The service type,
GatewayorInterface.state (pulumi.Input[str]) – The state of the VPC endpoint service.
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.VpcEndpointServiceAllowedPrinciple(resource_name, opts=None, principal_arn=None, vpc_endpoint_service_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a resource to allow a principal to discover a VPC endpoint service.
NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals: This provider provides both a standalone VPC Endpoint Service Allowed Principal resource and a VPC Endpoint Service resource with an
allowed_principalsattribute. Do not use the same principal ARN in both a VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict and will overwrite the association.import pulumi import pulumi_aws as aws current = aws.get_caller_identity() allow_me_to_foo = aws.ec2.VpcEndpointServiceAllowedPrinciple("allowMeToFoo", principal_arn=current.arn, vpc_endpoint_service_id=aws_vpc_endpoint_service["foo"]["id"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
principal_arn (pulumi.Input[str]) – The ARN of the principal to allow permissions.
vpc_endpoint_service_id (pulumi.Input[str]) – The ID of the VPC endpoint service to allow permission.
principal_arn: pulumi.Output[str] = None¶The ARN of the principal to allow permissions.
vpc_endpoint_service_id: pulumi.Output[str] = None¶The ID of the VPC endpoint service to allow permission.
- static
get(resource_name, id, opts=None, principal_arn=None, vpc_endpoint_service_id=None)¶ Get an existing VpcEndpointServiceAllowedPrinciple 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.
principal_arn (pulumi.Input[str]) – The ARN of the principal to allow permissions.
vpc_endpoint_service_id (pulumi.Input[str]) – The ID of the VPC endpoint service to allow permission.
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.VpcEndpointSubnetAssociation(resource_name, opts=None, subnet_id=None, vpc_endpoint_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a resource to create an association between a VPC endpoint and a subnet.
NOTE on VPC Endpoints and VPC Endpoint Subnet Associations: This provider provides both a standalone VPC Endpoint Subnet Association (an association between a VPC endpoint and a single
subnet_id) and a VPC Endpoint resource with asubnet_idsattribute. Do not use the same subnet ID in both a VPC Endpoint resource and a VPC Endpoint Subnet Association resource. Doing so will cause a conflict of associations and will overwrite the association.import pulumi import pulumi_aws as aws sn_ec2 = aws.ec2.VpcEndpointSubnetAssociation("snEc2", subnet_id=aws_subnet["sn"]["id"], vpc_endpoint_id=aws_vpc_endpoint["ec2"]["id"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
subnet_id (pulumi.Input[str]) – The ID of the subnet to be associated with the VPC endpoint.
vpc_endpoint_id (pulumi.Input[str]) – The ID of the VPC endpoint with which the subnet will be associated.
subnet_id: pulumi.Output[str] = None¶The ID of the subnet to be associated with the VPC endpoint.
vpc_endpoint_id: pulumi.Output[str] = None¶The ID of the VPC endpoint with which the subnet will be associated.
- static
get(resource_name, id, opts=None, subnet_id=None, vpc_endpoint_id=None)¶ Get an existing VpcEndpointSubnetAssociation 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.
subnet_id (pulumi.Input[str]) – The ID of the subnet to be associated with the VPC endpoint.
vpc_endpoint_id (pulumi.Input[str]) – The ID of the VPC endpoint with which the subnet will be associated.
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.VpcIpv4CidrBlockAssociation(resource_name, opts=None, cidr_block=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a resource to associate additional IPv4 CIDR blocks with a VPC.
When a VPC is created, a primary IPv4 CIDR block for the VPC must be specified. The
ec2.VpcIpv4CidrBlockAssociationresource allows further IPv4 CIDR blocks to be added to the VPC.import pulumi import pulumi_aws as aws main = aws.ec2.Vpc("main", cidr_block="10.0.0.0/16") secondary_cidr = aws.ec2.VpcIpv4CidrBlockAssociation("secondaryCidr", cidr_block="172.2.0.0/16", vpc_id=main.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
cidr_block (pulumi.Input[str]) – The additional IPv4 CIDR block to associate with the VPC.
vpc_id (pulumi.Input[str]) – The ID of the VPC to make the association with.
cidr_block: pulumi.Output[str] = None¶The additional IPv4 CIDR block to associate with the VPC.
vpc_id: pulumi.Output[str] = None¶The ID of the VPC to make the association with.
- static
get(resource_name, id, opts=None, cidr_block=None, vpc_id=None)¶ Get an existing VpcIpv4CidrBlockAssociation 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 additional IPv4 CIDR block to associate with the VPC.
vpc_id (pulumi.Input[str]) – The ID of the VPC to make the association with.
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.VpcPeeringConnection(resource_name, opts=None, accepter=None, auto_accept=None, peer_owner_id=None, peer_region=None, peer_vpc_id=None, requester=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a resource to manage a VPC peering connection.
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
accepterandrequesterattributes. 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-account scenarios.Note: For cross-account (requester’s AWS account differs from the accepter’s AWS account) or inter-region VPC Peering Connections use the
ec2.VpcPeeringConnectionresource to manage the requester’s side of the connection and use theec2.VpcPeeringConnectionAccepterresource to manage the accepter’s side of the connection.import pulumi import pulumi_aws as aws foo = aws.ec2.VpcPeeringConnection("foo", peer_owner_id=var["peer_owner_id"], peer_vpc_id=aws_vpc["bar"]["id"], vpc_id=aws_vpc["foo"]["id"])
If both VPCs are not in the same AWS account do not enable the
auto_acceptattribute. The accepter can manage its side of the connection using theec2.VpcPeeringConnectionAccepterresource or accept the connection manually using the AWS Management Console, AWS CLI, through SDKs, etc.- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
accepter (pulumi.Input[dict]) – 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).
auto_accept (pulumi.Input[bool]) – Accept the peering (both VPCs need to be in the same AWS account).
peer_owner_id (pulumi.Input[str]) – The AWS account ID of the owner of the peer VPC. Defaults to the account ID the AWS provider is currently connected to.
peer_region (pulumi.Input[str]) – The region of the accepter VPC of the [VPC Peering Connection].
auto_acceptmust befalse, and use theec2.VpcPeeringConnectionAccepterto manage the accepter side.peer_vpc_id (pulumi.Input[str]) – The ID of the VPC with which you are creating the VPC Peering Connection.
requester (pulumi.Input[dict]) – 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).
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_id (pulumi.Input[str]) – The ID of the requester VPC.
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.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. This is not supported for inter-region VPC peering.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.
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.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. This is not supported for inter-region VPC peering.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.
accept_status: pulumi.Output[str] = None¶The status of the VPC Peering Connection request.
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.allowRemoteVpcDnsResolution(bool) - Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC. This is not supported for inter-region VPC peering.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.
auto_accept: pulumi.Output[bool] = None¶Accept the peering (both VPCs need to be in the same AWS account).
peer_owner_id: pulumi.Output[str] = None¶The AWS account ID of the owner of the peer VPC. Defaults to the account ID the AWS provider is currently connected to.
peer_region: pulumi.Output[str] = None¶The region of the accepter VPC of the [VPC Peering Connection].
auto_acceptmust befalse, and use theec2.VpcPeeringConnectionAccepterto manage the accepter side.
peer_vpc_id: pulumi.Output[str] = None¶The ID of the VPC with which you are creating the VPC Peering Connection.
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.allowRemoteVpcDnsResolution(bool) - Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC. This is not supported for inter-region VPC peering.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.
A map of tags to assign to the resource.
vpc_id: pulumi.Output[str] = None¶The ID of the requester VPC.
- static
get(resource_name, id, opts=None, accept_status=None, accepter=None, auto_accept=None, peer_owner_id=None, peer_region=None, peer_vpc_id=None, requester=None, tags=None, vpc_id=None)¶ Get an existing VpcPeeringConnection 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.
accept_status (pulumi.Input[str]) – The status of the VPC Peering Connection request.
accepter (pulumi.Input[dict]) – 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).
auto_accept (pulumi.Input[bool]) – Accept the peering (both VPCs need to be in the same AWS account).
peer_owner_id (pulumi.Input[str]) –
The AWS account ID of the owner of the peer VPC. Defaults to the account ID the AWS provider is currently connected to.
peer_region (pulumi.Input[str]) – The region of the accepter VPC of the [VPC Peering Connection].
auto_acceptmust befalse, and use theec2.VpcPeeringConnectionAccepterto manage the accepter side.peer_vpc_id (pulumi.Input[str]) – The ID of the VPC with which you are creating the VPC Peering Connection.
requester (pulumi.Input[dict]) – 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).
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_id (pulumi.Input[str]) – The ID of the requester VPC.
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.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. This is not supported for inter-region VPC peering.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.
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.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. This is not supported for inter-region VPC peering.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.
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.VpcPeeringConnectionAccepter(resource_name, opts=None, accepter=None, auto_accept=None, requester=None, tags=None, vpc_peering_connection_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a resource to manage the accepter’s side of a VPC Peering Connection.
When a cross-account (requester’s AWS account differs from the accepter’s AWS account) or an inter-region VPC Peering Connection is created, a VPC Peering Connection resource is automatically created in the accepter’s account. The requester can use the
ec2.VpcPeeringConnectionresource to manage its side of the connection and the accepter can use theec2.VpcPeeringConnectionAccepterresource to “adopt” its side of the connection into management.import pulumi import pulumi_aws as aws import pulumi_pulumi as pulumi peer = pulumi.providers.Aws("peer", region="us-west-2") main = aws.ec2.Vpc("main", cidr_block="10.0.0.0/16") peer_vpc = aws.ec2.Vpc("peerVpc", cidr_block="10.1.0.0/16") peer_caller_identity = aws.get_caller_identity() # Requester's side of the connection. peer_vpc_peering_connection = aws.ec2.VpcPeeringConnection("peerVpcPeeringConnection", auto_accept=False, peer_owner_id=peer_caller_identity.account_id, peer_region="us-west-2", peer_vpc_id=peer_vpc.id, tags={ "Side": "Requester", }, vpc_id=main.id) # Accepter's side of the connection. peer_vpc_peering_connection_accepter = aws.ec2.VpcPeeringConnectionAccepter("peerVpcPeeringConnectionAccepter", auto_accept=True, tags={ "Side": "Accepter", }, vpc_peering_connection_id=peer_vpc_peering_connection.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
accepter (pulumi.Input[dict]) – 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.
auto_accept (pulumi.Input[bool]) – Whether or not to accept the peering request. Defaults to
false.requester (pulumi.Input[dict]) – 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.
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_peering_connection_id (pulumi.Input[str]) – The VPC Peering Connection ID to manage.
The accepter object supports the following:
allowClassicLinkToRemoteVpc(pulumi.Input[bool]) - Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC Peering Connection.allowRemoteVpcDnsResolution(pulumi.Input[bool]) - Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.allowVpcToRemoteClassicLink(pulumi.Input[bool]) - Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC Peering Connection.
The requester object supports the following:
allowClassicLinkToRemoteVpc(pulumi.Input[bool]) - Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC Peering Connection.allowRemoteVpcDnsResolution(pulumi.Input[bool]) - Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.allowVpcToRemoteClassicLink(pulumi.Input[bool]) - Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC Peering Connection.
accept_status: pulumi.Output[str] = None¶The status of the VPC Peering Connection request.
accepter: pulumi.Output[dict] = 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.
allowClassicLinkToRemoteVpc(bool) - Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC Peering Connection.allowRemoteVpcDnsResolution(bool) - Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.allowVpcToRemoteClassicLink(bool) - Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC Peering Connection.
auto_accept: pulumi.Output[bool] = None¶Whether or not to accept the peering request. Defaults to
false.
peer_owner_id: pulumi.Output[str] = None¶The AWS account ID of the owner of the requester VPC.
peer_region: pulumi.Output[str] = None¶The region of the accepter VPC.
peer_vpc_id: pulumi.Output[str] = None¶The ID of the requester VPC.
requester: pulumi.Output[dict] = 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.
allowClassicLinkToRemoteVpc(bool) - Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC Peering Connection.allowRemoteVpcDnsResolution(bool) - Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.allowVpcToRemoteClassicLink(bool) - Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC Peering Connection.
A map of tags to assign to the resource.
vpc_id: pulumi.Output[str] = None¶The ID of the accepter VPC.
vpc_peering_connection_id: pulumi.Output[str] = None¶The VPC Peering Connection ID to manage.
- static
get(resource_name, id, opts=None, accept_status=None, accepter=None, auto_accept=None, peer_owner_id=None, peer_region=None, peer_vpc_id=None, requester=None, tags=None, vpc_id=None, vpc_peering_connection_id=None)¶ Get an existing VpcPeeringConnectionAccepter 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.
accept_status (pulumi.Input[str]) – The status of the VPC Peering Connection request.
accepter (pulumi.Input[dict]) – 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.
auto_accept (pulumi.Input[bool]) – Whether or not to accept the peering request. Defaults to
false.peer_owner_id (pulumi.Input[str]) – The AWS account ID of the owner of the requester VPC.
peer_region (pulumi.Input[str]) – The region of the accepter VPC.
peer_vpc_id (pulumi.Input[str]) – The ID of the requester VPC.
requester (pulumi.Input[dict]) – 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.
tags (pulumi.Input[dict]) – A map of tags to assign to the resource.
vpc_id (pulumi.Input[str]) – The ID of the accepter VPC.
vpc_peering_connection_id (pulumi.Input[str]) – The VPC Peering Connection ID to manage.
The accepter object supports the following:
allowClassicLinkToRemoteVpc(pulumi.Input[bool]) - Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC Peering Connection.allowRemoteVpcDnsResolution(pulumi.Input[bool]) - Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.allowVpcToRemoteClassicLink(pulumi.Input[bool]) - Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC Peering Connection.
The requester object supports the following:
allowClassicLinkToRemoteVpc(pulumi.Input[bool]) - Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC Peering Connection.allowRemoteVpcDnsResolution(pulumi.Input[bool]) - Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.allowVpcToRemoteClassicLink(pulumi.Input[bool]) - Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the 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.VpnConnection(resource_name, opts=None, customer_gateway_id=None, static_routes_only=None, tags=None, transit_gateway_id=None, tunnel1_inside_cidr=None, tunnel1_preshared_key=None, tunnel2_inside_cidr=None, tunnel2_preshared_key=None, type=None, vpn_gateway_id=None, __props__=None, __name__=None, __opts__=None)¶ Manages an EC2 VPN connection. These objects can be connected to customer gateways, and allow you to establish tunnels between your network and Amazon.
Note: All arguments including
tunnel1_preshared_keyandtunnel2_preshared_keywill be stored in the raw state as plain-text.Note: The CIDR blocks in the arguments
tunnel1_inside_cidrandtunnel2_inside_cidrmust have a prefix of /30 and be a part of a specific range. Read more about this in the AWS documentation.import pulumi import pulumi_aws as aws example_transit_gateway = aws.ec2transitgateway.TransitGateway("exampleTransitGateway") example_customer_gateway = aws.ec2.CustomerGateway("exampleCustomerGateway", bgp_asn=65000, ip_address="172.0.0.1", type="ipsec.1") example_vpn_connection = aws.ec2.VpnConnection("exampleVpnConnection", customer_gateway_id=example_customer_gateway.id, transit_gateway_id=example_transit_gateway.id, type=example_customer_gateway.type)
import pulumi import pulumi_aws as aws vpc = aws.ec2.Vpc("vpc", cidr_block="10.0.0.0/16") vpn_gateway = aws.ec2.VpnGateway("vpnGateway", vpc_id=vpc.id) customer_gateway = aws.ec2.CustomerGateway("customerGateway", bgp_asn=65000, ip_address="172.0.0.1", type="ipsec.1") main = aws.ec2.VpnConnection("main", customer_gateway_id=customer_gateway.id, static_routes_only=True, type="ipsec.1", vpn_gateway_id=vpn_gateway.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
customer_gateway_id (pulumi.Input[str]) – The ID of the customer gateway.
static_routes_only (pulumi.Input[bool]) – Whether the VPN connection uses static routes exclusively. Static routes must be used for devices that don’t support BGP.
tags (pulumi.Input[dict]) – Tags to apply to the connection.
transit_gateway_id (pulumi.Input[str]) – The ID of the EC2 Transit Gateway.
tunnel1_inside_cidr (pulumi.Input[str]) – The CIDR block of the inside IP addresses for the first VPN tunnel.
tunnel1_preshared_key (pulumi.Input[str]) – The preshared key of the first VPN tunnel.
tunnel2_inside_cidr (pulumi.Input[str]) – The CIDR block of the inside IP addresses for the second VPN tunnel.
tunnel2_preshared_key (pulumi.Input[str]) – The preshared key of the second VPN tunnel.
type (pulumi.Input[str]) – The type of VPN connection. The only type AWS supports at this time is “ipsec.1”.
vpn_gateway_id (pulumi.Input[str]) – The ID of the Virtual Private Gateway.
customer_gateway_configuration: pulumi.Output[str] = None¶The configuration information for the VPN connection’s customer gateway (in the native XML format).
customer_gateway_id: pulumi.Output[str] = None¶The ID of the customer gateway.
static_routes_only: pulumi.Output[bool] = None¶Whether the VPN connection uses static routes exclusively. Static routes must be used for devices that don’t support BGP.
Tags to apply to the connection.
transit_gateway_attachment_id: pulumi.Output[str] = None¶When associated with an EC2 Transit Gateway (
transit_gateway_idargument), the attachment ID.
transit_gateway_id: pulumi.Output[str] = None¶The ID of the EC2 Transit Gateway.
tunnel1_address: pulumi.Output[str] = None¶The public IP address of the first VPN tunnel.
tunnel1_bgp_asn: pulumi.Output[str] = None¶The bgp asn number of the first VPN tunnel.
tunnel1_bgp_holdtime: pulumi.Output[float] = None¶The bgp holdtime of the first VPN tunnel.
tunnel1_cgw_inside_address: pulumi.Output[str] = None¶The RFC 6890 link-local address of the first VPN tunnel (Customer Gateway Side).
tunnel1_inside_cidr: pulumi.Output[str] = None¶The CIDR block of the inside IP addresses for the first VPN tunnel.
The preshared key of the first VPN tunnel.
tunnel1_vgw_inside_address: pulumi.Output[str] = None¶The RFC 6890 link-local address of the first VPN tunnel (VPN Gateway Side).
tunnel2_address: pulumi.Output[str] = None¶The public IP address of the second VPN tunnel.
tunnel2_bgp_asn: pulumi.Output[str] = None¶The bgp asn number of the second VPN tunnel.
tunnel2_bgp_holdtime: pulumi.Output[float] = None¶The bgp holdtime of the second VPN tunnel.
tunnel2_cgw_inside_address: pulumi.Output[str] = None¶The RFC 6890 link-local address of the second VPN tunnel (Customer Gateway Side).
tunnel2_inside_cidr: pulumi.Output[str] = None¶The CIDR block of the inside IP addresses for the second VPN tunnel.
The preshared key of the second VPN tunnel.
tunnel2_vgw_inside_address: pulumi.Output[str] = None¶The RFC 6890 link-local address of the second VPN tunnel (VPN Gateway Side).
type: pulumi.Output[str] = None¶The type of VPN connection. The only type AWS supports at this time is “ipsec.1”.
vpn_gateway_id: pulumi.Output[str] = None¶The ID of the Virtual Private Gateway.
- static
get(resource_name, id, opts=None, customer_gateway_configuration=None, customer_gateway_id=None, routes=None, static_routes_only=None, tags=None, transit_gateway_attachment_id=None, transit_gateway_id=None, tunnel1_address=None, tunnel1_bgp_asn=None, tunnel1_bgp_holdtime=None, tunnel1_cgw_inside_address=None, tunnel1_inside_cidr=None, tunnel1_preshared_key=None, tunnel1_vgw_inside_address=None, tunnel2_address=None, tunnel2_bgp_asn=None, tunnel2_bgp_holdtime=None, tunnel2_cgw_inside_address=None, tunnel2_inside_cidr=None, tunnel2_preshared_key=None, tunnel2_vgw_inside_address=None, type=None, vgw_telemetries=None, vpn_gateway_id=None)¶ Get an existing VpnConnection 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.
customer_gateway_configuration (pulumi.Input[str]) – The configuration information for the VPN connection’s customer gateway (in the native XML format).
customer_gateway_id (pulumi.Input[str]) – The ID of the customer gateway.
static_routes_only (pulumi.Input[bool]) – Whether the VPN connection uses static routes exclusively. Static routes must be used for devices that don’t support BGP.
tags (pulumi.Input[dict]) – Tags to apply to the connection.
transit_gateway_attachment_id (pulumi.Input[str]) – When associated with an EC2 Transit Gateway (
transit_gateway_idargument), the attachment ID.transit_gateway_id (pulumi.Input[str]) – The ID of the EC2 Transit Gateway.
tunnel1_address (pulumi.Input[str]) – The public IP address of the first VPN tunnel.
tunnel1_bgp_asn (pulumi.Input[str]) – The bgp asn number of the first VPN tunnel.
tunnel1_bgp_holdtime (pulumi.Input[float]) – The bgp holdtime of the first VPN tunnel.
tunnel1_cgw_inside_address (pulumi.Input[str]) – The RFC 6890 link-local address of the first VPN tunnel (Customer Gateway Side).
tunnel1_inside_cidr (pulumi.Input[str]) – The CIDR block of the inside IP addresses for the first VPN tunnel.
tunnel1_preshared_key (pulumi.Input[str]) – The preshared key of the first VPN tunnel.
tunnel1_vgw_inside_address (pulumi.Input[str]) – The RFC 6890 link-local address of the first VPN tunnel (VPN Gateway Side).
tunnel2_address (pulumi.Input[str]) – The public IP address of the second VPN tunnel.
tunnel2_bgp_asn (pulumi.Input[str]) – The bgp asn number of the second VPN tunnel.
tunnel2_bgp_holdtime (pulumi.Input[float]) – The bgp holdtime of the second VPN tunnel.
tunnel2_cgw_inside_address (pulumi.Input[str]) – The RFC 6890 link-local address of the second VPN tunnel (Customer Gateway Side).
tunnel2_inside_cidr (pulumi.Input[str]) – The CIDR block of the inside IP addresses for the second VPN tunnel.
tunnel2_preshared_key (pulumi.Input[str]) – The preshared key of the second VPN tunnel.
tunnel2_vgw_inside_address (pulumi.Input[str]) – The RFC 6890 link-local address of the second VPN tunnel (VPN Gateway Side).
type (pulumi.Input[str]) – The type of VPN connection. The only type AWS supports at this time is “ipsec.1”.
vpn_gateway_id (pulumi.Input[str]) – The ID of the Virtual Private Gateway.
The routes object supports the following:
destination_cidr_block(pulumi.Input[str])source(pulumi.Input[str])state(pulumi.Input[str])
The vgw_telemetries object supports the following:
acceptedRouteCount(pulumi.Input[float])lastStatusChange(pulumi.Input[str])outsideIpAddress(pulumi.Input[str])status(pulumi.Input[str])statusMessage(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.VpnConnectionRoute(resource_name, opts=None, destination_cidr_block=None, vpn_connection_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a static route between a VPN connection and a customer gateway.
import pulumi import pulumi_aws as aws vpc = aws.ec2.Vpc("vpc", cidr_block="10.0.0.0/16") vpn_gateway = aws.ec2.VpnGateway("vpnGateway", vpc_id=vpc.id) customer_gateway = aws.ec2.CustomerGateway("customerGateway", bgp_asn=65000, ip_address="172.0.0.1", type="ipsec.1") main = aws.ec2.VpnConnection("main", customer_gateway_id=customer_gateway.id, static_routes_only=True, type="ipsec.1", vpn_gateway_id=vpn_gateway.id) office = aws.ec2.VpnConnectionRoute("office", destination_cidr_block="192.168.10.0/24", vpn_connection_id=main.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
destination_cidr_block (pulumi.Input[str]) – The CIDR block associated with the local subnet of the customer network.
vpn_connection_id (pulumi.Input[str]) – The ID of the VPN connection.
destination_cidr_block: pulumi.Output[str] = None¶The CIDR block associated with the local subnet of the customer network.
vpn_connection_id: pulumi.Output[str] = None¶The ID of the VPN connection.
- static
get(resource_name, id, opts=None, destination_cidr_block=None, vpn_connection_id=None)¶ Get an existing VpnConnectionRoute 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 CIDR block associated with the local subnet of the customer network.
vpn_connection_id (pulumi.Input[str]) – The ID of the VPN 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.VpnGateway(resource_name, opts=None, amazon_side_asn=None, availability_zone=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a resource to create a VPC VPN Gateway.
import pulumi import pulumi_aws as aws vpn_gw = aws.ec2.VpnGateway("vpnGw", 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.
amazon_side_asn (pulumi.Input[str]) – The Autonomous System Number (ASN) for the Amazon side of the gateway. If you don’t specify an ASN, the virtual private gateway is created with the default ASN.
availability_zone (pulumi.Input[str]) – The Availability Zone for the virtual private 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.
amazon_side_asn: pulumi.Output[str] = None¶The Autonomous System Number (ASN) for the Amazon side of the gateway. If you don’t specify an ASN, the virtual private gateway is created with the default ASN.
availability_zone: pulumi.Output[str] = None¶The Availability Zone for the virtual private gateway.
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, amazon_side_asn=None, availability_zone=None, tags=None, vpc_id=None)¶ Get an existing VpnGateway 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.
amazon_side_asn (pulumi.Input[str]) – The Autonomous System Number (ASN) for the Amazon side of the gateway. If you don’t specify an ASN, the virtual private gateway is created with the default ASN.
availability_zone (pulumi.Input[str]) – The Availability Zone for the virtual private 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.VpnGatewayAttachment(resource_name, opts=None, vpc_id=None, vpn_gateway_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides a Virtual Private Gateway attachment resource, allowing for an existing hardware VPN gateway to be attached and/or detached from a VPC.
Note: The
ec2.VpnGatewayresource can also automatically attach the Virtual Private Gateway it creates to an existing VPC by setting thevpc_idattribute accordingly.import pulumi import pulumi_aws as aws network = aws.ec2.Vpc("network", cidr_block="10.0.0.0/16") vpn = aws.ec2.VpnGateway("vpn", tags={ "Name": "example-vpn-gateway", }) vpn_attachment = aws.ec2.VpnGatewayAttachment("vpnAttachment", vpc_id=network.id, vpn_gateway_id=vpn.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
vpc_id (pulumi.Input[str]) – The ID of the VPC.
vpn_gateway_id (pulumi.Input[str]) – The ID of the Virtual Private Gateway.
vpc_id: pulumi.Output[str] = None¶The ID of the VPC.
vpn_gateway_id: pulumi.Output[str] = None¶The ID of the Virtual Private Gateway.
- static
get(resource_name, id, opts=None, vpc_id=None, vpn_gateway_id=None)¶ Get an existing VpnGatewayAttachment 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.
vpc_id (pulumi.Input[str]) – The ID of the VPC.
vpn_gateway_id (pulumi.Input[str]) – The ID of the Virtual Private Gateway.
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.VpnGatewayRoutePropagation(resource_name, opts=None, route_table_id=None, vpn_gateway_id=None, __props__=None, __name__=None, __opts__=None)¶ Requests automatic route propagation between a VPN gateway and a route table.
Note: This resource should not be used with a route table that has the
propagating_vgwsargument set. If that argument is set, any route propagation not explicitly listed in its value will be removed.import pulumi import pulumi_aws as aws example = aws.ec2.VpnGatewayRoutePropagation("example", route_table_id=aws_route_table["example"]["id"], vpn_gateway_id=aws_vpn_gateway["example"]["id"])
- 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
ec2.RouteTableto propagate routes into.vpn_gateway_id (pulumi.Input[str]) – The id of the
ec2.VpnGatewayto propagate routes from.
route_table_id: pulumi.Output[str] = None¶The id of the
ec2.RouteTableto propagate routes into.
vpn_gateway_id: pulumi.Output[str] = None¶The id of the
ec2.VpnGatewayto propagate routes from.
- static
get(resource_name, id, opts=None, route_table_id=None, vpn_gateway_id=None)¶ Get an existing VpnGatewayRoutePropagation 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.
route_table_id (pulumi.Input[str]) – The id of the
ec2.RouteTableto propagate routes into.vpn_gateway_id (pulumi.Input[str]) – The id of the
ec2.VpnGatewayto propagate routes from.
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
pulumi_aws.ec2.get_coip_pool(filters=None, local_gateway_route_table_id=None, pool_id=None, tags=None, opts=None)¶Provides details about a specific EC2 Customer-Owned IP Pool.
This data source can prove useful when a module accepts a coip pool id as an input variable and needs to, for example, determine the CIDR block of that COIP Pool.
import pulumi import pulumi_aws as aws config = pulumi.Config() coip_pool_id = config.require_object("coipPoolId") selected = aws.ec2.get_coip_pool(id=coip_pool_id)
- Parameters
local_gateway_route_table_id (str) – Local Gateway Route Table Id assigned to desired COIP Pool
pool_id (str) – The id of the specific COIP Pool to retrieve.
tags (dict) – A mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A COIP Pool will be selected if any one of the given values matches.
pulumi_aws.ec2.get_coip_pools(filters=None, tags=None, opts=None)¶Provides information for multiple EC2 Customer-Owned IP Pools, such as their identifiers.
- Parameters
filters (list) – Custom filter block as described below.
tags (dict) – A mapping of tags, each pair of which must exactly match a pair on the desired aws_ec2_coip_pools.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A COIP Pool will be selected if any one of the given values matches.
pulumi_aws.ec2.get_customer_gateway(filters=None, id=None, tags=None, opts=None)¶Get an existing AWS Customer Gateway.
import pulumi import pulumi_aws as aws foo = aws.ec2.get_customer_gateway(filters=[{ "name": "tag:Name", "values": ["foo-prod"], }]) main = aws.ec2.VpnGateway("main", amazon_side_asn=7224, vpc_id=aws_vpc["main"]["id"]) transit = aws.ec2.VpnConnection("transit", customer_gateway_id=foo.id, static_routes_only=False, type=foo.type, vpn_gateway_id=main.id)
- Parameters
filters (list) – One or more [name-value pairs][dcg-filters] to filter by.
id (str) – The ID of the gateway.
tags (dict) – Map of key-value pairs assigned to the gateway.
The filters object supports the following:
name(str)values(list)
pulumi_aws.ec2.get_instance(filters=None, get_password_data=None, get_user_data=None, instance_id=None, instance_tags=None, tags=None, opts=None)¶Use this data source to get the ID of an Amazon EC2 Instance for use in other resources.
import pulumi import pulumi_aws as aws foo = aws.ec2.get_instance(filters=[ { "name": "image-id", "values": ["ami-xxxxxxxx"], }, { "name": "tag:Name", "values": ["instance-name-tag"], }, ], instance_id="i-instanceid")
- Parameters
filters (list) – One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out [describe-instances in the AWS CLI reference][1].
get_password_data (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_dataattribute. See GetPasswordData for more information.get_user_data (bool) – Retrieve Base64 encoded User Data contents into the
user_data_base64attribute. A SHA-1 hash of the User Data contents will always be present in theuser_dataattribute. Defaults tofalse.instance_id (str) – Specify the exact Instance ID with which to populate the data source.
instance_tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired Instance.
tags (dict) – A mapping of tags assigned to the Instance.
The filters object supports the following:
name(str)values(list)
pulumi_aws.ec2.get_instance_type_offering(filters=None, location_type=None, preferred_instance_types=None, opts=None)¶Information about single EC2 Instance Type Offering.
import pulumi import pulumi_aws as aws example = aws.ec2.get_instance_type_offering(filters=[{ "name": "instance-type", "values": [ "t1.micro", "t2.micro", "t3.micro", ], }], preferred_instance_types=[ "t3.micro", "t2.micro", "t1.micro", ])
- Parameters
filters (list) – One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.
location_type (str) – Location type. Defaults to
region. Valid values:availability-zone,availability-zone-id, andregion.preferred_instance_types (list) – Ordered list of preferred EC2 Instance Types. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned.
The filters object supports the following:
name(str) - Name of the filter. Thelocationfilter depends on the top-levellocation_typeargument and if not specified, defaults to the current region.values(list) - List of one or more values for the filter.
pulumi_aws.ec2.get_instance_type_offerings(filters=None, location_type=None, opts=None)¶Information about EC2 Instance Type Offerings.
import pulumi import pulumi_aws as aws example = aws.ec2.get_instance_type_offerings(filters=[ { "name": "instance-type", "values": [ "t2.micro", "t3.micro", ], }, { "name": "location", "values": ["usw2-az4"], }, ], location_type="availability-zone-id")
- Parameters
filters (list) –
One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.
location_type (str) – Location type. Defaults to
region. Valid values:availability-zone,availability-zone-id, andregion.
The filters object supports the following:
name(str) - Name of the filter. Thelocationfilter depends on the top-levellocation_typeargument and if not specified, defaults to the current region.values(list) - List of one or more values for the filter.
pulumi_aws.ec2.get_instances(filters=None, instance_state_names=None, instance_tags=None, opts=None)¶Use this data source to get IDs or IPs of Amazon EC2 instances to be referenced elsewhere, e.g. to allow easier migration from another management solution or to make it easier for an operator to connect through bastion host(s).
Note: It’s strongly discouraged to use this data source for querying ephemeral instances (e.g. managed via autoscaling group), as the output may change at any time and you’d need to re-run
applyevery time an instance comes up or dies.import pulumi import pulumi_aws as aws test_instances = aws.ec2.get_instances(filters=[{ "name": "instance.group-id", "values": ["sg-12345678"], }], instance_state_names=[ "running", "stopped", ], instance_tags={ "Role": "HardWorker", }) test_eip = [] for range in [{"value": i} for i in range(0, len(test_instances.ids))]: test_eip.append(aws.ec2.Eip(f"testEip-{range['value']}", instance=test_instances.ids[range["value"]]))
- Parameters
filters (list) – One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out [describe-instances in the AWS CLI reference][1].
instance_state_names (list) – A list of instance states that should be applicable to the desired instances. The permitted values are:
pending, running, shutting-down, stopped, stopping, terminated. The default value isrunning.instance_tags (dict) – A map of tags, each pair of which must exactly match a pair on desired instances.
The filters object supports the following:
name(str)values(list)
pulumi_aws.ec2.get_internet_gateway(filters=None, internet_gateway_id=None, tags=None, opts=None)¶ec2.InternetGatewayprovides details about a specific Internet Gateway.import pulumi import pulumi_aws as aws config = pulumi.Config() vpc_id = config.require_object("vpcId") default = aws.ec2.get_internet_gateway(filters=[{ "name": "attachment.vpc-id", "values": [vpc_id], }])
- Parameters
filters (list) – Custom filter block as described below.
internet_gateway_id (str) – The id of the specific Internet Gateway to retrieve.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired Internet Gateway.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. An Internet Gateway will be selected if any one of the given values matches.
pulumi_aws.ec2.get_launch_configuration(name=None, opts=None)¶Provides information about a Launch Configuration.
import pulumi import pulumi_aws as aws ubuntu = aws.ec2.get_launch_configuration(name="test-launch-config")
- Parameters
name (str) – The name of the launch configuration.
pulumi_aws.ec2.get_launch_template(filters=None, name=None, tags=None, opts=None)¶Provides information about a Launch Template.
import pulumi import pulumi_aws as aws default = aws.ec2.get_launch_template(name="my-launch-template")
import pulumi import pulumi_aws as aws test = aws.ec2.get_launch_template(filters=[{ "name": "launch-template-name", "values": ["some-template"], }])
- Parameters
filters (list) – Configuration block(s) for filtering. Detailed below.
name (str) – The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired Launch Template.
The filters object supports the following:
name(str) - The name of the filter field. Valid values can be found in the EC2 DescribeLaunchTemplates API Reference.values(list) - Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
pulumi_aws.ec2.get_local_gateway(filters=None, id=None, state=None, tags=None, opts=None)¶Provides details about an EC2 Local Gateway.
import pulumi import pulumi_aws as aws config = pulumi.Config() local_gateway_id = config.require_object("localGatewayId") selected = aws.ec2.get_local_gateway(id=local_gateway_id)
- Parameters
filters (list) – Custom filter block as described below.
id (str) – The id of the specific Local Gateway to retrieve.
state (str) – The current state of the desired Local Gateway. Can be either
"pending"or"available".tags (dict) – A mapping of tags, each pair of which must exactly match a pair on the desired Local Gateway.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A Local Gateway will be selected if any one of the given values matches.
pulumi_aws.ec2.get_local_gateway_route_table(filters=None, local_gateway_id=None, local_gateway_route_table_id=None, outpost_arn=None, state=None, tags=None, opts=None)¶Provides details about an EC2 Local Gateway Route Table.
This data source can prove useful when a module accepts a local gateway route table id as an input variable and needs to, for example, find the associated Outpost or Local Gateway.
import pulumi import pulumi_aws as aws config = pulumi.Config() aws_ec2_local_gateway_route_table = config.require_object("awsEc2LocalGatewayRouteTable") selected = aws.ec2.get_local_gateway_route_table(local_gateway_route_table_id=aws_ec2_local_gateway_route_table)
- Parameters
local_gateway_id (str) – The id of the specific local gateway route table to retrieve.
local_gateway_route_table_id (str) – Local Gateway Route Table Id assigned to desired local gateway route table
outpost_arn (str) – The arn of the Outpost the local gateway route table is associated with.
state (str) – The state of the local gateway route table.
tags (dict) – A mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A local gateway route table will be selected if any one of the given values matches.
pulumi_aws.ec2.get_local_gateway_route_tables(filters=None, tags=None, opts=None)¶Provides information for multiple EC2 Local Gateway Route Tables, such as their identifiers.
- Parameters
filters (list) – Custom filter block as described below.
tags (dict) – A mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A Local Gateway Route Table will be selected if any one of the given values matches.
pulumi_aws.ec2.get_local_gateway_virtual_interface(filters=None, id=None, tags=None, opts=None)¶Provides details about an EC2 Local Gateway Virtual Interface. More information can be found in the Outposts User Guide.
import pulumi import pulumi_aws as aws example = [aws.ec2.get_local_gateway_virtual_interface(id=__value) for __key, __value in data["aws_ec2_local_gateway_virtual_interface_group"]["example"]["local_gateway_virtual_interface_ids"]]
- Parameters
filters (list) –
One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.
id (str) – Identifier of EC2 Local Gateway Virtual Interface.
tags (dict) – Key-value map of resource tags, each pair of which must exactly match a pair on the desired local gateway route table.
The filters object supports the following:
name(str) - Name of the filter.values(list) - List of one or more values for the filter.
pulumi_aws.ec2.get_local_gateway_virtual_interface_group(filters=None, id=None, local_gateway_id=None, tags=None, opts=None)¶Provides details about an EC2 Local Gateway Virtual Interface Group. More information can be found in the Outposts User Guide.
import pulumi import pulumi_aws as aws example = aws.ec2.get_local_gateway_virtual_interface_group(local_gateway_id=data["aws_ec2_local_gateway"]["example"]["id"])
- Parameters
filters (list) –
One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.
id (str) – Identifier of EC2 Local Gateway Virtual Interface Group.
local_gateway_id (str) – Identifier of EC2 Local Gateway.
tags (dict) – Key-value map of resource tags, each pair of which must exactly match a pair on the desired local gateway route table.
The filters object supports the following:
name(str) - Name of the filter.values(list) - List of one or more values for the filter.
pulumi_aws.ec2.get_local_gateway_virtual_interface_groups(filters=None, tags=None, opts=None)¶Provides details about multiple EC2 Local Gateway Virtual Interface Groups, such as identifiers. More information can be found in the Outposts User Guide.
import pulumi import pulumi_aws as aws all = aws.ec2.get_local_gateway_virtual_interface_groups()
- Parameters
filters (list) –
One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.
tags (dict) – Key-value map of resource tags, each pair of which must exactly match a pair on the desired local gateway route table.
The filters object supports the following:
name(str) - Name of the filter.values(list) - List of one or more values for the filter.
pulumi_aws.ec2.get_local_gateways(filters=None, tags=None, opts=None)¶Provides information for multiple EC2 Local Gateways, such as their identifiers.
import pulumi import pulumi_aws as aws foo_local_gateways = aws.ec2.get_local_gateways(tags={ "service": "production", }) pulumi.export("foo", foo_local_gateways.ids)
- Parameters
filters (list) – Custom filter block as described below.
tags (dict) – A mapping of tags, each pair of which must exactly match a pair on the desired local_gateways.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A Local Gateway will be selected if any one of the given values matches.
pulumi_aws.ec2.get_nat_gateway(filters=None, id=None, state=None, subnet_id=None, tags=None, vpc_id=None, opts=None)¶Provides details about a specific Nat Gateway.
import pulumi import pulumi_aws as aws config = pulumi.Config() subnet_id = config.require_object("subnetId") default = aws.ec2.get_nat_gateway(subnet_id=aws_subnet["public"]["id"])
- Parameters
filters (list) – Custom filter block as described below.
id (str) – The id of the specific Nat Gateway to retrieve.
state (str) – The state of the NAT gateway (pending | failed | available | deleting | deleted ).
subnet_id (str) – The id of subnet that the Nat Gateway resides in.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired Nat Gateway.
vpc_id (str) – The id of the VPC that the Nat Gateway resides in.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. An Nat Gateway will be selected if any one of the given values matches.
pulumi_aws.ec2.get_network_acls(filters=None, tags=None, vpc_id=None, opts=None)¶import pulumi import pulumi_aws as aws example_network_acls = aws.ec2.get_network_acls(vpc_id=var["vpc_id"]) pulumi.export("example", example_network_acls.ids)
- Parameters
filters (list) – Custom filter block as described below.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired network ACLs.
vpc_id (str) – The VPC ID that you want to filter from.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A VPC will be selected if any one of the given values matches.
pulumi_aws.ec2.get_network_interface(filters=None, id=None, tags=None, opts=None)¶Use this data source to get information about a Network Interface.
import pulumi import pulumi_aws as aws bar = aws.ec2.get_network_interface(id="eni-01234567")
- Parameters
filters (list) – One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-network-interfaces in the AWS CLI reference.
id (str) – The identifier for the network interface.
tags (dict) – Any tags assigned to the network interface.
The filters object supports the following:
name(str)values(list)
pulumi_aws.ec2.get_network_interfaces(filters=None, tags=None, opts=None)¶import pulumi import pulumi_aws as aws example_network_interfaces = aws.ec2.get_network_interfaces() pulumi.export("example", example_network_interfaces.ids)
- Parameters
filters (list) – Custom filter block as described below.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired network interfaces.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field.
pulumi_aws.ec2.get_route(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, opts=None)¶ec2.Routeprovides details about a specific Route.This resource can prove useful when finding the resource associated with a CIDR. For example, finding the peering connection associated with a CIDR value.
import pulumi import pulumi_aws as aws config = pulumi.Config() subnet_id = config.require_object("subnetId") selected = aws.ec2.get_route_table(subnet_id=subnet_id) route = aws.ec2.get_route(destination_cidr_block="10.0.1.0/24", route_table_id=aws_route_table["selected"]["id"]) interface = aws.ec2.get_network_interface(network_interface_id=route.network_interface_id)
- Parameters
destination_cidr_block (str) – The CIDR block of the Route belonging to the Route Table.
destination_ipv6_cidr_block (str) – The IPv6 CIDR block of the Route belonging to the Route Table.
egress_only_gateway_id (str) – The Egress Only Gateway ID of the Route belonging to the Route Table.
gateway_id (str) – The Gateway ID of the Route belonging to the Route Table.
instance_id (str) – The Instance ID of the Route belonging to the Route Table.
nat_gateway_id (str) – The NAT Gateway ID of the Route belonging to the Route Table.
network_interface_id (str) – The Network Interface ID of the Route belonging to the Route Table.
route_table_id (str) – The id of the specific Route Table containing the Route entry.
transit_gateway_id (str) – The EC2 Transit Gateway ID of the Route belonging to the Route Table.
vpc_peering_connection_id (str) – The VPC Peering Connection ID of the Route belonging to the Route Table.
pulumi_aws.ec2.get_route_table(filters=None, gateway_id=None, route_table_id=None, subnet_id=None, tags=None, vpc_id=None, opts=None)¶ec2.RouteTableprovides details about a specific Route Table.This resource can prove useful when a module accepts a Subnet id as an input variable and needs to, for example, add a route in the Route Table.
import pulumi import pulumi_aws as aws config = pulumi.Config() subnet_id = config.require_object("subnetId") selected = aws.ec2.get_route_table(subnet_id=subnet_id) route = aws.ec2.Route("route", destination_cidr_block="10.0.1.0/22", route_table_id=selected.id, vpc_peering_connection_id="pcx-45ff3dc1")
- Parameters
filters (list) – Custom filter block as described below.
gateway_id (str) – The id of an Internet Gateway or Virtual Private Gateway which is connected to the Route Table (not exported if not passed as a parameter).
route_table_id (str) – The id of the specific Route Table to retrieve.
subnet_id (str) – The id of a Subnet which is connected to the Route Table (not exported if not passed as a parameter).
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired Route Table.
vpc_id (str) – The id of the VPC that the desired Route Table belongs to.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A Route Table will be selected if any one of the given values matches.
pulumi_aws.ec2.get_route_tables(filters=None, tags=None, vpc_id=None, opts=None)¶This resource can be useful for getting back a list of route table ids to be referenced elsewhere.
import pulumi import pulumi_aws as aws rts = aws.ec2.get_route_tables(filters=[{ "name": "tag:kubernetes.io/kops/role", "values": ["private*"], }], vpc_id=var["vpc_id"]) route = [] for range in [{"value": i} for i in range(0, len(rts.ids))]: route.append(aws.ec2.Route(f"route-{range['value']}", destination_cidr_block="10.0.1.0/22", route_table_id=rts.ids[range["value"]], vpc_peering_connection_id="pcx-0e9a7a9ecd137dc54"))
- Parameters
filters (list) – Custom filter block as described below.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired route tables.
vpc_id (str) – The VPC ID that you want to filter from.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A Route Table will be selected if any one of the given values matches.
pulumi_aws.ec2.get_security_group(filters=None, id=None, name=None, tags=None, vpc_id=None, opts=None)¶ec2.SecurityGroupprovides details about a specific Security Group.This resource can prove useful when a module accepts a Security Group id as an input variable and needs to, for example, determine the id of the VPC that the security group belongs to.
import pulumi import pulumi_aws as aws config = pulumi.Config() security_group_id = config.require_object("securityGroupId") selected = aws.ec2.get_security_group(id=security_group_id) subnet = aws.ec2.Subnet("subnet", cidr_block="10.0.1.0/24", vpc_id=selected.vpc_id)
- Parameters
filters (list) – Custom filter block as described below.
id (str) – The id of the specific security group to retrieve.
name (str) –
The name of the field to filter by, as defined by the underlying AWS API.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired security group.
vpc_id (str) – The id of the VPC that the desired security group belongs to.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A Security Group will be selected if any one of the given values matches.
pulumi_aws.ec2.get_security_groups(filters=None, tags=None, opts=None)¶Use this data source to get IDs and VPC membership of Security Groups that are created outside of this provider.
import pulumi import pulumi_aws as aws test = aws.ec2.get_security_groups(tags={ "Application": "k8s", "Environment": "dev", })
- Parameters
filters (list) – One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out [describe-security-groups in the AWS CLI reference][1].
tags (dict) – A map of tags, each pair of which must exactly match for desired security groups.
The filters object supports the following:
name(str)values(list)
pulumi_aws.ec2.get_subnet(availability_zone=None, availability_zone_id=None, cidr_block=None, default_for_az=None, filters=None, id=None, ipv6_cidr_block=None, state=None, tags=None, vpc_id=None, opts=None)¶ec2.Subnetprovides details about a specific VPC subnet.This resource can prove useful when a module accepts a subnet id as an input variable and needs to, for example, determine the id of the VPC that the subnet belongs to.
import pulumi import pulumi_aws as aws config = pulumi.Config() subnet_id = config.require_object("subnetId") selected = aws.ec2.get_subnet(id=subnet_id) subnet = aws.ec2.SecurityGroup("subnet", ingress=[{ "cidr_blocks": [selected.cidr_block], "from_port": 80, "protocol": "tcp", "to_port": 80, }], vpc_id=selected.vpc_id)
- Parameters
availability_zone (str) – The availability zone where the subnet must reside.
availability_zone_id (str) – The ID of the Availability Zone for the subnet.
cidr_block (str) – The cidr block of the desired subnet.
default_for_az (bool) – Boolean constraint for whether the desired subnet must be the default subnet for its associated availability zone.
filters (list) – Custom filter block as described below.
id (str) – The id of the specific subnet to retrieve.
ipv6_cidr_block (str) – The Ipv6 cidr block of the desired subnet
state (str) – The state that the desired subnet must have.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired subnet.
vpc_id (str) – The id of the VPC that the desired subnet belongs to.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API. For example, if matching against tagName, use:values(list) - Set of values that are accepted for the given field. A subnet will be selected if any one of the given values matches.
pulumi_aws.ec2.get_subnet_ids(filters=None, tags=None, vpc_id=None, opts=None)¶ec2.getSubnetIdsprovides a set of ids for a vpc_idThis resource can be useful for getting back a set of subnet ids for a vpc.
import pulumi import pulumi_aws as aws example_subnet_ids = aws.ec2.get_subnet_ids(vpc_id=var["vpc_id"]) example_subnet = [aws.ec2.get_subnet(id=__value) for __key, __value in example_subnet_ids.ids] pulumi.export("subnetCidrBlocks", [s.cidr_block for s in example_subnet])
- Parameters
filters (list) – Custom filter block as described below.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired subnets.
vpc_id (str) – The VPC ID that you want to filter from.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API. For example, if matching against tagName, use:values(list) - Set of values that are accepted for the given field. Subnet IDs will be selected if any one of the given values match.
pulumi_aws.ec2.get_vpc(cidr_block=None, default=None, dhcp_options_id=None, filters=None, id=None, state=None, tags=None, opts=None)¶ec2.Vpcprovides details about a specific VPC.This resource can prove useful when a module accepts a vpc id as an input variable and needs to, for example, determine the CIDR block of that VPC.
- Parameters
cidr_block (str) – The cidr block of the desired VPC.
default (bool) – Boolean constraint on whether the desired VPC is the default VPC for the region.
dhcp_options_id (str) – The DHCP options id of the desired VPC.
filters (list) – Custom filter block as described below.
id (str) – The id of the specific VPC to retrieve.
state (str) – The current state of the desired VPC. Can be either
"pending"or"available".tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired VPC.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A VPC will be selected if any one of the given values matches.
pulumi_aws.ec2.get_vpc_dhcp_options(dhcp_options_id=None, filters=None, tags=None, opts=None)¶Retrieve information about an EC2 DHCP Options configuration.
import pulumi import pulumi_aws as aws example = aws.ec2.get_vpc_dhcp_options(dhcp_options_id="dopts-12345678")
import pulumi import pulumi_aws as aws example = aws.ec2.get_vpc_dhcp_options(filters=[ { "name": "key", "values": ["domain-name"], }, { "name": "value", "values": ["example.com"], }, ])
- Parameters
dhcp_options_id (str) – The EC2 DHCP Options ID.
filters (list) – List of custom filters as described below.
tags (dict) – A map of tags assigned to the resource.
The filters object supports the following:
name(str) - The name of the field to filter.values(list) - Set of values for filtering.
pulumi_aws.ec2.get_vpc_endpoint(filters=None, id=None, service_name=None, state=None, tags=None, vpc_id=None, opts=None)¶The VPC Endpoint data source provides details about a specific VPC endpoint.
import pulumi import pulumi_aws as aws s3 = aws.ec2.get_vpc_endpoint(service_name="com.amazonaws.us-west-2.s3", vpc_id=aws_vpc["foo"]["id"]) private_s3 = aws.ec2.VpcEndpointRouteTableAssociation("privateS3", route_table_id=aws_route_table["private"]["id"], vpc_endpoint_id=s3.id)
- Parameters
filters (list) – Custom filter block as described below.
id (str) – The ID of the specific VPC Endpoint to retrieve.
service_name (str) – The service name of the specific VPC Endpoint to retrieve. For AWS services the service name is usually in the form
com.amazonaws.<region>.<service>(the SageMaker Notebook service is an exception to this rule, the service name is in the formaws.sagemaker.<region>.notebook).state (str) – The state of the specific VPC Endpoint to retrieve.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the specific VPC Endpoint to retrieve.
vpc_id (str) – The ID of the VPC in which the specific VPC Endpoint is used.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A VPC Endpoint will be selected if any one of the given values matches.
pulumi_aws.ec2.get_vpc_endpoint_service(filters=None, service=None, service_name=None, tags=None, opts=None)¶The VPC Endpoint Service data source details about a specific service that can be specified when creating a VPC endpoint within the region configured in the provider.
import pulumi import pulumi_aws as aws s3 = aws.ec2.get_vpc_endpoint_service(service="s3") # Create a VPC foo = aws.ec2.Vpc("foo", cidr_block="10.0.0.0/16") # Create a VPC endpoint ep = aws.ec2.VpcEndpoint("ep", service_name=s3.service_name, vpc_id=foo.id)
import pulumi import pulumi_aws as aws custome = aws.ec2.get_vpc_endpoint_service(service_name="com.amazonaws.vpce.us-west-2.vpce-svc-0e87519c997c63cd8")
import pulumi import pulumi_aws as aws test = aws.ec2.get_vpc_endpoint_service(filters=[{ "name": "service-name", "values": ["some-service"], }])
- Parameters
filters (list) – Configuration block(s) for filtering. Detailed below.
service (str) – The common name of an AWS service (e.g.
s3).service_name (str) – The service name that is specified when creating a VPC endpoint. For AWS services the service name is usually in the form
com.amazonaws.<region>.<service>(the SageMaker Notebook service is an exception to this rule, the service name is in the formaws.sagemaker.<region>.notebook).tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired VPC Endpoint Service.
The filters object supports the following:
name(str) - The name of the filter field. Valid values can be found in the EC2 DescribeVpcEndpointServices API Reference.values(list) - Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
pulumi_aws.ec2.get_vpc_peering_connection(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, status=None, tags=None, vpc_id=None, opts=None)¶The VPC Peering Connection data source provides details about a specific VPC peering connection.
import pulumi import pulumi_aws as aws pc = aws.ec2.get_vpc_peering_connection(peer_cidr_block="10.0.1.0/22", vpc_id=aws_vpc["foo"]["id"]) # Create a route table rt = aws.ec2.RouteTable("rt", vpc_id=aws_vpc["foo"]["id"]) # Create a route route = aws.ec2.Route("route", destination_cidr_block=pc.peer_cidr_block, route_table_id=rt.id, vpc_peering_connection_id=pc.id)
- Parameters
cidr_block (str) – The CIDR block of the requester VPC of the specific VPC Peering Connection to retrieve.
filters (list) – Custom filter block as described below.
id (str) – The ID of the specific VPC Peering Connection to retrieve.
owner_id (str) – The AWS account ID of the owner of the requester VPC of the specific VPC Peering Connection to retrieve.
peer_cidr_block (str) – The CIDR block of the accepter VPC of the specific VPC Peering Connection to retrieve.
peer_owner_id (str) – The AWS account ID of the owner of the accepter VPC of the specific VPC Peering Connection to retrieve.
peer_region (str) – The region of the accepter VPC of the specific VPC Peering Connection to retrieve.
peer_vpc_id (str) – The ID of the accepter VPC of the specific VPC Peering Connection to retrieve.
region (str) – The region of the requester VPC of the specific VPC Peering Connection to retrieve.
status (str) – The status of the specific VPC Peering Connection to retrieve.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired VPC Peering Connection.
vpc_id (str) – The ID of the requester VPC of the specific VPC Peering Connection to retrieve.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A VPC Peering Connection will be selected if any one of the given values matches.
pulumi_aws.ec2.get_vpcs(filters=None, tags=None, opts=None)¶This resource can be useful for getting back a list of VPC Ids for a region.
The following example retrieves a list of VPC Ids with a custom tag of
serviceset to a value of “production”.import pulumi import pulumi_aws as aws foo_vpcs = aws.ec2.get_vpcs(tags={ "service": "production", }) pulumi.export("foo", foo_vpcs.ids)
- Parameters
filters (list) – Custom filter block as described below.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired vpcs.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A VPC will be selected if any one of the given values matches.
pulumi_aws.ec2.get_vpn_gateway(amazon_side_asn=None, attached_vpc_id=None, availability_zone=None, filters=None, id=None, state=None, tags=None, opts=None)¶The VPN Gateway data source provides details about a specific VPN gateway.
import pulumi import pulumi_aws as aws selected = aws.ec2.get_vpn_gateway(filters=[{ "name": "tag:Name", "values": ["vpn-gw"], }]) pulumi.export("vpnGatewayId", selected.id)
- Parameters
amazon_side_asn (str) – The Autonomous System Number (ASN) for the Amazon side of the specific VPN Gateway to retrieve.
attached_vpc_id (str) – The ID of a VPC attached to the specific VPN Gateway to retrieve.
availability_zone (str) – The Availability Zone of the specific VPN Gateway to retrieve.
filters (list) – Custom filter block as described below.
id (str) – The ID of the specific VPN Gateway to retrieve.
state (str) – The state of the specific VPN Gateway to retrieve.
tags (dict) – A map of tags, each pair of which must exactly match a pair on the desired VPN Gateway.
The filters object supports the following:
name(str) - The name of the field to filter by, as defined by the underlying AWS API.values(list) - Set of values that are accepted for the given field. A VPN Gateway will be selected if any one of the given values matches.