# Cloudflare's Terraform Provider v5.19.0: 14 new resources and a smoother v4-to-v5 move!

Yahoo, Shiichan here! Today I found an update that Infrastructure-as-Code fans will love.

## What was announced?

Over on Cloudflare's Changelog, the [Terraform Provider](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs) v5.19.0 is now available. There are two headline items: 14 new resources spanning AI Gateway, Pipelines, R2 Data Catalog, Zero Trust and more, plus a much smoother v4-to-v5 migration. Automatic state upgraders now cover 26 resources, and they work together with the new [tf-migrate CLI tool](https://github.com/cloudflare/tf-migrate).

## The story so far

Moving from v4 to v5 used to mean chasing resource renames, attribute rewrites, and moved blocks by hand, which was a nerve-wracking job. There was a `cmd/migrate` helper for that, and it changed this time too.

> Note: cmd/migrate is deprecated in favor of tf-migrate and will be removed in a future release

So tf-migrate is the star of migration from now on. ([#7062](https://github.com/cloudflare/terraform-provider-cloudflare/pull/7062))

## What changes

tf-migrate automates resource renames, attribute updates, and moved block generation, cutting down manual effort and upgrade risk at once. On top of that, state upgraders carry your state across, so resources you built in v4 move into v5 without breaking. It's a quiet but meaningful win for existing Cloudflare users.

## Dive Deep

Newly manageable resources include `cloudflare_ai_gateway` (AI Gateway instances), `cloudflare_pipeline` (Cloudflare Pipelines), `cloudflare_r2_data_catalog` (R2 Data Catalog), `cloudflare_user_group` (user groups), `cloudflare_vulnerability_scanner_credential` (vulnerability scanner credentials), `cloudflare_workers_observability_destination` (Workers Observability destinations), and `cloudflare_zero_trust_dlp_settings` (Zero Trust DLP settings).

The 26 resources covered by state upgraders include `account`, `custom_hostname`, `mtls_certificate`, `workers_custom_domain`, and `zone_setting`. There are smaller touches too: `ruleset` adds content_converter and redirects_for_ai_training support to configuration rules, and `zero_trust_gateway_logging` is now importable.

For the step-by-step process, see the [Version 5 Migration Guide](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/guides/version-5-migration), and for the big picture check Cloudflare's [Terraform documentation](https://developers.cloudflare.com/terraform/).

## Wrap-up

- Terraform Provider v5.19.0 adds 14 new resources (AI Gateway, Pipelines, R2 Data Catalog, Zero Trust and more)
- Automatic state upgraders now cover 26 resources for the v4-to-v5 move
- The new tf-migrate CLI automates renames, attribute updates, and moved block generation
- `cmd/migrate` is deprecated and will be removed in a future release

If you manage Cloudflare with Terraform and have been meaning to bump to v5, this is the update for you!
