Coder Social home page Coder Social logo

wenzel-felix / terraform-azurerm-policy-module Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 75 KB

Terraform module to create policies with optional assignments and exemptions creation. The module supports a file based approach compatible with the default azure policy definition files.

Home Page: https://registry.terraform.io/modules/wenzel-felix/policy-module/azurerm/latest

License: GNU General Public License v3.0

HCL 100.00%
azure terraform azurerm-modules terraform-module

terraform-azurerm-policy-module's People

Contributors

felix-pexon avatar wenzel-felix avatar

Stargazers

 avatar

Watchers

 avatar

terraform-azurerm-policy-module's Issues

Support identity argument for policy assignments

Is your feature request related to a problem? Please describe.
It would be helpful to support quite regularly needed arguments from the used resources in the policy assignment submodule.

Describe the solution you'd like
Add an additional parameter called identity to assignments.
As system-assigned MIs are really needed for the policy assignment, the value can be declared as bool.

Describe alternatives you've considered
Implement the identity argument as in the native assignment as block, which would allow to reference also the role definition, which will be associated with it.

Additional context
Here are some references:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_policy_assignment#identity

Support non_compliance_message for assignments

Is your feature request related to a problem? Please describe.
It would be helpful to support quite regularly needed arguments from the used resources in the policy assignment submodule.

Describe the solution you'd like
Add an additional parameter called non_compliance_message to assignments.

Describe alternatives you've considered
None

Additional context
Here are some references:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_policy_assignment#non_compliance_message

Adjust validation behaviour for MG exemptions

Describe the bug
Looking at here it is clear that MG exemptions for MG assignments won't work, as their "path" is not incremental or based on their relation with each other.

To Reproduce/Test
Make an assignment at MG scope and add an exemption for a child MG.

Expected behavior
There should be no issue.

Split assignments and exemptions module

Currently, assignments and exemptions are within one module.
This makes this module very bloated. To increase readability it should be split into two separate submodules.

Move to a file based approach

Is your feature request related to a problem? Please describe.
The configuration file is very big and provides a bad overview.

Describe the solution you'd like
Move to a more file-based approach.

Describe alternatives you've considered
None

Additional context
Instead of maintaining a folder for policies, we should maintain two folders - one for policies and one for initiatives, and one for the assignments (+ exemptions). The policies and initiatives should be per file and the assignments should be concatenated over all files where each file holds an individual list.

Policy Set currently not supports parameter values per policy reference

Is your feature request related to a problem? Please describe.
The policy set resource supports adding parameter values for each policy reference. The module right now does not.

Describe the solution you'd like
The list of references can probably be adjusted to a list of maps or objects instead of just a list of strings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.