Update common.go
if empty string is passed, replace by nil
@@ -221,14 +221,26 @@ func expandSettings(d *schema.ResourceData) map[string]interface{} {
scopeSetting := map[string]interface{}{}
if repoID, ok := scopeMap[SchemaRepositoryID]; ok {
+ if repoID == "" {
+ scopeSetting["repositoryId"] = nil
+ } else {
scopeSetting["repositoryId"] = repoID
}
+ }
if repoRef, ok := scopeMap[SchemaRepositoryRef]; ok {
+ if repoRef == "" {
+ scopeSetting["refName"] = nil
+ } else {
scopeSetting["refName"] = repoRef
}
+ }
if matchType, ok := scopeMap[SchemaMatchType]; ok {
+ if matchType == "" {
+ scopeSetting["matchKind"] = nil
+ } else {
scopeSetting["matchKind"] = matchType
}
+ }
scopes[index] = scopeSetting
}
return map[string]interface{}{
