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

feat(spacelift-policy): add support for file paths #183

Merged
merged 7 commits into from
Aug 5, 2024

Conversation

oycyc
Copy link
Contributor

@oycyc oycyc commented Aug 2, 2024

what

  • Adds support for using a local file path as the source of a Spacelift Rego policy
  • Adds an example and supporting tests

why

  • Policies are not always on a public URL.
  • Having a lot of inline policies makes the file hard to manage, plus the code editor won't recognize the syntax because it's not in a .rego file
  • Although this can be done on a case by case basis at the root module level, when there is a lot of policies, especially when certain policies uses an URL while others is inline and some uses local file path, it becomes messy. It's cleaner to have it at the module.

@oycyc oycyc requested review from a team as code owners August 2, 2024 14:21
@oycyc oycyc requested review from johncblandii and jamengual August 2, 2024 14:21
@mergify mergify bot added the triage Needs triage label Aug 2, 2024
@gberenice
Copy link
Contributor

/terratest

@gberenice
Copy link
Contributor

/terratest

@gberenice
Copy link
Contributor

/terratest

@gberenice
Copy link
Contributor

/terratest

@Gowiem Gowiem added minor New features that do not break anything feature New functionality labels Aug 2, 2024
@Gowiem
Copy link
Member

Gowiem commented Aug 2, 2024

LGTM to me @oycyc -- Well done! I've asked others on the contributor team to review since we're biased 😄

Copy link
Member

@milldr milldr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanks for adding tests!

@milldr milldr merged commit 4e85660 into cloudposse:main Aug 5, 2024
56 checks passed
@mergify mergify bot removed the triage Needs triage label Aug 5, 2024
Copy link

github-actions bot commented Aug 5, 2024

These changes were released in v1.7.0.

@oycyc
Copy link
Contributor Author

oycyc commented Aug 5, 2024

This looks great! Thanks for adding tests!

Thanks @milldr ! Follow up PR in the components repo to support and utilize this! cloudposse/terraform-aws-components#1091

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality minor New features that do not break anything
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants