com.pulumi.cloudflare.kotlin.AddressMapArgs.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.AddressMapArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.AddressMapIpArgs
import com.pulumi.cloudflare.kotlin.inputs.AddressMapIpArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.AddressMapMembershipArgs
import com.pulumi.cloudflare.kotlin.inputs.AddressMapMembershipArgsBuilder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides the ability to manage IP addresses that can be used by DNS records when
* they are proxied through Cloudflare.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.AddressMap("example", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* description: "My address map",
* defaultSni: "*.example.com",
* enabled: true,
* ips: [
* {
* ip: "192.0.2.1",
* },
* {
* ip: "203.0.113.1",
* },
* ],
* memberships: [
* {
* identifier: "92f17202ed8bd63d69a66b86a49a8f6b",
* kind: "account",
* },
* {
* identifier: "023e105f4ecef8ad9ca31a8372d0c353",
* kind: "zone",
* },
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.AddressMap("example",
* account_id="f037e56e89293a057740de681ac9abbe",
* description="My address map",
* default_sni="*.example.com",
* enabled=True,
* ips=[
* {
* "ip": "192.0.2.1",
* },
* {
* "ip": "203.0.113.1",
* },
* ],
* memberships=[
* {
* "identifier": "92f17202ed8bd63d69a66b86a49a8f6b",
* "kind": "account",
* },
* {
* "identifier": "023e105f4ecef8ad9ca31a8372d0c353",
* "kind": "zone",
* },
* ])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.AddressMap("example", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Description = "My address map",
* DefaultSni = "*.example.com",
* Enabled = true,
* Ips = new[]
* {
* new Cloudflare.Inputs.AddressMapIpArgs
* {
* Ip = "192.0.2.1",
* },
* new Cloudflare.Inputs.AddressMapIpArgs
* {
* Ip = "203.0.113.1",
* },
* },
* Memberships = new[]
* {
* new Cloudflare.Inputs.AddressMapMembershipArgs
* {
* Identifier = "92f17202ed8bd63d69a66b86a49a8f6b",
* Kind = "account",
* },
* new Cloudflare.Inputs.AddressMapMembershipArgs
* {
* Identifier = "023e105f4ecef8ad9ca31a8372d0c353",
* Kind = "zone",
* },
* },
* });
* });
* ```
* ```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 {
* _, err := cloudflare.NewAddressMap(ctx, "example", &cloudflare.AddressMapArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Description: pulumi.String("My address map"),
* DefaultSni: pulumi.String("*.example.com"),
* Enabled: pulumi.Bool(true),
* Ips: cloudflare.AddressMapIpArray{
* &cloudflare.AddressMapIpArgs{
* Ip: pulumi.String("192.0.2.1"),
* },
* &cloudflare.AddressMapIpArgs{
* Ip: pulumi.String("203.0.113.1"),
* },
* },
* Memberships: cloudflare.AddressMapMembershipArray{
* &cloudflare.AddressMapMembershipArgs{
* Identifier: pulumi.String("92f17202ed8bd63d69a66b86a49a8f6b"),
* Kind: pulumi.String("account"),
* },
* &cloudflare.AddressMapMembershipArgs{
* Identifier: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
* Kind: pulumi.String("zone"),
* },
* },
* })
* 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.AddressMap;
* import com.pulumi.cloudflare.AddressMapArgs;
* import com.pulumi.cloudflare.inputs.AddressMapIpArgs;
* import com.pulumi.cloudflare.inputs.AddressMapMembershipArgs;
* 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 AddressMap("example", AddressMapArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .description("My address map")
* .defaultSni("*.example.com")
* .enabled(true)
* .ips(
* AddressMapIpArgs.builder()
* .ip("192.0.2.1")
* .build(),
* AddressMapIpArgs.builder()
* .ip("203.0.113.1")
* .build())
* .memberships(
* AddressMapMembershipArgs.builder()
* .identifier("92f17202ed8bd63d69a66b86a49a8f6b")
* .kind("account")
* .build(),
* AddressMapMembershipArgs.builder()
* .identifier("023e105f4ecef8ad9ca31a8372d0c353")
* .kind("zone")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:AddressMap
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* description: My address map
* defaultSni: '*.example.com'
* enabled: true
* ips:
* - ip: 192.0.2.1
* - ip: 203.0.113.1
* memberships:
* - identifier: 92f17202ed8bd63d69a66b86a49a8f6b
* kind: account
* - identifier: 023e105f4ecef8ad9ca31a8372d0c353
* kind: zone
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/addressMap:AddressMap example /
* ```
* @property accountId The account identifier to target for the resource.
* @property defaultSni If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map.
* @property description Description of the address map.
* @property enabled Whether the Address Map is enabled or not.
* @property ips The set of IPs on the Address Map.
* @property memberships Zones and Accounts which will be assigned IPs on this Address Map.
*/
public data class AddressMapArgs(
public val accountId: Output? = null,
public val defaultSni: Output? = null,
public val description: Output? = null,
public val enabled: Output? = null,
public val ips: Output>? = null,
public val memberships: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.AddressMapArgs =
com.pulumi.cloudflare.AddressMapArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.defaultSni(defaultSni?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.enabled(enabled?.applyValue({ args0 -> args0 }))
.ips(ips?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.memberships(
memberships?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [AddressMapArgs].
*/
@PulumiTagMarker
public class AddressMapArgsBuilder internal constructor() {
private var accountId: Output? = null
private var defaultSni: Output? = null
private var description: Output? = null
private var enabled: Output? = null
private var ips: Output>? = null
private var memberships: Output>? = null
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("xlxwadwlfoxlbvle")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map.
*/
@JvmName("msfcoiimnfpvpnky")
public suspend fun defaultSni(`value`: Output) {
this.defaultSni = value
}
/**
* @param value Description of the address map.
*/
@JvmName("ooudoiodfndvgqrk")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Whether the Address Map is enabled or not.
*/
@JvmName("mloedwgekxhkcpmh")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value The set of IPs on the Address Map.
*/
@JvmName("bjthxeybmigdqyka")
public suspend fun ips(`value`: Output>) {
this.ips = value
}
@JvmName("vleapfjluxdinutc")
public suspend fun ips(vararg values: Output) {
this.ips = Output.all(values.asList())
}
/**
* @param values The set of IPs on the Address Map.
*/
@JvmName("lgdtpbofbeqcsrya")
public suspend fun ips(values: List