-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Support for id for data source mssql_database #23807
Comments
Hi @tete17, thank you for opening this issue. As luck would have it, I am already currently in this code upgrading it to the latest |
Looking into this issue it seems very odd, since the Outputs:
datasource_mssql_database_id = "/subscriptions/{subscription}/resourceGroups/repro-resources/providers/Microsoft.Sql/servers/repro-sqlserver/databases/repro-db" Configuration code for the above output: output "datasource_mssql_database_id" {
value = data.azurerm_mssql_database.repro.id
} |
@WodansSon this looks to be a documentation issue, every Data Source and Resource has to support the |
@tombuildsstuff, totally agree, but maybe this is my bad, I had assumed they had already attempted to get the |
Hi @WodansSon I did tried using the id field in my code and faces a terraform issue saying the parameter was not available. I think it is more than just documentation given it the schema doesn't reference it but I may be missreading something. Thanks for the quick turnaround and response. Now that you are revamping this resources can I abuse your trust and ask you to please look at the I have tested and the raw ID of any database is not valid. Instead that field expects a parameter called |
Hi @tete17, I can see why it would appear that way, however the
For the resource you are referencing in your reply you can see that the As for your |
Hi @WodansSon indeed I see my mistake now. The id is present I must have made a mistake while writing the code and it complained about something else. Will keep an eye on your MR to see when it gets merged to see if it indeed fixed my recoverabledatabases issue. If I am being honest I didn't fully understood the explanation regarding the databases type and the reflection but I trust you. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Is there an existing issue for this?
Community Note
Description
Data Source: azurerm_mssql_database doesn't support the very basic id field
This is incredibly valuable to be able to reference databases in a different region to be able to recover from them in a disaster recovery scenario.
New or Affected Resource(s)/Data Source(s)
azurerm_mssql_database
Potential Terraform Configuration
References
The example the documentation uses doesn't even work since it makes use of the inexistant id field https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/mssql_database#example-usage
The text was updated successfully, but these errors were encountered: