gridscale / terraform-provider-gridscale

Terraform gridscale provider
https://registry.terraform.io/providers/gridscale/gridscale/latest/docs
Mozilla Public License 2.0
12 stars 11 forks source link

Unable to Create BackupSchedule #103

Closed tmallikarjuna closed 3 years ago

tmallikarjuna commented 3 years ago

Hi,

I am unable to create backupschedule as per the example provided here: https://registry.terraform.io/providers/gridscale/gridscale/latest/docs/resources/backupschedule

I get the below output:

Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # gridscale_backupschedule.foo will be created
  + resource "gridscale_backupschedule" "foo" {
      + active                = true
      + change_time           = (known after apply)
      + create_time           = (known after apply)
      + id                    = (known after apply)
      + keep_backups          = 1
      + name                  = "backupschedule"
      + next_runtime          = "2025-12-30 15:04:05"
      + next_runtime_computed = (known after apply)
      + run_interval          = 60
      + status                = (known after apply)
      + storage_backups       = (known after apply)
      + storage_uuid          = (known after apply)

      + timeouts {
          + create = "10m"
        }
    }

  # gridscale_storage.foo will be created
  + resource "gridscale_storage" "foo" {
      + capacity           = 1
      + change_time        = (known after apply)
      + create_time        = (known after apply)
      + current_price      = (known after apply)
      + id                 = (known after apply)
      + last_used_template = (known after apply)
      + license_product_no = (known after apply)
      + location_country   = (known after apply)
      + location_iata      = (known after apply)
      + location_name      = (known after apply)
      + location_uuid      = (known after apply)
      + name               = "storage"
      + parent_uuid        = (known after apply)
      + status             = (known after apply)
      + storage_type       = "storage"
      + usage_in_minutes   = (known after apply)
    }

Plan: 2 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

gridscale_storage.foo: Creating...
gridscale_storage.foo: Creation complete after 6s [id=04c3a8e5-3643-4fea-a92d-906e343be5bb]
gridscale_backupschedule.foo: Creating...

Error: Status code: 403. Error: {'type': 'HTTPError', 'status_code': 403, 'message': '(403, None)'}. Request UUID: de1d3fce-7462-4aaa-8bad-d8dc7735f111. 

  on main.tf line 15, in resource "gridscale_backupschedule" "foo":
  15: resource "gridscale_backupschedule" "foo" {

Let me know if you need any more details.

Best Regards, Tejesh

bkircher commented 3 years ago

Hmm, looks like everything is OK with TF here but the request fails because of permissions. Investigating…

tmallikarjuna commented 3 years ago

Hi bkircher,

I have all permissions on GridScale. I can create all resources except this. I do have "Write" access level in my profile.

Best Regards, Tejesh

bkircher commented 3 years ago

Hey @tmallikarjuna ! I believe you are not allowed to create a backup schedule because that feature is not enabled for your account. In case of any question on how to get backup schedules enabled for your account you can always reach out to support at hello@gridscale.io .

As for the error message, this really could use some improvement. I will create a bug ticket against our public API to get a more helpful message here.

nvthongswansea commented 3 years ago

I'll close this issue as it was answered by @bkircher.