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

Upgrade terraform and provider versions #1

Merged
merged 21 commits into from
Jul 4, 2022

Conversation

reifnir
Copy link
Owner

@reifnir reifnir commented Jul 4, 2022

  • When creating multiple objects, such as the DNS verification TXT records, switched from count to for_each. Using count can be buggy when items in a list are changed. If you're creating objects and their state index changes, Terraform will try to update both at once or remove/add at the same time leading to conflicts where you have to retry a number of times. Using for_each instead gives more stable state names. Ex: module.custom_dns_static_site.azurerm_app_service_custom_hostname_binding.static_site["www"] instead of module.custom_dns_static_site.azurerm_app_service_custom_hostname_binding.static_site[0].
  • Marked the module compatible with versions beyond 0.14.
  • Bumped the ACME provider used to generate Let's Encrypt certs from 2.4.0 to the current version, 2.9.0.
  • Now using azurerm Terraform provider version 3 and later.
  • Moved away from deprecated objects azurerm_function_app and azurerm_app_service_plan resource for the newer azurerm_linux_function_app and azurerm_service_plan.
    • Unfortunately, there are still a couple of bugs in azurerm_linux_function_app in that some properties (custom_domain_verification_id, default_hostname) are not yet implemented. There are already a couple of MRs that are just awaiting responses from Hashicorp.
      • terraform-provider-azurerm/issues/16263
      • terraform-provider-azurerm/issues/17444
    • In order to use the newer resources, I needed to add a deprecated azurerm_function_app data reference as a workaround. This will be removed as soon as the missing functionality is released.

reifnir added 21 commits July 1, 2022 22:37
much nicer tf state names:
module.custom_dns_static_site.azurerm_app_service_custom_hostname_binding.static_site["@"]
module.custom_dns_static_site.azurerm_app_service_custom_hostname_binding.static_site["deeper.subdomain"]
module.custom_dns_static_site.azurerm_app_service_custom_hostname_binding.static_site["www"]
they stopped supporting proxies.json functionality
counts break if you reorder the list or items (trying to delete and add items that already exist)
@reifnir reifnir merged commit fb8d793 into main Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant