Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/armCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ func getMPFARM(cmd *cobra.Command, args []string) {
TemplateFilePath: flgTemplateFilePath,
ParametersFilePath: flgParametersFilePath,
DeploymentName: deploymentName,
Location: flgLocation,
}

var rgManager usecase.ResourceGroupManager
Expand Down
1 change: 0 additions & 1 deletion cmd/bicepCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ func getMPFBicep(cmd *cobra.Command, args []string) {
TemplateFilePath: armTemplatePath,
ParametersFilePath: flgParametersFilePath,
DeploymentName: deploymentName,
Location: flgLocation,
}

var rgManager usecase.ResourceGroupManager
Expand Down
2 changes: 1 addition & 1 deletion docs/mpf-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For each deployment type (ARM, Terraform) an implementation of the `DeploymentAu

- The deployment type commands i.e. [armCmd](../cmd/armCmd.go), [bicepCmd](../cmd/bicepCmd.go), and [terraformCmd](../cmd/terraformCmd.go) are responsible for initializing the required dependencies including the `MPFService` to find the minimum permissions required for the deployment. This is illustrated in the sequence diagram below.
- [pkg/usecase/mpfService.go](../pkg/usecase/mpfService.go): Orchestrates the whole process of finding the minimum permissions required for any deployment type (ARM/Bicep/Terraform). It uses the `DeploymentAuthorizationCheckerCleaner` abstraction for any deployment type, be it ARM, Bicep, or Terraform. On receiving deployment authorization errors, it uses the `AuthorizationErrorParser` to parse the authorization errors and get the missing permissions and scopes. After adding the missing permissions to the custom role, it retries the deployment until it succeeds. It also cleans up all resources created during the process.
- [pkg/infrastructure/authorizationCheckers/ARMTemplateWhatIf/armTemplateWhatIfAuthorizationChecker.go](../pkg/infrastructure/authorizationCheckers/ARMTemplateWhatIf/armTemplateWhatIfAuthorizationChecker.go): Contains the DeploymentAuthorizationCheckerCleaner implementation for ARM (and Bicep) deployments.
- [pkg/infrastructure/authorizationCheckers/ARMTemplateDeployment/armTemplateAuthorizationChecker.go](../pkg/infrastructure/authorizationCheckers/ARMTemplateDeployment/armTemplateAuthorizationChecker.go): Contains the DeploymentAuthorizationCheckerCleaner implementation for ARM (and Bicep) deployments.
- [pkg/infrastructure/authorizationCheckers/terraform/terraformAuthorizationChecker.go](../pkg/infrastructure/authorizationCheckers/terraform/terraformAuthorizationChecker.go): Contains the DeploymentAuthorizationCheckerCleaner implementation for Terraform deployments.
- [pkg/domain/authorizationErrorParser.go](../pkg/domain/authorizationErrorParser.go): Contains the core logic for the MPF, which is to parse the different kinds of authorization errors and figure out the required permissions and scopes from those errors.

Expand Down
2 changes: 0 additions & 2 deletions pkg/infrastructure/ARMTemplateShared/armTemplateShared.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ type ArmTemplateAdditionalConfig struct {
TemplateFilePath string
ParametersFilePath string
DeploymentName string
Location string
SubscriptionScoped bool
}

// Get parameters in standard format that is without the schema, contentVersion and parameters fields
Expand Down

This file was deleted.

Loading