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]] = "[[ | + | [[instance_type]] = "[[t2.micro]]" |
− | + | tags = { | |
− | + | Name = "your_name_here" | |
} | } | ||
} | } | ||
See also: [[AWS instance example with aws_ami lookup]] | 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>[[data.]][[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]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | * [[ | ||
== aws_instance arguments == | == aws_instance arguments == | ||
Line 82: | Line 34: | ||
* <code>[[monitoring]]</code> | * <code>[[monitoring]]</code> | ||
* <code>[[associate_public_ip_address]]</code> | * <code>[[associate_public_ip_address]]</code> | ||
+ | * <code>[[tenancy]]</code> | ||
* <code>[[subnet_id]], [[public_ip]]</code> | * <code>[[subnet_id]], [[public_ip]]</code> | ||
− | * <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 100: | Line 52: | ||
* [[Terraform: Data sources]] | * [[Terraform: Data sources]] | ||
* <code>[[Terraform: VPCIdNotSpecified]]</code> | * <code>[[Terraform: VPCIdNotSpecified]]</code> | ||
− | * | + | * [[Terraform module: ec2-instance]] |
* [[Terraform resource]]: <code>[[Terraform resource: aws volume attachment|aws_volume_attachment]]</code> | * [[Terraform resource]]: <code>[[Terraform resource: aws volume attachment|aws_volume_attachment]]</code> | ||
* [[volume_size]] | * [[volume_size]] | ||
* <code>[[ebs_block_device]]</code> resource argument | * <code>[[ebs_block_device]]</code> resource argument | ||
* <code>[[aws_eip]]</code> | * <code>[[aws_eip]]</code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
* {{aws_instance}} | * {{aws_instance}} | ||
+ | * {{tf ec2}} | ||
+ | * {{terraform aws resources}} | ||
[[Category:Terraform]] | [[Category:Terraform]] |
Advertising: