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
240 stars 168 forks source link

Issue with import mongodbatlas_cloud_provider_snapshot_restore_job #109

Closed ghost closed 4 years ago

ghost commented 4 years ago

This issue was originally opened by @sushilvarma2 as hashicorp/terraform#23903. It was migrated here as a result of the provider split. The original body of the issue is below.


Hello All,

We have an issue where mongo db cluster was created through Terraform. And Snapshot was created manually. I am trying to import snapshot details using terraform import. I have used the command as mentioned here:

Since my clustername has hyphen in it so terraform is not able to understand this request and throwing an error. clusterName: projectname-environment-mongo-global-cluster Can someone suggest please how I can overcome this issue ?

Command: terraform import mongodbatlas_cloud_provider_snapshot_restore_job.test 5cf5a45a9ccf6400e60981b6-MyCluster-5d1b654ecf09a24b888f4c79

Reference: Project_id, cluster_name and snapshot_id (Unique identifier of the snapshot), in the format PROJECTID-CLUSTERNAME-JOBID https://www.terraform.io/docs/providers/mongodbatlas/r/cloud_provider_snapshot_restore_job.html

themantissa commented 4 years ago

@marinsalinas or @PacoDw any way we can work around importing a cluster name that has hyphens when trying to import?