-1
运行terraform和等待需要很长时间。 所以我想运行它来排除需要最长时间执行的rds 或者我想只运行ec2资源。 有没有办法在terraform中做这样的事情?我想运行Terraform排除特定资源
运行terraform和等待需要很长时间。 所以我想运行它来排除需要最长时间执行的rds 或者我想只运行ec2资源。 有没有办法在terraform中做这样的事情?我想运行Terraform排除特定资源
您可以使用-target=resource
这样的:
terraform plan -target=module.mymodule.aws_instance.myinstance
terraform apply -target=module.mymodule.aws_instance.myinstance
或
terraform plan -target=aws_instance.myinstance
terraform apply -target=aws_instance.myinstance
谢谢你的评论。我解决了它使用-target选项,你教我 – sukho
没问题,请接受这个答案,如果它帮助你。 –