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

ICD Service endpoint doesn't exist for region: osl01 #1158

Closed
Pavloro opened this issue Mar 5, 2020 · 7 comments
Closed

ICD Service endpoint doesn't exist for region: osl01 #1158

Pavloro opened this issue Mar 5, 2020 · 7 comments

Comments

@Pavloro
Copy link

Pavloro commented Mar 5, 2020

Hi,
I'm trying to create PostgreSQL DB in osl01 via Terraform on IBM Cloud. Database is created, but terraform fails with error: "ICD Service endpoint doesn't exist for region: "osl01"" ".
Terraform is able to complete a job when I use another region (i.e. eu-de), but not osl01.

Terraform Version

$ terraform version
Terraform v0.12.19
+ provider.ibm v1.2.3

Affected Resource(s)

ibm_database

Terraform Configuration Files

# Configure providers
provider "ibm" {
  region = "osl01"
}

data "ibm_resource_group" "default" {
  name = "Default"
}

resource "ibm_database" "demo-tf" {
  name              = "demo-tf"
  plan              = "standard"
  location          = "osl01"
  service           = "databases-for-postgresql"
  resource_group_id = "${data.ibm_resource_group.default.id}"
  tags              = ["tag1", "tag2"]

  adminpassword                = "******"
  members_memory_allocation_mb = 3072
  members_disk_allocation_mb   = 61440
  users {
    name     = "******"
    password = "******"
  }
}

output "database_id" {
  value = ibm_database.demo-tf.id
}

Debug Output

https://gist.github.com/Pavloro/c0c8feba0f6d66b548e69471a16c0afa
I also tried to use region=eu-de, location=osl01, but it didn't work:

Error getting database config for: crn:v1:bluemix:<DB_id>:: with error Request failed with status code: 500, ServerErrorResponse: {"status":500,"error":"Internal Server Error"}

Expected Behavior

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Actual Behavior

Error: Error getting database client settings: Error occured while configuring IBM Cloud Database Services: "ServiceEndpointDoesnotExist: ICD Service endpoint doesn't exist for region: \"osl01\""

Steps to Reproduce

terraform apply

Important Factoids

Ibm cloud cluster config

    "location": "osl01",
    "dataCenter": "osl01",
    "workerZones": [
        "osl01"
    ],
    "region": "eu-de"
@hkantare
Copy link
Collaborator

hkantare commented Mar 6, 2020

The value of region parameter is wrong it should be
"oslo01" o is missing

provider "ibm" {
region = "oslo01"
}

@Pavloro
Copy link
Author

Pavloro commented Mar 6, 2020

Thanks for your reply!
I referred to the new documentation page [https://cloud.ibm.com/docs/containers?topic=containers-regions-and-zones#endpoint] and cluster config (see above) when I used osl01 as a region/location.
I'm pretty sure that it's a typo in region here https://ibm-cloud.github.io/tf-ibm-docs/v0.24.2/r/database.html, because I didn't find oslo01 other places in ibm documentation.
Anyway I tried to use oslo01 as region parameter and got an error message (database was created, but terraform failed):
Provider: region=oslo01, Resource: location=osl01

Error: Error getting database groups: Request failed with status code: 404, ServerErrorResponse: {"errors":"not_found"}

  on main.tf line 11, in resource "ibm_database" "demo-tf":
  11: resource "ibm_database" "demo-tf" {

Terraform failed here on terraform plan already:
Provider: region=oslo01, Resource: location=oslo01

Error: No deployment found for service plan standard at location oslo01.
Valid location(s) are: ["eu-gb" "jp-tok" "us-east" "us-south" "au-syd" "che01" "eu-de" "osl01" "seo01"].

  on main.tf line 11, in resource "ibm_database" "demo-tf":
  11: resource "ibm_database" "demo-tf" {

@hkantare
Copy link
Collaborator

As a workaround you can export an environmental variable
provider "ibm" {
region = "osl01"
}
export IBMCLOUD_ICD_API_ENDPOINT="https://api.osl01.databases.cloud.ibm.com"
We will plan for the fix in next sprint

@Pavloro
Copy link
Author

Pavloro commented Mar 11, 2020

Thanks for your reply.
Unfortunately workaround didn't work for me.

....
ibm_database.demo-tf: Still creating... [8m21s elapsed]
ibm_database.demo-tf: Still creating... [8m31s elapsed]

Error: Error getting database client settings: Error occured while configuring IBM Cloud Database Services: "ServiceEndpointDoesnotExist: ICD Service endpoint doesn't exist for region: \"osl01\""

  on main.tf line 10, in resource "ibm_database" "demo-tf":
  10: resource "ibm_database" "demo-tf" {

$ printenv 
IBMCLOUD_ICD_API_ENDPOINT=https://api.osl01.databases.cloud.ibm.com
IC_API_KEY= **********

Main.tf file:

# Configure providers
provider "ibm" {
  region = "osl01"
}

data "ibm_resource_group" "default" {
  name = "Default"
}

resource "ibm_database" "demo-tf" {
  name              = "demo-tf"
  plan              = "standard"
  location          = "osl01"
....

@Pavloro
Copy link
Author

Pavloro commented Mar 31, 2020

Hi, what is the status on this issue?

We will plan for the fix in next sprint

@hkantare
Copy link
Collaborator

planning for a release in couple of days. It will be part of the relelase

@hkantare
Copy link
Collaborator

hkantare commented Apr 3, 2020

Fixed in latest release
https://github.com/IBM-Cloud/terraform-provider-ibm/releases/tag/v1.3.0
https://github.com/IBM-Cloud/terraform-provider-ibm/releases/tag/v0.25.0

provider "ibm" {
  region = "osl01"
}

data "ibm_resource_group" "default" {
  name = "Default"
}

resource "ibm_database" "demo-tf" {
  name              = "demo-tf"
  plan              = "standard"
  location          = "osl01"
----

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants