Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 2.07 KB

artifactory.mdx

File metadata and controls

60 lines (46 loc) · 2.07 KB
page_title description
Backend Type: artifactory
Terraform can store state in artifactory.

artifactory (deprecated)

~> NOTE: The artifactory backend is deprecated, and will be removed in a future Terraform release.

Stores the state as an artifact in a given repository in Artifactory.

Generic HTTP repositories are supported, and state from different configurations may be kept at different subpaths within the repository.

-> Note: The URL must include the path to the Artifactory installation. It will likely end in /artifactory.

This backend does not support state locking.

Example Configuration

terraform {
  backend "artifactory" {
    username = "SheldonCooper"
    password = "AmyFarrahFowler"
    url      = "https://custom.artifactoryonline.com/artifactory"
    repo     = "foo"
    subpath  = "terraform-bar"
  }
}

Data Source Configuration

data "terraform_remote_state" "foo" {
  backend = "artifactory"
  config = {
    username = "SheldonCooper"
    password = "AmyFarrahFowler"
    url      = "https://custom.artifactoryonline.com/artifactory"
    repo     = "foo"
    subpath  = "terraform-bar"
  }
}

Configuration Variables

!> Warning: We recommend using environment variables to supply credentials and other sensitive data. If you use -backend-config or hardcode these values directly in your configuration, Terraform will include these values in both the .terraform subdirectory and in plan files. Refer to Credentials and Sensitive Data for details.

The following configuration options / environment variables are supported:

  • username / ARTIFACTORY_USERNAME (Required) - The username
  • password / ARTIFACTORY_PASSWORD (Required) - The password
  • url / ARTIFACTORY_URL (Required) - The URL. Note that this is the base url to artifactory not the full repo and subpath.
  • repo (Required) - The repository name
  • subpath (Required) - Path within the repository