Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

The resource group is not a member of account #203

@lionelmace

Description

@lionelmace

I face the following issue:

Error: CreateAttachmentWithContext failed The resource group ce3bb0225b1d426fa309fff14d4d3e5f is not a member of account b41a28b85f604bf6b86986adb5117b13. { "StatusCode": 400, "Headers": { "Cache-Control": [ "no-store" ], "Cf-Cache-Status": [ "DYNAMIC" ], "Cf-Ray": [ "8ea055a26de7d6e5-IAD" ], "Content-Length": [ "207" ], "Content-Type": [ "application/json; charset=utf-8" ], "Date": [ "Fri, 29 Nov 2024 05:52:59 GMT" ], "Server": [ "cloudflare" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Transaction-Id": [ "6cd981fa-c6f8-476e-884b-5305254c10c0" ], "X-Content-Type-Options": [ "nosniff" ], "X-Correlation-Id": [ "67968cc0-f0ca-4758-8c18-7d8aa60bd809" ], "X-Envoy-Upstream-Service-Time": [ "1967" ], "X-Request-Id": [ "fa69db0f-e59c-48d8-b098-c4d91ca98aee" ] }, "Result": { "errors": [ { "code": "bad_request", "message": "The resource group ce3bb0225b1d426fa309fff14d4d3e5f is not a member of account b41a28b85f604bf6b86986adb5117b13." } ], "trace": "67968cc0-f0ca-4758-8c18-7d8aa60bd809" }, "RawResult": null }
with module.create_profile_attachment_fs.ibm_scc_profile_attachment.scc_profile_attachment
on .terraform/modules/create_profile_attachment_fs/modules/attachment/main.tf line 64, in resource "ibm_scc_profile_attachment" "scc_profile_attachment":
resource "ibm_scc_profile_attachment" "scc_profile_attachment" {

while using this code:

module "create_profile_attachment_fs" {
  source                 = "terraform-ibm-modules/scc/ibm//modules/attachment"
  profile_name           = "IBM Cloud Framework for Financial Services"
  profile_version        = "latest"
  scc_instance_id        = ibm_resource_instance.scc_instance.guid
  attachment_name        = format("%s-%s", local.basename, "attachment-fs")
  attachment_description = "profile-attachment-description"
  attachment_schedule    = "daily"
  # scope the attachment to a specific resource group
  scope = [{
    environment = "ibm-cloud"
    properties = [
      {
        name  = "scope_type"
        value = "account.resource_group"
      },
      {
        name  = "scope_id"
        value = ibm_resource_group.group.id
      }
    ]
  }]
}

Provider version 1.71.3

The full code is available at https://github.com/lionelmace/ibm-cloud-native/blob/main/terraform/security-scc-scan-attachment.tf

It was working yesterday.

@ocofaigh any idea what could be wrong?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions