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

Refactor ftl-controller to use ASM + DB config #1692

Closed
Tracked by #1612
alecthomas opened this issue Jun 6, 2024 · 0 comments · Fixed by #1697
Closed
Tracked by #1612

Refactor ftl-controller to use ASM + DB config #1692

alecthomas opened this issue Jun 6, 2024 · 0 comments · Fixed by #1697
Assignees

Comments

@alecthomas
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added the triage Issue needs triaging label Jun 6, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label Jun 6, 2024
@ftl-robot ftl-robot mentioned this issue Jun 6, 2024
@alecthomas alecthomas assigned gak and wesbillman and unassigned gak Jun 6, 2024
@gak gak closed this as completed in #1697 Jun 7, 2024
gak added a commit that referenced this issue Jun 7, 2024
Fixes #1692

This PR integrates AWS secrets manager (ASM) and DB project
resolver/config provider into the controller.

Please note that `ftl dev` does not support these yet.

Manual test with localstack:

```bash
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ✗ export AWS_REGION=us-west-2 export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_ENDPOINT_URL=http://localhost:4566
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ✗ ftl-controller
info: Web console available at: http://localhost:8892
info: HTTP ingress server listening on: http://localhost:8891
warn:heartbeatController: failed to heartbeat controller: duplicate key value violates unique constraint "controller_endpoint_not_dead_idx": conflict

etc...
```

Another terminal using AWS secrets:
```bash
ftl🐚 ➜  ftl git:(gak/asm-in-controller) echo -n '{"user": "sup!", "pass": "<0001f9be>"}' | LOG_LEVEL=trace ftl secret set my.module --asm
trace: Loading config from /Users/gak/src/ftl/ftl-project.toml
trace: /xyz.block.ftl.v1.AdminService/SecretSet (unary)
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ✗ ftl secret list
my.module
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ✗ ftl secret get my.module
{"user": "sup!", "pass": "🦾"}
```

And config via db:
```bash
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ftl config set myconfig hithere --db
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ftl config list
myconfig
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ftl config get myconfig
hithere
```
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 a pull request may close this issue.

3 participants