Skip to content

Commit

Permalink
azurerm_managed_application - support array for parameters while flat…
Browse files Browse the repository at this point in the history
…tening (#23754)

* azurerm_managed_application - support array for parameters while flattening

* update code
  • Loading branch information
neil-yechenwei committed Nov 1, 2023
1 parent b0a9a94 commit e676abc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ func extractParameterOrOutputValue(v interface{}) (string, error) {
return v.(string), nil
case map[string]interface{}:
return compactParameterOrOutputValue(v)
case []interface{}:
return compactParameterOrOutputValue(v)
default:
return "", fmt.Errorf("unexpected type %T", t)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ resource "azurerm_managed_application" "test" {
key_0 = 0
}
}
},
arrayParameter = {
value = ["value_1", "value_2"]
}
})
}
Expand Down Expand Up @@ -510,6 +513,9 @@ resource "azurerm_managed_application" "test" {
key_0 = 0
}
}
},
arrayParameter = {
value = ["value_1", "value_2"]
}
})
}
Expand Down Expand Up @@ -600,6 +606,9 @@ func (r ManagedApplicationResource) templateAllSupportedParametersTypes(data acc
},
"objectParameter": {
"type": "object"
},
"arrayParameter": {
"type": "array"
}
`
return r.template(data, parameters)
Expand Down Expand Up @@ -675,6 +684,10 @@ resource "azurerm_managed_application_definition" "test" {
"key_0": 0
}
}
},
"arrayOutput": {
"type": "array",
"value": ["value_1", "value_2"]
}
}
}
Expand Down

0 comments on commit e676abc

Please sign in to comment.