cloudflare.List
Provides Lists (IPs, Redirects) to be used in Edge Rules Engine across all zones within the same account.
Example Usage
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.List;
import com.pulumi.cloudflare.ListArgs;
import com.pulumi.cloudflare.inputs.ListItemArgs;
import com.pulumi.cloudflare.inputs.ListItemValueArgs;
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 List("example", ListArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.description("example redirects for a list")
.items(
ListItemArgs.builder()
.comment("one")
.value(ListItemValueArgs.builder()
.redirect(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build())
.build(),
ListItemArgs.builder()
.comment("two")
.value(ListItemValueArgs.builder()
.redirect(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build())
.build())
.kind("redirect")
.name("example_list")
.build());
}
}
Coming soon!
Coming soon!
resources:
# Redirect list
example:
type: cloudflare:List
properties:
accountId: f037e56e89293a057740de681ac9abbe
description: example redirects for a list
items:
- comment: one
value:
redirect:
- sourceUrl: example.com/blog
targetUrl: https://blog.example.com
- comment: two
value:
redirect:
- includeSubdomains: enabled
preservePathSuffix: disabled
preserveQueryString: enabled
sourceUrl: example.com/foo
statusCode: 301
subpathMatching: enabled
targetUrl: https://foo.example.com
kind: redirect
name: example_list
Create List Resource
new List(name: string, args: ListArgs, opts?: CustomResourceOptions);
@overload
def List(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
description: Optional[str] = None,
items: Optional[Sequence[ListItemArgs]] = None,
kind: Optional[str] = None,
name: Optional[str] = None)
@overload
def List(resource_name: str,
args: ListArgs,
opts: Optional[ResourceOptions] = None)
func NewList(ctx *Context, name string, args ListArgs, opts ...ResourceOption) (*List, error)
public List(string name, ListArgs args, CustomResourceOptions? opts = null)
type: cloudflare:List
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ListArgs
- 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 ListArgs
- 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 ListArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ListArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ListArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
List 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 List resource accepts the following input properties:
- Account
Id string The account identifier to target for the resource.
- Kind string
The type of items the list will contain.
- Name string
The name of the list. Modifying this attribute will force creation of a new resource.
- Description string
An optional description of the list.
- Items
List<List
Item Args>
- Account
Id string The account identifier to target for the resource.
- Kind string
The type of items the list will contain.
- Name string
The name of the list. Modifying this attribute will force creation of a new resource.
- Description string
An optional description of the list.
- Items
[]List
Item Args
- account
Id String The account identifier to target for the resource.
- kind String
The type of items the list will contain.
- name String
The name of the list. Modifying this attribute will force creation of a new resource.
- description String
An optional description of the list.
- items
List<List
Item Args>
- account
Id string The account identifier to target for the resource.
- kind string
The type of items the list will contain.
- name string
The name of the list. Modifying this attribute will force creation of a new resource.
- description string
An optional description of the list.
- items
List
Item Args[]
- account_
id str The account identifier to target for the resource.
- kind str
The type of items the list will contain.
- name str
The name of the list. Modifying this attribute will force creation of a new resource.
- description str
An optional description of the list.
- items
Sequence[List
Item Args]
- account
Id String The account identifier to target for the resource.
- kind String
The type of items the list will contain.
- name String
The name of the list. Modifying this attribute will force creation of a new resource.
- description String
An optional description of the list.
- items List<Property Map>
Outputs
All input properties are implicitly available as output properties. Additionally, the List resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing List Resource
Get an existing List 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?: ListState, opts?: CustomResourceOptions): List
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
description: Optional[str] = None,
items: Optional[Sequence[ListItemArgs]] = None,
kind: Optional[str] = None,
name: Optional[str] = None) -> List
func GetList(ctx *Context, name string, id IDInput, state *ListState, opts ...ResourceOption) (*List, error)
public static List Get(string name, Input<string> id, ListState? state, CustomResourceOptions? opts = null)
public static List get(String name, Output<String> id, ListState 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.
- Description string
An optional description of the list.
- Items
List<List
Item Args> - Kind string
The type of items the list will contain.
- Name string
The name of the list. Modifying this attribute will force creation of a new resource.
- Account
Id string The account identifier to target for the resource.
- Description string
An optional description of the list.
- Items
[]List
Item Args - Kind string
The type of items the list will contain.
- Name string
The name of the list. Modifying this attribute will force creation of a new resource.
- account
Id String The account identifier to target for the resource.
- description String
An optional description of the list.
- items
List<List
Item Args> - kind String
The type of items the list will contain.
- name String
The name of the list. Modifying this attribute will force creation of a new resource.
- account
Id string The account identifier to target for the resource.
- description string
An optional description of the list.
- items
List
Item Args[] - kind string
The type of items the list will contain.
- name string
The name of the list. Modifying this attribute will force creation of a new resource.
- account_
id str The account identifier to target for the resource.
- description str
An optional description of the list.
- items
Sequence[List
Item Args] - kind str
The type of items the list will contain.
- name str
The name of the list. Modifying this attribute will force creation of a new resource.
- account
Id String The account identifier to target for the resource.
- description String
An optional description of the list.
- items List<Property Map>
- kind String
The type of items the list will contain.
- name String
The name of the list. Modifying this attribute will force creation of a new resource.
Supporting Types
ListItem
- Value
List
Item Value - Comment string
An optional comment for the item.
- Value
List
Item Value - Comment string
An optional comment for the item.
- value
List
Item Value - comment String
An optional comment for the item.
- value
List
Item Value - comment string
An optional comment for the item.
- value
List
Item Value - comment str
An optional comment for the item.
- value Property Map
- comment String
An optional comment for the item.
ListItemValue
- ip String
- redirects List<Property Map>
ListItemValueRedirect
- Source
Url string - Target
Url string - Include
Subdomains string - Preserve
Path stringSuffix - Preserve
Query stringString - Status
Code int - Subpath
Matching string
- Source
Url string - Target
Url string - Include
Subdomains string - Preserve
Path stringSuffix - Preserve
Query stringString - Status
Code int - Subpath
Matching string
- source
Url String - target
Url String - include
Subdomains String - preserve
Path StringSuffix - preserve
Query StringString - status
Code Integer - subpath
Matching String
- source
Url string - target
Url string - include
Subdomains string - preserve
Path stringSuffix - preserve
Query stringString - status
Code number - subpath
Matching string
- source_
url str - target_
url str - include_
subdomains str - preserve_
path_ strsuffix - preserve_
query_ strstring - status_
code int - subpath_
matching str
- source
Url String - target
Url String - include
Subdomains String - preserve
Path StringSuffix - preserve
Query StringString - status
Code Number - subpath
Matching String
Import
$ pulumi import cloudflare:index/list:List example <account_id>/<list_id>
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
cloudflare
Terraform Provider.