1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. AddressTemplate
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.AddressTemplate

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to manage address template.

    NOTE: It can be replaced by tencentcloud.AddressExtraTemplate.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const foo = new tencentcloud.AddressTemplate("foo", {addresses: [
        "10.0.0.1",
        "10.0.1.0/24",
        "10.0.0.1-10.0.0.100",
    ]});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo = tencentcloud.AddressTemplate("foo", addresses=[
        "10.0.0.1",
        "10.0.1.0/24",
        "10.0.0.1-10.0.0.100",
    ])
    
    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.NewAddressTemplate(ctx, "foo", &tencentcloud.AddressTemplateArgs{
    			Addresses: pulumi.StringArray{
    				pulumi.String("10.0.0.1"),
    				pulumi.String("10.0.1.0/24"),
    				pulumi.String("10.0.0.1-10.0.0.100"),
    			},
    		})
    		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 foo = new Tencentcloud.AddressTemplate("foo", new()
        {
            Addresses = new[]
            {
                "10.0.0.1",
                "10.0.1.0/24",
                "10.0.0.1-10.0.0.100",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.AddressTemplate;
    import com.pulumi.tencentcloud.AddressTemplateArgs;
    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 AddressTemplate("foo", AddressTemplateArgs.builder()
                .addresses(            
                    "10.0.0.1",
                    "10.0.1.0/24",
                    "10.0.0.1-10.0.0.100")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: tencentcloud:AddressTemplate
        properties:
          addresses:
            - 10.0.0.1
            - 10.0.1.0/24
            - 10.0.0.1-10.0.0.100
    

    Create AddressTemplate Resource

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

    Constructor syntax

    new AddressTemplate(name: string, args: AddressTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def AddressTemplate(resource_name: str,
                        args: AddressTemplateArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def AddressTemplate(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        addresses: Optional[Sequence[str]] = None,
                        address_template_id: Optional[str] = None,
                        name: Optional[str] = None)
    func NewAddressTemplate(ctx *Context, name string, args AddressTemplateArgs, opts ...ResourceOption) (*AddressTemplate, error)
    public AddressTemplate(string name, AddressTemplateArgs args, CustomResourceOptions? opts = null)
    public AddressTemplate(String name, AddressTemplateArgs args)
    public AddressTemplate(String name, AddressTemplateArgs args, CustomResourceOptions options)
    
    type: tencentcloud:AddressTemplate
    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 AddressTemplateArgs
    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 AddressTemplateArgs
    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 AddressTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AddressTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AddressTemplateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Addresses List<string>
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    AddressTemplateId string
    ID of the resource.
    Name string
    Name of the address template.
    Addresses []string
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    AddressTemplateId string
    ID of the resource.
    Name string
    Name of the address template.
    addresses List<String>
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    addressTemplateId String
    ID of the resource.
    name String
    Name of the address template.
    addresses string[]
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    addressTemplateId string
    ID of the resource.
    name string
    Name of the address template.
    addresses Sequence[str]
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    address_template_id str
    ID of the resource.
    name str
    Name of the address template.
    addresses List<String>
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    addressTemplateId String
    ID of the resource.
    name String
    Name of the address template.

    Outputs

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

    Get an existing AddressTemplate 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?: AddressTemplateState, opts?: CustomResourceOptions): AddressTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address_template_id: Optional[str] = None,
            addresses: Optional[Sequence[str]] = None,
            name: Optional[str] = None) -> AddressTemplate
    func GetAddressTemplate(ctx *Context, name string, id IDInput, state *AddressTemplateState, opts ...ResourceOption) (*AddressTemplate, error)
    public static AddressTemplate Get(string name, Input<string> id, AddressTemplateState? state, CustomResourceOptions? opts = null)
    public static AddressTemplate get(String name, Output<String> id, AddressTemplateState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:AddressTemplate    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.
    The following state arguments are supported:
    AddressTemplateId string
    ID of the resource.
    Addresses List<string>
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    Name string
    Name of the address template.
    AddressTemplateId string
    ID of the resource.
    Addresses []string
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    Name string
    Name of the address template.
    addressTemplateId String
    ID of the resource.
    addresses List<String>
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    name String
    Name of the address template.
    addressTemplateId string
    ID of the resource.
    addresses string[]
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    name string
    Name of the address template.
    address_template_id str
    ID of the resource.
    addresses Sequence[str]
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    name str
    Name of the address template.
    addressTemplateId String
    ID of the resource.
    addresses List<String>
    Address list. IP(10.0.0.1), CIDR(10.0.1.0/24), IP range(10.0.0.1-10.0.0.100) format are supported.
    name String
    Name of the address template.

    Import

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

    $ pulumi import tencentcloud:index/addressTemplate:AddressTemplate foo ipm-makf7k9e"
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack