crossplane-contrib / provider-mongodbatlas

MongoDB Atlas Provider based on Terrajet
Apache License 2.0
14 stars 11 forks source link

Make Cluster & AdvancedCluster MRs XRM-Compliant #1

Open ulucinar opened 2 years ago

ulucinar commented 2 years ago

What problem are you facing?

Currently, Project, Cluster and AdvancedCluster managed resource APIs have a spec.forProvider.name field, which duplicates XRM's external-name. It looks like we need support in Terrajet for persistent IDs that contain parts both from spec.forProvider and Cloud-provider generated ids.

How could MongoDBAtlas Provider help solve your problem?

An issue in Crossplane exists for follow-up discussions.

turkenh commented 2 years ago

IIUC, this sounds similar to google_sql_ssl_cert resource which was originally reported in this slack thread.

Here is how we configured that resource.

Piotr1215 commented 2 years ago

Similar problem, I'm trying to pull an existing cluster under Crossplane's management, but it errors out with

apply failed: error creating MongoDB Cluster: POST https://cloud.mongodb.com/api/atlas/v1.0/groups/6239fef72fb1936f09a447e7/clusters: 400 (request "DUPLICATE_CLUSTER_NAME") A cluster or serverless instance named Cluster0 is │ │ already present in group 6239fef72fb1936f09a447e7.: : File name: main.tf.json

I have added external name annotation which consists of various pieces of base64 encoded data following the same pattern as with a cluster created using the provider.