Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync w/ upstream forked repo - latest release #1

Merged
merged 2 commits into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,25 +664,27 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply

### Contributors

| [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]<br/>[Andriy Knysh][aknysh_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]<br/>[Igor Rodionov][goruha_homepage] | [![Sergey Vasilyev][s2504s_avatar]][s2504s_homepage]<br/>[Sergey Vasilyev][s2504s_homepage] | [![Michael Pereira][MichaelPereira_avatar]][MichaelPereira_homepage]<br/>[Michael Pereira][MichaelPereira_homepage] | [![Jamie Nelson][Jamie-BitFlight_avatar]][Jamie-BitFlight_homepage]<br/>[Jamie Nelson][Jamie-BitFlight_homepage] | [![Vladimir][SweetOps_avatar]][SweetOps_homepage]<br/>[Vladimir][SweetOps_homepage] | [![Daren Desjardins][darend_avatar]][darend_homepage]<br/>[Daren Desjardins][darend_homepage] |
|---|---|---|---|---|---|---|---|
| [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]<br/>[Andriy Knysh][aknysh_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]<br/>[Igor Rodionov][goruha_homepage] | [![Sergey Vasilyev][s2504s_avatar]][s2504s_homepage]<br/>[Sergey Vasilyev][s2504s_homepage] | [![Michael Pereira][MichaelPereira_avatar]][MichaelPereira_homepage]<br/>[Michael Pereira][MichaelPereira_homepage] | [![Jamie Nelson][Jamie-BitFlight_avatar]][Jamie-BitFlight_homepage]<br/>[Jamie Nelson][Jamie-BitFlight_homepage] | [![Vladimir][SweetOps_avatar]][SweetOps_homepage]<br/>[Vladimir][SweetOps_homepage] | [![Daren Desjardins][darend_avatar]][darend_homepage]<br/>[Daren Desjardins][darend_homepage] | [![Maarten van der Hoef][maartenvanderhoef_avatar]][maartenvanderhoef_homepage]<br/>[Maarten van der Hoef][maartenvanderhoef_homepage] |
|---|---|---|---|---|---|---|---|---|

[osterman_homepage]: https://github.com/osterman
[osterman_avatar]: https://github.com/osterman.png?size=150
[osterman_avatar]: https://img.cloudposse.com/150x150/https://github.com/osterman.png
[aknysh_homepage]: https://github.com/aknysh
[aknysh_avatar]: https://github.com/aknysh.png?size=150
[aknysh_avatar]: https://img.cloudposse.com/150x150/https://github.com/aknysh.png
[goruha_homepage]: https://github.com/goruha
[goruha_avatar]: https://github.com/goruha.png?size=150
[goruha_avatar]: https://img.cloudposse.com/150x150/https://github.com/goruha.png
[s2504s_homepage]: https://github.com/s2504s
[s2504s_avatar]: https://github.com/s2504s.png?size=150
[s2504s_avatar]: https://img.cloudposse.com/150x150/https://github.com/s2504s.png
[MichaelPereira_homepage]: https://github.com/MichaelPereira
[MichaelPereira_avatar]: https://github.com/MichaelPereira.png?size=150
[MichaelPereira_avatar]: https://img.cloudposse.com/150x150/https://github.com/MichaelPereira.png
[Jamie-BitFlight_homepage]: https://github.com/Jamie-BitFlight
[Jamie-BitFlight_avatar]: https://github.com/Jamie-BitFlight.png?size=150
[Jamie-BitFlight_avatar]: https://img.cloudposse.com/150x150/https://github.com/Jamie-BitFlight.png
[SweetOps_homepage]: https://github.com/SweetOps
[SweetOps_avatar]: https://github.com/SweetOps.png?size=150
[SweetOps_avatar]: https://img.cloudposse.com/150x150/https://github.com/SweetOps.png
[darend_homepage]: https://github.com/darend
[darend_avatar]: https://github.com/darend.png?size=150
[darend_avatar]: https://img.cloudposse.com/150x150/https://github.com/darend.png
[maartenvanderhoef_homepage]: https://github.com/maartenvanderhoef
[maartenvanderhoef_avatar]: https://img.cloudposse.com/150x150/https://github.com/maartenvanderhoef.png



Expand Down
2 changes: 2 additions & 0 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -509,3 +509,5 @@ contributors:
github: "SweetOps"
- name: "Daren Desjardins"
github: "darend"
- name: "Maarten van der Hoef"
github: "maartenvanderhoef"
13 changes: 10 additions & 3 deletions examples/complete/label2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ module "label2" {
delimiter = "+"
regex_replace_chars = "/[^a-zA-Z0-9-+]/"

additional_tag_map = {
propagate_at_launch = "true"
additional_tag = "yes"
}


tags = {
"City" = "London"
"Environment" = "Public"
Expand All @@ -27,9 +33,10 @@ output "label2_tags" {
value = module.label2.tags
}

output "label2_tags_as_list_of_maps" {
value = module.label2.tags_as_list_of_maps
}

output "label2_context" {
value = module.label2.context
}



23 changes: 9 additions & 14 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,15 @@ locals {
# Merge attributes
attributes = compact(distinct(concat(var.attributes, var.context.attributes, local.defaults.attributes)))

tags = merge(var.context.tags, local.generated_tags, var.tags)
tags_as_list_of_maps = data.null_data_source.tags_as_list_of_maps.*.outputs
tags = merge(var.context.tags, local.generated_tags, var.tags)

tags_as_list_of_maps = flatten([
for key in keys(local.tags) : merge(
{
key = key
value = local.tags[key]
}, var.additional_tag_map)
])

tags_context = {
# For AWS we need `Name` to be disambiguated sine it has a special meaning
Expand Down Expand Up @@ -67,15 +74,3 @@ locals {
}

}

data "null_data_source" "tags_as_list_of_maps" {
count = local.enabled ? length(keys(local.tags)) : 0

inputs = merge(
{
"key" = keys(local.tags)[count.index]
"value" = values(local.tags)[count.index]
},
var.additional_tag_map
)
}
4 changes: 0 additions & 4 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
terraform {
required_version = "~> 0.12.0"

required_providers {
null = "~> 2.0"
}
}