-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Given:
locals {
envs = toset(["CUSTOM-REMOTE", "CUSTOM-ENV"])
}
resource "project" "tenant" {
key = "projkey"
display_name = "projkey"
admin_privileges {
index_resources = false
manage_members = false
manage_resources = false
}
}
resource "project_environment" "env" {
for_each = toset(var.environments)
name = each.key
project_key = project.tenant.key
}Running this, there's a race condition that happens between CUSTOM-REMOTE and
CUSTOM-ENV. Given that CUSTOM-ENV successfully gets created, we get the
following error:
Error: Unable to Create Resource
[...]
An unexpected error occurred while creating the resource update request.
Please report this issue to the provider developers.
Error: BAD_REQUEST - Project Admin should contain all global and project
environments. Project environments: [PROD, DEV, projkey-CUSTOM-REMOTE,
projkey-CUSTOM-ENV] but got: [PROD, DEV, projkey-CUSTOM-REMOTE]
CUSTOM-ENV then gets stuck in a tainted state. Any further operations results in:
╷
│ Error: Unable to Delete Resource
│
│ An unexpected error occurred while attempting to delete the resource.
│ Please retry the operation or report this issue to the provider developers.
│
│ Error: NOT_FOUND - Could not find environment `projkey-CUSTOM-REMOTE`
╵
Key info:
Terraform v1.8.4
on darwin_arm64provider: 1.9.0
artifactory version: Enterprise Plus 7.90.15
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working