Skip to content

Commit

Permalink
Merge pull request #12 from nichtraunzer/feature/sensitive-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtraunzer committed Oct 6, 2023
2 parents a3d944f + 0cd3aec commit 47fde96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions hooks/createi2o.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ output "inputs2outputs" {
value = [{
${TFDOCSHCL}
}]
sensitive = true
}
EOF
terraform fmt "${CWD}"
9 changes: 6 additions & 3 deletions hooks/createstackmoduleoutputs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
# FIXME#stackValue = "module.#{stackOut}_default"

modoutTF.write("output \"module_#{stackOut}\" {\n")
modoutTF.write(" value = module.#{fixturemodulename}.*\n}\n")
modoutTF.write(" value = module.#{fixturemodulename}.*\n")
modoutTF.write(" sensitive = true\n}\n")

uniqueBP.each do |name, count|
duplicates = []
Expand All @@ -130,11 +131,13 @@

moduleOut = name.gsub(/-/, '_')
modoutTF.write("output \"module_#{moduleOut}\" {\n")
modoutTF.write(" value = #{moduleValue}\n}\n")
modoutTF.write(" value = #{moduleValue}\n")
modoutTF.write(" sensitive = true\n}\n")

# write stackmoduleoutputs.tf
outputTF.write("output \"module_#{moduleOut.gsub(/-/, '_')}\" {\n")
outputTF.write(" value = #{moduleV2}\n}\n")
outputTF.write(" value = #{moduleV2}\n")
outputTF.write(" sensitive = true\n}\n")

# read the source/filename from the helper hash
fileName = moduleSources.select { |k, _v| k == name }[name]
Expand Down

0 comments on commit 47fde96

Please sign in to comment.