Class 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",
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.Vpc
Assembly: Pulumi.AliCloud.dll
Syntax
public class ForwardEntry : CustomResource
Constructors
View SourceForwardEntry(String, ForwardEntryArgs, CustomResourceOptions)
Create a ForwardEntry resource with the given unique name, arguments, and options.
Declaration
public ForwardEntry(string name, ForwardEntryArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ForwardEntryArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceExternalIp
The external ip address, the ip must along bandwidth package public ip which alicloud.vpc.NatGateway argument bandwidth_packages.
Declaration
public Output<string> ExternalIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ExternalPort
The external port, valid value is 1~65535|any.
Declaration
public Output<string> ExternalPort { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ForwardEntryId
The id of the forward entry on the server.
Declaration
public Output<string> ForwardEntryId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ForwardTableId
The value can get from alicloud.vpc.NatGateway Attributes "forward_table_ids".
Declaration
public Output<string> ForwardTableId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InternalIp
The internal ip, must a private ip.
Declaration
public Output<string> InternalIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InternalPort
The internal port, valid value is 1~65535|any.
Declaration
public Output<string> InternalPort { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IpProtocol
The ip protocal, valid value is tcp|udp|any.
Declaration
public Output<string> IpProtocol { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of forward entry.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ForwardEntryState, CustomResourceOptions)
Get an existing ForwardEntry resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ForwardEntry Get(string name, Input<string> id, ForwardEntryState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ForwardEntryState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ForwardEntry |