diff --git a/cli/azd/pkg/azapi/stack_deployments.go b/cli/azd/pkg/azapi/stack_deployments.go index 1a37797c2e4..151e6b4bd45 100644 --- a/cli/azd/pkg/azapi/stack_deployments.go +++ b/cli/azd/pkg/azapi/stack_deployments.go @@ -29,7 +29,7 @@ import ( var FeatureDeploymentStacks = alpha.MustFeatureKey("deployment.stacks") const ( - deploymentStacksConfigKey = "deploymentStacks" + deploymentStacksConfigKey = "DeploymentStacks" stacksPortalUrlFragment = "#@microsoft.onmicrosoft.com/resource" ) @@ -40,7 +40,9 @@ var defaultDeploymentStackOptions = &deploymentStackOptions{ ResourceGroups: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete), Resources: to.Ptr(armdeploymentstacks.DeploymentStacksDeleteDetachEnumDelete), }, - DenySettings: nil, + DenySettings: &armdeploymentstacks.DenySettings{ + Mode: to.Ptr(armdeploymentstacks.DenySettingsModeNone), + }, } type StackDeployments struct { diff --git a/cli/azd/pkg/infra/provisioning/bicep/bicep_provider.go b/cli/azd/pkg/infra/provisioning/bicep/bicep_provider.go index 47fc26bdc20..9d9b02c0f37 100644 --- a/cli/azd/pkg/infra/provisioning/bicep/bicep_provider.go +++ b/cli/azd/pkg/infra/provisioning/bicep/bicep_provider.go @@ -604,13 +604,19 @@ func (p *BicepProvider) Deploy(ctx context.Context) (*provisioning.DeployResult, if parametersHashErr == nil { deploymentTags[azure.TagKeyAzdDeploymentStateParamHashName] = to.Ptr(currentParamsHash) } + + optionsMap, err := convert.ToMap(p.options) + if err != nil { + return nil, err + } + deployResult, err := p.deployModule( ctx, bicepDeploymentData.Target, bicepDeploymentData.CompiledBicep.RawArmTemplate, bicepDeploymentData.CompiledBicep.Parameters, deploymentTags, - p.options.Config, + optionsMap, ) if err != nil { return nil, err @@ -1038,7 +1044,12 @@ func (p *BicepProvider) destroyDeploymentWithConfirmation( p.console.StopSpinner(ctx, progressMessage.Message, input.StepFailed) } }, func(progress *async.Progress[azapi.DeleteDeploymentProgress]) error { - return deployment.Delete(ctx, p.options.Config, progress) + optionsMap, err := convert.ToMap(p.options) + if err != nil { + return err + } + + return deployment.Delete(ctx, optionsMap, progress) }) if err != nil { diff --git a/cli/azd/pkg/infra/provisioning/provider.go b/cli/azd/pkg/infra/provisioning/provider.go index 56ad073cf13..f1094ec4661 100644 --- a/cli/azd/pkg/infra/provisioning/provider.go +++ b/cli/azd/pkg/infra/provisioning/provider.go @@ -19,10 +19,10 @@ const ( ) type Options struct { - Provider ProviderKind `yaml:"provider,omitempty"` - Path string `yaml:"path,omitempty"` - Module string `yaml:"module,omitempty"` - Config map[string]any `yaml:"config,omitempty"` + Provider ProviderKind `yaml:"provider,omitempty"` + Path string `yaml:"path,omitempty"` + Module string `yaml:"module,omitempty"` + DeploymentStacks map[string]any `yaml:"deploymentStacks,omitempty"` // Not expected to be defined at azure.yaml IgnoreDeploymentState bool `yaml:"-"` }