I have a terraform script to run from Github action.
Terraform version : 0.12.6 which we are planning to upgrade.
It contains various modules for AWS Neptune database, Helm Releases to deploy on EKS.
While the pipeline runs for terraform validate stage, it fails at terraform plan stage.
After 38 refershing state log lines, it always gets stuck and times out after 5 min.
log lines like : aws_neptune_parameter_group.main: Refreshing state… [id=XYZ]
Error :
Error: timeout while waiting for state to become ‘Running’ (last state: ‘Pending’, timeout: 5m0s)
There isn’t any time out set in scripts.
The last log line is not the same (not for the same resource) everytime.
Usually for last 3 min, no log gets printed and it gets timed out at 5.
I enabled TRACE log for terraform, but nothing is getting printed which can give an idea.
Can you please suggest how should the troubleshooting be done next?
2
Answers
The issue was - there was a neptune proxy release on Helm2 deployed few years back with TF. Later on, someone had upgraded the Helm version manually. TF was getting stuck on finding the neptune proxy release. The GitHub runner was using a container image with Helm2 installed. There were manual fixes required here.
Thank you for all the suggestions.
Provisioning resources such as EKS clusters and neptune parameter group takes a little bit longer compared to other resources like S3 buckets. In order to ensure that Terraform does not timeout within five minutes, please add the following node inside your
aws_neptune_parameter_group
resource blockIf your resource got stuck at
refreshing state
status, may you try to delete the state for that resource and re-issueterraform plan
command again?