Closed fasongan closed 1 year ago
Thanks for reporting, we'll dig into this
Please provide more information, like: Are you using classic or yaml pipelines? if you are using classic please provide som screenshots of your pipeline. if you are using YAML pipelines please provide the yaml code. Where does the error appear? like during init, plan, ETC Which version of the task are you using?
Im using yaml pipeline
my error occurs during the terraform plan by running this terragrunt file
locals { project_id = read_terragrunt_config(find_in_parent_folders( "project.hcl"))["locals"]["project_id"] customer = read_terragrunt_config(find_in_parent_folders( "customer.hcl"))["locals"]["customer"] azure_repo_name = read_terragrunt_config(find_in_parent_folders( "naming.hcl"))["locals"]["azure_repo_name"] }
terraform { source = "git::ssh:// @.***/v3/WinshuttleEngineering/Hosted%20Multi-Tenant/mtsm-infrastructure.git//source-control/azure-repo?ref=feature/mtsm-management " }
include { path = find_in_parent_folders( "root-terragrunt-feature-mtsm-management.hcl") }
inputs = { name = local.azure_repo_name project_id = local.project_id initial_files = [{ file = "readme.md" content = <<EOF
Tracks server configuration files for customer ${local.customer} EOF commit_message = "Initial readme commit" }] }
Heres the error (uploaded)
1. run command: terragrunt plan [INFO] Getting version from tgenv-version-name [INFO] TGENV_VERSION is 0.38.3 time=2022-10-18T21:38:41Z level=error msg=1 error occurred:
error downloading 'ssh:// @.***/v3/WinshuttleEngineering/Hosted%!M(MISSING)ulti-Tenant/mtsm-infrastructure?ref=feature%!F(MISSING)multitsm-management': /usr/bin/git exited with 128: Cloning into '/etc/ado-agent/_work/326/s/live/multitsm/management/azuredevops/winshuttleengineering/15ac510e-4c9d-4b09-9c57-5bb96d4bd32f/azure-repo/.terragrunt-cache/5Yh4dYaqC8JcL1sUOnVilLsKNw0/V1E2ex0o7JnWZ1TVH98SylwKjkk'...
Warning: Permanently added the RSA host key for IP address '20.42.134.2' to the list of known hosts. remote: TF401019: The Git repository with name or identifier mtsm-infrastructure does not exist or you do not have permissions for the operation you are attempting. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. time=2022-10-18T21:38:41Z level=error msg=Unable to determine underlying exit code, so Terragrunt will exit with error code 1
Finishing: CmdLine
1. run command: terragrunt plan [INFO] Getting version from tgenv-version-name [INFO] TGENV_VERSION is 0.38.3 time=2022-10-18T21:38:41Z level=error msg=1 error occurred:
error downloading 'ssh:// @.***/v3/WinshuttleEngineering/Hosted%!M(MISSING)ulti-Tenant/mtsm-infrastructure?ref=feature%!F(MISSING)multitsm-management': /usr/bin/git exited with 128: Cloning into '/etc/ado-agent/_work/326/s/live/multitsm/management/azuredevops/winshuttleengineering/15ac510e-4c9d-4b09-9c57-5bb96d4bd32f/azure-repo/.terragrunt-cache/5Yh4dYaqC8JcL1sUOnVilLsKNw0/V1E2ex0o7JnWZ1TVH98SylwKjkk'...
Warning: Permanently added the RSA host key for IP address '20.42.134.2' to the list of known hosts. remote: TF401019: The Git repository with name or identifier mtsm-infrastructure does not exist or you do not have permissions for the operation you are attempting. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. time=2022-10-18T21:38:41Z level=error msg=Unable to determine underlying exit code, so Terragrunt will exit with error code 1
Finishing: CmdLine
On Wed, Oct 19, 2022 at 10:38 AM mericstam @.***> wrote:
Please provide more information, like: Are you using classic or yaml pipelines? if you are using classic please provide som screenshots of your pipeline. if you are using YAML pipelines please provide the yaml code. Where does the error appear? like during init, plan, ETC Which version of the task are you using?
— Reply to this email directly, view it on GitHub https://github.com/microsoft/azure-pipelines-terraform/issues/93#issuecomment-1284212195, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3HYOMMSWU6MPNKPOWIGKTWEAIWVANCNFSM6AAAAAARIOR4UI . You are receiving this because you authored the thread.Message ID: @.***>
-- Fontem Asonganyi
Linux Systems Engineer RHCSA RHCI
if you are using YAML pipelines I would like to see the yaml code to be able to assist.
ok so heres the azure module in using resource "azuredevops_git_repository" "repo" { project_id = var.project_id name = var.name default_branch = "refs/heads/main" initialization { init_type = "Clean" } }
resource "azuredevops_git_repository_file" "readme" { for_each = { for file in var.initial_files : file.file => file }
repository_id = azuredevops_git_repository.repo.id file = each.value.file content = each.value.content branch = "refs/heads/main" commit_message = each.value.commit_message overwrite_on_create = true }
Heres the pipeline im running a terragrunt file and wrapping the module up for terragrunt to run it [image: image.png]
On Wed, Oct 19, 2022 at 2:12 PM mericstam @.***> wrote:
if you are using YAML pipelines I would like to see the yaml code to be able to assist.
— Reply to this email directly, view it on GitHub https://github.com/microsoft/azure-pipelines-terraform/issues/93#issuecomment-1284457890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3HYOKKENS4RZ4KHW7GA2LWEBBYHANCNFSM6AAAAAARIOR4UI . You are receiving this because you authored the thread.Message ID: @.***>
I sent you the terragrunt file before. the pipeline runs on modules so im guessing its running classic
-- Fontem Asonganyi
Linux Systems Engineer RHCSA RHCI
Hi, You need to answer the issue directly on GitHub because the images are not included if you reply via email.
Closing this due to inactivity.
terraform { source = "git::ssh://WinshuttleEngineering@vs-ssh.visualstudio.com/v3/WinshuttleEngineering/Hosted%20Multi-Tenant/mtsm-infrastructure.git//source-control/azure-repo?ref=feature/mtsm-management" }
this code errors on downloading the repo as error seen below:
[INFO] TGENV_VERSION is 0.38.3 time=2022-10-18T20:26:03Z level=error msg=1 error occurred:
tried this source : "git::ssh://WinshuttleEngineering@vs-ssh.visualstudio.com:v3/WinshuttleEngineering/Hosted%20Multi-Tenant/mtsm-infrastructure.git//source-control/azure-repo?ref=feature/mtsm-management" and this source: "//WinshuttleEngineering@vs-ssh.visualstudio.com:v3/WinshuttleEngineering/Hosted%20Multi-Tenant/mtsm-infrastructure.git//source-control/azure-repo?ref=feature/mtsm-management"
but to no avai.
Please any suggestions ?