Skip to content

Turnstile with "no" domains generates invalid config #655

@punkeel

Description

@punkeel

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the library and it is still present.

cf-terraforming version

0.16.1

Expected outcome

cf-terraforming generates valid blocks for all possible configurations.

Actual outcome

cf-terraforming generates invalid code blocks :(


│ Error: Missing required argument

│   on turnstile_widgets.tf line 20, in resource "cloudflare_turnstile_widget" "terraform_managed_resource_...":
│   20: resource "cloudflare_turnstile_widget" "terraform_managed_resource_..." {

│ The argument "domains" is required, but no definition was found.

The generated block should include domain = [], likely because it is the default "Go" value for an array.

Steps to reproduce

  1. Get the entitlement for not specifying any domains
  2. Create a Turnstile widget with an empty list of domains
  3. Try to import it

Note: this requires a paid entitlement.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions