-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dont apply TF defaults before validating resource input (#1583)
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.
- Loading branch information
1 parent
7f7af28
commit 2bb6194
Showing
8 changed files
with
456 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.