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

Swap CtyInstanceState with PlanResourceChange flag #3359

Merged
merged 3 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions examples/examples_nodejs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,11 @@ func TestAccWafV2(t *testing.T) {
func TestRegress1423Ts(t *testing.T) {
test := getJSBaseOptions(t).
With(integration.ProgramTestOptions{
Dir: filepath.Join(getCwd(t), "regress-1423"),
RunUpdateTest: false,
Dir: filepath.Join(getCwd(t), "regress-1423"),
})
test.ExpectRefreshChanges = false
// TODO[pulumi/pulumi-aws#3361] similarly to upstream this currently has a non-empty refresh
test.SkipRefresh = true
test.Quick = false
test.SkipRefresh = false
integration.ProgramTest(t, &test)
}

Expand Down
10 changes: 6 additions & 4 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,12 @@ func ProviderFromMeta(metaInfo *tfbridge.MetadataInfo) *tfbridge.ProviderInfo {
v2p := shimv2.NewProvider(upstreamProvider.SDKV2Provider,
shimv2.WithDiffStrategy(shimv2.PlanState),
shimv2.WithPlanResourceChange(func(s string) bool {
return s == "aws_ssm_document"
switch s {
case "aws_ssm_document", "aws_wafv2_web_acl":
return true
default:
return false
}
}))

p := pftfbridge.MuxShimWithDisjointgPF(ctx, v2p, upstreamProvider.PluginFrameworkProvider)
Expand Down Expand Up @@ -6222,9 +6227,6 @@ $ pulumi import aws:networkfirewall/resourcePolicy:ResourcePolicy example arn:aw
args.ExamplePath == "#/resources/aws:appsync/graphQLApi:GraphQLApi"
}

// Fixes a spurious diff on repeat pulumi up for the aws_wafv2_web_acl resource (pulumi/pulumi#1423).
shimv2.SetInstanceStateStrategy(prov.P.ResourcesMap().Get("aws_wafv2_web_acl"), shimv2.CtyInstanceState)

setAutonaming(&prov)

prov.MustApplyAutoAliases()
Expand Down
Loading