using_terraform
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
using_terraform [2017/08/05 11:47] – [Terraform Apply] walkeradmin | using_terraform [2017/08/05 13:56] – [Terraform Apply] walkeradmin | ||
---|---|---|---|
Line 85: | Line 85: | ||
\\ | \\ | ||
\\ | \\ | ||
- | {{ : | + | {{ : |
\\ | \\ | ||
- | In the above example we can see that there is nothing | + | In the above example we can see that there is no EC2 Instance |
- | \\\ | + | |
\\ | \\ | ||
+ | \\ | ||
+ | If we select Running Instances, then this will be empty (unless you have manually created some.) | ||
+ | \\ | ||
+ | \\ | ||
+ | {{ : | ||
+ | \\ | ||
+ | Now we can run our Terraform Script. | ||
+ | \\ | ||
+ | \\ | ||
+ | In the command window where you ran Terraform Plan, you can now use: | ||
+ | \\ | ||
+ | terraform.exe apply | ||
+ | \\ | ||
+ | If you don't have any errors, then you will see an output similar to below: | ||
+ | \\ | ||
+ | < | ||
+ | aws_instance.example: | ||
+ | ami: "" | ||
+ | associate_public_ip_address: | ||
+ | availability_zone: | ||
+ | ebs_block_device.#: | ||
+ | ephemeral_block_device.#: | ||
+ | instance_state: | ||
+ | instance_type: | ||
+ | ipv6_address_count: | ||
+ | ipv6_addresses.#: | ||
+ | key_name: | ||
+ | network_interface.#: | ||
+ | network_interface_id: | ||
+ | placement_group: | ||
+ | primary_network_interface_id: | ||
+ | private_dns: | ||
+ | private_ip: | ||
+ | public_dns: | ||
+ | public_ip: | ||
+ | root_block_device.#: | ||
+ | security_groups.#: | ||
+ | security_groups.2525401260: | ||
+ | source_dest_check: | ||
+ | subnet_id: | ||
+ | tags.%: | ||
+ | tags.Name: | ||
+ | tenancy: | ||
+ | volume_tags.%: | ||
+ | vpc_security_group_ids.#: | ||
+ | aws_instance.example: | ||
+ | aws_instance.example: | ||
+ | aws_instance.example: | ||
+ | |||
+ | Apply complete! Resources: 1 added, 0 changed, 0 destroyed. | ||
+ | |||
+ | The state of your infrastructure has been saved to the path | ||
+ | below. This state is required to modify and destroy your | ||
+ | infrastructure, | ||
+ | use the `terraform show` command. | ||
+ | |||
+ | State path: | ||
+ | </ | ||
+ | \\ | ||
+ | Now we can check the Running Instances page again. | ||
+ | \\ | ||
+ | \\ | ||
+ | Initially you will see a status of ' | ||
+ | \\ | ||
+ | \\ | ||
+ | {{ : | ||
+ | \\ | ||
+ | We can see the following information has been populated according to our Script: | ||
+ | \\ | ||
+ | * Name: | ||
+ | * Instance Type | ||
+ | * Availability Zone: eu-west-2a (yes we only specify eu-west-2, the a/b/c suffix is automatic) | ||
+ | * Key-Name | ||
+ | \\ | ||
+ | The EC2 Instance is now running and using your key-pair and SSH you should be able to login and start using your virtual machine. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | ==== Terraform ==== | ||
using_terraform.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1