1. Packages
  2. Cloudflare
  3. API Docs
  4. HostnameTlsSetting
Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi

cloudflare.HostnameTlsSetting

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a Cloudflare per-hostname TLS setting resource. Used to set TLS settings for hostnames under the specified zone.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const example = new cloudflare.HostnameTlsSetting("example", {
        hostname: "sub.example.com",
        setting: "min_tls_version",
        value: "1.2",
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.HostnameTlsSetting("example",
        hostname="sub.example.com",
        setting="min_tls_version",
        value="1.2",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewHostnameTlsSetting(ctx, "example", &cloudflare.HostnameTlsSettingArgs{
    			Hostname: pulumi.String("sub.example.com"),
    			Setting:  pulumi.String("min_tls_version"),
    			Value:    pulumi.String("1.2"),
    			ZoneId:   pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Cloudflare.HostnameTlsSetting("example", new()
        {
            Hostname = "sub.example.com",
            Setting = "min_tls_version",
            Value = "1.2",
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.HostnameTlsSetting;
    import com.pulumi.cloudflare.HostnameTlsSettingArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new HostnameTlsSetting("example", HostnameTlsSettingArgs.builder()        
                .hostname("sub.example.com")
                .setting("min_tls_version")
                .value("1.2")
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:HostnameTlsSetting
        properties:
          hostname: sub.example.com
          setting: min_tls_version
          value: '1.2'
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
    

    Create HostnameTlsSetting Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new HostnameTlsSetting(name: string, args: HostnameTlsSettingArgs, opts?: CustomResourceOptions);
    @overload
    def HostnameTlsSetting(resource_name: str,
                           args: HostnameTlsSettingArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def HostnameTlsSetting(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           hostname: Optional[str] = None,
                           setting: Optional[str] = None,
                           value: Optional[str] = None,
                           zone_id: Optional[str] = None)
    func NewHostnameTlsSetting(ctx *Context, name string, args HostnameTlsSettingArgs, opts ...ResourceOption) (*HostnameTlsSetting, error)
    public HostnameTlsSetting(string name, HostnameTlsSettingArgs args, CustomResourceOptions? opts = null)
    public HostnameTlsSetting(String name, HostnameTlsSettingArgs args)
    public HostnameTlsSetting(String name, HostnameTlsSettingArgs args, CustomResourceOptions options)
    
    type: cloudflare:HostnameTlsSetting
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args HostnameTlsSettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args HostnameTlsSettingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args HostnameTlsSettingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args HostnameTlsSettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args HostnameTlsSettingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var hostnameTlsSettingResource = new Cloudflare.HostnameTlsSetting("hostnameTlsSettingResource", new()
    {
        Hostname = "string",
        Setting = "string",
        Value = "string",
        ZoneId = "string",
    });
    
    example, err := cloudflare.NewHostnameTlsSetting(ctx, "hostnameTlsSettingResource", &cloudflare.HostnameTlsSettingArgs{
    	Hostname: pulumi.String("string"),
    	Setting:  pulumi.String("string"),
    	Value:    pulumi.String("string"),
    	ZoneId:   pulumi.String("string"),
    })
    
    var hostnameTlsSettingResource = new HostnameTlsSetting("hostnameTlsSettingResource", HostnameTlsSettingArgs.builder()        
        .hostname("string")
        .setting("string")
        .value("string")
        .zoneId("string")
        .build());
    
    hostname_tls_setting_resource = cloudflare.HostnameTlsSetting("hostnameTlsSettingResource",
        hostname="string",
        setting="string",
        value="string",
        zone_id="string")
    
    const hostnameTlsSettingResource = new cloudflare.HostnameTlsSetting("hostnameTlsSettingResource", {
        hostname: "string",
        setting: "string",
        value: "string",
        zoneId: "string",
    });
    
    type: cloudflare:HostnameTlsSetting
    properties:
        hostname: string
        setting: string
        value: string
        zoneId: string
    

    HostnameTlsSetting Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The HostnameTlsSetting resource accepts the following input properties:

    Hostname string
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    Setting string
    TLS setting name. Modifying this attribute will force creation of a new resource.
    Value string
    TLS setting value.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    Hostname string
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    Setting string
    TLS setting name. Modifying this attribute will force creation of a new resource.
    Value string
    TLS setting value.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    hostname String
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    setting String
    TLS setting name. Modifying this attribute will force creation of a new resource.
    value String
    TLS setting value.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    hostname string
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    setting string
    TLS setting name. Modifying this attribute will force creation of a new resource.
    value string
    TLS setting value.
    zoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    hostname str
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    setting str
    TLS setting name. Modifying this attribute will force creation of a new resource.
    value str
    TLS setting value.
    zone_id str
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    hostname String
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    setting String
    TLS setting name. Modifying this attribute will force creation of a new resource.
    value String
    TLS setting value.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the HostnameTlsSetting resource produces the following output properties:

    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    createdAt string
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    created_at str
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String

    Look up Existing HostnameTlsSetting Resource

    Get an existing HostnameTlsSetting resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: HostnameTlsSettingState, opts?: CustomResourceOptions): HostnameTlsSetting
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            hostname: Optional[str] = None,
            setting: Optional[str] = None,
            updated_at: Optional[str] = None,
            value: Optional[str] = None,
            zone_id: Optional[str] = None) -> HostnameTlsSetting
    func GetHostnameTlsSetting(ctx *Context, name string, id IDInput, state *HostnameTlsSettingState, opts ...ResourceOption) (*HostnameTlsSetting, error)
    public static HostnameTlsSetting Get(string name, Input<string> id, HostnameTlsSettingState? state, CustomResourceOptions? opts = null)
    public static HostnameTlsSetting get(String name, Output<String> id, HostnameTlsSettingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedAt string
    Hostname string
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    Setting string
    TLS setting name. Modifying this attribute will force creation of a new resource.
    UpdatedAt string
    Value string
    TLS setting value.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    CreatedAt string
    Hostname string
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    Setting string
    TLS setting name. Modifying this attribute will force creation of a new resource.
    UpdatedAt string
    Value string
    TLS setting value.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    createdAt String
    hostname String
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    setting String
    TLS setting name. Modifying this attribute will force creation of a new resource.
    updatedAt String
    value String
    TLS setting value.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    createdAt string
    hostname string
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    setting string
    TLS setting name. Modifying this attribute will force creation of a new resource.
    updatedAt string
    value string
    TLS setting value.
    zoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    created_at str
    hostname str
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    setting str
    TLS setting name. Modifying this attribute will force creation of a new resource.
    updated_at str
    value str
    TLS setting value.
    zone_id str
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    createdAt String
    hostname String
    Hostname that belongs to this zone name. Modifying this attribute will force creation of a new resource.
    setting String
    TLS setting name. Modifying this attribute will force creation of a new resource.
    updatedAt String
    value String
    TLS setting value.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.

    Import

    $ pulumi import cloudflare:index/hostnameTlsSetting:HostnameTlsSetting example <zone_id>/<hostname>/<setting_name>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi