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

Service authorization #572

Merged
merged 9 commits into from
Jun 20, 2022
Merged

Service authorization #572

merged 9 commits into from
Jun 20, 2022

Conversation

noseglid
Copy link
Contributor

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 or purge_all).

go.mod Outdated Show resolved Hide resolved
Copy link
Collaborator

@Integralist Integralist left a 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.

examples/resources/service_authorization_basic_usage.tf Outdated Show resolved Hide resolved
fastly/resource_fastly_service_authorization.go Outdated Show resolved Hide resolved
fastly/resource_fastly_service_authorization.go Outdated Show resolved Hide resolved
noseglid added 7 commits June 17, 2022 14:52
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.
@noseglid noseglid requested a review from Integralist June 17, 2022 13:04
@noseglid
Copy link
Contributor Author

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.
@Integralist
Copy link
Collaborator

@noseglid I've cut a new go-fastly release now https://github.com/fastly/go-fastly/releases/tag/v6.4.0

@Integralist Integralist merged commit dd8c3de into fastly:main Jun 20, 2022
@noseglid noseglid deleted the service-authorization branch June 20, 2022 15:07
@noseglid
Copy link
Contributor Author

@Integralist Any chance to get a new release with these changes included?

@Integralist
Copy link
Collaborator

Integralist commented Jun 27, 2022

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:
https://github.com/fastly/go-fastly/releases/tag/v6.4.1

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:
#573

Once that's done I'll cut a new v2.1.0 release and ping here to let you know when it's done.

@noseglid
Copy link
Contributor Author

That sounds great. Thank you for the update!

@Integralist
Copy link
Collaborator

@noseglid
Copy link
Contributor Author

Fantastic, thank you!

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 this pull request may close these issues.

2 participants