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

[Task]: Add env vars for the Search API #1521

Closed
1 task
acouch opened this issue Mar 22, 2024 · 3 comments · Fixed by #1750, #1755 or #1759
Closed
1 task

[Task]: Add env vars for the Search API #1521

acouch opened this issue Mar 22, 2024 · 3 comments · Fixed by #1750, #1755 or #1759
Assignees
Labels
project: grants.gov Grants.gov Modernization tickets

Comments

@acouch
Copy link
Collaborator

acouch commented Mar 22, 2024

Summary

This task is to add the API_URL and API_AUTH_TOKEN to the dev and stage and prod ECS task env vars so that the dev and stage search pages can connect to the dev and stage and prod APIs.

Without the transformation work, there will be no data to read the data.

Acceptance criteria

  • search page can connect to the search api
@rylew1
Copy link
Contributor

rylew1 commented Mar 22, 2024

You might add a dependency or relationship to a ticket for dev to be seeded with data? If the schema is actually setup in dev with blank tables, I think it would work and show 0 results on the search page.

I'm not sure if stage or prod have a dependency for some kind of release to bump them to API v0.1 ?

@coilysiren
Copy link
Collaborator

Use the new pattern added in #1516, #1526 when doing this

@coilysiren
Copy link
Collaborator

Ryan DMed me to say that he wanted to work on this

@coilysiren coilysiren assigned rylew1 and unassigned coilysiren Apr 16, 2024
@rylew1 rylew1 moved this from Sprint Ready to In Progress in Simpler.Grants.gov Product Backlog Apr 16, 2024
rylew1 added a commit that referenced this issue Apr 16, 2024
## Summary
Fixes #1521 

## Changes proposed
- Add env vars to terraform
- Add `/frontend/<env>/api-url` and `/frontend/<env>/api-auth_toekn` for
dev/staging/prod to Parameter Store
rylew1 added a commit that referenced this issue Apr 16, 2024
## Summary
Fixes #1521 

## Changes proposed
- remove frontend `Dockerfile` API env vars
coilysiren added a commit that referenced this issue Apr 16, 2024
…1759)

## Summary

Fixes #1521

### Time to review: __2 mins__

## Context

Both `infra/api` and `infra/frontend` were defining a variable called
`API_AUTH_TOKEN`. The way they were defined made them clash, leading to
the following error message:

> Error: creating ECS Task Definition (frontend-dev): ClientException:
The secret name must be unique and not shared with any new or existing
environment variables set on the container, such as 'API_AUTH_TOKEN'

## Changes proposed

Refactors the terraform configuration so the `API_AUTH_TOKEN` definition
is no longer clashing between the frontend and backend

## Testing

I have already deployed both the API and the frontend to dev to test
that this is working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment