Skip to content

Commit 8b0ccdd

Browse files
committed
exclude id from refresh
1 parent edc6ee2 commit 8b0ccdd

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

internal/provider/resource_tfe_opa_version.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
2121
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
2222
"github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier"
23+
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
2324
"github.com/hashicorp/terraform-plugin-framework/types"
2425
"github.com/hashicorp/terraform-plugin-log/tflog"
2526
)
@@ -59,7 +60,8 @@ func (r *OPAVersionResource) Schema(ctx context.Context, req resource.SchemaRequ
5960
resp.Schema = schema.Schema{
6061
Attributes: map[string]schema.Attribute{
6162
"id": schema.StringAttribute{
62-
Computed: true,
63+
Computed: true,
64+
PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()},
6365
},
6466
"version": schema.StringAttribute{
6567
Required: true,

internal/provider/resource_tfe_sentinel_version.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
1616
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
1717
"github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier"
18+
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
1819
"github.com/hashicorp/terraform-plugin-framework/types"
1920
"github.com/hashicorp/terraform-plugin-log/tflog"
2021
)
@@ -54,7 +55,8 @@ func (r *sentinelVersionResource) Schema(ctx context.Context, req resource.Schem
5455
resp.Schema = schema.Schema{
5556
Attributes: map[string]schema.Attribute{
5657
"id": schema.StringAttribute{
57-
Computed: true,
58+
Computed: true,
59+
PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()},
5860
},
5961
"version": schema.StringAttribute{
6062
Required: true,

internal/provider/resource_tfe_terraform_version.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
2222
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
2323
"github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier"
24+
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
2425
"github.com/hashicorp/terraform-plugin-framework/types"
2526
"github.com/hashicorp/terraform-plugin-log/tflog"
2627
)
@@ -60,7 +61,8 @@ func (r *terraformVersionResource) Schema(ctx context.Context, req resource.Sche
6061
resp.Schema = schema.Schema{
6162
Attributes: map[string]schema.Attribute{
6263
"id": schema.StringAttribute{
63-
Computed: true,
64+
Computed: true,
65+
PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()},
6466
},
6567
"version": schema.StringAttribute{
6668
Required: true,

0 commit comments

Comments
 (0)