ibm.TgConnectionPrefixFilter
Explore with Pulumi AI
Create, update and delete for the transit gateways connection’s prefix filter resource. For more information, about Transit Gateway connection prefix filters, see adding and deleting prefix filters.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const testTgPrefixFilter = new ibm.TgConnectionPrefixFilter("testTgPrefixFilter", {
gateway: ibm_tg_gateway.new_tg_gw.id,
connectionId: ibm_tg_connection.test_ibm_tg_connection.connection_id,
action: "permit",
prefix: "192.168.100.0/24",
le: 0,
ge: 32,
});
import pulumi
import pulumi_ibm as ibm
test_tg_prefix_filter = ibm.TgConnectionPrefixFilter("testTgPrefixFilter",
gateway=ibm_tg_gateway["new_tg_gw"]["id"],
connection_id=ibm_tg_connection["test_ibm_tg_connection"]["connection_id"],
action="permit",
prefix="192.168.100.0/24",
le=0,
ge=32)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.NewTgConnectionPrefixFilter(ctx, "testTgPrefixFilter", &ibm.TgConnectionPrefixFilterArgs{
Gateway: pulumi.Any(ibm_tg_gateway.New_tg_gw.Id),
ConnectionId: pulumi.Any(ibm_tg_connection.Test_ibm_tg_connection.Connection_id),
Action: pulumi.String("permit"),
Prefix: pulumi.String("192.168.100.0/24"),
Le: pulumi.Float64(0),
Ge: pulumi.Float64(32),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var testTgPrefixFilter = new Ibm.TgConnectionPrefixFilter("testTgPrefixFilter", new()
{
Gateway = ibm_tg_gateway.New_tg_gw.Id,
ConnectionId = ibm_tg_connection.Test_ibm_tg_connection.Connection_id,
Action = "permit",
Prefix = "192.168.100.0/24",
Le = 0,
Ge = 32,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.TgConnectionPrefixFilter;
import com.pulumi.ibm.TgConnectionPrefixFilterArgs;
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 testTgPrefixFilter = new TgConnectionPrefixFilter("testTgPrefixFilter", TgConnectionPrefixFilterArgs.builder()
.gateway(ibm_tg_gateway.new_tg_gw().id())
.connectionId(ibm_tg_connection.test_ibm_tg_connection().connection_id())
.action("permit")
.prefix("192.168.100.0/24")
.le(0)
.ge(32)
.build());
}
}
resources:
testTgPrefixFilter:
type: ibm:TgConnectionPrefixFilter
properties:
gateway: ${ibm_tg_gateway.new_tg_gw.id}
connectionId: ${ibm_tg_connection.test_ibm_tg_connection.connection_id}
action: permit
prefix: 192.168.100.0/24
le: 0
ge: 32
Create TgConnectionPrefixFilter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TgConnectionPrefixFilter(name: string, args: TgConnectionPrefixFilterArgs, opts?: CustomResourceOptions);
@overload
def TgConnectionPrefixFilter(resource_name: str,
args: TgConnectionPrefixFilterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TgConnectionPrefixFilter(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
connection_id: Optional[str] = None,
gateway: Optional[str] = None,
prefix: Optional[str] = None,
before: Optional[str] = None,
ge: Optional[float] = None,
le: Optional[float] = None,
tg_connection_prefix_filter_id: Optional[str] = None,
timeouts: Optional[TgConnectionPrefixFilterTimeoutsArgs] = None)
func NewTgConnectionPrefixFilter(ctx *Context, name string, args TgConnectionPrefixFilterArgs, opts ...ResourceOption) (*TgConnectionPrefixFilter, error)
public TgConnectionPrefixFilter(string name, TgConnectionPrefixFilterArgs args, CustomResourceOptions? opts = null)
public TgConnectionPrefixFilter(String name, TgConnectionPrefixFilterArgs args)
public TgConnectionPrefixFilter(String name, TgConnectionPrefixFilterArgs args, CustomResourceOptions options)
type: ibm:TgConnectionPrefixFilter
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 TgConnectionPrefixFilterArgs
- 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 TgConnectionPrefixFilterArgs
- 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 TgConnectionPrefixFilterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TgConnectionPrefixFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TgConnectionPrefixFilterArgs
- 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 tgConnectionPrefixFilterResource = new Ibm.TgConnectionPrefixFilter("tgConnectionPrefixFilterResource", new()
{
Action = "string",
ConnectionId = "string",
Gateway = "string",
Prefix = "string",
Before = "string",
Ge = 0,
Le = 0,
TgConnectionPrefixFilterId = "string",
Timeouts = new Ibm.Inputs.TgConnectionPrefixFilterTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := ibm.NewTgConnectionPrefixFilter(ctx, "tgConnectionPrefixFilterResource", &ibm.TgConnectionPrefixFilterArgs{
Action: pulumi.String("string"),
ConnectionId: pulumi.String("string"),
Gateway: pulumi.String("string"),
Prefix: pulumi.String("string"),
Before: pulumi.String("string"),
Ge: pulumi.Float64(0),
Le: pulumi.Float64(0),
TgConnectionPrefixFilterId: pulumi.String("string"),
Timeouts: &ibm.TgConnectionPrefixFilterTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var tgConnectionPrefixFilterResource = new TgConnectionPrefixFilter("tgConnectionPrefixFilterResource", TgConnectionPrefixFilterArgs.builder()
.action("string")
.connectionId("string")
.gateway("string")
.prefix("string")
.before("string")
.ge(0)
.le(0)
.tgConnectionPrefixFilterId("string")
.timeouts(TgConnectionPrefixFilterTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
tg_connection_prefix_filter_resource = ibm.TgConnectionPrefixFilter("tgConnectionPrefixFilterResource",
action="string",
connection_id="string",
gateway="string",
prefix="string",
before="string",
ge=0,
le=0,
tg_connection_prefix_filter_id="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const tgConnectionPrefixFilterResource = new ibm.TgConnectionPrefixFilter("tgConnectionPrefixFilterResource", {
action: "string",
connectionId: "string",
gateway: "string",
prefix: "string",
before: "string",
ge: 0,
le: 0,
tgConnectionPrefixFilterId: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: ibm:TgConnectionPrefixFilter
properties:
action: string
before: string
connectionId: string
gateway: string
ge: 0
le: 0
prefix: string
tgConnectionPrefixFilterId: string
timeouts:
create: string
delete: string
update: string
TgConnectionPrefixFilter 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 TgConnectionPrefixFilter resource accepts the following input properties:
- Action string
- Whether to permit or deny the prefix filter
- Connection
Id string - The unique identifier of the gateway connection
- Gateway string
- The unique identifier of the gateway.
- Prefix string
- The IP Prefix
- Before string
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- Ge double
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- Le double
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- Tg
Connection stringPrefix Filter Id - Timeouts
Tg
Connection Prefix Filter Timeouts
- Action string
- Whether to permit or deny the prefix filter
- Connection
Id string - The unique identifier of the gateway connection
- Gateway string
- The unique identifier of the gateway.
- Prefix string
- The IP Prefix
- Before string
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- Ge float64
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- Le float64
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- Tg
Connection stringPrefix Filter Id - Timeouts
Tg
Connection Prefix Filter Timeouts Args
- action String
- Whether to permit or deny the prefix filter
- connection
Id String - The unique identifier of the gateway connection
- gateway String
- The unique identifier of the gateway.
- prefix String
- The IP Prefix
- before String
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- ge Double
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- le Double
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- tg
Connection StringPrefix Filter Id - timeouts
Tg
Connection Prefix Filter Timeouts
- action string
- Whether to permit or deny the prefix filter
- connection
Id string - The unique identifier of the gateway connection
- gateway string
- The unique identifier of the gateway.
- prefix string
- The IP Prefix
- before string
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- ge number
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- le number
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- tg
Connection stringPrefix Filter Id - timeouts
Tg
Connection Prefix Filter Timeouts
- action str
- Whether to permit or deny the prefix filter
- connection_
id str - The unique identifier of the gateway connection
- gateway str
- The unique identifier of the gateway.
- prefix str
- The IP Prefix
- before str
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- ge float
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- le float
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- tg_
connection_ strprefix_ filter_ id - timeouts
Tg
Connection Prefix Filter Timeouts Args
- action String
- Whether to permit or deny the prefix filter
- connection
Id String - The unique identifier of the gateway connection
- gateway String
- The unique identifier of the gateway.
- prefix String
- The IP Prefix
- before String
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- ge Number
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- le Number
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- tg
Connection StringPrefix Filter Id - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the TgConnectionPrefixFilter resource produces the following output properties:
- created_
at str - (String) The date and time resource is created.
- filter_
id str - (String) The unique identifier of this prefix filter.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - (String) The date and time resource is last updated.
Look up Existing TgConnectionPrefixFilter Resource
Get an existing TgConnectionPrefixFilter 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?: TgConnectionPrefixFilterState, opts?: CustomResourceOptions): TgConnectionPrefixFilter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
before: Optional[str] = None,
connection_id: Optional[str] = None,
created_at: Optional[str] = None,
filter_id: Optional[str] = None,
gateway: Optional[str] = None,
ge: Optional[float] = None,
le: Optional[float] = None,
prefix: Optional[str] = None,
tg_connection_prefix_filter_id: Optional[str] = None,
timeouts: Optional[TgConnectionPrefixFilterTimeoutsArgs] = None,
updated_at: Optional[str] = None) -> TgConnectionPrefixFilter
func GetTgConnectionPrefixFilter(ctx *Context, name string, id IDInput, state *TgConnectionPrefixFilterState, opts ...ResourceOption) (*TgConnectionPrefixFilter, error)
public static TgConnectionPrefixFilter Get(string name, Input<string> id, TgConnectionPrefixFilterState? state, CustomResourceOptions? opts = null)
public static TgConnectionPrefixFilter get(String name, Output<String> id, TgConnectionPrefixFilterState state, CustomResourceOptions options)
resources: _: type: ibm:TgConnectionPrefixFilter get: id: ${id}
- 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.
- Action string
- Whether to permit or deny the prefix filter
- Before string
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- Connection
Id string - The unique identifier of the gateway connection
- Created
At string - (String) The date and time resource is created.
- Filter
Id string - (String) The unique identifier of this prefix filter.
- Gateway string
- The unique identifier of the gateway.
- Ge double
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- Le double
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- Prefix string
- The IP Prefix
- Tg
Connection stringPrefix Filter Id - Timeouts
Tg
Connection Prefix Filter Timeouts - Updated
At string - (String) The date and time resource is last updated.
- Action string
- Whether to permit or deny the prefix filter
- Before string
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- Connection
Id string - The unique identifier of the gateway connection
- Created
At string - (String) The date and time resource is created.
- Filter
Id string - (String) The unique identifier of this prefix filter.
- Gateway string
- The unique identifier of the gateway.
- Ge float64
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- Le float64
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- Prefix string
- The IP Prefix
- Tg
Connection stringPrefix Filter Id - Timeouts
Tg
Connection Prefix Filter Timeouts Args - Updated
At string - (String) The date and time resource is last updated.
- action String
- Whether to permit or deny the prefix filter
- before String
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- connection
Id String - The unique identifier of the gateway connection
- created
At String - (String) The date and time resource is created.
- filter
Id String - (String) The unique identifier of this prefix filter.
- gateway String
- The unique identifier of the gateway.
- ge Double
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- le Double
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- prefix String
- The IP Prefix
- tg
Connection StringPrefix Filter Id - timeouts
Tg
Connection Prefix Filter Timeouts - updated
At String - (String) The date and time resource is last updated.
- action string
- Whether to permit or deny the prefix filter
- before string
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- connection
Id string - The unique identifier of the gateway connection
- created
At string - (String) The date and time resource is created.
- filter
Id string - (String) The unique identifier of this prefix filter.
- gateway string
- The unique identifier of the gateway.
- ge number
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- le number
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- prefix string
- The IP Prefix
- tg
Connection stringPrefix Filter Id - timeouts
Tg
Connection Prefix Filter Timeouts - updated
At string - (String) The date and time resource is last updated.
- action str
- Whether to permit or deny the prefix filter
- before str
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- connection_
id str - The unique identifier of the gateway connection
- created_
at str - (String) The date and time resource is created.
- filter_
id str - (String) The unique identifier of this prefix filter.
- gateway str
- The unique identifier of the gateway.
- ge float
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- le float
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- prefix str
- The IP Prefix
- tg_
connection_ strprefix_ filter_ id - timeouts
Tg
Connection Prefix Filter Timeouts Args - updated_
at str - (String) The date and time resource is last updated.
- action String
- Whether to permit or deny the prefix filter
- before String
- Identifier of prefix filter that handles the ordering and follow semantics. When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.
- connection
Id String - The unique identifier of the gateway connection
- created
At String - (String) The date and time resource is created.
- filter
Id String - (String) The unique identifier of this prefix filter.
- gateway String
- The unique identifier of the gateway.
- ge Number
- The IP Prefix GE. The GE (greater than or equal to) value can be included to match all less-specific prefixes within a parent prefix above a certain length.
- le Number
- The IP Prefix LE. The LE (less than or equal to) value can be included to match all more-specific prefixes within a parent prefix up to a certain length.
- prefix String
- The IP Prefix
- tg
Connection StringPrefix Filter Id - timeouts Property Map
- updated
At String - (String) The date and time resource is last updated.
Supporting Types
TgConnectionPrefixFilterTimeouts, TgConnectionPrefixFilterTimeoutsArgs
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.