Hi friends, is anyone using terragrunt for testing of creation of aws resources?
Cold you explain the idea? What exact you want to test?
Yes give me a moment
We provision a new kubernetes cluster infrequently and we install a number of core components / addons that we require for production use. Testing if its functionally is working is time consuming and often done manually right now.
For example one usecase we want to test is if aws-load-balancer-controller and external-dns are working directly.
- We will create an ingress manifest file
- make sure the domain was created in route53
- check if ssl termination and certificate is working
- ping the service to see if its publically available
Ok, got the idea. Why not implement all above with Terraform (because Terragrunt is just a wrapper and changes nothing in this case).
- You can use kubectl provider to deploy manifest to your cluster.
- (if I understand you need to ensure that externaldns created it), take a look on custom script executed in terraform via local-exec
- same as p2
- same as p2
Oh i made a mistake of writing terragrunt when i meant to write terratest
We need to ensure that aws-load-balancer-controller and external-dns are present within the cluster.
We need to ensrue that aws-load-balancer-controller has succesfully created a application load balacner
We need to ensure that external-dns has succesfully created the domain
We need to ensure that the service is publically accessible
So aws-load-balancer-controller and external-dns are components or addons installed in our cluster, which control manage create aws resources
Unfortunately looking into Terratest yesterday, although they do have kubernetes and aws modules. It is not feature rich, for example they don’t have route53 or alb functinality to test resources are present
It seems like an obvious requirement wanting to test if this functionality is working, i thought there maybe other tools are out there, im curious to know what others are doing. Maybe this channel is not the best place to ask as its not particularly terraform related.
I may end up just using plain k8s sdk and aws sdk in Go with some assertion library
Sorry, I have never played with terratest yet