mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-19 11:00:37 +08:00
Force resource replacement on scope change (#66960)
This commit is contained in:
@@ -54,6 +54,8 @@ plan_modifiers:
|
||||
# Force to recreate resource if its name changes
|
||||
Metadata.name:
|
||||
- "github.com/hashicorp/terraform-plugin-framework/tfsdk.RequiresReplace()"
|
||||
ScopedRole.scope:
|
||||
- "github.com/hashicorp/terraform-plugin-framework/tfsdk.RequiresReplace()"
|
||||
|
||||
# This must be defined for the generator to be happy, but in reality all time
|
||||
# fields are overridden (because the protobuf timestamps contain locks and the
|
||||
|
||||
@@ -55,6 +55,8 @@ plan_modifiers:
|
||||
# Force to recreate resource if its name changes
|
||||
Metadata.name:
|
||||
- "github.com/hashicorp/terraform-plugin-framework/tfsdk.RequiresReplace()"
|
||||
ScopedRoleAssignment.scope:
|
||||
- "github.com/hashicorp/terraform-plugin-framework/tfsdk.RequiresReplace()"
|
||||
|
||||
# This must be defined for the generator to be happy, but in reality all time
|
||||
# fields are overridden (because the protobuf timestamps contain locks and the
|
||||
|
||||
@@ -59,6 +59,8 @@ plan_modifiers:
|
||||
# Force to recreate resource if its name changes
|
||||
Metadata.name:
|
||||
- "github.com/hashicorp/terraform-plugin-framework/tfsdk.RequiresReplace()"
|
||||
ScopedToken.scope:
|
||||
- "github.com/hashicorp/terraform-plugin-framework/tfsdk.RequiresReplace()"
|
||||
|
||||
# This must be defined for the generator to be happy, but in reality all time
|
||||
# fields are overridden (because the protobuf timestamps contain locks and the
|
||||
|
||||
@@ -101,9 +101,10 @@ func GenSchemaScopedRoleAssignment(ctx context.Context) (github_com_hashicorp_te
|
||||
Required: true,
|
||||
},
|
||||
"scope": {
|
||||
Description: "Scope is the scope of the role assignment resource.",
|
||||
Required: true,
|
||||
Type: github_com_hashicorp_terraform_plugin_framework_types.StringType,
|
||||
Description: "Scope is the scope of the role assignment resource.",
|
||||
PlanModifiers: []github_com_hashicorp_terraform_plugin_framework_tfsdk.AttributePlanModifier{github_com_hashicorp_terraform_plugin_framework_tfsdk.RequiresReplace()},
|
||||
Required: true,
|
||||
Type: github_com_hashicorp_terraform_plugin_framework_types.StringType,
|
||||
},
|
||||
"spec": {
|
||||
Attributes: github_com_hashicorp_terraform_plugin_framework_tfsdk.SingleNestedAttributes(map[string]github_com_hashicorp_terraform_plugin_framework_tfsdk.Attribute{
|
||||
|
||||
@@ -103,9 +103,10 @@ func GenSchemaScopedRole(ctx context.Context) (github_com_hashicorp_terraform_pl
|
||||
Required: true,
|
||||
},
|
||||
"scope": {
|
||||
Description: "Scope is the scope of the role resource.",
|
||||
Required: true,
|
||||
Type: github_com_hashicorp_terraform_plugin_framework_types.StringType,
|
||||
Description: "Scope is the scope of the role resource.",
|
||||
PlanModifiers: []github_com_hashicorp_terraform_plugin_framework_tfsdk.AttributePlanModifier{github_com_hashicorp_terraform_plugin_framework_tfsdk.RequiresReplace()},
|
||||
Required: true,
|
||||
Type: github_com_hashicorp_terraform_plugin_framework_types.StringType,
|
||||
},
|
||||
"spec": {
|
||||
Attributes: github_com_hashicorp_terraform_plugin_framework_tfsdk.SingleNestedAttributes(map[string]github_com_hashicorp_terraform_plugin_framework_tfsdk.Attribute{
|
||||
|
||||
@@ -102,9 +102,10 @@ func GenSchemaScopedToken(ctx context.Context) (github_com_hashicorp_terraform_p
|
||||
Required: true,
|
||||
},
|
||||
"scope": {
|
||||
Description: "Scope is the scope of the token resource.",
|
||||
Required: true,
|
||||
Type: github_com_hashicorp_terraform_plugin_framework_types.StringType,
|
||||
Description: "Scope is the scope of the token resource.",
|
||||
PlanModifiers: []github_com_hashicorp_terraform_plugin_framework_tfsdk.AttributePlanModifier{github_com_hashicorp_terraform_plugin_framework_tfsdk.RequiresReplace()},
|
||||
Required: true,
|
||||
Type: github_com_hashicorp_terraform_plugin_framework_types.StringType,
|
||||
},
|
||||
"spec": {
|
||||
Attributes: github_com_hashicorp_terraform_plugin_framework_tfsdk.SingleNestedAttributes(map[string]github_com_hashicorp_terraform_plugin_framework_tfsdk.Attribute{
|
||||
|
||||
Reference in New Issue
Block a user