Azure / terraform-azurerm-avm-res-web-site

MIT License
14 stars 10 forks source link

[AVM Module Issue]: add support for Azure Provider v4.0 #122

Closed chopeen closed 6 days ago

chopeen commented 1 month ago

Check for previous/existing GitHub issues

Issue Type?

Feature Request

Description

Modify the module to support azurerm v4 (see 4.0-upgrade-guide for change log and migration hints).

Related issues in other AVMs

Some of these have already been implemented and closed, so maybe they will be useful for reference.

donovm4 commented 1 month ago

@chopeen - This module currently is set up more like a pattern module than a resource module, so theoretically, it would have to wait for the storage account module / service plan modules to support 4.0.

However, I am working to refactor more to a resource module to align with spec - and am working on adding support for azurerm v4

NOTE: These changes to the module will likely be breaking changes.

chopeen commented 1 month ago

Thank you for the update @donovm4! I found module-classifications to read up in the differences between pattern and resource modules.

For completeness, I created https://github.com/Azure/terraform-azurerm-avm-res-web-serverfarm/issues/56 (I think this is what you meant by "service plan" module).

If there is no way to avoid the breaking changes, I will find a way to deal with them. :+1:

donovm4 commented 1 month ago

@chopeen :

The main breaking changes that I have currently identified... will likely be that this (avm-res-web-site) module will no longer enable users to create storage accounts / app service plans. It will only take values for referencing those resources created outside of the "root" module.

The ideal scenario would still likely be to leverage the avm-res-web-site, avm-res-web-serverfarm, and avm-res-storage-storageaccount modules together, but seperate their responsibilities to align more with res module classification. I am not sure if there would really be a benefit to submitting a pattern module request in this case.

NOTE: this module is really the only one that needs the refactoring 😄

chopeen commented 1 month ago

this (avm-res-web-site) module will no longer enable users to create storage accounts / app service plans. It will only take values for referencing those resources created outside of the "root" module.

OK, I will adjust my infrastructure definition accordingly.

NOTE: this module is really the only one that needs the refactoring 😄

I think at least the version specification for azurerm must be changed in terraform.tf to allow v4:

https://github.com/Azure/terraform-azurerm-avm-res-web-serverfarm/blob/97e2e0baa7a23349a97889d1fa5fb24ea3159ed4/terraform.tf#L4C1-L7C6

donovm4 commented 3 weeks ago

@chopeen :

UPDATE

I have released v0.11.0 of this module. While it does not yet support azurerm v4 yet, I have tested it out and found that there are a couple features supported by v3 that will have to be removed as they are no longer supported by v4, namely:

donovm4 commented 1 week ago

@chopeen :

Please review release 0.12.0 and the respective release notes. While this version supports azurerm 4.x, it is important that it will no longer support azurerm 3x.

Please let me know if you have any questions or issues.

chopeen commented 6 days ago

Thank you!

I still use some v3.x-only modules, so I need to postpone upgrading my stack. Hopefully, all AVMs will get support v4.x in Q1.