Fix update of PostgreSQL Flex instance flavor (#494)

* Fix update of PostgreSQL Flex instance flavor

* Fix linter
This commit is contained in:
João Palet 2024-08-05 13:52:36 +01:00 committed by GitHub
parent c3227178ad
commit 4b00bf1021
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 88 additions and 3 deletions

View file

@ -131,7 +131,7 @@ func (r *instanceResource) Configure(ctx context.Context, req resource.Configure
}
// Schema defines the schema for the resource.
func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
func (r *instanceResource) Schema(_ context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
descriptions := map[string]string{
"main": "Postgres Flex instance resource schema. Must have a `region` specified in the provider configuration.",
"id": "Terraform's internal resource ID. It is structured as \"`project_id`,`instance_id`\".",
@ -199,13 +199,13 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r
"id": schema.StringAttribute{
Computed: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
UseStateForUnknownIfFlavorUnchanged(req),
},
},
"description": schema.StringAttribute{
Computed: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
UseStateForUnknownIfFlavorUnchanged(req),
},
},
"cpu": schema.Int64Attribute{