Skip to content

Conversation

mig4ng
Copy link

@mig4ng mig4ng commented Aug 27, 2025

Description

Validated the code here:
https://github.com/ovh/terraform-provider-ovh/blob/master/ovh/resource_cloud_project_storage_gen.go#L324-L340

I was looking for this in the documentation. I didn't find it so I added it to it after digging the source code.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (improve existing resource(s) or datasource(s))
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or issues
  • I have added acceptance tests that prove my fix is effective or that my feature works
  • New and existing acceptance tests pass locally with my changes
  • I ran succesfully go mod vendor if I added or modify go.mod file

Validated the code here:
https://github.com/ovh/terraform-provider-ovh/blob/master/ovh/resource_cloud_project_storage_gen.go#L324-L340

I was looking for this in the documentation. I didn't find it so I added it to it after digging the source code.
@mig4ng mig4ng requested a review from a team as a code owner August 27, 2025 14:46
@amstuta
Copy link
Collaborator

amstuta commented Aug 27, 2025

Thanks for your contribution @mig4ng !

Could you just add the same diff in file templates/resources/cloud_project_storage.md.tmpl ?

@mig4ng
Copy link
Author

mig4ng commented Aug 27, 2025

Thanks for your contribution @mig4ng !

Could you just add the same diff in file templates/resources/cloud_project_storage.md.tmpl ?

Done 😄

@mig4ng
Copy link
Author

mig4ng commented Aug 27, 2025

Error: Error calling Post /cloud/project/7d96524908a9423eba9b334da8f9e49e/region/GRA/storage
with ovh_cloud_project_storage.storage
on ovh.tf line 1, in resource "ovh_cloud_project_storage" "storage":

resource "ovh_cloud_project_storage" "storage" {

OVHcloud API error (status code 400): Client::BadRequest: "Invalid value(s) received: Status:disabled" (X-OVH-Query-Id: EU.ext-1.68af3968.378289.be92b5f04caa95ca202bae943684cfde)

@mig4ng
Copy link
Author

mig4ng commented Sep 1, 2025

Error: Error calling Post /cloud/project/7d96524908a9423eba9b334da8f9e49e/region/GRA/storage with ovh_cloud_project_storage.storage on ovh.tf line 1, in resource "ovh_cloud_project_storage" "storage":

resource "ovh_cloud_project_storage" "storage" {

OVHcloud API error (status code 400): Client::BadRequest: "Invalid value(s) received: Status:disabled" (X-OVH-Query-Id: EU.ext-1.68af3968.378289.be92b5f04caa95ca202bae943684cfde)

To update on this, if I create the bucket myself with the status disabled, and run terraform apply, it gets the state from it. If I create it from 0, it throws this error. It appears to be a but in the terraform provider, but I didn't figure it out.

@amstuta
Copy link
Collaborator

amstuta commented Sep 3, 2025

I'm currently checking with the team responsible for this endpoint but I think that disabled is a status that doesn't exist.

@amstuta
Copy link
Collaborator

amstuta commented Sep 3, 2025

@mig4ng I confirm that disabled cannot be manually set by users (it can only be returned by the API). Can you update your list to remove it ?

@mig4ng
Copy link
Author

mig4ng commented Sep 3, 2025

@mig4ng I confirm that disabled cannot be manually set by users (it can only be returned by the API). Can you update your list to remove it ?

It does exist. I created buckets via the UI/Dashboard and it allows me to set disabled from the get go.
And that is exactly how I want to create it from the ground up with Terraform, so there must be a bug either in the terraform provider or the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants