Azure / terraform-azurerm-avm-res-documentdb-databaseaccount

https://registry.terraform.io/modules/Azure/avm-res-documentdb-databaseaccount/azurerm/latest
MIT License
0 stars 0 forks source link

[AVM Module Issue]: Support the MongoDB API and missing outputs `AZURE_COSMOS_CONNECTION_STRING`,`AZURE_COSMOS_DATABASE_NAME` #32

Open Menghua1 opened 2 months ago

Menghua1 commented 2 months ago

Check for previous/existing GitHub issues

Issue Type?

Feature Request

(Optional) Module Version

No response

(Optional) Correlation Id

No response

Description

Please support the MongoDB API and add the outputs AZURE_COSMOS_CONNECTION_STRING,AZURE_COSMOS_DATABASE_NAME. For example (azd):

CC: @jongio and @bryansan-msft

Menghua1 commented 2 weeks ago

@bryansan-msft The two missing outputs AZURE_COSMOS_CONNECTION_STRING and AZURE_COSMOS_DATABASE_NAME have not been fixed yet. Please review and fix.

bryansan-msft commented 2 weeks ago

@Menghua1 you have those two outputs values already in the existing outputs. There is no reason to duplicate them.

Menghua1 commented 2 weeks ago

@Menghua1 you have those two outputs values already in the existing outputs. There is no reason to duplicate them.

@bryansan-msft do you mean the existing output resource? According to the Terraform AVM guide, specialized exposed properties should be output instead of the entire resource object.

bryansan-msft commented 2 weeks ago

That is weird because when i released the first module version I had that but I was forced by the AVM reviewer to change it to expose the whole objects

Menghua1 commented 2 weeks ago

@jongio Any ideas on the above comments?

bryansan-msft commented 2 weeks ago

I can change it when i have a free timeslot, in fact i would rather have control of the outputs but I still comment it because I was forced to do it in this current way

Menghua1 commented 1 week ago

@bryansan-msft Additionally, the existing output resource contains the output AZURE_COSMOS_CONNECTION_STRING, and the AZURE_COSMOS_DATABASE_NAME(azurerm_cosmosdb_mongo_database.mongodb.name) has not been output yet.

jongio commented 1 week ago

@bryansan-msft - It is my understanding that the issue hasn't been resolved because of the additional outputs needed. There could be a misunderstanding on how it was resolved on your end. Would you be able to point us in the right direction to get those outputs?

bryansan-msft commented 1 week ago

@jongio as @Menghua1 mentioned the module is not following the AVM rules regarding outputs and not only that the database name output is missing for mongodb as I forgot to output it

The connection string can be currently retrieved using the "resource" output similar to the sql one if you are already using that API in this module

As soon as I have a free time slot I will have a look into the outputs to make them follow AVM rules and output the missing mongodb database information