terradart_cloudflare 0.27.0 copy "terradart_cloudflare: ^0.27.0" to clipboard
terradart_cloudflare: ^0.27.0 copied to clipboard

Curated factory wrappers for Cloudflare resources (official cloudflare/cloudflare Terraform provider) for Dart-first Terraform stacks.

terradart_cloudflare #

pub: terradart_cloudflare Dart SDK License: Apache-2.0

Curated factory wrappers for Cloudflare resources (the official cloudflare/cloudflare Terraform provider) for Dart-first Terraform stacks.

Cloudflare's positioning in a Dart stack is the infrastructure edge around your app — DNS zones and records that point custom domains toward Cloud Run, Firebase Hosting, or wherever your Dart backend lives. (This package does not deploy Dart on Workers; it declares the Cloudflare edge infrastructure your Dart app sits behind.)

The catalog at the current provider pin is filled (every cloudflare_* resource and data source in 5.23.0). Nested plugin-framework objects are typed Dart helper classes, not TfArg<Map<String, dynamic>>. A later pin that adds names lands on request — open a feature request.

Security & Credentials #

Secrets never appear in synth output by design. CloudflareProvider has no api_token / api_key / api_user_service_key parameters (sensitive attributes are structurally excluded); authenticate at apply time via CLOUDFLARE_API_TOKEN (recommended) or other standard CLOUDFLARE_* environment variables.

Installation #

dependencies:
  terradart_core: ^0.27.x
  terradart_cloudflare: ^0.27.x

Usage example #

import 'package:terradart_core/terradart_core.dart';
import 'package:terradart_cloudflare/provider.dart';
import 'package:terradart_cloudflare/zone.dart';
import 'package:terradart_cloudflare/dns.dart';

final class EdgeDnsStack extends Stack {
  EdgeDnsStack()
      : super(providers: [const CloudflareProvider()]) {
    final zone = CloudflareZone(
      localName: 'main',
      name: TfArg.literal('example.com'),
      account: ZoneAccount(id: TfArg.literal('your-account-id')),
    );
    add(zone);
    add(
      CloudflareDnsRecord(
        localName: 'api',
        zoneId: TfArg.ref(zone.id),
        name: TfArg.literal('api.example.com'),
        type: TfArg.literal('CNAME'),
        ttl: TfArg.literal(1),
        content: TfArg.literal('ghs.googlehosted.com'),
        proxied: TfArg.literal(true),
      ),
    );
  }
}
// bin/infra.dart
import 'package:my_infra/edge_dns_stack.dart';

Future<void> main() async {
  final stack = EdgeDnsStack();
  await stack.writeTo('tf-out');
}
dart pub get
dart run bin/infra.dart
cd tf-out && terraform init && CLOUDFLARE_API_TOKEN=... terraform apply

Curated surface #

Curated surface is the full cloudflare/cloudflare 5.23.0 catalog: 257 resource factories + 446 data sources (703 catalog entries) across per-service barrels (zone, dns, r2, zero_trust, workers, …). Provider pinned exactly at 5.23.0. Start with examples/cloudflare_dns_quickstart; the rest of the catalog is exercised by examples/cloudflare_leftover_quickstart (synth + terraform validate only).

Generated by the maintainer pipeline (terradart wrap against the pin fixture); do not hand-edit files under lib/src/.

1
likes
0
points
328
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

Curated factory wrappers for Cloudflare resources (official cloudflare/cloudflare Terraform provider) for Dart-first Terraform stacks.

Repository (GitHub)
View/report issues

Topics

#terraform #infrastructure #codegen #cloudflare

License

unknown (license)

Dependencies

meta, terradart_core

More

Packages that depend on terradart_cloudflare