-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
New Resource: App Service Slot Custom Hostname Binding #4240
Comments
hi @chenlonghu Thanks for opening this issue. Slots within an App Service require that Custom Hostname Bindings are defined separately using this API (targetted to the Slots) rather than for the App Service itself: https://docs.microsoft.com/en-us/rest/api/appservice/webapps/createorupdatehostnamebindingslot - as such I'm going to update this title to target a new resource which can add support for this. Thanks! |
Anyone used a workaround inside of TF for this at present? One of my only missing pieces. |
Workaround via ARM template authored by @Sobieck:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Do you know if there is a way to tell it not to mess with the thumbprint? Out thumbprint gets set by a different process but tf wants to set it back to null even if I remove the parameter from the json provided above. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Any news? Can you please share if this resource will be developed? |
Any update on this? |
This resource seems to be there now, according to the provider docs. |
The hostname binding resource exists, but you cannot create a managed certificate with it. For example, this code: resource "azurerm_app_service_managed_certificate" "preview_certificate" {
custom_hostname_binding_id = azurerm_app_service_slot_custom_hostname_binding.preview_hostname_binding.id
} throws this error:
|
Any update on this? |
I got the same issue as @jonathaneckman , I cannot do with the managed certificate.
throw the same error:
any ideas? |
I'm getting the same error. Seems like this is not supported yet. |
@mkohn The app service slot hostname binding is supported by terraform via the resource azurerm_app_service_slot_custom_hostname_binding Did you get any chance to check it? |
Also getting the same error as @jonathaneckman and @miaoz2001. Custom domain is being created but no use without the managed certificate. |
Community Note
Terraform (and AzureRM Provider) Version 1.33.1
Affected Resource(s)
azurerm_app_service_custom_hostname_binding
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
The hostname should be added successfully to the slot, and tfstate file should have it taken into account, but after the hostname binding (running terraform apply), the message saying new hostname binding to be added shows up every time when you run
terraform plan
Steps to Reproduce
terraform apply
terraform plan
Important Factoids
References
The text was updated successfully, but these errors were encountered: