Skip to content

docs: endpoint_name in mongodbatlas_privatelink_endpoint_service should link to the name of the forwarding_rule, not address #753

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

Closed
TJM opened this issue Jun 13, 2022 · 4 comments

Comments

@TJM
Copy link

TJM commented Jun 13, 2022

Terraform CLI and Terraform MongoDB Atlas Provider Version

# Terraform v1.1.5 (not relevant)

Terraform Configuration File

# N/A

Steps to Reproduce

If you name the IP address entries differently than the forwarding rule entries, it fails,

Expected Behavior

The example should use the correct link for endpoint_name

resource "mongodbatlas_privatelink_endpoint_service" "test" {
  project_id          = mongodbatlas_privatelink_endpoint.test.project_id
  private_link_id     = mongodbatlas_privatelink_endpoint.test.private_link_id
  provider_name       = "GCP"
  endpoint_service_id = google_compute_network.default.name
  gcp_project_id      = var.gcp_project

  dynamic "endpoints" {
    for_each = mongodbatlas_privatelink_endpoint.test.service_attachment_names

    content {
      ip_address    = google_compute_address.default[endpoints.key].address
      endpoint_name = google_compute_forwarding_rule.default[endpoints.key].name
    }
  }

  depends_on = [google_compute_forwarding_rule.default]
}

Actual Behavior

It uses the name of the IP address instead of the forwarding rule.

  dynamic "endpoints" {
    for_each = mongodbatlas_privatelink_endpoint.test.service_attachment_names

    content {
      ip_address    = google_compute_address.default[endpoints.key].address
      endpoint_name = google_compute_address.default[endpoints.key].name
    }
  }

Debug Output

N/A - doc bug

Crash Output

N/A

Additional Context

The example just needs fixed.

References

@themantissa
Copy link
Collaborator

Thank you @TJM - we'll check this and get it corrected.

@themantissa
Copy link
Collaborator

Internal ticket INTMDB-331

@martinstibbe
Copy link
Contributor

@TJM This is corrected in next release 1.4.4

@themantissa
Copy link
Collaborator

@TJM the release is out (cc @martinstibbe )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants