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

Bug: Some logging providers were sending an empty placement to the Fastly API #620

Merged
merged 1 commit into from
Nov 23, 2022

Conversation

Integralist
Copy link
Collaborator

Problem:
When creating a logging provider the placement attribute is optional and the API will expect it to not be sent with an empty value, but that is what was happening in the latest Terraform v3 release.

Context :
The Terraform provider wraps all values in a pointer (as that is what go-fastly v7+ expects), but the zero value for an attribute (e.g. "" for the string type) is what will be wrapped inside the pointer and consequently sent to the API via go-fastly. Previously we had used the integration/acceptance tests to identify which attributes would cause API errors but what happened in this instance was that the tests were setting a value for that field and so no error was reported.

Solution:
Do as we have already done with the other logging providers and avoid setting the placement field on the go-fastly struct.

@Integralist
Copy link
Collaborator Author

I've run the integration test suite and it is passing.

@Integralist Integralist merged commit 5706849 into main Nov 23, 2022
@Integralist Integralist deleted the integralist/bug-with-placement branch November 23, 2022 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant