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

Duplicate local value definition when used with GitHub actions policy mixin #17

Open
AleksandrMatveev opened this issue Jan 16, 2025 · 3 comments
Labels
bug 🐛 An issue with the system

Comments

@AleksandrMatveev
Copy link

Describe the Bug

We use github-actions-iam-policy mixin.

After the last update to this module, it stops working with this error:

│ Error: Duplicate local value definition
│ 
│   on main.tf line 2, in locals:
│    2:   enabled = module.this.enabled
│ 
│ A local value named "enabled" was already defined at
│ github-actions-iam-policy.tf:2,3-50. Local value names must be unique
│ within a module.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Vendor v1.536.0 of this component
  2. Add the latest version of github-actions-iam-policy.tf
  3. Try to build a plan
@AleksandrMatveev AleksandrMatveev added the bug 🐛 An issue with the system label Jan 16, 2025
@goruha
Copy link
Contributor

goruha commented Jan 16, 2025

@AleksandrMatveev I think this bug relates mostly to the mixin.
Unfortunately, we do not have mixins migrated to a new repo in the org.
So for now let's keep the issue opened.

@milldr
Copy link
Contributor

milldr commented Jan 16, 2025

To resolve your issue, remove the duplicate local.enabled definition from the mixin.

Delete this line

@AleksandrMatveev
Copy link
Author

@milldr The error disappeared after I deleted the line you mentioned. Thank you!
As @goruha requested, I'll keep the issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

3 participants