diff --git a/docs/index.md b/docs/index.md index ffe2fd07..bc84c5cc 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,7 +25,7 @@ terraform { required_providers { vercel = { source = "vercel/vercel" - version = "~> 0.1" + version = "~> 0.4" } } } diff --git a/docs/resources/deployment.md b/docs/resources/deployment.md index b7c01dd5..16d14daf 100644 --- a/docs/resources/deployment.md +++ b/docs/resources/deployment.md @@ -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) @@ -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 diff --git a/docs/resources/project.md b/docs/resources/project.md index 1c9f53bf..74ebfc91 100644 --- a/docs/resources/project.md +++ b/docs/resources/project.md @@ -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) @@ -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 @@ -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 ``` diff --git a/docs/resources/project_domain.md b/docs/resources/project_domain.md index 5ded908a..57a83a67 100644 --- a/docs/resources/project_domain.md +++ b/docs/resources/project_domain.md @@ -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 ``` diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 02ae803b..d7ee31d2 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -5,7 +5,7 @@ terraform { required_providers { vercel = { source = "vercel/vercel" - version = "~> 0.1" + version = "~> 0.4" } } } diff --git a/examples/resources/vercel_project/import.sh b/examples/resources/vercel_project/import.sh index 8a03370c..20f80678 100644 --- a/examples/resources/vercel_project/import.sh +++ b/examples/resources/vercel_project/import.sh @@ -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 diff --git a/examples/resources/vercel_project_domain/import.sh b/examples/resources/vercel_project_domain/import.sh index f194d271..452ae18d 100644 --- a/examples/resources/vercel_project_domain/import.sh +++ b/examples/resources/vercel_project_domain/import.sh @@ -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 diff --git a/vercel/resource_deployment.go b/vercel/resource_deployment.go index fbd71d86..5c751a89 100644 --- a/vercel/resource_deployment.go +++ b/vercel/resource_deployment.go @@ -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.", diff --git a/vercel/resource_project.go b/vercel/resource_project.go index b3aa5992..d2ef4428 100644 --- a/vercel/resource_project.go +++ b/vercel/resource_project.go @@ -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": {