Skip to content

Instantly share code, notes, and snippets.

View gerrytan's full-sized avatar

Gerry Tan gerrytan

View GitHub Profile
@gerrytan
gerrytan / pr-31771-new-failing-tests-redacted.md
Created August 17, 2026 00:25
PR 31771: New Acceptance-Test Failures (Redacted)

PR 31771: New Acceptance-Test Failures (Redacted)

Compared with the main-branch acceptance-test log, these five failures occurred only in PR 31771. All subscription IDs, resource-group names, generated Azure resource names, UUIDs, IP addresses, email addresses, secrets, and service hostnames have been redacted.

TestAccAzureRMDataSourceVirtualNetworkGateway_basic

1176: [14:09:16] :		 [TestAccAzureRMDataSourceVirtualNetworkGateway_basic] [Test Output]
1177:             		 === RUN   TestAccAzureRMDataSourceVirtualNetworkGateway_basic
@gerrytan
gerrytan / main.tf
Last active August 13, 2026 03:57
AzAPI subnet Terraform configuration
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
version = "~> 2"
}
azurerm = {
source = "hashicorp/azurerm"
version = "~> 5"
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
version = "~> 2"
}
}
}
provider "azapi" {
@gerrytan
gerrytan / preflight-http.md
Created July 20, 2026 04:40
Redacted Azure preflight HTTP request/response

Request:

curl -H 'content-type: application/json' \
  -H 'user-agent: HashiCorp Terraform/<redacted> (+https://www.terraform.io) terraform-provider-azapi/<redacted> pid-<redacted>' \
  -H 'x-ms-correlation-request-id: <redacted-correlation-id>' \
  -H 'authorization: Bearer <redacted-access-token>' \
  -H 'accept: application/json' \
  --compressed \
  -X POST 'https://management.azure.com/providers/Microsoft.Resources/validateResources?api-version=2020-10-01' \
@gerrytan
gerrytan / main_redacted.tf
Created July 20, 2026 04:31
main_redacted.tf from terraform-testing-area
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
version = "~> 2"
}
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4"
@gerrytan
gerrytan / main.tf
Last active April 10, 2025 02:57
azurerm: unable to update tags of NIC attached to a private endpoint
# Problem:
# tags of network interface card (NIC) attached to a private endpoint (PE) cannot be updated via Terraform (TF)
# Root cause analysis:
# TF performs a PUT over the NIC, and it
# fails with 400 response if the NIC is attached to a PE, possibly
# other attachments too. When PATCH is performed via CLI, the NIC tag update works fine
# Steps to reproduce:
# 1. TF apply the resources with the NIC commented out, when PE is created, it will have a NIC that is not yet onboarded to TF
@gerrytan
gerrytan / main.tf
Last active April 8, 2025 02:27
28517-databricks-workspace-tag-update
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "4.15.0"
}
}
}
provider "azurerm" {
@gerrytan
gerrytan / formatted.tf
Created October 24, 2024 03:28
Example of azure resource terraform export result
terraform {
required_providers {
azurerm = {
source = "azurerm"
version = "4.0.1"
}
}
}
provider "azurerm" {
features {}
@gerrytan
gerrytan / main.tf
Created August 28, 2024 05:17
azurerm #26587 manual testing
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>4.0.1"
}
}
}
provider "azurerm" {
@gerrytan
gerrytan / main.tf
Created August 23, 2024 04:59
azurerm #27099
// ----------------------------------------
// Module/databricks_workspace/main.tf
// ----------------------------------------
data "azurerm_resource_group" "gtan_27099" {
name = "gtan-27099"
}
data "azurerm_virtual_network" "gtan_27099_vn" {
name = "gtan-27099-vn"
resource_group_name = data.azurerm_resource_group.gtan_27099.name