bicep

package
v0.0.0-...-2374456 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEnsureEnvPreReqBicepCompileFailed = errors.New("")
View Source
var ErrResourceGroupScopeNotSupported = fmt.Errorf(
	"resource group scoped deployments are currently under alpha support and need to be explicitly enabled."+
		" Run `%s` to enable this feature.", alpha.GetEnableCommand(ResourceGroupDeploymentFeature),
)
View Source
var ResourceGroupDeploymentFeature = alpha.MustFeatureKey("resourceGroupDeployments")

Functions

func NewBicepProvider

func NewBicepProvider(
	bicepCli bicep.BicepCli,
	azCli azcli.AzCli,
	deploymentsService azapi.Deployments,
	deploymentOperations azapi.DeploymentOperations,
	envManager environment.Manager,
	env *environment.Environment,
	console input.Console,
	prompters prompt.Prompter,
	curPrincipal CurrentPrincipalIdProvider,
	alphaFeatureManager *alpha.FeatureManager,
	clock clock.Clock,
	keyvaultService keyvault.KeyVaultService,
	portalUrlBase string,
) Provider

NewBicepProvider creates a new instance of a Bicep Infra provider

Types

type BicepProvider

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

BicepProvider exposes infrastructure provisioning using Azure Bicep templates

func (*BicepProvider) Deploy

func (p *BicepProvider) Deploy(ctx context.Context) (*DeployResult, error)

Provisioning the infrastructure within the specified template

func (*BicepProvider) Destroy

func (p *BicepProvider) Destroy(ctx context.Context, options DestroyOptions) (*DestroyResult, error)

Destroys the specified deployment by deleting all azure resources, resource groups & deployments that are referenced.

func (*BicepProvider) EnsureEnv

func (p *BicepProvider) EnsureEnv(ctx context.Context) error

EnsureEnv ensures that the environment is in a provision-ready state with required values set, prompting the user if values are unset. This also requires that the Bicep module can be compiled.

func (*BicepProvider) Initialize

func (p *BicepProvider) Initialize(ctx context.Context, projectPath string, options Options) error

Initialize initializes provider state from the options. It also calls EnsureEnv, which ensures the client-side state is ready for provisioning.

func (*BicepProvider) LastDeployment

func (*BicepProvider) Name

func (p *BicepProvider) Name() string

Name gets the name of the infra provider

func (*BicepProvider) Preview

func (p *BicepProvider) Preview(ctx context.Context) (*DeployPreviewResult, error)

Preview runs deploy using the what-if argument

func (*BicepProvider) RequiredExternalTools

func (p *BicepProvider) RequiredExternalTools() []tools.ExternalTool

func (*BicepProvider) State

func (p *BicepProvider) State(ctx context.Context, options *StateOptions) (*StateResult, error)

Jump to

Keyboard shortcuts

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