Comments (18)
Trying to make use of new resources available as of provider.tencentcloud v1.15.0 and encountered some issues:
- Error: [TencentCloudSDKError] Code=InvalidParameterValue, Message=Scheduler should be WRR or LEAST_CONN, RequestId=26db209f-3997-47b8-8b0b-e1ea002374af
According to the documentation for tencentcloud_clb_listener, this parameter is optional and the default is 'WRR':
scheduler - (Optional) Scheduling method of the CLB listener, and available values include 'WRR', 'IP HASH' and 'LEAST_CONN'. The defaule is 'WRR'.
- Having difficulty coming up with a valid configuration for tencentcloud_clb_listener and tencentcloud_clb_listener rule, e.g:
Error: [TencentCloudSDKError] Code=InvalidParameterValue, Message=This interface only support HTTP/HTTPS listener., RequestId=6bd1e9a2-cb76-4817-b89d-10f689d56617
Error: health_check_http_path can only be set with protocol TCP
Error: health para can only be set with TCP/UDP listener or rule of HTTP/HTTPS listener
-
Not clear what to provide for 'domain' and 'url' of tencentcloud_clb_listener_rule; semantics differ from those of other providers.
-
No attributes exported from tencentcloud_clb_instance, so not possible to determine its IP address.
I suspect these are largely documentation issues.
from terraform-provider-tencentcloud.
Hello @lubars
Sorry for the trouble.
from terraform-provider-tencentcloud.
- Please don't define
Scheduler
in tf file, then it will use the default value WRR.
from terraform-provider-tencentcloud.
tencentcloud_clb_instance
support TCP/UDP or HTTP/HTTPS mode, the arguments can not mixed, please check documents for detail.
Error: health_check_http_path can only be set with protocol TCP
, means health_check_http_path
only work with TCP
mode. what document said:
health_check_http_path - (Optional) Path of health check. NOTES: Only supports listeners of 'HTTPS'/'HTTP' protocol.
refer: https://www.terraform.io/docs/providers/tencentcloud/r/clb_listener_rule.html#health_check_http_path
from terraform-provider-tencentcloud.
- Yes, there is something different with other providers.
resource "tencentcloud_clb_listener_rule" "foo" {
listener_id = "lbl-hh141sn9"
clb_id = "lb-k2zjp9lv"
domain = "foo.net"
url = "/bar"
}
be equal to AWS
resource "aws_lb_listener_rule" "static" {
listener_arn = "${aws_lb_listener.front_end.arn}"
condition {
field = "path-pattern"
values = ["/bar*"]
}
condition {
field = "host-header"
values = ["foo.net"]
}
}
from terraform-provider-tencentcloud.
- Sorry, we will export it next version.
Attributesclb_vips
, a list of ip string.
from terraform-provider-tencentcloud.
The example may help to configure.
from terraform-provider-tencentcloud.
Hello @lubars
We have release v1.15.1, for 1, 2, 3 would you please upgrade and have a new try?
for 4th, please use attributes clb_vips
, for example: tencentcloud_clb_instance.foo.clb_vips
(there is something wrong with documents, we will fix it assp).
from terraform-provider-tencentcloud.
Hi @likexian,
I am having success with clb_vips
, thank you.
By the way, docs for tencentcloud_clb_attachment
indicate that the default weight
is 10:
weight - (Optional) Forwarding weight of the backend service, the range of [0, 100], defaults to 10.
However looking at the console, it appears that the default weight is '0'.
from terraform-provider-tencentcloud.
Also, have you given any thought to making the target of tencentcloud_clb_attachment
into a list of tencentcloud_instance
ids, rather than a hard-coded list of targets
? The most compact way I was able to add every tencentcloud_instance
to the backend pool:
resource "tencentcloud_clb_attachment" "default" {
listener_id = tencentcloud_clb_listener.default.id
clb_id = tencentcloud_clb_instance.default.id
dynamic "targets" {
for_each = [for instance in tencentcloud_instance.default: {
id = instance.id
}]
content {
instance_id = targets.value.id
port = var.ForwardPort
}
}
}
But maybe I've missed something simpler.
from terraform-provider-tencentcloud.
Hi @likexian,
I am having success with
clb_vips
, thank you.By the way, docs for
tencentcloud_clb_attachment
indicate that the defaultweight
is 10:weight - (Optional) Forwarding weight of the backend service, the range of [0, 100], defaults to 10.
However looking at the console, it appears that the default weight is '0'.
Thank you @lubars
The default weight of console is '10' too, however you can set to '0' manually.
from terraform-provider-tencentcloud.
Also, have you given any thought to making the target of
tencentcloud_clb_attachment
into a list oftencentcloud_instance
ids, rather than a hard-coded list oftargets
? The most compact way I was able to add everytencentcloud_instance
to the backend pool:resource "tencentcloud_clb_attachment" "default" { listener_id = tencentcloud_clb_listener.default.id clb_id = tencentcloud_clb_instance.default.id dynamic "targets" { for_each = [for instance in tencentcloud_instance.default: { id = instance.id }] content { instance_id = targets.value.id port = var.ForwardPort } } }
But maybe I've missed something simpler.
You are doing the right way, I don't have a simpler too.
However you can make it as follow:
resource "tencentcloud_clb_attachment" "default" {
listener_id = "${tencentcloud_clb_listener.default.id}"
clb_id = "${tencentcloud_clb_instance.default.id}"
dynamic "targets" {
for_each = tencentcloud_instance.default
content {
instance_id = targets.value.id
port = var.ForwardPort
}
}
}
from terraform-provider-tencentcloud.
The weight comes up in the console as '0' if not specified in the Terraform template, which results in no traffic being directed at that target; as soon as I set it to '10' in the template (or override it in the console), traffic starts flowing. So I think you need to look again at the Terraform default.
from terraform-provider-tencentcloud.
Sorry @lubars
There is some misunderstanding, I got what you means now.
There is a problem with the default value, we will fixed it in next version.
from terraform-provider-tencentcloud.
Hello @lubars
The default value is fixed now, please try.
from terraform-provider-tencentcloud.
@likexian It looks like the behavior now matches the documentation. It would be nice if health_check_http_path
could be used with a TCP listener so that compute instances could indicate they are not active, even when they are reachable (for example, during a rolling upgrade). Do you think this makes sense as a feature request, or is this a limitation of TencentCloud itself?
from terraform-provider-tencentcloud.
Hello @lubars , thank you for your feedback, health_check_http_path
now only works with HTTP
, it is the limitation of TencentCloud CLB. Will it possible that you change you TCP listener
to HTTP listener
?
from terraform-provider-tencentcloud.
Hello,
If there is still some problem, please feel free to open a new issue.
from terraform-provider-tencentcloud.
Related Issues (20)
- Bug in documentation for TKE kubernetes_node_pool resource HOT 2
- bug on security_group_lite_rule
- Cannot create CVM with CLOUD_HSSD
- Failed to create tencentcloud_dc_gateway_ccn_route resource
- cvm key_name err HOT 1
- Import sfc function get a error "Cannot import non-existent remote object"
- COS 可以支持元数据加速吗
- Support tencentcloud_private_dns_zone data source
- Invalid mem_size in tencentcloud_redis_instance HOT 1
- After updating to 1.81.70, TencentCloud returns SDKError HOT 1
- Creation of tencentcloud_vod_sub_application is successful, but terraform returns invalid vod user HOT 1
- 使用 tencentcloud_security_groups 数据源资源获取的安全组id错误 HOT 2
- Link cvm to clb backend, an error "instance launch failed" throw HOT 1
- 1.81.77 incompatibility/broken ? HOT 3
- tencentcloud_cbs_storage_attachment 支持挂载存储后指定挂载路径及格式化文件系统
- tencentcloud_tcr_instance需要支持指定region以及开启COS多AZ特性 HOT 1
- 支持修改更新 TKE eniipamd 组件的全局配置 HOT 2
- TKE添加节点或者节点池,支持自定义脚本功能 HOT 1
- TKE查询集群节点信息支持Limit可配置或者默认值设为100 HOT 2
- 告警规则tencentcloud_monitor_alarm_policy不支持复合指标的创建
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-tencentcloud.