-
Notifications
You must be signed in to change notification settings - Fork 47
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
resource_tailnet_key: handle 404 and discard invalid keys #287
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
After internal discussion we're going to go a slightly different direction here that will require changes to the Tailscale API and https://github.com/tailscale/tailscale-client-go. I made this PR a draft and will come back to this once the upstream change are ready. |
Updated to use
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just made a new release that you can use here: https://github.com/tailscale/tailscale-client-go/releases/tag/v1.13.0
This change partially reverts the behaviour introduced in #287 that currently results in single-use keys being recreated, triggering unnecessary updates to downstream Terraform resources. By default, the provider will now only recreate reusable keys, ignoring invalid single-use keys. This can also be changed now using a new `recreate_if_invalid` attribute. Fixes #306 Signed-off-by: Anton Tolchanov <[email protected]>
This change partially reverts the behaviour introduced in #287 that currently results in single-use keys being recreated, triggering unnecessary updates to downstream Terraform resources. By default, the provider will now only recreate reusable keys, ignoring invalid single-use keys. This can also be changed now using a new `recreate_if_invalid` attribute. Fixes #306 Signed-off-by: Anton Tolchanov <[email protected]>
This change partially reverts the behaviour introduced in #287 that currently results in single-use keys being recreated, triggering unnecessary updates to downstream Terraform resources. By default, the provider will now only recreate reusable keys, ignoring invalid single-use keys. This can also be changed now using a new `recreate_if_invalid` attribute. Fixes #306 Signed-off-by: Anton Tolchanov <[email protected]>
This change partially reverts the behaviour introduced in #287 that currently results in single-use keys being recreated, triggering unnecessary updates to downstream Terraform resources. By default, the provider will now only recreate reusable keys, ignoring invalid single-use keys. This can also be changed now using a new `recreate_if_invalid` attribute. Fixes #306 Signed-off-by: Anton Tolchanov <[email protected]>
This change partially reverts the behaviour introduced in #287 that currently results in single-use keys being recreated, triggering unnecessary updates to downstream Terraform resources. By default, the provider will now only recreate reusable keys, ignoring invalid single-use keys. This can also be changed now using a new `recreate_if_invalid` attribute. Fixes #306 Signed-off-by: Anton Tolchanov <[email protected]>
This change partially reverts the behaviour introduced in #287 that currently results in single-use keys being recreated, triggering unnecessary updates to downstream Terraform resources. By default, the provider will now only recreate reusable keys, ignoring invalid single-use keys. This can also be changed now using a new `recreate_if_invalid` attribute. Fixes #306 Signed-off-by: Anton Tolchanov <[email protected]>
This change partially reverts the behaviour introduced in #287 that currently results in single-use keys being recreated, triggering unnecessary updates to downstream Terraform resources. By default, the provider will now only recreate reusable keys, ignoring invalid single-use keys. This can also be changed now using a new `recreate_if_invalid` attribute. Fixes #306 Signed-off-by: Anton Tolchanov <[email protected]>
What this PR does / why we need it:
terraform refresh
operations to treat all 404 errors as a deleted key. Previously only one-time keys (e.g not reusable) were treated as deleted and a 404 would fail the terraform operation with an error.invalid
key property istrue
.Which issue this PR fixes:
Fixes #144
Special notes for your reviewer:
Any concerns with using the time of the machine that is running Terraform to compare withexpires_at
returned by the Tailscale API?