diff --git a/.changelog/2060.txt b/.changelog/2060.txt new file mode 100644 index 0000000000..62aea30333 --- /dev/null +++ b/.changelog/2060.txt @@ -0,0 +1,7 @@ +```release-note:enhancement +resource/cloudflare_pages_project: add note about linking git accounts to Cloudflare account. +``` + +```release-note:enhancement +resource/cloudflare_pages_domain: add note about needing to make a separate `cloudflare_record`. +``` diff --git a/docs/resources/pages_domain.md b/docs/resources/pages_domain.md index b897a25050..1e08b333df 100644 --- a/docs/resources/pages_domain.md +++ b/docs/resources/pages_domain.md @@ -9,6 +9,8 @@ description: |- Provides a resource for managing Cloudflare Pages domains. +-> A DNS record for the domain is not automatically created. You need to create a `cloudflare_record` resource for the domain you want to use. + ## Example Usage ```terraform @@ -18,6 +20,7 @@ resource "cloudflare_pages_domain" "my-domain" { domain = "example.com" } ``` + ## Schema @@ -38,4 +41,4 @@ Import is supported using the following syntax: ```shell $ terraform import cloudflare_pages_domain.example // -``` +``` \ No newline at end of file diff --git a/docs/resources/pages_project.md b/docs/resources/pages_project.md index 39332cdf70..359a357c31 100644 --- a/docs/resources/pages_project.md +++ b/docs/resources/pages_project.md @@ -9,6 +9,10 @@ description: |- Provides a resource which manages Cloudflare Pages projects. +-> If you are using a `source` block configuration, you must first have a +connected GitHub or GitLab account connected to Cloudflare. See the +[Getting Started with Pages] documentation on how to link your accounts. + ## Example Usage ```terraform @@ -106,6 +110,7 @@ resource "cloudflare_pages_project" "deployment_configs" { } } ``` + ## Schema @@ -210,3 +215,5 @@ Import is supported using the following syntax: ```shell $ terraform import cloudflare_pages_project.example / ``` + +[Getting Started with Pages]: https://developers.cloudflare.com/pages/get-started/#connect-your-git-provider-to-pages diff --git a/templates/resources/pages_domain.md.tmpl b/templates/resources/pages_domain.md.tmpl new file mode 100644 index 0000000000..8ba9439dc4 --- /dev/null +++ b/templates/resources/pages_domain.md.tmpl @@ -0,0 +1,24 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.RenderedProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +-> A DNS record for the domain is not automatically created. You need to create a `cloudflare_record` resource for the domain you want to use. + +## Example Usage + +{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }} + +{{ .SchemaMarkdown | trimspace }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }} \ No newline at end of file diff --git a/templates/resources/pages_project.md.tmpl b/templates/resources/pages_project.md.tmpl new file mode 100644 index 0000000000..a3ba41b6c0 --- /dev/null +++ b/templates/resources/pages_project.md.tmpl @@ -0,0 +1,28 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.RenderedProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +-> If you are using a `source` block configuration, you must first have a +connected GitHub or GitLab account connected to Cloudflare. See the +[Getting Started with Pages] documentation on how to link your accounts. + +## Example Usage + +{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }} + +{{ .SchemaMarkdown | trimspace }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }} + +[Getting Started with Pages]: https://developers.cloudflare.com/pages/get-started/#connect-your-git-provider-to-pages