Provides a resource to create a VPC route policy association
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.VpcRoutePolicyAssociation("example", {
routePolicyId: "rrp-7dnu4yoi",
routeTableId: "rtb-389phpuq",
priority: 10,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.VpcRoutePolicyAssociation("example",
route_policy_id="rrp-7dnu4yoi",
route_table_id="rtb-389phpuq",
priority=10)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewVpcRoutePolicyAssociation(ctx, "example", &tencentcloud.VpcRoutePolicyAssociationArgs{
RoutePolicyId: pulumi.String("rrp-7dnu4yoi"),
RouteTableId: pulumi.String("rtb-389phpuq"),
Priority: pulumi.Float64(10),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.VpcRoutePolicyAssociation("example", new()
{
RoutePolicyId = "rrp-7dnu4yoi",
RouteTableId = "rtb-389phpuq",
Priority = 10,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.VpcRoutePolicyAssociation;
import com.pulumi.tencentcloud.VpcRoutePolicyAssociationArgs;
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 VpcRoutePolicyAssociation("example", VpcRoutePolicyAssociationArgs.builder()
.routePolicyId("rrp-7dnu4yoi")
.routeTableId("rtb-389phpuq")
.priority(10.0)
.build());
}
}
resources:
example:
type: tencentcloud:VpcRoutePolicyAssociation
properties:
routePolicyId: rrp-7dnu4yoi
routeTableId: rtb-389phpuq
priority: 10
Create VpcRoutePolicyAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcRoutePolicyAssociation(name: string, args: VpcRoutePolicyAssociationArgs, opts?: CustomResourceOptions);@overload
def VpcRoutePolicyAssociation(resource_name: str,
args: VpcRoutePolicyAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpcRoutePolicyAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
priority: Optional[float] = None,
route_policy_id: Optional[str] = None,
route_table_id: Optional[str] = None,
vpc_route_policy_association_id: Optional[str] = None)func NewVpcRoutePolicyAssociation(ctx *Context, name string, args VpcRoutePolicyAssociationArgs, opts ...ResourceOption) (*VpcRoutePolicyAssociation, error)public VpcRoutePolicyAssociation(string name, VpcRoutePolicyAssociationArgs args, CustomResourceOptions? opts = null)
public VpcRoutePolicyAssociation(String name, VpcRoutePolicyAssociationArgs args)
public VpcRoutePolicyAssociation(String name, VpcRoutePolicyAssociationArgs args, CustomResourceOptions options)
type: tencentcloud:VpcRoutePolicyAssociation
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 VpcRoutePolicyAssociationArgs
- 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 VpcRoutePolicyAssociationArgs
- 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 VpcRoutePolicyAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcRoutePolicyAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcRoutePolicyAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
VpcRoutePolicyAssociation 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 VpcRoutePolicyAssociation resource accepts the following input properties:
- Priority double
- Priority.
- Route
Policy stringId - Specifies the unique ID of the route reception policy.
- Route
Table stringId - Unique route table ID.
- Vpc
Route stringPolicy Association Id - ID of the resource.
- Priority float64
- Priority.
- Route
Policy stringId - Specifies the unique ID of the route reception policy.
- Route
Table stringId - Unique route table ID.
- Vpc
Route stringPolicy Association Id - ID of the resource.
- priority Double
- Priority.
- route
Policy StringId - Specifies the unique ID of the route reception policy.
- route
Table StringId - Unique route table ID.
- vpc
Route StringPolicy Association Id - ID of the resource.
- priority number
- Priority.
- route
Policy stringId - Specifies the unique ID of the route reception policy.
- route
Table stringId - Unique route table ID.
- vpc
Route stringPolicy Association Id - ID of the resource.
- priority float
- Priority.
- route_
policy_ strid - Specifies the unique ID of the route reception policy.
- route_
table_ strid - Unique route table ID.
- vpc_
route_ strpolicy_ association_ id - ID of the resource.
- priority Number
- Priority.
- route
Policy StringId - Specifies the unique ID of the route reception policy.
- route
Table StringId - Unique route table ID.
- vpc
Route StringPolicy Association Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcRoutePolicyAssociation 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 VpcRoutePolicyAssociation Resource
Get an existing VpcRoutePolicyAssociation 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?: VpcRoutePolicyAssociationState, opts?: CustomResourceOptions): VpcRoutePolicyAssociation@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
priority: Optional[float] = None,
route_policy_id: Optional[str] = None,
route_table_id: Optional[str] = None,
vpc_route_policy_association_id: Optional[str] = None) -> VpcRoutePolicyAssociationfunc GetVpcRoutePolicyAssociation(ctx *Context, name string, id IDInput, state *VpcRoutePolicyAssociationState, opts ...ResourceOption) (*VpcRoutePolicyAssociation, error)public static VpcRoutePolicyAssociation Get(string name, Input<string> id, VpcRoutePolicyAssociationState? state, CustomResourceOptions? opts = null)public static VpcRoutePolicyAssociation get(String name, Output<String> id, VpcRoutePolicyAssociationState state, CustomResourceOptions options)resources: _: type: tencentcloud:VpcRoutePolicyAssociation 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.
- Priority double
- Priority.
- Route
Policy stringId - Specifies the unique ID of the route reception policy.
- Route
Table stringId - Unique route table ID.
- Vpc
Route stringPolicy Association Id - ID of the resource.
- Priority float64
- Priority.
- Route
Policy stringId - Specifies the unique ID of the route reception policy.
- Route
Table stringId - Unique route table ID.
- Vpc
Route stringPolicy Association Id - ID of the resource.
- priority Double
- Priority.
- route
Policy StringId - Specifies the unique ID of the route reception policy.
- route
Table StringId - Unique route table ID.
- vpc
Route StringPolicy Association Id - ID of the resource.
- priority number
- Priority.
- route
Policy stringId - Specifies the unique ID of the route reception policy.
- route
Table stringId - Unique route table ID.
- vpc
Route stringPolicy Association Id - ID of the resource.
- priority float
- Priority.
- route_
policy_ strid - Specifies the unique ID of the route reception policy.
- route_
table_ strid - Unique route table ID.
- vpc_
route_ strpolicy_ association_ id - ID of the resource.
- priority Number
- Priority.
- route
Policy StringId - Specifies the unique ID of the route reception policy.
- route
Table StringId - Unique route table ID.
- vpc
Route StringPolicy Association Id - ID of the resource.
Import
VPC route policy association can be imported using the routePolicyId#routeTableId, e.g.
$ pulumi import tencentcloud:index/vpcRoutePolicyAssociation:VpcRoutePolicyAssociation example rrp-7dnu4yoi#rtb-389phpuq
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
