You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: 'long_term_retention_backup_id' is required for create_mode RestoreLongTermRetentionBackup
│
│ with azurerm_mssql_database.example_ltr,
│ on sqldb_restore.tf line 22, in resource "azurerm_mssql_database""example_ltr":
│ 22: resource "azurerm_mssql_database""example_ltr" {
Expected Behaviour
A new database should be created with data restored from the specified LTR backup.
Actual Behaviour
Error output asking for an attribute named 'long_term_retention_backup_id'.
Resource docs and schema contain a new attribute named 'restore_long_term_retention_backup_id', but it seems that resource implementation at "internal/services/mssql/mssql_database_resource.go" looks for a different name during validations:
case databases.CreateModeRestoreLongTermRetentionBackup:
if _, dbok := d.GetOk("long_term_retention_backup_id"); !dbok {
return fmt.Errorf("'long_term_retention_backup_id' is required for create_mode %s", createMode)
}
Thanks for taking the time to submit this issue. It looks like this has been resolved as of #25180. As such, I am going to mark this issue as closed. If that is not the case, please provide additional information including the version in which you are still experiencing this issue, thanks!
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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is there an existing issue for this?
Community Note
Terraform Version
1.6.6
AzureRM Provider Version
3.94.0
Affected Resource(s)/Data Source(s)
azurerm_mssql_database
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
A new database should be created with data restored from the specified LTR backup.
Actual Behaviour
Error output asking for an attribute named 'long_term_retention_backup_id'.
Resource docs and schema contain a new attribute named 'restore_long_term_retention_backup_id', but it seems that resource implementation at "internal/services/mssql/mssql_database_resource.go" looks for a different name during validations:
Steps to Reproduce
terraform apply
Important Factoids
No response
References
#24904
The text was updated successfully, but these errors were encountered: