-
Notifications
You must be signed in to change notification settings - Fork 142
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
Service authorization #572
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @noseglid for opening this PR.
Other than a couple of minor comments I have (and also the changes you mentioned regarding ensuring we use a new go-fastly release, once your associated PR is merged/released) this PR LGTM.
This change adds support for [Fastly Service Authorizations][1] to be managed via Terraform. Other managed users and services can be referenced by their ID and the permission is controlled with an enumeration of the allowed values by the API (`full`, `read_only`, `purge_select` or `purge_all`). [1]: https://developer.fastly.com/reference/api/account/service-authorization/
Add documentation on how to use and import services authorizations with Fastly.
The default permission in the API is `full` which is extremely permissive and arguably not a good default. The terraform provider will require the permission to be set to avoid over-permitting users by a simple omission.
Acceptance tests ensure the resource works as expected right now, but also that the functionality keeps working as other changes are applied.
This PR is now updated using the main branch of go-fastly/fastly. I will update it again once we have a tagged version to use. |
Removes the temporary replace directive. This should still be replaced with a tag once the changes on main have actually been released.
@noseglid I've cut a new go-fastly release now https://github.com/fastly/go-fastly/releases/tag/v6.4.0 |
@Integralist Any chance to get a new release with these changes included? |
Hi @noseglid Absolutely. I was planning on cutting a release after merging this PR but it was then brought to my attention (via another customer) that the go-fastly change set was missing the list endpoint and that took up my focus for a bit. So (in case it's of interest to you) I've since added support for listing service authorizations, and also cut that into a new go-fastly release: I can't cut a new Terraform release unless all integration tests are passing, which at the moment there are a couple of failing tests related to changes made in our API layer, so I have a PR open that fixes those, and I'm just waiting a member of my team to review/approve: Once that's done I'll cut a new |
That sounds great. Thank you for the update! |
@noseglid Sorry for the delay: |
Fantastic, thank you! |
This change adds support for Fastly Service Authorizations to be
managed via Terraform.
Other managed users and services can be referenced by their ID and the
permission is controlled with an enumeration of the allowed values by
the API (
full
,read_only
,purge_select
orpurge_all
).