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

Improve documentation around imports #33

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 24, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ terraform {
required_providers {
vercel = {
source = "vercel/vercel"
version = "~> 0.1"
version = "~> 0.4"
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions docs/resources/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ description: |-
When making deployments, the Project will be uploaded and transformed into a production-ready output through the use of a Build Step.
Once the build step has completed successfully, a new, immutable deployment will be made available at the preview URL. Deployments are retained indefinitely unless deleted manually.
-> In order to provide files to a deployment, you'll need to use the vercel_file or vercel_project_directory data sources.
~> If you are creating Deployments through terraform and intend to use both preview and production
deployments, you may wish to 'layer' your terraform, creating the Project with a different set of
terraform to your Deployment.
---

# vercel_deployment (Resource)
Expand All @@ -22,6 +25,10 @@ Once the build step has completed successfully, a new, immutable deployment will

-> In order to provide files to a deployment, you'll need to use the `vercel_file` or `vercel_project_directory` data sources.

~> If you are creating Deployments through terraform and intend to use both preview and production
deployments, you may wish to 'layer' your terraform, creating the Project with a different set of
terraform to your Deployment.

## Example Usage

```terraform
Expand Down
13 changes: 6 additions & 7 deletions docs/resources/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ description: |-
Provides a Project resource.
A Project groups deployments and custom domains. To deploy on Vercel, you need to create a Project.
For more detailed information, please see the Vercel documentation https://vercel.com/docs/concepts/projects/overview.
~> If you are creating Deployments through terraform and intend to use both preview and production
deployments, you may wish to 'layer' your terraform, creating the Project with a different set of
terraform to your Deployment.
---

# vercel_project (Resource)
Expand All @@ -19,10 +16,6 @@ A Project groups deployments and custom domains. To deploy on Vercel, you need t

For more detailed information, please see the [Vercel documentation](https://vercel.com/docs/concepts/projects/overview).

~> If you are creating Deployments through terraform and intend to use both preview and production
deployments, you may wish to 'layer' your terraform, creating the Project with a different set of
terraform to your Deployment.

## Example Usage

```terraform
Expand Down Expand Up @@ -113,5 +106,11 @@ Optional:
Import is supported using the following syntax:

```shell
# Import via the team_id and project_id.
# team_id can be found in the team `settings` tab in the Vercel UI.
# project_id can be found in the project `settings` tab in the Vercel UI.
terraform import vercel_project.example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

# If importing without a team, simply use the project ID.
terraform import vercel_project.personal_example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
6 changes: 6 additions & 0 deletions docs/resources/project_domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,11 @@ resource "vercel_project_domain" "example_redirect" {
Import is supported using the following syntax:

```shell
# Import via the team_id, project_id and domain name.
# team_id can be found in the team `settings` tab in the Vercel UI.
# project_id can be found in the project `settings` tab in the Vercel UI.
terraform import vercel_project_domain.example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/example.com

# If importing without a team, simply use the project ID and domain.
terraform import vercel_project_domain.personal_example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/example.com
```
2 changes: 1 addition & 1 deletion examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ terraform {
required_providers {
vercel = {
source = "vercel/vercel"
version = "~> 0.1"
version = "~> 0.4"
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions examples/resources/vercel_project/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# Import via the team_id and project_id.
# team_id can be found in the team `settings` tab in the Vercel UI.
# project_id can be found in the project `settings` tab in the Vercel UI.
terraform import vercel_project.example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

# If importing without a team, simply use the project ID.
terraform import vercel_project.personal_example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
6 changes: 6 additions & 0 deletions examples/resources/vercel_project_domain/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# Import via the team_id, project_id and domain name.
# team_id can be found in the team `settings` tab in the Vercel UI.
# project_id can be found in the project `settings` tab in the Vercel UI.
terraform import vercel_project_domain.example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/example.com

# If importing without a team, simply use the project ID and domain.
terraform import vercel_project_domain.personal_example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/example.com
7 changes: 6 additions & 1 deletion vercel/resource_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ When making deployments, the Project will be uploaded and transformed into a pro

Once the build step has completed successfully, a new, immutable deployment will be made available at the preview URL. Deployments are retained indefinitely unless deleted manually.

-> In order to provide files to a deployment, you'll need to use the ` + "`vercel_file` or `vercel_project_directory` data sources.",
-> In order to provide files to a deployment, you'll need to use the ` + "`vercel_file` or `vercel_project_directory` data sources." + `

~> If you are creating Deployments through terraform and intend to use both preview and production
deployments, you may wish to 'layer' your terraform, creating the Project with a different set of
terraform to your Deployment.
`,
Attributes: map[string]tfsdk.Attribute{
"domains": {
Description: "A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation.",
Expand Down
4 changes: 0 additions & 4 deletions vercel/resource_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ Provides a Project resource.
A Project groups deployments and custom domains. To deploy on Vercel, you need to create a Project.

For more detailed information, please see the [Vercel documentation](https://vercel.com/docs/concepts/projects/overview).

~> If you are creating Deployments through terraform and intend to use both preview and production
deployments, you may wish to 'layer' your terraform, creating the Project with a different set of
terraform to your Deployment.
`,
Attributes: map[string]tfsdk.Attribute{
"team_id": {
Expand Down