Skip to content

Provider support for custom hostnames requires SSL while the API does not #6333

@ryanmilne-digicert

Description

@ryanmilne-digicert

Confirmation

  • This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
  • I have searched the issue tracker and my issue isn't already found.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Terraform v1.13.0
on darwin_arm64

  • provider registry.terraform.io/cloudflare/cloudflare v5.9.0
  • provider registry.terraform.io/hashicorp/aws v6.13.0

Affected resource(s)

  • cloudflare_custom_hostname

Terraform configuration files

resource "cloudflare_custom_hostname" "custom_hostname" {
  zone_id  = cloudflare_zone.zone.id
  hostname = "test.example.com"
  custom_origin_server = "origin.somedomain.com"
}

Link to debug output

Terraform provides an empty log file

Panic output

No response

Expected output


  # cloudflare_custom_hostname.custom_hostname will be created
  + resource "cloudflare_custom_hostname" "custom_hostname" {
      + created_at                  = (known after apply)
      + custom_origin_server        = "origin.somedomain.com"
      + hostname                    = "test.example.com"
      + id                          = (known after apply)
      + ownership_verification      = (known after apply)
      + ownership_verification_http = (known after apply)
      + status                      = (known after apply)
      + verification_errors         = (known after apply)
      + zone_id                     = "b4b33705ef8f69a3a6f890a7c5090d66"
    }

Actual output

╷
│ Error: Missing required argument
│ 
│   on main.tf line 80, in resource "cloudflare_custom_hostname" "custom_hostname":
│   80: resource "cloudflare_custom_hostname" "custom_hostname" {
│ 
│ The argument "ssl" is required, but no definition was found.
╵

Steps to reproduce

Defined cloudflare_custom_hostname resource without providing the ssl

Additional factoids

I understand that this may not qualify as a bug report, but my Cloudflare support recommended I create an issue for this. If there is a different way or place for this to be handled then please let me know.

The provider requires SSL configuration for custom hostnames, but the Cloudflare API does not.
https://cfapi.centminmod.com/#custom-ssl-for-a-zone-edit-ssl-configuration

The request is to update the resource schema to make ssl optional to allign with the API.

References

#6332

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.version/5Categorizes issue or PR as related to version 5 of the provider.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions