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

[Terraform] Update policy assignment to be opt-in #454

Closed
glennmusa opened this issue Oct 13, 2021 · 2 comments · Fixed by #459
Closed

[Terraform] Update policy assignment to be opt-in #454

glennmusa opened this issue Oct 13, 2021 · 2 comments · Fixed by #459

Comments

@glennmusa
Copy link
Contributor

glennmusa commented Oct 13, 2021

Benefit/Result/Outcome

So that policy assignment doesn't fail if it's not supported in my cloud.

Description

Today, policy assignment in the Terraform implementation is defaulted to true. This differs from our Bicep implementation where policy assignment is opt-in and defaulted to no policy '':

Terraform defaulted to true:

variable "create_policy_assignment" {
description = "Assign Policy to deployed resources?"
type = bool
default = true
}

Bicep defaulted to none '':

@allowed([
'NIST'
'IL5' // Gov cloud only, trying to deploy IL5 in AzureCloud will switch to NIST
'CMMC'
''
])
@description('Built-in policy assignments to assign, default is none. [NIST/IL5/CMMC] IL5 is only availalbe for GOV cloud and will switch to NIST if tried in AzureCloud.')
param policy string = ''

Acceptance Criteria

  • The Terraform implementation of MLZ has policy assignment as an opt-in option
@glennmusa
Copy link
Contributor Author

glennmusa commented Oct 13, 2021

+@shawngib +@jjansen23 for awareness and discussion

Happy to adjust this to just the opt-in behavior if we want further design on "per-cloud policy assignment in Terraform"

@jjansen23
Copy link
Contributor

Let's ensure the instructions are updated here https://github.com/Azure/missionlz/blob/main/docs/policies.md#deploying-with-terraform

@glennmusa glennmusa changed the title [Terraform] Update policy assignment to be opt-in and check some allow-list before deployment [Terraform] Update policy assignment to be opt-in Oct 14, 2021
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 a pull request may close this issue.

2 participants