-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Is there an existing issue for this?
- I have searched the existing issues
What version of the Terraform provider are you using?
1.8.0
What version of the Terraform CLI are you using?
1.13.0
What CF API version are you using?
3.200.0
What type of issue are you facing
bug report
Describe the bug
Describe the bug
switch org from quota
- When switching an organization from quota A to quota B using the
cloudfoundry_org_quotaresource, Terraform fails with but in api side the org is well assigned to the new quota:
│ Error: Unable to update org quota
│
│ with module.multisite.cloudfoundry_org_quota.test-quota,
│ on ../multisite/service-archi-me1-staging.tf line 25, in resource "cloudfoundry_org_quota" "test-quota":
│ 25: resource "cloudfoundry_org_quota" "test-quota" {
│
│ Cannot unassign org quota from org [24ff2436-153a-4792-9d2b-13e84ef3d7df]
Simply remove org from org_quota
- When I try to remove an org from a quota by itself, it doesn’t work at all — I cannot unassign the org from the quota, even if I restart a terraform apply behind.
Simply remove the cloudfoudry_org_quota
- When i delete cloudfoundry_org_quota entirely i have the same problem than before, impossibility to remove the resource with a terraform apply.
Additional context
This seems to be a limitation in the cloudfoundry_org_quota resource. The resource currently separates the update into DELETE then ADD, which is rejected by the CF API.
It would be helpful if the provider could handle direct org quota switching or provide guidance in documentation.
Expected Behavior
Terraform should either:
switch org from quota
- Successfully switch the org from quota A to quota B in one apply, or
- Provide a clear workflow to handle the quota reassignment
Simply remove org from org_quota
it should be accepted if i want to remove an org from cloudfoundry_org_quotas.
Simply remove the cloudfoudry_org_quota
it should be accepted if i want to simply remove cloudfoundry_org_quota resource.
Steps To Reproduce
switch org from quota
- Create an org assigned to quota A
- Update Terraform .tf to assign the same org to quota B and unassign org from quota A
- Run
terraform apply - Observe the error above
- if you launch terraform apply once again it works
Simply remove org from org_quota
1.Add an org to cloudfoundry_org_quota
2. Terraform apply
3. Remove an org from cloudfoundry_org_quota
4. Terraform apply twice
Simply remove the cloudfoudry_org_quota
- Add an cloudfoundry_org_quota
- add an org to cloudfoundry_org_quota
- terraform apply
- Remove the cloudfoundry_org_quota entirely
- Terraform apply twice
Your Terraform Configuration
terraform {
required_providers {
cfsecurity = {
source = "orange-cloudfoundry/cfsecurity"
version = "~>0.117.0"
}
cloudfoundry = {
source = "cloudfoundry/cloudfoundry"
version = "1.8.0"
}
}
required_version = ">= 1.13.0"
}Roles
- Org Manager
- ADMIN
Add screenshots to help explain your problem
Additional context
No response