Skip to content

Commit

Permalink
Add validate func for resource_instance_id
Browse files Browse the repository at this point in the history
  • Loading branch information
hkantare committed Dec 10, 2020
1 parent 72d5785 commit 8ac7339
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ibm/resource_ibm_cos_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8ac7339

Please sign in to comment.