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

Fix: use agency card as prefix for key vault name #354

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

angela-tran
Copy link
Member

@angela-tran angela-tran commented Oct 25, 2023

Closes #353

Use the agency card name instead of a hard-coded eligibility-server. Key Vault names are limited to 24 characters.

Note that this will rename MST's key vault, which is ok because it just contains the Slack email for notifications.

Post-approval

  • Manually delete MST key vault since lifecycle.prevent_destroy is set to true

Post-merge

  • Add back slack email secret for MST
  • Add slack email secret for SBMTD

this will rename MST's key vault
@angela-tran angela-tran self-assigned this Oct 25, 2023
@angela-tran angela-tran requested a review from a team as a code owner October 25, 2023 20:56
@angela-tran angela-tran added this to the SBMTD Mobility Pass milestone Oct 25, 2023
@thekaveman
Copy link
Member

So it seems like the plan failed because of

Manually delete MST key vault since lifecycle.prevent_destroy is set to true

@angela-tran
Copy link
Member Author

So it seems like the plan failed because of

Manually delete MST key vault since lifecycle.prevent_destroy is set to true

Good point that you probably want to see a successful plan before approving. I can go ahead and delete the Key Vault in dev.

@thekaveman
Copy link
Member

Ah, I see -- you were expecting this and would clean it up post merge. It's all good 👍

@angela-tran
Copy link
Member Author

angela-tran commented Oct 25, 2023

Hmm, we've made it very hard to fully delete our Key Vaults. We enabled purge protection on them, and once it's enabled, you can't disable it. This means when we delete a Key Vault, it is in a soft-deleted state and can be recovered within the configured retention period (ours is set to 90 days). You cannot purge the Key Vault until the retention period has passed.

Here's a screenshot of my attempt at deleting + purging the MST Key Vault in dev. I recovered the Key Vault when I realized I can't actually purge it.

image

@thekaveman
Copy link
Member

You cannot purge the Key Vault until the retention period has passed.

Is it possible to shorten the retention period for Eligibility Server key vaults? Like to 1 day? Via Terraform or otherwise

@angela-tran
Copy link
Member Author

Is it possible to shorten the retention period for Eligibility Server key vaults? Like to 1 day? Via Terraform or otherwise

No, we can't change the retention period once it's set.

I just realized though that it's ok for the Key Vault to be in a soft-deleted state... we're not trying to reuse that name; we just want it to not exist so that Terraform doesn't try to delete it. 🧠 I'm gonna try again with deleting it and re-running the pipeline to get a Terraform plan

@angela-tran angela-tran merged commit 3f49b0f into dev Oct 25, 2023
8 checks passed
@angela-tran angela-tran deleted the fix/key-vault-name branch October 25, 2023 23:09
This was referenced Oct 26, 2023
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.

Key Vault name needs to be globally unique
2 participants