64 questions
0
votes
0
answers
57
views
How do I use the Terratest shell module? [closed]
I’ve been trying to use the Terratest shell module to execute bash commands, but I haven’t had much success. Documentation appears to be limited, and most references I found were via AI tools. Below ...
3
votes
1
answer
100
views
Terratest assigning map inside a map to a variable
So I am picking up my first Go/Terratest changes and it seems pretty straight forward to capture attributes from the Terraform Plan and assign them to variables.
For example:
# module.adls....
0
votes
0
answers
32
views
How to delete a container using defer?
I am using the gruntwork module for docker to write automated tests for infrastructure. At the end of each test I want to delete the container I started as part of the test.
I don't see a native ...
2
votes
1
answer
400
views
Doing terraform script test with terratest but facing errors exit status 1
I am using terratest to test terraform, I want to make sure that the terraform makes the resource group,container registry and AKS, When I do go test -v -timeout 60m all the resources are made and ...
2
votes
1
answer
130
views
Azure bicep testing with terratest fails
I' having this kind of issue: This is my test case to test against azure resource created or no.
package test
import (
"testing"
"github.com/gruntwork-io/terratest/modules/...
0
votes
0
answers
285
views
Terratest validation using init and plan
I want to validate the security group inbound and outbound rules for my terraform code using terratest. By only using init and plan (without provisioning)
I have tried using assert.contains to check ...
0
votes
1
answer
357
views
Terratest Helm Charts Fails with Go Unit tests
I'm trying to unit test my Helm charts using Terratest, but running into a strange error:
Here is my unit test:
package grafana
import (
"fmt"
"testing"
corev1 "...
0
votes
1
answer
92
views
is there a way to fire multiple IP addresses using http_helper.HttpGetWithRetry in terratest?
I am testing creation of multiple AWS instances with proper subnet and rules by firing multiple IP addresses for testing AWS infrastructure using below terratest code but it is only taking first IP ...
-2
votes
1
answer
425
views
Terraform Terratest - undefined Destroy function error [closed]
Tried to run terratest over terraform file which invokes a aws instance and host a static website but post running this terratest module, it gives an undefined error for destroy function.
Terratest ...
1
vote
0
answers
192
views
terratest receive error (variable of type *string) as type string in argument while read the cloudwatch log stream
I'm very new to golang, so I'm trying to follow: terratest_code-base while buidling my test to read the cw log stream.
terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform....
0
votes
0
answers
146
views
terratest to test SQS
I am using terratests to test my terraform code.
so, my terraform code setup: SQS which is connected to Lambda and Lambda is the consumer of the SQS Message
so, I would like to test the whole flow, So ...
1
vote
1
answer
591
views
How to mock Terraform functions
I'm studying Terraform and as a test lover I'm using Terratest to test it out but, I'm not being able to mock Terraform's functions such as timestamp(). Tried some stuffs such as use the library ...
0
votes
0
answers
416
views
terratest fails in gitlab ci
I am writing a gitlab-ci stage to run terratest tests for my terraform and I get and error when is authenticating to AWS.
I have correctly set as env variables for the pipeline AWS credentials and the ...
0
votes
0
answers
270
views
Terratest - how to test a terraform module which contains aws secrets manager secrets
Does anyone have a work around for testing a terraform module with terratest that contains a aws secrets manager secret.
You cant create / delete / create again the same secret, as AWS has a delay in ...
0
votes
1
answer
451
views
Terratest - How to check for terraform output
Is it possible to have terratest run an assertion for a value to exist, instead of the standard assertion that the value = expected?