Skip to content

Commit 96bd2a4

Browse files
committed
Do not require replace for everything
1 parent 846c8eb commit 96bd2a4

File tree

4 files changed

+4
-36
lines changed

4 files changed

+4
-36
lines changed

internal/provider/resource_tfe_aws_oidc_configuration.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ func (r *resourceTFEAWSOIDCConfiguration) Schema(_ context.Context, _ resource.S
7070
"role_arn": schema.StringAttribute{
7171
Description: "The AWS ARN of your role.",
7272
Required: true,
73-
PlanModifiers: []planmodifier.String{
74-
stringplanmodifier.RequiresReplace(),
75-
},
7673
},
7774
"organization": schema.StringAttribute{
7875
Description: "Name of the organization to which the TFE AWS OIDC configuration belongs.",

internal/provider/resource_tfe_azure_oidc_configuration.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,14 @@ func (r *resourceTFEAzureOIDCConfiguration) Schema(_ context.Context, _ resource
7272
"client_id": schema.StringAttribute{
7373
Description: "The Client (or Application) ID of your Entra ID application.",
7474
Required: true,
75-
PlanModifiers: []planmodifier.String{
76-
stringplanmodifier.RequiresReplace(),
77-
},
7875
},
7976
"subscription_id": schema.StringAttribute{
8077
Description: "The ID of your Azure subscription.",
8178
Required: true,
82-
PlanModifiers: []planmodifier.String{
83-
stringplanmodifier.RequiresReplace(),
84-
},
8579
},
8680
"tenant_id": schema.StringAttribute{
8781
Description: "The Tenant (or Directory) ID of your Entra ID application.",
8882
Required: true,
89-
PlanModifiers: []planmodifier.String{
90-
stringplanmodifier.RequiresReplace(),
91-
},
9283
},
9384
"organization": schema.StringAttribute{
9485
Description: "Name of the organization to which the TFE Azure OIDC configuration belongs.",

internal/provider/resource_tfe_gcp_oidc_configuration.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,14 @@ func (r *resourceTFEGCPOIDCConfiguration) Schema(_ context.Context, _ resource.S
7272
"service_account_email": schema.StringAttribute{
7373
Description: "The email of your GCP service account, with permissions to encrypt and decrypt using a Cloud KMS key.",
7474
Required: true,
75-
PlanModifiers: []planmodifier.String{
76-
stringplanmodifier.RequiresReplace(),
77-
},
7875
},
7976
"project_number": schema.StringAttribute{
8077
Description: "The GCP Project containing the workload provider and service account.",
8178
Required: true,
82-
PlanModifiers: []planmodifier.String{
83-
stringplanmodifier.RequiresReplace(),
84-
},
8579
},
8680
"workload_provider_name": schema.StringAttribute{
8781
Description: "The fully qualified workload provider path.",
8882
Required: true,
89-
PlanModifiers: []planmodifier.String{
90-
stringplanmodifier.RequiresReplace(),
91-
},
9283
},
9384
"organization": schema.StringAttribute{
9485
Description: "Name of the organization to which the TFE GCP OIDC configuration belongs.",

internal/provider/resource_tfe_vault_oidc_configuration.go

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"errors"
99
"fmt"
1010
"github.com/hashicorp/terraform-plugin-framework/path"
11+
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault"
1112

1213
tfe "github.com/hashicorp/go-tfe"
1314
"github.com/hashicorp/terraform-plugin-framework/resource"
@@ -74,37 +75,25 @@ func (r *resourceTFEVaultOIDCConfiguration) Schema(_ context.Context, _ resource
7475
"address": schema.StringAttribute{
7576
Description: "The full address of your Vault instance.",
7677
Required: true,
77-
PlanModifiers: []planmodifier.String{
78-
stringplanmodifier.RequiresReplace(),
79-
},
8078
},
8179
"role_name": schema.StringAttribute{
8280
Description: "The name of a role in your Vault JWT auth path, with permission to encrypt and decrypt with a Transit secrets engine key.",
8381
Required: true,
84-
PlanModifiers: []planmodifier.String{
85-
stringplanmodifier.RequiresReplace(),
86-
},
8782
},
8883
"namespace": schema.StringAttribute{
8984
Description: "The namespace your JWT auth path is mounted in.",
9085
Required: true,
91-
PlanModifiers: []planmodifier.String{
92-
stringplanmodifier.RequiresReplace(),
93-
},
9486
},
9587
"auth_path": schema.StringAttribute{
9688
Description: `The mounting path of JWT auth path of JWT auth. Defaults to "jwt".`,
9789
Required: true,
98-
PlanModifiers: []planmodifier.String{
99-
stringplanmodifier.RequiresReplace(),
100-
},
90+
Default: stringdefault.StaticString("jwt"),
10191
},
10292
"encoded_cacert": schema.StringAttribute{
10393
Description: "A base64 encoded certificate which can be used to authenticate your Vault certificate. Only needed for self-hosted Vault Enterprise instances with a self-signed certificate.",
10494
Optional: true,
105-
PlanModifiers: []planmodifier.String{
106-
stringplanmodifier.RequiresReplace(),
107-
},
95+
Computed: true,
96+
Default: stringdefault.StaticString(""),
10897
},
10998
"organization": schema.StringAttribute{
11099
Description: "Name of the organization to which the TFE Vault OIDC configuration belongs.",

0 commit comments

Comments
 (0)