Documentation ¶
Index ¶
- Variables
- func LoadAcr(id azure.Resource) *acr
- func LoadAks(id azure.Resource, dnsServiceIp, location, principalId, clientId string, ...) *aks
- func LoadAkv(id azure.Resource) *akv
- func LoadPrivateZone(id azure.Resource) *privateZone
- func LoadRg(id arm.ResourceID) *rg
- func LoadZone(id azure.Resource, nameservers []string) *zone
- func NewAcr(ctx context.Context, subscriptionId, resourceGroup, name, location string) (*acr, error)
- func NewAks(ctx context.Context, subscriptionId, resourceGroup, name, location string, ...) (*aks, error)
- func NewAkv(ctx context.Context, ...) (*akv, error)
- func NewPrivateZone(ctx context.Context, subscriptionId, resourceGroup, name string, ...) (*privateZone, error)
- func NewResourceGroup(ctx context.Context, subscriptionId, name, location string, rgOpts ...RgOpt) (*rg, error)
- func NewRoleAssignment(ctx context.Context, subscriptionId, scope, principalId string, role Role) (*roleAssignment, error)
- func NewZone(ctx context.Context, subscriptionId, resourceGroup, name string, ...) (*zone, error)
- type Cert
- type CertOpt
- type McOpt
- type PrivateZoneOpt
- type RgOpt
- type Role
- type ServicePrincipal
- type ZoneOpt
Constants ¶
This section is empty.
Variables ¶
var ( DnsContributorRole = Role{ Name: "DNS Zone Contributor", Id: "/subscriptions/%s/providers/Microsoft.Authorization/roleDefinitions/befefa01-2a29-4197-83a8-272ff33ce314", } PrivateDnsContributorRole = Role{ Name: "Private DNS Zone Contributor", Id: "/subscriptions/%s/providers/Microsoft.Authorization/roleDefinitions/b12aa53e-6015-4669-85d0-8515ebb3ae7f", } AcrPullRole = Role{ Name: "AcrPull", Id: "/subscriptions/%s/providers/Microsoft.Authorization/roleDefinitions/7f951dda-4ed3-4680-a7ca-43fe172d538d", } )
var OsmClusterOpt = McOpt{ Name: "osm cluster", // contains filtered or unexported fields }
var PrivateClusterOpt = McOpt{ Name: "private cluster", // contains filtered or unexported fields }
PrivateClusterOpt specifies that the cluster should be private
Functions ¶
func LoadPrivateZone ¶
func LoadRg ¶
func LoadRg(id arm.ResourceID) *rg
func NewAks ¶
func NewAks(ctx context.Context, subscriptionId, resourceGroup, name, location string, spOpts *ServicePrincipal, mcOpts ...McOpt) (*aks, error)
NewAks creates a new AKS cluster spOpts is optional, if nil then the cluster will use MSI
func NewPrivateZone ¶
func NewPrivateZone(ctx context.Context, subscriptionId, resourceGroup, name string, opts ...PrivateZoneOpt) (*privateZone, error)
func NewResourceGroup ¶
func NewRoleAssignment ¶
Types ¶
type CertOpt ¶
type CertOpt func(cert *azcertificates.CreateCertificateParameters) error
CertOpt specifies what kind of certificate to create
type McOpt ¶
type McOpt struct { Name string // contains filtered or unexported fields }
McOpt specifies what kind of managed cluster to create
type PrivateZoneOpt ¶
type PrivateZoneOpt func(z *armprivatedns.PrivateZone) error
PrivateZoneOpt specifies what kind of private zone to create
type ServicePrincipal ¶
type ServicePrincipal struct { // ApplicationObjectID is Object ID of the application associated with the service principal ApplicationObjectID string // ApplicationClientID is the Client ID of the application and service principal (also called AppID of the service principal) ApplicationClientID string // ServicePrincipalObjectID is Object ID of the service principal ServicePrincipalObjectID string // ServicePrincipalCredPassword is a generated password credential for the application associated with the service principal ServicePrincipalCredPassword string }
ServicePrincipal represents all the information needed to use a service principal including a fresh set of credentials and the associated application and service principal object ids. This representation is intended as read-only as in most cases only one ID is needed to retrieve the rest of the information for testing purposes.
func GetServicePrincipalOptions ¶
func GetServicePrincipalOptions(ctx context.Context, applicationObjectID string, credName string) (*ServicePrincipal, error)
GetServicePrincipalOptions populates a new ServicePrincipalOptions struct with fresh credentials and application/client/servicePrincipal object ids