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

custom config.build.dependency_words ability #268

Merged
merged 1 commit into from Sep 14, 2022
Merged

Conversation

tongueroo
Copy link
Contributor

@tongueroo tongueroo commented Sep 14, 2022

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes (run bundle exec rspec to verify this)

Summary

Introduce config.build.dependency_words config ability.

Docs: https://terraspace.cloud/docs/dependencies/tfvars/considerations/#dependency-words

Context

https://community.boltops.com/t/bug-introduced-in-2-2-0/952

How to Test

Here's some example code that can be use to test it.

config/helpers/custom_helper.rb

module Terraspace::Project::CustomHelper
  def list
    [{
      'name' => '1',
      'value' => '1'
    }]
  end
end

app/stacks/child/tfvars/dev.tfvars

<% list.each do |item| -%>
length<%= item['name'] %> = <%= output("demo.length") %>
<% end -%>

To test:

terraspace build child

Should build the tfvars file successfully

$ cat .terraspace-cache/us-west-2/dev/stacks/child/1-dev.auto.tfvars
 length1 = 3

Version Changes

Patch

@tongueroo tongueroo merged commit 9df9178 into master Sep 14, 2022
@tongueroo tongueroo deleted the dependency-words branch September 14, 2022 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant