Skip to content

Commit

Permalink
Merge pull request #19 from rhythmictech/remove_additional_pkgs
Browse files Browse the repository at this point in the history
move additional packages var to setup/teardown modules
  • Loading branch information
dgoodellrhy authored Jun 8, 2021
2 parents 1725c28 + 0798c4f commit ca86e70
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ This module bridges the gap allowing Terraform to create EC2 Image Builder compo
| component\_version | Version of the component | `string` | n/a | yes |
| name | name to use for component | `string` | n/a | yes |
| playbook\_repo | git url for repo where ansible code lives with provisioning playbook and requirements file<br>can append with `-b BRANCH_NAME` to clone a specific branch | `string` | n/a | yes |
| additional\_packages | Space separate list of additional packages that may be needed for your ansible | `string` | `""` | no |
| change\_description | description of changes since last version | `string` | `null` | no |
| cloudformation\_timeout | How long to wait (in minutes) for CFN to apply before giving up | `number` | `10` | no |
| data\_uri | Use this to override the component document with one at a particualar URL endpoint | `string` | `null` | no |
Expand Down
17 changes: 8 additions & 9 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ locals {
latest_component_minor_version = "${split(".", var.component_version)[0]}.${split(".", var.component_version)[1]}.x"

data = templatefile("${path.module}/component.yml.tpl", {
additional_pkgs = var.additional_packages
description = var.description
name = var.name
playbook_dir = var.playbook_dir
playbook_file = var.playbook_file
playbook_repo = var.playbook_repo
repo_host = try(local.repo_parts.host, null)
repo_port = coalesce(local.repo_parts.port, 22)
ssh_key_name = try(data.aws_secretsmanager_secret.ssh_key[0].name, null)
description = var.description
name = var.name
playbook_dir = var.playbook_dir
playbook_file = var.playbook_file
playbook_repo = var.playbook_repo
repo_host = try(local.repo_parts.host, null)
repo_port = coalesce(local.repo_parts.port, 22)
ssh_key_name = try(data.aws_secretsmanager_secret.ssh_key[0].name, null)
})

repo_parts = try(
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
variable "additional_packages" {
default = ""
description = "Space separate list of additional packages that may be needed for your ansible"
type = string
}

variable "change_description" {
default = null
description = "description of changes since last version"
Expand Down

0 comments on commit ca86e70

Please sign in to comment.