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

Allow dependent mods to have the same variable name as the parent mod (the parent mod variable will win) #1922

Closed
kaidaguerre opened this issue Apr 21, 2022 · 0 comments
Assignees

Comments

@kaidaguerre
Copy link
Contributor

kaidaguerre commented Apr 21, 2022

MacBook-Pro:morejunk jsmyth$ steampipe mod list

local
├── github.com/turbot/steampipe-mod-aws-tags@v0.3
└── github.com/turbot/steampipe-mod-azure-tags@v0.3

MacBook-Pro:morejunk jsmyth$ 
MacBook-Pro:morejunk jsmyth$ 
MacBook-Pro:morejunk jsmyth$ 
MacBook-Pro:morejunk jsmyth$ steampipe query
Error: failed to load workspace: Failed to decode all mod hcl files
Mod defines more than one resource named 'aws_tags.var.tag_limit'
(/Users/jsmyth/src/junk/morejunk/.steampipe/mods/github.com/turbot/steampipe-mod-aws-tags@v0.3/controls/limit.sp:1,1-21)
Mod defines more than one resource named 'aws_tags.var.mandatory_tags'
(/Users/jsmyth/src/junk/morejunk/.steampipe/mods/github.com/turbot/steampipe-mod-aws-tags@v0.3/controls/mandatory.sp:1,1-26)
Mod defines more than one resource named 'aws_tags.var.prohibited_tags'
(/Users/jsmyth/src/junk/morejunk/.steampipe/mods/github.com/turbot/steampipe-mod-aws-tags@v0.3/controls/prohibited.sp:1,1-27)
MacBook-Pro:morejunk jsmyth$ 

2 parts to this:

  1. add intelligence to the variable validation to ignore errors from duplicate variables in depdency mods
  2. add scoping when setting variable values to allow setting of variables values in dependency mods

2 needs design thought/input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant