使用 terraform -out 参数
use of terraform -out parameter
在 运行 一个 terraform 计划之后
Note: You didn't specify an "-out" parameter to save this plan, so
Terraform can't guarantee that exactly these actions will be performed
if "terraform apply" is subsequently run.
-out 是什么意思,我应该如何以及为什么要在 Azure DevOps 管道中使用它。
它的意思是 - 将输出保存到一个文件中(如果您愿意,以后可以使用 terraform apply
重用该文件)。您根本不必在管道中使用它。其实既然是pipeline,我觉得它没有任何优点,因为在pipeline中,你可以确定plan和apply是运行针对同一个代码[=11] =]
-out
将为您创建一个包含计划的文件。您可以将其作为管道工件推送,然后在部署作业中使用它。如果你这样做,你将在你的环境中添加手动批准,你可以要求在那里审查该计划,然后再将其应用于你的环境。生产部署在应用更改之前关注这一点是有意义的。
Here 您已经展示了发布的概念。但是您可以使用多阶段 yaml 管道执行相同的操作。
在 运行 一个 terraform 计划之后
Note: You didn't specify an "-out" parameter to save this plan, so Terraform can't guarantee that exactly these actions will be performed if "terraform apply" is subsequently run.
-out 是什么意思,我应该如何以及为什么要在 Azure DevOps 管道中使用它。
它的意思是 - 将输出保存到一个文件中(如果您愿意,以后可以使用 terraform apply
重用该文件)。您根本不必在管道中使用它。其实既然是pipeline,我觉得它没有任何优点,因为在pipeline中,你可以确定plan和apply是运行针对同一个代码[=11] =]
-out
将为您创建一个包含计划的文件。您可以将其作为管道工件推送,然后在部署作业中使用它。如果你这样做,你将在你的环境中添加手动批准,你可以要求在那里审查该计划,然后再将其应用于你的环境。生产部署在应用更改之前关注这一点是有意义的。
Here 您已经展示了发布的概念。但是您可以使用多阶段 yaml 管道执行相同的操作。