79233959

Date: 2024-11-28 12:53:27
Score: 2.5
Natty:
Report link

I'm trying to setup Databricks Asset Bundle and Terraform on an Azure DevOps Pipeline with Windows Agent. I'm restricted to not use internet hence cannot download the binaries databricks.exe, terraform.exe, and terraform-provider-databricks_v1.xx.zip file through repository.

As an alternative, I'm trying below:

When I run the repo/assets/databricks.exe it tries to download Terraform from internet but I overwrite it by providing DATABRICKS_TF_EXEC_PATH to the repo/assets/terraform.exe path. It is working.

Now Terraform tries to download Databricks provider, for that I added a configuration file to repo/assets/config.tfrc with env variable DATABRICKS_CLI_CONFIG_FILE pointing to that path along with DATABRICKS_TF_PROVIDER_VERSION=1.55.0. TF provider path is repo/assets/terraform/databricks/terraform-provider-databricks_v1.55.0.zip.

here is the config.tfrc file content:

provider_installation {
    filesystem_mirror {
        path = "C:/a/1/s/assets/databricks/terraform-provider-databricks_v1.55.0.zip"
    }
    direct {
        exclude = [
            "registry.terraform.io/databricks/databricks",
            "registry.terraform.io/*/*",
            "https://registry.terraform.io/.well-known/terraform.json",
            "https://registry.terraform.io/.well-known/*",
            "https://registry.terraform.io/*/*",
            ]
    }
}

So configuration file is picking up the zip file but still below error:

11:39:13 ERROR Error: terraform init: exit status 1
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
databricks/databricks: could not connect to registry.terraform.io: failed to
request discovery document: Get
"https://registry.terraform.io/.well-known/terraform.json": EOF

Do you have any advice on this? I do not have internet connection so everything must come from local.

Reasons:
  • RegEx Blacklisted phrase (2.5): Do you have any
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: StackOverflowUser