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(iam): add support for deny in policies #483

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

psauvage0
Copy link

@psauvage0 psauvage0 commented Oct 31, 2023

Description

This PR adds support for the "deny" permissions category in policies. This is the API endpoint to create policies : https://api.ovh.com/console-preview/?section=%2Fiam&branch=v2#post-/iam/policy

Type of change

Please delete options that are not relevant.

  • Improvement (improve existing resource(s) or datasource(s))

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • acceptance tests for IAM objects: TF_ACC=1 go test -v ./... -run 'TestAccIam.*'

Test Configuration:

  • Terraform version: terraform version: Terraform v1.6.2
  • Existing HCL configuration you used:
resource "ovh_iam_policy" "policy2" {
	name        = "tf-test2"
	description = "tf-test2"
	identities  = ["urn:v1:eu:identity:user:<nic>/alice"]
	resources   = ["urn:v1:eu:resource:publicCloudProject:<resourceID>"]
	deny 	    = ["publicCloudProject:openstack:computeOperator"]
}

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or issues
  • I have added acceptance tests that prove my fix is effective or that my feature works
  • New and existing acceptance tests pass locally with my changes
  • I ran succesfully go mod vendor if I added or modify go.mod file

@amstuta amstuta merged commit 8318413 into ovh:master Nov 17, 2023
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 this pull request may close these issues.

None yet

2 participants