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

Terraform pipeline is failing for MST #511

Closed
thekaveman opened this issue Dec 18, 2024 · 4 comments
Closed

Terraform pipeline is failing for MST #511

thekaveman opened this issue Dec 18, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@thekaveman
Copy link
Member

thekaveman commented Dec 18, 2024

Seems like we need to recycle the client secret key(s)

Failed to get existing workspaces: Error retrieving keys for Storage Account "mstcourtesycardstf": autorest/Client#Do: Preparing request failed: StatusCode=0 -- Original Error: clientCredentialsToken: received HTTP status 401 with response: 

{
  "error":"invalid_client",
  "error_description":"AADSTS7000222: The provided client secret keys for app '***' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: xxx Correlation ID: xxx Timestamp: 2024-12-18 20:14:32Z",
  "error_codes":[7000222],
  "timestamp":"2024-12-18 20:14:32Z",
  "trace_id":"xxx",
  "correlation_id":"xxx",
  "error_uri":"[https://login.microsoftonline.com/error?code=7000222"}](https://login.microsoftonline.com/error?code=7000222%22
}

See logs: https://dev.azure.com/mstransit/courtesy-cards/_build/results?buildId=512&view=logs&jobId=ace7239b-ade7-5b52-2e3a-ab948f392fca&j=ace7239b-ade7-5b52-2e3a-ab948f392fca&t=2922d73c-5c9a-576b-ab75-a4d961dfc773

Expected behavior

terraform plan and terraform apply should succeed.

Environment

  • test
  • prod

Agency

  • MST

Additional context

This doesn't impact the application deployment (e.g. Docker image build/push).

However, the nightly server restart (to load new data) is failing due to this, which was probably the root cause of cal-itp/benefits#2598

@thekaveman thekaveman added the bug Something isn't working label Dec 18, 2024
@angela-tran angela-tran self-assigned this Dec 19, 2024
@angela-tran angela-tran moved this from Todo to In progress in Digital Services Dec 19, 2024
@angela-tran
Copy link
Member

angela-tran commented Dec 19, 2024

Refreshed the service connection credentials

Image

After doing no-op save
Image

Also, at some point during this process, I accidentally set a Resource Group on the service connection, so this StackOverflow helped me set it back to empty so that it will work for all Resource Groups: https://stackoverflow.com/questions/72106131/azure-devops-how-to-reset-resource-group-in-edit-service-connection

@angela-tran
Copy link
Member

angela-tran commented Dec 19, 2024

The "Release" pipeline that handles restarting the app services now works:

(I manually triggered the jobs for restarting dev and test)

Image

(I'll let the scheduled trigger handle doing production.)

The infra pipeline also now works:

Image

@github-project-automation github-project-automation bot moved this from In progress to Done in Digital Services Dec 19, 2024
@angela-tran
Copy link
Member

#514 would be a good follow-up after we see that prod is refreshed with the existing pipeline.

@angela-tran
Copy link
Member

Oh, also I added a calendar event to the Compiler Delivery Google Calendar for when this service connection credential expires in March 2025.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants