[英]Terraform, Archive failed due to missing directory
I have been working on Terraform using AzureDevOps before that I developed tf files using VS code and everything worked fine when try to move files from VS code to Azure DevOps , getting issue on Archive source file path it unable to find the directory, searched every where but unable to resolve this,我一直在使用 AzureDevOps 开发 Terraform 之前,我使用 VS 代码开发了 tf 文件,当尝试将文件从 VS 代码移动到 Azure DevOps 时一切正常,在存档源文件路径上遇到问题,它无法找到目录,到处搜索但无法解决这个问题,
Path which was working fine on VS code was “…/Folder name” using same path in Azure DevOps as I have upload completed folder that I have build in VS code but it always get failed when try to archive files as it un-able to find the directory.在 VS 代码上运行良好的路径是“.../文件夹名称”,在 Azure DevOps 中使用相同的路径,因为我已经上传了我在 VS 代码中构建的完整文件夹,但是当尝试存档文件时它总是失败,因为它无法找到目录。
[Code Block DevOps] [代码块 DevOps]
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
# Root module should specify the maximum provider version
# The ~> operator is a convenient shorthand for allowing only patch releases within a specific minor release.
version = "~>2.11"
}
}
}
provider "azurerm" {
features {}
#skip_provider_registration = true
}
locals {
location = "uksouth"
}
data "archive_file" "file_function_app" {
type = "zip"
source_dir = "../BlobToBlobTransferPackage"
output_path = "blobtoblobtransfer-app.zip"
}
module "windows_consumption" {
source = "./modules/fa"
archive_file = data.archive_file.file_function_app
}
output "windows_consumption_hostname" {
value = module.windows_consumption.function_app_default_hostname
}
Image of VS Code where everything is working fine:一切正常的 VS Code 的图像:
Image of DevOps where getting Missing Directory Error:
出现缺少目录错误的 DevOps 图像:
Folder Structure that is working fine with VS code适用于 VS 代码的文件夹结构
这是由于现在固定的路径,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.