OpenNebula / terraform-provider-opennebula

Terraform provider for OpenNebula
https://www.terraform.io/docs/providers/opennebula/
Mozilla Public License 2.0
63 stars 53 forks source link

Add ```opennebula_group ACL``` customization #422

Closed TGM closed 1 year ago

TGM commented 1 year ago

Community Note

Description

Add the ability to customize ACLs for newly created groups.

For this I propose one of the following 3 options.

a) when using opennebula_group add the ability to disable ACL creation, that way we can use opennebula_acl to create the rules b) specify the ACL on group creation c) make ACL creation optional when creating groups, similar to A, but if not specified it will use the default.

Another alternative method would be to introduce a data method, query for ACLs, delete the default created ACLs and than create new ones, but this one seems to take the long route.

New or Affected Resource(s)

opennebula_group

frousselet commented 1 year ago

Hi @TGM,

If doable, potential Terraform code:

resource "opennebula_group" "my" {
  # ...
  provision_default_acl = false # Optional. Default is true.
  # ...
}

Adding this attribute should have the same behaviour as:

image

I am still wondering if a default true value makes sense...

treywelsh commented 1 year ago

I didn't tested it but modifying default rules is possible via OpenNebula configuration: https://github.com/OpenNebula/docs/blob/master/source/installation_and_configuration/opennebula_services/oned.rst#default-permissions-for-vdc-acl-rules

frousselet commented 1 year ago

I confirm this fix the issue. I close the issue since it's not on the Provider scope.