A startup uses Terraform to manage their cloud infrastructure. They have a single configuration file that defines an AWS EC2 instance. They want to add an Elastic IP (EIP) and associate it with the instance. The engineer modifies the configuration to add an `aws_eip` resource and references the instance ID. They run `terraform plan` and it shows that the EIP will be created. However, when they run `terraform apply`, they get an error: "Error: Error associating EIP: ... The instance ID 'i-1234567890abcdef0' does not exist." The instance was created successfully in a previous apply. What is the most likely cause?
state loss means Terraform doesn't know about the instance
Why this answer
Option B is correct because if the state was lost or corrupted, Terraform would think the instance needs to be created, but the error indicates the ID doesn't exist, which could happen if the state doesn't match reality. Option A is wrong because the instance exists. Option C is wrong because the configuration references the instance ID from the resource attribute.
Option D is wrong because the instance type is not changed.