tencentcloud.TemGateway
Explore with Pulumi AI
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
This property is required. 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
This property is required. 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
This property is required. 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
This property is required. 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
This property is required. String - The unique name of the resource.
- args
This property is required. 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
Tem
Gateway Ingress - gateway properties.
- Tem
Gateway stringId - ID of the resource.
- Ingress
Tem
Gateway Ingress Args - gateway properties.
- Tem
Gateway stringId - ID of the resource.
- ingress
Tem
Gateway Ingress - gateway properties.
- tem
Gateway StringId - ID of the resource.
- ingress
Tem
Gateway Ingress - gateway properties.
- tem
Gateway stringId - ID of the resource.
- ingress
Tem
Gateway Ingress Args - gateway properties.
- tem_
gateway_ strid - ID of the resource.
- ingress Property Map
- gateway properties.
- tem
Gateway StringId - 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
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.
- Ingress
Tem
Gateway Ingress - gateway properties.
- Tem
Gateway stringId - ID of the resource.
- Ingress
Tem
Gateway Ingress Args - gateway properties.
- Tem
Gateway stringId - ID of the resource.
- ingress
Tem
Gateway Ingress - gateway properties.
- tem
Gateway StringId - ID of the resource.
- ingress
Tem
Gateway Ingress - gateway properties.
- tem
Gateway stringId - ID of the resource.
- ingress
Tem
Gateway Ingress Args - gateway properties.
- tem_
gateway_ strid - ID of the resource.
- ingress Property Map
- gateway properties.
- tem
Gateway StringId - ID of the resource.
Supporting Types
TemGatewayIngress, TemGatewayIngressArgs
- Address
Ip Version This property is required. string - ip version, support IPV4.
- Environment
Id This property is required. string - environment ID.
- Ingress
Name This property is required. string - gateway name.
- Mixed
This property is required. bool - mixing HTTP and HTTPS.
- Rules
This property is required. List<TemGateway Ingress Rule> - proxy rules.
- Clb
Id string - related CLB ID, support binding existing clb, does not support modification.
- Create
Time string - creation time.
- Rewrite
Type string - redirect mode, support AUTO and NONE.
- Tls
List<Tem
Gateway Ingress Tl> - ingress TLS configurations.
- Vip string
- gateway vip.
- Address
Ip Version This property is required. string - ip version, support IPV4.
- Environment
Id This property is required. string - environment ID.
- Ingress
Name This property is required. string - gateway name.
- Mixed
This property is required. bool - mixing HTTP and HTTPS.
- Rules
This property is required. []TemGateway Ingress Rule - proxy rules.
- Clb
Id string - related CLB ID, support binding existing clb, does not support modification.
- Create
Time string - creation time.
- Rewrite
Type string - redirect mode, support AUTO and NONE.
- Tls
[]Tem
Gateway Ingress Tl - ingress TLS configurations.
- Vip string
- gateway vip.
- address
Ip Version This property is required. String - ip version, support IPV4.
- environment
Id This property is required. String - environment ID.
- ingress
Name This property is required. String - gateway name.
- mixed
This property is required. Boolean - mixing HTTP and HTTPS.
- rules
This property is required. List<TemGateway Ingress Rule> - proxy rules.
- clb
Id String - related CLB ID, support binding existing clb, does not support modification.
- create
Time String - creation time.
- rewrite
Type String - redirect mode, support AUTO and NONE.
- tls
List<Tem
Gateway Ingress Tl> - ingress TLS configurations.
- vip String
- gateway vip.
- address
Ip Version This property is required. string - ip version, support IPV4.
- environment
Id This property is required. string - environment ID.
- ingress
Name This property is required. string - gateway name.
- mixed
This property is required. boolean - mixing HTTP and HTTPS.
- rules
This property is required. TemGateway Ingress Rule[] - proxy rules.
- clb
Id string - related CLB ID, support binding existing clb, does not support modification.
- create
Time string - creation time.
- rewrite
Type string - redirect mode, support AUTO and NONE.
- tls
Tem
Gateway Ingress Tl[] - ingress TLS configurations.
- vip string
- gateway vip.
- address_
ip_ version This property is required. str - ip version, support IPV4.
- environment_
id This property is required. str - environment ID.
- ingress_
name This property is required. str - gateway name.
- mixed
This property is required. bool - mixing HTTP and HTTPS.
- rules
This property is required. Sequence[TemGateway Ingress Rule] - 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[Tem
Gateway Ingress Tl] - ingress TLS configurations.
- vip str
- gateway vip.
- address
Ip Version This property is required. String - ip version, support IPV4.
- environment
Id This property is required. String - environment ID.
- ingress
Name This property is required. String - gateway name.
- mixed
This property is required. Boolean - mixing HTTP and HTTPS.
- rules
This property is required. List<Property Map> - proxy rules.
- clb
Id String - related CLB ID, support binding existing clb, does not support modification.
- create
Time String - creation time.
- rewrite
Type String - redirect mode, support AUTO and NONE.
- tls List<Property Map>
- ingress TLS configurations.
- vip String
- gateway vip.
TemGatewayIngressRule, TemGatewayIngressRuleArgs
- Http
This property is required. TemGateway Ingress Rule Http - rule payload.
- Host string
- host name.
- Protocol string
- protocol.
- Http
This property is required. TemGateway Ingress Rule Http - rule payload.
- Host string
- host name.
- Protocol string
- protocol.
- http
This property is required. TemGateway Ingress Rule Http - rule payload.
- host String
- host name.
- protocol String
- protocol.
- http
This property is required. TemGateway Ingress Rule Http - rule payload.
- host string
- host name.
- protocol string
- protocol.
- http
This property is required. TemGateway Ingress Rule Http - rule payload.
- host str
- host name.
- protocol str
- protocol.
- http
This property is required. Property Map - rule payload.
- host String
- host name.
- protocol String
- protocol.
TemGatewayIngressRuleHttp, TemGatewayIngressRuleHttpArgs
- Paths
This property is required. List<TemGateway Ingress Rule Http Path> - path payload.
- Paths
This property is required. []TemGateway Ingress Rule Http Path - path payload.
- paths
This property is required. List<TemGateway Ingress Rule Http Path> - path payload.
- paths
This property is required. TemGateway Ingress Rule Http Path[] - path payload.
- paths
This property is required. Sequence[TemGateway Ingress Rule Http Path] - path payload.
- paths
This property is required. List<Property Map> - path payload.
TemGatewayIngressRuleHttpPath, TemGatewayIngressRuleHttpPathArgs
- Backend
This property is required. TemGateway Ingress Rule Http Path Backend - backend payload.
- Path
This property is required. string - path.
- Backend
This property is required. TemGateway Ingress Rule Http Path Backend - backend payload.
- Path
This property is required. string - path.
- backend
This property is required. TemGateway Ingress Rule Http Path Backend - backend payload.
- path
This property is required. String - path.
- backend
This property is required. TemGateway Ingress Rule Http Path Backend - backend payload.
- path
This property is required. string - path.
- backend
This property is required. TemGateway Ingress Rule Http Path Backend - backend payload.
- path
This property is required. str - path.
- backend
This property is required. Property Map - backend payload.
- path
This property is required. String - path.
TemGatewayIngressRuleHttpPathBackend, TemGatewayIngressRuleHttpPathBackendArgs
- Service
Name This property is required. string - backend name.
- Service
Port This property is required. double - backend port.
- Service
Name This property is required. string - backend name.
- Service
Port This property is required. float64 - backend port.
- service
Name This property is required. String - backend name.
- service
Port This property is required. Double - backend port.
- service
Name This property is required. string - backend name.
- service
Port This property is required. number - backend port.
- service_
name This property is required. str - backend name.
- service_
port This property is required. float - backend port.
- service
Name This property is required. String - backend name.
- service
Port This property is required. Number - backend port.
TemGatewayIngressTl, TemGatewayIngressTlArgs
- Certificate
Id This property is required. string - certificate ID.
- Hosts
This property is required. List<string> - host names.
- Secret
Name string - secret name, if you use a certificate, you don't need to fill in this field.
- Certificate
Id This property is required. string - certificate ID.
- Hosts
This property is required. []string - host names.
- Secret
Name string - secret name, if you use a certificate, you don't need to fill in this field.
- certificate
Id This property is required. String - certificate ID.
- hosts
This property is required. List<String> - host names.
- secret
Name String - secret name, if you use a certificate, you don't need to fill in this field.
- certificate
Id This property is required. string - certificate ID.
- hosts
This property is required. string[] - host names.
- secret
Name string - secret name, if you use a certificate, you don't need to fill in this field.
- certificate_
id This property is required. str - certificate ID.
- hosts
This property is required. Sequence[str] - host names.
- secret_
name str - secret name, if you use a certificate, you don't need to fill in this field.
- certificate
Id This property is required. String - certificate ID.
- hosts
This property is required. List<String> - host names.
- secret
Name 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.