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

Terraform doesn't send the "Channel Name" to AWS chatbot in in awscc_chatbot_microsoft_teams_channel_configuration #1233

Open
javicor opened this issue Oct 5, 2023 · 6 comments

Comments

@javicor
Copy link

javicor commented Oct 5, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Terraform CLI and Terraform AWS Cloud Control Provider Version

Affected Resource(s)

  • awscc_chatbot_microsoft_teams_channel_configuration

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "awscc_chatbot_microsoft_teams_channel_configuration" "ChatBot_Test" {

  configuration_name = var.Name_Chatbot
  iam_role_arn       = aws_iam_role.role.arn
  team_id            = var.team_id
  ## Here we put the channel ID of the Microsoft teams group, but in the AWS Chatbot when it creates it does not identify the "Channel Name" and sets it to Null.
  teams_channel_id   = var.teams_channel_id
  teams_tenant_id    = var.teams_tenant_id
  guardrail_policies = [data.aws_iam_policy.PolicyReadEc2.arn]
  sns_topic_arns     = [var.sns_arn]

}

Debug Output

Resource "awscc_chatbot_microsoft_teams_channel_configuration" "ChatBot_test" {
+ arn = (known after apply)
+ configuration_name = "ChatBot_Notifications"
+ guardrail_policies = (known after apply)
+ iam_role_arn = "arn:aws:iam::xxxxxxxx:role/xxxxxxx"
+ id = (known after apply)
+ logging_level = (known after apply)
+ sns_topic_arns = [
+ "arn:aws:sns:us-east-1:xxxxxxx:xxxxxxxx",
]
+ team_id = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
+ teams_channel_id = "xx%xxxxxxxxxxxxxxxx-xxxxxxxxx%40xxx.tacv2"
+ teams_tenant_id = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ user_role_required = (known after apply)
}

Panic Output

Expected Behavior

field: teams_channel_id

In the configuration Channels of AWS Chatboot the channel name field should appear as the name of the channel name if the default is "General" or if you create another should also put the name.

I provide the information on how the link to the teams channel is provided.

https://teams.microsoft.com/l/channel/xx%xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%40thread.tacv2/General?groupId=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx&tenantId=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Actual Behavior

field: teams_channel_id

It is always setting the Channel Name to NULL.

Steps to Reproduce

  1. Enter all the information from Resource "awscc_chatbot_microsoft_teams_channel_configuration".
  2. terraform apply
  3. Validate in the AWS ChatBot in the Channel settings. Check the field called Channel Name. You will notice that there is nothing.
  4. Select the Channel I just created and edit it manually.
  5. Check the field called Channel URL and copy all the information from the URL that appears there. Look that in this link appears the word NULL and not the name of the channel we want to send the notifications.
    https://teams.microsoft.com/l/channel/xx%xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%40thread.tacv2/null?groupId=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx&tenantId=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  6. If you try to send a test notification it does not reach the Teams group, because you cannot identify which channel name to send it to.

Important Factoids

References

  • #0000
@javicor javicor changed the title Terraform doTerraform does not send the "Channel Name" to AWS chatbot in in awscc_chatbot_microsoft_teams_channel_configuration Terraform doesn't send the "Channel Name" to AWS chatbot in in awscc_chatbot_microsoft_teams_channel_configuration Oct 5, 2023
@cristianketrics
Copy link

Same problem here

@SuryaTeja18
Copy link

The issue is also the same with CDK CfnMicrosoftTeamsChannelConfiguration construct:

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_chatbot.CfnMicrosoftTeamsChannelConfiguration.html

It doesn’t send Channel Name so its always set to null. If it does include Channel Name, this ideally shouldn’t occur.

@SuryaTeja18
Copy link

On a side note, is there any reason as to why ChannelName is also not a "required" parameter in SDK? Eg - create_microsoft_teams_channel_configuration (boto3)

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/chatbot/client/create_microsoft_teams_channel_configuration.html

@rafal-skurka
Copy link

bump, it still doesn't work

@7adityaraj
Copy link

same issue, It is always setting the Channel Name to NULL.
while trying to create via AWS console, it take full URL of msteam (link to the channel) and channel name get populated itself

@wellsiau-aws
Copy link
Collaborator

@SuryaTeja18 , to confirm, are you able to replicate the problem while using CDK ? where the Channel name always returned null ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants