Editing Terraform resource: aws instance
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance | |
− | == | + | == Basic example == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[resource]] "[[aws_instance]]" "MYexample" { | [[resource]] "[[aws_instance]]" "MYexample" { | ||
[[ami]] = "[[ami-08d70e59c07c61a3a]]" | [[ami]] = "[[ami-08d70e59c07c61a3a]]" | ||
− | + | [[instance_type]] = "[[t2.micro]]" | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[instance_type]] = "[[t2.micro]]" | ||
− | |||
− | |||
tags = { | tags = { | ||
Line 39: | Line 11: | ||
} | } | ||
} | } | ||
+ | |||
+ | See also: [[AWS instance example with aws_ami lookup]] | ||
Line 46: | Line 20: | ||
} | } | ||
+ | == [[Terraform examples|Examples]] == | ||
+ | * [[AWS instance example with aws_ami lookup and key_name]]: <code>[[aws_instance]]</code>, <code>[[aws_ami]]</code> | ||
+ | * [[AWS instance example with aws_ami lookup]]: <code>[[aws instance]]</code>, <code>[[aws_ami]]</code> | ||
+ | * [[AWS instance example: main.tf]]: <code>[[aws instance]]</code> | ||
+ | * [[AWS instance example creating VPC]] | ||
− | + | == Arguments == | |
− | + | * <code>[[ami]]</code> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | ||
− | * <code>[[ | ||
* <code>[[instance_type]]</code> | * <code>[[instance_type]]</code> | ||
* <code>[[key_name]]</code> <ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#key_name</ref> | * <code>[[key_name]]</code> <ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#key_name</ref> | ||
Line 82: | Line 34: | ||
* <code>[[monitoring]]</code> | * <code>[[monitoring]]</code> | ||
* <code>[[associate_public_ip_address]]</code> | * <code>[[associate_public_ip_address]]</code> | ||
− | * <code>[[ | + | * <code>[[tenancy]]</code> |
− | * <code>[[ | + | * <code>[[subnet_id]]</code> |
+ | * <code>[[public_ip]]</code> | ||
+ | * <code>[[vpc_security_group_ids]]</code>: (Optional, [[list]]) https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#vpc_security_group_ids | ||
* <code>[[root_block_device]]</code> | * <code>[[root_block_device]]</code> | ||
* <code>[[iops]]</code> | * <code>[[iops]]</code> | ||
− | * <code>[[iam_instance_profile]]</code> | + | * <code>[[iam_instance_profile]]</code> |
* <code>[[user_data]]</code> | * <code>[[user_data]]</code> | ||
* <code>[[credit_specification]]</code> | * <code>[[credit_specification]]</code> | ||
* <code>[[lifecycle]]</code> | * <code>[[lifecycle]]</code> | ||
− | * <code>[[ | + | * <code>[[vpc_security_group_ids]]</code> |
− | |||
== Related terms == | == Related terms == | ||
Line 97: | Line 50: | ||
* <code>[[aws ec2 run-instances]]</code> | * <code>[[aws ec2 run-instances]]</code> | ||
* <code>[[aws ec2 describe-key-pairs]]</code> | * <code>[[aws ec2 describe-key-pairs]]</code> | ||
+ | * [[Terraform examples]] | ||
* <code>[[source (Terraform modules)]]</code> | * <code>[[source (Terraform modules)]]</code> | ||
* [[Terraform: Data sources]] | * [[Terraform: Data sources]] | ||
* <code>[[Terraform: VPCIdNotSpecified]]</code> | * <code>[[Terraform: VPCIdNotSpecified]]</code> | ||
− | * | + | * [[Terraform module: ec2-instance]] |
− | + | * <code>[[aws_volume_attachment]]</code> | |
− | + | * [[Terraform resource: aws volume attachment]] | |
* <code>[[ebs_block_device]]</code> resource argument | * <code>[[ebs_block_device]]</code> resource argument | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
* {{aws_instance}} | * {{aws_instance}} | ||
+ | * {{tf ec2}} | ||
+ | * {{terraform aws resources}} | ||
[[Category:Terraform]] | [[Category:Terraform]] |
Advertising: