Skip to content

web - migrate from azure-sdk-for-go to go-azure-sdk#31996

Open
sreallymatt wants to merge 17 commits intomainfrom
mp/web-sdk-migration
Open

web - migrate from azure-sdk-for-go to go-azure-sdk#31996
sreallymatt wants to merge 17 commits intomainfrom
mp/web-sdk-migration

Conversation

@sreallymatt
Copy link
Collaborator

@sreallymatt sreallymatt commented Mar 18, 2026

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

Note: this PR is based off #31967, which should be merged first

This PR migrates all the non-deprecated web resources/datasources from azure-sdk-for-go to go-azure-sdk. Additionally I've cleaned up some old resource IDs and replaced them with resource IDs from go-azure-sdk or go-azure-helpers.

Most changes are split into separate commits per resource to help the reviewers. Not feasible to split into separate PRs due to most changes being intertwined

I did not replace the deprecated resources in the non-deprecated resources tests', I'll follow up with a separate PR to do so

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevant documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Tests running...

State Migration for azurerm_app_service_custom_hostname_binding:

manual tests for state migration
Terraform will perform the following actions:

# azurerm_app_service_custom_hostname_binding.test will be created

+ resource "azurerm_app_service_custom_hostname_binding" "test" {
+   app_service_name = "{name}"
+   hostname = "{name}"
+   id = (known after apply)
+   resource_group_name = "{name}"
+   ssl_state = (known after apply)
+   thumbprint = (known after apply)
+   virtual_ip = (known after apply) }

Plan: 1 to add, 0 to change, 0 to destroy.

╷ 
│ Warning: Deprecated Resource
│
│ with azurerm_app_service_plan.test,
│ on main.tf line 63, in resource "azurerm_app_service_plan" "test":
│ 63: resource "azurerm_app_service_plan" "test" {
│
│ The `azurerm_app_service_plan` resource has been superseded by the
│ `azurerm_service_plan` resource. Whilst this resource will continue to be
│ available in the 2.x and 3.x releases it is feature-frozen for compatibility
│ purposes, will no longer receive any updates and will be removed in a future
│ major release of the Azure Provider.
│
│ (and 5 more similar warnings elsewhere)
╵

Do you want to perform these actions?

Terraform will perform the actions described above. Only 'yes' will be accepted to approve.

Enter a value: yes

azurerm_app_service_custom_hostname_binding.test: Creating... 

azurerm_app_service_custom_hostname_binding.test: Creation complete after 5s [id=/subscriptions/{sub}/resourceGroups/{name}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{name}]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

---
schema_version = 0:

~ cat terraform.tfstate | grep -C 5 "azurerm_app_service_custom_hostname_binding" }
] }, { "mode": "managed", "type": "

azurerm_app_service_custom_hostname_binding

", "name": "test", "provider": "provider[\"registry.terraform.io/hashicorp/azurerm\"]", "instances": [ { "schema_version": 0,

---

Local install:

~ tfa -refresh-only

╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI
│ configuration:
│ - hashicorp/azurerm in ~/go/1.25.5/bin
│
│ The behavior may therefore not match any released version of the provider
│ and applying changes may cause the state to become incompatible with
│ published releases.
╵

data.azurerm_client_config.current: Reading...
data.azurerm_dns_zone.test: Reading...
...
azurerm_app_service_custom_hostname_binding.test: Refreshing state...[id=/subscriptions/{sub}/resourceGroups/{name}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{name}]

No changes.

Your infrastructure still matches the configuration.

Terraform has checked that the real remote objects still match the result of your most recent changes, and found no differences.

╷
│ Warning: Deprecated Resource
│
│ with azurerm_app_service_plan.test,
│ on main.tf line 63, in resource "azurerm_app_service_plan" "test":
│ 63: resource "azurerm_app_service_plan" "test" {
│
│ The `azurerm_app_service_plan` resource has been superseded by the
│ `azurerm_service_plan` resource. This resource will be removed in v5.0 of
│ the AzureRM Provider.
│
│ (and 2 more similar warnings elsewhere)
╵

Would you like to update the Terraform state to reflect these detected changes?

Terraform will write these changes to the state without modifying any real infrastructure. There is no undo. Only 'yes' will be accepted to confirm.

Enter a value: yes

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

---

schema_version = 1:

~ cat terraform.tfstate | grep -C 5 "azurerm_app_service_custom_hostname_binding" } ] }, { "mode": "managed", "type": "

azurerm_app_service_custom_hostname_binding

", "name": "test", "provider": "provider[\"registry.terraform.io/hashicorp/azurerm\"]", "instances": [ { "schema_version": 1,

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • azurerm_resource - support for the thing1 property [GH-00000]

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #25942

AI Assistance Disclosure

  • AI Assisted - This contribution was made by, or with the assistance of, AI/LLMs

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the provider.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

@github-actions
Copy link
Contributor

Build failure

This pull request contains a build failure which needs addressed here .

@github-actions
Copy link
Contributor

Build failure

This pull request contains a build failure which needs addressed here .

@sreallymatt sreallymatt force-pushed the mp/web-sdk-migration branch from 028dc00 to 4dda026 Compare March 19, 2026 19:23
@github-actions
Copy link
Contributor

Build failure

This pull request contains a build failure which needs addressed here .

@sreallymatt sreallymatt marked this pull request as ready for review March 23, 2026 22:44
@sreallymatt sreallymatt requested review from a team, WodansSon and magodo as code owners March 23, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

azurerm_app_service_managed_certificate does not save tags to Azure

2 participants