cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Terraform provider

danijela
Participant

Hello,

 

I am trying to user terraform dynatrace but have an issue with terraform init.

 

Initializing provider plugins...
- Finding dynatrace-oss/dynatrace versions matching "1.55.1"...

│ Error: Failed to install provider

│ Error while installing dynatrace-oss/dynatrace v1.55.1: could not query provider registry for registry.terraform.io/dynatrace-oss/dynatrace: failed to retrieve authentication checksums for provider: 403 Forbidden returned from objects.githubusercontent.com

 

 

I tried with different versions but it is the same error every time. Other providers I can install normally.

 

I have also configured this:

provider "dynatrace" {
  dt_env_url   = ""
  dt_api_token = ""
}
2 REPLIES 2

danijela
Participant

After getting debug logs, I can see this:

2024-06-27T15:26:51.373+0200 [DEBUG] GET https://github.com/dynatrace-oss/terraform-provider-dynatrace/releases/download/v1.55.1/terraform-pr...

 

it is going to github, while for aws it is going to:

https://releases.hashicorp.com/terraform-provider-aws/5.55.0/terraform-provider-aws_5.55.0_SHA256SUM...

 

The first link is blocked because of private network, but again why there is such a difference

gopher
Mentor

Hi @danijela 

Try a provider configured like this: 

terraform {
    required_providers {
        dynatrace = {
            version = "1.48.1"
            source = "dynatrace-oss/dynatrace"
        }
    }
} 

provider "dynatrace" {
    dt_env_url    = "https://{environmentid}.live.dynatrace.com"
    dt_api_token  = "${QA_TOKEN_ENV_VAR}"
}


You can set your environment variables for proxy & token outside of the main.tf

Goodluck

Featured Posts