Giter Club home page Giter Club logo

Comments (18)

lubars avatar lubars commented on June 22, 2024

Trying to make use of new resources available as of provider.tencentcloud v1.15.0 and encountered some issues:

  1. 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'.

  1. 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

  1. Not clear what to provide for 'domain' and 'url' of tencentcloud_clb_listener_rule; semantics differ from those of other providers.

  2. 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.

likexian avatar likexian commented on June 22, 2024

Hello @lubars
Sorry for the trouble.

from terraform-provider-tencentcloud.

likexian avatar likexian commented on June 22, 2024
  1. Please don't define Scheduler in tf file, then it will use the default value WRR.

from terraform-provider-tencentcloud.

likexian avatar likexian commented on June 22, 2024
  1. 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.

likexian avatar likexian commented on June 22, 2024
  1. 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.

likexian avatar likexian commented on June 22, 2024
  1. Sorry, we will export it next version.
    Attributes clb_vips, a list of ip string.

from terraform-provider-tencentcloud.

likexian avatar likexian commented on June 22, 2024

The example may help to configure.

https://github.com/terraform-providers/terraform-provider-tencentcloud/tree/master/examples/tencentcloud-clb

from terraform-provider-tencentcloud.

likexian avatar likexian commented on June 22, 2024

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.

lubars avatar lubars commented on June 22, 2024

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.

lubars avatar lubars commented on June 22, 2024

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.

likexian avatar likexian commented on June 22, 2024

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'.

Thank you @lubars
The default weight of console is '10' too, however you can set to '0' manually.

from terraform-provider-tencentcloud.

likexian avatar likexian commented on June 22, 2024

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.

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.

lubars avatar lubars commented on June 22, 2024

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.

likexian avatar likexian commented on June 22, 2024

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.

likexian avatar likexian commented on June 22, 2024

Hello @lubars
The default value is fixed now, please try.

from terraform-provider-tencentcloud.

lubars avatar lubars commented on June 22, 2024

@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.

likexian avatar likexian commented on June 22, 2024

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.

likexian avatar likexian commented on June 22, 2024

Hello,
If there is still some problem, please feel free to open a new issue.

from terraform-provider-tencentcloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.