1. Packages
  2. Fortimanager Provider
  3. API Docs
  4. ObjectRouterCommunitylistRule
fortimanager 1.14.0 published on Tuesday, Apr 15, 2025 by fortinetdev

fortimanager.ObjectRouterCommunitylistRule

Explore with Pulumi AI

Community list rule.

This resource is a sub resource for variable rule of resource fortimanager.ObjectRouterCommunitylist. Conflict and overwrite may occur if use both of them.

Example Usage

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

const trnameObjectRouterCommunitylist = new fortimanager.ObjectRouterCommunitylist("trnameObjectRouterCommunitylist", {});
const trnameObjectRouterCommunitylistRule = new fortimanager.ObjectRouterCommunitylistRule("trnameObjectRouterCommunitylistRule", {
    communityList: trnameObjectRouterCommunitylist.name,
    action: "permit",
    fosid: 1,
}, {
    dependsOn: [trnameObjectRouterCommunitylist],
});
Copy
import pulumi
import pulumi_fortimanager as fortimanager

trname_object_router_communitylist = fortimanager.ObjectRouterCommunitylist("trnameObjectRouterCommunitylist")
trname_object_router_communitylist_rule = fortimanager.ObjectRouterCommunitylistRule("trnameObjectRouterCommunitylistRule",
    community_list=trname_object_router_communitylist.name,
    action="permit",
    fosid=1,
    opts = pulumi.ResourceOptions(depends_on=[trname_object_router_communitylist]))
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/fortimanager/fortimanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		trnameObjectRouterCommunitylist, err := fortimanager.NewObjectRouterCommunitylist(ctx, "trnameObjectRouterCommunitylist", nil)
		if err != nil {
			return err
		}
		_, err = fortimanager.NewObjectRouterCommunitylistRule(ctx, "trnameObjectRouterCommunitylistRule", &fortimanager.ObjectRouterCommunitylistRuleArgs{
			CommunityList: trnameObjectRouterCommunitylist.Name,
			Action:        pulumi.String("permit"),
			Fosid:         pulumi.Float64(1),
		}, pulumi.DependsOn([]pulumi.Resource{
			trnameObjectRouterCommunitylist,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortimanager = Pulumi.Fortimanager;

return await Deployment.RunAsync(() => 
{
    var trnameObjectRouterCommunitylist = new Fortimanager.ObjectRouterCommunitylist("trnameObjectRouterCommunitylist");

    var trnameObjectRouterCommunitylistRule = new Fortimanager.ObjectRouterCommunitylistRule("trnameObjectRouterCommunitylistRule", new()
    {
        CommunityList = trnameObjectRouterCommunitylist.Name,
        Action = "permit",
        Fosid = 1,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            trnameObjectRouterCommunitylist,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortimanager.ObjectRouterCommunitylist;
import com.pulumi.fortimanager.ObjectRouterCommunitylistRule;
import com.pulumi.fortimanager.ObjectRouterCommunitylistRuleArgs;
import com.pulumi.resources.CustomResourceOptions;
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 trnameObjectRouterCommunitylist = new ObjectRouterCommunitylist("trnameObjectRouterCommunitylist");

        var trnameObjectRouterCommunitylistRule = new ObjectRouterCommunitylistRule("trnameObjectRouterCommunitylistRule", ObjectRouterCommunitylistRuleArgs.builder()
            .communityList(trnameObjectRouterCommunitylist.name())
            .action("permit")
            .fosid(1)
            .build(), CustomResourceOptions.builder()
                .dependsOn(trnameObjectRouterCommunitylist)
                .build());

    }
}
Copy
resources:
  trnameObjectRouterCommunitylistRule:
    type: fortimanager:ObjectRouterCommunitylistRule
    properties:
      communityList: ${trnameObjectRouterCommunitylist.name}
      action: permit
      fosid: 1
    options:
      dependsOn:
        - ${trnameObjectRouterCommunitylist}
  trnameObjectRouterCommunitylist:
    type: fortimanager:ObjectRouterCommunitylist
Copy

Create ObjectRouterCommunitylistRule Resource

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

Constructor syntax

new ObjectRouterCommunitylistRule(name: string, args: ObjectRouterCommunitylistRuleArgs, opts?: CustomResourceOptions);
@overload
def ObjectRouterCommunitylistRule(resource_name: str,
                                  args: ObjectRouterCommunitylistRuleInitArgs,
                                  opts: Optional[ResourceOptions] = None)

@overload
def ObjectRouterCommunitylistRule(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  community_list: Optional[str] = None,
                                  action: Optional[str] = None,
                                  adom: Optional[str] = None,
                                  fosid: Optional[float] = None,
                                  match: Optional[str] = None,
                                  object_router_communitylist_rule_id: Optional[str] = None,
                                  regexp: Optional[str] = None,
                                  scopetype: Optional[str] = None)
func NewObjectRouterCommunitylistRule(ctx *Context, name string, args ObjectRouterCommunitylistRuleArgs, opts ...ResourceOption) (*ObjectRouterCommunitylistRule, error)
public ObjectRouterCommunitylistRule(string name, ObjectRouterCommunitylistRuleArgs args, CustomResourceOptions? opts = null)
public ObjectRouterCommunitylistRule(String name, ObjectRouterCommunitylistRuleArgs args)
public ObjectRouterCommunitylistRule(String name, ObjectRouterCommunitylistRuleArgs args, CustomResourceOptions options)
type: fortimanager:ObjectRouterCommunitylistRule
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. ObjectRouterCommunitylistRuleArgs
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. ObjectRouterCommunitylistRuleInitArgs
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. ObjectRouterCommunitylistRuleArgs
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. ObjectRouterCommunitylistRuleArgs
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. ObjectRouterCommunitylistRuleArgs
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 objectRouterCommunitylistRuleResource = new Fortimanager.ObjectRouterCommunitylistRule("objectRouterCommunitylistRuleResource", new()
{
    CommunityList = "string",
    Action = "string",
    Adom = "string",
    Fosid = 0,
    Match = "string",
    ObjectRouterCommunitylistRuleId = "string",
    Regexp = "string",
    Scopetype = "string",
});
Copy
example, err := fortimanager.NewObjectRouterCommunitylistRule(ctx, "objectRouterCommunitylistRuleResource", &fortimanager.ObjectRouterCommunitylistRuleArgs{
	CommunityList:                   pulumi.String("string"),
	Action:                          pulumi.String("string"),
	Adom:                            pulumi.String("string"),
	Fosid:                           pulumi.Float64(0),
	Match:                           pulumi.String("string"),
	ObjectRouterCommunitylistRuleId: pulumi.String("string"),
	Regexp:                          pulumi.String("string"),
	Scopetype:                       pulumi.String("string"),
})
Copy
var objectRouterCommunitylistRuleResource = new ObjectRouterCommunitylistRule("objectRouterCommunitylistRuleResource", ObjectRouterCommunitylistRuleArgs.builder()
    .communityList("string")
    .action("string")
    .adom("string")
    .fosid(0)
    .match("string")
    .objectRouterCommunitylistRuleId("string")
    .regexp("string")
    .scopetype("string")
    .build());
Copy
object_router_communitylist_rule_resource = fortimanager.ObjectRouterCommunitylistRule("objectRouterCommunitylistRuleResource",
    community_list="string",
    action="string",
    adom="string",
    fosid=0,
    match="string",
    object_router_communitylist_rule_id="string",
    regexp="string",
    scopetype="string")
Copy
const objectRouterCommunitylistRuleResource = new fortimanager.ObjectRouterCommunitylistRule("objectRouterCommunitylistRuleResource", {
    communityList: "string",
    action: "string",
    adom: "string",
    fosid: 0,
    match: "string",
    objectRouterCommunitylistRuleId: "string",
    regexp: "string",
    scopetype: "string",
});
Copy
type: fortimanager:ObjectRouterCommunitylistRule
properties:
    action: string
    adom: string
    communityList: string
    fosid: 0
    match: string
    objectRouterCommunitylistRuleId: string
    regexp: string
    scopetype: string
Copy

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

CommunityList This property is required. string
Community List.
Action string
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
Fosid double
ID.
Match string
Community specifications for matching a reserved community.
ObjectRouterCommunitylistRuleId string
an identifier for the resource with format {{fosid}}.
Regexp string
Ordered list of COMMUNITY attributes as a regular expression.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
CommunityList This property is required. string
Community List.
Action string
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
Fosid float64
ID.
Match string
Community specifications for matching a reserved community.
ObjectRouterCommunitylistRuleId string
an identifier for the resource with format {{fosid}}.
Regexp string
Ordered list of COMMUNITY attributes as a regular expression.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
communityList This property is required. String
Community List.
action String
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
fosid Double
ID.
match String
Community specifications for matching a reserved community.
objectRouterCommunitylistRuleId String
an identifier for the resource with format {{fosid}}.
regexp String
Ordered list of COMMUNITY attributes as a regular expression.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
communityList This property is required. string
Community List.
action string
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
fosid number
ID.
match string
Community specifications for matching a reserved community.
objectRouterCommunitylistRuleId string
an identifier for the resource with format {{fosid}}.
regexp string
Ordered list of COMMUNITY attributes as a regular expression.
scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
community_list This property is required. str
Community List.
action str
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
adom str
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
fosid float
ID.
match str
Community specifications for matching a reserved community.
object_router_communitylist_rule_id str
an identifier for the resource with format {{fosid}}.
regexp str
Ordered list of COMMUNITY attributes as a regular expression.
scopetype str
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
communityList This property is required. String
Community List.
action String
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
fosid Number
ID.
match String
Community specifications for matching a reserved community.
objectRouterCommunitylistRuleId String
an identifier for the resource with format {{fosid}}.
regexp String
Ordered list of COMMUNITY attributes as a regular expression.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.

Outputs

All input properties are implicitly available as output properties. Additionally, the ObjectRouterCommunitylistRule 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 ObjectRouterCommunitylistRule Resource

Get an existing ObjectRouterCommunitylistRule 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?: ObjectRouterCommunitylistRuleState, opts?: CustomResourceOptions): ObjectRouterCommunitylistRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[str] = None,
        adom: Optional[str] = None,
        community_list: Optional[str] = None,
        fosid: Optional[float] = None,
        match: Optional[str] = None,
        object_router_communitylist_rule_id: Optional[str] = None,
        regexp: Optional[str] = None,
        scopetype: Optional[str] = None) -> ObjectRouterCommunitylistRule
func GetObjectRouterCommunitylistRule(ctx *Context, name string, id IDInput, state *ObjectRouterCommunitylistRuleState, opts ...ResourceOption) (*ObjectRouterCommunitylistRule, error)
public static ObjectRouterCommunitylistRule Get(string name, Input<string> id, ObjectRouterCommunitylistRuleState? state, CustomResourceOptions? opts = null)
public static ObjectRouterCommunitylistRule get(String name, Output<String> id, ObjectRouterCommunitylistRuleState state, CustomResourceOptions options)
resources:  _:    type: fortimanager:ObjectRouterCommunitylistRule    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:
Action string
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
CommunityList string
Community List.
Fosid double
ID.
Match string
Community specifications for matching a reserved community.
ObjectRouterCommunitylistRuleId string
an identifier for the resource with format {{fosid}}.
Regexp string
Ordered list of COMMUNITY attributes as a regular expression.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
Action string
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
CommunityList string
Community List.
Fosid float64
ID.
Match string
Community specifications for matching a reserved community.
ObjectRouterCommunitylistRuleId string
an identifier for the resource with format {{fosid}}.
Regexp string
Ordered list of COMMUNITY attributes as a regular expression.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
action String
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
communityList String
Community List.
fosid Double
ID.
match String
Community specifications for matching a reserved community.
objectRouterCommunitylistRuleId String
an identifier for the resource with format {{fosid}}.
regexp String
Ordered list of COMMUNITY attributes as a regular expression.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
action string
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
communityList string
Community List.
fosid number
ID.
match string
Community specifications for matching a reserved community.
objectRouterCommunitylistRuleId string
an identifier for the resource with format {{fosid}}.
regexp string
Ordered list of COMMUNITY attributes as a regular expression.
scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
action str
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
adom str
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
community_list str
Community List.
fosid float
ID.
match str
Community specifications for matching a reserved community.
object_router_communitylist_rule_id str
an identifier for the resource with format {{fosid}}.
regexp str
Ordered list of COMMUNITY attributes as a regular expression.
scopetype str
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
action String
Permit or deny route-based operations, based on the route's COMMUNITY attribute. Valid values: deny, permit.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
communityList String
Community List.
fosid Number
ID.
match String
Community specifications for matching a reserved community.
objectRouterCommunitylistRuleId String
an identifier for the resource with format {{fosid}}.
regexp String
Ordered list of COMMUNITY attributes as a regular expression.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.

Import

ObjectRouter CommunityListRule can be imported using any of these accepted formats:

Set import_options = [“community_list=YOUR_VALUE”] in the provider section.

$ export “FORTIMANAGER_IMPORT_TABLE”=“true”

$ pulumi import fortimanager:index/objectRouterCommunitylistRule:ObjectRouterCommunitylistRule labelname {{fosid}}
Copy

$ unset “FORTIMANAGER_IMPORT_TABLE”

-> Hint: The scopetype and adom for import will directly inherit the scopetype and adom configuration of the provider.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
fortimanager fortinetdev/terraform-provider-fortimanager
License
Notes
This Pulumi package is based on the fortimanager Terraform Provider.