terraform-provider-cloudflare icon indicating copy to clipboard operation
terraform-provider-cloudflare copied to clipboard

Pages project should have deployments enabled by default

Open SebastiaanYN opened this issue 3 years ago • 2 comments
trafficstars

Current Terraform and Cloudflare provider version

Terraform v1.2.4 on darwin_amd64

  • provider registry.terraform.io/cloudflare/cloudflare v3.24.0
  • provider registry.terraform.io/hashicorp/vault v3.7.0

Description

Currently the default value for deployments_enabled in the pages_project resource is false. This should instead be true.

Use cases

Setting deployments_enabled to true by default or explicitly documenting that it's false by default would prevent unnecessary confusion surrounding a project being created but seeing no deployments.

Potential Terraform configuration

resource "cloudflare_pages_project" "example" {
  account_id        = var.account_id
  name              = "example"
  production_branch = "master"

  build_config {
    build_command   = "yarn build"
    destination_dir = "build"
  }

  source {
    type = "github"

    config {
      owner               = "cloudflare"
      repo_name           = "1.1.1.1"
      production_branch   = "master"
      pr_comments_enabled = false
    }
  }
}

References

No response

SebastiaanYN avatar Sep 22 '22 11:09 SebastiaanYN

CC: @Cyb3r-Jak3

we default these if not provided but Terraform provides everything and does it's own defaulting.

Few other properties that should have specific defaults too which I can grab next week

WalshyDev avatar Sep 22 '22 12:09 WalshyDev

curious, is there a use case where we don't ever want a resource to automatically deploy? seems like this is the safe guard to prevent things from accidentally being deployed if another system manages it.

jacobbednarz avatar Sep 25 '22 22:09 jacobbednarz

This functionality has been released in v3.26.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] avatar Oct 18 '22 23:10 github-actions[bot]