From efd1b67f7ff6dc601ee5ec4120dc4c57f3153899 Mon Sep 17 00:00:00 2001 From: Luke Phillips-Sheard Date: Tue, 17 Jun 2025 21:23:30 +0100 Subject: [PATCH 1/2] Support turbo builds --- docs/resources/project.md | 26 ++++++++++++++------------ vercel/resource_project.go | 4 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/resources/project.md b/docs/resources/project.md index cac30915..eff80cf0 100644 --- a/docs/resources/project.md +++ b/docs/resources/project.md @@ -47,6 +47,7 @@ resource "vercel_project" "example" { ``` + ## Schema ### Required @@ -58,7 +59,7 @@ resource "vercel_project" "example" { - `auto_assign_custom_domains` (Boolean) Automatically assign custom production domains after each Production deployment via merge to the production branch or Vercel CLI deploy with --prod. Defaults to `true` - `automatically_expose_system_environment_variables` (Boolean) Vercel provides a set of Environment Variables that are automatically populated by the System, such as the URL of the Deployment or the name of the Git branch deployed. To expose them to your Deployments, enable this field - `build_command` (String) The build command for this project. If omitted, this value will be automatically detected. -- `build_machine_type` (String) The build machine type to use for this project. Must be one of "enhanced". +- `build_machine_type` (String) The build machine type to use for this project. Must be one of "enhanced" or "turbo". - `customer_success_code_visibility` (Boolean) Allows Vercel Customer Support to inspect all Deployments' source code in this project to assist with debugging. - `dev_command` (String) The dev command for this project. If omitted, this value will be automatically detected. - `directory_listing` (Boolean) If no index file is present within a directory, the directory contents will be displayed. @@ -98,6 +99,7 @@ resource "vercel_project" "example" { - `id` (String) The ID of this resource. + ### Nested Schema for `environment` Required: @@ -117,8 +119,8 @@ Read-Only: - `id` (String) The ID of the Environment Variable. - + ### Nested Schema for `git_comments` Required: @@ -126,8 +128,8 @@ Required: - `on_commit` (Boolean) Whether Commit comments are enabled - `on_pull_request` (Boolean) Whether Pull Request comments are enabled - + ### Nested Schema for `git_repository` Required: @@ -141,6 +143,7 @@ Optional: - `production_branch` (String) By default, every commit pushed to the main branch will trigger a Production Deployment instead of the usual Preview Deployment. You can switch to a different branch here. + ### Nested Schema for `git_repository.deploy_hooks` Required: @@ -153,9 +156,8 @@ Read-Only: - `id` (String) The ID of the deploy hook. - `url` (String, Sensitive) A URL that, when a POST request is made to, will trigger a new deployment. - - + ### Nested Schema for `oidc_token_config` Optional: @@ -163,8 +165,8 @@ Optional: - `enabled` (Boolean, Deprecated) When true, Vercel issued OpenID Connect (OIDC) tokens will be available on the compute environments. See https://vercel.com/docs/security/secure-backend-access/oidc for more information. - `issuer_mode` (String) Configures the URL of the `iss` claim. `team` = `https://oidc.vercel.com/[team_slug]` `global` = `https://oidc.vercel.com` - + ### Nested Schema for `options_allowlist` Required: @@ -172,15 +174,15 @@ Required: - `paths` (Attributes Set) The allowed paths for the OPTIONS Allowlist. Incoming requests will bypass Deployment Protection if they have the method `OPTIONS` and **start with** one of the path values. (see [below for nested schema](#nestedatt--options_allowlist--paths)) + ### Nested Schema for `options_allowlist.paths` Required: - `value` (String) The path prefix to compare with the incoming request path. - - + ### Nested Schema for `password_protection` Required: @@ -188,8 +190,8 @@ Required: - `deployment_type` (String) The deployment environment to protect. Must be one of `standard_protection`, `all_deployments`, or `only_preview_deployments`. - `password` (String, Sensitive) The password that visitors must enter to gain access to your Preview Deployments. Drift detection is not possible for this field. - + ### Nested Schema for `resource_config` Optional: @@ -198,8 +200,8 @@ Optional: - `function_default_cpu_type` (String) The amount of CPU available to your Serverless Functions. Should be one of 'standard_legacy' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs). - `function_default_timeout` (Number) The default timeout for Serverless Functions. - + ### Nested Schema for `trusted_ips` Required: @@ -212,6 +214,7 @@ Optional: - `protection_mode` (String) Whether or not Trusted IPs is optional to access a deployment. Must be either `trusted_ip_required` or `trusted_ip_optional`. `trusted_ip_optional` is only available with Standalone Trusted IPs. + ### Nested Schema for `trusted_ips.addresses` Required: @@ -222,9 +225,8 @@ Optional: - `note` (String) A description for the value - - + ### Nested Schema for `vercel_authentication` Required: diff --git a/vercel/resource_project.go b/vercel/resource_project.go index e626b5cd..980c96d0 100644 --- a/vercel/resource_project.go +++ b/vercel/resource_project.go @@ -584,11 +584,11 @@ At this time you cannot use a Vercel Project resource with in-line ` + "`environ PlanModifiers: []planmodifier.Bool{boolplanmodifier.UseStateForUnknown()}, }, "build_machine_type": schema.StringAttribute{ - Description: "The build machine type to use for this project. Must be one of \"enhanced\".", + Description: "The build machine type to use for this project. Must be one of \"enhanced\" or \"turbo\".", Optional: true, Computed: true, Validators: []validator.String{ - stringvalidator.OneOf("enhanced"), + stringvalidator.OneOf("enhanced", "turbo"), }, }, }, From 9a2bfa0b9b31440036dff1f49fa99ff37a9b8062 Mon Sep 17 00:00:00 2001 From: Luke Phillips-Sheard Date: Wed, 18 Jun 2025 08:20:10 +0100 Subject: [PATCH 2/2] task docs --- docs/resources/project.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/resources/project.md b/docs/resources/project.md index eff80cf0..7e6e42cb 100644 --- a/docs/resources/project.md +++ b/docs/resources/project.md @@ -47,7 +47,6 @@ resource "vercel_project" "example" { ``` - ## Schema ### Required @@ -99,7 +98,6 @@ resource "vercel_project" "example" { - `id` (String) The ID of this resource. - ### Nested Schema for `environment` Required: @@ -119,8 +117,8 @@ Read-Only: - `id` (String) The ID of the Environment Variable. - + ### Nested Schema for `git_comments` Required: @@ -128,8 +126,8 @@ Required: - `on_commit` (Boolean) Whether Commit comments are enabled - `on_pull_request` (Boolean) Whether Pull Request comments are enabled - + ### Nested Schema for `git_repository` Required: @@ -143,7 +141,6 @@ Optional: - `production_branch` (String) By default, every commit pushed to the main branch will trigger a Production Deployment instead of the usual Preview Deployment. You can switch to a different branch here. - ### Nested Schema for `git_repository.deploy_hooks` Required: @@ -156,8 +153,9 @@ Read-Only: - `id` (String) The ID of the deploy hook. - `url` (String, Sensitive) A URL that, when a POST request is made to, will trigger a new deployment. - + + ### Nested Schema for `oidc_token_config` Optional: @@ -165,8 +163,8 @@ Optional: - `enabled` (Boolean, Deprecated) When true, Vercel issued OpenID Connect (OIDC) tokens will be available on the compute environments. See https://vercel.com/docs/security/secure-backend-access/oidc for more information. - `issuer_mode` (String) Configures the URL of the `iss` claim. `team` = `https://oidc.vercel.com/[team_slug]` `global` = `https://oidc.vercel.com` - + ### Nested Schema for `options_allowlist` Required: @@ -174,15 +172,15 @@ Required: - `paths` (Attributes Set) The allowed paths for the OPTIONS Allowlist. Incoming requests will bypass Deployment Protection if they have the method `OPTIONS` and **start with** one of the path values. (see [below for nested schema](#nestedatt--options_allowlist--paths)) - ### Nested Schema for `options_allowlist.paths` Required: - `value` (String) The path prefix to compare with the incoming request path. - + + ### Nested Schema for `password_protection` Required: @@ -190,8 +188,8 @@ Required: - `deployment_type` (String) The deployment environment to protect. Must be one of `standard_protection`, `all_deployments`, or `only_preview_deployments`. - `password` (String, Sensitive) The password that visitors must enter to gain access to your Preview Deployments. Drift detection is not possible for this field. - + ### Nested Schema for `resource_config` Optional: @@ -200,8 +198,8 @@ Optional: - `function_default_cpu_type` (String) The amount of CPU available to your Serverless Functions. Should be one of 'standard_legacy' (0.6vCPU), 'standard' (1vCPU) or 'performance' (1.7vCPUs). - `function_default_timeout` (Number) The default timeout for Serverless Functions. - + ### Nested Schema for `trusted_ips` Required: @@ -214,7 +212,6 @@ Optional: - `protection_mode` (String) Whether or not Trusted IPs is optional to access a deployment. Must be either `trusted_ip_required` or `trusted_ip_optional`. `trusted_ip_optional` is only available with Standalone Trusted IPs. - ### Nested Schema for `trusted_ips.addresses` Required: @@ -225,8 +222,9 @@ Optional: - `note` (String) A description for the value - + + ### Nested Schema for `vercel_authentication` Required: