IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
339 stars 662 forks source link

[ERROR] vertex "ibm_scc_profile_attachment.scc_profile_attachment_instance" #4820

Open lionelmace opened 11 months ago

lionelmace commented 11 months ago

Community Note

Terraform CLI and Terraform IBM Provider Version

I cannot run terraform v1.58.0-beta0 anymore without facing this error Your account is disabled when calling the resource ibm_scc_profile_attachment.scc_profile_attachment_instance. My account is not disabled!

Full stack trace:

2023-09-25T14:48:44.329+0200 [ERROR] vertex "ibm_scc_profile_attachment.scc_profile_attachment_instance" error: CreateAttachmentWithContext failed Your account is disabled. Contact support.
{
    "StatusCode": 410,
    "Headers": {
        "Cf-Cache-Status": [
            "DYNAMIC"
        ],
        "Cf-Ray": [
            "80c36214fbf518a9-MRS"
        ],
        "Content-Length": [
            "130"
        ],
        "Content-Type": [
            "application/json; charset=utf-8"
        ],
        "Date": [
            "Mon, 25 Sep 2023 12:48:44 GMT"
        ],
        "Server": [
            "cloudflare"
        ],
        "Strict-Transport-Security": [
            "max-age=31536000; includeSubDomains"
        ],
        "X-Correlation-Id": [
            "8aab621d-fc2b-4703-b887-71741c43fe38"
        ],
        "X-Envoy-Upstream-Service-Time": [
            "19"
        ]
    },
    "Result": {
        "errors": [
            {
                "code": "Gone",
                "message": "Your account is disabled. Contact support."
            }
        ],
        "trace": "8aab621d-fc2b-4703-b887-71741c43fe38"
    },
    "RawResult": null
}

Affected Resource(s)

Steps to Reproduce

Here are the terraform scripts used https://github.com/lionelmace/ibmcloud-utils/tree/master/terraform/scc

  1. terraform init
  2. terraform apply
tyao117 commented 11 months ago

Based on your Terraform script , i am assuming that you are trying to use the same instance_id in different regions which can't be done. Each region needs to have an unique instance after going regional.

this line: is the base of my assumption. https://github.com/lionelmace/ibmcloud-utils/blob/ee1c688a7d4dc86e18dac83dc19a4838c6cdb272/terraform/scc/security-scc.tf#L53

lionelmace commented 11 months ago

@tyao117 No. I'm setting the instance_id created tin the same region eu-de.

lionelmace commented 11 months ago

The error Your account is disabledoccurs when trying to target an SCC instance_id that does not exist anymore or has been deleted. This error message should be replaced by something like this SCC instance_id you're trying to target has been deleted. Please make sure you target the correct SCC instance_id.