-
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
Azure keyvault gets created but secret creation doesnt wait for availability, and crashes #655
Comments
hey @pixelicous Thanks for opening this issue
Out of interest - how long are you waiting between creating the Key Vault via Terraform and re-running? Also do you have a corporate proxy involved caching DNS queries at all? As part of creating the Key Vault we poll to ensure the DNS is available for up to 2 minutes (technically we're checking that the TCP Socket is open on port 443 and then returning so the service should be available). My guess here would be that the DNS hasn't finished replicating fully and so perhaps we need to wait for a given number of DNS queries to be successful (e.g. wait for 10 DNS queries to be returned) before assuming it's successful.
Would it be possible to know if this is still an issue with the previous version? (and which previous version this worked with?) You can achieve this by specifying the version in the Provider block e.g.:
Given there's an Implicit Dependency by referencing the Key Vault directly (e.g. In order to work out how best to proceed here, it'd be good to confirm that this is a case of the DNS not being fully replicated (for instance, if there's a corporate proxy involved we may need to add additional delays to ensure that's handled) :) Thanks! |
@tombuildsstuff hey mate, first thanks for the reply and the details.
|
@tombuildsstuff i just checked, the VM which is in Azure is using the Azure provided DNS, we also go directly to the internet from it, no proxies along the way |
@tombuildsstuff I just had this issue on my PC as well. On my PC out of around 20-30executions non failed up till today, i had an execution which failed with the same error.. |
@tombuildsstuff there is no reply for around a month now.. but im referencing the original issue at azure's side Azure/azure-powershell#1524 This can be resolved by querying the relevant object and returning success only after it is properly created |
hey @pixelicous Just to let you know that v1.4.0 of the Azure Provider has been released which includes the fix for this :) Thanks! |
@tombuildsstuff thanks! kudos for quick releases between 1.3.3 and 1.4 🔥 |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Terraform Version
Terraform Configuration Files
Crash Output
1 error(s) occurred:
Expected Behavior
AzureRM keyvault should be created and secret should wait for DNS propogation
Actual Behavior
I receive the crash.
If i re run the same command, it works, because now the keyvault DNS hostname is replicated across azure dns servers
Steps to Reproduce
Create .tf files with keyvault and secret
Terraform apply
Important Factoids
The files are fine, a second terraform apply rerun creates the secrets successfully.
The "depends_on" part was added to test maybe it will help waiting for keyvault availbility
This issue started out of the blue, like a new terraform version issue.
The text was updated successfully, but these errors were encountered: