Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stackit/internal/services/cdn/cdn_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ func testAccCheckCDNDistributionDestroy(s *terraform.State) error {
if rs.Type != "stackit_cdn_distribution" {
continue
}
// terraform ID: "[project_id],[distribution_id]"
distributionId := strings.Split(rs.Primary.ID, core.Separator)[1]
distributionsToDestroy = append(distributionsToDestroy, distributionId)
}
Expand Down
1 change: 1 addition & 0 deletions stackit/internal/services/git/git_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ func testAccCheckGitInstanceDestroy(s *terraform.State) error {
if rs.Type != "stackit_git" {
continue
}
// terraform ID: "[project_id],[instance_id]"
instanceId := strings.Split(rs.Primary.ID, core.Separator)[1]
instancesToDestroy = append(instancesToDestroy, instanceId)
}
Expand Down
10 changes: 6 additions & 4 deletions stackit/internal/services/iaas/iaas_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5846,6 +5846,7 @@ func testAccCheckNetworkAreaRegionDestroy(s *terraform.State) error {
if rs.Type != "stackit_network_area_region" {
continue
}
// terraform ID: "[organization_id],[network_area_id]"
networkAreaId := strings.Split(rs.Primary.ID, core.Separator)[1]
networkAreasToDestroy = append(networkAreasToDestroy, networkAreaId)
}
Expand Down Expand Up @@ -5883,6 +5884,7 @@ func testAccCheckNetworkAreaDestroy(s *terraform.State) error {
if rs.Type != "stackit_network_area" {
continue
}
// terraform ID: "[organization_id],[network_area_id]"
networkAreaId := strings.Split(rs.Primary.ID, core.Separator)[1]
networkAreasToDestroy = append(networkAreasToDestroy, networkAreaId)
}
Expand Down Expand Up @@ -5919,8 +5921,8 @@ func testAccCheckIaaSVolumeDestroy(s *terraform.State) error {
if rs.Type != "stackit_volume" {
continue
}
// volume terraform ID: "[project_id],[volume_id]"
volumeId := strings.Split(rs.Primary.ID, core.Separator)[1]
// volume terraform ID: "[project_id],[region],[volume_id]"
volumeId := strings.Split(rs.Primary.ID, core.Separator)[2]
volumesToDestroy = append(volumesToDestroy, volumeId)
}

Expand Down Expand Up @@ -5976,9 +5978,9 @@ func testAccCheckServerDestroy(s *terraform.State) error {
if rs.Type != "stackit_network" {
continue
}
// network terraform ID: "[project_id],[network_id]"
// network terraform ID: "[project_id],[region],[network_id]"
projectId = strings.Split(rs.Primary.ID, core.Separator)[0]
networkId := strings.Split(rs.Primary.ID, core.Separator)[1]
networkId := strings.Split(rs.Primary.ID, core.Separator)[2]
networksToDestroy = append(networksToDestroy, networkId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ func testAccCheckLoadBalancerDestroy(s *terraform.State) error {
if rs.Type != "stackit_loadbalancer" {
continue
}
// loadbalancer terraform ID: = "[project_id],[name]"
loadbalancerName := strings.Split(rs.Primary.ID, core.Separator)[1]
// loadbalancer terraform ID: = "[project_id],[region],[name]"
loadbalancerName := strings.Split(rs.Primary.ID, core.Separator)[2]
loadbalancersToDestroy = append(loadbalancersToDestroy, loadbalancerName)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestAccObjectStorageResourceMin(t *testing.T) {
project_id = stackit_objectstorage_credentials_group.credentials_group.project_id
credentials_group_id = stackit_objectstorage_credentials_group.credentials_group.credentials_group_id
}
data "stackit_objectstorage_credential" "credential" {
project_id = stackit_objectstorage_credential.credential.project_id
credentials_group_id = stackit_objectstorage_credential.credential.credentials_group_id
Expand All @@ -141,7 +141,7 @@ func TestAccObjectStorageResourceMin(t *testing.T) {
project_id = stackit_objectstorage_bucket.bucket_object_lock.project_id
name = stackit_objectstorage_bucket.bucket_object_lock.name
}
data "stackit_objectstorage_default_retention" "retention" {
bucket_name = stackit_objectstorage_bucket.bucket_object_lock.name
project_id = var.project_id
Expand Down Expand Up @@ -330,8 +330,8 @@ func testAccCheckObjectStorageDestroy(s *terraform.State) error {
if rs.Type != "stackit_objectstorage_bucket" {
continue
}
// bucket terraform ID: "[project_id],[name]"
bucketName := strings.Split(rs.Primary.ID, core.Separator)[1]
// bucket terraform ID: "[project_id],[region],[name]"
bucketName := strings.Split(rs.Primary.ID, core.Separator)[2]
bucketsToDestroy = append(bucketsToDestroy, bucketName)
}

Expand Down Expand Up @@ -360,8 +360,8 @@ func testAccCheckObjectStorageDestroy(s *terraform.State) error {
if rs.Type != "stackit_objectstorage_credentials_group" {
continue
}
// credentials group terraform ID: "[project_id],[credentials_group_id]"
credentialsGroupId := strings.Split(rs.Primary.ID, core.Separator)[1]
// credentials group terraform ID: "[project_id],[region],[credentials_group_id]"
credentialsGroupId := strings.Split(rs.Primary.ID, core.Separator)[2]
credentialsGroupsToDestroy = append(credentialsGroupsToDestroy, credentialsGroupId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ func testAccCheckObservabilityDestroy(s *terraform.State) error {
if rs.Type != "stackit_observability_instance" {
continue
}
// instance terraform ID: = "[project_id],[instance_id],[name]"
// instance terraform ID: = "[project_id],[instance_id]"
instanceId := strings.Split(rs.Primary.ID, core.Separator)[1]
instancesToDestroy = append(instancesToDestroy, instanceId)
}
Expand Down
4 changes: 2 additions & 2 deletions stackit/internal/services/rabbitmq/rabbitmq_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ func testAccCheckRabbitMQDestroy(s *terraform.State) error {
if rs.Type != "stackit_rabbitmq_instance" {
continue
}
// instance terraform ID: "[project_id],[instance_id]"
instanceId := strings.Split(rs.Primary.ID, core.Separator)[1]
// instance terraform ID: "[project_id],[region],[instance_id]"
instanceId := strings.Split(rs.Primary.ID, core.Separator)[2]
instancesToDestroy = append(instancesToDestroy, instanceId)
}

Expand Down
4 changes: 2 additions & 2 deletions stackit/internal/services/redis/redis_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ func testAccCheckRedisDestroy(s *terraform.State) error {
if rs.Type != "stackit_redis_instance" {
continue
}
// instance terraform ID: "[project_id],[instance_id]"
instanceId := strings.Split(rs.Primary.ID, core.Separator)[1]
// instance terraform ID: "[project_id],[region],[instance_id]"
instanceId := strings.Split(rs.Primary.ID, core.Separator)[2]
instancesToDestroy = append(instancesToDestroy, instanceId)
}

Expand Down
3 changes: 2 additions & 1 deletion stackit/internal/services/scf/scf_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ func testAccCheckScfOrganizationDestroy(s *terraform.State) error {
if rs.Type != "stackit_scf_organization" {
continue
}
orgId := strings.Split(rs.Primary.ID, core.Separator)[1]
// terraform ID: "[project_id],[region],[org_id]"
orgId := strings.Split(rs.Primary.ID, core.Separator)[2]
orgsToDestroy = append(orgsToDestroy, orgId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ func testAccCheckServiceAccountDestroy(s *terraform.State) error {
if rs.Type != "stackit_service_account" {
continue
}
// terraform ID: "[project_id],[email]"
serviceAccountEmail := strings.Split(rs.Primary.ID, core.Separator)[1]
instancesToDestroy = append(instancesToDestroy, serviceAccountEmail)
}
Expand Down
6 changes: 3 additions & 3 deletions stackit/internal/services/sfs/sfs_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ func testAccExportPolicyDestroy(s *terraform.State) error {
continue
}
// export policy transform id: "[projectId],[region],[policyId]"
policyId := strings.Split(rs.Primary.ID, core.Separator)[1]
policyId := strings.Split(rs.Primary.ID, core.Separator)[2]
policyToDestroy = append(policyToDestroy, policyId)
}

Expand Down Expand Up @@ -1077,8 +1077,8 @@ func testAccResourcePoolDestroyed(s *terraform.State) error {
if rs.Type != "stackit_sfs_resource_pool" {
continue
}
// export policy transform id: "[projectId],[resource_pool_id]"
resourcePoolId := strings.Split(rs.Primary.ID, core.Separator)[1]
// export policy transform id: "[project_id],[region],[resource_pool_id]"
resourcePoolId := strings.Split(rs.Primary.ID, core.Separator)[2]
resourcePoolsToDestroy = append(resourcePoolsToDestroy, resourcePoolId)
}

Expand Down
Loading