Editing Terraform apply: ec2 instance example (aws instance module)
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://github.com/terraform-aws-modules/terraform-aws-ec2-instance/tree/master/examples/basic | https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/tree/master/examples/basic | ||
− | + | == [[Region]] missing == | |
− | + | terraform apply | |
+ | ╷ | ||
+ | │ Error: Missing required argument | ||
+ | │ | ||
+ | │ The argument "region" is required, but was not set. | ||
+ | ╵ | ||
− | + | == With errors == | |
− | |||
− | + | *<code>[[terraform]] apply</code> | |
<pre> | <pre> | ||
− | + | Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the | |
− | + | following symbols: | |
− | Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with | ||
− | |||
+ create | + create | ||
Terraform will perform the following actions: | Terraform will perform the following actions: | ||
− | # aws_instance. | + | # module.ec2_cluster.aws_instance.this[0] will be created |
− | + resource "aws_instance" " | + | + resource "aws_instance" "this" { |
− | + ami = "ami- | + | + ami = "ami-ebd02392" |
+ arn = (known after apply) | + arn = (known after apply) | ||
+ associate_public_ip_address = (known after apply) | + associate_public_ip_address = (known after apply) | ||
Line 25: | Line 27: | ||
+ cpu_core_count = (known after apply) | + cpu_core_count = (known after apply) | ||
+ cpu_threads_per_core = (known after apply) | + cpu_threads_per_core = (known after apply) | ||
− | + disable_api_termination = | + | + disable_api_termination = false |
− | + ebs_optimized = | + | + ebs_optimized = false |
+ get_password_data = false | + get_password_data = false | ||
+ host_id = (known after apply) | + host_id = (known after apply) | ||
Line 35: | Line 37: | ||
+ ipv6_address_count = (known after apply) | + ipv6_address_count = (known after apply) | ||
+ ipv6_addresses = (known after apply) | + ipv6_addresses = (known after apply) | ||
− | + key_name = | + | + key_name = "user1" |
− | + monitoring = | + | + monitoring = false |
+ outpost_arn = (known after apply) | + outpost_arn = (known after apply) | ||
+ password_data = (known after apply) | + password_data = (known after apply) | ||
Line 48: | Line 50: | ||
+ security_groups = (known after apply) | + security_groups = (known after apply) | ||
+ source_dest_check = true | + source_dest_check = true | ||
− | + subnet_id = | + | + subnet_id = "subnet-eddcdzz4" |
+ tags = { | + tags = { | ||
− | + "Name" = " | + | + "Environment" = "dev" |
+ | + "Name" = "my-instance" | ||
+ | + "Terraform" = "true" | ||
} | } | ||
+ tags_all = { | + tags_all = { | ||
− | + "Name" = " | + | + "Environment" = "dev" |
+ | + "Name" = "my-instance" | ||
+ | + "Terraform" = "true" | ||
} | } | ||
− | + tenancy = | + | + tenancy = "default" |
+ user_data = (known after apply) | + user_data = (known after apply) | ||
+ user_data_base64 = (known after apply) | + user_data_base64 = (known after apply) | ||
− | + vpc_security_group_ids = | + | + volume_tags = { |
+ | + "Name" = "my-instance" | ||
+ | } | ||
+ | + vpc_security_group_ids = [ | ||
+ | + "sg-12345678", | ||
+ | ] | ||
+ capacity_reservation_specification { | + capacity_reservation_specification { | ||
Line 66: | Line 77: | ||
+ capacity_reservation_id = (known after apply) | + capacity_reservation_id = (known after apply) | ||
} | } | ||
+ | } | ||
+ | |||
+ | + credit_specification { | ||
+ | + cpu_credits = "standard" | ||
} | } | ||
Line 125: | Line 140: | ||
Enter a value: yes | Enter a value: yes | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
− | + | ||
− | + | module.ec2_cluster.aws_instance.this[0]: Creating... | |
− | + | ╷ | |
− | + | │ Error: Error launching source instance: InvalidAMIID.NotFound: The image id '[ami-ebd02392]' does not exist | |
− | + | │ status code: 400, request id: 3875ad13-7a52-4026-8cca-6f6bbf1133d9 | |
− | + | │ | |
− | + | │ with module.ec2_cluster.aws_instance.this[0], | |
+ | │ on .terraform/modules/ec2_cluster/main.tf line 5, in resource "aws_instance" "this": | ||
+ | │ 5: resource "aws_instance" "this" { | ||
+ | │ | ||
+ | ╵ | ||
== See also == | == See also == | ||
− | + | * {{terraform cmd}} | |
− | * {{terraform | ||
− | |||
[[Category:Terraform]] | [[Category:Terraform]] |
Advertising: