import * as pulumi from "@pulumi/pulumi"; /** * > If using the `sslRecommender` zone setting, use the `enabled` attribute instead of `value`. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * // Basic on/off setting * const alwaysOnline = new cloudflare.ZoneSetting("always_online", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "always_online", * value: "on", * }); * // String value with specific choices * const minTlsVersion = new cloudflare.ZoneSetting("min_tls_version", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "min_tls_version", * value: "1.2", * }); * // Numeric value * const browserCacheTtl = new cloudflare.ZoneSetting("browser_cache_ttl", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "browser_cache_ttl", * value: 14400, * }); * // Array/List value * const ciphers = new cloudflare.ZoneSetting("ciphers", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "ciphers", * value: [ * "ECDHE-ECDSA-AES128-GCM-SHA256", * "ECDHE-ECDSA-CHACHA20-POLY1305", * ], * }); * // Nested object value * const securityHeader = new cloudflare.ZoneSetting("security_header", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "security_header", * value: { * strictTransportSecurity: { * enabled: true, * includeSubdomains: true, * maxAge: 86400, * nosniff: true, * preload: false, * }, * }, * }); * // Special case: ssl_recommender uses 'enabled' instead of 'value' * const sslRecommender = new cloudflare.ZoneSetting("ssl_recommender", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "ssl_recommender", * enabled: true, * }); * ``` * * ### Additional Examples * * ### String Value with Choices * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * // Minimum TLS Version * const minTls = new cloudflare.ZoneSetting("min_tls", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "min_tls_version", * value: "1.2", * }); * // SSL/TLS Mode * const ssl = new cloudflare.ZoneSetting("ssl", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "ssl", * value: "strict", * }); * // Security Level * const securityLevel = new cloudflare.ZoneSetting("security_level", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "security_level", * value: "medium", * }); * // Cache Level * const cacheLevel = new cloudflare.ZoneSetting("cache_level", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "cache_level", * value: "aggressive", * }); * ``` * * ### Numeric Values * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * // Browser Cache TTL * const browserCacheTtl = new cloudflare.ZoneSetting("browser_cache_ttl", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "browser_cache_ttl", * value: 14400, * }); * // Challenge TTL * const challengeTtl = new cloudflare.ZoneSetting("challenge_ttl", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "challenge_ttl", * value: 1800, * }); * // Max Upload Size * const maxUpload = new cloudflare.ZoneSetting("max_upload", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "max_upload", * value: 100, * }); * ``` * * ### Special Cases * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * // 0-RTT (Zero Round Trip Time) * const zeroRtt = new cloudflare.ZoneSetting("zero_rtt", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "0rtt", * value: "on", * }); * // Network Error Logging (NEL) * const nel = new cloudflare.ZoneSetting("nel", { * zoneId: "023e105f4ecef8ad9ca31a8372d0c353", * settingId: "nel", * value: { * enabled: true, * }, * }); * ``` * * ### Common Configuration Sets * * ### Security Hardening Configuration * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * // Enable HTTPS everywhere * const alwaysUseHttps = new cloudflare.ZoneSetting("always_use_https", { * zoneId: zoneId, * settingId: "always_use_https", * value: "on", * }); * // Automatic HTTPS Rewrites * const automaticHttpsRewrites = new cloudflare.ZoneSetting("automatic_https_rewrites", { * zoneId: zoneId, * settingId: "automatic_https_rewrites", * value: "on", * }); * // Minimum TLS 1.2 * const minTlsVersion = new cloudflare.ZoneSetting("min_tls_version", { * zoneId: zoneId, * settingId: "min_tls_version", * value: "1.2", * }); * // Enable TLS 1.3 * const tls13 = new cloudflare.ZoneSetting("tls_1_3", { * zoneId: zoneId, * settingId: "tls_1_3", * value: "on", * }); * // Strict SSL * const ssl = new cloudflare.ZoneSetting("ssl", { * zoneId: zoneId, * settingId: "ssl", * value: "strict", * }); * ``` * * ### Performance Optimization Configuration * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * // Enable HTTP/3 * const http3 = new cloudflare.ZoneSetting("http3", { * zoneId: zoneId, * settingId: "http3", * value: "on", * }); * // Enable Brotli Compression * const brotli = new cloudflare.ZoneSetting("brotli", { * zoneId: zoneId, * settingId: "brotli", * value: "on", * }); * // Early Hints * const earlyHints = new cloudflare.ZoneSetting("early_hints", { * zoneId: zoneId, * settingId: "early_hints", * value: "on", * }); * // Aggressive Caching * const cacheLevel = new cloudflare.ZoneSetting("cache_level", { * zoneId: zoneId, * settingId: "cache_level", * value: "aggressive", * }); * // Browser Cache TTL * const browserCache = new cloudflare.ZoneSetting("browser_cache", { * zoneId: zoneId, * settingId: "browser_cache_ttl", * value: 14400, * }); * ``` * * ## Import * * ```sh * $ pulumi import cloudflare:index/zoneSetting:ZoneSetting example '/' * ``` */ export declare class ZoneSetting extends pulumi.CustomResource { /** * Get an existing ZoneSetting resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ZoneSettingState, opts?: pulumi.CustomResourceOptions): ZoneSetting; /** * Returns true if the given object is an instance of ZoneSetting. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ZoneSetting; /** * Whether or not this setting can be modified for this zone (based on your Cloudflare plan level). */ readonly editable: pulumi.Output; /** * ssl-recommender enrollment setting. */ readonly enabled: pulumi.Output; /** * last time this setting was modified. */ readonly modifiedOn: pulumi.Output; /** * Setting name */ readonly settingId: pulumi.Output; /** * Value of the zone setting. * Notes: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is false. */ readonly timeRemaining: pulumi.Output; /** * Current value of the zone setting. */ readonly value: pulumi.Output; /** * Identifier */ readonly zoneId: pulumi.Output; /** * Create a ZoneSetting resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ZoneSettingArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ZoneSetting resources. */ export interface ZoneSettingState { /** * Whether or not this setting can be modified for this zone (based on your Cloudflare plan level). */ editable?: pulumi.Input; /** * ssl-recommender enrollment setting. */ enabled?: pulumi.Input; /** * last time this setting was modified. */ modifiedOn?: pulumi.Input; /** * Setting name */ settingId?: pulumi.Input; /** * Value of the zone setting. * Notes: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is false. */ timeRemaining?: pulumi.Input; /** * Current value of the zone setting. */ value?: any; /** * Identifier */ zoneId?: pulumi.Input; } /** * The set of arguments for constructing a ZoneSetting resource. */ export interface ZoneSettingArgs { /** * ssl-recommender enrollment setting. */ enabled?: pulumi.Input; /** * Setting name */ settingId: pulumi.Input; /** * Current value of the zone setting. */ value: any; /** * Identifier */ zoneId: pulumi.Input; }