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

Fix and update org token #342

Merged
merged 1 commit into from
Feb 9, 2022
Merged

Fix and update org token #342

merged 1 commit into from
Feb 9, 2022

Conversation

dloucasfx
Copy link
Collaborator

@dloucasfx dloucasfx commented Feb 4, 2022

This PR fixes the dpm_limits , which a single line fix; but fixing this and/or running the existing test TestAccCreateUpdateOrgToken will fail with a server side error:

"code" : 500,
  "message" : "Server error occurred. Unique error identifier [24df50a1-e751-4a42-9adb-8eb759e875b9]"

This error is returned when the provider attempts to update an org token with a DPM/Category limit and not setting the authScopes in its payload.

In this PR I added auth_scopes to the token schema and I made it optional to keep it backward compatible;
Note, when you create a token, the server defaults to setting the value to ["API", "INGEST"] so the initial creation succeeds whether you set authScopes or not; but due to the TF SDK not supporting Default for complex types , in this case TypeList, I opted to set Computed to true; this will prevent false positive plan diffs .

I also added new test.

NOTE: Do Not Merge as this depends on this PR signalfx/signalfx-go#146 , once the it's merged, I need to update this PR to pull the new version of signalfx-go

update: signalfx-go is updated

Signed-off-by: Dani Louca dlouca@splunk.com

@dloucasfx dloucasfx requested a review from keitwb as a code owner February 4, 2022 19:15
@dloucasfx dloucasfx requested a review from asuresh4 February 4, 2022 19:15
Signed-off-by: Dani Louca <dlouca@splunk.com>
@dloucasfx dloucasfx changed the title Fix and update org token (Do Not Merge Until Dependency Is Merged) Fix and update org token Feb 8, 2022
Copy link

@keitwb keitwb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok looks good.

@keitwb keitwb merged commit 84ad379 into main Feb 9, 2022
@keitwb keitwb deleted the SWAT-4236 branch February 9, 2022 16:13
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