Skip to content

--modern-import-block don't do anything #940

@nissessenap

Description

@nissessenap

I have tried using both version 4 and 5 of the provider, and I'm using terraform
➜ tf version
Terraform v1.11.3

From the name and the feature, I assume the modern-import-block, should generate the new import blocks.
I have also tried different resources without any luck.

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

cf-terraforming v0.24.0

Expected outcome

$ cf-terraforming generate --resource-type "cloudflare_page_rule" --zone $CLOUDFLARE_ZONE_ID --modern-import-block


resource "cloudflare_page_rule" "terraform_managed_resource_foo_0" {
  priority = 1
  status   = "active"
  target   = "tools.example.com/*"
  zone_id  = "local.zone_id"
  actions {
    forwarding_url {
      status_code = 301
      url         = "https://tools.example.com"
    }
  }
}

import {
  to = cloudflare_page_rule.terraform_managed_resource_foo_0
  id = "${local.zone_id}/1234566"
}

Actual outcome

$ cf-terraforming generate --resource-type "cloudflare_page_rule" --zone $CLOUDFLARE_ZONE_ID --modern-import-block

resource "cloudflare_page_rule" "terraform_managed_resource_foo_0" {
  priority = 1
  status   = "active"
  target   = "tools.example.com/*"
  zone_id  = "local.zone_id"
  actions {
    forwarding_url {
      status_code = 301
      url         = "https://tools.example.com"
    }
  }
}

Steps to reproduce

cf-terraforming generate --resource-type "cloudflare_page_rule" --zone $CLOUDFLARE_ZONE_ID --modern-import-block

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