Skip to content

Commit 1d1292b

Browse files
authored
Remove Fluid + standard_legacy CPU validator for vercel_project (#291)
This causes issues with unsupported Unknown fields for the project resource. Disable for now until we can rework the types to properly support this. Closes #290
1 parent 81e2d24 commit 1d1292b

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

vercel/resource_project.go

+7-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ import (
3030
)
3131

3232
var (
33-
_ resource.Resource = &projectResource{}
34-
_ resource.ResourceWithConfigure = &projectResource{}
35-
_ resource.ResourceWithImportState = &projectResource{}
36-
_ resource.ResourceWithModifyPlan = &projectResource{}
37-
_ resource.ResourceWithConfigValidators = &projectResource{}
33+
_ resource.Resource = &projectResource{}
34+
_ resource.ResourceWithConfigure = &projectResource{}
35+
_ resource.ResourceWithImportState = &projectResource{}
36+
_ resource.ResourceWithModifyPlan = &projectResource{}
37+
// _ resource.ResourceWithConfigValidators = &projectResource{}
3838
)
3939

4040
func newProjectResource() resource.Resource {
@@ -556,11 +556,13 @@ At this time you cannot use a Vercel Project resource with in-line ` + "`environ
556556
}
557557
}
558558

559+
/*
559560
func (r *projectResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator {
560561
return []resource.ConfigValidator{
561562
&fluidComputeBasicCPUValidator{},
562563
}
563564
}
565+
*/
564566

565567
// Project reflects the state terraform stores internally for a project.
566568
type Project struct {

vercel/resource_project_test.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,17 @@ func TestAcc_ProjectFluidCompute(t *testing.T) {
114114
Steps: []resource.TestStep{
115115
{
116116
// check we get a sensible error if fluid + invalid CPU combination.
117-
Config: `
117+
Config: fmt.Sprintf(`
118118
resource "vercel_project" "test" {
119-
name = "foo"
119+
name = "test-acc-fluid-%[1]s"
120+
%[2]s
120121
resource_config = {
121122
fluid = true
122123
function_default_cpu_type = "standard_legacy"
123124
}
124125
}
125-
`,
126-
ExpectError: regexp.MustCompile(strings.ReplaceAll("Fluid compute is only supported with the standard or performance CPU types.", " ", `\s*`)),
126+
`, projectSuffix, teamIDConfig()),
127+
ExpectError: regexp.MustCompile(strings.ReplaceAll("\"standard_legacy\" is not a valid memory type for Fluid compute", " ", `\s*`)),
127128
},
128129
{
129130
// check creating a project with Fluid

0 commit comments

Comments
 (0)