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 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
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
- 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.
- 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 stringVersion - ip version, support IPV4.
- Environment
Id string - environment ID.
- Ingress
Name string - gateway name.
- Mixed bool
- mixing HTTP and HTTPS.
- Rules
List<Tem
Gateway 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 stringVersion - ip version, support IPV4.
- Environment
Id string - environment ID.
- Ingress
Name string - gateway name.
- Mixed bool
- mixing HTTP and HTTPS.
- Rules
[]Tem
Gateway 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 StringVersion - ip version, support IPV4.
- environment
Id String - environment ID.
- ingress
Name String - gateway name.
- mixed Boolean
- mixing HTTP and HTTPS.
- rules
List<Tem
Gateway 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 stringVersion - ip version, support IPV4.
- environment
Id string - environment ID.
- ingress
Name string - gateway name.
- mixed boolean
- mixing HTTP and HTTPS.
- rules
Tem
Gateway 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_ strversion - ip version, support IPV4.
- environment_
id str - environment ID.
- ingress_
name str - gateway name.
- mixed bool
- mixing HTTP and HTTPS.
- rules
Sequence[Tem
Gateway 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 StringVersion - ip version, support IPV4.
- environment
Id String - environment ID.
- ingress
Name String - gateway name.
- mixed Boolean
- mixing HTTP and HTTPS.
- rules 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
Tem
Gateway Ingress Rule Http - rule payload.
- Host string
- host name.
- Protocol string
- protocol.
- Http
Tem
Gateway Ingress Rule Http - rule payload.
- Host string
- host name.
- Protocol string
- protocol.
- http
Tem
Gateway Ingress Rule Http - rule payload.
- host String
- host name.
- protocol String
- protocol.
- http
Tem
Gateway Ingress Rule Http - rule payload.
- host string
- host name.
- protocol string
- protocol.
- http
Tem
Gateway Ingress Rule Http - rule payload.
- host str
- host name.
- protocol str
- protocol.
- http Property Map
- rule payload.
- host String
- host name.
- protocol String
- protocol.
TemGatewayIngressRuleHttp, TemGatewayIngressRuleHttpArgs
- Paths
List<Tem
Gateway Ingress Rule Http Path> - path payload.
- Paths
[]Tem
Gateway Ingress Rule Http Path - path payload.
- paths
List<Tem
Gateway Ingress Rule Http Path> - path payload.
- paths
Tem
Gateway Ingress Rule Http Path[] - path payload.
- paths
Sequence[Tem
Gateway Ingress Rule Http Path] - path payload.
- paths List<Property Map>
- path payload.
TemGatewayIngressRuleHttpPath, TemGatewayIngressRuleHttpPathArgs
- Backend
Tem
Gateway Ingress Rule Http Path Backend - backend payload.
- Path string
- path.
- Backend
Tem
Gateway Ingress Rule Http Path Backend - backend payload.
- Path string
- path.
- backend
Tem
Gateway Ingress Rule Http Path Backend - backend payload.
- path String
- path.
- backend
Tem
Gateway Ingress Rule Http Path Backend - backend payload.
- path string
- path.
- backend
Tem
Gateway Ingress Rule Http Path Backend - backend payload.
- path str
- path.
- backend Property Map
- backend payload.
- path String
- path.
TemGatewayIngressRuleHttpPathBackend, TemGatewayIngressRuleHttpPathBackendArgs
- Service
Name string - backend name.
- Service
Port double - backend port.
- Service
Name string - backend name.
- Service
Port float64 - backend port.
- service
Name String - backend name.
- service
Port Double - backend port.
- service
Name string - backend name.
- service
Port number - backend port.
- service_
name str - backend name.
- service_
port float - backend port.
- service
Name String - backend name.
- service
Port Number - backend port.
TemGatewayIngressTl, TemGatewayIngressTlArgs
- Certificate
Id string - certificate ID.
- Hosts 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 string - certificate ID.
- Hosts []string
- host names.
- Secret
Name string - secret name, if you use a certificate, you don't need to fill in this field.
- certificate
Id String - certificate ID.
- hosts 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 string - certificate ID.
- hosts string[]
- host names.
- secret
Name 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.
- certificate
Id String - certificate ID.
- hosts 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.