Skip to content

Commit

Permalink
Merge pull request #20 from hashicorp-modules/f-add-owner
Browse files Browse the repository at this point in the history
Add AMI owner and update versions
  • Loading branch information
bensojona authored Oct 13, 2018
2 parents 1200630 + f783f61 commit 8057147
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ Checkout [examples](./examples) for fully functioning examples.

- `create`: [Optional] Create Module, defaults to true.
- `name`: [Optional] Name for resources, defaults to "hashistack-aws".
- `ami_owner`: [Optional] Account ID of AMI owner.
- `release_version`: [Optional] Release version tag to use (e.g. 0.1.0, 0.1.0-rc1, 0.1.0-beta1, 0.1.0-dev1), defaults to "0.1.0", view releases at https://github.com/hashicorp/guides-configuration#hashistack-version-tables.
- `consul_version`: [Optional] Consul version tag to use (e.g. 1.2.0 or 1.2.0-ent), defaults to "1.2.0".
- `vault_version`: [Optional] Vault version tag to use (e.g. 0.10.3 or 0.10.3-ent), defaults to "0.10.3".
- `nomad_version`: [Optional] Nomad version tag to use (e.g. 0.8.4 or 0.8.4-ent), defaults to "0.8.4".
- `consul_version`: [Optional] Consul version tag to use (e.g. 1.2.3 or 1.2.3-ent), defaults to "1.2.3".
- `vault_version`: [Optional] Vault version tag to use (e.g. 0.11.3 or 0.11.3-ent), defaults to "0.11.3".
- `nomad_version`: [Optional] Nomad version tag to use (e.g. 0.8.6 or 0.8.6-ent), defaults to "0.8.6".
- `os`: [Optional] Operating System to use (e.g. RHEL or Ubuntu), defaults to "RHEL".
- `os_version`: [Optional] Operating System version to use (e.g. 7.3 for RHEL or 16.04 for Ubuntu), defaults to "7.3".
- `vpc_id`: [Required] VPC ID to provision resources in.
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "consul_auto_join_instance_role" {
data "aws_ami" "hashistack" {
count = "${var.create && var.image_id == "" ? 1 : 0}"
most_recent = true
owners = ["${var.ami_owner}"]
name_regex = "hashistack-image_${lower(var.release_version)}_nomad_${lower(var.nomad_version)}_vault_${lower(var.vault_version)}_consul_${lower(var.consul_version)}_${lower(var.os)}_${var.os_version}.*"

filter {
Expand Down
17 changes: 11 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,29 @@ variable "name" {
default = "vault-aws"
}

variable "ami_owner" {
description = "Account ID of AMI owner."
default = "012230895537" # HashiCorp Public AMI AWS account
}

variable "release_version" {
description = "Release version tag (e.g. 0.1.0, 0.1.0-rc1, 0.1.0-beta1, 0.1.0-dev1), defaults to \"0.1.0\", view releases at https://github.com/hashicorp/guides-configuration#hashistack-version-tables"
default = "0.1.0"
}

variable "consul_version" {
description = "Consul version tag (e.g. 1.2.0 or 1.2.0-ent), defaults to \"1.2.0\"."
default = "1.2.0"
description = "Consul version tag (e.g. 1.2.3 or 1.2.3-ent), defaults to \"1.2.3\"."
default = "1.2.3"
}

variable "vault_version" {
description = "Vault version tag (e.g. 0.10.3 or 0.10.3-ent), defaults to \"0.10.3\"."
default = "0.10.3"
description = "Vault version tag (e.g. 0.11.3 or 0.11.3-ent), defaults to \"0.11.3\"."
default = "0.11.3"
}

variable "nomad_version" {
description = "Nomad version tag (e.g. 0.8.4 or 0.8.4-ent), defaults to \"0.8.4\"."
default = "0.8.4"
description = "Nomad version tag (e.g. 0.8.6 or 0.8.6-ent), defaults to \"0.8.6\"."
default = "0.8.6"
}

variable "os" {
Expand Down

0 comments on commit 8057147

Please sign in to comment.