-
Notifications
You must be signed in to change notification settings - Fork 38
Allow specifying secrets in app resource #106
Conversation
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2.9.1 to 3.0.0. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](goreleaser/goreleaser-action@v2.9.1...v3.0.0) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Closes fly-apps#2 Closes fly-apps#14
Token parameter & env were renamed
This reverts commit a92ca86.
Use a fragment to create a common type for app query & mutation, reducing duplicate code
This is awesome, I will take a look at this later today. |
Pushed af3baa0 which fixes a bug that would have caused loss of unmanaged secrets. The way this works currently is that the resource doesn't touch any secrets that haven't been specified in config, so as not to overwrite or delete secrets that have been set outside of Terraform such as |
@DAlperin is there any chance this could be released? |
I have been looking forward to this feature for a while as well, thanks for the PR! Nit: it would be more consistent for secrets to follow the same notation as env vars in machines https://registry.terraform.io/providers/fly-apps/fly/latest/docs/resources/machine#env which would be something like this:
Also it is unclear to me how app secrets would interact with machine env vars (or even machine secrets; is that a thing?). I assume machine env vars would override an app secret with the same key, in which case it probably makes sense to allow machine specific secrets as well. |
Albeit more concise, my reasoning for not doing this is that it seemed the most natural way to also provide the secret's digest and timestamp via |
I'm gonna take some time to go through some PRs and issues this week or next week. I work at fly.io proper now, I did not when I started this. That along with life has made things a bit hectic for me :) I appreciate all of you for chiming in on this PR. I'll give it a proper review soon. |
@DAlperin any update? 🙏 |
It would be better as a separate For example I have one (an API token) that's derived from the With the provider built from this PR (thanks!) I thus get an error when it detects that cycle. |
That's what I did first but it makes non-machine apps hardly usable because Fly's API triggers a new deployment for each |
Aren't non-machine ('v1') apps deprecated anyway? I didn't think it was even possible to create them with this provider (I tried it first - the app just sat there waiting for a machine.) |
I just tested this change and I really appreciate the work you put into this PR @lukas-w! One thing I stumbled upon during the test is removing secrets. I tried swapping one secret with another and after the changes were applied new key was added, but the old was not removed. Is this expected? |
Thank you @lukas-w , it works like a charm for my case, I published the fork provider with all the PRs opened in this repo. Seems like maintenance of the provider was abandoned for some time |
@damianstasik gonna check it as well |
I would love to see this released! It would be a huge benefit for environments where there are multiple people adjusting secrets. Anything I can help with to get this across the line? |
It takes a long time to test, any update here? |
Closed due to history re-write, but refiled as #192 |
Adds a
secret
option to thefly_app
resource and some basic tests. This also updatesterraform-plugin-framework
to 0.14 and does some minor refactoring. Commits are probably best reviewed one by one.Disregard, fixed via https://community.fly.io/t/overriding-staged-secrets-for-machines/8493/5:
Usage:
Resolves #27