-
-
Notifications
You must be signed in to change notification settings - Fork 140
Cannot use loop in actions_v2
variable
#551
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
Comments
Hi @BenjaminVouillaume, this is unexpected. Can you tell me what version of Terraform are you using? |
Hi @jianyuan, Thanks |
I have a similar issue when using conditions_v2 = var.some_var == "some_value" ? [{ first_seen_event = {} }] : [{ first_seen_event = {} }] this gives:
Also a quick question on the design of the resource |
As suggest by @nikolaik, and compare to other Terraform Providers, I would expect to somethings like that: conditions_v2 {
first_seen_event {}
}
conditions_v2 {
regression_event {}
}
filters_v2 {
age_comparison {
comparison_type = "older"
value = 10
time = "minute"
}
}
filters_v2 {
issue_occurrences {
value = 10
}
}
actions_v2 {
notify_email {
target_type = "IssueOwners"
fallthrough_type = "ActiveMembers"
}
}
dynamic "actions_v2" {
for channel in var.channels :
content {
slack_notify_service {
workspace = data.sentry_organization_integration.slack.id
channel = actions_v2.value.channel
tags = ["environment", "level"]
notes = "Please <http://example.com|click here> for triage information"
}
}
} This structure would allow us to use the dynamic block ! Just a opinion. I really don't know the impact on the code. And I'm not a developer so I can't contribute easily myself. |
Hi! I also have a similar issue when trying to use a sentry_issue_alert from version 0.14.3, I get the following conversion error:
The module is implemented this way:
local.tf
The same thing happens with conditions_v2 and actions_v2. |
Encountered this issue today as well. Even wrapping my ternary expression in |
Encountering the same issue just now as well, will stick with the deprecated interface for now. This is with Terraform v1.11.2. |
Hi @jianyuan, we've encountered the same issue today. Our current module does the following:
When we change the conditional clause of the ternary expressions to either true or false, it works as expected. Seems to be an issue while using logic itself. This is Terraform v1.11.4, with provider version v0.14.5. |
Hi @jianyuan would you be able to take a look soon? I just want to see how much effort should I put into work-around this. |
Apologies I was away on annual leave. I can look into this later this week! |
Uh oh!
There was an error while loading. Please reload this page.
Hello 👋
I just upgraded to version 0.14.3, and I'm trying to migrate from
actions
toactions_v2
in the sentry_issue_alert resource.I change this code:
to this code:
And when I'm trying to apply I have this error:
I guess it's not possible right now to dynamically build a list of actions in the
actions_v2
params because of the types mistmatch.Can you help me with this ? Or do you see another way to dynamically build the list with the right type ?
Thanks you very much !
The text was updated successfully, but these errors were encountered: