tencentcloud.PrivateDnsForwardRule
Explore with Pulumi AI
Provides a resource to create a privatedns forward rule
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const examplePrivateDnsExtendEndPoint = new tencentcloud.PrivateDnsExtendEndPoint("examplePrivateDnsExtendEndPoint", {
endPointName: "tf-example",
endPointRegion: "ap-jakarta",
forwardIp: {
accessType: "CCN",
host: "1.1.1.1",
port: 8080,
vpcId: "vpc-2qjckjg2",
accessGatewayId: "ccn-eo13f8ub",
},
});
const examplePrivateDnsForwardRule = new tencentcloud.PrivateDnsForwardRule("examplePrivateDnsForwardRule", {
ruleName: "tf-example",
ruleType: "DOWN",
zoneId: "zone-cmmbvaq8",
endPointId: examplePrivateDnsExtendEndPoint.privateDnsExtendEndPointId,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example_private_dns_extend_end_point = tencentcloud.PrivateDnsExtendEndPoint("examplePrivateDnsExtendEndPoint",
end_point_name="tf-example",
end_point_region="ap-jakarta",
forward_ip={
"access_type": "CCN",
"host": "1.1.1.1",
"port": 8080,
"vpc_id": "vpc-2qjckjg2",
"access_gateway_id": "ccn-eo13f8ub",
})
example_private_dns_forward_rule = tencentcloud.PrivateDnsForwardRule("examplePrivateDnsForwardRule",
rule_name="tf-example",
rule_type="DOWN",
zone_id="zone-cmmbvaq8",
end_point_id=example_private_dns_extend_end_point.private_dns_extend_end_point_id)
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 {
examplePrivateDnsExtendEndPoint, err := tencentcloud.NewPrivateDnsExtendEndPoint(ctx, "examplePrivateDnsExtendEndPoint", &tencentcloud.PrivateDnsExtendEndPointArgs{
EndPointName: pulumi.String("tf-example"),
EndPointRegion: pulumi.String("ap-jakarta"),
ForwardIp: &tencentcloud.PrivateDnsExtendEndPointForwardIpArgs{
AccessType: pulumi.String("CCN"),
Host: pulumi.String("1.1.1.1"),
Port: pulumi.Float64(8080),
VpcId: pulumi.String("vpc-2qjckjg2"),
AccessGatewayId: pulumi.String("ccn-eo13f8ub"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewPrivateDnsForwardRule(ctx, "examplePrivateDnsForwardRule", &tencentcloud.PrivateDnsForwardRuleArgs{
RuleName: pulumi.String("tf-example"),
RuleType: pulumi.String("DOWN"),
ZoneId: pulumi.String("zone-cmmbvaq8"),
EndPointId: examplePrivateDnsExtendEndPoint.PrivateDnsExtendEndPointId,
})
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 examplePrivateDnsExtendEndPoint = new Tencentcloud.PrivateDnsExtendEndPoint("examplePrivateDnsExtendEndPoint", new()
{
EndPointName = "tf-example",
EndPointRegion = "ap-jakarta",
ForwardIp = new Tencentcloud.Inputs.PrivateDnsExtendEndPointForwardIpArgs
{
AccessType = "CCN",
Host = "1.1.1.1",
Port = 8080,
VpcId = "vpc-2qjckjg2",
AccessGatewayId = "ccn-eo13f8ub",
},
});
var examplePrivateDnsForwardRule = new Tencentcloud.PrivateDnsForwardRule("examplePrivateDnsForwardRule", new()
{
RuleName = "tf-example",
RuleType = "DOWN",
ZoneId = "zone-cmmbvaq8",
EndPointId = examplePrivateDnsExtendEndPoint.PrivateDnsExtendEndPointId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PrivateDnsExtendEndPoint;
import com.pulumi.tencentcloud.PrivateDnsExtendEndPointArgs;
import com.pulumi.tencentcloud.inputs.PrivateDnsExtendEndPointForwardIpArgs;
import com.pulumi.tencentcloud.PrivateDnsForwardRule;
import com.pulumi.tencentcloud.PrivateDnsForwardRuleArgs;
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 examplePrivateDnsExtendEndPoint = new PrivateDnsExtendEndPoint("examplePrivateDnsExtendEndPoint", PrivateDnsExtendEndPointArgs.builder()
.endPointName("tf-example")
.endPointRegion("ap-jakarta")
.forwardIp(PrivateDnsExtendEndPointForwardIpArgs.builder()
.accessType("CCN")
.host("1.1.1.1")
.port(8080)
.vpcId("vpc-2qjckjg2")
.accessGatewayId("ccn-eo13f8ub")
.build())
.build());
var examplePrivateDnsForwardRule = new PrivateDnsForwardRule("examplePrivateDnsForwardRule", PrivateDnsForwardRuleArgs.builder()
.ruleName("tf-example")
.ruleType("DOWN")
.zoneId("zone-cmmbvaq8")
.endPointId(examplePrivateDnsExtendEndPoint.privateDnsExtendEndPointId())
.build());
}
}
resources:
examplePrivateDnsExtendEndPoint:
type: tencentcloud:PrivateDnsExtendEndPoint
properties:
endPointName: tf-example
endPointRegion: ap-jakarta
forwardIp:
accessType: CCN
host: 1.1.1.1
port: 8080
vpcId: vpc-2qjckjg2
accessGatewayId: ccn-eo13f8ub
examplePrivateDnsForwardRule:
type: tencentcloud:PrivateDnsForwardRule
properties:
ruleName: tf-example
ruleType: DOWN
zoneId: zone-cmmbvaq8
endPointId: ${examplePrivateDnsExtendEndPoint.privateDnsExtendEndPointId}
Create PrivateDnsForwardRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PrivateDnsForwardRule(name: string, args: PrivateDnsForwardRuleArgs, opts?: CustomResourceOptions);
@overload
def PrivateDnsForwardRule(resource_name: str,
args: PrivateDnsForwardRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PrivateDnsForwardRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
end_point_id: Optional[str] = None,
rule_name: Optional[str] = None,
rule_type: Optional[str] = None,
zone_id: Optional[str] = None,
private_dns_forward_rule_id: Optional[str] = None)
func NewPrivateDnsForwardRule(ctx *Context, name string, args PrivateDnsForwardRuleArgs, opts ...ResourceOption) (*PrivateDnsForwardRule, error)
public PrivateDnsForwardRule(string name, PrivateDnsForwardRuleArgs args, CustomResourceOptions? opts = null)
public PrivateDnsForwardRule(String name, PrivateDnsForwardRuleArgs args)
public PrivateDnsForwardRule(String name, PrivateDnsForwardRuleArgs args, CustomResourceOptions options)
type: tencentcloud:PrivateDnsForwardRule
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 PrivateDnsForwardRuleArgs
- 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 PrivateDnsForwardRuleArgs
- 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 PrivateDnsForwardRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrivateDnsForwardRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PrivateDnsForwardRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PrivateDnsForwardRule 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 PrivateDnsForwardRule resource accepts the following input properties:
- End
Point stringId - Endpoint ID.
- Rule
Name string - Forwarding rule name.
- Rule
Type string - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- Zone
Id string - Private domain ID, which can be viewed on the private domain list page.
- Private
Dns stringForward Rule Id - ID of the resource.
- End
Point stringId - Endpoint ID.
- Rule
Name string - Forwarding rule name.
- Rule
Type string - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- Zone
Id string - Private domain ID, which can be viewed on the private domain list page.
- Private
Dns stringForward Rule Id - ID of the resource.
- end
Point StringId - Endpoint ID.
- rule
Name String - Forwarding rule name.
- rule
Type String - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- zone
Id String - Private domain ID, which can be viewed on the private domain list page.
- private
Dns StringForward Rule Id - ID of the resource.
- end
Point stringId - Endpoint ID.
- rule
Name string - Forwarding rule name.
- rule
Type string - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- zone
Id string - Private domain ID, which can be viewed on the private domain list page.
- private
Dns stringForward Rule Id - ID of the resource.
- end_
point_ strid - Endpoint ID.
- rule_
name str - Forwarding rule name.
- rule_
type str - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- zone_
id str - Private domain ID, which can be viewed on the private domain list page.
- private_
dns_ strforward_ rule_ id - ID of the resource.
- end
Point StringId - Endpoint ID.
- rule
Name String - Forwarding rule name.
- rule
Type String - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- zone
Id String - Private domain ID, which can be viewed on the private domain list page.
- private
Dns StringForward Rule Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PrivateDnsForwardRule 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 PrivateDnsForwardRule Resource
Get an existing PrivateDnsForwardRule 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?: PrivateDnsForwardRuleState, opts?: CustomResourceOptions): PrivateDnsForwardRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
end_point_id: Optional[str] = None,
private_dns_forward_rule_id: Optional[str] = None,
rule_name: Optional[str] = None,
rule_type: Optional[str] = None,
zone_id: Optional[str] = None) -> PrivateDnsForwardRule
func GetPrivateDnsForwardRule(ctx *Context, name string, id IDInput, state *PrivateDnsForwardRuleState, opts ...ResourceOption) (*PrivateDnsForwardRule, error)
public static PrivateDnsForwardRule Get(string name, Input<string> id, PrivateDnsForwardRuleState? state, CustomResourceOptions? opts = null)
public static PrivateDnsForwardRule get(String name, Output<String> id, PrivateDnsForwardRuleState state, CustomResourceOptions options)
resources: _: type: tencentcloud:PrivateDnsForwardRule 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.
- End
Point stringId - Endpoint ID.
- Private
Dns stringForward Rule Id - ID of the resource.
- Rule
Name string - Forwarding rule name.
- Rule
Type string - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- Zone
Id string - Private domain ID, which can be viewed on the private domain list page.
- End
Point stringId - Endpoint ID.
- Private
Dns stringForward Rule Id - ID of the resource.
- Rule
Name string - Forwarding rule name.
- Rule
Type string - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- Zone
Id string - Private domain ID, which can be viewed on the private domain list page.
- end
Point StringId - Endpoint ID.
- private
Dns StringForward Rule Id - ID of the resource.
- rule
Name String - Forwarding rule name.
- rule
Type String - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- zone
Id String - Private domain ID, which can be viewed on the private domain list page.
- end
Point stringId - Endpoint ID.
- private
Dns stringForward Rule Id - ID of the resource.
- rule
Name string - Forwarding rule name.
- rule
Type string - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- zone
Id string - Private domain ID, which can be viewed on the private domain list page.
- end_
point_ strid - Endpoint ID.
- private_
dns_ strforward_ rule_ id - ID of the resource.
- rule_
name str - Forwarding rule name.
- rule_
type str - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- zone_
id str - Private domain ID, which can be viewed on the private domain list page.
- end
Point StringId - Endpoint ID.
- private
Dns StringForward Rule Id - ID of the resource.
- rule
Name String - Forwarding rule name.
- rule
Type String - Forwarding rule type. DOWN: From cloud to off-cloud; UP: From off-cloud to cloud.
- zone
Id String - Private domain ID, which can be viewed on the private domain list page.
Import
private dns forward rule can be imported using the id, e.g.
$ pulumi import tencentcloud:index/privateDnsForwardRule:PrivateDnsForwardRule example fid-dbc2c0a97c
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
tencentcloud
Terraform Provider.