Я новичок в Terraform и учусь сейчас.Я создал экземпляр aws, используя работающий код terraform (у меня есть тестовая среда).Я уничтожил тот же экземпляр, используя "terraform destroy
", и все прошло успешно.Теперь, когда я пытаюсь создать новый экземпляр, "terraform plan
" показывает 2 ресурса, которые будут добавлены вместо 1. Ниже приведен вывод моего плана.
C:\terraform>terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
+ aws_instance.example
id: <computed>
ami: "ami-051f75c651d856381"
arn: <computed>
associate_public_ip_address: <computed>
availability_zone: <computed>
cpu_core_count: <computed>
cpu_threads_per_core: <computed>
ebs_block_device.#: <computed>
ephemeral_block_device.#: <computed>
get_password_data: "false"
host_id: <computed>
instance_state: <computed>
instance_type: "t2.micro"
ipv6_address_count: <computed>
ipv6_addresses.#: <computed>
key_name: <computed>
network_interface.#: <computed>
network_interface_id: <computed>
password_data: <computed>
placement_group: <computed>
primary_network_interface_id: <computed>
private_dns: <computed>
private_ip: <computed>
public_dns: <computed>
public_ip: <computed>
root_block_device.#: <computed>
security_groups.#: <computed>
source_dest_check: "true"
subnet_id: <computed>
tenancy: <computed>
volume_tags.%: <computed>
vpc_security_group_ids.#: <computed>
+ aws_key_pair.deployer
id: <computed>
fingerprint: <computed>
key_name: "key-pair"
public_key: "XXX"
Plan: 2 to add, 0 to change, 0 to destroy.