Documentation ¶
Index ¶
- func CreateIdentity(...) error
- func DeleteIdentity(resourceGroup, identityName string) error
- func EnableSystemAssignedIdentityOnVM(resourceGroup, vmName string) error
- func EnableSystemAssignedIdentityOnVMSS(resourceGroup, vmName string) error
- func EnableUserAssignedIdentityOnVM(resourceGroup, vmName, identityName string) error
- func EnableUserAssignedIdentityOnVMSS(resourceGroup, vmName, identityName string) error
- func GetIdentityClientID(resourceGroup, identityName string) (string, error)
- func GetIdentityPrincipalID(resourceGroup, identityName string) (string, error)
- func GetVMSSSystemAssignedIdentity(resourceGroup, name string) (string, string, error)
- func GetVMSSUserAssignedIdentities(resourceGroup, name string) (map[string]UserAssignedIdentity, error)
- func GetVMSystemAssignedIdentity(resourceGroup, vmName string) (string, string, error)
- func GetVMUserAssignedIdentities(resourceGroup, vmName string) (map[string]UserAssignedIdentity, error)
- func RemoveSystemAssignedIdentityFromVM(resourceGroup, vmName string) error
- func RemoveSystemAssignedIdentityFromVMSS(resourceGroup, name string) error
- func RemoveUserAssignedIdentityFromVM(resourceGroup, vmName, identityName string) error
- func RemoveUserAssignedIdentityFromVMSS(resourceGroup, vmName, identityName string) error
- func StartKubelet(resourceGroup, vmName string) error
- func StartVM(resourceGroup, vmName string) error
- func StopKubelet(resourceGroup, vmName string) error
- func StopVM(resourceGroup, vmName string) error
- func UserIdentityAssignedToVMSS(resourceGroup, vmssName, identityName string) (bool, error)
- func WaitOnReaderRoleAssignment(subscriptionID, resourceGroup, identityName, keyvaultName string) (bool, error)
- type Resource
- type UserAssignedIdentity
- type VMIdentity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIdentity ¶
func CreateIdentity(subscriptionID, resourceGroup, azureClientID, identityName, keyvaultName string) error
CreateIdentity will create a user-assigned identity on Azure, assign 'Reader' role to the identity and assign 'Managed Identity Operator' role to service principal
func DeleteIdentity ¶
DeleteIdentity will delete a given user-assigned identity on Azure
func EnableSystemAssignedIdentityOnVM ¶
EnableSystemAssignedIdentityOnVM will enable a system assigned identity to a VM
func EnableSystemAssignedIdentityOnVMSS ¶
EnableSystemAssignedIdentityOnVMSS will enable a system assigned identity to a VM
func EnableUserAssignedIdentityOnVM ¶
EnableUserAssignedIdentityOnVM will enable a user assigned identity to a VM
func EnableUserAssignedIdentityOnVMSS ¶
EnableUserAssignedIdentityOnVMSS will enable a user assigned identity to a VM
func GetIdentityClientID ¶
GetIdentityClientID will return the client id of a user-assigned identity on Azure
func GetIdentityPrincipalID ¶
GetIdentityPrincipalID will return the principal id (objecet id) of a user-assigned identity on Azure
func GetVMSSSystemAssignedIdentity ¶
GetVMSSSystemAssignedIdentity will return the principal ID and tenant ID of a system assigned identity
func GetVMSSUserAssignedIdentities ¶
func GetVMSSUserAssignedIdentities(resourceGroup, name string) (map[string]UserAssignedIdentity, error)
GetVMSSUserAssignedIdentities will return the list of user assigned identity in a given VM
func GetVMSystemAssignedIdentity ¶
GetVMSystemAssignedIdentity will return the principal ID and tenant ID of a system assigned identity
func GetVMUserAssignedIdentities ¶
func GetVMUserAssignedIdentities(resourceGroup, vmName string) (map[string]UserAssignedIdentity, error)
GetVMUserAssignedIdentities will return the list of user assigned identity in a given VM
func RemoveSystemAssignedIdentityFromVM ¶
RemoveSystemAssignedIdentityFromVM will remove the system assigned identity to a VM
func RemoveSystemAssignedIdentityFromVMSS ¶
RemoveSystemAssignedIdentityFromVMSS will remove the system assigned identity to a VMSS
func RemoveUserAssignedIdentityFromVM ¶
RemoveUserAssignedIdentityFromVM will remove a user assigned identity to a VM
func RemoveUserAssignedIdentityFromVMSS ¶
RemoveUserAssignedIdentityFromVMSS will remove a user assigned identity to a VMSS
func StartKubelet ¶
StartKubelet will start the kubelet on a given VM
func StopKubelet ¶
StopKubelet will stop the kubelet on a given VM
func WaitOnReaderRoleAssignment ¶
func WaitOnReaderRoleAssignment(subscriptionID, resourceGroup, identityName, keyvaultName string) (bool, error)
WaitOnReaderRoleAssignment will block until the assignement of 'Reader' role to an identity is executed successfully
Types ¶
type UserAssignedIdentity ¶
type UserAssignedIdentity struct { ClientID string `json:"clientId"` PrincipalID string `json:"principalId"` }
UserAssignedIdentity is used to parse user assigned identity data from 'az vm identity show'
type VMIdentity ¶
type VMIdentity struct { PrincipalID string `json:"principalId"` TenantID string `json:"tenantId"` Type string `json:"type"` UserAssignedIdentities *json.RawMessage `json:"userAssignedIdentities"` }
VMIdentity is used to parse system assigned identity data from 'az vm identity show'