ForwardEntry
Provides a forward resource.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var config = new Config();
var name = config.Get("name") ?? "forward-entry-example-name";
var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
{
AvailableResourceCreation = "VSwitch",
}));
var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new AliCloud.Vpc.NetworkArgs
{
CidrBlock = "172.16.0.0/12",
});
var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new AliCloud.Vpc.SwitchArgs
{
AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones[0].Id),
CidrBlock = "172.16.0.0/21",
VpcId = defaultNetwork.Id,
});
var defaultNatGateway = new AliCloud.Vpc.NatGateway("defaultNatGateway", new AliCloud.Vpc.NatGatewayArgs
{
Specification = "Small",
VpcId = defaultNetwork.Id,
});
var defaultEip = new AliCloud.Ecs.Eip("defaultEip", new AliCloud.Ecs.EipArgs
{
});
var defaultEipAssociation = new AliCloud.Ecs.EipAssociation("defaultEipAssociation", new AliCloud.Ecs.EipAssociationArgs
{
AllocationId = defaultEip.Id,
InstanceId = defaultNatGateway.Id,
});
var defaultForwardEntry = new AliCloud.Vpc.ForwardEntry("defaultForwardEntry", new AliCloud.Vpc.ForwardEntryArgs
{
ExternalIp = defaultEip.IpAddress,
ExternalPort = "80",
ForwardTableId = defaultNatGateway.ForwardTableIds,
InternalIp = "172.16.0.3",
InternalPort = "8080",
IpProtocol = "tcp",
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "forward-entry-example-name"
default_zones = alicloud.get_zones(available_resource_creation="VSwitch")
default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/12")
default_switch = alicloud.vpc.Switch("defaultSwitch",
availability_zone=default_zones.zones[0]["id"],
cidr_block="172.16.0.0/21",
vpc_id=default_network.id)
default_nat_gateway = alicloud.vpc.NatGateway("defaultNatGateway",
specification="Small",
vpc_id=default_network.id)
default_eip = alicloud.ecs.Eip("defaultEip")
default_eip_association = alicloud.ecs.EipAssociation("defaultEipAssociation",
allocation_id=default_eip.id,
instance_id=default_nat_gateway.id)
default_forward_entry = alicloud.vpc.ForwardEntry("defaultForwardEntry",
external_ip=default_eip.ip_address,
external_port="80",
forward_table_id=default_nat_gateway.forward_table_ids,
internal_ip="172.16.0.3",
internal_port="8080",
ip_protocol="tcp")import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "forward-entry-example-name";
const defaultZones = pulumi.output(alicloud.getZones({
availableResourceCreation: "VSwitch",
}, { async: true }));
const defaultNetwork = new alicloud.vpc.Network("default", {
cidrBlock: "172.16.0.0/12",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
availabilityZone: defaultZones.zones[0].id,
cidrBlock: "172.16.0.0/21",
vpcId: defaultNetwork.id,
});
const defaultNatGateway = new alicloud.vpc.NatGateway("default", {
specification: "Small",
vpcId: defaultNetwork.id,
});
const defaultEip = new alicloud.ecs.Eip("default", {});
const defaultEipAssociation = new alicloud.ecs.EipAssociation("default", {
allocationId: defaultEip.id,
instanceId: defaultNatGateway.id,
});
const defaultForwardEntry = new alicloud.vpc.ForwardEntry("default", {
externalIp: defaultEip.ipAddress,
externalPort: "80",
forwardTableId: defaultNatGateway.forwardTableIds,
internalIp: "172.16.0.3",
internalPort: "8080",
ipProtocol: "tcp",
});Create a ForwardEntry Resource
new ForwardEntry(name: string, args: ForwardEntryArgs, opts?: CustomResourceOptions);def ForwardEntry(resource_name, opts=None, external_ip=None, external_port=None, forward_table_id=None, internal_ip=None, internal_port=None, ip_protocol=None, name=None, __props__=None);func NewForwardEntry(ctx *Context, name string, args ForwardEntryArgs, opts ...ResourceOption) (*ForwardEntry, error)public ForwardEntry(string name, ForwardEntryArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ForwardEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ForwardEntryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ForwardEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ForwardEntry Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ForwardEntry resource accepts the following input properties:
- External
Ip string The external ip address, the ip must along bandwidth package public ip which
alicloud.vpc.NatGatewayargumentbandwidth_packages.- External
Port string The external port, valid value is 1~65535|any.
- Forward
Table stringId The value can get from
alicloud.vpc.NatGatewayAttributes “forward_table_ids”.- Internal
Ip string The internal ip, must a private ip.
- Internal
Port string The internal port, valid value is 1~65535|any.
- Ip
Protocol string The ip protocal, valid value is tcp|udp|any.
- Name string
The name of forward entry.
- External
Ip string The external ip address, the ip must along bandwidth package public ip which
alicloud.vpc.NatGatewayargumentbandwidth_packages.- External
Port string The external port, valid value is 1~65535|any.
- Forward
Table stringId The value can get from
alicloud.vpc.NatGatewayAttributes “forward_table_ids”.- Internal
Ip string The internal ip, must a private ip.
- Internal
Port string The internal port, valid value is 1~65535|any.
- Ip
Protocol string The ip protocal, valid value is tcp|udp|any.
- Name string
The name of forward entry.
- external
Ip string The external ip address, the ip must along bandwidth package public ip which
alicloud.vpc.NatGatewayargumentbandwidth_packages.- external
Port string The external port, valid value is 1~65535|any.
- forward
Table stringId The value can get from
alicloud.vpc.NatGatewayAttributes “forward_table_ids”.- internal
Ip string The internal ip, must a private ip.
- internal
Port string The internal port, valid value is 1~65535|any.
- ip
Protocol string The ip protocal, valid value is tcp|udp|any.
- name string
The name of forward entry.
- external_
ip str The external ip address, the ip must along bandwidth package public ip which
alicloud.vpc.NatGatewayargumentbandwidth_packages.- external_
port str The external port, valid value is 1~65535|any.
- forward_
table_ strid The value can get from
alicloud.vpc.NatGatewayAttributes “forward_table_ids”.- internal_
ip str The internal ip, must a private ip.
- internal_
port str The internal port, valid value is 1~65535|any.
- ip_
protocol str The ip protocal, valid value is tcp|udp|any.
- name str
The name of forward entry.
Outputs
All input properties are implicitly available as output properties. Additionally, the ForwardEntry resource produces the following output properties:
- Forward
Entry stringId The id of the forward entry on the server.
- Id string
- The provider-assigned unique ID for this managed resource.
- Forward
Entry stringId The id of the forward entry on the server.
- Id string
- The provider-assigned unique ID for this managed resource.
- forward
Entry stringId The id of the forward entry on the server.
- id string
- The provider-assigned unique ID for this managed resource.
- forward_
entry_ strid The id of the forward entry on the server.
- id str
- The provider-assigned unique ID for this managed resource.
Look up an Existing ForwardEntry Resource
Get an existing ForwardEntry 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?: ForwardEntryState, opts?: CustomResourceOptions): ForwardEntrystatic get(resource_name, id, opts=None, external_ip=None, external_port=None, forward_entry_id=None, forward_table_id=None, internal_ip=None, internal_port=None, ip_protocol=None, name=None, __props__=None);func GetForwardEntry(ctx *Context, name string, id IDInput, state *ForwardEntryState, opts ...ResourceOption) (*ForwardEntry, error)public static ForwardEntry Get(string name, Input<string> id, ForwardEntryState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- External
Ip string The external ip address, the ip must along bandwidth package public ip which
alicloud.vpc.NatGatewayargumentbandwidth_packages.- External
Port string The external port, valid value is 1~65535|any.
- Forward
Entry stringId The id of the forward entry on the server.
- Forward
Table stringId The value can get from
alicloud.vpc.NatGatewayAttributes “forward_table_ids”.- Internal
Ip string The internal ip, must a private ip.
- Internal
Port string The internal port, valid value is 1~65535|any.
- Ip
Protocol string The ip protocal, valid value is tcp|udp|any.
- Name string
The name of forward entry.
- External
Ip string The external ip address, the ip must along bandwidth package public ip which
alicloud.vpc.NatGatewayargumentbandwidth_packages.- External
Port string The external port, valid value is 1~65535|any.
- Forward
Entry stringId The id of the forward entry on the server.
- Forward
Table stringId The value can get from
alicloud.vpc.NatGatewayAttributes “forward_table_ids”.- Internal
Ip string The internal ip, must a private ip.
- Internal
Port string The internal port, valid value is 1~65535|any.
- Ip
Protocol string The ip protocal, valid value is tcp|udp|any.
- Name string
The name of forward entry.
- external
Ip string The external ip address, the ip must along bandwidth package public ip which
alicloud.vpc.NatGatewayargumentbandwidth_packages.- external
Port string The external port, valid value is 1~65535|any.
- forward
Entry stringId The id of the forward entry on the server.
- forward
Table stringId The value can get from
alicloud.vpc.NatGatewayAttributes “forward_table_ids”.- internal
Ip string The internal ip, must a private ip.
- internal
Port string The internal port, valid value is 1~65535|any.
- ip
Protocol string The ip protocal, valid value is tcp|udp|any.
- name string
The name of forward entry.
- external_
ip str The external ip address, the ip must along bandwidth package public ip which
alicloud.vpc.NatGatewayargumentbandwidth_packages.- external_
port str The external port, valid value is 1~65535|any.
- forward_
entry_ strid The id of the forward entry on the server.
- forward_
table_ strid The value can get from
alicloud.vpc.NatGatewayAttributes “forward_table_ids”.- internal_
ip str The internal ip, must a private ip.
- internal_
port str The internal port, valid value is 1~65535|any.
- ip_
protocol str The ip protocal, valid value is tcp|udp|any.
- name str
The name of forward entry.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.