1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. EipAddressTransform
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.EipAddressTransform

Explore with Pulumi AI

Provides a resource to create a eip address_transform

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create vpc subnet
const subnet = new tencentcloud.Subnet("subnet", {
    vpcId: vpc.vpcId,
    availabilityZone: "ap-guangzhou-6",
    cidrBlock: "10.0.20.0/28",
    isMulticast: false,
});
// create cvm
const exampleInstance = new tencentcloud.Instance("exampleInstance", {
    instanceName: "tf_example",
    availabilityZone: "ap-guangzhou-6",
    imageId: "img-9qrfy1xt",
    instanceType: "SA3.MEDIUM4",
    systemDiskType: "CLOUD_HSSD",
    systemDiskSize: 100,
    hostname: "example",
    projectId: 0,
    vpcId: vpc.vpcId,
    subnetId: subnet.subnetId,
    allocatePublicIp: true,
    internetMaxBandwidthOut: 10,
    dataDisks: [{
        dataDiskType: "CLOUD_HSSD",
        dataDiskSize: 50,
        encrypt: false,
    }],
    tags: {
        tagKey: "tagValue",
    },
});
const exampleEipAddressTransform = new tencentcloud.EipAddressTransform("exampleEipAddressTransform", {instanceId: exampleInstance.instanceId});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create vpc subnet
subnet = tencentcloud.Subnet("subnet",
    vpc_id=vpc.vpc_id,
    availability_zone="ap-guangzhou-6",
    cidr_block="10.0.20.0/28",
    is_multicast=False)
# create cvm
example_instance = tencentcloud.Instance("exampleInstance",
    instance_name="tf_example",
    availability_zone="ap-guangzhou-6",
    image_id="img-9qrfy1xt",
    instance_type="SA3.MEDIUM4",
    system_disk_type="CLOUD_HSSD",
    system_disk_size=100,
    hostname="example",
    project_id=0,
    vpc_id=vpc.vpc_id,
    subnet_id=subnet.subnet_id,
    allocate_public_ip=True,
    internet_max_bandwidth_out=10,
    data_disks=[{
        "data_disk_type": "CLOUD_HSSD",
        "data_disk_size": 50,
        "encrypt": False,
    }],
    tags={
        "tagKey": "tagValue",
    })
example_eip_address_transform = tencentcloud.EipAddressTransform("exampleEipAddressTransform", instance_id=example_instance.instance_id)
Copy
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 {
		// create vpc
		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
			CidrBlock: pulumi.String("10.0.0.0/16"),
		})
		if err != nil {
			return err
		}
		// create vpc subnet
		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
			VpcId:            vpc.VpcId,
			AvailabilityZone: pulumi.String("ap-guangzhou-6"),
			CidrBlock:        pulumi.String("10.0.20.0/28"),
			IsMulticast:      pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		// create cvm
		exampleInstance, err := tencentcloud.NewInstance(ctx, "exampleInstance", &tencentcloud.InstanceArgs{
			InstanceName:            pulumi.String("tf_example"),
			AvailabilityZone:        pulumi.String("ap-guangzhou-6"),
			ImageId:                 pulumi.String("img-9qrfy1xt"),
			InstanceType:            pulumi.String("SA3.MEDIUM4"),
			SystemDiskType:          pulumi.String("CLOUD_HSSD"),
			SystemDiskSize:          pulumi.Float64(100),
			Hostname:                pulumi.String("example"),
			ProjectId:               pulumi.Float64(0),
			VpcId:                   vpc.VpcId,
			SubnetId:                subnet.SubnetId,
			AllocatePublicIp:        pulumi.Bool(true),
			InternetMaxBandwidthOut: pulumi.Float64(10),
			DataDisks: tencentcloud.InstanceDataDiskArray{
				&tencentcloud.InstanceDataDiskArgs{
					DataDiskType: pulumi.String("CLOUD_HSSD"),
					DataDiskSize: pulumi.Float64(50),
					Encrypt:      pulumi.Bool(false),
				},
			},
			Tags: pulumi.StringMap{
				"tagKey": pulumi.String("tagValue"),
			},
		})
		if err != nil {
			return err
		}
		_, err = tencentcloud.NewEipAddressTransform(ctx, "exampleEipAddressTransform", &tencentcloud.EipAddressTransformArgs{
			InstanceId: exampleInstance.InstanceId,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    // create vpc
    var vpc = new Tencentcloud.Vpc("vpc", new()
    {
        CidrBlock = "10.0.0.0/16",
    });

    // create vpc subnet
    var subnet = new Tencentcloud.Subnet("subnet", new()
    {
        VpcId = vpc.VpcId,
        AvailabilityZone = "ap-guangzhou-6",
        CidrBlock = "10.0.20.0/28",
        IsMulticast = false,
    });

    // create cvm
    var exampleInstance = new Tencentcloud.Instance("exampleInstance", new()
    {
        InstanceName = "tf_example",
        AvailabilityZone = "ap-guangzhou-6",
        ImageId = "img-9qrfy1xt",
        InstanceType = "SA3.MEDIUM4",
        SystemDiskType = "CLOUD_HSSD",
        SystemDiskSize = 100,
        Hostname = "example",
        ProjectId = 0,
        VpcId = vpc.VpcId,
        SubnetId = subnet.SubnetId,
        AllocatePublicIp = true,
        InternetMaxBandwidthOut = 10,
        DataDisks = new[]
        {
            new Tencentcloud.Inputs.InstanceDataDiskArgs
            {
                DataDiskType = "CLOUD_HSSD",
                DataDiskSize = 50,
                Encrypt = false,
            },
        },
        Tags = 
        {
            { "tagKey", "tagValue" },
        },
    });

    var exampleEipAddressTransform = new Tencentcloud.EipAddressTransform("exampleEipAddressTransform", new()
    {
        InstanceId = exampleInstance.InstanceId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.Instance;
import com.pulumi.tencentcloud.InstanceArgs;
import com.pulumi.tencentcloud.inputs.InstanceDataDiskArgs;
import com.pulumi.tencentcloud.EipAddressTransform;
import com.pulumi.tencentcloud.EipAddressTransformArgs;
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) {
        // create vpc
        var vpc = new Vpc("vpc", VpcArgs.builder()
            .cidrBlock("10.0.0.0/16")
            .build());

        // create vpc subnet
        var subnet = new Subnet("subnet", SubnetArgs.builder()
            .vpcId(vpc.vpcId())
            .availabilityZone("ap-guangzhou-6")
            .cidrBlock("10.0.20.0/28")
            .isMulticast(false)
            .build());

        // create cvm
        var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
            .instanceName("tf_example")
            .availabilityZone("ap-guangzhou-6")
            .imageId("img-9qrfy1xt")
            .instanceType("SA3.MEDIUM4")
            .systemDiskType("CLOUD_HSSD")
            .systemDiskSize(100)
            .hostname("example")
            .projectId(0)
            .vpcId(vpc.vpcId())
            .subnetId(subnet.subnetId())
            .allocatePublicIp(true)
            .internetMaxBandwidthOut(10)
            .dataDisks(InstanceDataDiskArgs.builder()
                .dataDiskType("CLOUD_HSSD")
                .dataDiskSize(50)
                .encrypt(false)
                .build())
            .tags(Map.of("tagKey", "tagValue"))
            .build());

        var exampleEipAddressTransform = new EipAddressTransform("exampleEipAddressTransform", EipAddressTransformArgs.builder()
            .instanceId(exampleInstance.instanceId())
            .build());

    }
}
Copy
resources:
  # create vpc
  vpc:
    type: tencentcloud:Vpc
    properties:
      cidrBlock: 10.0.0.0/16
  # create vpc subnet
  subnet:
    type: tencentcloud:Subnet
    properties:
      vpcId: ${vpc.vpcId}
      availabilityZone: ap-guangzhou-6
      cidrBlock: 10.0.20.0/28
      isMulticast: false
  # create cvm
  exampleInstance:
    type: tencentcloud:Instance
    properties:
      instanceName: tf_example
      availabilityZone: ap-guangzhou-6
      imageId: img-9qrfy1xt
      instanceType: SA3.MEDIUM4
      systemDiskType: CLOUD_HSSD
      systemDiskSize: 100
      hostname: example
      projectId: 0
      vpcId: ${vpc.vpcId}
      subnetId: ${subnet.subnetId}
      allocatePublicIp: true
      internetMaxBandwidthOut: 10
      dataDisks:
        - dataDiskType: CLOUD_HSSD
          dataDiskSize: 50
          encrypt: false
      tags:
        tagKey: tagValue
  exampleEipAddressTransform:
    type: tencentcloud:EipAddressTransform
    properties:
      instanceId: ${exampleInstance.instanceId}
Copy

Create EipAddressTransform Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new EipAddressTransform(name: string, args: EipAddressTransformArgs, opts?: CustomResourceOptions);
@overload
def EipAddressTransform(resource_name: str,
                        args: EipAddressTransformArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def EipAddressTransform(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        instance_id: Optional[str] = None,
                        eip_address_transform_id: Optional[str] = None)
func NewEipAddressTransform(ctx *Context, name string, args EipAddressTransformArgs, opts ...ResourceOption) (*EipAddressTransform, error)
public EipAddressTransform(string name, EipAddressTransformArgs args, CustomResourceOptions? opts = null)
public EipAddressTransform(String name, EipAddressTransformArgs args)
public EipAddressTransform(String name, EipAddressTransformArgs args, CustomResourceOptions options)
type: tencentcloud:EipAddressTransform
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. EipAddressTransformArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. EipAddressTransformArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. EipAddressTransformArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. EipAddressTransformArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. EipAddressTransformArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

EipAddressTransform 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 EipAddressTransform resource accepts the following input properties:

InstanceId This property is required. string
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
EipAddressTransformId string
ID of the resource.
InstanceId This property is required. string
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
EipAddressTransformId string
ID of the resource.
instanceId This property is required. String
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
eipAddressTransformId String
ID of the resource.
instanceId This property is required. string
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
eipAddressTransformId string
ID of the resource.
instance_id This property is required. str
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
eip_address_transform_id str
ID of the resource.
instanceId This property is required. String
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
eipAddressTransformId String
ID of the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the EipAddressTransform 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 EipAddressTransform Resource

Get an existing EipAddressTransform 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?: EipAddressTransformState, opts?: CustomResourceOptions): EipAddressTransform
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        eip_address_transform_id: Optional[str] = None,
        instance_id: Optional[str] = None) -> EipAddressTransform
func GetEipAddressTransform(ctx *Context, name string, id IDInput, state *EipAddressTransformState, opts ...ResourceOption) (*EipAddressTransform, error)
public static EipAddressTransform Get(string name, Input<string> id, EipAddressTransformState? state, CustomResourceOptions? opts = null)
public static EipAddressTransform get(String name, Output<String> id, EipAddressTransformState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:EipAddressTransform    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
EipAddressTransformId string
ID of the resource.
InstanceId string
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
EipAddressTransformId string
ID of the resource.
InstanceId string
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
eipAddressTransformId String
ID of the resource.
instanceId String
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
eipAddressTransformId string
ID of the resource.
instanceId string
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
eip_address_transform_id str
ID of the resource.
instance_id str
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.
eipAddressTransformId String
ID of the resource.
instanceId String
the instance ID of a normal public network IP to be operated. eg:ins-23mk45jn.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.