Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

MM defined incorrect tags variable for sub resource #117

Open
neil-yechenwei opened this issue Sep 11, 2019 · 1 comment
Open

MM defined incorrect tags variable for sub resource #117

neil-yechenwei opened this issue Sep 11, 2019 · 1 comment

Comments

@neil-yechenwei
Copy link
Collaborator

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
}

@neil-yechenwei
Copy link
Collaborator Author

After checked, we can specify the tags for sub resource "private endpoint" while creating parent resource "private link service". Attached snapshot.

Capture
Capture2

@neil-yechenwei neil-yechenwei changed the title MM defined incorrect tags variable in expand function MM defined incorrect tags variable for sub resource Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant