Documentation ¶
Index ¶
- Variables
- func JoinCamelCase(ss []string) string
- func ResourceName(ctx *pulumi.Context, name string, rt ResourceType) string
- func StringTrunc(s string, max int) string
- type ApiResources
- type AzureApiConfig
- type AzureConfig
- type AzureConfigItem
- type AzureContainerAppsConfig
- type AzureEventGridTopic
- type AzureEventGridTopicArgs
- type AzureHttpProxy
- type AzureHttpProxyArgs
- type ContainerApp
- type ContainerAppArgs
- type ContainerEnv
- type ContainerEnvArgs
- type NitricAzurePulumiProvider
- func (p *NitricAzurePulumiProvider) Api(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (p *NitricAzurePulumiProvider) Batch(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (p *NitricAzurePulumiProvider) Bucket(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (a *NitricAzurePulumiProvider) Config() (auto.ConfigMap, error)
- func (p *NitricAzurePulumiProvider) Http(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (a *NitricAzurePulumiProvider) Init(attributes map[string]interface{}) error
- func (p *NitricAzurePulumiProvider) KeyValueStore(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (p *NitricAzurePulumiProvider) Policy(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (a *NitricAzurePulumiProvider) Post(ctx *pulumi.Context) error
- func (a *NitricAzurePulumiProvider) Pre(ctx *pulumi.Context, nitricResources []*pulumix.NitricPulumiResource[any]) error
- func (a *NitricAzurePulumiProvider) Queue(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (a *NitricAzurePulumiProvider) Result(ctx *pulumi.Context) (pulumi.StringOutput, error)
- func (p *NitricAzurePulumiProvider) Schedule(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (p *NitricAzurePulumiProvider) Secret(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (p *NitricAzurePulumiProvider) Service(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (a *NitricAzurePulumiProvider) SqlDatabase(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (p *NitricAzurePulumiProvider) Topic(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- func (a *NitricAzurePulumiProvider) Websocket(ctx *pulumi.Context, parent pulumi.Resource, name string, ...) error
- type Policy
- type PrincipalMap
- type ResourceType
- type RoleDefinition
- type Roles
- type Schedule
- type ScheduleArgs
- type ServicePrincipal
- type ServicePrincipalArgs
- type StackRoles
- type StackRolesArgs
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 = ResourceType{Abbreviation: "rg", MaxLen: 90, AllowUpperCase: true, AllowHyphen: true} ContainerAppRT = ResourceType{Abbreviation: "app", MaxLen: 28, UseName: true, AllowHyphen: true} // Alphanumerics RegistryRT = ResourceType{Abbreviation: "cr", MaxLen: 50, AllowUpperCase: true} // Alphanumerics and hyphens. Start and end with alphanumeric. AnalyticsWorkspaceRT = ResourceType{Abbreviation: "log", MaxLen: 24, AllowHyphen: true} AssignmentRT = ResourceType{Abbreviation: "assign", MaxLen: 64, UseName: true} KubeRT = ResourceType{Abbreviation: "kube", MaxLen: 64, AllowUpperCase: true} // lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. CosmosDBAccountRT = ResourceType{Abbreviation: "cosmos", MaxLen: 50, AllowHyphen: true} MongoDBRT = ResourceType{Abbreviation: "mongo", MaxLen: 24, AllowUpperCase: true} ADApplicationRT = ResourceType{Abbreviation: "aad-app", MaxLen: 64, UseName: true} ADServicePrincipalRT = ResourceType{Abbreviation: "aad-sp", MaxLen: 64, UseName: true} ADServicePrincipalPasswordRT = ResourceType{Abbreviation: "aad-spp", MaxLen: 64, UseName: true} // Lowercase letters and numbers. StorageAccountRT = ResourceType{Abbreviation: "st", MaxLen: 24} // Lowercase letters, numbers, and hyphens. // Start with lowercase letter or number. Can't use consecutive hyphens. StorageContainerRT = ResourceType{MaxLen: 63, AllowHyphen: true, UseName: true} // Lowercase letters, numbers, and hyphens. // Can't start or end with hyphen. Can't use consecutive hyphens. StorageQueueRT = ResourceType{MaxLen: 63, AllowHyphen: true, UseName: true} // Alphanumerics and hyphens. Start with letter. End with letter or digit. Can't contain consecutive hyphens. KeyVaultRT = ResourceType{Abbreviation: "kv", MaxLen: 14, AllowUpperCase: true} // Alphanumerics and hyphens. EventGridRT = ResourceType{Abbreviation: "evgt", MaxLen: 24, AllowUpperCase: true, AllowHyphen: true, UseName: true} // Alphanumerics and hyphens. EventSubscriptionRT = ResourceType{Abbreviation: "sub", MaxLen: 24, AllowUpperCase: true, AllowHyphen: true, UseName: true} // Alphanumerics and hyphens, Start with letter and end with alphanumeric. ApiRT = ResourceType{Abbreviation: "api", MaxLen: 80, AllowHyphen: true, AllowUpperCase: true} // Alphanumerics and hyphens, Start with letter and end with alphanumeric. ApiHttpProxyRT = ResourceType{Abbreviation: "httpproxy", MaxLen: 80, AllowHyphen: true, AllowUpperCase: true, UseName: true} // Alphanumerics and hyphens, Start with letter and end with alphanumeric. ApiManagementRT = ResourceType{Abbreviation: "api-mgmt", MaxLen: 80, AllowHyphen: true, AllowUpperCase: true} // Alphanumerics and hyphens, Start with letter and end with alphanumeric. ApiManagementServiceRT = ResourceType{Abbreviation: "api-mgmt", MaxLen: 50, AllowHyphen: true, AllowUpperCase: true} ApiManagementProxyRT = ResourceType{Abbreviation: "proxy-mgmt", MaxLen: 50, AllowHyphen: true, AllowUpperCase: true, UseName: true} // Alphanumerics and hyphens, Start with letter and end with alphanumeric. ApiOperationPolicyRT = ResourceType{Abbreviation: "api-op-pol", MaxLen: 80, AllowUpperCase: true, AllowHyphen: true, UseName: true} // Lowercase letters and numbers. DatabaseServerRT = ResourceType{Abbreviation: "pg-svr", MaxLen: 24} )
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 ¶
func JoinCamelCase ¶
func ResourceName ¶
func ResourceName(ctx *pulumi.Context, name string, rt ResourceType) string
ResourceName generates a name for the deployed version of a resource in Azure. follows restrictions like max length, hyphenation, etc.
func StringTrunc ¶
Types ¶
type ApiResources ¶
type ApiResources struct { ApiManagementService *apimanagement.ApiManagementService Api *apimanagement.Api }
type AzureApiConfig ¶
type AzureApiConfig struct {
Description string
}
type AzureConfig ¶
type AzureConfig struct { Refresh bool ResourceGroup string `mapstructure:"resource-group"` Org string `mapstructure:"org"` AdminEmail string `mapstructure:"adminemail"` Apis map[string]*AzureApiConfig config.AbstractConfig[*AzureConfigItem] `mapstructure:"config,squash"` }
func ConfigFromAttributes ¶
func ConfigFromAttributes(attributes map[string]interface{}) (*AzureConfig, error)
Return AzureConfig from stack attributes
type AzureConfigItem ¶
type AzureConfigItem struct { ContainerApps *AzureContainerAppsConfig `mapstructure:"containerapps,omitempty"` Telemetry int }
type AzureEventGridTopic ¶
type AzureEventGridTopic struct { pulumi.ResourceState Name string SourceResourceName string Topic *eventgrid.Topic }
Topics
type AzureEventGridTopicArgs ¶
type AzureEventGridTopicArgs struct { StackID string ResourceGroup *resources.ResourceGroup }
type AzureHttpProxy ¶
type AzureHttpProxy struct { pulumi.ResourceState Name string Api *apimanagement.Api Service *apimanagement.ApiManagementService }
type AzureHttpProxyArgs ¶
type AzureHttpProxyArgs struct { StackID string ResourceGroupName pulumi.StringInput OrgName pulumi.StringInput AdminEmail pulumi.StringInput App *ContainerApp ManagedIdentity *managedidentity.UserAssignedIdentity }
type ContainerApp ¶
type ContainerApp struct { pulumi.ResourceState Name string Sp *ServicePrincipal App *app.ContainerApp EventToken pulumi.StringOutput // contains filtered or unexported fields }
func (*ContainerApp) HostUrl ¶
func (c *ContainerApp) HostUrl() (pulumi.StringOutput, error)
HostUrl - Returns the HostURL of the application this will also ensure that the application has been successfully deployed
type ContainerAppArgs ¶
type ContainerAppArgs struct { ResourceGroupName pulumi.StringInput Location pulumi.StringInput StackID string SubscriptionID pulumi.StringInput Registry *containerregistry.Registry RegistryUser pulumi.StringPtrInput RegistryPass pulumi.StringPtrInput ManagedEnv *app.ManagedEnvironment Env app.EnvironmentVarArray ImageUri pulumi.StringInput Service *deploy.Service ManagedIdentityID pulumi.StringOutput MongoDatabaseName pulumi.StringInput MongoDatabaseConnectionString pulumi.StringInput Config AzureContainerAppsConfig Schedules []*deploy.Resource }
type ContainerEnv ¶
type ContainerEnv struct { pulumi.ResourceState Name string DockerProvider *docker.Provider Registry *containerregistry.Registry RegistryArgs *docker.RegistryArgs ManagedEnv *app.ManagedEnvironment Env app.EnvironmentVarArray ManagedUser *managedidentity.UserAssignedIdentity }
type ContainerEnvArgs ¶
type NitricAzurePulumiProvider ¶
type NitricAzurePulumiProvider struct { *deploy.CommonStackDetails StackId string AzureConfig *AzureConfig ClientConfig *authorization.GetClientConfigResult ResourceGroup *resources.ResourceGroup KeyVault *keyvault.Vault StorageAccount *storage.StorageAccount ContainerEnv *ContainerEnv Apis map[string]ApiResources HttpProxies map[string]ApiResources Buckets map[string]*storage.BlobContainer Queues map[string]*storage.Queue Principals map[resourcespb.ResourceType]map[string]*ServicePrincipal ContainerApps map[string]*ContainerApp Topics map[string]*eventgrid.Topic KeyValueStores map[string]*storage.Table SqlMigrations map[string]*containerinstance.ContainerGroup DatabaseServer *dbforpostgresql.Server DbMasterPassword *random.RandomPassword VirtualNetwork *network.VirtualNetwork DatabaseSubnet *network.Subnet InfrastructureSubnet *network.Subnet ContainerGroupSubnet *network.Subnet Roles *Roles provider.NitricDefaultOrder // contains filtered or unexported fields }
func NewNitricAzurePulumiProvider ¶
func NewNitricAzurePulumiProvider() *NitricAzurePulumiProvider
func (*NitricAzurePulumiProvider) Api ¶
func (p *NitricAzurePulumiProvider) Api(ctx *pulumi.Context, parent pulumi.Resource, name string, config *deploymentspb.Api) error
func (*NitricAzurePulumiProvider) Batch ¶
func (p *NitricAzurePulumiProvider) Batch(ctx *pulumi.Context, parent pulumi.Resource, name string, config *deploymentspb.Batch, runtimeProvider provider.RuntimeProvider) error
func (*NitricAzurePulumiProvider) Bucket ¶
func (p *NitricAzurePulumiProvider) Bucket(ctx *pulumi.Context, parent pulumi.Resource, name string, config *deploymentspb.Bucket) error
func (*NitricAzurePulumiProvider) Config ¶
func (a *NitricAzurePulumiProvider) Config() (auto.ConfigMap, error)
func (*NitricAzurePulumiProvider) Http ¶
func (p *NitricAzurePulumiProvider) Http(ctx *pulumi.Context, parent pulumi.Resource, name string, http *deploymentspb.Http) error
func (*NitricAzurePulumiProvider) Init ¶
func (a *NitricAzurePulumiProvider) Init(attributes map[string]interface{}) error
func (*NitricAzurePulumiProvider) KeyValueStore ¶
func (p *NitricAzurePulumiProvider) KeyValueStore(ctx *pulumi.Context, parent pulumi.Resource, name string, config *deploymentspb.KeyValueStore) error
func (*NitricAzurePulumiProvider) Policy ¶
func (p *NitricAzurePulumiProvider) Policy(ctx *pulumi.Context, parent pulumi.Resource, name string, policy *deploymentspb.Policy) error
func (*NitricAzurePulumiProvider) Post ¶
func (a *NitricAzurePulumiProvider) Post(ctx *pulumi.Context) error
func (*NitricAzurePulumiProvider) Pre ¶
func (a *NitricAzurePulumiProvider) Pre(ctx *pulumi.Context, nitricResources []*pulumix.NitricPulumiResource[any]) error
func (*NitricAzurePulumiProvider) Queue ¶
func (a *NitricAzurePulumiProvider) Queue(ctx *pulumi.Context, parent pulumi.Resource, name string, config *deploymentspb.Queue) error
func (*NitricAzurePulumiProvider) Result ¶
func (a *NitricAzurePulumiProvider) Result(ctx *pulumi.Context) (pulumi.StringOutput, error)
func (*NitricAzurePulumiProvider) Schedule ¶
func (p *NitricAzurePulumiProvider) Schedule(ctx *pulumi.Context, parent pulumi.Resource, name string, config *deploymentspb.Schedule) error
func (*NitricAzurePulumiProvider) Secret ¶
func (p *NitricAzurePulumiProvider) Secret(ctx *pulumi.Context, parent pulumi.Resource, name string, config *deploymentspb.Secret) error
func (*NitricAzurePulumiProvider) Service ¶
func (p *NitricAzurePulumiProvider) Service(ctx *pulumi.Context, parent pulumi.Resource, name string, service *pulumix.NitricPulumiServiceConfig, runtime provider.RuntimeProvider) error
func (*NitricAzurePulumiProvider) SqlDatabase ¶
func (a *NitricAzurePulumiProvider) SqlDatabase(ctx *pulumi.Context, parent pulumi.Resource, name string, config *deploymentspb.SqlDatabase) error
type Policy ¶
type Policy struct { pulumi.ResourceState Name string }
type PrincipalMap ¶
type PrincipalMap = map[resourcespb.ResourceType]map[string]*ServicePrincipal
type ResourceType ¶
type RoleDefinition ¶
type RoleDefinition struct { Description pulumi.StringInput Permissions authorization.PermissionArray AssignableScopes pulumi.StringArray }
type Roles ¶
type Roles struct { pulumi.ResourceState Name string RoleDefinitions map[resourcespb.Action]*authorization.RoleDefinition }
func CreateRoles ¶
type Schedule ¶
type Schedule struct { pulumi.ResourceState Name string Component *app.DaprComponent }
type ScheduleArgs ¶
type ScheduleArgs struct { ResourceGroupName pulumi.StringInput Target *ContainerApp Environment *app.ManagedEnvironment Schedule *deploymentspb.Schedule }
type ServicePrincipal ¶
type ServicePrincipal struct { pulumi.ResourceState Name string ClientID pulumi.StringOutput TenantID pulumi.StringOutput ServicePrincipalId pulumi.StringOutput ClientSecret pulumi.StringOutput }
func NewServicePrincipal ¶
func NewServicePrincipal(ctx *pulumi.Context, name string, args *ServicePrincipalArgs, opts ...pulumi.ResourceOption) (*ServicePrincipal, error)
type ServicePrincipalArgs ¶
type ServicePrincipalArgs struct{}
type StackRoles ¶
type StackRoles struct { pulumi.ResourceState Name string ClientID pulumi.StringOutput TenantID pulumi.StringOutput ServicePrincipalId pulumi.StringOutput ClientSecret pulumi.StringOutput }
type StackRolesArgs ¶
type StackRolesArgs struct{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.