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

[Bug]: aws_chime_voice_connector errors with ForbiddenException in new AWS accounts #33633

Closed
jeffhuenemann opened this issue Sep 26, 2023 · 5 comments · Fixed by #33976
Closed
Labels
bug Addresses a defect in current functionality. service/chime Issues and PRs that pertain to the chime service.
Milestone

Comments

@jeffhuenemann
Copy link

Terraform Core Version

1.5.7

AWS Provider Version

5.17.0

Affected Resource(s)

  • aws_chime_voice_connector

Expected Behavior

Voice Connector should have been provisioned successfully

Actual Behavior

AWS API throws 403 ForbiddenException, despite the IAM user having full AdministratorAccess policy directly attached.

Relevant Error/Panic Output Snippet

2023-09-26T16:22:26.9596528Z aws_chime_voice_connector.vc: Creating...
2023-09-26T16:22:26.9598062Z ╷
2023-09-26T16:22:26.9598984Z │ Error: creating Chime Voice connector: ForbiddenException: Not authorized to call Chime SDK with Account Id xxxxxxxx
2023-09-26T16:22:26.9599285Z │ {
2023-09-26T16:22:26.9599612Z │   RespMetadata: {
2023-09-26T16:22:26.9599782Z │     StatusCode: 403,
2023-09-26T16:22:26.9600047Z │     RequestID: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
2023-09-26T16:22:26.9600216Z │   },
2023-09-26T16:22:26.9600372Z │   Code_: "Forbidden",
2023-09-26T16:22:26.9600660Z │   Message_: "Not authorized to call Chime SDK with Account Id xxxxxxxxxxxx"
2023-09-26T16:22:26.9600835Z │ }
2023-09-26T16:22:26.9600973Z │
2023-09-26T16:22:26.9601160Z │   with aws_chime_voice_connector.vc,
2023-09-26T16:22:26.9601416Z │   on main.tf line 5, in resource "aws_chime_voice_connector" "vc":
2023-09-26T16:22:26.9601683Z │    5: resource "aws_chime_voice_connector" "vc" {
2023-09-26T16:22:26.9601837Z │
2023-09-26T16:22:26.9602143Z ╵
2023-09-26T16:22:27.4415035Z Operation failed: failed running terraform apply (exit 1)

Terraform Configuration Files

main.tf:

resource "aws_chime_voice_connector" "vc" {
  name               = var.voice_connector_name
  aws_region         = var.voice_connector_aws_region
  require_encryption = true
  tags               = var.voice_connector_tags
}

variables.tf

variable "voice_connector_name" {
  type        = string
  description = "Name of Voice Connector resource"
}

variable "voice_connector_aws_region" {
  type        = string
  description = "AWS region name"
}

variable "voice_connector_tags" {
  type        = map(any)
  description = "AWS tags to be applied to voice connectors"
}

Steps to Reproduce

  1. Create AWS Account that hasn't previously used AWS Chime SDK
  2. Create IAM user and directly attach "AdministratorAccess" policy
  3. terraform apply to attempt creating aws_chime_voice_connector
  4. Terraform errors during apply with Error: creating Chime Voice connector: ForbiddenException: Not authorized to call Chime SDK with Account Id xxxxxxxxxxxx

Debug Output

No response

Panic Output

No response

Important Factoids

The AWS Chime team working with us to set up this new service suspects that this issue is because the AWS Terraform Provider is still using the legacy Chime API that has been deprecated and no longer accepts requests from new accounts. I would love to put someone from the provider dev team in touch with them to help resolve.

References

No response

Would you like to implement a fix?

No

@jeffhuenemann jeffhuenemann added the bug Addresses a defect in current functionality. label Sep 26, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/chime Issues and PRs that pertain to the chime service. label Sep 26, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 26, 2023
@jeffhuenemann
Copy link
Author

I updated our pipeline to try this today with the 5.19.0 that came out this morning, and now we have a more descriptive error that confirms suspicion of a deprecated API:

2023-09-29T12:59:40.6753773Z aws_chime_voice_connector.vc: Creating...
2023-09-29T12:59:40.6759485Z ╷
2023-09-29T12:59:40.6786538Z │ Error: creating Chime Voice connector: ForbiddenException: Account Id xxxxxxxxxxxx is not authorized to call deprecated Amazon Chime SDK API on the "chime" endpoint, use one of the "*-chime*" endpoints instead.
2023-09-29T12:59:40.6794248Z │ {
2023-09-29T12:59:40.6794443Z │   RespMetadata: {
2023-09-29T12:59:40.6831142Z │     StatusCode: 403,
2023-09-29T12:59:40.6831749Z │     RequestID: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
2023-09-29T12:59:40.6832532Z │   },
2023-09-29T12:59:40.6833404Z │   Code_: "Forbidden",
2023-09-29T12:59:40.6834555Z │   Message_: "Account Id xxxxxxxxxxxx is not authorized to call deprecated Amazon Chime SDK API on the \"chime\" endpoint, use one of the \"*-chime*\" endpoints instead."
2023-09-29T12:59:40.6835110Z │ }
2023-09-29T12:59:40.6836003Z │
2023-09-29T12:59:40.6836936Z │   with aws_chime_voice_connector.vc,
2023-09-29T12:59:40.6837865Z │   on main.tf line 5, in resource "aws_chime_voice_connector" "vc":
2023-09-29T12:59:40.6839183Z │    5: resource "aws_chime_voice_connector" "vc" {
2023-09-29T12:59:40.6840213Z │
2023-09-29T12:59:40.6840380Z ╵
2023-09-29T12:59:40.8200084Z Operation failed: failed running terraform apply (exit 1)

@wellsiau-aws
Copy link
Contributor

Relevant github issue on Chime SDK

@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label Oct 12, 2023
@github-actions github-actions bot added this to the v5.22.0 milestone Oct 18, 2023
@github-actions
Copy link

This functionality has been released in v5.22.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/chime Issues and PRs that pertain to the chime service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants