azureprovider

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

pkg/provider/azure/provider.go

Azure provider for Orkestra.

Handles the "azure" block in Katalog declarations. Uses the official Azure SDK for Go (azure-sdk-for-go v2 / azidentity).

Supported resource kinds:

blob        — Azure Blob Storage container (create, set metadata, delete)
servicebus  — Azure Service Bus namespace topic (create, delete) and subscription (create, delete)
sqldatabase — Azure SQL Database (create, update service tier, delete)

Installation:

go get github.com/Azure/azure-sdk-for-go/sdk/azidentity
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus
go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql

Registration:

p, err := azureprovider.NewFromAuth(ctx, auth)
registry.Register(p)

Auth keys (providers[].auth block):

subscriptionId — Azure subscription ID (required)
tenantId       — Azure tenant ID (required for service principal auth)
clientId       — Service principal / managed identity client ID
clientSecret   — Service principal client secret (omit to use managed identity)
resourceGroup  — Default resource group for all resources (can be overridden per declaration)

When clientSecret is absent, DefaultAzureCredential is used, which supports managed identity, CLI auth, and environment variables in order.

Katalog:

providers:
  - name: azure
    required: true
    auth:
      subscriptionId: "$AZURE_SUBSCRIPTION_ID"
      tenantId: "$AZURE_TENANT_ID"
      clientId: "$AZURE_CLIENT_ID"
      clientSecret: "$AZURE_CLIENT_SECRET"
      resourceGroup: "$AZURE_RESOURCE_GROUP"

operatorBox:
  providers:
    azure:
      - blob:
          storageAccount: "{{ .spec.storageAccount }}"
          container: "{{ .metadata.name }}"
          resourceGroup: "{{ .spec.resourceGroup }}"

      - servicebus:
          namespace: "{{ .spec.sbNamespace }}"
          topic: "{{ .metadata.name }}-events"
          subscription: "{{ .metadata.name }}-sub"
          resourceGroup: "{{ .spec.resourceGroup }}"

      - sqldatabase:
          server: "{{ .spec.sqlServer }}"
          name: "{{ .metadata.name }}"
          sku: Basic
          resourceGroup: "{{ .spec.resourceGroup }}"
          when:
            - field: spec.needsDatabase
              equals: "true"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider implements orktypes.Provider for the "azure" block.

func New

func New(subscriptionID, defaultResourceGroup string, cred azcore.TokenCredential) *Provider

New creates an Azure provider using the supplied credential.

func NewFromAuth

func NewFromAuth(_ context.Context, auth map[string]string) (*Provider, error)

NewFromAuth creates an Azure provider from a Katalog auth map. Keys: subscriptionId, tenantId, clientId, clientSecret, resourceGroup.

func (*Provider) Delete

func (p *Provider) Delete(ctx context.Context, req orktypes.DeleteRequest) error

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) Reconcile

func (p *Provider) Reconcile(ctx context.Context, req orktypes.ReconcileRequest) error

Jump to

Keyboard shortcuts

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