terradart_cloudflare 0.25.3 copy "terradart_cloudflare: ^0.25.3" to clipboard
terradart_cloudflare: ^0.25.3 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.)

Curated factories are demand-driven and added on request — if you need a resource that is not wrapped yet, 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.25.x
  terradart_cloudflare: ^0.25.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: TfArg.literal({'id': '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 includes cloudflare_zone (zone barrel) and cloudflare_dns_record (dns barrel). Provider pinned at 5.23.0 (exact).

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

1
likes
0
points
409
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