-
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
azurerm_subnet_network_security_group_association not applying #18724
Comments
@arbitmcdonald Thank you for submitting this! We have a nightly test case for the aadds resource, whose configuration is defined here: terraform-provider-azurerm/internal/services/domainservices/active_directory_domain_service_test.go Line 213 in 05362bb
From the error message, it is something went wrong in Azure when it was checking connectivity internally, during the creation (long running) operation. That most likely because of the service side issue. So I would suggest you to raise an Azure support ticket by providing the By comparing the configurations between what is tested and yours, one possible cause might be the |
Thanks @magodo I'll reach out to their support. Interestingly the creation does succeed (within Azure) about an hour later, which is normal for AADDS. Its terraform that bombs out/fails, the resource creation still succeeds. I'll try with Enterprise next and see what happens. I really appreciate your detailed and helpful response! |
Just an update on this. I changed my SKU to see if it made a difference and the same error happened.
|
I just had another swing at this, and rather than destroying all successfully created resources after the AADDS failure I thought it best to have a proper look around. Even though I told Terraform that the AADDS depends on the vNet, AADDS subnet, AADDS NSG, and AADDS NSG/subnet association, the association was not there in Azure. Terraform created the vNet, Subnet, and NSG, but it did not associate the NSG with the Subnet before creating AADDS. Root cause identified... issue still remains. Why is AADDS being created before Terraform associated the NSG with the subnet, when I specifically said AADDS depends on the NSG association?
|
Update on this, I believe there's an issue with the provider, not with Azure, as Terraform reports the creation complete for my NSG association. Here's what happens:
If I manually update the nsg association (to apply the nsg to the subnet) while terraform is applying the plan at step 3 (after supposed creation of the nsg association, before AADDS creation), the Terraform apply succeeds and AADDS is created. Notable console messages:
Console output:
|
Is there an existing issue for this?
Community Note
Terraform Version
1.3.2
AzureRM Provider Version
3.26.0
Affected Resource(s)/Data Source(s)
azurerm_active_directory_domain_service
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The creation should have continued for another hour or so, at which point Azure Active Directory Domain Services would have been created. This used to work perfectly, but I updated AzureRM and a ton of my config has been changed as a result due to breaking changes in the more recent version(s). I'm not sure if it's my config somehow at fault, or the provider.
Actual Behaviour
The creation runs for 15-16 minutes before throwing the following error: Error testing domain controller connectivity through PowerShell. A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 20.26.9.56:5986
Steps to Reproduce
terraform plan -target="azurerm_active_directory_domain_service.primary" -out="aadds.tfplan"
terraform.exe apply "aadds.tfplan"
Also happens if I just run
terraform apply
, but this config is a snippet of a much larger file. I usually create AADDS first, as it takes so long, and then spin up the rest of the plan. This also fails now.Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: