mongodb / terraform-provider-mongodbatlas

Terraform MongoDB Atlas Provider: Deploy, update, and manage MongoDB Atlas infrastructure as code through HashiCorp Terraform
https://registry.terraform.io/providers/mongodb/mongodbatlas
Mozilla Public License 2.0
242 stars 168 forks source link

[Bug]: Missing document for "scheme" on resource "mongodbatlas_third_party_integration" #2687

Closed meisfrancis closed 1 day ago

meisfrancis commented 1 day ago

Is there an existing issue for this?

Provider Version

v1.21.1

Terraform Version

v1.7.5

Terraform Edition

Terraform Open Source (OSS)

Current Behavior

Cannot create 3rd integration for PROMETHEUS when following the example and document from https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/third_party_integration.

There is no document for scheme argument.

Terraform configuration to reproduce the issue

resource "mongodbatlas_third_party_integration" "prometheus" {
    enabled           = true
    project_id        = "5d269338cf09a27252894312"
    service_discovery = "http"
    type              = "PROMETHEUS"
    user_name         = "prom_user"
    password          = "M0IML5Ym"
}

Steps To Reproduce

  1. Run terraform apply
  2. Input "yes"
  3. Instead of creating successfully, it shows error Error: error attribute for third party integration scheme. please set it

Logs

module.prometheus_integration.mongodbatlas_third_party_integration.prometheus: Creating...
2024-10-15T15:29:00.111+0700 [INFO]  Starting apply for module.prometheus_integration.mongodbatlas_third_party_integration.prometheus
2024-10-15T15:29:00.111+0700 [DEBUG] module.prometheus_integration.mongodbatlas_third_party_integration.prometheus: applying the planned Create change
2024-10-15T15:29:00.112+0700 [ERROR] provider.terraform-provider-mongodbatlas_v1.11.1: Response contains error diagnostic: tf_proto_version=5.3 tf_req_id=7314b639-47c0-ce1e-a451-9f22ac66ee14 tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-go@v0.18.0/tfprotov5/internal/diag/diagnostics.go:58 @module=sdk.proto diagnostic_severity=ERROR tf_provider_addr=provider tf_resource_type=mongodbatlas_third_party_integration diagnostic_detail= diagnostic_summary="error attribute for third party integration scheme. please set it" timestamp=2024-10-15T15:29:00.112+0700
2024-10-15T15:29:00.113+0700 [DEBUG] State storage *remote.State declined to persist a state snapshot
2024-10-15T15:29:00.113+0700 [ERROR] vertex "module.prometheus_integration.mongodbatlas_third_party_integration.prometheus" error: error attribute for third party integration scheme. please set it
2024-10-15T15:29:00.113+0700 [DEBUG] states/remote: state read serial is: 79; serial is: 79
2024-10-15T15:29:00.113+0700 [DEBUG] states/remote: state read lineage is: a425eb5b-ce12-e9e9-cab2-f472f9f34a37; lineage is: a425eb5b-ce12-e9e9-cab2-f472f9f34a37

Code of Conduct

github-actions[bot] commented 1 day ago

Thanks for opening this issue! Please make sure you've followed our guidelines when opening the issue. In short, to help us reproduce the issue we need:

The ticket CLOUDP-278622 was created for internal tracking.

meisfrancis commented 1 day ago

Can create with the following config

resource "mongodbatlas_third_party_integration" "prometheus" {
    enabled           = true
    project_id        = "5d269338cf09a27252894312"
    service_discovery = "HTTP"
    scheme            = "https"
    type              = "PROMETHEUS"
    user_name         = "prom_user"
    password          = "M0IML5Ym"
}

Please help adding document for scheme. Thanks

meisfrancis commented 1 day ago

Closed because scheme is deprecated. I noticed that the actual version had been installed was 1.11.1 instead of 1.21.1