-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix: make cloud_credentials data test isolated #721
Conversation
data "env0_aws_credentials" "aws_credentials1" { | ||
name = data.env0_cloud_credentials.aws_credentials.names[index(data.env0_cloud_credentials.aws_credentials.names, env0_aws_credentials.aws_cred1.name)] | ||
} | ||
|
||
data "env0_aws_credentials" "aws_credentials2" { | ||
name = data.env0_cloud_credentials.aws_credentials.names[index(data.env0_cloud_credentials.aws_credentials.names, env0_aws_credentials.aws_cred2.name)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First time seeing this format. does it work like for_each
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope its the opposite ,
you take a list and search in the list for a specific value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liranfarage89 same as #697
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue & Steps to Reproduce / Feature Request
since we run our tests in parallel other tests that create
env0_aws_credentials
resources interfere with this testSolution
Isolate the test and only use resources from the same test