1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. AddressMap
Cloudflare v6.1.0 published on Friday, Apr 18, 2025 by Pulumi

cloudflare.AddressMap

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const exampleAddressMap = new cloudflare.AddressMap("example_address_map", {
    accountId: "258def64c72dae45f3e4c8516e2111f2",
    description: "My Ecommerce zones",
    enabled: true,
    ips: ["192.0.2.1"],
    memberships: [{
        identifier: "023e105f4ecef8ad9ca31a8372d0c353",
        kind: "zone",
    }],
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_address_map = cloudflare.AddressMap("example_address_map",
    account_id="258def64c72dae45f3e4c8516e2111f2",
    description="My Ecommerce zones",
    enabled=True,
    ips=["192.0.2.1"],
    memberships=[{
        "identifier": "023e105f4ecef8ad9ca31a8372d0c353",
        "kind": "zone",
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudflare.NewAddressMap(ctx, "example_address_map", &cloudflare.AddressMapArgs{
			AccountId:   pulumi.String("258def64c72dae45f3e4c8516e2111f2"),
			Description: pulumi.String("My Ecommerce zones"),
			Enabled:     pulumi.Bool(true),
			Ips: pulumi.StringArray{
				pulumi.String("192.0.2.1"),
			},
			Memberships: cloudflare.AddressMapMembershipArray{
				&cloudflare.AddressMapMembershipArgs{
					Identifier: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
					Kind:       pulumi.String("zone"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var exampleAddressMap = new Cloudflare.AddressMap("example_address_map", new()
    {
        AccountId = "258def64c72dae45f3e4c8516e2111f2",
        Description = "My Ecommerce zones",
        Enabled = true,
        Ips = new[]
        {
            "192.0.2.1",
        },
        Memberships = new[]
        {
            new Cloudflare.Inputs.AddressMapMembershipArgs
            {
                Identifier = "023e105f4ecef8ad9ca31a8372d0c353",
                Kind = "zone",
            },
        },
    });

});
Copy
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.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 exampleAddressMap = new AddressMap("exampleAddressMap", AddressMapArgs.builder()
            .accountId("258def64c72dae45f3e4c8516e2111f2")
            .description("My Ecommerce zones")
            .enabled(true)
            .ips("192.0.2.1")
            .memberships(AddressMapMembershipArgs.builder()
                .identifier("023e105f4ecef8ad9ca31a8372d0c353")
                .kind("zone")
                .build())
            .build());

    }
}
Copy
resources:
  exampleAddressMap:
    type: cloudflare:AddressMap
    name: example_address_map
    properties:
      accountId: 258def64c72dae45f3e4c8516e2111f2
      description: My Ecommerce zones
      enabled: true
      ips:
        - 192.0.2.1
      memberships:
        - identifier: 023e105f4ecef8ad9ca31a8372d0c353
          kind: zone
Copy

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,
               default_sni: Optional[str] = None,
               description: Optional[str] = None,
               enabled: Optional[bool] = None,
               ips: Optional[Sequence[str]] = 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 This property is required. string
The unique name of the resource.
args This property is required. AddressMapArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. AddressMapArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AddressMapArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
    DefaultSni = "string",
    Description = "string",
    Enabled = false,
    Ips = new[]
    {
        "string",
    },
    Memberships = new[]
    {
        new Cloudflare.Inputs.AddressMapMembershipArgs
        {
            CanDelete = false,
            CreatedAt = "string",
            Identifier = "string",
            Kind = "string",
        },
    },
});
Copy
example, err := cloudflare.NewAddressMap(ctx, "addressMapResource", &cloudflare.AddressMapArgs{
	AccountId:   pulumi.String("string"),
	DefaultSni:  pulumi.String("string"),
	Description: pulumi.String("string"),
	Enabled:     pulumi.Bool(false),
	Ips: pulumi.StringArray{
		pulumi.String("string"),
	},
	Memberships: cloudflare.AddressMapMembershipArray{
		&cloudflare.AddressMapMembershipArgs{
			CanDelete:  pulumi.Bool(false),
			CreatedAt:  pulumi.String("string"),
			Identifier: pulumi.String("string"),
			Kind:       pulumi.String("string"),
		},
	},
})
Copy
var addressMapResource = new AddressMap("addressMapResource", AddressMapArgs.builder()
    .accountId("string")
    .defaultSni("string")
    .description("string")
    .enabled(false)
    .ips("string")
    .memberships(AddressMapMembershipArgs.builder()
        .canDelete(false)
        .createdAt("string")
        .identifier("string")
        .kind("string")
        .build())
    .build());
Copy
address_map_resource = cloudflare.AddressMap("addressMapResource",
    account_id="string",
    default_sni="string",
    description="string",
    enabled=False,
    ips=["string"],
    memberships=[{
        "can_delete": False,
        "created_at": "string",
        "identifier": "string",
        "kind": "string",
    }])
Copy
const addressMapResource = new cloudflare.AddressMap("addressMapResource", {
    accountId: "string",
    defaultSni: "string",
    description: "string",
    enabled: false,
    ips: ["string"],
    memberships: [{
        canDelete: false,
        createdAt: "string",
        identifier: "string",
        kind: "string",
    }],
});
Copy
type: cloudflare:AddressMap
properties:
    accountId: string
    defaultSni: string
    description: string
    enabled: false
    ips:
        - string
    memberships:
        - canDelete: false
          createdAt: string
          identifier: string
          kind: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The AddressMap resource accepts the following input properties:

AccountId This property is required. string
Identifier of a Cloudflare account.
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
Description string
An optional description field which may be used to describe the types of IPs or zones on the map.
Enabled bool
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
Ips List<string>
Memberships List<AddressMapMembership>
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
AccountId This property is required. string
Identifier of a Cloudflare account.
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
Description string
An optional description field which may be used to describe the types of IPs or zones on the map.
Enabled bool
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
Ips []string
Memberships []AddressMapMembershipArgs
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
accountId This property is required. String
Identifier of a Cloudflare account.
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
description String
An optional description field which may be used to describe the types of IPs or zones on the map.
enabled Boolean
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
ips List<String>
memberships List<AddressMapMembership>
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
accountId This property is required. string
Identifier of a Cloudflare account.
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
description string
An optional description field which may be used to describe the types of IPs or zones on the map.
enabled boolean
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
ips string[]
memberships AddressMapMembership[]
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
account_id This property is required. str
Identifier of a Cloudflare account.
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
description str
An optional description field which may be used to describe the types of IPs or zones on the map.
enabled bool
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
ips Sequence[str]
memberships Sequence[AddressMapMembershipArgs]
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
accountId This property is required. String
Identifier of a Cloudflare account.
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
description String
An optional description field which may be used to describe the types of IPs or zones on the map.
enabled Boolean
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
ips List<String>
memberships List<Property Map>
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.

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.
CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
ModifiedAt string
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.
CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
ModifiedAt string
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.
createdAt String
id String
The provider-assigned unique ID for this managed resource.
modifiedAt String
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.
createdAt string
id string
The provider-assigned unique ID for this managed resource.
modifiedAt string
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.
created_at str
id str
The provider-assigned unique ID for this managed resource.
modified_at str
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.
createdAt String
id String
The provider-assigned unique ID for this managed resource.
modifiedAt String

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,
        created_at: Optional[str] = None,
        default_sni: Optional[str] = None,
        description: Optional[str] = None,
        enabled: Optional[bool] = None,
        ips: Optional[Sequence[str]] = None,
        memberships: Optional[Sequence[AddressMapMembershipArgs]] = None,
        modified_at: Optional[str] = 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)
resources:  _:    type: cloudflare:AddressMap    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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
Identifier of a Cloudflare account.
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.
CreatedAt string
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
Description string
An optional description field which may be used to describe the types of IPs or zones on the map.
Enabled bool
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
Ips List<string>
Memberships List<AddressMapMembership>
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
ModifiedAt string
AccountId string
Identifier of a Cloudflare account.
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.
CreatedAt string
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
Description string
An optional description field which may be used to describe the types of IPs or zones on the map.
Enabled bool
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
Ips []string
Memberships []AddressMapMembershipArgs
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
ModifiedAt string
accountId String
Identifier of a Cloudflare account.
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.
createdAt String
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
description String
An optional description field which may be used to describe the types of IPs or zones on the map.
enabled Boolean
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
ips List<String>
memberships List<AddressMapMembership>
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
modifiedAt String
accountId string
Identifier of a Cloudflare account.
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.
createdAt string
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
description string
An optional description field which may be used to describe the types of IPs or zones on the map.
enabled boolean
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
ips string[]
memberships AddressMapMembership[]
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
modifiedAt string
account_id str
Identifier of a Cloudflare account.
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.
created_at str
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
description str
An optional description field which may be used to describe the types of IPs or zones on the map.
enabled bool
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
ips Sequence[str]
memberships Sequence[AddressMapMembershipArgs]
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
modified_at str
accountId String
Identifier of a Cloudflare account.
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.
createdAt String
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. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.
description String
An optional description field which may be used to describe the types of IPs or zones on the map.
enabled Boolean
Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.
ips List<String>
memberships List<Property Map>
Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.
modifiedAt String

Supporting Types

AddressMapMembership
, AddressMapMembershipArgs

CanDelete bool
Controls whether the membership can be deleted via the API or not.
CreatedAt string
Identifier string
The identifier for the membership (eg. a zone or account tag).
Kind string
The type of the membership. Available values: "zone", "account".
CanDelete bool
Controls whether the membership can be deleted via the API or not.
CreatedAt string
Identifier string
The identifier for the membership (eg. a zone or account tag).
Kind string
The type of the membership. Available values: "zone", "account".
canDelete Boolean
Controls whether the membership can be deleted via the API or not.
createdAt String
identifier String
The identifier for the membership (eg. a zone or account tag).
kind String
The type of the membership. Available values: "zone", "account".
canDelete boolean
Controls whether the membership can be deleted via the API or not.
createdAt string
identifier string
The identifier for the membership (eg. a zone or account tag).
kind string
The type of the membership. Available values: "zone", "account".
can_delete bool
Controls whether the membership can be deleted via the API or not.
created_at str
identifier str
The identifier for the membership (eg. a zone or account tag).
kind str
The type of the membership. Available values: "zone", "account".
canDelete Boolean
Controls whether the membership can be deleted via the API or not.
createdAt String
identifier String
The identifier for the membership (eg. a zone or account tag).
kind String
The type of the membership. Available values: "zone", "account".

Import

$ pulumi import cloudflare:index/addressMap:AddressMap example '<account_id>/<address_map_id>'
Copy

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.