1---
2layout: "language"
3page_title: "Backend Type: artifactory"
4sidebar_current: "docs-backends-types-standard-artifactory"
5description: |-
6  Terraform can store state in artifactory.
7---
8
9# artifactory
10
11**Kind: Standard (with no locking)**
12
13Stores the state as an artifact in a given repository in
14[Artifactory](https://www.jfrog.com/artifactory/).
15
16Generic HTTP repositories are supported, and state from different
17configurations may be kept at different subpaths within the repository.
18
19-> **Note:** The URL must include the path to the Artifactory installation.
20It will likely end in `/artifactory`.
21
22## Example Configuration
23
24```hcl
25terraform {
26  backend "artifactory" {
27    username = "SheldonCooper"
28    password = "AmyFarrahFowler"
29    url      = "https://custom.artifactoryonline.com/artifactory"
30    repo     = "foo"
31    subpath  = "terraform-bar"
32  }
33}
34```
35
36## Data Source Configuration
37
38```hcl
39data "terraform_remote_state" "foo" {
40  backend = "artifactory"
41  config = {
42    username = "SheldonCooper"
43    password = "AmyFarrahFowler"
44    url      = "https://custom.artifactoryonline.com/artifactory"
45    repo     = "foo"
46    subpath  = "terraform-bar"
47  }
48}
49```
50
51## Configuration variables
52
53The following configuration options / environment variables are supported:
54
55 * `username` / `ARTIFACTORY_USERNAME` (Required) - The username
56 * `password` / `ARTIFACTORY_PASSWORD` (Required) - The password
57 * `url` / `ARTIFACTORY_URL` (Required) - The URL. Note that this is the base url to artifactory not the full repo and subpath.
58 * `repo` (Required) - The repository name
59 * `subpath` (Required) - Path within the repository
60