github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/enterprise/artifacts/artifact-provider.html.md (about)

     1  ---
     2  layout: "enterprise"
     3  page_title: "Provider - Artifacts - Terraform Enterprise"
     4  sidebar_current: "docs-enterprise-artifacts-provider"
     5  description: |-
     6    Terraform has a provider for managing artifacts called `atlas_artifact`.
     7  ---
     8  
     9  # Artifact Provider
    10  
    11  Terraform has a [provider](https://terraform.io/docs/providers/index.html) for managing Terraform Enterprise artifacts called `atlas_artifact`.
    12  
    13  This is used to make data stored in Artifacts available to Terraform for
    14  interpolation. In the following example, an artifact is defined and references
    15  an AMI ID stored in Terraform Enterprise.
    16  
    17  ~> **Why is this called "atlas"?** Atlas was previously a commercial offering
    18  from HashiCorp that included a full suite of enterprise products. The products
    19  have since been broken apart into their individual products, like **Terraform
    20  Enterprise**. While this transition is in progress, you may see references to
    21  "atlas" in the documentation. We apologize for the inconvenience.
    22  
    23  ```hcl
    24  provider "atlas" {
    25    # You can also set the atlas token by exporting ATLAS_TOKEN into your env
    26    token = "${var.atlas_token}"
    27  }
    28  
    29  resource "atlas_artifact" "web-worker" {
    30    name    = "my-username/web-worker"
    31    type    = "amazon.image"
    32    version = "latest"
    33  }
    34  
    35  resource "aws_instance" "worker-machine" {
    36    ami           = "${atlas_artifact.web-worker.metadata_full.region-us-east-1}"
    37    instance_type = "m1.small"
    38  }
    39  ```
    40  
    41  This automatically pulls the "latest" artifact version.
    42  
    43  Following a new artifact version being created via a Packer build, the following
    44  diff would be generated when running `terraform plan`.
    45  
    46  ```
    47  -/+ aws_instance.worker-machine
    48      ami:             "ami-168f9d7e" => "ami-2f3a9df2" (forces new resource)
    49      instance_type:   "m1.small" => "m1.small"
    50  ```
    51  
    52  This allows you to reference changing artifacts and trigger new deployments upon
    53  pushing subsequent Packer builds.
    54  
    55  Read more about artifacts in the [Terraform documentation](https://terraform.io/docs/providers/terraform-enterprise/r/artifact.html).