Documentation
¶
Overview ¶
Package azure wraps Azure CLI (az) commands.
Index ¶
- func ACRLogin(acrName string) error
- func CheckSoftDeletedKeyVault(name string) (bool, error)
- func CreateACR(name, resourceGroup, location string) error
- func CreateResourceGroup(name, location string) error
- func DeleteResource(resourceType, name, resourceGroup string) error
- func DeleteResourceGroup(name string) error
- func GetSubscription() (string, error)
- func Login() error
- func MySQLStart(name, resourceGroup string) error
- func MySQLState(name, resourceGroup string) (string, error)
- func PurgeKeyVault(name, location string) error
- func Suffix(resourceGroupName string) string
- func WriteTemplate(name string) (string, func(), error)
- type Account
- type DeploymentOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSoftDeletedKeyVault ¶ added in v0.2.3
CheckSoftDeletedKeyVault checks if a Key Vault exists in soft-deleted state.
func CreateResourceGroup ¶
CreateResourceGroup creates or updates a resource group.
func DeleteResource ¶
DeleteResource deletes a specific Azure resource by type.
func DeleteResourceGroup ¶
DeleteResourceGroup deletes a resource group (no-wait).
func GetSubscription ¶
GetSubscription returns the current subscription name.
func MySQLStart ¶
MySQLStart starts a stopped MySQL flexible server.
func MySQLState ¶
MySQLState returns the current state of a MySQL flexible server.
func PurgeKeyVault ¶ added in v0.2.3
PurgeKeyVault permanently purges a soft-deleted Key Vault.
func Suffix ¶
Suffix generates a 5-character lowercase suffix from a resource group name using SHA-256 hashing. This provides deterministic, unique suffixes.
func WriteTemplate ¶
WriteTemplate extracts an embedded Bicep template to a temp directory and returns the path. The caller should clean up the dir when done.
Types ¶
type Account ¶
type Account struct {
Name string `json:"name"`
ID string `json:"id"`
UserName string `json:"user_name"`
TenantID string `json:"tenantId"`
HomeTenantID string `json:"homeTenantId"`
User struct {
Name string `json:"name"`
Type string `json:"type"`
} `json:"user"`
}
Account represents the current Azure account.
func CheckLogin ¶
CheckLogin checks if az CLI is logged in and returns the account info.
type DeploymentOutput ¶
type DeploymentOutput struct {
BackendEndpoint string
GrafanaEndpoint string
ConfigUIEndpoint string
ACRLoginServer string
ACRName string
KeyVaultName string
MySQLServerName string
}
DeploymentOutput represents selected outputs from a Bicep deployment.
func DeployBicep ¶
func DeployBicep(resourceGroup, templatePath string, params map[string]string) (*DeploymentOutput, error)
DeployBicep deploys a Bicep template and returns the outputs.