IBM-Cloud / terraform-provider-ibm

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

Add support for serviceID in resource key #1120

Open hkantare opened 4 years ago

hkantare commented 4 years ago

Add parameter support to pass the serviceID in resource key

hkantare commented 4 years ago

But as a work around we can pass serviceID as one of the parameter

data "ibm_resource_instance" "resource_instance" {
  name = "myobjectsotrage"
}

resource "ibm_iam_service_id" "serviceID" {
  name        = "test"
  description = "New ServiceID"
}

resource "ibm_resource_key" "resourceKey" {
  name                 = "myobjectkey"
  role                 = "Viewer"
  resource_instance_id = data.ibm_resource_instance.resource_instance.id
  parameters = {
    "serviceid_crn" = ibm_iam_service_id.serviceID.crn
  }

  //User can increase timeouts
  timeouts {
    create = "15m"
    delete = "15m"
  }
}
hkantare commented 4 years ago

Updated the workaround in docs