Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
resource_configuration key format verification check (#36)
Browse files Browse the repository at this point in the history
* resource_configuration key format verification check

Signed-off-by: Viraj Indasrao <[email protected]>
  • Loading branch information
virajindasrao authored and markpeek committed Feb 20, 2018
1 parent c36c930 commit 05d55eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vrealize/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ func createResource(d *schema.ResourceData, meta interface{}) error {
//If user_configuration contains resource_list element
// then split user configuration key into resource_name and field_name
splitedArray := strings.SplitN(configKey, keyList[dataKey]+".", 2)
if len(splitedArray) != 2 {
return fmt.Errorf("resource_configuration key is not in correct format. Expected %s to start with %s\n", configKey, keyList[dataKey]+".")
}
//Function call which changes the template field values with user values
templateCatalogItem.Data[keyList[dataKey]], replaced = changeTemplateValue(
templateCatalogItem.Data[keyList[dataKey]].(map[string]interface{}),
Expand Down

0 comments on commit 05d55eb

Please sign in to comment.