azure

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Alphanumerics, underscores, parentheses, hyphens, periods, and unicode characters that match the regex documentation.
	// Can't end with period. Regex pattern: ^[-\w\._\(\)]+$
	ResourceGroupRT = ResouceType{Abbreviation: "rg", MaxLen: 90, AllowUpperCase: true, AllowHyphen: true}

	ContainerAppRT = ResouceType{Abbreviation: "app", MaxLen: 64, UseName: true, AllowHyphen: true}
	// Alphanumerics
	RegistryRT = ResouceType{Abbreviation: "cr", MaxLen: 50, AllowUpperCase: true}
	// Alphanumerics and hyphens. Start and end with alphanumeric.
	AnalyticsWorkspaceRT = ResouceType{Abbreviation: "log", MaxLen: 24, AllowHyphen: true}
	AssignmentRT         = ResouceType{Abbreviation: "assign", MaxLen: 64, UseName: true}
	// TODO find docs on this..
	KubeRT = ResouceType{Abbreviation: "kube", MaxLen: 64, AllowUpperCase: true}
	// lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters.
	CosmosDBAccountRT = ResouceType{Abbreviation: "cosmos", MaxLen: 50, AllowHyphen: true}
	// TODO find requirements
	MongoDBRT = ResouceType{Abbreviation: "mongo", MaxLen: 24, AllowUpperCase: true}
	// TODO find requirements
	MongoCollectionRT            = ResouceType{Abbreviation: "coll", MaxLen: 24, AllowUpperCase: true, UseName: true}
	ADApplicationRT              = ResouceType{Abbreviation: "aad-app", MaxLen: 64, UseName: true}
	ADServicePrincipalRT         = ResouceType{Abbreviation: "aad-sp", MaxLen: 64, UseName: true}
	ADServicePrincipalPasswordRT = ResouceType{Abbreviation: "aad-spp", MaxLen: 64, UseName: true}
	// Lowercase letters and numbers.
	StorageAccountRT = ResouceType{Abbreviation: "st", MaxLen: 24}
	// 	Lowercase letters, numbers, and hyphens.
	// Start with lowercase letter or number. Can't use consecutive hyphens.
	StorageContainerRT = ResouceType{MaxLen: 63, AllowHyphen: true, UseName: true}
	// Lowercase letters, numbers, and hyphens.
	// Can't start or end with hyphen. Can't use consecutive hyphens.
	StorageQueueRT = ResouceType{MaxLen: 63, AllowHyphen: true, UseName: true}

	//Alphanumerics and hyphens. Start with letter. End with letter or digit. Can't contain consecutive hyphens.
	KeyVaultRT = ResouceType{Abbreviation: "kv", MaxLen: 14, AllowUpperCase: true}

	//Alphanumerics and hyphens.
	EventGridRT = ResouceType{Abbreviation: "evgt", MaxLen: 24, AllowUpperCase: true, AllowHyphen: true, UseName: true}

	//Alphanumerics and hyphens.
	EventSubscriptionRT = ResouceType{Abbreviation: "sub", MaxLen: 24, AllowUpperCase: true, AllowHyphen: true, UseName: true}

	// Alphanumerics and hyphens, Start with letter and end with alphanumeric.
	ApiRT = ResouceType{Abbreviation: "api", MaxLen: 80, AllowHyphen: true, AllowUpperCase: true}

	// Alphanumerics and hyphens, Start with letter and end with alphanumeric.
	ApiManagementRT = ResouceType{Abbreviation: "api-mgmt", MaxLen: 80, AllowHyphen: true, AllowUpperCase: true}

	// Alphanumerics and hyphens, Start with letter and end with alphanumeric.
	ApiOperationPolicyRT = ResouceType{Abbreviation: "api-op-pol", MaxLen: 80, AllowUpperCase: true, AllowHyphen: true, UseName: true}
)

https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules

View Source
var RoleDefinitions = map[string]string{
	"KVSecretsOfficer":    "b86a8fe4-44ce-4948-aee5-eccb2c155cd7",
	"BlobDataContrib":     "ba92f5b4-2d11-453d-a403-e96b0029c9fe",
	"QueueDataContrib":    "974c5e8b-45b9-4653-ba55-5f855dd0fb88",
	"EventGridDataSender": "d5a91429-5739-47e2-a06b-3470a27159e7",

	"TagContributor": "4a9ae827-6dc8-4573-8ac7-8239d42aa03f",
}

Built in role definitions for Azure See below URL for mapping https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles

Functions

Types

type AzureApiManagement

type AzureApiManagement struct {
	pulumi.ResourceState

	Name    string
	Api     *apimanagement.Api
	Service *apimanagement.ApiManagementService
}

type AzureApiManagementArgs

type AzureApiManagementArgs struct {
	ResourceGroupName pulumi.StringInput
	OrgName           pulumi.StringInput
	AdminEmail        pulumi.StringInput
	OpenAPISpec       *openapi3.T
	Apps              map[string]*ContainerApp
}

type ContainerApp

type ContainerApp struct {
	pulumi.ResourceState

	Name          string
	Sp            *SevicePrinciple
	App           *web.ContainerApp
	Subscriptions map[string]*eventgrid.Topic
}

type ContainerAppArgs

type ContainerAppArgs struct {
	ResourceGroupName pulumi.StringInput
	Location          pulumi.StringInput
	SubscriptionID    pulumi.StringInput
	Registry          *containerregistry.Registry
	RegistryUser      pulumi.StringPtrInput
	RegistryPass      pulumi.StringPtrInput
	KubeEnv           *web.KubeEnvironment
	ImageUri          pulumi.StringInput
	Env               web.EnvironmentVarArray
	Compute           project.Compute
	Topics            map[string]*eventgrid.Topic
}

type ContainerApps

type ContainerApps struct {
	pulumi.ResourceState

	Name     string
	Registry *containerregistry.Registry
	Apps     map[string]*ContainerApp
}

type ContainerAppsArgs

type ContainerAppsArgs struct {
	ResourceGroupName pulumi.StringInput
	Location          pulumi.StringInput
	SubscriptionID    pulumi.StringInput

	Topics map[string]*eventgrid.Topic

	KVaultName                    pulumi.StringInput
	StorageAccountBlobEndpoint    pulumi.StringInput
	StorageAccountQueueEndpoint   pulumi.StringInput
	MongoDatabaseName             pulumi.StringInput
	MongoDatabaseConnectionString pulumi.StringInput
}

type MongoCollectionsArgs

type MongoCollectionsArgs struct {
	ResourceGroup *resources.ResourceGroup
}

type ResouceType

type ResouceType struct {
	Abbreviation   string
	MaxLen         int
	AllowUpperCase bool
	AllowHyphen    bool
	UseName        bool
}

type SevicePrinciple

type SevicePrinciple struct {
	pulumi.ResourceState

	Name               string
	ClientID           pulumi.StringOutput
	TenantID           pulumi.StringOutput
	ServicePrincipalId pulumi.StringOutput
	ClientSecret       pulumi.StringOutput
}

type SevicePrincipleArgs

type SevicePrincipleArgs struct {
}

type Storage

type Storage struct {
	pulumi.ResourceState

	Name       string
	Account    *storage.StorageAccount
	Queues     map[string]*storage.Queue
	Containers map[string]*storage.BlobContainer
}

type StorageArgs

type StorageArgs struct {
	ResourceGroupName pulumi.StringInput
}

type Subscriptions

type Subscriptions struct {
	pulumi.ResourceState

	Name string
}

type SubscriptionsArgs

type SubscriptionsArgs struct {
	ResourceGroupName pulumi.StringInput
	Apps              map[string]*ContainerApp
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL