这是indexloc提供的服务,不要输入任何密码
Skip to content

Bug: remove set plan modifiers on env variables resource #333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions vercel/resource_project_environment_variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
Expand Down Expand Up @@ -102,11 +101,10 @@ At this time you cannot use a Vercel Project resource with in-line ` + "`environ
// Sensitive: true,
},
"target": schema.SetAttribute{
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.Set{setplanmodifier.UseStateForUnknown()},
Description: "The environments that the Environment Variable should be present on. Valid targets are either `production`, `preview`, or `development`. At least one of `target` or `custom_environment_ids` must be set.",
ElementType: types.StringType,
Optional: true,
Computed: true,
Description: "The environments that the Environment Variable should be present on. Valid targets are either `production`, `preview`, or `development`. At least one of `target` or `custom_environment_ids` must be set.",
ElementType: types.StringType,
Validators: []validator.Set{
setvalidator.ValueStringsAre(stringvalidator.OneOf("production", "preview", "development")),
setvalidator.SizeAtLeast(1),
Expand All @@ -117,11 +115,10 @@ At this time you cannot use a Vercel Project resource with in-line ` + "`environ
},
},
"custom_environment_ids": schema.SetAttribute{
Optional: true,
Computed: true,
ElementType: types.StringType,
PlanModifiers: []planmodifier.Set{setplanmodifier.UseStateForUnknown()},
Description: "The IDs of Custom Environments that the Environment Variable should be present on. At least one of `target` or `custom_environment_ids` must be set.",
Optional: true,
Computed: true,
ElementType: types.StringType,
Description: "The IDs of Custom Environments that the Environment Variable should be present on. At least one of `target` or `custom_environment_ids` must be set.",
Validators: []validator.Set{
setvalidator.SizeAtLeast(1),
setvalidator.AtLeastOneOf(
Expand Down