简体   繁体   中英

How to link a ECS Cluster with an ECS instance in Terraform?

I have created a task definition, an ECS Service and an ECS Cluster but I'm facing trouble registering an ECS Instance in Terraform with the ECS Cluster.How to link an ECS Cluster with an ECS Instance using Terraform?

If you use an ECS Capacity Provider it would manage this for you.

If you are creating the EC2 instances yourself, you need to provide the cluster ID to the ECS agent running on the instance. When the ECS agent stars up it will then register itself with the cluster. See this answer for the details of configuring the ECS agent on instance launch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM