We can get the username attribute as an output variable from the ‘mssql_user’ resource (i.e. mssql_user.databaseuser.username) and supply it to the vulnerability assessment, but not the SID.
│ Error: Unsupported attribute
│
│ on ProjectLogin.tf line 142, in resource "azurerm_mssql_database_vulnerability_assessment_rule_baseline" "vulnerability assessment-baseline-va2130":
│ 142: mssql_user.databaseuser.username,mssql_user.databaseuser.sid
│
│ This object has no argument, nested block, or exported attribute named "sid". Did you mean "id"?
In our Terraform codebase, we’re trying to create a vulnerability assessment baseline resource (see Terraform doc):
We can get the username attribute as an output variable from the ‘mssql_user’ resource (i.e. mssql_user.databaseuser.username) and supply it to the vulnerability assessment, but not the SID.