helpers

package
v1.44.1-0...-77b165e Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AzureQueueScaleRuleSchema

func AzureQueueScaleRuleSchema() *pluginsdk.Schema

func AzureQueueScaleRuleSchemaComputed

func AzureQueueScaleRuleSchemaComputed() *pluginsdk.Schema

func ContainerAppContainerSchema

func ContainerAppContainerSchema() *pluginsdk.Schema

func ContainerAppContainerSchemaComputed

func ContainerAppContainerSchemaComputed() *pluginsdk.Schema

func ContainerAppEnvironmentDaprMetadataSchema

func ContainerAppEnvironmentDaprMetadataSchema() *pluginsdk.Schema

func ContainerAppIngressCustomDomainSchema

func ContainerAppIngressCustomDomainSchema() *pluginsdk.Schema

func ContainerAppIngressCustomDomainSchemaComputed

func ContainerAppIngressCustomDomainSchemaComputed() *pluginsdk.Schema

func ContainerAppIngressIpSecurityRestriction

func ContainerAppIngressIpSecurityRestriction() *pluginsdk.Schema

func ContainerAppIngressIpSecurityRestrictionComputed

func ContainerAppIngressIpSecurityRestrictionComputed() *pluginsdk.Schema

func ContainerAppIngressSchema

func ContainerAppIngressSchema() *pluginsdk.Schema

func ContainerAppIngressSchemaComputed

func ContainerAppIngressSchemaComputed() *pluginsdk.Schema

func ContainerAppIngressTrafficWeight

func ContainerAppIngressTrafficWeight() *pluginsdk.Schema

func ContainerAppIngressTrafficWeightComputed

func ContainerAppIngressTrafficWeightComputed() *pluginsdk.Schema

func ContainerAppLivenessProbeSchema

func ContainerAppLivenessProbeSchema() *pluginsdk.Schema

func ContainerAppLivenessProbeSchemaComputed

func ContainerAppLivenessProbeSchemaComputed() *pluginsdk.Schema

func ContainerAppProbesRemoved

func ContainerAppProbesRemoved(metadata sdk.ResourceMetaData) bool

func ContainerAppReadinessProbeSchema

func ContainerAppReadinessProbeSchema() *pluginsdk.Schema

func ContainerAppReadinessProbeSchemaComputed

func ContainerAppReadinessProbeSchemaComputed() *pluginsdk.Schema

func ContainerAppRegistrySchema

func ContainerAppRegistrySchema() *pluginsdk.Schema

func ContainerAppRegistrySchemaComputed

func ContainerAppRegistrySchemaComputed() *pluginsdk.Schema

func ContainerAppStartupProbeSchema

func ContainerAppStartupProbeSchema() *pluginsdk.Schema

func ContainerAppStartupProbeSchemaComputed

func ContainerAppStartupProbeSchemaComputed() *pluginsdk.Schema

func ContainerAppsJobsScaleSchema

func ContainerAppsJobsScaleSchema() *pluginsdk.Schema

func ContainerDaprSchema

func ContainerDaprSchema() *pluginsdk.Schema

func ContainerDaprSchemaComputed

func ContainerDaprSchemaComputed() *pluginsdk.Schema

func ContainerEnvVarSchema

func ContainerEnvVarSchema() *pluginsdk.Schema

func ContainerEnvVarSchemaComputed

func ContainerEnvVarSchemaComputed() *pluginsdk.Schema

func ContainerTemplateSchema

func ContainerTemplateSchema() *pluginsdk.Schema

func ContainerTemplateSchemaComputed

func ContainerTemplateSchemaComputed() *pluginsdk.Schema

func ContainerVolumeMountSchema

func ContainerVolumeMountSchema() *pluginsdk.Schema

func ContainerVolumeMountSchemaComputed

func ContainerVolumeMountSchemaComputed() *pluginsdk.Schema

func ContainerVolumeSchema

func ContainerVolumeSchema() *pluginsdk.Schema

func ContainerVolumeSchemaComputed

func ContainerVolumeSchemaComputed() *pluginsdk.Schema

func CustomScaleRuleSchema

func CustomScaleRuleSchema() *pluginsdk.Schema

func CustomScaleRuleSchemaComputed

func CustomScaleRuleSchemaComputed() *pluginsdk.Schema

func DaprSecretsDataSourceSchema

func DaprSecretsDataSourceSchema() *pluginsdk.Schema

func DaprSecretsSchema

func DaprSecretsSchema() *pluginsdk.Schema

func ExpandContainerAppDapr

func ExpandContainerAppDapr(input []Dapr) *containerapps.Dapr

func ExpandContainerAppIngress

func ExpandContainerAppIngress(input []Ingress, appName string) *containerapps.Ingress

func ExpandContainerAppJobConfigurationEventTriggerConfig

func ExpandContainerAppJobConfigurationEventTriggerConfig(input []EventTriggerConfiguration) *jobs.JobConfigurationEventTriggerConfig

func ExpandContainerAppJobConfigurationManualTriggerConfig

func ExpandContainerAppJobConfigurationManualTriggerConfig(input []ManualTriggerConfiguration) *jobs.JobConfigurationManualTriggerConfig

func ExpandContainerAppJobRegistries

func ExpandContainerAppJobRegistries(input []Registry) (*[]jobs.RegistryCredentials, error)

func ExpandContainerAppJobScale

func ExpandContainerAppJobScale(input []ScaleModel) *jobs.JobScale

func ExpandContainerAppJobScaleRules

func ExpandContainerAppJobScaleRules(input []ScaleRule) *[]jobs.JobScaleRule

func ExpandContainerAppJobScaleRulesAuth

func ExpandContainerAppJobScaleRulesAuth(input []ScaleRuleAuth) *[]jobs.ScaleRuleAuth

func ExpandContainerAppJobSecrets

func ExpandContainerAppJobSecrets(input []Secret) *[]jobs.Secret

func ExpandContainerAppJobTemplate

func ExpandContainerAppJobTemplate(input []JobTemplateModel) *jobs.JobTemplate

func ExpandContainerAppRegistries

func ExpandContainerAppRegistries(input []Registry) (*[]containerapps.RegistryCredentials, error)

func ExpandContainerAppTemplate

func ExpandContainerAppTemplate(input []ContainerTemplate, metadata sdk.ResourceMetaData) *containerapps.Template

func ExpandContainerSecrets

func ExpandContainerSecrets(input []Secret) (*[]containerapps.Secret, error)

func ExpandDaprSecrets

func ExpandDaprSecrets(input []DaprSecret) *[]daprcomponents.Secret

func ExpandFormerContainerSecrets

func ExpandFormerContainerSecrets(metadata sdk.ResourceMetaData) *[]containerapps.Secret

func HTTPScaleRuleSchema

func HTTPScaleRuleSchema() *pluginsdk.Schema

func HTTPScaleRuleSchemaComputed

func HTTPScaleRuleSchemaComputed() *pluginsdk.Schema

func InitContainerAppContainerSchema

func InitContainerAppContainerSchema() *pluginsdk.Schema

func InitContainerAppContainerSchemaComputed

func InitContainerAppContainerSchemaComputed() *pluginsdk.Schema

func JobTemplateSchema

func JobTemplateSchema() *pluginsdk.Schema

func PossibleValuesForWorkloadProfileSku

func PossibleValuesForWorkloadProfileSku() []string

func SecretsDataSourceSchema

func SecretsDataSourceSchema() *pluginsdk.Schema

func SecretsSchema

func SecretsSchema() *pluginsdk.Schema

func TCPScaleRuleSchema

func TCPScaleRuleSchema() *pluginsdk.Schema

func TCPScaleRuleSchemaComputed

func TCPScaleRuleSchemaComputed() *pluginsdk.Schema

func UnpackContainerDaprSecretsCollection

func UnpackContainerDaprSecretsCollection(input *daprcomponents.DaprSecretsCollection) *[]daprcomponents.Secret

func UnpackContainerJobSecretsCollection

func UnpackContainerJobSecretsCollection(input *jobs.JobSecretsCollection) *[]jobs.Secret

func UnpackContainerSecretsCollection

func UnpackContainerSecretsCollection(input *containerapps.SecretsCollection) *[]containerapps.Secret

func ValidateContainerAppRegistry

func ValidateContainerAppRegistry(r Registry) error

func WorkloadProfileSchema

func WorkloadProfileSchema() *pluginsdk.Schema

Types

type AzureQueueScaleRule

type AzureQueueScaleRule struct {
	Name            string                    `tfschema:"name"`
	QueueLength     int64                     `tfschema:"queue_length"`
	QueueName       string                    `tfschema:"queue_name"`
	Authentications []ScaleRuleAuthentication `tfschema:"authentication"`
}

type BaseContainer

type BaseContainer struct {
	Name             string                 `tfschema:"name"`
	Image            string                 `tfschema:"image"`
	CPU              float64                `tfschema:"cpu"`
	Memory           string                 `tfschema:"memory"`
	EphemeralStorage string                 `tfschema:"ephemeral_storage"`
	Env              []ContainerEnvVar      `tfschema:"env"`
	Args             []string               `tfschema:"args"`
	Command          []string               `tfschema:"command"`
	VolumeMounts     []ContainerVolumeMount `tfschema:"volume_mounts"`
}

type Container

type Container struct {
	Name             string                       `tfschema:"name"`
	Image            string                       `tfschema:"image"`
	CPU              float64                      `tfschema:"cpu"`
	Memory           string                       `tfschema:"memory"`
	EphemeralStorage string                       `tfschema:"ephemeral_storage"`
	Env              []ContainerEnvVar            `tfschema:"env"`
	Args             []string                     `tfschema:"args"`
	Command          []string                     `tfschema:"command"`
	LivenessProbe    []ContainerAppLivenessProbe  `tfschema:"liveness_probe"`
	ReadinessProbe   []ContainerAppReadinessProbe `tfschema:"readiness_probe"`
	StartupProbe     []ContainerAppStartupProbe   `tfschema:"startup_probe"`
	VolumeMounts     []ContainerVolumeMount       `tfschema:"volume_mounts"`
}

type ContainerAppLivenessProbe

type ContainerAppLivenessProbe struct {
	Transport              string       `tfschema:"transport"`
	Host                   string       `tfschema:"host"`
	Port                   int64        `tfschema:"port"`
	Path                   string       `tfschema:"path"`
	Headers                []HttpHeader `tfschema:"header"`
	InitialDelay           int64        `tfschema:"initial_delay"`
	Interval               int64        `tfschema:"interval_seconds"`
	Timeout                int64        `tfschema:"timeout"`
	FailureThreshold       int64        `tfschema:"failure_count_threshold"`
	TerminationGracePeriod int64        `tfschema:"termination_grace_period_seconds,removedInNextMajorVersion"`
}

type ContainerAppReadinessProbe

type ContainerAppReadinessProbe struct {
	Transport        string       `tfschema:"transport"`
	Host             string       `tfschema:"host"`
	Port             int64        `tfschema:"port"`
	Path             string       `tfschema:"path"`
	Headers          []HttpHeader `tfschema:"header"`
	InitialDelay     int64        `tfschema:"initial_delay"`
	Interval         int64        `tfschema:"interval_seconds"`
	Timeout          int64        `tfschema:"timeout"`
	FailureThreshold int64        `tfschema:"failure_count_threshold"`
	SuccessThreshold int64        `tfschema:"success_count_threshold"`
}

type ContainerAppStartupProbe

type ContainerAppStartupProbe struct {
	Transport              string       `tfschema:"transport"`
	Host                   string       `tfschema:"host"`
	Port                   int64        `tfschema:"port"`
	Path                   string       `tfschema:"path"`
	Headers                []HttpHeader `tfschema:"header"`
	InitialDelay           int64        `tfschema:"initial_delay"`
	Interval               int64        `tfschema:"interval_seconds"`
	Timeout                int64        `tfschema:"timeout"`
	FailureThreshold       int64        `tfschema:"failure_count_threshold"`
	TerminationGracePeriod int64        `tfschema:"termination_grace_period_seconds,removedInNextMajorVersion"`
}

type ContainerEnvVar

type ContainerEnvVar struct {
	Name            string `tfschema:"name"`
	Value           string `tfschema:"value"`
	SecretReference string `tfschema:"secret_name"`
}

type ContainerTemplate

type ContainerTemplate struct {
	Containers             []Container           `tfschema:"container"`
	InitContainers         []BaseContainer       `tfschema:"init_container"`
	Suffix                 string                `tfschema:"revision_suffix"`
	MinReplicas            int64                 `tfschema:"min_replicas"`
	MaxReplicas            int64                 `tfschema:"max_replicas"`
	AzureQueueScaleRules   []AzureQueueScaleRule `tfschema:"azure_queue_scale_rule"`
	CustomScaleRules       []CustomScaleRule     `tfschema:"custom_scale_rule"`
	HTTPScaleRules         []HTTPScaleRule       `tfschema:"http_scale_rule"`
	TCPScaleRules          []TCPScaleRule        `tfschema:"tcp_scale_rule"`
	Volumes                []ContainerVolume     `tfschema:"volume"`
	TerminationGracePeriod int64                 `tfschema:"termination_grace_period_seconds"`
}

func FlattenContainerAppTemplate

func FlattenContainerAppTemplate(input *containerapps.Template) []ContainerTemplate

type ContainerVolume

type ContainerVolume struct {
	Name        string `tfschema:"name"`
	StorageName string `tfschema:"storage_name"`
	StorageType string `tfschema:"storage_type"`
}

type ContainerVolumeMount

type ContainerVolumeMount struct {
	Name    string `tfschema:"name"`
	Path    string `tfschema:"path"`
	SubPath string `tfschema:"sub_path"`
}

type CustomDomain

type CustomDomain struct {
	CertBinding   string `tfschema:"certificate_binding_type"`
	CertificateId string `tfschema:"certificate_id"`
	Name          string `tfschema:"name"`
}

type CustomScaleRule

type CustomScaleRule struct {
	Name            string                    `tfschema:"name"`
	Metadata        map[string]string         `tfschema:"metadata"`
	CustomRuleType  string                    `tfschema:"custom_rule_type"`
	Authentications []ScaleRuleAuthentication `tfschema:"authentication"`
}

type Dapr

type Dapr struct {
	AppId       string `tfschema:"app_id"`
	AppPort     int64  `tfschema:"app_port"`
	AppProtocol string `tfschema:"app_protocol"`
}

func FlattenContainerAppDapr

func FlattenContainerAppDapr(input *containerapps.Dapr) []Dapr

type DaprMetadata

type DaprMetadata struct {
	Name       string `tfschema:"name"`
	Value      string `tfschema:"value"`
	SecretName string `tfschema:"secret_name"`
}

type DaprSecret

type DaprSecret struct {
	Name  string `tfschema:"name"`
	Value string `tfschema:"value"`
}

func FlattenContainerAppDaprSecrets

func FlattenContainerAppDaprSecrets(input *daprcomponents.DaprSecretsCollection) []DaprSecret

type EventTriggerConfiguration

type EventTriggerConfiguration struct {
	Parallelism            int64        `tfschema:"parallelism"`
	ReplicaCompletionCount int64        `tfschema:"replica_completion_count"`
	Scale                  []ScaleModel `tfschema:"scale"`
}

func FlattenContainerAppJobConfigurationEventTriggerConfig

func FlattenContainerAppJobConfigurationEventTriggerConfig(input *jobs.JobConfigurationEventTriggerConfig) []EventTriggerConfiguration

type HTTPScaleRule

type HTTPScaleRule struct {
	Name               string                    `tfschema:"name"`
	ConcurrentRequests string                    `tfschema:"concurrent_requests"`
	Authentications    []ScaleRuleAuthentication `tfschema:"authentication"`
}

type HttpHeader

type HttpHeader struct {
	Name  string `tfschema:"name"`
	Value string `tfschema:"value"`
}

type Ingress

type Ingress struct {
	AllowInsecure          bool                    `tfschema:"allow_insecure_connections"`
	CustomDomains          []CustomDomain          `tfschema:"custom_domain"`
	IsExternal             bool                    `tfschema:"external_enabled"`
	FQDN                   string                  `tfschema:"fqdn"`
	TargetPort             int64                   `tfschema:"target_port"`
	ExposedPort            int64                   `tfschema:"exposed_port"`
	TrafficWeights         []TrafficWeight         `tfschema:"traffic_weight"`
	Transport              string                  `tfschema:"transport"`
	IpSecurityRestrictions []IpSecurityRestriction `tfschema:"ip_security_restriction"`
	ClientCertificateMode  string                  `tfschema:"client_certificate_mode"`
}

func FlattenContainerAppIngress

func FlattenContainerAppIngress(input *containerapps.Ingress, appName string) []Ingress

type IpSecurityRestriction

type IpSecurityRestriction struct {
	Action         string `tfschema:"action"`
	Description    string `tfschema:"description"`
	IpAddressRange string `tfschema:"ip_address_range"`
	Name           string `tfschema:"name"`
}

type JobTemplateModel

type JobTemplateModel struct {
	Containers     []Container       `tfschema:"container"`
	InitContainers []BaseContainer   `tfschema:"init_container"`
	Volumes        []ContainerVolume `tfschema:"volume"`
}

func FlattenContainerAppJobTemplate

func FlattenContainerAppJobTemplate(input *jobs.JobTemplate) []JobTemplateModel

type ManualTriggerConfiguration

type ManualTriggerConfiguration struct {
	Parallelism            int64 `tfschema:"parallelism"`
	ReplicaCompletionCount int64 `tfschema:"replica_completion_count"`
}

func FlattenContainerAppJobConfigurationManualTriggerConfig

func FlattenContainerAppJobConfigurationManualTriggerConfig(input *jobs.JobConfigurationManualTriggerConfig) []ManualTriggerConfiguration

type Registry

type Registry struct {
	PasswordSecretRef string `tfschema:"password_secret_name"`
	Server            string `tfschema:"server"`
	UserName          string `tfschema:"username"`
	Identity          string `tfschema:"identity"`
}

func FlattenContainerAppJobRegistries

func FlattenContainerAppJobRegistries(input *[]jobs.RegistryCredentials) []Registry

func FlattenContainerAppRegistries

func FlattenContainerAppRegistries(input *[]containerapps.RegistryCredentials) []Registry

type ScaleModel

type ScaleModel struct {
	MaxExecutions   int64       `tfschema:"max_executions"`
	MinExecutions   int64       `tfschema:"min_executions"`
	PollingInterval int64       `tfschema:"polling_interval_in_seconds"`
	Rules           []ScaleRule `tfschema:"rules"`
}

type ScaleRule

type ScaleRule struct {
	Auth     []ScaleRuleAuth        `tfschema:"authentication"`
	Metadata map[string]interface{} `tfschema:"metadata"`
	Name     string                 `tfschema:"name"`
	Type     string                 `tfschema:"custom_rule_type"`
}

type ScaleRuleAuth

type ScaleRuleAuth struct {
	SecretReference  string `tfschema:"secret_name"`
	TriggerParameter string `tfschema:"trigger_parameter"`
}

type ScaleRuleAuthentication

type ScaleRuleAuthentication struct {
	SecretRef    string `tfschema:"secret_name"`
	TriggerParam string `tfschema:"trigger_parameter"`
}

type ScheduleTriggerConfiguration

type ScheduleTriggerConfiguration struct {
	CronExpression         string `tfschema:"cron_expression"`
	Parallelism            int64  `tfschema:"parallelism"`
	ReplicaCompletionCount int64  `tfschema:"replica_completion_count"`
}

type Secret

type Secret struct {
	Identity         string `tfschema:"identity"`
	KeyVaultSecretId string `tfschema:"key_vault_secret_id"`
	Name             string `tfschema:"name"`
	Value            string `tfschema:"value"`
}

func FlattenContainerAppJobSecrets

func FlattenContainerAppJobSecrets(input *jobs.JobSecretsCollection) []Secret

func FlattenContainerAppSecrets

func FlattenContainerAppSecrets(input *containerapps.SecretsCollection) []Secret

type TCPScaleRule

type TCPScaleRule struct {
	Name               string                    `tfschema:"name"`
	ConcurrentRequests string                    `tfschema:"concurrent_requests"`
	Authentications    []ScaleRuleAuthentication `tfschema:"authentication"`
}

type TrafficWeight

type TrafficWeight struct {
	Label          string `tfschema:"label"`
	LatestRevision bool   `tfschema:"latest_revision"`
	RevisionSuffix string `tfschema:"revision_suffix"`
	Weight         int64  `tfschema:"percentage"`
}

type WorkloadProfileModel

type WorkloadProfileModel struct {
	MaximumCount        int64  `tfschema:"maximum_count"`
	MinimumCount        int64  `tfschema:"minimum_count"`
	Name                string `tfschema:"name"`
	WorkloadProfileType string `tfschema:"workload_profile_type"`
}

func FlattenWorkloadProfiles

func FlattenWorkloadProfiles(input *[]managedenvironments.WorkloadProfile, consumptionDefined bool) []WorkloadProfileModel

type WorkloadProfileSku

type WorkloadProfileSku string
const (
	WorkloadProfileSkuConsumption WorkloadProfileSku = "Consumption"
	WorkloadProfileSkuD4          WorkloadProfileSku = "D4"
	WorkloadProfileSkuD8          WorkloadProfileSku = "D8"
	WorkloadProfileSkuD16         WorkloadProfileSku = "D16"
	WorkloadProfileSkuD32         WorkloadProfileSku = "D32"
	WorkloadProfileSkuE4          WorkloadProfileSku = "E4"
	WorkloadProfileSkuE8          WorkloadProfileSku = "E8"
	WorkloadProfileSkuE16         WorkloadProfileSku = "E16"
	WorkloadProfileSkuE32         WorkloadProfileSku = "E32"
)

NOTE: the Workload Profile SKUs aren't defined in the Swagger definition so we define them here

Jump to

Keyboard shortcuts

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