Home > Software design >  How to power on AWS instance with Terraform
How to power on AWS instance with Terraform

Time:11-16

Sorry I am very new to Terraform.

I create AWS instance with Terraform successfully. Then I power off the instance in AWS web management console.

How to power on the instance with Terraform?

CodePudding user response:

You would have to use local-exec to run AWS CLI's start-instances.

CodePudding user response:

You can use the instance_type value of aws_instance terraform resource.

instance_type : (Optional) The instance type to use for the instance.  
Updates to this field will trigger a stop/start of the EC2 instance.
  • Related