Skip to content

Commit

Permalink
Merge pull request #24 from hashicorp-modules/f-add-owner
Browse files Browse the repository at this point in the history
Update version
  • Loading branch information
bensojona authored Oct 13, 2018
2 parents 269933f + 0bdc7e7 commit e57139b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ Checkout [examples](./examples) for fully functioning examples.

- `create`: [Optional] Create Module, defaults to true.
- `name`: [Optional] Name for resources, defaults to "consul-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".
- `consul_version`: [Optional] Consul version tag to use (e.g. 1.2.3 or 1.2.3-ent), defaults to "1.2.3".
- `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" "consul" {
count = "${var.create && var.image_id == "" ? 1 : 0}"
most_recent = true
owners = ["${var.ami_owner}"]
name_regex = "consul-image_${lower(var.release_version)}_consul_${lower(var.consul_version)}_${lower(var.os)}_${var.os_version}.*"

filter {
Expand Down
9 changes: 7 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ variable "name" {
default = "consul-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 "os" {
Expand Down

0 comments on commit e57139b

Please sign in to comment.