Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the azurerm version contraint from 4.0 to 5.0 #82

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

JamesDLD
Copy link

@JamesDLD JamesDLD commented Nov 4, 2024

Description

Type of Change

  • Non-module change (e.g. CI/CD, documentation, etc.)
  • Azure Verified Module updates:
    • Bugfix containing backwards compatible bug fixes
    • Feature update backwards compatible feature updates.
    • Breaking changes.
    • Update to documentation

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • I did run all pre-commit checks

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 Maintainers need to triage still label Nov 4, 2024
@chianw
Copy link
Collaborator

chianw commented Nov 4, 2024

@JamesDLD - will you be able to run pre-commit and pr-check as per https://azure.github.io/Azure-Verified-Modules/contributing/terraform/terraform-contribution-flow/#41-run-pre-commit-and-pr-check to update the documentation?

@chianw
Copy link
Collaborator

chianw commented Nov 5, 2024

Hi @JamesDLD - the linting test is failing because of the change of address_prefix to address_prefixes in azurerm 4.0 and above, for subnet declaration under resource "azurerm_virtual_network"

Before azurerm 4.0 , for example in 3.116.0 https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/virtual_network ,

image

In azurerm 4.0 - https://registry.terraform.io/providers/hashicorp/azurerm/4.0.0/docs/resources/virtual_network

image

To pass the linting test, are you able to modify main.tf in the examples/default folder to use something like

# create first sample virtual network
resource "azurerm_virtual_network" "vnet1" {
  address_space       = ["10.0.0.0/16"]
  location            = azurerm_resource_group.avmrg.location
  name                = "vnet1"
  resource_group_name = azurerm_resource_group.avmrg.name

  subnet {
    address_prefixes = ["10.0.1.0/24"]
    name           = "subnet1"
  }
}

# create second sample virtual network
resource "azurerm_virtual_network" "vnet2" {
  address_space       = ["10.1.0.0/16"]
  location            = azurerm_resource_group.avmrg.location
  name                = "vnet2"
  resource_group_name = azurerm_resource_group.avmrg.name

  subnet {
    address_prefixes = ["10.1.1.0/24"]
    name           = "subnet2"
  }
}

@JamesDLD
Copy link
Author

JamesDLD commented Nov 5, 2024

Hi @chianw Yes, I got it! Will update my PR soon, I had to review the avm script to make it work in my context:

  • behind a proxy
  • ssl inspection
  • need to source the docker image from an internal registry

By the way, on which repo can I propose an update of the avm script ?

@chianw chianw merged commit b318ba4 into Azure:main Nov 6, 2024
8 checks passed
@chianw
Copy link
Collaborator

chianw commented Nov 6, 2024

Hi @chianw Yes, I got it! Will update my PR soon, I had to review the avm script to make it work in my context:

  • behind a proxy
  • ssl inspection
  • need to source the docker image from an internal registry

By the way, on which repo can I propose an update of the avm script ?

HI @JamesDLD thanks. You can propose changes to the avm script at https://github.com/Azure/terraform-azurerm-avm-template

@JamesDLD
Copy link
Author

JamesDLD commented Nov 7, 2024

Just did it here for info, thanks

@JamesDLD
Copy link
Author

Hi @chianw any chance to have a new git tag including this release?
Thank you

@chianw
Copy link
Collaborator

chianw commented Nov 13, 2024

Hi @chianw any chance to have a new git tag including this release? Thank you

Hi @JamesDLD - thanks I just published a new release https://github.com/Azure/terraform-azurerm-avm-res-network-privatednszone/releases/tag/v0.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Maintainers need to triage still
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AVM Module Issue]: Update the azurerm version contraint from 4.0 to 5.0
2 participants