Skip to content

Make terraform outputs available as variables in tests #703

@andrewkroh

Description

@andrewkroh

This is a feature request to make the data from terraform outputs -json available in system tests. An example use case is a test that creates an S3 bucket and SQS topic and needs information about those resources in the test case.

# _dev/deploy/tf/outputs.tf

output "queue_url" {
  value = aws_sqs_queue.test-queue.url
}

And then be able to reference those values in some way in test parameters.

# _dev/test/system/test-awss3-config.yml

input: aws-s3
data_stream:
  vars:
    access_key_id: "{{{ AWS_ACCESS_KEY_ID }}}"
    secret_access_key: "{{{ AWS_SECRET_ACCESS_KEY }}}"
    queue_url: "{{{ TF_OUTPUT_queue_url }}}"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions