Skip to content

Instantly share code, notes, and snippets.

View gerrytan's full-sized avatar

Gerry Tan gerrytan

View GitHub Profile
@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
@gerrytan
gerrytan / main-simple-terraform-apply.log
Last active August 23, 2024 00:19
azurerm #26935 reproduction
~/projects/learning/terraform-playground/gh-26935-simple (master) » terraform apply gtan@twisties
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
<= read (data resources)
Terraform will perform the following actions:
# data.databricks_node_type.smallest will be read during apply
# (depends on a resource or a module with changes pending)
» terraform apply
azurerm_resource_group.rg: Refreshing state... [id=/subscriptions/*********************90/resourceGroups/rg_gtan_26935_2]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
<= read (data resources)
Terraform will perform the following actions:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
<= read (data resources)
Terraform will perform the following actions:
 # data.databricks_spark_version.gpu_ml will be read during apply
# (depends on a resource or a module with changes pending)
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
databricks = {
source = "databricks/databricks"
version = "~>1.5.0"