[Bug]: AWS SNS platform app fails to create for windows #37564
Open
Description
Terraform Core Version
1.8.3
AWS Provider Version
5.43.0
Affected Resource(s)
aws_sns_platform_application
Expected Behavior
It should create the platform app. I've verified in the AWS console and with the AWS cli that the values for PlatformPrincipal and PlatformCredential are correct. I can also import the Platform App into the terraform state. Terraform just can't create it
Actual Behavior
It fails to create the platform app in SNS
Relevant Error/Panic Output Snippet
module.common.aws_sns_platform_application.main: Creating...
╷
│ Error: creating SNS Platform Application (qa-starligh): operation error SNS: CreatePlatformApplication, https response error StatusCode: 400, RequestID: 8573be34-c8b5-5f78-92c7-e0f4fd93b3aa, InvalidParameter: Invalid parameter: Attributes Reason: Platform credentials are invalid
│
│ with module.common.aws_sns_platform_application.main,
│ on ../../../common/sns.tf line 1, in resource "aws_sns_platform_application" "main":
│ 1: resource "aws_sns_platform_application" "main" {
│
╵
Terraform Configuration Files
To fully reproduce you need an app in the MS partner center that has notifications approved.
resource "aws_sns_platform_application" "main" {
name = "${var.environment}-${var.app_name}"
platform = "WNS"
# The Package Security Identifier (SID) for Windows
platform_principal = "ms-app://<SID>"
platform_credential = var.application_credential
success_feedback_sample_rate = "100"
}
Steps to Reproduce
Run terraform apply
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
- https://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformApplication.html
- https://learn.microsoft.com/en-us/previous-versions/windows/apps/hh868206(v=win.10)?redirectedfrom=MSDN
Would you like to implement a fix?
None