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

Labels is not creating tags in the MongoAtlas UI #1319

Closed kennethgds closed 1 year ago

kennethgds commented 1 year ago

Terraform CLI and Terraform MongoDB Atlas Provider Version

Terraform v1.3.7
MongoDB Atlas provider 1.7.0

Terraform Configuration File

resource "mongodbatlas_cluster" "cluster" {
  project_id                     = data.terraform_remote_state.mongoatlas_project.outputs.mongoatlas_project_id
  provider_name                  = "AWS"
  name                           = var.env["environment"]
  provider_instance_size_name    = var.mongoatlas["provider_instance_size_name"]
  auto_scaling_disk_gb_enabled   = true
  cluster_type                   = "REPLICASET"
  disk_size_gb                   = var.mongoatlas["disk_size_gb"]
  mongo_db_major_version         = var.mongoatlas["mongo_db_major_version"]
  cloud_backup                   = true
  provider_disk_iops             = var.mongoatlas["provider_disk_iops"]
  provider_region_name           = "US_EAST_1"
  provider_volume_type           = var.mongoatlas["provider_volume_type"]
  termination_protection_enabled = true

  labels {
    key   = "Name"
    value = var.env["environment"]
  }
  labels {
    key   = "environment"
    value = var.env["environment"]
  }

  lifecycle {
    ignore_changes = [
      mongo_db_major_version,
      provider_instance_size_name,
      provider_disk_iops,
      disk_size_gb,
    ]
    prevent_destroy = true
  }
}

Steps to Reproduce

  1. Run resource with terraform apply

Expected Behavior

Labels should have created Tags in the UI

Actual Behavior

No tags were created in the Mongo Atlas UI. I don't know if this is a new feature where it's different from Labels (as highlighted in the image) : https://www.mongodb.com/docs/atlas/tags/

Screenshot 2023-07-13 at 6 40 32 PM

github-actions[bot] commented 1 year ago

Thanks for opening this issue. The ticket INTMDB-936 was created for internal tracking.

Zuhairahmed commented 1 year ago

Hi @kennethgds, Atlas Tagging is on our near term roadmap and should be released in the MongoDB Terraform Provider over next few months. Feel free to reach out if you need anything else here in the interim.

JoeNyongesa commented 1 year ago

Hi @Zuhairahmed, any updates on this request? Do you have a tentative release date?

Zuhairahmed commented 1 year ago

Hi @JoeNyongesa Atlas Cluster tagging support on Terraform has been released! Feel free to upgrade to latest version today and try it out.

JoeNyongesa commented 1 year ago

Thank you @Zuhairahmed. Is there any documentation on using it?