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

[Bug]: No way to fetch online archive's connection string #2205

Closed
2 tasks done
marqueurs404 opened this issue Apr 24, 2024 · 2 comments
Closed
2 tasks done

[Bug]: No way to fetch online archive's connection string #2205

marqueurs404 opened this issue Apr 24, 2024 · 2 comments

Comments

@marqueurs404
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Provider Version

1.15.3

Terraform Version

1.7.4

Terraform Edition

Terraform Open Source (OSS)

Current Behavior

I have spun up an online archive using the mongodbatlas_online_archive resource but can't seem to find a way to retrieve the archive-only connection string nor the cluster+archive connection string within terraform.

Terraform configuration to reproduce the issue

resource "mongodbatlas_advanced_cluster" "app" {
  project_id             = "development"
  name                   = "app"
  backup_enabled         = true
  cluster_type           = "REPLICASET"
  version_release_system = "CONTINUOUS"

  replication_specs {
    region_configs {
      provider_name = "AWS"
      region_name = "US_EAST_1"
      priority    = 7

      auto_scaling {
        compute_enabled            = true
        compute_scale_down_enabled = true
        compute_min_instance_size  = "M30"
        compute_max_instance_size  = "M50"
        disk_gb_enabled            = true
      }

      electable_specs {
        instance_size = "M30"
        node_count    = 3
      }
    }
  }
}

resource "mongodbatlas_online_archive" "events" {
  depends_on   = [mongodbatlas_advanced_cluster.app]
  project_id   = "development"
  cluster_name = "app"
  coll_name    = "events"
  db_name      = "main"

  data_process_region {
    cloud_provider = "AWS"
    region         = "US_EAST_1"
  }

  partition_fields {
    field_name = "createdAt"
    order      = 0
  }

  partition_fields {
    field_name = "_id"
    order      = 1
  }

  partition_fields {
    field_name = "obj_pk"
    order      = 2
  }

  criteria {
    type              = "DATE"
    date_field        = "createdAt"
    expire_after_days = 30
  }
}

Steps To Reproduce

  1. terragrunt apply
  2. terragrunt state show mongodbatlas_online_archive.events (can't find any connection strings)
  3. terragrunt state show mongodbatlas_advanced_cluster.app (not found in cluster's connection strings either)
  4. I can only get the string from atlas UI

Logs

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Copy link
Contributor

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:

  • Terraform configuration file used to reproduce the issue
  • Terraform log files from the run where the issue occurred
  • Terraform Atlas provider version used to reproduce the issue
  • Terraform version used to reproduce the issue
  • Confirmation if Terraform OSS, Terraform Cloud, or Terraform Enterprise deployment

The ticket CLOUDP-245344 was created for internal tracking.

@lantoli
Copy link
Member

lantoli commented Apr 26, 2024

thanks @marqueurs404 for opening the issue.

you're right that at the moment it's not exposed, it's not in the public Atlas API either.

I recommend you to create a feature request here: https://feedback.mongodb.com/forums/924145-atlas?category_id=389002

thanks and sorry the inconvenience

@lantoli lantoli closed this as completed Apr 26, 2024
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

2 participants