Skip to content

Commit

Permalink
remove azurerm config when exporting to azapi
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxu92 committed Oct 18, 2023
1 parent 7f6ee0b commit 793d642
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions internal/meta/base_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,18 +527,14 @@ func (meta *baseMeta) buildTerraformConfigForImportDir() string {
}

if meta.useAzAPI() {
return fmt.Sprintf(`terraform {
return `terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "%s"
}
azapi = {
source = "azure/azapi"
}
}
}
`, meta.providerVersion)
`
}

return fmt.Sprintf(`terraform {
Expand All @@ -564,16 +560,12 @@ func (meta *baseMeta) buildTerraformConfig(backendType string) string {
return fmt.Sprintf(`terraform {
backend %q {}
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "%s"
}
azapi = {
source = "azure/azapi"
}
}
}
`, backendType, meta.providerVersion)
`, backendType)
}

return fmt.Sprintf(`terraform {
Expand Down

0 comments on commit 793d642

Please sign in to comment.