terraform-provider-ibm: Cannot provision IBP using ibm_resource_instance

Hello, our environment is IBM Cloud Schematics, Terraform version v0.11.14.

Using Schematics/Terraform, we can successfully provision services on the IBM Cloud such as LogDNA, Sysdig, IBM Cloud Object Storage, and others… however, attempting to provision an instance of IBM Blockchain Platform always fails with the following error:

2020/03/12 22:26:54 Terraform apply | ibm_resource_instance.mos-ibp: Creating...
 2020/03/12 22:26:54 Terraform apply |   crn:                     "" => "<computed>"
 2020/03/12 22:26:54 Terraform apply |   guid:                    "" => "<computed>"
 2020/03/12 22:26:54 Terraform apply |   location:                "" => "us-south"
 2020/03/12 22:26:54 Terraform apply |   name:                    "" => "IBP-MOS"
 2020/03/12 22:26:54 Terraform apply |   plan:                    "" => "standard"
 2020/03/12 22:26:54 Terraform apply |   resource_controller_url: "" => "<computed>"
 2020/03/12 22:26:54 Terraform apply |   resource_crn:            "" => "<computed>"
 2020/03/12 22:26:54 Terraform apply |   resource_group_id:       "" => "b224fe972aab45daa787ac21bf86cd2a"
 2020/03/12 22:26:54 Terraform apply |   resource_group_name:     "" => "<computed>"
 2020/03/12 22:26:54 Terraform apply |   resource_name:           "" => "<computed>"
 2020/03/12 22:26:54 Terraform apply |   resource_status:         "" => "<computed>"
 2020/03/12 22:26:54 Terraform apply |   service:                 "" => "blockchain"
 2020/03/12 22:26:54 Terraform apply |   status:                  "" => "<computed>"
 2020/03/12 22:26:54 Terraform apply |   tags.#:                  "" => "<computed>"
 2020/03/12 22:26:55 Terraform apply | 
 2020/03/12 22:26:55 Terraform apply | Error: Error applying plan:
 2020/03/12 22:26:55 Terraform apply | 
 2020/03/12 22:26:55 Terraform apply | 1 error occurred:
 2020/03/12 22:26:55 Terraform apply | 	* ibm_resource_instance.mos-ibp: 1 error occurred:
 2020/03/12 22:26:55 Terraform apply | 	* ibm_resource_instance.mos-ibp: Cannot create instance of resource blockchain
 2020/03/12 22:26:55 Terraform apply | Use 'ibm_service_instance' if the resource is a Cloud Foundry service

Here’s the block of code from our terraform script:

resource "ibm_resource_instance" "mos-ibp" {
  name              = "IBP-MOS"
  service           = "blockchain"
  plan              = "standard"
  location          = "${var.ibm_region}"
  resource_group_id = "${data.ibm_resource_group.mos_rg.id}"
}

And looking at the source code for terraform-provider-ibm, we can see that this is the line where it fails:

https://github.com/IBM-Cloud/terraform-provider-ibm/blob/master/ibm/resource_ibm_resource_instance.go#L180

IBM Blockchain Platform (v2) is not a Cloud Foundry service; therefore using ibm_service_instance is not the solution. The error message is not quite useful so not sure what is wrong. Looking at the terraform-provider-ibm source code, it looks like there could be some metadata missing on the IBM Blockchain Platform service definition?

Could you please advice? Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16

Most upvoted comments

ETA will be mostly on 26th or 27th March…We will update the issue once we fix Terraform and update Schematics