1. Packages
  2. Cloudflare
  3. API Docs
  4. AddressMap
Cloudflare v5.34.0 published on Friday, Jul 12, 2024 by Pulumi

cloudflare.AddressMap

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.34.0 published on Friday, Jul 12, 2024 by Pulumi

    Provides the ability to manage IP addresses that can be used by DNS records when they are proxied through Cloudflare.

    Example Usage

    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",
            },
        ],
    });
    
    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=[
            cloudflare.AddressMapIpArgs(
                ip="192.0.2.1",
            ),
            cloudflare.AddressMapIpArgs(
                ip="203.0.113.1",
            ),
        ],
        memberships=[
            cloudflare.AddressMapMembershipArgs(
                identifier="92f17202ed8bd63d69a66b86a49a8f6b",
                kind="account",
            ),
            cloudflare.AddressMapMembershipArgs(
                identifier="023e105f4ecef8ad9ca31a8372d0c353",
                kind="zone",
            ),
        ])
    
    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
    	})
    }
    
    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",
                },
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    Create AddressMap Resource

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

    Constructor syntax

    new AddressMap(name: string, args: AddressMapArgs, opts?: CustomResourceOptions);
    @overload
    def AddressMap(resource_name: str,
                   args: AddressMapArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def AddressMap(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   account_id: Optional[str] = None,
                   enabled: Optional[bool] = None,
                   default_sni: Optional[str] = None,
                   description: Optional[str] = None,
                   ips: Optional[Sequence[AddressMapIpArgs]] = None,
                   memberships: Optional[Sequence[AddressMapMembershipArgs]] = None)
    func NewAddressMap(ctx *Context, name string, args AddressMapArgs, opts ...ResourceOption) (*AddressMap, error)
    public AddressMap(string name, AddressMapArgs args, CustomResourceOptions? opts = null)
    public AddressMap(String name, AddressMapArgs args)
    public AddressMap(String name, AddressMapArgs args, CustomResourceOptions options)
    
    type: cloudflare:AddressMap
    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 AddressMapArgs
    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 AddressMapArgs
    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 AddressMapArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AddressMapArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AddressMapArgs
    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 addressMapResource = new Cloudflare.AddressMap("addressMapResource", new()
    {
        AccountId = "string",
        Enabled = false,
        DefaultSni = "string",
        Description = "string",
        Ips = new[]
        {
            new Cloudflare.Inputs.AddressMapIpArgs
            {
                Ip = "string",
            },
        },
        Memberships = new[]
        {
            new Cloudflare.Inputs.AddressMapMembershipArgs
            {
                Identifier = "string",
                Kind = "string",
                CanDelete = false,
            },
        },
    });
    
    example, err := cloudflare.NewAddressMap(ctx, "addressMapResource", &cloudflare.AddressMapArgs{
    	AccountId:   pulumi.String("string"),
    	Enabled:     pulumi.Bool(false),
    	DefaultSni:  pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Ips: cloudflare.AddressMapIpArray{
    		&cloudflare.AddressMapIpArgs{
    			Ip: pulumi.String("string"),
    		},
    	},
    	Memberships: cloudflare.AddressMapMembershipArray{
    		&cloudflare.AddressMapMembershipArgs{
    			Identifier: pulumi.String("string"),
    			Kind:       pulumi.String("string"),
    			CanDelete:  pulumi.Bool(false),
    		},
    	},
    })
    
    var addressMapResource = new AddressMap("addressMapResource", AddressMapArgs.builder()
        .accountId("string")
        .enabled(false)
        .defaultSni("string")
        .description("string")
        .ips(AddressMapIpArgs.builder()
            .ip("string")
            .build())
        .memberships(AddressMapMembershipArgs.builder()
            .identifier("string")
            .kind("string")
            .canDelete(false)
            .build())
        .build());
    
    address_map_resource = cloudflare.AddressMap("addressMapResource",
        account_id="string",
        enabled=False,
        default_sni="string",
        description="string",
        ips=[cloudflare.AddressMapIpArgs(
            ip="string",
        )],
        memberships=[cloudflare.AddressMapMembershipArgs(
            identifier="string",
            kind="string",
            can_delete=False,
        )])
    
    const addressMapResource = new cloudflare.AddressMap("addressMapResource", {
        accountId: "string",
        enabled: false,
        defaultSni: "string",
        description: "string",
        ips: [{
            ip: "string",
        }],
        memberships: [{
            identifier: "string",
            kind: "string",
            canDelete: false,
        }],
    });
    
    type: cloudflare:AddressMap
    properties:
        accountId: string
        defaultSni: string
        description: string
        enabled: false
        ips:
            - ip: string
        memberships:
            - canDelete: false
              identifier: string
              kind: string
    

    AddressMap 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 AddressMap resource accepts the following input properties:

    AccountId string
    The account identifier to target for the resource.
    Enabled bool
    Whether the Address Map is enabled or not.
    DefaultSni string
    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.
    Description string
    Description of the address map.
    Ips List<AddressMapIp>
    The set of IPs on the Address Map.
    Memberships List<AddressMapMembership>
    Zones and Accounts which will be assigned IPs on this Address Map.
    AccountId string
    The account identifier to target for the resource.
    Enabled bool
    Whether the Address Map is enabled or not.
    DefaultSni string
    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.
    Description string
    Description of the address map.
    Ips []AddressMapIpArgs
    The set of IPs on the Address Map.
    Memberships []AddressMapMembershipArgs
    Zones and Accounts which will be assigned IPs on this Address Map.
    accountId String
    The account identifier to target for the resource.
    enabled Boolean
    Whether the Address Map is enabled or not.
    defaultSni String
    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.
    description String
    Description of the address map.
    ips List<AddressMapIp>
    The set of IPs on the Address Map.
    memberships List<AddressMapMembership>
    Zones and Accounts which will be assigned IPs on this Address Map.
    accountId string
    The account identifier to target for the resource.
    enabled boolean
    Whether the Address Map is enabled or not.
    defaultSni string
    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.
    description string
    Description of the address map.
    ips AddressMapIp[]
    The set of IPs on the Address Map.
    memberships AddressMapMembership[]
    Zones and Accounts which will be assigned IPs on this Address Map.
    account_id str
    The account identifier to target for the resource.
    enabled bool
    Whether the Address Map is enabled or not.
    default_sni str
    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.
    description str
    Description of the address map.
    ips Sequence[AddressMapIpArgs]
    The set of IPs on the Address Map.
    memberships Sequence[AddressMapMembershipArgs]
    Zones and Accounts which will be assigned IPs on this Address Map.
    accountId String
    The account identifier to target for the resource.
    enabled Boolean
    Whether the Address Map is enabled or not.
    defaultSni String
    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.
    description String
    Description of the address map.
    ips List<Property Map>
    The set of IPs on the Address Map.
    memberships List<Property Map>
    Zones and Accounts which will be assigned IPs on this Address Map.

    Outputs

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

    CanDelete bool
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    CanModifyIps bool
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    Id string
    The provider-assigned unique ID for this managed resource.
    CanDelete bool
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    CanModifyIps bool
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    Id string
    The provider-assigned unique ID for this managed resource.
    canDelete Boolean
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    canModifyIps Boolean
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    id String
    The provider-assigned unique ID for this managed resource.
    canDelete boolean
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    canModifyIps boolean
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    id string
    The provider-assigned unique ID for this managed resource.
    can_delete bool
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    can_modify_ips bool
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    id str
    The provider-assigned unique ID for this managed resource.
    canDelete Boolean
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    canModifyIps Boolean
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AddressMap Resource

    Get an existing AddressMap 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?: AddressMapState, opts?: CustomResourceOptions): AddressMap
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            can_delete: Optional[bool] = None,
            can_modify_ips: Optional[bool] = None,
            default_sni: Optional[str] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            ips: Optional[Sequence[AddressMapIpArgs]] = None,
            memberships: Optional[Sequence[AddressMapMembershipArgs]] = None) -> AddressMap
    func GetAddressMap(ctx *Context, name string, id IDInput, state *AddressMapState, opts ...ResourceOption) (*AddressMap, error)
    public static AddressMap Get(string name, Input<string> id, AddressMapState? state, CustomResourceOptions? opts = null)
    public static AddressMap get(String name, Output<String> id, AddressMapState 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:
    AccountId string
    The account identifier to target for the resource.
    CanDelete bool
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    CanModifyIps bool
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    DefaultSni string
    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.
    Description string
    Description of the address map.
    Enabled bool
    Whether the Address Map is enabled or not.
    Ips List<AddressMapIp>
    The set of IPs on the Address Map.
    Memberships List<AddressMapMembership>
    Zones and Accounts which will be assigned IPs on this Address Map.
    AccountId string
    The account identifier to target for the resource.
    CanDelete bool
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    CanModifyIps bool
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    DefaultSni string
    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.
    Description string
    Description of the address map.
    Enabled bool
    Whether the Address Map is enabled or not.
    Ips []AddressMapIpArgs
    The set of IPs on the Address Map.
    Memberships []AddressMapMembershipArgs
    Zones and Accounts which will be assigned IPs on this Address Map.
    accountId String
    The account identifier to target for the resource.
    canDelete Boolean
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    canModifyIps Boolean
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    defaultSni String
    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.
    description String
    Description of the address map.
    enabled Boolean
    Whether the Address Map is enabled or not.
    ips List<AddressMapIp>
    The set of IPs on the Address Map.
    memberships List<AddressMapMembership>
    Zones and Accounts which will be assigned IPs on this Address Map.
    accountId string
    The account identifier to target for the resource.
    canDelete boolean
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    canModifyIps boolean
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    defaultSni string
    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.
    description string
    Description of the address map.
    enabled boolean
    Whether the Address Map is enabled or not.
    ips AddressMapIp[]
    The set of IPs on the Address Map.
    memberships AddressMapMembership[]
    Zones and Accounts which will be assigned IPs on this Address Map.
    account_id str
    The account identifier to target for the resource.
    can_delete bool
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    can_modify_ips bool
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    default_sni str
    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.
    description str
    Description of the address map.
    enabled bool
    Whether the Address Map is enabled or not.
    ips Sequence[AddressMapIpArgs]
    The set of IPs on the Address Map.
    memberships Sequence[AddressMapMembershipArgs]
    Zones and Accounts which will be assigned IPs on this Address Map.
    accountId String
    The account identifier to target for the resource.
    canDelete Boolean
    If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
    canModifyIps Boolean
    If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.
    defaultSni String
    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.
    description String
    Description of the address map.
    enabled Boolean
    Whether the Address Map is enabled or not.
    ips List<Property Map>
    The set of IPs on the Address Map.
    memberships List<Property Map>
    Zones and Accounts which will be assigned IPs on this Address Map.

    Supporting Types

    AddressMapIp, AddressMapIpArgs

    Ip string
    An IPv4 or IPv6 address.
    Ip string
    An IPv4 or IPv6 address.
    ip String
    An IPv4 or IPv6 address.
    ip string
    An IPv4 or IPv6 address.
    ip str
    An IPv4 or IPv6 address.
    ip String
    An IPv4 or IPv6 address.

    AddressMapMembership, AddressMapMembershipArgs

    Identifier string
    Identifier of the account or zone.
    Kind string
    The type of the membership.
    CanDelete bool
    Controls whether the membership can be deleted via the API or not.
    Identifier string
    Identifier of the account or zone.
    Kind string
    The type of the membership.
    CanDelete bool
    Controls whether the membership can be deleted via the API or not.
    identifier String
    Identifier of the account or zone.
    kind String
    The type of the membership.
    canDelete Boolean
    Controls whether the membership can be deleted via the API or not.
    identifier string
    Identifier of the account or zone.
    kind string
    The type of the membership.
    canDelete boolean
    Controls whether the membership can be deleted via the API or not.
    identifier str
    Identifier of the account or zone.
    kind str
    The type of the membership.
    can_delete bool
    Controls whether the membership can be deleted via the API or not.
    identifier String
    Identifier of the account or zone.
    kind String
    The type of the membership.
    canDelete Boolean
    Controls whether the membership can be deleted via the API or not.

    Import

    $ pulumi import cloudflare:index/addressMap:AddressMap example <account_id>/<address_map_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.
    cloudflare logo
    Cloudflare v5.34.0 published on Friday, Jul 12, 2024 by Pulumi