Skip to content

chore: upgrade azurerm to 5.0.1 - #3981

Merged
jgravois merged 3 commits into
mainfrom
chore/3978
Aug 12, 2026
Merged

chore: upgrade azurerm to 5.0.1#3981
jgravois merged 3 commits into
mainfrom
chore/3978

Conversation

@jgravois

@jgravois jgravois commented Aug 12, 2026

Copy link
Copy Markdown
Member

resolves #3978

gemini helped me parse planning errors and make the necessary tweaks to account for breaking changes in azurerm@5.x.

as you can see from the plan summary below, merging this PR would result in "No changes" to the dev environment.

ref: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/5.0-upgrade-guide

@github-actions github-actions Bot added the infrastructure Terraform, Azure, etc. label Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
CHANGE RESOURCE

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

Comment thread terraform/.gitignore
*.tfstate.*

# Crash log files
core

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a binary file that can be generated when terraform encounters an uncaught exception.

Comment thread terraform/key_vault.tf
sku_name = "standard"
tenant_id = data.azurerm_client_config.current.tenant_id
purge_protection_enabled = true
rbac_authorization_enabled = false

@jgravois jgravois Aug 12, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newly required property

name = "CAE-CDT-PUB-VIP-CALITP-${var.env_letter}-001"
location = var.location
resource_group_name = var.resource_group_name
logs_destination = "log-analytics"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer computed

Comment thread terraform/network.tf
resource "azurerm_private_dns_zone_virtual_network_link" "db" {
name = "db-link-${lower(local.env_letter)}"
resource_group_name = data.azurerm_resource_group.main.name
private_dns_zone_name = azurerm_private_dns_zone.db.name

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deprecated (in favor of "private_dns_zone_id")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was it intentional to lose the resource_group_name as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no! 🤦‍♂️

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i take that back. totally intentional. 😎

The resource_group_name property has been removed in favour of the private_dns_zone_id property. (ref)

Comment thread terraform/network.tf
content {
service = service_endpoint.value
}
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this bit wasn't nearly as explicit as everything else in the upgrade guide.

what gemini suggested appears to be equivalent, but i have to admit my level of understanding of our networking is shaky at best.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this looks right to me too. I wonder if possible to make the default service_endpoints value [] (above in locals) to avoid this ternary, but nbd.

Ref: https://developer.hashicorp.com/terraform/language/expressions/dynamic-blocks

@jgravois jgravois Aug 12, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if possible to make the default service_endpoints value [] (above in locals) to avoid this ternary

not exactly, but d3c54fa 42fb2d5 feels like an improvement.

@jgravois
jgravois marked this pull request as ready for review August 12, 2026 21:12
@jgravois
jgravois requested a review from a team as a code owner August 12, 2026 21:12
Comment thread terraform/main.tf
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4.67"
version = "~> 5.0.1"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to configure @dependabot to watch this version?

@jgravois jgravois Aug 12, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed (via #3992)

@jgravois
jgravois marked this pull request as draft August 12, 2026 22:22
@jgravois
jgravois marked this pull request as ready for review August 12, 2026 22:32
@jgravois
jgravois enabled auto-merge August 12, 2026 22:33

@thekaveman thekaveman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jgravois
jgravois merged commit 9789d4b into main Aug 12, 2026
9 checks passed
@jgravois
jgravois deleted the chore/3978 branch August 12, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Terraform, Azure, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade azurerm

2 participants