cloudflare.ZeroTrustAccessMtlsHostnameSettings
Explore with Pulumi AI
Provides a Cloudflare Access Mutual TLS Certificate Settings resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = new cloudflare.ZeroTrustAccessMtlsHostnameSettings("example", {
zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
settings: [{
hostname: "example.com",
clientCertificateForwarding: true,
chinaNetwork: false,
}],
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.ZeroTrustAccessMtlsHostnameSettings("example",
zone_id="0da42c8d2132a9ddaf714f9e7c920711",
settings=[{
"hostname": "example.com",
"client_certificate_forwarding": True,
"china_network": False,
}])
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.NewZeroTrustAccessMtlsHostnameSettings(ctx, "example", &cloudflare.ZeroTrustAccessMtlsHostnameSettingsArgs{
ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
Settings: cloudflare.ZeroTrustAccessMtlsHostnameSettingsSettingArray{
&cloudflare.ZeroTrustAccessMtlsHostnameSettingsSettingArgs{
Hostname: pulumi.String("example.com"),
ClientCertificateForwarding: pulumi.Bool(true),
ChinaNetwork: pulumi.Bool(false),
},
},
})
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.ZeroTrustAccessMtlsHostnameSettings("example", new()
{
ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
Settings = new[]
{
new Cloudflare.Inputs.ZeroTrustAccessMtlsHostnameSettingsSettingArgs
{
Hostname = "example.com",
ClientCertificateForwarding = true,
ChinaNetwork = false,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustAccessMtlsHostnameSettings;
import com.pulumi.cloudflare.ZeroTrustAccessMtlsHostnameSettingsArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustAccessMtlsHostnameSettingsSettingArgs;
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 ZeroTrustAccessMtlsHostnameSettings("example", ZeroTrustAccessMtlsHostnameSettingsArgs.builder()
.zoneId("0da42c8d2132a9ddaf714f9e7c920711")
.settings(ZeroTrustAccessMtlsHostnameSettingsSettingArgs.builder()
.hostname("example.com")
.clientCertificateForwarding(true)
.chinaNetwork(false)
.build())
.build());
}
}
resources:
example:
type: cloudflare:ZeroTrustAccessMtlsHostnameSettings
properties:
zoneId: 0da42c8d2132a9ddaf714f9e7c920711
settings:
- hostname: example.com
clientCertificateForwarding: true
chinaNetwork: false
Create ZeroTrustAccessMtlsHostnameSettings Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZeroTrustAccessMtlsHostnameSettings(name: string, args?: ZeroTrustAccessMtlsHostnameSettingsArgs, opts?: CustomResourceOptions);
@overload
def ZeroTrustAccessMtlsHostnameSettings(resource_name: str,
args: Optional[ZeroTrustAccessMtlsHostnameSettingsArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ZeroTrustAccessMtlsHostnameSettings(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
settings: Optional[Sequence[ZeroTrustAccessMtlsHostnameSettingsSettingArgs]] = None,
zone_id: Optional[str] = None)
func NewZeroTrustAccessMtlsHostnameSettings(ctx *Context, name string, args *ZeroTrustAccessMtlsHostnameSettingsArgs, opts ...ResourceOption) (*ZeroTrustAccessMtlsHostnameSettings, error)
public ZeroTrustAccessMtlsHostnameSettings(string name, ZeroTrustAccessMtlsHostnameSettingsArgs? args = null, CustomResourceOptions? opts = null)
public ZeroTrustAccessMtlsHostnameSettings(String name, ZeroTrustAccessMtlsHostnameSettingsArgs args)
public ZeroTrustAccessMtlsHostnameSettings(String name, ZeroTrustAccessMtlsHostnameSettingsArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustAccessMtlsHostnameSettings
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 ZeroTrustAccessMtlsHostnameSettingsArgs
- 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 ZeroTrustAccessMtlsHostnameSettingsArgs
- 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 ZeroTrustAccessMtlsHostnameSettingsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZeroTrustAccessMtlsHostnameSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZeroTrustAccessMtlsHostnameSettingsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var zeroTrustAccessMtlsHostnameSettingsResource = new Cloudflare.ZeroTrustAccessMtlsHostnameSettings("zeroTrustAccessMtlsHostnameSettingsResource", new()
{
AccountId = "string",
Settings = new[]
{
new Cloudflare.Inputs.ZeroTrustAccessMtlsHostnameSettingsSettingArgs
{
Hostname = "string",
ChinaNetwork = false,
ClientCertificateForwarding = false,
},
},
ZoneId = "string",
});
example, err := cloudflare.NewZeroTrustAccessMtlsHostnameSettings(ctx, "zeroTrustAccessMtlsHostnameSettingsResource", &cloudflare.ZeroTrustAccessMtlsHostnameSettingsArgs{
AccountId: pulumi.String("string"),
Settings: cloudflare.ZeroTrustAccessMtlsHostnameSettingsSettingArray{
&cloudflare.ZeroTrustAccessMtlsHostnameSettingsSettingArgs{
Hostname: pulumi.String("string"),
ChinaNetwork: pulumi.Bool(false),
ClientCertificateForwarding: pulumi.Bool(false),
},
},
ZoneId: pulumi.String("string"),
})
var zeroTrustAccessMtlsHostnameSettingsResource = new ZeroTrustAccessMtlsHostnameSettings("zeroTrustAccessMtlsHostnameSettingsResource", ZeroTrustAccessMtlsHostnameSettingsArgs.builder()
.accountId("string")
.settings(ZeroTrustAccessMtlsHostnameSettingsSettingArgs.builder()
.hostname("string")
.chinaNetwork(false)
.clientCertificateForwarding(false)
.build())
.zoneId("string")
.build());
zero_trust_access_mtls_hostname_settings_resource = cloudflare.ZeroTrustAccessMtlsHostnameSettings("zeroTrustAccessMtlsHostnameSettingsResource",
account_id="string",
settings=[{
"hostname": "string",
"china_network": False,
"client_certificate_forwarding": False,
}],
zone_id="string")
const zeroTrustAccessMtlsHostnameSettingsResource = new cloudflare.ZeroTrustAccessMtlsHostnameSettings("zeroTrustAccessMtlsHostnameSettingsResource", {
accountId: "string",
settings: [{
hostname: "string",
chinaNetwork: false,
clientCertificateForwarding: false,
}],
zoneId: "string",
});
type: cloudflare:ZeroTrustAccessMtlsHostnameSettings
properties:
accountId: string
settings:
- chinaNetwork: false
clientCertificateForwarding: false
hostname: string
zoneId: string
ZeroTrustAccessMtlsHostnameSettings Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ZeroTrustAccessMtlsHostnameSettings resource accepts the following input properties:
- Account
Id string - The account identifier to target for the resource.
- Settings
List<Zero
Trust Access Mtls Hostname Settings Setting> - Zone
Id string - The zone identifier to target for the resource.
- Account
Id string - The account identifier to target for the resource.
- Settings
[]Zero
Trust Access Mtls Hostname Settings Setting Args - Zone
Id string - The zone identifier to target for the resource.
- account
Id String - The account identifier to target for the resource.
- settings
List<Zero
Trust Access Mtls Hostname Settings Setting> - zone
Id String - The zone identifier to target for the resource.
- account
Id string - The account identifier to target for the resource.
- settings
Zero
Trust Access Mtls Hostname Settings Setting[] - zone
Id string - The zone identifier to target for the resource.
- account_
id str - The account identifier to target for the resource.
- settings
Sequence[Zero
Trust Access Mtls Hostname Settings Setting Args] - zone_
id str - The zone identifier to target for the resource.
- account
Id String - The account identifier to target for the resource.
- settings List<Property Map>
- zone
Id String - The zone identifier to target for the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ZeroTrustAccessMtlsHostnameSettings resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ZeroTrustAccessMtlsHostnameSettings Resource
Get an existing ZeroTrustAccessMtlsHostnameSettings 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?: ZeroTrustAccessMtlsHostnameSettingsState, opts?: CustomResourceOptions): ZeroTrustAccessMtlsHostnameSettings
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
settings: Optional[Sequence[ZeroTrustAccessMtlsHostnameSettingsSettingArgs]] = None,
zone_id: Optional[str] = None) -> ZeroTrustAccessMtlsHostnameSettings
func GetZeroTrustAccessMtlsHostnameSettings(ctx *Context, name string, id IDInput, state *ZeroTrustAccessMtlsHostnameSettingsState, opts ...ResourceOption) (*ZeroTrustAccessMtlsHostnameSettings, error)
public static ZeroTrustAccessMtlsHostnameSettings Get(string name, Input<string> id, ZeroTrustAccessMtlsHostnameSettingsState? state, CustomResourceOptions? opts = null)
public static ZeroTrustAccessMtlsHostnameSettings get(String name, Output<String> id, ZeroTrustAccessMtlsHostnameSettingsState 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.
- Account
Id string - The account identifier to target for the resource.
- Settings
List<Zero
Trust Access Mtls Hostname Settings Setting> - Zone
Id string - The zone identifier to target for the resource.
- Account
Id string - The account identifier to target for the resource.
- Settings
[]Zero
Trust Access Mtls Hostname Settings Setting Args - Zone
Id string - The zone identifier to target for the resource.
- account
Id String - The account identifier to target for the resource.
- settings
List<Zero
Trust Access Mtls Hostname Settings Setting> - zone
Id String - The zone identifier to target for the resource.
- account
Id string - The account identifier to target for the resource.
- settings
Zero
Trust Access Mtls Hostname Settings Setting[] - zone
Id string - The zone identifier to target for the resource.
- account_
id str - The account identifier to target for the resource.
- settings
Sequence[Zero
Trust Access Mtls Hostname Settings Setting Args] - zone_
id str - The zone identifier to target for the resource.
- account
Id String - The account identifier to target for the resource.
- settings List<Property Map>
- zone
Id String - The zone identifier to target for the resource.
Supporting Types
ZeroTrustAccessMtlsHostnameSettingsSetting, ZeroTrustAccessMtlsHostnameSettingsSettingArgs
- Hostname string
- The hostname that these settings apply to.
- China
Network bool - Request client certificates for this hostname in China. Can only be set to true if this zone is china network enabled.
- Client
Certificate boolForwarding - Client Certificate Forwarding is a feature that takes the client cert provided by the eyeball to the edge, and forwards it to the origin as a HTTP header to allow logging on the origin.
- Hostname string
- The hostname that these settings apply to.
- China
Network bool - Request client certificates for this hostname in China. Can only be set to true if this zone is china network enabled.
- Client
Certificate boolForwarding - Client Certificate Forwarding is a feature that takes the client cert provided by the eyeball to the edge, and forwards it to the origin as a HTTP header to allow logging on the origin.
- hostname String
- The hostname that these settings apply to.
- china
Network Boolean - Request client certificates for this hostname in China. Can only be set to true if this zone is china network enabled.
- client
Certificate BooleanForwarding - Client Certificate Forwarding is a feature that takes the client cert provided by the eyeball to the edge, and forwards it to the origin as a HTTP header to allow logging on the origin.
- hostname string
- The hostname that these settings apply to.
- china
Network boolean - Request client certificates for this hostname in China. Can only be set to true if this zone is china network enabled.
- client
Certificate booleanForwarding - Client Certificate Forwarding is a feature that takes the client cert provided by the eyeball to the edge, and forwards it to the origin as a HTTP header to allow logging on the origin.
- hostname str
- The hostname that these settings apply to.
- china_
network bool - Request client certificates for this hostname in China. Can only be set to true if this zone is china network enabled.
- client_
certificate_ boolforwarding - Client Certificate Forwarding is a feature that takes the client cert provided by the eyeball to the edge, and forwards it to the origin as a HTTP header to allow logging on the origin.
- hostname String
- The hostname that these settings apply to.
- china
Network Boolean - Request client certificates for this hostname in China. Can only be set to true if this zone is china network enabled.
- client
Certificate BooleanForwarding - Client Certificate Forwarding is a feature that takes the client cert provided by the eyeball to the edge, and forwards it to the origin as a HTTP header to allow logging on the origin.
Import
Account level mTLS hostname settings import.
$ pulumi import cloudflare:index/zeroTrustAccessMtlsHostnameSettings:ZeroTrustAccessMtlsHostnameSettings example account/<account_id>
Zone level mTLS hostname settings import.
$ pulumi import cloudflare:index/zeroTrustAccessMtlsHostnameSettings:ZeroTrustAccessMtlsHostnameSettings example zone/<zone_id>
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.