Documentation ¶
Index ¶
- Constants
- func ContainerAppRID(subscriptionId, resourceGroupName, containerAppName string) string
- func GetResourceGroupName(resourceId string) *string
- func KubernetesServiceRID(subscriptionId, resourceGroupName, clusterName string) string
- func ResourceGroupDeploymentRID(subscriptionId string, resourceGroupName string, deploymentId string) string
- func ResourceGroupRID(subscriptionId, resourceGroupName string) string
- func SpringAppRID(subscriptionId, resourceGroupName, springAppName string) string
- func StaticWebAppRID(subscriptionId, resourceGroupName, staticSiteName string) string
- func SubscriptionDeploymentRID(subscriptionId, deploymentId string) string
- func SubscriptionFromRID(rid string) string
- func SubscriptionRID(subscriptionId string) string
- func WebsiteRID(subscriptionId, resourceGroupName, websiteName string) string
- type ArmParameterFile
- type ArmParameterValue
- type ArmParameters
- type ArmTemplate
- type ArmTemplateOutput
- type ArmTemplateOutputs
- type ArmTemplateParameterAdditionalProperties
- type ArmTemplateParameterDefinition
- type ArmTemplateParameterDefinitions
- type AutoGenInput
- type AzdMetadata
- type AzdMetadataType
- type DeploymentScope
- type RawArmTemplate
Constants ¶
const ( // TagKeyAzdEnvName is the name of the key in the tags map of a resource // used to store the azd environment a resource is associated with. TagKeyAzdEnvName = "azd-env-name" /* #nosec G101 - Potential hardcoded credentials - false positive */ // TagKeyAzdDeploymentStateParamHashName is the name of the key in the tags map of a deployment // used to store the parameters hash. TagKeyAzdDeploymentStateParamHashName = "azd-provision-param-hash" // TagKeyAzdServiceName is the name of the key in the tags map of a resource // used to store the azd service a resource is associated with. TagKeyAzdServiceName = "azd-service-name" )
Variables ¶
This section is empty.
Functions ¶
func ContainerAppRID ¶
func GetResourceGroupName ¶
Find the resource group name from the resource id
func KubernetesServiceRID ¶
func ResourceGroupDeploymentRID ¶
func ResourceGroupDeploymentRID(subscriptionId string, resourceGroupName string, deploymentId string) string
Creates resource group level deployment resource ID
func ResourceGroupRID ¶
Creates resource ID for an Azure resource group
func SpringAppRID ¶
func StaticWebAppRID ¶
func SubscriptionDeploymentRID ¶
Creates subscription-level deployment resource ID
func SubscriptionFromRID ¶
SubscriptionFromRID returns the subscription id component of a resource or panics if the resource id does not contain a subscription.
func SubscriptionRID ¶
Creates Azure subscription resource ID
func WebsiteRID ¶
Types ¶
type ArmParameterFile ¶
type ArmParameterFile struct { Schema string `json:"$schema"` ContentVersion string `json:"contentVersion"` Parameters ArmParameters `json:"parameters"` }
ArmParametersFile is the model type for a `.parameters.json` file. It fits the schema outlined here: https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json
type ArmParameterValue ¶
type ArmParameterValue struct {
Value any `json:"value"`
}
ArmParameterValue wraps the configured value for the parameter.
type ArmParameters ¶
type ArmParameters map[string]ArmParameterValue
ArmParameters is a map of arm template parameters to their configured values.
type ArmTemplate ¶
type ArmTemplate struct { Schema string `json:"$schema"` ContentVersion string `json:"contentVersion"` Parameters ArmTemplateParameterDefinitions `json:"parameters"` Outputs ArmTemplateOutputs `json:"outputs"` Definitions ArmTemplateParameterDefinitions `json:"definitions"` }
ArmTemplate represents an Azure Resource Manager deployment template. It follows the structure outlined at https://learn.microsoft.com/azure/azure-resource-manager/templates/syntax, but only exposes portions of the object that azd cares about.
func (ArmTemplate) TargetScope ¶
func (t ArmTemplate) TargetScope() (DeploymentScope, error)
TargetScope uses the $schema property of the template to determine what scope this template should be deployed at or an error if the scope could not be determined.
type ArmTemplateOutput ¶
type ArmTemplateOutputs ¶
type ArmTemplateOutputs map[string]ArmTemplateOutput
type ArmTemplateParameterAdditionalProperties ¶
type ArmTemplateParameterAdditionalProperties struct { Type string `json:"type"` MinValue *int `json:"minValue,omitempty"` MaxValue *int `json:"maxValue,omitempty"` MinLength *int `json:"minLength,omitempty"` MaxLength *int `json:"maxLength,omitempty"` Metadata map[string]json.RawMessage `json:"metadata"` }
type ArmTemplateParameterDefinition ¶
type ArmTemplateParameterDefinition struct { Type string `json:"type"` DefaultValue any `json:"defaultValue"` AllowedValues *[]any `json:"allowedValues,omitempty"` MinValue *int `json:"minValue,omitempty"` MaxValue *int `json:"maxValue,omitempty"` MinLength *int `json:"minLength,omitempty"` MaxLength *int `json:"maxLength,omitempty"` Metadata map[string]json.RawMessage `json:"metadata"` Ref string `json:"$ref"` Properties ArmTemplateParameterDefinitions `json:"properties,omitempty"` AdditionalProperties ArmTemplateParameterAdditionalProperties `json:"additionalProperties,omitempty"` }
func (ArmTemplateParameterDefinition) AzdMetadata ¶
func (p ArmTemplateParameterDefinition) AzdMetadata() (AzdMetadata, bool)
AzdMetadata returns the value of the "azd" object metadata for this parameter or the zero value if it can not be found.
func (ArmTemplateParameterDefinition) Description ¶
func (p ArmTemplateParameterDefinition) Description() (string, bool)
Description returns the value of the "Description" string metadata for this parameter or empty if it can not be found.
func (*ArmTemplateParameterDefinition) Secure ¶
func (d *ArmTemplateParameterDefinition) Secure() bool
type ArmTemplateParameterDefinitions ¶
type ArmTemplateParameterDefinitions map[string]ArmTemplateParameterDefinition
type AutoGenInput ¶
type AutoGenInput struct { Length uint `json:"length,omitempty"` NoLower *bool `json:"noLower,omitempty"` NoUpper *bool `json:"noUpper,omitempty"` NoNumeric *bool `json:"noNumeric,omitempty"` NoSpecial *bool `json:"noSpecial,omitempty"` MinLower *uint `json:"minLower,omitempty"` MinUpper *uint `json:"minUpper,omitempty"` MinNumeric *uint `json:"minNumeric,omitempty"` MinSpecial *uint `json:"minSpecial,omitempty"` }
type AzdMetadata ¶
type AzdMetadata struct { Type *AzdMetadataType `json:"type,omitempty"` AutoGenerateConfig *AutoGenInput `json:"config,omitempty"` }
type AzdMetadataType ¶
type AzdMetadataType string
const AzdMetadataTypeGenerate AzdMetadataType = "generate"
const AzdMetadataTypeGenerateOrManual AzdMetadataType = "generateOrManual"
const AzdMetadataTypeLocation AzdMetadataType = "location"
type DeploymentScope ¶
type DeploymentScope string
const DeploymentScopeResourceGroup DeploymentScope = "resourceGroup"
const DeploymentScopeSubscription DeploymentScope = "subscription"
type RawArmTemplate ¶
type RawArmTemplate = json.RawMessage
RawArmTemplate is a JSON encoded ARM template.