Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically set module version in terratest #1331

Open
maha51ece-tech opened this issue Aug 13, 2023 · 1 comment
Open

Dynamically set module version in terratest #1331

maha51ece-tech opened this issue Aug 13, 2023 · 1 comment
Labels

Comments

@maha51ece-tech
Copy link

Hi Team,
Is there a way we can dynamically set a "version" field in the module available in terraform configuration file similar to

terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{
	TerraformDir: "../fixtures/cloud_storage",
	// Reconfigure:  true,
	Vars: map[string]interface{}{
		"project_id": projectId,
		"name": fmt.Sprintf("bucket-asd-"+environment+"-encryption-testauto"),
		"location":         location,
		"storage_class":    "STANDARD",
		"force_destroy": true,
		"additional_labels": labels["ap1"],
		"uniform_bucket_level_access": true,
		"keynames": kmsKeyId,
	},
	VarFiles: []string{
		"common_cloud_storage.tfvars",
	},
	
})
@skyzyx
Copy link

skyzyx commented Oct 31, 2023

I usually use https://github.com/minamijoyo/hcledit for things like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants