-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: align service token env vars with pscale cli #103
Conversation
Deprecate `PLANETSCALE_SERVICE_TOKEN_NAME` in favor of `PLANETSCALE_SERVICE_TOKEN_ID` to match the pscale CLI conventions. - Replace environment variable for better CLI alignment - Maintain backwards compatibility with warning messages - Update service-token limitation documentation Reference: https://github.com/planetscale/cli/blob/main/README.md?plain=1#L97-L98
6aebefd
to
7998965
Compare
@@ -7,7 +7,7 @@ description: |- | |||
access token credentials, configured or stored in the environment variable PLANETSCALE_ACCESS_TOKENservice token credentials, configured or stored in the environment variables PLANETSCALE_SERVICE_TOKEN_NAME and PLANETSCALE_SERVICE_TOKEN | |||
Note that the provider is not production ready and only for early testing at this time. | |||
Known limitations: | |||
Support for deployments, deploy queues, deploy requests and reverts is not implemented at this time. If you have a use case for it, please let us know in the repository issues.Service tokens don't immediately have read/write access on the resources they create. For now, access must be granted via the UI or via the CLI (pscale service-token add-access) | |||
Support for deployments, deploy queues, deploy requests and reverts is not implemented at this time. If you have a use case for it, please let us know in the repository issues.When using service tokens (recommended), ensure the token has the create_databases organization-level permission. This allows terraform to create new databases and automatically grants the token all other permissions on the databases created by the token. |
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.
Support for deployments, deploy queues, deploy requests and reverts is not implemented at this time. If you have a use case for it, please let us know in the repository issues.When using service tokens (recommended), ensure the token has the create_databases organization-level permission. This allows terraform to create new databases and automatically grants the token all other permissions on the databases created by the token. | |
Support for deployments, deploy queues, deploy requests and reverts is not implemented at this time. If you have a use case for it, please let us know in the repository issues. When using service tokens (recommended), ensure the token has the create_databases organization-level permission. This allows terraform to create new databases and automatically grants the token all other permissions on the databases created by the token. |
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.
@mdlayher I know this looks weird, and it puzzled me for several minutes. This is generated by tfplugindocs
. It is in the front-matter of the yaml and so I presume it is fine, because the actual rendered documentation a few lines lower in this file has the proper formatting and this is what is visbile on the TF registry page here: https://registry.terraform.io/providers/planetscale/planetscale/latest/docs
Deprecate
PLANETSCALE_SERVICE_TOKEN_NAME
in favor ofPLANETSCALE_SERVICE_TOKEN_ID
to match the pscale CLI conventions.Reference: https://github.com/planetscale/cli/blob/main/README.md?plain=1#L97-L98