From 1cbdec77fe21666658c807c528e7b49999eb99cf Mon Sep 17 00:00:00 2001 From: Douglas Harcourt Parsons Date: Mon, 15 Apr 2024 12:27:32 +0100 Subject: [PATCH] Tidy language in `import` statements, and hint at API usage for IDs Closes #147 --- docs/data-sources/shared_environment_variable.md | 2 +- docs/resources/dns_record.md | 6 ++++-- docs/resources/project_environment_variable.md | 6 ++++-- docs/resources/shared_environment_variable.md | 2 +- .../vercel_shared_environment_variable/data-source.tf | 2 +- examples/resources/vercel_dns_record/import.sh | 6 ++++-- .../resources/vercel_project_environment_variable/import.sh | 6 ++++-- .../resources/vercel_shared_environment_variable/import.sh | 2 +- 8 files changed, 20 insertions(+), 12 deletions(-) diff --git a/docs/data-sources/shared_environment_variable.md b/docs/data-sources/shared_environment_variable.md index ebb402a7..acb1a82a 100644 --- a/docs/data-sources/shared_environment_variable.md +++ b/docs/data-sources/shared_environment_variable.md @@ -20,7 +20,7 @@ For more detailed information, please see the [Vercel documentation](https://ver ```terraform # Environment variables can be identified by their ID, or by their key and target. -# The ID is hard to find, but can be taken from the network tab, inside developer tools, on the shared environment variable page. +# The ID can be taken from the network tab inside developer tools, while you are on the project page. data "vercel_shared_environment_variable" "example" { id = "xxxxxxxxxxxxxxx" } diff --git a/docs/resources/dns_record.md b/docs/resources/dns_record.md index b1b78c17..32319eb0 100644 --- a/docs/resources/dns_record.md +++ b/docs/resources/dns_record.md @@ -139,11 +139,13 @@ Import is supported using the following syntax: ```shell # If importing into a personal account, or with a team configured on # the provider, simply use the record id. -# - record_id is hard to find, but can be taken from the network tab, inside developer tools, on the domains page. +# - record_id can be taken from the network tab inside developer tools, while you are on the domains page, +# or can be queried from the Vercel API directly (https://vercel.com/docs/rest-api/endpoints/dns#list-existing-dns-records). terraform import vercel_dns_record.example rec_xxxxxxxxxxxxxxxxxxxxxxxxxxxx # Alternatively, you can import via the team_id and record_id. # - team_id can be found in the team `settings` tab in the Vercel UI. -# - record_id is hard to find, but can be taken from the network tab, inside developer tools, on the domains page. +# - record_id can be taken from the network tab inside developer tools, while you are on the domains page, +# or can be queried from the Vercel API directly (https://vercel.com/docs/rest-api/endpoints/dns#list-existing-dns-records). terraform import vercel_dns_record.example team_xxxxxxxxxxxxxxxxxxxxxxxx/rec_xxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` diff --git a/docs/resources/project_environment_variable.md b/docs/resources/project_environment_variable.md index 7a0fb088..7cfc232c 100644 --- a/docs/resources/project_environment_variable.md +++ b/docs/resources/project_environment_variable.md @@ -91,7 +91,8 @@ Import is supported using the following syntax: # If importing into a personal account, or with a team configured on # the provider, simply use the project_id and environment variable id. # - project_id can be found in the project `settings` tab in the Vercel UI. -# - environment variable id is hard to find, but can be taken from the network tab, inside developer tools, on the project page. +# - environment variable id can be taken from the network tab inside developer tools, while you are on the project page, +# or can be queried from Vercel API directly (https://vercel.com/docs/rest-api/endpoints/projects#retrieve-the-environment-variables-of-a-project-by-id-or-name) # # Note also, that the value field for sensitive environment variables will be imported as `null`. terraform import vercel_project_environment_variable.example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt @@ -100,7 +101,8 @@ terraform import vercel_project_environment_variable.example prj_xxxxxxxxxxxxxxx # environment variable 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. -# - environment variable id is hard to find, but can be taken from the network tab, inside developer tools, on the project page. +# - environment variable id can be taken from the network tab inside developer tools, while you are on the project page, +# or can be queried from Vercel API directly (https://vercel.com/docs/rest-api/endpoints/projects#retrieve-the-environment-variables-of-a-project-by-id-or-name) # # Note also, that the value field for sensitive environment variables will be imported as `null`. terraform import vercel_project_environment_variable.example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt diff --git a/docs/resources/shared_environment_variable.md b/docs/resources/shared_environment_variable.md index c571aa6d..2d1f4a8d 100644 --- a/docs/resources/shared_environment_variable.md +++ b/docs/resources/shared_environment_variable.md @@ -66,7 +66,7 @@ Import is supported using the following syntax: ```shell # You can import via the team_id and environment variable id. # - team_id can be found in the team `settings` tab in the Vercel UI. -# - environment variable id is hard to find, but can be taken from the network tab, inside developer tools, on the shared environment variable page. +# - environment variable id can be taken from the network tab inside developer tools, while you are on the project page. # # Note also, that the value field for sensitive environment variables will be imported as `null`. terraform import vercel_shared_environment_variable.example team_xxxxxxxxxxxxxxxxxxxxxxxx/env_yyyyyyyyyyyyy diff --git a/examples/data-sources/vercel_shared_environment_variable/data-source.tf b/examples/data-sources/vercel_shared_environment_variable/data-source.tf index 017143e7..98179a4d 100644 --- a/examples/data-sources/vercel_shared_environment_variable/data-source.tf +++ b/examples/data-sources/vercel_shared_environment_variable/data-source.tf @@ -1,5 +1,5 @@ # Environment variables can be identified by their ID, or by their key and target. -# The ID is hard to find, but can be taken from the network tab, inside developer tools, on the shared environment variable page. +# The ID can be taken from the network tab inside developer tools, while you are on the project page. data "vercel_shared_environment_variable" "example" { id = "xxxxxxxxxxxxxxx" } diff --git a/examples/resources/vercel_dns_record/import.sh b/examples/resources/vercel_dns_record/import.sh index 5dc06445..da9cde82 100644 --- a/examples/resources/vercel_dns_record/import.sh +++ b/examples/resources/vercel_dns_record/import.sh @@ -1,10 +1,12 @@ # If importing into a personal account, or with a team configured on # the provider, simply use the record id. -# - record_id is hard to find, but can be taken from the network tab, inside developer tools, on the domains page. +# - record_id can be taken from the network tab inside developer tools, while you are on the domains page, +# or can be queried from the Vercel API directly (https://vercel.com/docs/rest-api/endpoints/dns#list-existing-dns-records). terraform import vercel_dns_record.example rec_xxxxxxxxxxxxxxxxxxxxxxxxxxxx # Alternatively, you can import via the team_id and record_id. # - team_id can be found in the team `settings` tab in the Vercel UI. -# - record_id is hard to find, but can be taken from the network tab, inside developer tools, on the domains page. +# - record_id can be taken from the network tab inside developer tools, while you are on the domains page, +# or can be queried from the Vercel API directly (https://vercel.com/docs/rest-api/endpoints/dns#list-existing-dns-records). terraform import vercel_dns_record.example team_xxxxxxxxxxxxxxxxxxxxxxxx/rec_xxxxxxxxxxxxxxxxxxxxxxxxxxxx diff --git a/examples/resources/vercel_project_environment_variable/import.sh b/examples/resources/vercel_project_environment_variable/import.sh index d7f26c63..848bb308 100644 --- a/examples/resources/vercel_project_environment_variable/import.sh +++ b/examples/resources/vercel_project_environment_variable/import.sh @@ -1,7 +1,8 @@ # If importing into a personal account, or with a team configured on # the provider, simply use the project_id and environment variable id. # - project_id can be found in the project `settings` tab in the Vercel UI. -# - environment variable id is hard to find, but can be taken from the network tab, inside developer tools, on the project page. +# - environment variable id can be taken from the network tab inside developer tools, while you are on the project page, +# or can be queried from Vercel API directly (https://vercel.com/docs/rest-api/endpoints/projects#retrieve-the-environment-variables-of-a-project-by-id-or-name) # # Note also, that the value field for sensitive environment variables will be imported as `null`. terraform import vercel_project_environment_variable.example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt @@ -10,7 +11,8 @@ terraform import vercel_project_environment_variable.example prj_xxxxxxxxxxxxxxx # environment variable 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. -# - environment variable id is hard to find, but can be taken from the network tab, inside developer tools, on the project page. +# - environment variable id can be taken from the network tab inside developer tools, while you are on the project page, +# or can be queried from Vercel API directly (https://vercel.com/docs/rest-api/endpoints/projects#retrieve-the-environment-variables-of-a-project-by-id-or-name) # # Note also, that the value field for sensitive environment variables will be imported as `null`. terraform import vercel_project_environment_variable.example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt diff --git a/examples/resources/vercel_shared_environment_variable/import.sh b/examples/resources/vercel_shared_environment_variable/import.sh index 0dcf59fd..78daf371 100644 --- a/examples/resources/vercel_shared_environment_variable/import.sh +++ b/examples/resources/vercel_shared_environment_variable/import.sh @@ -1,6 +1,6 @@ # You can import via the team_id and environment variable id. # - team_id can be found in the team `settings` tab in the Vercel UI. -# - environment variable id is hard to find, but can be taken from the network tab, inside developer tools, on the shared environment variable page. +# - environment variable id can be taken from the network tab inside developer tools, while you are on the project page. # # Note also, that the value field for sensitive environment variables will be imported as `null`. terraform import vercel_shared_environment_variable.example team_xxxxxxxxxxxxxxxxxxxxxxxx/env_yyyyyyyyyyyyy