A
A
Asya2020-09-16 17:54:55
Amazon Web Services
Asya, 2020-09-16 17:54:55

How to restart a machine using terraform?

to such a request

aws ec2 stop-instances --region eu-west-2 --instance-ids i-0мой_айди


get
An error occurred (InvalidInstanceID.NotFound) when calling the TerminateInstances operation: The instance ID 'i-0мой_айди' does not exist


but i-0my_id i get from terraform.tfstate it exists

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2020-09-16
@inoise

it can be anything - wrong region, wrong account, instances have changed since the last state due to scaling, whatever. It is necessary to check either from the cli or from the aws console what is actually happening there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question