Skip to content
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

feat: regenerate talosconfig #167

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

frezbo
Copy link
Member

@frezbo frezbo commented Jun 27, 2024

Regenerate talosconfig when it neards expiry.

Fixes: #123

Regenerate talosconfig when it neards expiry.

Fixes: siderolabs#123

Signed-off-by: Noel Georgi <[email protected]>
@frezbo
Copy link
Member Author

frezbo commented Jun 27, 2024

/m

@talos-bot talos-bot merged commit f6f1811 into siderolabs:main Jun 27, 2024
14 checks passed
@frezbo frezbo deleted the feat/talosconfig-regen branch June 27, 2024 15:23
@dhess
Copy link

dhess commented Sep 26, 2024

#123 has just hit us, and unfortunately it appears that our Terraform provider version is out of date and doesn't include this fix. Now we have a chicken-and-egg problem — the current talosconfig baked into the Terraform state has expired, and we can't regenerate it using the new functionality included in this PR.

How would you recommend that we work around this?

@DArtagan
Copy link

@dhess, today I hit this situation as well. Was running with 0.3.4 of the siderolabs/talos terraform provider, and my talosconfig certificates expired because it had been more than a year. A terraform state show showed that there was a machine_secrets module stored inside the Terraform config (module.talos.talos_machine_secrets.main). I couldn't find an example of the secrets.yaml (mentioned by https://www.talos.dev/v1.6/talos-guides/configuration/managing-pki/#from-secrets-bundle) to try and recreate it, but it gave me hope that the data was all there. Ultimately what I did:

  1. Make a backup copy of the whole terraform directory/state - just in case.
  2. Update the required_providers version for siderolabs/talos in my terraform manifest to 0.6.1.
  3. terraform init --upgrade
  4. terraform apply --target=resource.local_sensitive_file.talosconfig # yay, verified that it's only making changes to the certificate values. This file is where I write the contents from data.talos_client_configuration.main.talos_config
  5. Verify that the refreshed talos config lets me interact with the cluster again. ✔️

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.

Regenerate talosconfig
5 participants