【发布时间】:2020-06-17 15:04:50
【问题描述】:
创建了一个简单的 Azure devops 发布管道来预配资源组。在本地使用远程状态文件测试 terraform 脚本并将代码签入到 git。这是代码的组织方式: IAC(根文件夹) /bin/terraform.exe main.tf(这具有远程状态的 terraform 配置)
创建了一个发布管道,以代码形式指向此存储库。管道为工件提供别名 _IAC
在管道中,我有使用服务主体登录到 azure 的 powershell 活动
然后是以下行:
$(System.DefaultWorkingDirectory)/_IAC/bin/terraform init
这个命令执行了,但是说没有 terraform 配置文件。
2020-03-05T02:23:04.4536130Z [0m[1mTerraform initialized in an empty directory![0m
2020-03-05T02:23:04.4536786Z
2020-03-05T02:23:04.4556953Z The directory has no Terraform configuration files. You may begin working
2020-03-05T02:23:04.4559693Z with Terraform immediately by creating Terraform configuration files.[0m
【问题讨论】:
标签: terraform azure-pipelines-release-pipeline