0
votes

I am trying to use terraform 0.13 to manage my artifactory repo. I am running into a 404 error or forbidden error.

terraform {
required_providers {
  artifactory = {
    source  = "jfrog/artifactory"
    version = "2.2.4"
  }
}
  required_version = "~>0.13"
}

provider "artifactory" {
url          = "https://xyz.jfrog.io"
username = "[email protected]"
password = "xxxxxxxx" 
}

if I change the url to have /ui/login (where the page redirects to), the 404 error is gone, but that is not how the documentation shows.

My terraform plan works, but when running apply, I get the forbidden error. I tried with user/pw and an access token both and it still gives the same error. Not sure what I am missing in the syntax.

1

1 Answers

3
votes

Try adding /artifactory to the url.

See below:

terraform {
  required_providers {
    artifactory = {
      source  = "jfrog/artifactory"
      version = "2.2.4"
    }
  }
  required_version = "~>0.13"
}

provider "artifactory" {
  url          = "https://xyz.jfrog.io/artifactory"
  username = "[email protected]"
  password = "xxxxxxxx" 
}