-
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for context variable * Initial prototype of concept * format code * Better example * Much magic applied * More magic applied * fixed duplication of strings after passing context * fixed duplication of strings after passing context * Got the merge order for the tags correct * Added some comments * Removed the lower() function from the delimiter string normalisation * More comments * Changed to use replace() for removing whitespace in values * Joined the attributes together * Joined the attributes together * Handles empty values from variables * Updated Readme * wrong delimiter in tags, delimiter output added (#31) * Updated README to include the context input and output, added environment as an optional variable. Swapped out null_resource for null_data_source, which reduces some of the output noise but keeps the funtionality the same.
- Loading branch information
1 parent
85dc644
commit 6edc9b2
Showing
9 changed files
with
375 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
# Compiled files | ||
# Local .terraform directories | ||
**/.terraform/* | ||
|
||
# .tfstate files | ||
*.tfstate | ||
*.tfstate.backup | ||
*.tfstate.* | ||
|
||
# .tfvars files | ||
*.tfvars | ||
|
||
.terraform | ||
.idea | ||
*.iml | ||
**/.idea | ||
**/*.iml | ||
|
||
.build-harness | ||
build-harness | ||
**/.build-harness | ||
**/build-harness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,36 @@ | ||
module "label" { | ||
source = "../../" | ||
namespace = "Namespace" | ||
stage = "Stage" | ||
name = "Name" | ||
attributes = ["1", "2", "3", ""] | ||
tags = "${map("Key", "Value")}" | ||
module "label1" { | ||
source = "../../" | ||
namespace = "CloudPosse" | ||
environment = "UAT" | ||
stage = "build" | ||
name = "Winston Churchroom" | ||
attributes = ["fire", "water", "earth", "air"] | ||
|
||
tags = { | ||
"City" = "Dublin" | ||
"Environment" = "Private" | ||
} | ||
} | ||
|
||
module "label2" { | ||
source = "../../" | ||
context = "${module.label1.context}" | ||
name = "Charlie" | ||
stage = "test" | ||
|
||
tags = { | ||
"City" = "London" | ||
"Environment" = "Public" | ||
} | ||
} | ||
|
||
module "label3" { | ||
source = "../../" | ||
name = "Starfish" | ||
stage = "release" | ||
|
||
tags = { | ||
"Eat" = "Carrot" | ||
"Animal" = "Rabbit" | ||
} | ||
} |
Oops, something went wrong.