ovh / terraform-provider-ovh

Terraform OVH provider
https://registry.terraform.io/providers/ovh/ovh/latest/docs
Mozilla Public License 2.0
183 stars 135 forks source link

[FEATURE] resource_cloud_project_user_s3_policy - add refresh for policy property #701

Closed mborne closed 4 weeks ago

mborne commented 1 month ago

Description

After facing HTTP issues applying changes on a lot of resource_cloud_project_user_s3_policy, we have noticed that terraform module was not able to detect inconsistency between resource_cloud_project_user_s3_policy and OVH API equivalent (GET /cloud/project/{serviceName}/user/{userId}/policy).

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

No additionnal parameters changes requests. "refresh" should occur on running "terraform refresh" or "terraform plan" for resource_cloud_project_user_s3_policy resources.

Additional context

retry-on-http-error

mborne commented 1 month ago

Trying to remove and re-import a given state, it seems that the problem concerns the JSON "policy" field :

resource "ovh_cloud_project_user_s3_policy" "user_rw_policy" {
    id           = "OK"
    service_name = "OK"
    user_id      = "OK"
    # policy       = MISSING AFTER IMPORT
}

It might be a bug.

amstuta commented 4 weeks ago

Hello @mborne, thanks for your issue. The value returned by the API for property policy is indeed ignored and it doesn't seem right. We will fix this quickly.

amstuta commented 4 weeks ago

Fix has been merged and will be released in the next few days, don't hesitate to reopen an issue if you have remaining issues.

mborne commented 2 weeks ago

Thank you. We will check this fix at the next release.