Skip to content

Conversation

@mvandenburgh
Copy link
Member

Something useful I learned about Terraform recently. This will cause any plans or applys to fail if the token is expired.

@mvandenburgh mvandenburgh force-pushed the add-gl-token-expiration-check branch from 55c9560 to e4c2fd1 Compare May 8, 2024 15:08
Comment on lines +36 to +41
lifecycle {
precondition {
condition = timecmp(timestamp(), "${local.webhook_handler_token_expires_at}T00:00:00Z") == -1
error_message = "The token has expired. Please update the expires_at date."
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, although I'm concerned at what happens when encounter this expiration date. The terraform plan/apply will fail loudy about it, but besides that how would we know? Let's say if we haven't run terraform plan/apply for a while during the expiration date, would we just be relying on sentry at that point?

This is sort of secondary to this PR, which I think looks good itself, but just thought I'd raise this question.

@mvandenburgh
Copy link
Member Author

Superseded by #1104

@mvandenburgh mvandenburgh deleted the add-gl-token-expiration-check branch May 14, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants