Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Store token result in terraform state #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomwardill-payoneer
Copy link

InfluxDB tokens are only retrievable once, in the initial response from the POST.
Any further attempt to retrieve them returns the result redacted on the API.

The authorization class was only extracting the ID from the initial response, and then re-requesting all further details. This means that the token was lost.

Instead, extract the token from the initial POST response, save it to the state. If any further updates happen to the authorization, check if the response is the literal string redacted, and ignore it if so.

Also mark the authorization.token as Sensitive in the schema, so it's not accidentally leakable from terraform.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant