github.com/chalford/terraform@v0.3.7-0.20150113080010-a78c69a8c81f/website/source/docs/providers/atlas/r/artifact.html.markdown (about) 1 --- 2 layout: "atlas" 3 page_title: "Atlas: atlas_artifact" 4 sidebar_current: "docs-atlas-resource-artifact" 5 description: |- 6 Provides access to deployment artifacts managed by Atlas. This can 7 be used to dynamically configure instantiation and provisioning 8 of resources. 9 --- 10 11 # atlas\_artifact 12 13 Provides access to deployment artifacts managed by Atlas. This can 14 be used to dynamically configure instantiation and provisioning 15 of resources. 16 17 ## Example Usage 18 19 ``` 20 # Read the AMI 21 resource "atlas_artifact" "web" { 22 name = "hashicorp/web" 23 type = "aws.ami" 24 build = "latest" 25 metadata { 26 arch = "386" 27 } 28 } 29 30 # Start our instance with the dynamic ami value 31 resource "aws_instance" "app" { 32 ami = "${atlas_artifact.web.id}" 33 ... 34 } 35 ``` 36 37 ## Argument Reference 38 39 The following arguments are supported: 40 41 * `name` - (Required) Name of the artifact in Atlas. This is given 42 in slug format like "organization/artifact". 43 44 * `type` - (Required) The type of artifact to query for. 45 46 * `build` - (Optional) The build to filter on. This can be "latest", 47 to find a matching artifact in the latest build, "any" to find a 48 matching artifact in any build, or a specific number to pin to that 49 build. If `build` and `version` are unspecified, `version` will default 50 to "latest". Cannot be specified with `version`. 51 52 * `version` - (Optional) The version to filter on. This can be "latest", 53 to match against the latest version, "any" to find a matching artifact 54 in any version, or a specific number to pin to that version. Defaults to 55 "latest" if neither `build` or `version` is specified. Cannot be specified 56 with `build`. 57 58 * `metadata_keys` - (Optional) If given, only an artifact containing 59 the given keys will be returned. This is used to disambiguate when 60 multiple potential artifacts match. An example is "aws" to filter 61 on an AMI. 62 63 * `metadata` - (Optional) If given, only an artifact matching the 64 metadata filters will be returned. This is used to disambiguate when 65 multiple potential artifacts match. An example is "arch" = "386" to 66 filter on architecture. 67 68 69 ## Attributes Reference 70 71 The following attributes are exported: 72 73 * `id` - The ID of the artifact. This could be an AMI ID, GCE Image ID, etc. 74 * `file_url` - For artifacts that are binaries, this is a download path. 75 * `metadata_full` - Contains the full metadata of the artifact. The keys are sanitized 76 to replace any characters that are invalid in a resource name with a hyphen. 77 For example, the "region.us-east-1" key will become "region-us-east-1". 78 * `version_real` - The matching version of the artifact 79 * `slug` - The artifact slug in Atlas 80