fix(accounts): fix the account domains payload #393
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the payload type of account domains.
The API docs don't show the structure of the response, so we mistakenly assumed it was the same as the request payload - a list of strings.
It's actually a list of objects, and the name is one of the fields in those objects.
So this change accounts for that structure, and extracts the names from it.
Follow-up to #382
Closes #390
Testing
You can't create accounts with Terraform, and to test SSO it has to be enabled on a paid account, so I used the existing
github-ci-tests
account we have in staging:Per the comment, I added
update.com
to my Terraform (the first two existed already because I manually set them to satisfy the datasource acceptance test).I applied the change and it added the value as expected:
This covers the resource testing. The datasource testing, as mentioned, is part of the acceptance test suite as of this PR.
Requirements
General
Closes <issue>
, if availableDraft
status is used until ready for reviewCode-level changes
New or updated resource/datasource
make docs
from source code)- When applicable, provide a link back to the relevant page in the Prefect documentation site.
- Resource example under
examples/resources/prefect_<name>/resource.tf
- Import example under
examples/resources/prefect_<name>/import.sh
- Datasource example under
examples/data-sources,resources>/prefect_<name>/data-source.tf