1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. AddressExtraTemplate
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.AddressExtraTemplate

Explore with Pulumi AI

Provides a resource to manage address extra template.

NOTE: Compare to tencentcloud.AddressTemplate, It contains remarks.

Example Usage

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

const foo = new tencentcloud.AddressExtraTemplate("foo", {
    addressesExtras: [
        {
            address: "10.0.0.1",
            description: "create by terraform",
        },
        {
            address: "10.0.1.0/24",
            description: "delete by terraform",
        },
        {
            address: "10.0.0.1-10.0.0.100",
            description: "modify by terraform",
        },
    ],
    tags: {
        createBy: "terraform",
        deleteBy: "terraform",
    },
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

foo = tencentcloud.AddressExtraTemplate("foo",
    addresses_extras=[
        {
            "address": "10.0.0.1",
            "description": "create by terraform",
        },
        {
            "address": "10.0.1.0/24",
            "description": "delete by terraform",
        },
        {
            "address": "10.0.0.1-10.0.0.100",
            "description": "modify by terraform",
        },
    ],
    tags={
        "createBy": "terraform",
        "deleteBy": "terraform",
    })
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 {
		_, err := tencentcloud.NewAddressExtraTemplate(ctx, "foo", &tencentcloud.AddressExtraTemplateArgs{
			AddressesExtras: tencentcloud.AddressExtraTemplateAddressesExtraArray{
				&tencentcloud.AddressExtraTemplateAddressesExtraArgs{
					Address:     pulumi.String("10.0.0.1"),
					Description: pulumi.String("create by terraform"),
				},
				&tencentcloud.AddressExtraTemplateAddressesExtraArgs{
					Address:     pulumi.String("10.0.1.0/24"),
					Description: pulumi.String("delete by terraform"),
				},
				&tencentcloud.AddressExtraTemplateAddressesExtraArgs{
					Address:     pulumi.String("10.0.0.1-10.0.0.100"),
					Description: pulumi.String("modify by terraform"),
				},
			},
			Tags: pulumi.StringMap{
				"createBy": pulumi.String("terraform"),
				"deleteBy": pulumi.String("terraform"),
			},
		})
		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(() => 
{
    var foo = new Tencentcloud.AddressExtraTemplate("foo", new()
    {
        AddressesExtras = new[]
        {
            new Tencentcloud.Inputs.AddressExtraTemplateAddressesExtraArgs
            {
                Address = "10.0.0.1",
                Description = "create by terraform",
            },
            new Tencentcloud.Inputs.AddressExtraTemplateAddressesExtraArgs
            {
                Address = "10.0.1.0/24",
                Description = "delete by terraform",
            },
            new Tencentcloud.Inputs.AddressExtraTemplateAddressesExtraArgs
            {
                Address = "10.0.0.1-10.0.0.100",
                Description = "modify by terraform",
            },
        },
        Tags = 
        {
            { "createBy", "terraform" },
            { "deleteBy", "terraform" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.AddressExtraTemplate;
import com.pulumi.tencentcloud.AddressExtraTemplateArgs;
import com.pulumi.tencentcloud.inputs.AddressExtraTemplateAddressesExtraArgs;
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 foo = new AddressExtraTemplate("foo", AddressExtraTemplateArgs.builder()
            .addressesExtras(            
                AddressExtraTemplateAddressesExtraArgs.builder()
                    .address("10.0.0.1")
                    .description("create by terraform")
                    .build(),
                AddressExtraTemplateAddressesExtraArgs.builder()
                    .address("10.0.1.0/24")
                    .description("delete by terraform")
                    .build(),
                AddressExtraTemplateAddressesExtraArgs.builder()
                    .address("10.0.0.1-10.0.0.100")
                    .description("modify by terraform")
                    .build())
            .tags(Map.ofEntries(
                Map.entry("createBy", "terraform"),
                Map.entry("deleteBy", "terraform")
            ))
            .build());

    }
}
Copy
resources:
  foo:
    type: tencentcloud:AddressExtraTemplate
    properties:
      addressesExtras:
        - address: 10.0.0.1
          description: create by terraform
        - address: 10.0.1.0/24
          description: delete by terraform
        - address: 10.0.0.1-10.0.0.100
          description: modify by terraform
      tags:
        createBy: terraform
        deleteBy: terraform
Copy

Create AddressExtraTemplate Resource

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

Constructor syntax

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

@overload
def AddressExtraTemplate(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         addresses_extras: Optional[Sequence[AddressExtraTemplateAddressesExtraArgs]] = None,
                         address_extra_template_id: Optional[str] = None,
                         name: Optional[str] = None,
                         tags: Optional[Mapping[str, str]] = None)
func NewAddressExtraTemplate(ctx *Context, name string, args AddressExtraTemplateArgs, opts ...ResourceOption) (*AddressExtraTemplate, error)
public AddressExtraTemplate(string name, AddressExtraTemplateArgs args, CustomResourceOptions? opts = null)
public AddressExtraTemplate(String name, AddressExtraTemplateArgs args)
public AddressExtraTemplate(String name, AddressExtraTemplateArgs args, CustomResourceOptions options)
type: tencentcloud:AddressExtraTemplate
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. AddressExtraTemplateArgs
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. AddressExtraTemplateArgs
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. AddressExtraTemplateArgs
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. AddressExtraTemplateArgs
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. AddressExtraTemplateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

AddressesExtras This property is required. List<AddressExtraTemplateAddressesExtra>
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
AddressExtraTemplateId string
ID of the resource.
Name string
IP address template name.
Tags Dictionary<string, string>
Tags of the Addresses.
AddressesExtras This property is required. []AddressExtraTemplateAddressesExtraArgs
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
AddressExtraTemplateId string
ID of the resource.
Name string
IP address template name.
Tags map[string]string
Tags of the Addresses.
addressesExtras This property is required. List<AddressExtraTemplateAddressesExtra>
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
addressExtraTemplateId String
ID of the resource.
name String
IP address template name.
tags Map<String,String>
Tags of the Addresses.
addressesExtras This property is required. AddressExtraTemplateAddressesExtra[]
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
addressExtraTemplateId string
ID of the resource.
name string
IP address template name.
tags {[key: string]: string}
Tags of the Addresses.
addresses_extras This property is required. Sequence[AddressExtraTemplateAddressesExtraArgs]
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
address_extra_template_id str
ID of the resource.
name str
IP address template name.
tags Mapping[str, str]
Tags of the Addresses.
addressesExtras This property is required. List<Property Map>
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
addressExtraTemplateId String
ID of the resource.
name String
IP address template name.
tags Map<String>
Tags of the Addresses.

Outputs

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

Get an existing AddressExtraTemplate 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?: AddressExtraTemplateState, opts?: CustomResourceOptions): AddressExtraTemplate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        address_extra_template_id: Optional[str] = None,
        addresses_extras: Optional[Sequence[AddressExtraTemplateAddressesExtraArgs]] = None,
        name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None) -> AddressExtraTemplate
func GetAddressExtraTemplate(ctx *Context, name string, id IDInput, state *AddressExtraTemplateState, opts ...ResourceOption) (*AddressExtraTemplate, error)
public static AddressExtraTemplate Get(string name, Input<string> id, AddressExtraTemplateState? state, CustomResourceOptions? opts = null)
public static AddressExtraTemplate get(String name, Output<String> id, AddressExtraTemplateState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:AddressExtraTemplate    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:
AddressExtraTemplateId string
ID of the resource.
AddressesExtras List<AddressExtraTemplateAddressesExtra>
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
Name string
IP address template name.
Tags Dictionary<string, string>
Tags of the Addresses.
AddressExtraTemplateId string
ID of the resource.
AddressesExtras []AddressExtraTemplateAddressesExtraArgs
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
Name string
IP address template name.
Tags map[string]string
Tags of the Addresses.
addressExtraTemplateId String
ID of the resource.
addressesExtras List<AddressExtraTemplateAddressesExtra>
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
name String
IP address template name.
tags Map<String,String>
Tags of the Addresses.
addressExtraTemplateId string
ID of the resource.
addressesExtras AddressExtraTemplateAddressesExtra[]
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
name string
IP address template name.
tags {[key: string]: string}
Tags of the Addresses.
address_extra_template_id str
ID of the resource.
addresses_extras Sequence[AddressExtraTemplateAddressesExtraArgs]
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
name str
IP address template name.
tags Mapping[str, str]
Tags of the Addresses.
addressExtraTemplateId String
ID of the resource.
addressesExtras List<Property Map>
The address information can contain remarks and be presented by the IP, CIDR block or IP address range.
name String
IP address template name.
tags Map<String>
Tags of the Addresses.

Supporting Types

AddressExtraTemplateAddressesExtra
, AddressExtraTemplateAddressesExtraArgs

Address This property is required. string
IP address.
Description string
Remarks.
UpdatedTime string
Update Time.
Address This property is required. string
IP address.
Description string
Remarks.
UpdatedTime string
Update Time.
address This property is required. String
IP address.
description String
Remarks.
updatedTime String
Update Time.
address This property is required. string
IP address.
description string
Remarks.
updatedTime string
Update Time.
address This property is required. str
IP address.
description str
Remarks.
updated_time str
Update Time.
address This property is required. String
IP address.
description String
Remarks.
updatedTime String
Update Time.

Import

Address template can be imported using the id, e.g.

$ pulumi import tencentcloud:index/addressExtraTemplate:AddressExtraTemplate foo ipm-makf7k9e
Copy

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.