You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using a robot account with the provider results in the storage_quota from harbor_project resource being updated in the Terraform state although no change is made in Harbor. No error is thrown.
To Reproduce
Create a robot account regardless of its permissions.
Initiliaze Terraform working dir and create the foo project with a storage_quota of 1:
terraform init
terraform apply --auto-approve
Update the storage_quota value to 2 and apply the changes:
sed -rE 's/^(\s+storage_quota\s*=) [0-9]+$/\1 2/g' -i main.tf
terraform apply --auto-approve
Verify the storage_quota in the Terraform state file and compare the value with the one in Harbor Project Quotas:
cat terraform.tfstate | grep storage_quota
Expected behavior
Terraform apply command must result in a failure with an error message.
The storage_quota must not be updated in the Terraform state.
Additional context
Robot account permissions are limited and don't allow the update of a quota. See issue: goharbor/harbor#20076 (comment)
Only admin user accounts can update the quota
Provider Version 3.10.15
Terraform Version 1.9.6
Harbor Version 2.10.0
The text was updated successfully, but these errors were encountered:
nasseredine
changed the title
**harbor_project** resource updates storage_quota in state file although no change is made in Harbor
harbor_project resource updates storage_quota in state file although no change is made in Harbor
Oct 1, 2024
nasseredine
added a commit
to nasseredine/terraform-provider-harbor
that referenced
this issue
Oct 11, 2024
Describe the bug
Using a robot account with the provider results in the
storage_quota
from harbor_project resource being updated in the Terraform state although no change is made in Harbor. No error is thrown.To Reproduce
Create a robot account regardless of its permissions.
Export environnent variables:
main.tf
configuration file:storage_quota
of 1:storage_quota
value to 2 and apply the changes:sed -rE 's/^(\s+storage_quota\s*=) [0-9]+$/\1 2/g' -i main.tf terraform apply --auto-approve
storage_quota
in the Terraform state file and compare the value with the one in Harbor Project Quotas:cat terraform.tfstate | grep storage_quota
Expected behavior
apply
command must result in a failure with an error message.storage_quota
must not be updated in the Terraform state.Additional context
Robot account permissions are limited and don't allow the update of a quota. See issue: goharbor/harbor#20076 (comment)
Only admin user accounts can update the quota
The text was updated successfully, but these errors were encountered: