-
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
Private DNS Zone Virtual Network Link - Creation fails for cross-tenant #23238
Comments
This probably relates to the upgrading of the underlying transport layer to the But since I didn't find any other complaint about the cross tenant functionality not work on the new transport layer, would you mind to double check your configurations, e.g. retry with the v3.66.0, or with other tools like azure CLI, to make sure it indeed is the provider's bug. Meanwhile, if you can setup some mitmproxy, you shall be able to see the ARM request, where you can check whether the access tokens for the auxiliary tenant is indeed sent to Azure. |
Hi @magodo, Using the az cli I am able to successfully create the resource, so this does appear to be a Terraform issue (or the underlying azure SDK as you mentioned). I ran the requests through a mitm proxy as suggested.
|
Hi @manicminer, do you know whether there is any issue with the cross-tenant scenario when using the I've checked with the provider setting, and noticed it has correctly specified the auxiliary tenants: terraform-provider-azurerm/internal/provider/provider.go Lines 424 to 429 in 4916dc0
|
Confirmed this is still an issue in 3.73.0 released yesterday. |
I have the same problem with 3.68.0 provider version |
Hey, If I understand correctly, the change here was to switch the networks service from using the autorest transport to using the new resource manager client from the go-azure-sdk. Looking at the codebase, I can see that autorest client gets decorated to call the "AuxiliaryTokens" function of the authorizer. I don't see any equivalent call in the new resource manager client: It calls the authorizer's "Token" function, but not the "AuxiliaryTokens" function. https://github.com/hashicorp/go-azure-sdk/blob/main/sdk/client/client.go#L333 https://github.com/hashicorp/go-azure-sdk/blob/main/sdk/auth/autorest/auth.go#L43 This aligns with what I see in the calls being made by the provider in my example; the calls to interact with the resource group are using the autorest client and are correctly have the extra HTTP header, whereas the calls using the new resource manager client do not. Lastly, I'm pretty new to golang and this is not my codebase so this is all speculation. Please feel free to correct me if I'm way off base here! |
Also, if I'm right, please can we get the following change reverted until the resource manager client supports auxiliary tokens? |
@industrialzombie Thanks for digging into this. Ideally we'd prefer to roll forward and fix the SDK issue rather than roll back to the legacy SDK. I'll look into it and try to issue a fix. |
@magodo I suspect there may be a bug in the setup or handling of multi-tenant auth, am looking into it. |
Thanks again for reporting this authorization issue. We should have a fix out soon. |
Hey @katbyte I can see that a test was added for this, but I don't see the underlying issue is resolved yet. If I'm right, please can you re-open this issue? Also, this has been open now for a while and is still causing problems for my organization. Thanks |
@industrialzombie Sorry about that, I'll reopen this issue. I'm going to try and get the SDK fix in this week to resolve this. |
Note to self: SDK update to include hashicorp/go-azure-sdk#665, and changelog entry are needed to close this |
The fix for this was merged in #24063 and this should now be resolved in the next release! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Is there an existing issue for this?
Community Note
Terraform Version
0.12.31
AzureRM Provider Version
3.72.0
Affected Resource(s)/Data Source(s)
azurerm_private_dns_zone_virtual_network_link
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Private DNS Zone VNet Link should be created successfully.
Actual Behaviour
Using version 3.66.0, this works as expected.
All versions since 3.67.0 (up to 3.72.0 as of now) give the above error and the VNet link is not created.
Steps to Reproduce
Arrange:
Act:
Important Factoids
Admin consent was already granted to the enterprise application and this was working as of version 3.66.0
References
No response
The text was updated successfully, but these errors were encountered: