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

opensearch domain warning "ForceNew: No changes for engine_version" #3389

Closed
ploxiln opened this issue Feb 5, 2024 · 4 comments · Fixed by pulumi/pulumi-terraform-bridge#1684
Assignees
Labels
impact/regression Something that used to work, but is now broken impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed

Comments

@ploxiln
Copy link

ploxiln commented Feb 5, 2024

What happened?

For all AWS OpenSearch Domain resources managed by my pulumi projects/stacks, I now get this warning in Diagnostics:

aws:opensearch:Domain (rodeo-production--non-ro-pharmacies--os):
warning: customdiff/force_new.go:32: sdk.helper_schema: unable to require attribute replacement: [email protected] tf_attribute_path=engine_version error="ForceNew: No changes for engine_version"

There is no actual diff to apply for the opensearch instance, the EngineVersion in particular had no change. I can just ignore the warning and everything continues to work ok, but it does make the plan output messier, and it even corrupts the plan terminal output even more sometimes. Example below. But before that, some more notes:

  • I tried updating to the latest versions [email protected] and [email protected] and saw the exact same warning "ForceNew: No changes for engine_version"
  • I was able to avoid this by downgrading back to [email protected] and [email protected] so this is probably a regression since v6.0.4
  • Adding pulumi.IgnoreChanges([]string{"engineVersion"}) doesn't help
  • My googling suggests this must be some kind of bug in the provider, using the terraform sdk

Example of corrupted preview terminal output (happens occasionally):

Previewing update (healthbyro/...)

View in Browser (Ctrl+O): https://app.pulumi.com/healthbyro/...

     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                            Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
     Type                                 Name                                                    Plan        Info
... about 500 more lines of this

Example

	domainName := fmt.Sprintf("rodeo-%s-shared-os", input.EnvironmentName)

	_, err := opensearch.NewDomain(ctx, domainName, &opensearch.DomainArgs{
		DomainName:    pulumi.String(domainName),
		EngineVersion: pulumi.String("OpenSearch_1.3"),
		ClusterConfig: &opensearch.DomainClusterConfigArgs{
			InstanceCount: pulumi.Int(1),
			InstanceType:  pulumi.String("m5.xlarge.search"),
		},
		EbsOptions: &opensearch.DomainEbsOptionsArgs{
			EbsEnabled: pulumi.Bool(true),
			VolumeType: pulumi.String("gp2"),
			VolumeSize: pulumi.Int(25),
		},
		EncryptAtRest: &opensearch.DomainEncryptAtRestArgs{
			Enabled: pulumi.Bool(true),
		},
		NodeToNodeEncryption: &opensearch.DomainNodeToNodeEncryptionArgs{
			Enabled: pulumi.Bool(true),
		},
		AccessPolicies: elasticSearchDomainAccessPolicies(input.NodeGroupRoleARN),
		VpcOptions: &opensearch.DomainVpcOptionsArgs{
			// Use a single subnet to allow a single-instance domain.
			SubnetIds:        pulumi.StringArray{input.Subnets[0].ID()},
			SecurityGroupIds: pulumi.StringArray{input.SecurityGroup.ID()},
		},
		Tags: pulumi.StringMap{
			"Name":   pulumi.String(domainName),
			"Env":    pulumi.String(input.EnvironmentName),
			"System": pulumi.String("rodeo"),
		},
	})

Output of pulumi about

CLI          
Version      3.96.2
Go Version   go1.21.4
Go Compiler  gc

Plugins
NAME        VERSION
aws         6.14.0
aws-native  0.90.0
go          unknown
kubernetes  4.6.1
random      4.13.4
tls         4.10.0

Host     
OS       darwin
Version  14.3
Arch     arm64

This project is written in go: executable='/opt/homebrew/bin/go' version='go version go1.21.6 darwin/arm64'

Current Stack: healthbyro/rodeo-infra/beta

TYPE ... URN ... a lot! seriously

Found no pending operations associated with healthbyro/beta

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/plo-ro
User           plo-ro
Organizations  plo-ro, healthbyro
Token type     personal

Dependencies:
NAME                                        VERSION
github.com/apparentlymart/go-cidr           1.1.0
github.com/healthbyro/rodeo                 1.93.1704389193
github.com/pulumi/pulumi-aws-native/sdk     0.90.0
github.com/pulumi/pulumi-aws/sdk/v6         6.14.0
github.com/pulumi/pulumi-kubernetes/sdk/v4  4.6.1
github.com/pulumi/pulumi-random/sdk/v4      4.13.4
github.com/pulumi/pulumi-tls/sdk/v4         4.10.0
github.com/pulumi/pulumi/sdk/v3             3.96.2
github.com/rs/zerolog                       1.31.0
gopkg.in/yaml.v2                            2.4.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@ploxiln ploxiln added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Feb 5, 2024
@t0yv0 t0yv0 added impact/usability Something that impacts users' ability to use the product easily and intuitively impact/regression Something that used to work, but is now broken labels Feb 6, 2024
@t0yv0
Copy link
Member

t0yv0 commented Feb 6, 2024

Thank you for reporting this issue @ploxiln this is indeed a recent change and likely side-effect of pulumi/pulumi-terraform-bridge#1569 . Our team will have a look as soon as we have a chance.

@t0yv0 t0yv0 removed the needs-triage Needs attention from the triage team label Feb 6, 2024
@ploxiln
Copy link
Author

ploxiln commented Feb 6, 2024

That makes sense; thanks for the update!

@lukehoban lukehoban added the p1 A bug severe enough to be the next item assigned to an engineer label Feb 13, 2024
@iwahbe iwahbe self-assigned this Feb 14, 2024
@iwahbe
Copy link
Member

iwahbe commented Feb 14, 2024

I was able to reproduce the issue (thanks for the great repro). It looks like pulumi/pulumi-terraform-bridge#1569 set a different log level then TF uses. Running TF_LOG=WARN terraform apply on an equivalent program produces the same warning:

2024-02-14T13:09:00.719-0800 [WARN]  provider.terraform-provider-aws_v5.32.1_x5: unable to require attribute replacement: tf_resource_type=aws_opensearch_domain tf_rpc=PlanResourceChange tf_mux_provider=*schema.GRPCProviderServer tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=39fbbc5d-8f19-4edd-e84c-cd0aec9c45dd @caller=github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/customdiff/force_new.go:32 @module=sdk.helper_schema error="ForceNew: No changes for engine_version" tf_attribute_path=engine_version timestamp=2024-02-14T13:09:00.719-0800

We should be able to fix this by reducing the default TF log level in the bridge to ERROR (instead of WARN).

@iwahbe
Copy link
Member

iwahbe commented Feb 14, 2024

The warning is triggered by the underlying AWS provider, and can be safely ignored. pulumi/pulumi-terraform-bridge#1684 will resolve the issue after it releases.

iwahbe added a commit to pulumi/pulumi-terraform-bridge that referenced this issue Feb 15, 2024
iwahbe added a commit to pulumi/pulumi-terraform-bridge that referenced this issue Feb 15, 2024
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/regression Something that used to work, but is now broken impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants