com.pulumi.cloudflare.kotlin.ZeroTrustAccessIdentityProviderArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.ZeroTrustAccessIdentityProviderArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.ZeroTrustAccessIdentityProviderConfigArgs
import com.pulumi.cloudflare.kotlin.inputs.ZeroTrustAccessIdentityProviderConfigArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.ZeroTrustAccessIdentityProviderScimConfigArgs
import com.pulumi.cloudflare.kotlin.inputs.ZeroTrustAccessIdentityProviderScimConfigArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a Cloudflare Access Identity Provider resource. Identity
* Providers are used as an authentication or authorisation source
* within Access.
* > It's required that an `account_id` or `zone_id` is provided and in
* most cases using either is fine. However, if you're using a scoped
* access token, you must provide the argument that matches the token's
* scope. For example, an access token that is scoped to the "example.com"
* zone needs to use the `zone_id` argument.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* // one time pin
* const pinLogin = new cloudflare.ZeroTrustAccessIdentityProvider("pin_login", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "PIN login",
* type: "onetimepin",
* });
* // oauth
* const githubOauth = new cloudflare.ZeroTrustAccessIdentityProvider("github_oauth", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "GitHub OAuth",
* type: "github",
* configs: [{
* clientId: "example",
* clientSecret: "secret_key",
* }],
* });
* // saml
* const jumpcloudSaml = new cloudflare.ZeroTrustAccessIdentityProvider("jumpcloud_saml", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "JumpCloud SAML",
* type: "saml",
* configs: [{
* issuerUrl: "jumpcloud",
* ssoTargetUrl: "https://sso.myexample.jumpcloud.com/saml2/cloudflareaccess",
* attributes: [
* "email",
* "username",
* ],
* signRequest: false,
* idpPublicCert: `MIIDpDCCAoygAwIBAgIGAV2ka+55MA0GCSqGSIb3DQEBCwUAMIGSMQswCQ...GF/Q2/MHadws97cZg
* uTnQyuOqPuHbnN83d/2l1NSYKCbHt24o`,
* }],
* });
* // okta
* const okta = new cloudflare.ZeroTrustAccessIdentityProvider("okta", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "Okta",
* type: "okta",
* configs: [{
* clientId: "example",
* clientSecret: "secret_key",
* apiToken: "okta_api_token",
* oktaAccount: "https://example.com",
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* # one time pin
* pin_login = cloudflare.ZeroTrustAccessIdentityProvider("pin_login",
* account_id="f037e56e89293a057740de681ac9abbe",
* name="PIN login",
* type="onetimepin")
* # oauth
* github_oauth = cloudflare.ZeroTrustAccessIdentityProvider("github_oauth",
* account_id="f037e56e89293a057740de681ac9abbe",
* name="GitHub OAuth",
* type="github",
* configs=[{
* "client_id": "example",
* "client_secret": "secret_key",
* }])
* # saml
* jumpcloud_saml = cloudflare.ZeroTrustAccessIdentityProvider("jumpcloud_saml",
* account_id="f037e56e89293a057740de681ac9abbe",
* name="JumpCloud SAML",
* type="saml",
* configs=[{
* "issuer_url": "jumpcloud",
* "sso_target_url": "https://sso.myexample.jumpcloud.com/saml2/cloudflareaccess",
* "attributes": [
* "email",
* "username",
* ],
* "sign_request": False,
* "idp_public_cert": """MIIDpDCCAoygAwIBAgIGAV2ka+55MA0GCSqGSIb3DQEBCwUAMIGSMQswCQ...GF/Q2/MHadws97cZg
* uTnQyuOqPuHbnN83d/2l1NSYKCbHt24o""",
* }])
* # okta
* okta = cloudflare.ZeroTrustAccessIdentityProvider("okta",
* account_id="f037e56e89293a057740de681ac9abbe",
* name="Okta",
* type="okta",
* configs=[{
* "client_id": "example",
* "client_secret": "secret_key",
* "api_token": "okta_api_token",
* "okta_account": "https://example.com",
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* // one time pin
* var pinLogin = new Cloudflare.ZeroTrustAccessIdentityProvider("pin_login", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "PIN login",
* Type = "onetimepin",
* });
* // oauth
* var githubOauth = new Cloudflare.ZeroTrustAccessIdentityProvider("github_oauth", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "GitHub OAuth",
* Type = "github",
* Configs = new[]
* {
* new Cloudflare.Inputs.ZeroTrustAccessIdentityProviderConfigArgs
* {
* ClientId = "example",
* ClientSecret = "secret_key",
* },
* },
* });
* // saml
* var jumpcloudSaml = new Cloudflare.ZeroTrustAccessIdentityProvider("jumpcloud_saml", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "JumpCloud SAML",
* Type = "saml",
* Configs = new[]
* {
* new Cloudflare.Inputs.ZeroTrustAccessIdentityProviderConfigArgs
* {
* IssuerUrl = "jumpcloud",
* SsoTargetUrl = "https://sso.myexample.jumpcloud.com/saml2/cloudflareaccess",
* Attributes = new[]
* {
* "email",
* "username",
* },
* SignRequest = false,
* IdpPublicCert = @"MIIDpDCCAoygAwIBAgIGAV2ka+55MA0GCSqGSIb3DQEBCwUAMIGSMQswCQ...GF/Q2/MHadws97cZg
* uTnQyuOqPuHbnN83d/2l1NSYKCbHt24o",
* },
* },
* });
* // okta
* var okta = new Cloudflare.ZeroTrustAccessIdentityProvider("okta", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "Okta",
* Type = "okta",
* Configs = new[]
* {
* new Cloudflare.Inputs.ZeroTrustAccessIdentityProviderConfigArgs
* {
* ClientId = "example",
* ClientSecret = "secret_key",
* ApiToken = "okta_api_token",
* OktaAccount = "https://example.com",
* },
* },
* });
* });
* ```
* ```go
* 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 {
* // one time pin
* _, err := cloudflare.NewZeroTrustAccessIdentityProvider(ctx, "pin_login", &cloudflare.ZeroTrustAccessIdentityProviderArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("PIN login"),
* Type: pulumi.String("onetimepin"),
* })
* if err != nil {
* return err
* }
* // oauth
* _, err = cloudflare.NewZeroTrustAccessIdentityProvider(ctx, "github_oauth", &cloudflare.ZeroTrustAccessIdentityProviderArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("GitHub OAuth"),
* Type: pulumi.String("github"),
* Configs: cloudflare.ZeroTrustAccessIdentityProviderConfigArray{
* &cloudflare.ZeroTrustAccessIdentityProviderConfigArgs{
* ClientId: pulumi.String("example"),
* ClientSecret: pulumi.String("secret_key"),
* },
* },
* })
* if err != nil {
* return err
* }
* // saml
* _, err = cloudflare.NewZeroTrustAccessIdentityProvider(ctx, "jumpcloud_saml", &cloudflare.ZeroTrustAccessIdentityProviderArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("JumpCloud SAML"),
* Type: pulumi.String("saml"),
* Configs: cloudflare.ZeroTrustAccessIdentityProviderConfigArray{
* &cloudflare.ZeroTrustAccessIdentityProviderConfigArgs{
* IssuerUrl: pulumi.String("jumpcloud"),
* SsoTargetUrl: pulumi.String("https://sso.myexample.jumpcloud.com/saml2/cloudflareaccess"),
* Attributes: pulumi.StringArray{
* pulumi.String("email"),
* pulumi.String("username"),
* },
* SignRequest: pulumi.Bool(false),
* IdpPublicCert: pulumi.String("MIIDpDCCAoygAwIBAgIGAV2ka+55MA0GCSqGSIb3DQEBCwUAMIGSMQswCQ...GF/Q2/MHadws97cZg\nuTnQyuOqPuHbnN83d/2l1NSYKCbHt24o"),
* },
* },
* })
* if err != nil {
* return err
* }
* // okta
* _, err = cloudflare.NewZeroTrustAccessIdentityProvider(ctx, "okta", &cloudflare.ZeroTrustAccessIdentityProviderArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("Okta"),
* Type: pulumi.String("okta"),
* Configs: cloudflare.ZeroTrustAccessIdentityProviderConfigArray{
* &cloudflare.ZeroTrustAccessIdentityProviderConfigArgs{
* ClientId: pulumi.String("example"),
* ClientSecret: pulumi.String("secret_key"),
* ApiToken: pulumi.String("okta_api_token"),
* OktaAccount: pulumi.String("https://example.com"),
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.ZeroTrustAccessIdentityProvider;
* import com.pulumi.cloudflare.ZeroTrustAccessIdentityProviderArgs;
* import com.pulumi.cloudflare.inputs.ZeroTrustAccessIdentityProviderConfigArgs;
* 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) {
* // one time pin
* var pinLogin = new ZeroTrustAccessIdentityProvider("pinLogin", ZeroTrustAccessIdentityProviderArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("PIN login")
* .type("onetimepin")
* .build());
* // oauth
* var githubOauth = new ZeroTrustAccessIdentityProvider("githubOauth", ZeroTrustAccessIdentityProviderArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("GitHub OAuth")
* .type("github")
* .configs(ZeroTrustAccessIdentityProviderConfigArgs.builder()
* .clientId("example")
* .clientSecret("secret_key")
* .build())
* .build());
* // saml
* var jumpcloudSaml = new ZeroTrustAccessIdentityProvider("jumpcloudSaml", ZeroTrustAccessIdentityProviderArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("JumpCloud SAML")
* .type("saml")
* .configs(ZeroTrustAccessIdentityProviderConfigArgs.builder()
* .issuerUrl("jumpcloud")
* .ssoTargetUrl("https://sso.myexample.jumpcloud.com/saml2/cloudflareaccess")
* .attributes(
* "email",
* "username")
* .signRequest(false)
* .idpPublicCert("""
* MIIDpDCCAoygAwIBAgIGAV2ka+55MA0GCSqGSIb3DQEBCwUAMIGSMQswCQ...GF/Q2/MHadws97cZg
* uTnQyuOqPuHbnN83d/2l1NSYKCbHt24o """)
* .build())
* .build());
* // okta
* var okta = new ZeroTrustAccessIdentityProvider("okta", ZeroTrustAccessIdentityProviderArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("Okta")
* .type("okta")
* .configs(ZeroTrustAccessIdentityProviderConfigArgs.builder()
* .clientId("example")
* .clientSecret("secret_key")
* .apiToken("okta_api_token")
* .oktaAccount("https://example.com")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* # one time pin
* pinLogin:
* type: cloudflare:ZeroTrustAccessIdentityProvider
* name: pin_login
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* name: PIN login
* type: onetimepin
* # oauth
* githubOauth:
* type: cloudflare:ZeroTrustAccessIdentityProvider
* name: github_oauth
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* name: GitHub OAuth
* type: github
* configs:
* - clientId: example
* clientSecret: secret_key
* # saml
* jumpcloudSaml:
* type: cloudflare:ZeroTrustAccessIdentityProvider
* name: jumpcloud_saml
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* name: JumpCloud SAML
* type: saml
* configs:
* - issuerUrl: jumpcloud
* ssoTargetUrl: https://sso.myexample.jumpcloud.com/saml2/cloudflareaccess
* attributes:
* - email
* - username
* signRequest: false
* idpPublicCert: |-
* MIIDpDCCAoygAwIBAgIGAV2ka+55MA0GCSqGSIb3DQEBCwUAMIGSMQswCQ...GF/Q2/MHadws97cZg
* uTnQyuOqPuHbnN83d/2l1NSYKCbHt24o
* # okta
* okta:
* type: cloudflare:ZeroTrustAccessIdentityProvider
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* name: Okta
* type: okta
* configs:
* - clientId: example
* clientSecret: secret_key
* apiToken: okta_api_token
* oktaAccount: https://example.com
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/zeroTrustAccessIdentityProvider:ZeroTrustAccessIdentityProvider example /
* ```
* @property accountId The account identifier to target for the resource. Conflicts with `zone_id`. **Modifying this attribute will force creation of a new resource.**
* @property configs Provider configuration from the [developer documentation](https://developers.cloudflare.com/access/configuring-identity-providers/).
* @property name Friendly name of the Access Identity Provider configuration.
* @property scimConfigs Configuration for SCIM settings for a given IDP.
* @property type The provider type to use. Available values: `azureAD`, `centrify`, `facebook`, `github`, `google`, `google-apps`, `linkedin`, `oidc`, `okta`, `onelogin`, `onetimepin`, `pingone`, `saml`, `yandex`.
* @property zoneId The zone identifier to target for the resource. Conflicts with `account_id`. **Modifying this attribute will force creation of a new resource.**
*/
public data class ZeroTrustAccessIdentityProviderArgs(
public val accountId: Output? = null,
public val configs: Output>? = null,
public val name: Output? = null,
public val scimConfigs: Output>? = null,
public val type: Output? = null,
public val zoneId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.ZeroTrustAccessIdentityProviderArgs =
com.pulumi.cloudflare.ZeroTrustAccessIdentityProviderArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.configs(
configs?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.name(name?.applyValue({ args0 -> args0 }))
.scimConfigs(
scimConfigs?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.type(type?.applyValue({ args0 -> args0 }))
.zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ZeroTrustAccessIdentityProviderArgs].
*/
@PulumiTagMarker
public class ZeroTrustAccessIdentityProviderArgsBuilder internal constructor() {
private var accountId: Output? = null
private var configs: Output>? = null
private var name: Output? = null
private var scimConfigs: Output>? = null
private var type: Output? = null
private var zoneId: Output? = null
/**
* @param value The account identifier to target for the resource. Conflicts with `zone_id`. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("fpkcnxvwnxbiusoh")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value Provider configuration from the [developer documentation](https://developers.cloudflare.com/access/configuring-identity-providers/).
*/
@JvmName("uhllivbedomawiqs")
public suspend fun configs(`value`: Output>) {
this.configs = value
}
@JvmName("ncpxllghxrvjuvaf")
public suspend fun configs(vararg values: Output) {
this.configs = Output.all(values.asList())
}
/**
* @param values Provider configuration from the [developer documentation](https://developers.cloudflare.com/access/configuring-identity-providers/).
*/
@JvmName("xspqwousnrfoytel")
public suspend fun configs(values: List