[AVM Module Issue]: Unknown (privatelink) DNS zone upon Static Site creation. #4345
Open
1 task done
Labels
Class: Resource Module 📦
This is a resource module
Needs: Triage 🔍
Maintainers need to triage still
Status: Response Overdue 🚩
When an issue/PR has not been responded to for X amount of days
Type: AVM 🅰️ ✌️ Ⓜ️
This is an AVM related issue
Type: Feature Request ➕
New feature or request
Check for previous/existing GitHub issues
Issue Type?
Feature Request
Module Name
avm/res/web/static-site
(Optional) Module Version
No response
Description
At present, Static WebApps are deployed under a random generated site identifier and the
azurestaticapps.net
suffix. This suffix can contain a partition ID, and you can have a URL like{identifier}.azurestaticapps.net
or{identifier}.{partitionId}.azurestaticapps.net
. This is documented in both Private Endpoint documentation as well as in the Static Web App documentation on using private endpoints.The privatelink domains that you need to create a DNS record in, als need to provide this partition id. So, if you app is located on
{identifier}.4.azurestaticapps.net
and you want to create a private endpoint, the corresponding A record must be created in theprivatelink.4.azurestaticapps.net
DNS zone.The name of the private DNS zone is part of its
resourceId
. ThisresourceId
is input of the private endpoint parameters of this module:The
privateDnsZoneResourceId
can't be known. There are two solutions to this problem:privateDnsZoneResourceId
later.privateDnsZoneResourceId
later.The second approach is (in my mind) generalizable across users.
The feature request is for the module to be able to amend the
privateDnsZoneResourceId
so it fixes the actual resource part.So when one provided the following
privateDnsZoneResourceId
:the module could automatically amend the suffix by adding the
{partitionId}
. This information is retrievable by getting theDefaultHost
property of the staticSite resource and replace the identifier withprivatelink
. For example:Then the variable
privateLinkZone
can be used and the private endpoint is correctly created.Alternatives
Amending parameters in a nontransparent manner feels iffy. As alternative there could also be an additional boolean parameter on the
privateEndpoints
parameter that would steer this behavior.I checked other implementations as well:
{region}
as part of the domain zone, which is predictable at deployment time.It seems that Azure Static WebApps is unique in this situation.
(Optional) Correlation Id
No response
The text was updated successfully, but these errors were encountered: