From d9c9bfbae8bc7e36f3e464dce8ad984eeae10434 Mon Sep 17 00:00:00 2001 From: Feiyu Shi Date: Wed, 20 May 2020 20:39:28 -0700 Subject: [PATCH] add identity field to the template --- builder/azure/common/template/template.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/builder/azure/common/template/template.go b/builder/azure/common/template/template.go index b90d0104b..bb430fbb4 100644 --- a/builder/azure/common/template/template.go +++ b/builder/azure/common/template/template.go @@ -34,6 +34,7 @@ type Resource struct { Properties *Properties `json:"properties,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` Resources *[]Resource `json:"resources,omitempty"` + Identity *Identity `json:"identity,omitempty"` } type Plan struct { @@ -98,6 +99,17 @@ type Properties struct { Value *string `json:"value,omitempty"` } +// Template > Resource > Identity +type Identity struct { + Type *string `json:"type,omitempty"` + UserAssignedIdentities map[string]*UserAssignedIdentitiesValue `json:"userAssignedIdentities"` +} + +type UserAssignedIdentitiesValue struct { + PrincipalId *string `json:"principalId,omitempty"` + ClientId *string `json:"clientId,omitempty"` +} + type AccessPolicies struct { ObjectId *string `json:"objectId,omitempty"` TenantId *string `json:"tenantId,omitempty"`