From a6d3b7ce51d4bfd9d89742098ed5ace2eca65796 Mon Sep 17 00:00:00 2001 From: "hkantare@in.ibm.com" Date: Fri, 21 Feb 2020 14:16:34 +0530 Subject: [PATCH] Add workaround for serviceID in resourceKey --- website/docs/r/resource_key.html.markdown | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/website/docs/r/resource_key.html.markdown b/website/docs/r/resource_key.html.markdown index 117a847df1..1261593a5e 100644 --- a/website/docs/r/resource_key.html.markdown +++ b/website/docs/r/resource_key.html.markdown @@ -30,6 +30,36 @@ resource "ibm_resource_key" "resourceKey" { } ``` +**Note** The current `ibm_resource_key` resource doesn't have support for service_id argument but the service_id can be passesd as one of the parameter. + +## Example Usage with serviceID + +```hcl +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" + } +} +``` + ## Timeouts ibm_resource_key provides the following [Timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) configuration options: