fix: #63 sort user roles to prevent state change #65
2 changed files with 10 additions and 16 deletions
|
|
@ -252,7 +252,7 @@ func (r *userResource) Create(
|
||||||
model.UserId = types.Int64Value(id)
|
model.UserId = types.Int64Value(id)
|
||||||
model.Password = types.StringValue(userResp.GetPassword())
|
model.Password = types.StringValue(userResp.GetPassword())
|
||||||
model.Status = types.StringValue(userResp.GetStatus())
|
model.Status = types.StringValue(userResp.GetStatus())
|
||||||
model.ConnectionString = types.StringValue(userResp.GetConnectionString())
|
//model.ConnectionString = types.StringValue(userResp.GetConnectionString())
|
||||||
|
|
||||||
waitResp, err := postgresflexalphaWait.GetUserByIdWaitHandler(
|
waitResp, err := postgresflexalphaWait.GetUserByIdWaitHandler(
|
||||||
ctx,
|
ctx,
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,6 @@ import (
|
||||||
func UserResourceSchema(ctx context.Context) schema.Schema {
|
func UserResourceSchema(ctx context.Context) schema.Schema {
|
||||||
return schema.Schema{
|
return schema.Schema{
|
||||||
Attributes: map[string]schema.Attribute{
|
Attributes: map[string]schema.Attribute{
|
||||||
"connection_string": schema.StringAttribute{
|
|
||||||
Computed: true,
|
|
||||||
Description: "The connection string for the user to the instance.",
|
|
||||||
MarkdownDescription: "The connection string for the user to the instance.",
|
|
||||||
},
|
|
||||||
"id": schema.Int64Attribute{
|
"id": schema.Int64Attribute{
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Description: "The ID of the user.",
|
Description: "The ID of the user.",
|
||||||
|
|
@ -80,14 +75,13 @@ func UserResourceSchema(ctx context.Context) schema.Schema {
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserModel struct {
|
type UserModel struct {
|
||||||
ConnectionString types.String `tfsdk:"connection_string"`
|
Id types.Int64 `tfsdk:"id"`
|
||||||
Id types.Int64 `tfsdk:"id"`
|
InstanceId types.String `tfsdk:"instance_id"`
|
||||||
InstanceId types.String `tfsdk:"instance_id"`
|
Name types.String `tfsdk:"name"`
|
||||||
Name types.String `tfsdk:"name"`
|
Password types.String `tfsdk:"password"`
|
||||||
Password types.String `tfsdk:"password"`
|
ProjectId types.String `tfsdk:"project_id"`
|
||||||
ProjectId types.String `tfsdk:"project_id"`
|
Region types.String `tfsdk:"region"`
|
||||||
Region types.String `tfsdk:"region"`
|
Roles types.List `tfsdk:"roles"`
|
||||||
Roles types.List `tfsdk:"roles"`
|
Status types.String `tfsdk:"status"`
|
||||||
Status types.String `tfsdk:"status"`
|
UserId types.Int64 `tfsdk:"user_id"`
|
||||||
UserId types.Int64 `tfsdk:"user_id"`
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue