-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
Add context #25
Merged
Merged
Add context #25
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
bfd8999
Add support for context variable
osterman 4e73819
Initial prototype of concept
osterman effb9d9
format code
osterman a9abcce
Better example
osterman f4024f6
Much magic applied
285f722
More magic applied
c6250d1
fixed duplication of strings after passing context
a4fe33d
fixed duplication of strings after passing context
b2ed7f9
Got the merge order for the tags correct
8d4c235
Added some comments
41fe422
Removed the lower() function from the delimiter string normalisation
f5157d7
More comments
39ebf3f
Changed to use replace() for removing whitespace in values
1509ed8
Merge branch 'master' into add-context
osterman 20ea64e
Joined the attributes together
f0e9661
Joined the attributes together
e6da6df
Handles empty values from variables
dd665b9
Merge branch 'add-context' of github.com:cloudposse/terraform-null-la…
e23bad6
Updated Readme
f62f445
Merge branch 'master' into add-context
osterman 7591f5b
Merge branch 'master' into add-context
osterman 129a545
wrong delimiter in tags, delimiter output added (#31)
dennybaa a61775a
Updated README to include the context input and output, added environ…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,8 +1,17 @@ | ||
module "label" { | ||
module "label1" { | ||
source = "../../" | ||
namespace = "Namespace" | ||
stage = "Stage" | ||
name = "Name" | ||
name = "Name1" | ||
attributes = ["1", "2", "3", ""] | ||
tags = "${map("Key", "Value")}" | ||
|
||
tags = { | ||
"SomeKey" = "SomeValue" | ||
} | ||
} | ||
|
||
module "label2" { | ||
source = "../../" | ||
context = "${module.label1.context}" | ||
name = "Name2" | ||
} |
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,23 +1,55 @@ | ||
output "id" { | ||
value = "${module.label.id}" | ||
output "label1_id" { | ||
value = "${module.label1.id}" | ||
} | ||
|
||
output "name" { | ||
value = "${module.label.name}" | ||
output "label1_name" { | ||
value = "${module.label1.name}" | ||
} | ||
|
||
output "namespace" { | ||
value = "${module.label.namespace}" | ||
output "label1_namespace" { | ||
value = "${module.label1.namespace}" | ||
} | ||
|
||
output "stage" { | ||
value = "${module.label.stage}" | ||
output "label1_stage" { | ||
value = "${module.label1.stage}" | ||
} | ||
|
||
output "attributes" { | ||
value = "${module.label.attributes}" | ||
output "label1_attributes" { | ||
value = "${module.label1.attributes}" | ||
} | ||
|
||
output "tags" { | ||
value = "${module.label.tags}" | ||
output "label1_tags" { | ||
value = "${module.label1.tags}" | ||
} | ||
|
||
output "label1_context" { | ||
value = "${module.label1.context}" | ||
} | ||
|
||
output "label2_id" { | ||
value = "${module.label2.id}" | ||
} | ||
|
||
output "label2_name" { | ||
value = "${module.label2.name}" | ||
} | ||
|
||
output "label2_namespace" { | ||
value = "${module.label2.namespace}" | ||
} | ||
|
||
output "label2_stage" { | ||
value = "${module.label2.stage}" | ||
} | ||
|
||
output "label2_attributes" { | ||
value = "${module.label2.attributes}" | ||
} | ||
|
||
output "label2_tags" { | ||
value = "${module.label2.tags}" | ||
} | ||
|
||
output "label2_context" { | ||
value = "${module.label2.context}" | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to incorporate the
var.context["tags"]
here some howThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't seem possible :(