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

tencentcloud.TemGateway

Explore with Pulumi AI

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

    Provides a resource to create a tem gateway

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const gateway = new tencentcloud.TemGateway("gateway", {ingress: {
        addressIpVersion: "IPV4",
        environmentId: "en-853mggjm",
        ingressName: "demo",
        mixed: false,
        rewriteType: "NONE",
        rules: [
            {
                host: "test.com",
                http: {
                    paths: [{
                        backend: {
                            serviceName: "demo",
                            servicePort: 80,
                        },
                        path: "/",
                    }],
                },
                protocol: "http",
            },
            {
                host: "hello.com",
                http: {
                    paths: [{
                        backend: {
                            serviceName: "hello",
                            servicePort: 36000,
                        },
                        path: "/",
                    }],
                },
                protocol: "http",
            },
        ],
    }});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    gateway = tencentcloud.TemGateway("gateway", ingress={
        "address_ip_version": "IPV4",
        "environment_id": "en-853mggjm",
        "ingress_name": "demo",
        "mixed": False,
        "rewrite_type": "NONE",
        "rules": [
            {
                "host": "test.com",
                "http": {
                    "paths": [{
                        "backend": {
                            "service_name": "demo",
                            "service_port": 80,
                        },
                        "path": "/",
                    }],
                },
                "protocol": "http",
            },
            {
                "host": "hello.com",
                "http": {
                    "paths": [{
                        "backend": {
                            "service_name": "hello",
                            "service_port": 36000,
                        },
                        "path": "/",
                    }],
                },
                "protocol": "http",
            },
        ],
    })
    
    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.NewTemGateway(ctx, "gateway", &tencentcloud.TemGatewayArgs{
    			Ingress: &tencentcloud.TemGatewayIngressArgs{
    				AddressIpVersion: pulumi.String("IPV4"),
    				EnvironmentId:    pulumi.String("en-853mggjm"),
    				IngressName:      pulumi.String("demo"),
    				Mixed:            pulumi.Bool(false),
    				RewriteType:      pulumi.String("NONE"),
    				Rules: tencentcloud.TemGatewayIngressRuleArray{
    					&tencentcloud.TemGatewayIngressRuleArgs{
    						Host: pulumi.String("test.com"),
    						Http: &tencentcloud.TemGatewayIngressRuleHttpArgs{
    							Paths: tencentcloud.TemGatewayIngressRuleHttpPathArray{
    								&tencentcloud.TemGatewayIngressRuleHttpPathArgs{
    									Backend: &tencentcloud.TemGatewayIngressRuleHttpPathBackendArgs{
    										ServiceName: pulumi.String("demo"),
    										ServicePort: pulumi.Float64(80),
    									},
    									Path: pulumi.String("/"),
    								},
    							},
    						},
    						Protocol: pulumi.String("http"),
    					},
    					&tencentcloud.TemGatewayIngressRuleArgs{
    						Host: pulumi.String("hello.com"),
    						Http: &tencentcloud.TemGatewayIngressRuleHttpArgs{
    							Paths: tencentcloud.TemGatewayIngressRuleHttpPathArray{
    								&tencentcloud.TemGatewayIngressRuleHttpPathArgs{
    									Backend: &tencentcloud.TemGatewayIngressRuleHttpPathBackendArgs{
    										ServiceName: pulumi.String("hello"),
    										ServicePort: pulumi.Float64(36000),
    									},
    									Path: pulumi.String("/"),
    								},
    							},
    						},
    						Protocol: pulumi.String("http"),
    					},
    				},
    			},
    		})
    		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 gateway = new Tencentcloud.TemGateway("gateway", new()
        {
            Ingress = new Tencentcloud.Inputs.TemGatewayIngressArgs
            {
                AddressIpVersion = "IPV4",
                EnvironmentId = "en-853mggjm",
                IngressName = "demo",
                Mixed = false,
                RewriteType = "NONE",
                Rules = new[]
                {
                    new Tencentcloud.Inputs.TemGatewayIngressRuleArgs
                    {
                        Host = "test.com",
                        Http = new Tencentcloud.Inputs.TemGatewayIngressRuleHttpArgs
                        {
                            Paths = new[]
                            {
                                new Tencentcloud.Inputs.TemGatewayIngressRuleHttpPathArgs
                                {
                                    Backend = new Tencentcloud.Inputs.TemGatewayIngressRuleHttpPathBackendArgs
                                    {
                                        ServiceName = "demo",
                                        ServicePort = 80,
                                    },
                                    Path = "/",
                                },
                            },
                        },
                        Protocol = "http",
                    },
                    new Tencentcloud.Inputs.TemGatewayIngressRuleArgs
                    {
                        Host = "hello.com",
                        Http = new Tencentcloud.Inputs.TemGatewayIngressRuleHttpArgs
                        {
                            Paths = new[]
                            {
                                new Tencentcloud.Inputs.TemGatewayIngressRuleHttpPathArgs
                                {
                                    Backend = new Tencentcloud.Inputs.TemGatewayIngressRuleHttpPathBackendArgs
                                    {
                                        ServiceName = "hello",
                                        ServicePort = 36000,
                                    },
                                    Path = "/",
                                },
                            },
                        },
                        Protocol = "http",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TemGateway;
    import com.pulumi.tencentcloud.TemGatewayArgs;
    import com.pulumi.tencentcloud.inputs.TemGatewayIngressArgs;
    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 gateway = new TemGateway("gateway", TemGatewayArgs.builder()
                .ingress(TemGatewayIngressArgs.builder()
                    .addressIpVersion("IPV4")
                    .environmentId("en-853mggjm")
                    .ingressName("demo")
                    .mixed(false)
                    .rewriteType("NONE")
                    .rules(                
                        TemGatewayIngressRuleArgs.builder()
                            .host("test.com")
                            .http(TemGatewayIngressRuleHttpArgs.builder()
                                .paths(TemGatewayIngressRuleHttpPathArgs.builder()
                                    .backend(TemGatewayIngressRuleHttpPathBackendArgs.builder()
                                        .serviceName("demo")
                                        .servicePort(80)
                                        .build())
                                    .path("/")
                                    .build())
                                .build())
                            .protocol("http")
                            .build(),
                        TemGatewayIngressRuleArgs.builder()
                            .host("hello.com")
                            .http(TemGatewayIngressRuleHttpArgs.builder()
                                .paths(TemGatewayIngressRuleHttpPathArgs.builder()
                                    .backend(TemGatewayIngressRuleHttpPathBackendArgs.builder()
                                        .serviceName("hello")
                                        .servicePort(36000)
                                        .build())
                                    .path("/")
                                    .build())
                                .build())
                            .protocol("http")
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      gateway:
        type: tencentcloud:TemGateway
        properties:
          ingress:
            addressIpVersion: IPV4
            environmentId: en-853mggjm
            ingressName: demo
            mixed: false
            rewriteType: NONE
            rules:
              - host: test.com
                http:
                  paths:
                    - backend:
                        serviceName: demo
                        servicePort: 80
                      path: /
                protocol: http
              - host: hello.com
                http:
                  paths:
                    - backend:
                        serviceName: hello
                        servicePort: 36000
                      path: /
                protocol: http
    

    Create TemGateway Resource

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

    Constructor syntax

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

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

    Ingress TemGatewayIngress
    gateway properties.
    TemGatewayId string
    ID of the resource.
    Ingress TemGatewayIngressArgs
    gateway properties.
    TemGatewayId string
    ID of the resource.
    ingress TemGatewayIngress
    gateway properties.
    temGatewayId String
    ID of the resource.
    ingress TemGatewayIngress
    gateway properties.
    temGatewayId string
    ID of the resource.
    ingress TemGatewayIngressArgs
    gateway properties.
    tem_gateway_id str
    ID of the resource.
    ingress Property Map
    gateway properties.
    temGatewayId String
    ID of the resource.

    Outputs

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

    Get an existing TemGateway 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?: TemGatewayState, opts?: CustomResourceOptions): TemGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ingress: Optional[TemGatewayIngressArgs] = None,
            tem_gateway_id: Optional[str] = None) -> TemGateway
    func GetTemGateway(ctx *Context, name string, id IDInput, state *TemGatewayState, opts ...ResourceOption) (*TemGateway, error)
    public static TemGateway Get(string name, Input<string> id, TemGatewayState? state, CustomResourceOptions? opts = null)
    public static TemGateway get(String name, Output<String> id, TemGatewayState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TemGateway    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:
    Ingress TemGatewayIngress
    gateway properties.
    TemGatewayId string
    ID of the resource.
    Ingress TemGatewayIngressArgs
    gateway properties.
    TemGatewayId string
    ID of the resource.
    ingress TemGatewayIngress
    gateway properties.
    temGatewayId String
    ID of the resource.
    ingress TemGatewayIngress
    gateway properties.
    temGatewayId string
    ID of the resource.
    ingress TemGatewayIngressArgs
    gateway properties.
    tem_gateway_id str
    ID of the resource.
    ingress Property Map
    gateway properties.
    temGatewayId String
    ID of the resource.

    Supporting Types

    TemGatewayIngress, TemGatewayIngressArgs

    AddressIpVersion string
    ip version, support IPV4.
    EnvironmentId string
    environment ID.
    IngressName string
    gateway name.
    Mixed bool
    mixing HTTP and HTTPS.
    Rules List<TemGatewayIngressRule>
    proxy rules.
    ClbId string
    related CLB ID, support binding existing clb, does not support modification.
    CreateTime string
    creation time.
    RewriteType string
    redirect mode, support AUTO and NONE.
    Tls List<TemGatewayIngressTl>
    ingress TLS configurations.
    Vip string
    gateway vip.
    AddressIpVersion string
    ip version, support IPV4.
    EnvironmentId string
    environment ID.
    IngressName string
    gateway name.
    Mixed bool
    mixing HTTP and HTTPS.
    Rules []TemGatewayIngressRule
    proxy rules.
    ClbId string
    related CLB ID, support binding existing clb, does not support modification.
    CreateTime string
    creation time.
    RewriteType string
    redirect mode, support AUTO and NONE.
    Tls []TemGatewayIngressTl
    ingress TLS configurations.
    Vip string
    gateway vip.
    addressIpVersion String
    ip version, support IPV4.
    environmentId String
    environment ID.
    ingressName String
    gateway name.
    mixed Boolean
    mixing HTTP and HTTPS.
    rules List<TemGatewayIngressRule>
    proxy rules.
    clbId String
    related CLB ID, support binding existing clb, does not support modification.
    createTime String
    creation time.
    rewriteType String
    redirect mode, support AUTO and NONE.
    tls List<TemGatewayIngressTl>
    ingress TLS configurations.
    vip String
    gateway vip.
    addressIpVersion string
    ip version, support IPV4.
    environmentId string
    environment ID.
    ingressName string
    gateway name.
    mixed boolean
    mixing HTTP and HTTPS.
    rules TemGatewayIngressRule[]
    proxy rules.
    clbId string
    related CLB ID, support binding existing clb, does not support modification.
    createTime string
    creation time.
    rewriteType string
    redirect mode, support AUTO and NONE.
    tls TemGatewayIngressTl[]
    ingress TLS configurations.
    vip string
    gateway vip.
    address_ip_version str
    ip version, support IPV4.
    environment_id str
    environment ID.
    ingress_name str
    gateway name.
    mixed bool
    mixing HTTP and HTTPS.
    rules Sequence[TemGatewayIngressRule]
    proxy rules.
    clb_id str
    related CLB ID, support binding existing clb, does not support modification.
    create_time str
    creation time.
    rewrite_type str
    redirect mode, support AUTO and NONE.
    tls Sequence[TemGatewayIngressTl]
    ingress TLS configurations.
    vip str
    gateway vip.
    addressIpVersion String
    ip version, support IPV4.
    environmentId String
    environment ID.
    ingressName String
    gateway name.
    mixed Boolean
    mixing HTTP and HTTPS.
    rules List<Property Map>
    proxy rules.
    clbId String
    related CLB ID, support binding existing clb, does not support modification.
    createTime String
    creation time.
    rewriteType String
    redirect mode, support AUTO and NONE.
    tls List<Property Map>
    ingress TLS configurations.
    vip String
    gateway vip.

    TemGatewayIngressRule, TemGatewayIngressRuleArgs

    Http TemGatewayIngressRuleHttp
    rule payload.
    Host string
    host name.
    Protocol string
    protocol.
    Http TemGatewayIngressRuleHttp
    rule payload.
    Host string
    host name.
    Protocol string
    protocol.
    http TemGatewayIngressRuleHttp
    rule payload.
    host String
    host name.
    protocol String
    protocol.
    http TemGatewayIngressRuleHttp
    rule payload.
    host string
    host name.
    protocol string
    protocol.
    http TemGatewayIngressRuleHttp
    rule payload.
    host str
    host name.
    protocol str
    protocol.
    http Property Map
    rule payload.
    host String
    host name.
    protocol String
    protocol.

    TemGatewayIngressRuleHttp, TemGatewayIngressRuleHttpArgs

    TemGatewayIngressRuleHttpPath, TemGatewayIngressRuleHttpPathArgs

    backend Property Map
    backend payload.
    path String
    path.

    TemGatewayIngressRuleHttpPathBackend, TemGatewayIngressRuleHttpPathBackendArgs

    ServiceName string
    backend name.
    ServicePort double
    backend port.
    ServiceName string
    backend name.
    ServicePort float64
    backend port.
    serviceName String
    backend name.
    servicePort Double
    backend port.
    serviceName string
    backend name.
    servicePort number
    backend port.
    service_name str
    backend name.
    service_port float
    backend port.
    serviceName String
    backend name.
    servicePort Number
    backend port.

    TemGatewayIngressTl, TemGatewayIngressTlArgs

    CertificateId string
    certificate ID.
    Hosts List<string>
    host names.
    SecretName string
    secret name, if you use a certificate, you don't need to fill in this field.
    CertificateId string
    certificate ID.
    Hosts []string
    host names.
    SecretName string
    secret name, if you use a certificate, you don't need to fill in this field.
    certificateId String
    certificate ID.
    hosts List<String>
    host names.
    secretName String
    secret name, if you use a certificate, you don't need to fill in this field.
    certificateId string
    certificate ID.
    hosts string[]
    host names.
    secretName string
    secret name, if you use a certificate, you don't need to fill in this field.
    certificate_id str
    certificate ID.
    hosts Sequence[str]
    host names.
    secret_name str
    secret name, if you use a certificate, you don't need to fill in this field.
    certificateId String
    certificate ID.
    hosts List<String>
    host names.
    secretName String
    secret name, if you use a certificate, you don't need to fill in this field.

    Import

    tem gateway can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/temGateway:TemGateway gateway environmentId#gatewayName
    

    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