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

How to pass random values for certain parameter in taskcat file #797

Closed
nitinitare opened this issue May 10, 2023 · 1 comment
Closed

How to pass random values for certain parameter in taskcat file #797

nitinitare opened this issue May 10, 2023 · 1 comment
Assignees
Labels

Comments

@nitinitare
Copy link

When I am creating multiple resources through AWS codepipeline, all the builds will trigger at same time and only one build succeeds and other fails with error the resource already exist.
I have only one .taskcat.yml file which is in the same folder as cloudformation template. And I have multiple .json parameters file in a different folder to create multiple resource.

Is there any way to pass random values for a parameter like resourcename(can be a s3 bucket, dynamodb table, rds, iam role etc)?

Let me know if there is a workaround.

@tlindsay42 tlindsay42 self-assigned this May 10, 2023
@tlindsay42
Copy link
Member

In infrastructure as code (IaC), naming is best implemented through tags/metadata rather than resource names to avoid situations like that, but there are ways to accomplish what you want, such as using taskcat pseudo parameters like $[taskcat_random-string] and/or appending either all or part of the stack ID (using CloudFormation intrinsic functions like sub, split, join, et cetera).

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

2 participants