feat: refactor Terraform ID handling and add user mapping functions
This commit is contained in:
parent
91913c3446
commit
546eafcb2f
4 changed files with 816 additions and 55 deletions
|
|
@ -27,7 +27,7 @@ type DataSourceModel struct {
|
|||
InstanceId types.String `tfsdk:"instance_id"`
|
||||
Region types.String `tfsdk:"region"`
|
||||
DatabaseID types.Int64 `tfsdk:"database_id"`
|
||||
TerraformID types.String `tfsdk:"tf_id"`
|
||||
TerraformID types.String `tfsdk:"id"`
|
||||
}
|
||||
|
||||
// Ensure the implementation satisfies the expected interfaces.
|
||||
|
|
@ -99,7 +99,7 @@ func (r *databaseDataSource) Schema(ctx context.Context, _ datasource.SchemaRequ
|
|||
Optional: true,
|
||||
Computed: true,
|
||||
}
|
||||
s.Attributes["tf_id"] = schema.StringAttribute{
|
||||
s.Attributes["id"] = schema.StringAttribute{
|
||||
Description: "Terraform's internal resource ID. It is structured as \\\"`project_id`,`region`,`instance_id`," +
|
||||
"`database_id`\\\".\",",
|
||||
Optional: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue