Closed zliang-akamai closed 2 weeks ago
This is to migrate linode_nodebalancer_node to be with Terraform Plugin Framework.
linode_nodebalancer_node
make int-test PKG_NAME="linode/nbnode" make int-test PKG_NAME="linode/nb" make int-test PKG_NAME="linode/nbconfig"
resource "linode_instance" "foo" { count = "2" label = "web-${count.index + 1}" image = "linode/ubuntu22.04" region = "us-mia" type = "g6-standard-1" authorized_keys = ["ssh-rsa AAAA...Gw== user@example.local"] root_pass = "UNSAFE-PASSWORD!!" private_ip = true } resource "linode_nodebalancer" "foobar" { label = "mynodebalancer" region = "us-mia" client_conn_throttle = 20 } resource "linode_nodebalancer_config" "foofig" { nodebalancer_id = linode_nodebalancer.foobar.id port = 80 protocol = "http" check = "http" check_path = "/foo" check_attempts = 3 check_timeout = 30 stickiness = "http_cookie" algorithm = "source" } resource "linode_nodebalancer_node" "foonode" { count = "2" nodebalancer_id = linode_nodebalancer.foobar.id config_id = linode_nodebalancer_config.foofig.id address = "${element(linode_instance.foo.*.private_ip_address, count.index)}:80" label = "mynodebalancernode" weight = 50 lifecycle { // Tell Terraform to implicitly recreate the NodeBalancer node when // the target instance has been marked for recreation. // See: https://github.com/linode/terraform-provider-linode/issues/1224 replace_triggered_by = [linode_instance.foo] } }
📝 Description
This is to migrate
linode_nodebalancer_node
to be with Terraform Plugin Framework.✔️ How to Test