Documentation ¶
Index ¶
- Variables
- func NewBicepProvider(bicepCli bicep.BicepCli, azCli azcli.AzCli, ...) Provider
- type BicepProvider
- func (p *BicepProvider) Deploy(ctx context.Context) (*DeployResult, error)
- func (p *BicepProvider) Destroy(ctx context.Context, options DestroyOptions) (*DestroyResult, error)
- func (p *BicepProvider) EnsureEnv(ctx context.Context) error
- func (p *BicepProvider) Initialize(ctx context.Context, projectPath string, options Options) error
- func (p *BicepProvider) LastDeployment(ctx context.Context) (*armresources.DeploymentExtended, error)
- func (p *BicepProvider) Name() string
- func (p *BicepProvider) Preview(ctx context.Context) (*DeployPreviewResult, error)
- func (p *BicepProvider) RequiredExternalTools() []tools.ExternalTool
- func (p *BicepProvider) State(ctx context.Context, options *StateOptions) (*StateResult, error)
Constants ¶
This section is empty.
Variables ¶
var ErrEnsureEnvPreReqBicepCompileFailed = errors.New("")
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), )
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 (p *BicepProvider) LastDeployment(ctx context.Context) (*armresources.DeploymentExtended, error)
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