-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
沒問題,請接受這個答案,如果它幫助你。 –