debugterraformMinor
Error: a number is required
Viewed 0 times
numbererrorrequired
Problem
I'm in the process of upgrading our version of the Terraform AWS Provider and after fixing/updating every resource and data source which has been deprecated/changed between versions (
I get the error on a
Environment Details:
Troubleshooting/Things I've Tried
I didn't see anything in the output though it was looking for a needle in a haystack. I did try grepping for obvious key words:
Its a very large terraform project and I am at a bit of a loss how to proceed with debugging this error
Has anyone seen this before and can suggest what it is/how I might be able to dig further?
3.75.2 -> 4.0.0) I'm left with one final error message (Error: a number is required) I can't get to the bottom of because it doesn't give any indication of module/file/resource/line number or anything really to go by.I get the error on a
terraform plan as follows$ terraform plan
aws_s3_bucket.static_nlb: Refreshing state... [id=]
#
#...more resources refreshing state...
#
aws_ssm_parameter.processor_sqs: Refreshing state... [id=/config/scripts/sqs/iam_access_policy]
Error: a number is required
ERRO[0052] Hit multiple errors:
Hit multiple errors:
exit status 1
$
Environment Details:
- Terraform version:
0.14.11
- Terraform AWS Provider:
4.0.0(upgraded from3.75.2)
Troubleshooting/Things I've Tried
- Commenting out two of the modules I thought might be responsible and there was no change. I've tried running
- Running with
TF_LOG=DEBUGorTF_LOG=TRACE
I didn't see anything in the output though it was looking for a needle in a haystack. I did try grepping for obvious key words:
type, error, number etc.Its a very large terraform project and I am at a bit of a loss how to proceed with debugging this error
Has anyone seen this before and can suggest what it is/how I might be able to dig further?
Solution
Thanks @Martin Atkins, a big upgrade of terraform and the aws provider appears to have solved the problem.
After upgrading to terraform to
This was also manifesting itself by the object lifecycle property resource "flapping" between, needs creating and needs deleting every terraform run which was the motivation for embarking on this upgrade in the first place.
Upgrading AWS terraform provider to
After upgrading to terraform to
1.3.6 I got a bit more information about the nature of the error. It appears it was related to the object expiry property of s3 bucket object lifecycle policy configuration.This was also manifesting itself by the object lifecycle property resource "flapping" between, needs creating and needs deleting every terraform run which was the motivation for embarking on this upgrade in the first place.
Upgrading AWS terraform provider to
4.0.8 resolved warnings and state flapping issues.Context
StackExchange DevOps Q#17044, answer score: 2
Revisions (0)
No revisions yet.