Terraform apply special resource

2022-11-29  本文已影响0人  Anoyi

You can use Terraform's -target option to target specific resources, modules, or collections of resources. In this tutorial, you will provision an S3 bucket with some objects in it, then apply changes incrementally with -target.

For example:

terraform plan -target="random_pet.bucket_name"

terraform apply -target="random_pet.bucket_name"

terraform apply -target="aws_s3_object.objects[2]" -target="aws_s3_object.objects[3]"
上一篇 下一篇

猜你喜欢

热点阅读