Cloudflare

v4.12.1 published on Thursday, Sep 22, 2022 by Pulumi

The Cloudflare provider for Pulumi can be used to provision any of the resources available in Cloudflare.

Example

const cloudflare = require("@pulumi/cloudflare")

const record = new cloudflare.Record("sample-record", {
  name: "my-record",
  zoneId: "xxsdfhsfkashadf",
  type: "A",
  value: "192.168.0.11",
  ttl: 3600
});
import * as cloudflare from "@pulumi/cloudflare";

const record = new cloudflare.Record("sample-record", {
  name: "my-record",
  zoneId: "xxsdfhsfkashadf",
  type: "A",
  value: "192.168.0.11",
  ttl: 3600
});
import pulumi_cloudflare as cloudflare

record = cloudflare.Record("sample-record",
  name="my-record",
  zone_id="xxsdfhsfkashadf",
  type="A",
  value="192.168.0.11",
  ttl=3600
)
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	cloudflare "github.com/pulumi/pulumi-cloudflare/sdk/v3/go/cloudflare"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		record, err := cloudflare.NewRecord(ctx, "sample-record", &cloudflare.RecordArgs{
			Name:   pulumi.String("my-record"),
			ZoneId: pulumi.String("xxsdfhsfkashadf"),
			Type:   pulumi.String("A"),
			Value:  pulumi.String("192.168.0.11"),
			Ttl:    pulumi.Int(3600),
		})
		if err != nil {
			return err
		}

		return nil
	})
}
using System.Collections.Generic;
using System.Threading.Tasks;
using Pulumi;
using Pulumi.Cloudflare;

await Deployment.RunAsync(() =>
{
  var record = new Cloudflare.Record("sample-record", new Cloudflare.RecordArgs
  {
    Name = "my-record",
    ZoneId = "xxsdfhsfkashadf",
    Type = "A",
    Value = "192.168.0.11",
    Ttl = 3600,
  });
});