I'm running into a strange issue while importing a self-signed certificate into AWS Certificate Manager (ACM) using Terraform. I keep getting the error: 'The certificate is valid in the future. You can import a certificate only during its validity period.' This has only happened a couple of times, but it's now occurring every time I try. Here's the relevant Terraform code I'm using to create the self-signed cert and ACM cert: I'm setting a validity period of 1 year. Has anyone else experienced this problem?
2 Answers
This could be a case of clock skew. Try adjusting your system time back by a minute or two, or just fixing your clock in general. That might clear things up!
Okay tbh I haven't restarted my laptop in months so this could be it. If that doesn’t fix it I’ll play with the clock. Will keep you posted; thanks for now!
Make sure to check the start date of your certificate. It might be a mismatch with your system clock that's causing this error.
Okay this fixed it thanks!!