diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a8eb4652..04b4f0d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,6 +48,7 @@ jobs: test: name: Matrix Test + needs: [ build ] timeout-minutes: 15 strategy: max-parallel: 1 diff --git a/docs/data-sources/alias.md b/docs/data-sources/alias.md index 18fc56bc..3b7c7fa6 100644 --- a/docs/data-sources/alias.md +++ b/docs/data-sources/alias.md @@ -24,7 +24,7 @@ An Alias allows a `vercel_deployment` to be accessed through a different URL. ### Optional -- `team_id` (String) The ID of the team the Alias and Deployment exist under. +- `team_id` (String) The ID of the team the Alias and Deployment exist under. Required when configuring a team resource if a default team has not been set in the provider. ### Read-Only diff --git a/docs/data-sources/project.md b/docs/data-sources/project.md index 9e3cf943..cc165bdb 100644 --- a/docs/data-sources/project.md +++ b/docs/data-sources/project.md @@ -39,7 +39,7 @@ output "project_id" { ### Optional - `password_protection` (Attributes) Ensures visitors of your Preview Deployments must enter a password in order to gain access. (see [below for nested schema](#nestedatt--password_protection)) -- `team_id` (String) The team ID the project exists beneath. +- `team_id` (String) The team ID the project exists beneath. Required when configuring a team resource if a default team has not been set in the provider. ### Read-Only diff --git a/docs/index.md b/docs/index.md index cd4aa80a..7a517e1a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -34,6 +34,9 @@ provider "vercel" { # Or omit this for the api_token to be read # from the VERCEL_API_TOKEN environment variable api_token = var.vercel_api_token + + # Optional default team for all resources + team = "your_team_slug_or_id" } ``` diff --git a/docs/resources/alias.md b/docs/resources/alias.md index 359ee8be..62b03922 100644 --- a/docs/resources/alias.md +++ b/docs/resources/alias.md @@ -25,7 +25,7 @@ An Alias allows a `vercel_deployment` to be accessed through a different URL. ### Optional -- `team_id` (String) The ID of the team the Alias and Deployment exist under. +- `team_id` (String) The ID of the team the Alias and Deployment exist under. Required when configuring a team resource if a default team has not been set in the provider. ### Read-Only diff --git a/docs/resources/deployment.md b/docs/resources/deployment.md index df00f6d0..92399b46 100644 --- a/docs/resources/deployment.md +++ b/docs/resources/deployment.md @@ -111,7 +111,7 @@ resource "vercel_deployment" "prebuilt_example" { - `production` (Boolean) true if the deployment is a production deployment, meaning production aliases will be assigned. - `project_settings` (Attributes) Project settings that will be applied to the deployment. (see [below for nested schema](#nestedatt--project_settings)) - `ref` (String) The branch or commit hash that should be deployed. Note this will only work if the project is configured to use a Git repository. Required if `ref` is not set. -- `team_id` (String) The team ID to add the deployment to. +- `team_id` (String) The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider. ### Read-Only diff --git a/docs/resources/dns_record.md b/docs/resources/dns_record.md index 73e95412..88a8e821 100644 --- a/docs/resources/dns_record.md +++ b/docs/resources/dns_record.md @@ -106,7 +106,7 @@ resource "vercel_dns_record" "txt" { - `mx_priority` (Number) The priority of the MX record. The priority specifies the sequence that an email server receives emails. A smaller value indicates a higher priority. - `srv` (Attributes) Settings for an SRV record. (see [below for nested schema](#nestedatt--srv)) -- `team_id` (String) The team ID that the domain and DNS records belong to. +- `team_id` (String) The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider. - `ttl` (Number) The TTL value in seconds. Must be a number between 60 and 2147483647. If unspecified, it will default to 60 seconds. - `value` (String) The value of the DNS record. The format depends on the 'type' property. For an 'A' record, this should be a valid IPv4 address. diff --git a/docs/resources/project.md b/docs/resources/project.md index dc654949..8a048dab 100644 --- a/docs/resources/project.md +++ b/docs/resources/project.md @@ -67,7 +67,7 @@ resource "vercel_project" "example" { - `public_source` (Boolean) By default, visitors to the `/_logs` and `/_src` paths of your Production and Preview Deployments must log in with Vercel (requires being a member of your team) to see the Source, Logs and Deployment Status of your project. Setting `public_source` to `true` disables this behaviour, meaning the Source, Logs and Deployment Status can be publicly viewed. - `root_directory` (String) The name of a directory or relative path to the source code of your project. If omitted, it will default to the project root. - `serverless_function_region` (String) The region on Vercel's network to which your Serverless Functions are deployed. It should be close to any data source your Serverless Function might depend on. A new Deployment is required for your changes to take effect. Please see [Vercel's documentation](https://vercel.com/docs/concepts/edge-network/regions) for a full list of regions. -- `team_id` (String) The team ID to add the project to. +- `team_id` (String) The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider. - `vercel_authentication` (Attributes) Ensures visitors to your Preview Deployments are logged into Vercel and have a minimum of Viewer access on your team. (see [below for nested schema](#nestedatt--vercel_authentication)) ### Read-Only diff --git a/docs/resources/project_domain.md b/docs/resources/project_domain.md index 466c7fef..36f14583 100644 --- a/docs/resources/project_domain.md +++ b/docs/resources/project_domain.md @@ -54,7 +54,7 @@ resource "vercel_project_domain" "example_redirect" { - `git_branch` (String) Git branch to link to the project domain. Deployments from this git branch will be assigned the domain name. - `redirect` (String) The domain name that serves as a target destination for redirects. - `redirect_status_code` (Number) The HTTP status code to use when serving as a redirect. -- `team_id` (String) The ID of the team the project exists under. +- `team_id` (String) The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider. ### Read-Only diff --git a/docs/resources/project_environment_variable.md b/docs/resources/project_environment_variable.md index 234c94f1..ae5c0028 100644 --- a/docs/resources/project_environment_variable.md +++ b/docs/resources/project_environment_variable.md @@ -66,7 +66,7 @@ resource "vercel_project_environment_variable" "example_git_branch" { ### Optional - `git_branch` (String) The git branch of the Environment Variable. -- `team_id` (String) The ID of the Vercel team. +- `team_id` (String) The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider. ### Read-Only diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index d7ee31d2..ce63b5fc 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -14,4 +14,7 @@ provider "vercel" { # Or omit this for the api_token to be read # from the VERCEL_API_TOKEN environment variable api_token = var.vercel_api_token + + # Optional default team for all resources + team = "your_team_slug_or_id" } diff --git a/vercel/data_source_alias.go b/vercel/data_source_alias.go index 3af2f7a0..14fe8704 100644 --- a/vercel/data_source_alias.go +++ b/vercel/data_source_alias.go @@ -56,7 +56,7 @@ An Alias allows a ` + "`vercel_deployment` to be accessed through a different UR "team_id": schema.StringAttribute{ Optional: true, Computed: true, - Description: "The ID of the team the Alias and Deployment exist under.", + Description: "The ID of the team the Alias and Deployment exist under. Required when configuring a team resource if a default team has not been set in the provider.", }, "alias": schema.StringAttribute{ Required: true, diff --git a/vercel/data_source_project.go b/vercel/data_source_project.go index 6cf602fb..2c6bb7b4 100644 --- a/vercel/data_source_project.go +++ b/vercel/data_source_project.go @@ -62,7 +62,7 @@ For more detailed information, please see the [Vercel documentation](https://ver "team_id": schema.StringAttribute{ Optional: true, Computed: true, - Description: "The team ID the project exists beneath.", + Description: "The team ID the project exists beneath. Required when configuring a team resource if a default team has not been set in the provider.", }, "name": schema.StringAttribute{ Required: true, diff --git a/vercel/resource_alias.go b/vercel/resource_alias.go index c091ee24..533e92d5 100644 --- a/vercel/resource_alias.go +++ b/vercel/resource_alias.go @@ -69,7 +69,7 @@ An Alias allows a ` + "`vercel_deployment` to be accessed through a different UR "team_id": schema.StringAttribute{ Optional: true, Computed: true, - Description: "The ID of the team the Alias and Deployment exist under.", + Description: "The ID of the team the Alias and Deployment exist under. Required when configuring a team resource if a default team has not been set in the provider.", PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace()}, }, "id": schema.StringAttribute{ diff --git a/vercel/resource_deployment.go b/vercel/resource_deployment.go index d2d81f2d..d99f11fa 100644 --- a/vercel/resource_deployment.go +++ b/vercel/resource_deployment.go @@ -90,7 +90,7 @@ terraform to your Deployment. ElementType: types.StringType, }, "team_id": schema.StringAttribute{ - Description: "The team ID to add the deployment to.", + Description: "The team ID to add the deployment to. Required when configuring a team resource if a default team has not been set in the provider.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, diff --git a/vercel/resource_dns_record.go b/vercel/resource_dns_record.go index 52b9a5f1..3e0b364d 100644 --- a/vercel/resource_dns_record.go +++ b/vercel/resource_dns_record.go @@ -67,7 +67,7 @@ For more detailed information, please see the [Vercel documentation](https://ver "team_id": schema.StringAttribute{ Optional: true, Computed: true, - Description: "The team ID that the domain and DNS records belong to.", + Description: "The team ID that the domain and DNS records belong to. Required when configuring a team resource if a default team has not been set in the provider.", PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, }, "domain": schema.StringAttribute{ diff --git a/vercel/resource_project.go b/vercel/resource_project.go index 133f6c9b..f8d466bd 100644 --- a/vercel/resource_project.go +++ b/vercel/resource_project.go @@ -70,7 +70,7 @@ At this time you cannot use a Vercel Project resource with in-line ` + "`environ Optional: true, Computed: true, PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, - Description: "The team ID to add the project to.", + Description: "The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.", }, "name": schema.StringAttribute{ Required: true, diff --git a/vercel/resource_project_domain.go b/vercel/resource_project_domain.go index 53f910b3..28abb258 100644 --- a/vercel/resource_project_domain.go +++ b/vercel/resource_project_domain.go @@ -68,7 +68,7 @@ By default, Project Domains will be automatically applied to any ` + "`productio Optional: true, Computed: true, PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, - Description: "The ID of the team the project exists under.", + Description: "The ID of the team the project exists under. Required when configuring a team resource if a default team has not been set in the provider.", }, "id": schema.StringAttribute{ Computed: true, diff --git a/vercel/resource_project_environment_variable.go b/vercel/resource_project_environment_variable.go index 7f7da208..f9f49ca0 100644 --- a/vercel/resource_project_environment_variable.go +++ b/vercel/resource_project_environment_variable.go @@ -95,7 +95,7 @@ At this time you cannot use a Vercel Project resource with in-line ` + "`environ "team_id": schema.StringAttribute{ Optional: true, Computed: true, - Description: "The ID of the Vercel team.", + Description: "The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.", PlanModifiers: []planmodifier.String{stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown()}, }, "id": schema.StringAttribute{