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

Test tf defaults #3157

Closed
wants to merge 1 commit into from
Closed

Conversation

VenelinMartinov
Copy link
Contributor

@VenelinMartinov VenelinMartinov marked this pull request as draft December 19, 2023 12:41
Copy link

Does the PR have any schema changes?

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

VenelinMartinov added a commit to pulumi/pulumi-terraform-bridge that referenced this pull request Dec 28, 2023
This PR fixes an inconsistency in how we treat defaults versus TF.
Previously we would have applied defaults before validating input. TF
does the reverse.

Should address
#1546.

Tested in AWS here: pulumi/pulumi-aws#3157


Note that this PR technically introduces a breaking change. An example
of how it'd manifest is in
[TestDefaultsAndRequiredWithValidationInteraction/CheckMissingRequiredWith](https://github.com/pulumi/pulumi-terraform-bridge/blob/5ef834fd75b7c259dacc8fb71a0cc6edfd2472bc/pkg/tfbridge/provider_test.go#L2514).

Previously we'd apply the defaults before passing to the TF provider for
validation, so this test case would have yielded no failures. This is
not what TF does - TF would fail validation on that input. We will now
match the TF behaviour and fail this input. This should be fine as the
input likely does not make sense anyway.
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.

1 participant