-
Notifications
You must be signed in to change notification settings - Fork 33
Unneccesary lookup of BusinessGroupId via Identity API #103
Comments
We're encountering the same issue. However groups for the requesting user (consumer) can be looked up from Would it be possible to add a routine for this lookup when lookup on path |
Something along these lines inserted after line 147 should provide a fallback check within the memberships without breaking existing functionality.
if len(businessGroups.Content) == 0 {
path = path + "/membership"
membershipURL := c.BuildEncodedURL(path, nil)
resp, respErr := c.Get(membershipURL, nil)
if respErr != nil {
return "", respErr
}
unmarshallErr := utils.UnmarshalJSON(resp.Body, &businessGroups)
if unmarshallErr != nil {
return "", unmarshallErr
}
} |
Looking into it. -Thanks, |
hi @Prativa20 having the same issue with provider 3.0 since the /identity/api/tenants/{tenant}/subtenants uri requires tenantadmin role within vra, this is causing issue for all user that wish to do any day2 operations including delete. /identity/api/tenants/{tenant}/subtenants/membership is a viable solution as mentioned by @LeoK80 the businessgroupid field is also in the tfstate since it is gathered by the requestemplate during creation please let me know if you need anything to fix this! |
Created a PR for this #105 |
Hi @Prativa20 i see the fix has been merged, are we expecting a version 3.0.1 soon ? Thanks! |
@hobovirtual released version 3.0.1 Thanks, |
@Prativa20 When can we expect version 3.0.1 to be available in the terraform registry? |
fyi |
@hobovirtual thanks for verifying! |
terraform-provider-vra7 plugin version 3.0.0
The latest release now sets the "businessgroup_name" as party of resourceVrs7DeploymentRead - line 448 of resource_vra7_deployment.go
On line 637 of resource_vra7_deployment.go, a check is made to see if the name is provided and then the BusinessGroupId is looked up from the name. This involves a call to the identity API. Unfortunately for us, we do not have permission to access this particular api.
Given that the BusinessGroupId has already been provided and set, this is unnecessary. It would make sense to only lookup the BusinessGroupId if its not already set.
The text was updated successfully, but these errors were encountered: