From dc295c36579462b18d24e9aba4efa89dce9862b7 Mon Sep 17 00:00:00 2001 From: hkantare Date: Thu, 10 Dec 2020 12:00:12 +0530 Subject: [PATCH] Add validate func for resource_instance_id --- ibm/resource_ibm_cos_bucket.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ibm/resource_ibm_cos_bucket.go b/ibm/resource_ibm_cos_bucket.go index 98f32fd557..59a2f095e6 100644 --- a/ibm/resource_ibm_cos_bucket.go +++ b/ibm/resource_ibm_cos_bucket.go @@ -61,10 +61,11 @@ func resourceIBMCOS() *schema.Resource { Description: "COS Bucket name", }, "resource_instance_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Description: "resource instance ID", + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "resource instance ID", + ValidateFunc: validateRegexp(`^crn:.+:.+:.+:.+:.+:a\/[0-9a-f]{32}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\:\:$`), }, "crn": { Type: schema.TypeString,