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

[2124] Reduce length of Bigquery service account name #132

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

saliceti
Copy link
Member

@saliceti saliceti commented Nov 15, 2024

Context

Fix for error in TRS preprod:

Error: "account_id" ("appender-wif-trs-pre-production") doesn't match regexp "^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$"

Changes proposed in this pull request

Change the service account name to allow longer environment names

Guidance to review

Run terraform plan on DFE-Digital/teaching-record-system#1681

  # module.dfe_analytics[0].google_service_account.appender will be created
  + resource "google_service_account" "appender" {
      + account_id   = "app-wif-trs-pre-production"
      + description  = "Configured with workflow identity federation from Azure"
      + disabled     = false
      + display_name = "Service Account appender to trs in pre-production environment"
  ...

Checklist

  • I have performed a self-review of my code, including formatting and typos
  • I have cleaned the commit history
  • I have added the Devops label
  • I have attached the pull request to the trello card

@saliceti saliceti changed the title [2124] Reduce length of Bigquery service account [2124] Reduce length of Bigquery service account name Nov 15, 2024
@saliceti saliceti marked this pull request as ready for review November 15, 2024 11:28
Fix for error:
Error: "account_id" ("appender-wif-trs-pre-production") doesn't match regexp "^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$"

This change will allow:
- 6 characters for the short service name
- 15 characters for the environment name
@saliceti saliceti force-pushed the 2124-service-account-length branch from e3184f4 to 7bb9468 Compare November 15, 2024 11:30
@saliceti
Copy link
Member Author

TRS: migrate to GCP WIF

Copy link

@neillturner neillturner left a comment

Choose a reason for hiding this comment

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

on the branch i ran:
gcloud auth application-default login
and logged on to my google education.gov.uk account
ran
make test terraform-plan
with
docker_image
set to ghcr.io/dfe-digital/teaching-record-system:714e65ed812b076557cb0c26165a9369c0a771f9
and get
No changes. Your infrastructure matches the configuration.
so change has worked

@saliceti saliceti merged commit 24576f3 into main Nov 15, 2024
3 checks passed
@saliceti saliceti deleted the 2124-service-account-length branch November 15, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants