Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply for ibm_iam_access_group_members fails with 404 when using IBMCLOUD_VISIBILITY=private #2828

Closed
l2fprod opened this issue Jul 8, 2021 · 1 comment · Fixed by #2850
Labels
bug service/IAM Issues related to IAM Visibility

Comments

@l2fprod
Copy link
Member

l2fprod commented Jul 8, 2021

This is similar to #2560 but for another resource

Terraform versions

$ terraform version
Terraform v1.0.1
on darwin_amd64
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/ibm-cloud/ibm v1.27.1

Affected Resource(s)

  • ibm_iam_access_group_members

Terraform Configuration Files

terraform {
  required_providers {
    ibm = {
      source  = "IBM-Cloud/ibm"
      version = ">= 1.23.2"
    }
  }
}

provider "ibm" {
}

resource "random_string" "random" {
  length = 8
  special = false
}

resource "ibm_iam_service_id" "functional_user" {
  name = "${random_string.random.result}-functional-user"
}

resource "ibm_iam_access_group" "group" {
  name = "${random_string.random.result}-group"
}

resource "ibm_iam_access_group_members" "members" {
  access_group_id = ibm_iam_access_group.group.id
  iam_service_ids = [
    ibm_iam_service_id.functional_user.id
  ]
}

Actual Behavior

$ terraform apply -auto-approve                                                              

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # ibm_iam_access_group.group will be created
  + resource "ibm_iam_access_group" "group" {
      + id      = (known after apply)
      + name    = (known after apply)
      + version = (known after apply)
    }

  # ibm_iam_access_group_members.members will be created
  + resource "ibm_iam_access_group_members" "members" {
      + access_group_id = (known after apply)
      + iam_service_ids = (known after apply)
      + id              = (known after apply)
      + members         = (known after apply)
    }

  # ibm_iam_service_id.functional_user will be created
  + resource "ibm_iam_service_id" "functional_user" {
      + crn     = (known after apply)
      + iam_id  = (known after apply)
      + id      = (known after apply)
      + locked  = (known after apply)
      + name    = (known after apply)
      + version = (known after apply)
    }

  # random_string.random will be created
  + resource "random_string" "random" {
      + id          = (known after apply)
      + length      = 8
      + lower       = true
      + min_lower   = 0
      + min_numeric = 0
      + min_special = 0
      + min_upper   = 0
      + number      = true
      + result      = (known after apply)
      + special     = false
      + upper       = true
    }

Plan: 4 to add, 0 to change, 0 to destroy.
random_string.random: Creating...
random_string.random: Creation complete after 0s [id=bXqeLprc]
ibm_iam_access_group.group: Creating...
ibm_iam_service_id.functional_user: Creating...
ibm_iam_access_group.group: Creation complete after 0s [id=AccessGroupId-a8fbdad2-81ca-464e-ba3e-5d0487b7ef67]
ibm_iam_service_id.functional_user: Creation complete after 1s [id=ServiceId-147a13e5-9401-4533-a29f-13eaf0c05465]
ibm_iam_access_group_members.members: Creating...
╷
│ Error: Request failed with status code: 404, ServerErrorResponse: <!DOCTYPE html>
│ <html>
│ <head>
│ <title>Error</title>
│ <style>
│     body {
│         width: 35em;
│         margin: 0 auto;
│         font-family: Tahoma, Verdana, Arial, sans-serif;
│     }
│ </style>
│ </head>
│ <body>
│ <h1>An 404 error occurred in iam-gateway.</h1>
│ </body>
│ </html>
│
│   with ibm_iam_access_group_members.members,
│   on main.tf line 40, in resource "ibm_iam_access_group_members" "members":
│   40: resource "ibm_iam_access_group_members" "members" {
│
╵
-----

Steps to Reproduce

export IBMCLOUD_VISIBILITY=private
terraform init
terraform apply
@l2fprod
Copy link
Member Author

l2fprod commented Jul 16, 2021

@hkantare

that one seems fixed but a similar one #2890

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug service/IAM Issues related to IAM Visibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants