Closed neil-yechenwei closed 4 years ago
@neil-yechenwei Which one in this case is wrong? Can you help attach your api.yaml
file link here?
@houkms the error here is tags := v["tags"].(map[string]interface{})
, while we are using it in Tags: tags.Expand(t)
, therefore undefined: t
error pops up.
I renamed tags
to t
because the latest standard is using t
instead of tags
. But I only handle it in the root properties, I did not expect any Azure sub-properties to contain tags
. Obviously in this case we have a sub-property tags
.
So here we have two TODO items:
t
instead of tags
in sub-propertiestags
as sub-properties, also etag
, id
, location
are all the weird sub-properties as @neil-yechenwei demonstrated in the sample codeThis issue is solved in #49
Error: azurerm\resource_arm_private_link_service.go:844:19: tags.Expand undefined (type map[string]interface {} has no field or method Expand) azurerm\resource_arm_private_link_service.go:844:27: undefined: t
func expandArmPrivateLinkServicePrivateEndpoint(input []interface{}) *network.PrivateEndpoint { if len(input) == 0 { return nil } v := input[0].(map[string]interface{}) id := v["id"].(string) location := azure.NormalizeLocation(v["location"].(string)) tags := v["tags"].(map[string]interface{}) etag := v["etag"].(string) result := network.PrivateEndpoint{ Etag: utils.String(etag), ID: utils.String(id), Location: utils.String(location), Tags: tags.Expand(t), } return &result }