зеркало из https://github.com/microsoft/cobalt.git
feat: Upgrade azurerm provider to 2.9 (#396)
* upgrade azurerm provider to 2.6 * chaneg to the min version to 2.0.0 * remove upsupported field after upgrade * remove virtual_network_name param * change Web to web as part of upgrading to 2.x azurerm provider * change Web to web as part of azurerm upgrade * kick the CI * point to vnet ref 0.12.0 instead of 0.11.1 * remove unsupported var * remove extra / * fix service_endpoints var to be list of list * upgrade to azurerm 2.9 instead to solve app GT issue
This commit is contained in:
Родитель
a9331a7aad
Коммит
c645e01bec
|
@ -149,3 +149,5 @@ Outputs:
|
|||
app_insights_app_id = xxxx5ba9-f5xx-xx94-93xx-xxxx0d40xxxx
|
||||
app_insights_instrumentation_key = xxxx75785-xx5f-42xx-xx80-xxxxx94c93xx
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -60,7 +60,6 @@ resource "azurerm_app_service" "appsvc" {
|
|||
site_config {
|
||||
linux_fx_version = local.app_linux_fx_versions[local.app_names[count.index]]
|
||||
always_on = var.site_config_always_on
|
||||
virtual_network_name = var.vnet_name
|
||||
app_command_line = var.app_service_config[local.app_names[count.index]].app_command_line
|
||||
}
|
||||
|
||||
|
@ -98,7 +97,6 @@ resource "azurerm_app_service_slot" "appsvc_staging_slot" {
|
|||
site_config {
|
||||
linux_fx_version = local.app_linux_fx_versions[local.app_names[count.index]]
|
||||
always_on = var.site_config_always_on
|
||||
virtual_network_name = var.vnet_name
|
||||
app_command_line = var.app_service_config[local.app_names[count.index]].app_command_line
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ module "deployment_service_principal_keyvault_access_policies" {
|
|||
source = "../keyvault-policy"
|
||||
vault_id = azurerm_key_vault.keyvault.id
|
||||
tenant_id = data.azurerm_client_config.current.tenant_id
|
||||
object_ids = [data.azurerm_client_config.current.service_principal_object_id]
|
||||
object_ids = [data.azurerm_client_config.current.object_id]
|
||||
key_permissions = var.keyvault_key_permissions
|
||||
secret_permissions = var.keyvault_secret_permissions
|
||||
certificate_permissions = var.keyvault_certificate_permissions
|
||||
|
|
|
@ -6,7 +6,7 @@ This module will configure a provider and install required packages mentioned be
|
|||
|
||||
## Packages
|
||||
|
||||
### Azure Resource Manager (Version 1.23.0 or higher)
|
||||
### Azure Resource Manager (Version 2.0.0 or higher)
|
||||
|
||||
Azure Resource Manager enables you to repeatedly deploy your app and have confidence your resources are deployed in a consistent state. In Cobalt, we use Azure Resource manager extensively for deployment of our resources using Terraform
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
provider "azurerm" {
|
||||
version = "~>1.40.0"
|
||||
version = "~> 2.9.0"
|
||||
features {}
|
||||
}
|
||||
|
||||
provider "null" {
|
||||
|
|
|
@ -4,3 +4,8 @@ terraform {
|
|||
}
|
||||
}
|
||||
|
||||
provider "azurerm" {
|
||||
version = "~> 2.9.0"
|
||||
features {}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ module "app_insights" {
|
|||
source = "../../modules/providers/azure/app-insights"
|
||||
service_plan_resource_group_name = azurerm_resource_group.admin_rg.name
|
||||
appinsights_name = local.ai_name
|
||||
appinsights_application_type = "Web"
|
||||
appinsights_application_type = "web"
|
||||
providers = {
|
||||
"azurerm" = "azurerm.admin"
|
||||
}
|
||||
|
|
|
@ -3,3 +3,8 @@ terraform {
|
|||
key = "terraform.tfstate"
|
||||
}
|
||||
}
|
||||
|
||||
provider "azurerm" {
|
||||
version = "~> 2.9.0"
|
||||
features {}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ func TestTemplate(t *testing.T) {
|
|||
"location": "`+region+`"
|
||||
}`)
|
||||
expectedAppInsights := asMap(t, `{
|
||||
"application_type": "Web"
|
||||
"application_type": "web"
|
||||
}`)
|
||||
expectedKeyVault := asMap(t, `{
|
||||
"network_acls": [{
|
||||
|
|
|
@ -4,11 +4,10 @@ resource "azurerm_resource_group" "svcplan" {
|
|||
}
|
||||
|
||||
module "vnet" {
|
||||
source = "github.com/microsoft/bedrock?ref=0.11.1//cluster/azure/vnet"
|
||||
source = "github.com/microsoft/bedrock?ref=0.12.0/cluster/azure/vnet"
|
||||
vnet_name = local.vnet_name
|
||||
address_space = var.address_space
|
||||
resource_group_name = azurerm_resource_group.svcplan.name
|
||||
resource_group_location = azurerm_resource_group.svcplan.location
|
||||
subnet_names = var.subnet_names
|
||||
subnet_prefixes = var.subnet_prefixes
|
||||
subnet_service_endpoints = var.subnet_service_endpoints
|
||||
|
|
|
@ -4,3 +4,8 @@ terraform {
|
|||
}
|
||||
}
|
||||
|
||||
provider "azurerm" {
|
||||
version = "~> 2.9.0"
|
||||
features {}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ variable "resource_group_location" {
|
|||
|
||||
variable "application_type" {
|
||||
description = "Type of the App Insights Application. Valid values are ios for iOS, java for Java web, MobileCenter for App Center, Node.JS for Node.js, other for General, phone for Windows Phone, store for Windows Store and web for ASP.NET."
|
||||
default = "Web"
|
||||
default = "web"
|
||||
}
|
||||
|
||||
variable "acr_build_git_source_url" {
|
||||
|
@ -65,8 +65,8 @@ variable "azure_container_tags" {
|
|||
|
||||
variable "subnet_service_endpoints" {
|
||||
description = "The list of service endpoints that will be given to each subnet"
|
||||
type = list(string)
|
||||
default = ["Microsoft.Web"]
|
||||
type = list
|
||||
default = [["Microsoft.Web"]]
|
||||
}
|
||||
|
||||
variable "address_space" {
|
||||
|
|
Загрузка…
Ссылка в новой задаче