Cloudflare v5.2.1, May 23 23
Cloudflare v5.2.1, May 23 23
cloudflare.AddressMap
Explore with Pulumi AI
Provides the ability to manage IP addresses that can be used by DNS records when they are proxied through Cloudflare.
Example Usage
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",
DefaultSni = "*.example.com",
Description = "My address map",
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 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"),
DefaultSni: pulumi.String("*.example.com"),
Description: pulumi.String("My address map"),
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
})
}
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")
.defaultSni("*.example.com")
.description("My address map")
.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());
}
}
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.AddressMap("example",
account_id="f037e56e89293a057740de681ac9abbe",
default_sni="*.example.com",
description="My address map",
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",
),
])
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = new cloudflare.AddressMap("example", {
accountId: "f037e56e89293a057740de681ac9abbe",
defaultSni: "*.example.com",
description: "My address map",
enabled: true,
ips: [
{
ip: "192.0.2.1",
},
{
ip: "203.0.113.1",
},
],
memberships: [
{
identifier: "92f17202ed8bd63d69a66b86a49a8f6b",
kind: "account",
},
{
identifier: "023e105f4ecef8ad9ca31a8372d0c353",
kind: "zone",
},
],
});
resources:
example:
type: cloudflare:AddressMap
properties:
accountId: f037e56e89293a057740de681ac9abbe
defaultSni: '*.example.com'
description: My address map
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
new AddressMap(name: string, args: AddressMapArgs, opts?: CustomResourceOptions);
@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[AddressMapIpArgs]] = None,
memberships: Optional[Sequence[AddressMapMembershipArgs]] = None)
@overload
def AddressMap(resource_name: str,
args: AddressMapArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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:
- Account
Id string The account identifier to target for the resource.
- Enabled bool
Whether the Address Map is enabled or not.
- Default
Sni 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<Address
Map Ip Args> The set of IPs on the Address Map.
- Memberships
List<Address
Map Membership Args> Zones and Accounts which will be assigned IPs on this Address Map.
- Account
Id string The account identifier to target for the resource.
- Enabled bool
Whether the Address Map is enabled or not.
- Default
Sni 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
[]Address
Map Ip Args The set of IPs on the Address Map.
- Memberships
[]Address
Map Membership Args Zones and Accounts which will be assigned IPs on this Address Map.
- account
Id String The account identifier to target for the resource.
- enabled Boolean
Whether the Address Map is enabled or not.
- default
Sni 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<Address
Map Ip Args> The set of IPs on the Address Map.
- memberships
List<Address
Map Membership Args> Zones and Accounts which will be assigned IPs on this Address Map.
- account
Id string The account identifier to target for the resource.
- enabled boolean
Whether the Address Map is enabled or not.
- default
Sni 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
Address
Map Ip Args[] The set of IPs on the Address Map.
- memberships
Address
Map Membership Args[] 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[Address
Map Ip Args] The set of IPs on the Address Map.
- memberships
Sequence[Address
Map Membership Args] Zones and Accounts which will be assigned IPs on this Address Map.
- account
Id String The account identifier to target for the resource.
- enabled Boolean
Whether the Address Map is enabled or not.
- default
Sni 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:
- 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 boolIps 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 boolIps 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 Boolean If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
- can
Modify BooleanIps 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 boolean If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
- can
Modify booleanIps 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_ boolips 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.
- can
Delete Boolean If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
- can
Modify BooleanIps 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.
- Account
Id string 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 boolIps 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 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<Address
Map Ip Args> The set of IPs on the Address Map.
- Memberships
List<Address
Map Membership Args> Zones and Accounts which will be assigned IPs on this Address Map.
- Account
Id string 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 boolIps 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 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
[]Address
Map Ip Args The set of IPs on the Address Map.
- Memberships
[]Address
Map Membership Args Zones and Accounts which will be assigned IPs on this Address Map.
- account
Id String The account identifier to target for the resource.
- can
Delete Boolean If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
- can
Modify BooleanIps 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 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<Address
Map Ip Args> The set of IPs on the Address Map.
- memberships
List<Address
Map Membership Args> Zones and Accounts which will be assigned IPs on this Address Map.
- account
Id string The account identifier to target for the resource.
- can
Delete boolean If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
- can
Modify booleanIps 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 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
Address
Map Ip Args[] The set of IPs on the Address Map.
- memberships
Address
Map Membership Args[] 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_ boolips 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[Address
Map Ip Args] The set of IPs on the Address Map.
- memberships
Sequence[Address
Map Membership Args] Zones and Accounts which will be assigned IPs on this Address Map.
- account
Id String The account identifier to target for the resource.
- can
Delete Boolean If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.
- can
Modify BooleanIps 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 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
- 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
- Identifier string
Identifier of the account or zone.
- Kind string
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.
- 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.
- can
Delete 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.
- can
Delete 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.
- can
Delete 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>
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
cloudflare
Terraform Provider.