bump azurerm to v3 so we can use oidc

This commit is contained in:
hezijie 2024-09-14 13:17:14 +08:00 committed by lonegunmanb
parent ae3c0933c3
commit 286ef164dc
3 changed files with 7 additions and 13 deletions

View File

@ -5,10 +5,10 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>2.0"
version = "~>3.0"
}
azapi = {
source = "Azure/azapi"
source = "Azure/azapi"
version = "~> 1.0"
}
local = {
@ -88,20 +88,18 @@ resource "azurerm_lb_backend_address_pool" "bpepool" {
}
resource "azurerm_lb_probe" "vmss" {
resource_group_name = azurerm_resource_group.vmss.name
loadbalancer_id = azurerm_lb.vmss.id
name = "ssh-running-probe"
port = var.application_port
loadbalancer_id = azurerm_lb.vmss.id
name = "ssh-running-probe"
port = var.application_port
}
resource "azurerm_lb_rule" "lbnatrule" {
resource_group_name = azurerm_resource_group.vmss.name
loadbalancer_id = azurerm_lb.vmss.id
name = "http"
protocol = "Tcp"
frontend_port = var.application_port
backend_port = var.application_port
backend_address_pool_id = azurerm_lb_backend_address_pool.bpepool.id
backend_address_pool_ids = [azurerm_lb_backend_address_pool.bpepool.id]
frontend_ip_configuration_name = "PublicIPAddress"
probe_id = azurerm_lb_probe.vmss.id
}

View File

@ -21,7 +21,7 @@ variable "location" {
variable "tags" {
description = "Map of the tags to use for the resources that are deployed"
type = map(string)
default = {
default = {
environment = "codelab"
}
}

View File

@ -27,10 +27,6 @@ var speicalTests = map[string]func(*testing.T){
func Test_Quickstarts(t *testing.T) {
t.Parallel()
msiId := os.Getenv("MSI_ID")
if msiId != "" {
_ = os.Setenv("TF_VAR_msi_id", msiId)
}
input := os.Getenv("CHANGED_FOLDERS")
folders := strings.Split(input, ",")
if input == "" {