azure

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package azure wraps Azure CLI (az) commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ACRLogin

func ACRLogin(acrName string) error

ACRLogin logs into an Azure Container Registry.

func CreateResourceGroup

func CreateResourceGroup(name, location string) error

CreateResourceGroup creates or updates a resource group.

func DeleteResource

func DeleteResource(resourceType, name, resourceGroup string) error

DeleteResource deletes a specific Azure resource by type.

func DeleteResourceGroup

func DeleteResourceGroup(name string) error

DeleteResourceGroup deletes a resource group (no-wait).

func GetSubscription

func GetSubscription() (string, error)

GetSubscription returns the current subscription name.

func Login

func Login() error

Login runs az login interactively.

func MySQLStart

func MySQLStart(name, resourceGroup string) error

MySQLStart starts a stopped MySQL flexible server.

func MySQLState

func MySQLState(name, resourceGroup string) (string, error)

MySQLState returns the current state of a MySQL flexible server.

func Suffix

func Suffix(resourceGroupName string) string

Suffix generates a 5-character lowercase suffix from a resource group name using SHA-256 hashing. This provides deterministic, unique suffixes.

func WriteTemplate

func WriteTemplate(name string) (string, func(), error)

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

func CheckLogin() (*Account, error)

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.

Jump to

Keyboard shortcuts

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