Provides an SNS platform application resource
resource "aws_sns_platform_application" "apns_application" {
name = "apns_application"
platform = "APNS"
platform_credential = "<APNS PRIVATE KEY>"
platform_principal = "<APNS CERTIFICATE>"
}
resource "aws_sns_platform_application" "apns_application" {
name = "apns_application"
platform = "APNS"
platform_credential = "<APNS SIGNING KEY>"
platform_principal = "<APNS SIGNING KEY ID>"
apple_platform_team_id = "<APPLE TEAM ID>"
apple_platform_bundle_id = "<APPLE BUNDLE ID>"
}
resource "aws_sns_platform_application" "gcm_application" {
name = "gcm_application"
platform = "GCM"
platform_credential = "<GCM API KEY>"
}
This resource supports the following arguments:
name
- (Required) The friendly name for the SNS platform applicationplatform
- (Required) The platform that the app is registered with. See Platform for supported platforms.platform_credential
- (Required) Application Platform credential. See Credential for type of credential required for platform. The value of this attribute when stored into the Terraform state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources.event_delivery_failure_topic_arn
- (Optional) The ARN of the SNS Topic triggered when a delivery to any of the platform endpoints associated with your platform application encounters a permanent failure.event_endpoint_created_topic_arn
- (Optional) The ARN of the SNS Topic triggered when a new platform endpoint is added to your platform application.event_endpoint_deleted_topic_arn
- (Optional) The ARN of the SNS Topic triggered when an existing platform endpoint is deleted from your platform application.event_endpoint_updated_topic_arn
- (Optional) The ARN of the SNS Topic triggered when an existing platform endpoint is changed from your platform application.failure_feedback_role_arn
- (Optional) The IAM role ARN permitted to receive failure feedback for this application and give SNS write access to use CloudWatch logs on your behalf.platform_principal
- (Optional) Application Platform principal. See Principal for type of principal required for platform. The value of this attribute when stored into the Terraform state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources.success_feedback_role_arn
- (Optional) The IAM role ARN permitted to receive success feedback for this application and give SNS write access to use CloudWatch logs on your behalf.success_feedback_sample_rate
- (Optional) The sample rate percentage (0-100) of successfully delivered messages.The following attributes are needed only when using APNS token credentials:
apple_platform_team_id
- (Required) The identifier that's assigned to your Apple developer account team. Must be 10 alphanumeric characters.apple_platform_bundle_id
- (Required) The bundle identifier that's assigned to your iOS app. May only include alphanumeric characters, hyphens (-), and periods (.).This resource exports the following attributes in addition to the arguments above:
id
- The ARN of the SNS platform applicationarn
- The ARN of the SNS platform applicationIn Terraform v1.5.0 and later, use an import
block to import SNS platform applications using the ARN. For example:
import {
to = aws_sns_platform_application.gcm_application
id = "arn:aws:sns:us-west-2:0123456789012:app/GCM/gcm_application"
}
Using terraform import
, import SNS platform applications using the ARN. For example:
% terraform import aws_sns_platform_application.gcm_application arn:aws:sns:us-west-2:0123456789012:app/GCM/gcm_application