-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When applying new object storage resources (e.g. stackit_objectstorage_credentials_group and stackit_objectstorage_credential) in a new STACKIT project, the Terraform provider will not enable the object storage with the service enablement API. It'll return an error in the apply, the plan works fine though.
Steps to reproduce
- Create a new STACKIT project
- do not enable the Object Storage via the Portal (or API)
- apply a
stackit_objectstorage_credentials_groupand/orstackit_objectstorage_credential
Actual behavior
A plan could look like this:
# stackit_objectstorage_credentials_group.test will be created
+ resource "stackit_objectstorage_credentials_group" "test" {
+ credentials_group_id = (known after apply)
+ id = (known after apply)
+ name = "test"
+ project_id = "<redacted>"
+ region = "eu02"
+ urn = (known after apply)
}
# stackit_objectstorage_credential.test will be created
+ resource "stackit_objectstorage_credential" "test" {
+ access_key = (known after apply)
+ credential_id = (known after apply)
+ credentials_group_id = (known after apply)
+ expiration_timestamp = (known after apply)
+ id = (known after apply)
+ name = (known after apply)
+ project_id = "<redacted>"
+ region = "eu02"
+ secret_access_key = (sensitive value)
}
The applied plan will result in the following error, when the object storage service is not enabled manually:
stackit_objectstorage_credentials_group.test: Creating...
Error: Error creating credentials group
with stackit_objectstorage_credentials_group.test,
on test.tf line 15, in resource "stackit_objectstorage_credentials_group" "test":
15: resource "stackit_objectstorage_credentials_group" "test" {
Enabling object storage project before creation: failed to create object
storage project: 409 Conflict (&[{%!s(*string=0x40001305f0)
%!s(*string=0x4000130600)}]), status code 409, Body:
{"detail":[{"key":"project.create_conflict","msg":"Two concurrent calls try
to create the same project"}]}
Expected behavior
I would expect, that the terraform provider will enable the object storage service on its own, as it also does for other cloud services, like SKE.
After the object storage service is enabled in the requested region, the apply job works perfectly fine.
Environment
- OS: macOS / Pipelines
- Terraform version (see
terraform --version):v1.11.4 - Version of the STACKIT Terraform provider:
v0.79.1
Additional information
none
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working