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

Regression in 1.8.0: mongodbatlas_third_party_integration marks "type" attribute as deprecated #1032

Closed
legal90 opened this issue Jan 27, 2023 · 4 comments
Labels

Comments

@legal90
Copy link

legal90 commented Jan 27, 2023

Terraform CLI and Terraform MongoDB Atlas Provider Version

Terraform v1.3.6
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v4.52.0
+ provider registry.terraform.io/mongodb/mongodbatlas v1.8.0

Terraform Configuration File

resource "mongodbatlas_third_party_integration" "atlas_datadog" {
  project_id = mongodbatlas_project.atlas_project.id
  type = "DATADOG"
  api_key = var.datadog_api_key
  region = var.datadog_region
}

Steps to Reproduce

terraform apply

Expected Behavior

No warnings or deprecations are raised.

Actual Behavior

<...>
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.
╷
│ Warning: Argument is deprecated
│
│   with mongodbatlas_third_party_integration.atlas_datadog,
│   on <redacted>/common/main.tf line 108, in resource "mongodbatlas_third_party_integration" "atlas_datadog":
│  108:   type = "DATADOG"
│
│ This field type has values (NEW_RELIC, FLOWDOCK) that are deprecated and
│ will be removed in 1.9.0 release
│
│ (and one more similar warning elsewhere)
╵
Releasing state lock. This may take a few moments...

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Additional Context

This was introduced in 1.8.0: https://github.com/mongodb/terraform-provider-mongodbatlas/pull/1018/files/24eef4010c2f791f3fd544a80f8bbebfbfa794c4#diff-8e65feb4edd9f3cade8198fe8f62bcbb4dfb59ce8ec2ea22f8c31ba7f7ad04b8

As I said in the comment there, the field Deprecated should not be used in that case, as it deprecates the entire type attribute of this resource. Instead, you need to use a custom function for ValidateDiagFunc field. That custom function should return a warning when the value of type attribute is set to "NEW_RELIC" or "FLOWDOCK".

References

@legal90 legal90 mentioned this issue Jan 27, 2023
10 tasks
@Zuhairahmed
Copy link
Contributor

Zuhairahmed commented Jan 27, 2023

thanks @legal90 we are investigating and will revert back shortly. appreciate all the rapid feedback here (as always) 👍🏽

@martinstibbe martinstibbe added the not_stale Not stale issue or PR label Jan 27, 2023
@martinstibbe
Copy link
Contributor

martinstibbe commented Jan 27, 2023

@legal90 Will address issue in v1.8.1 engineering ticket INTMDB-556 in place to track

@Zuhairahmed
Copy link
Contributor

@legal90 v1.8.1 has been published to the Terraform Public Registry! take a spin and let us know if you need anything else.

@Zuhairahmed Zuhairahmed added stale and removed not_stale Not stale issue or PR labels Mar 9, 2023
@legal90
Copy link
Author

legal90 commented Mar 9, 2023

Thank you, @Zuhairahmed ! I confirm that the deprecation message is gone now. The provider v1.8.1 works as expected 👍

@legal90 legal90 closed this as completed Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants