Open hverma95 opened 2 years ago
Hi @hverma95!
It is indeed currently impossible to use the same channel across multiple workflows.
Manually we are able to create the workflow and attach the same channel which is already connected to other workflows BUT through terraform it fails.
Could you please clarify how you do it? Are you talking about UI or GraphQL API? If we are talking about UI, you can reuse destinations but not channels. Channels are mostly invisible to UI users.
You can reuse destinations in TF as well. Using your diagram format, it would look like this:
Workflow1 ------> Channel1 ------> Destination1
Workflow2 ------> Channel2 ------> Destination1
Workflow3 ------> Channel3 ------> Destination1
Please let me know if I am missing something and it is indeed possible to reuse channels (not destinations) though UI/GraphQL.
In general, we are thinking about allowing to reuse channels between workflows at some point. But this is not a high priority currently.
I m having the same issue as @hverma95 . It works only for 5 workflows. If I have 6th workflow and try to reuse the same channel then I get the error - "Error: INVALID_PARAMETER: Channels ids are already in use by workflows".
Is there any update on this ticket? @IliaShurygin
@IliaShurygin We also face the same issue.
I am able to create multiple workflows with the same destination and the same slack channel through the UI:
Workflow1 ------> Channel1 ------> Destination1 Workflow2 ------> Channel1 ------> Destination1 Workflow3 ------> Channel1 ------> Destination1
When I'm trying to do so through Terraform, I get the same error:
Error: INVALID_PARAMETER: Channels ids are already in use by workflows [channel_id]
Hi!
I am able to create multiple workflows with the same destination and the same slack channel through the UI:
UI never reuses channels, but it does reuse destinations. You can verify this using our GraphQL API. UI just creates new channel every time you add a new destination to the workflow.
@shachar-ash , @Gobikannan I would recommend to just create separate channels for each workflow. You can reuse destinations, but not channels (currently).
We see that the channel usage restriction causes confusion and do plan to address this problem in the long term. However, as of now, we do not have any concrete plans or timelines.
In order to avoid this issue, please create new channels for each workflow (this is exactly how UI currently works). This would still allow you to fully reuse destinations.
Thanks @IliaShurygin , We have created a channel for each workflow/destination to attach.
@IliaShurygin Just to make sure I understand what you are saying - when you say "create new channels for each workflow" do you mean to create a new channel object that points to the same slack channel?
Is that the way its implemented through the UI?
Thanks
@shachar-ash yes, exactly! This is the way UI currently does it internally
We are hitting the same issue
Error: INVALID_PARAMETER: Channels ids are already in use by workflows [50b6cbb7-4187-402e-8e74-5ff8aed1be6a]
> terraform --version
Terraform v1.3.3
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v4.48.0
+ provider registry.terraform.io/newrelic/newrelic v3.11.0
For now we will have to create a new channel for each workflow.
provider
configuration (sensitive details redacted)Terraform Version
Terraform v0.14.11
Affected Resource(s)
Please list the resources as a list, for example:
newrelic_workflow
newrelic_notification_channel
Error: Error: INVALID_PARAMETER: Channels ids are already in use by workflows [ef1f8c4c-074f-4dbc-9173-5df65faa3271, 418881be-f71d-4c1d-b32e-eebf75580617]
Description The issue is related to the mapping between the workflow and the channel. The error comes while creating the workflow resource.
When running "terraform apply", it fails on adding the same "notification channel" to some of the "workflows", it says that it is already connected to other workflows. In fact, during the terraform run the channel gets connected to some of the workflows.
Like in the above error it shows that a single channel got connected to 2 workflows but failed for the current workflow.
So the mapping scenario is like this: Set 1(shared):
Workflow1 ------> Channel1 ------> Destination1 Workflow2 ------> Channel1 ------> Destination1 Workflow3 ------> Channel1 ------> Destination1
Set 2 (dummy): Workflow4 ------> Channel2 ------> Destination2 Workflow5 ------> Channel2 ------> Destination2 Workflow6 ------> Channel2 ------> Destination2
Terraform Configuration
provider.tf
main.tf
vars.tf
Actual Behavior
When running "terraform apply":
Expected Behavior
A single channel should get connected to multiple workflows.
Steps to Reproduce
terraform apply
Important Factoids
Manually we are able to create the workflow and attach the same channel which is already connected to other workflows BUT through terraform it fails.