Report this

What is the reason for this report?

Add load balancer created by helm chart to project

Posted on June 15, 2020

Hi. I have a Terraform project that does the following:

  1. creates a VPC
  2. provisions a k8s cluster and adds it to the aforementioned VPC
  3. creates a project
  4. adds the k8s cluster to the project
  5. applies a helm chart that installs Wordpress

During the installation, the chart provisions two volumes and a load balancer which I would like to add to the project but can’t see to figure out how to get their data in Terraform to do so.

Does anybody have advice on how to add the volumes and the load balancer to the project?

Or, is there any possibility to create the volumes + PVCs and add them to the project and then make the chart use the resources already provisioned instead of provisioning new ones?

Thanks a lot!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This was not sufficiently answered as I understand the question. @servicesShrimp specifically stated that he was automating the rollout using the terraform helm provider and, while it rolled out wordpress, a DO load balancer was created. His question was simply how he could get a handle on that (it’s URN possibly) so that subsequent terraform code can refer to it.

Asking @servicesShrimp to click buttons in a UI seems to have confused this point.

I’m also experiencing the same issue, although I need the loadbalancer reference to create an A record for it after it’s created.

If anyone has any pointers, please do point!

Hi, I would start with the following steps to make sure that everything is working as expected:

  1. create a project
  2. create a cluster
  3. add the cluster to project
  4. add Wordpress using Helm chart

Note: One should be able to complete steps 2 - 3 within their local development environment.

After you successfully complete the above steps, then you can look at automating the provisions of your cluster using Terraform.

Think different and code well,

-Conrad

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.