drpebcak / terraform-rancher-workload-cluster

5 stars 10 forks source link

Access denied error for s3 etc Backup on first apply #1

Open mholasek opened 4 years ago

mholasek commented 4 years ago

When I apply a cluster from scratch it runs into the error below every time. On the second apply it will run through. As far as I can see, all necessary resources are created (IAM user, s3 backup target, etc.).

Error: Bad response statusCode [500]. Status [500 Internal Server Error]. Body: [baseType=error, code=ServerError, message=Unable to validate S3 backup target configration: Access Denied.] from [https://rancher2.bitmedia.at/v3/clusters]

  on .terraform/modules/workload-cluster/rancher.tf line 6, in resource "rancher2_cluster" "cluster":
   6: resource "rancher2_cluster" "cluster" {

PS: Many thanks for this module, which has taken a lot of work off my hands.

mholasek commented 4 years ago

@drpebcak - I see that you already figured out this problem and you posted an issue in terraform-provider-rancher2 project. https://github.com/terraform-providers/terraform-provider-rancher2/issues/184

As this is still open, would it make sense to change the module to use the rancher2_etcd_backup resource as you mentioned in this issue?

drpebcak commented 4 years ago

Unfortunately the rancher2_etcd_backup resource does not manage the "primary" backup configuration for the cluster... so if you use that without configuring the primary backup mechanism it causes a lot of strange behavior. In my experience, this meant that I could not actually restore from a backup.