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

Migrate sns resources to AWS SDK for Go v2 #34252

Merged
merged 28 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0d77bd7
Use AWS SDK for Go v2 for sns service.
ewbankkit Nov 2, 2023
596f141
Add 'names.SNSEndpointID'.
ewbankkit Nov 2, 2023
42b2d2e
Run 'make gen'.
ewbankkit Nov 2, 2023
adb4153
sns: Generate AWS SDK for Go v2 tagging code.
ewbankkit Nov 2, 2023
320bdf8
Run 'go get github.com/aws/aws-sdk-go-v2/service/sns@v1.25.0 && go mo…
ewbankkit Nov 2, 2023
5ac9411
r/aws_sns_platform_application: Migrate to AWS SDK for Go v2.
ewbankkit Nov 2, 2023
b9be46d
r/aws_sns_sms_preferences: Migrate to AWS SDK for Go v2.
ewbankkit Nov 2, 2023
01d2bf5
r/aws_sns_topic_data_protection_policy: Migrate to AWS SDK for Go v2.
ewbankkit Nov 2, 2023
8e15e76
d/aws_sns_topic: Migrate to AWS SDK for Go v2.
ewbankkit Nov 2, 2023
70926f4
r/aws_sns_topic: Migrate to AWS SDK for Go v2.
ewbankkit Nov 2, 2023
d5c192a
r/aws_sns_topic_policy: Migrate to AWS SDK for Go v2.
ewbankkit Nov 2, 2023
d0cf5cc
r/aws_sns_topic_subscription: Migrate to AWS SDK for Go v2.
ewbankkit Nov 2, 2023
b30e4b6
sns: Migrate sweepers to AWS SDK for Go v2.
ewbankkit Nov 2, 2023
995beb8
sns: Migrate acceptance tests to AWS SDK for Go v2.
ewbankkit Nov 2, 2023
efff0d1
sns: Lowercase constant names.
ewbankkit Nov 2, 2023
eb98ae3
Run 'make fmt'.
ewbankkit Nov 2, 2023
9271201
'TopicAttributeNamePolicy' -> 'topicAttributeNamePolicy'.
ewbankkit Nov 2, 2023
065bcdf
r/aws_sns_platform_application: Use 'acctest.SkipIfEnvVarNotSet' in a…
ewbankkit Nov 2, 2023
f0529b5
r/aws_sns_platform_application: Get GCM acceptance tests working.
ewbankkit Nov 2, 2023
bae4bb7
SNS platform constants not used.
ewbankkit Nov 3, 2023
8200c29
r/aws_sns_topic: Add `archive_policy` argument and `beginning_archive…
ewbankkit Nov 3, 2023
9bb15b3
r/aws_sns_topic: Test 'archive_policy'.
ewbankkit Nov 3, 2023
1ed95ea
Add 'verify.SuppressEquivalentJSONWithEmptyDiffs'.
ewbankkit Nov 3, 2023
707414f
r/aws_sns_topic: Use 'verify.SuppressEquivalentJSONWithEmptyDiffs' fo…
ewbankkit Nov 3, 2023
ff495d7
r/aws_sns_topic: Add `replay_policy` argument.
ewbankkit Nov 3, 2023
4527630
r/aws_sns_topic: Test 'replay_policy'.
ewbankkit Nov 3, 2023
6e56872
Correct CHANGELOG entry file name.
ewbankkit Nov 3, 2023
a985ec5
Fix semgrep 'ci.aws-in-var-name' and 'ci.aws-in-func-name'.
ewbankkit Nov 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changelog/34252.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:enhancement
resource/aws_sns_topic: Add `archive_policy` argument and `beginning_archive_time` attribute to support [message archiving](https://docs.aws.amazon.com/sns/latest/dg/fifo-message-archiving-replay.html)
```

```release-note:enhancement
resource/aws_sns_topic: Add `replay_policy` argument
```
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/servicequotas v1.18.0
github.com/aws/aws-sdk-go-v2/service/sesv2 v1.23.0
github.com/aws/aws-sdk-go-v2/service/signer v1.18.0
github.com/aws/aws-sdk-go-v2/service/sns v1.25.0
github.com/aws/aws-sdk-go-v2/service/sqs v1.26.0
github.com/aws/aws-sdk-go-v2/service/ssm v1.42.0
github.com/aws/aws-sdk-go-v2/service/ssmcontacts v1.19.0
Expand Down Expand Up @@ -143,6 +144,7 @@ require (
github.com/boombuler/barcode v1.0.1 // indirect
github.com/bufbuild/protocompile v0.6.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v0.5.2 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/frankban/quicktest v1.14.6 // indirect
Expand Down
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ
github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
Expand Down Expand Up @@ -173,6 +174,8 @@ github.com/aws/aws-sdk-go-v2/service/sesv2 v1.23.0 h1:+ZEjKybjvhVSJO+1fjOO20Qj7U
github.com/aws/aws-sdk-go-v2/service/sesv2 v1.23.0/go.mod h1:6yFv/JdEBgJSq+bheEas8X6gK7CmmcIXJIoEAur/Zqk=
github.com/aws/aws-sdk-go-v2/service/signer v1.18.0 h1:IO1mEA0wlUNWP//4Xsz2eLsYPKpICISYAU0AMgpjskk=
github.com/aws/aws-sdk-go-v2/service/signer v1.18.0/go.mod h1:X7ARQoz5JA0cwtWH3MZKvBuTf10nxc78Wyz0oi7j3QI=
github.com/aws/aws-sdk-go-v2/service/sns v1.25.0 h1:jLJACSO/+RZZ5KWPSt6Fw0+6mUTJMTyAb0+iLaB256Y=
github.com/aws/aws-sdk-go-v2/service/sns v1.25.0/go.mod h1:TaJ0nsVcYe9tq+m/VH721tzquF8YusAgcwD5xeppVNw=
github.com/aws/aws-sdk-go-v2/service/sqs v1.26.0 h1:21QmEZkOnaJ4SPRFhhN+8MV5ewb0j1lxTg+RPp0mUeE=
github.com/aws/aws-sdk-go-v2/service/sqs v1.26.0/go.mod h1:E02a07/HTyJEHFpp+WMRh33xuNVdsd8WCbLlODeT4lU=
github.com/aws/aws-sdk-go-v2/service/ssm v1.42.0 h1:a0cfLtzrmSy6mnpeg6gh5pSg9hUgn4lMz38p0jAdAuY=
Expand Down Expand Up @@ -328,6 +331,7 @@ github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
Expand Down Expand Up @@ -389,6 +393,7 @@ github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4=
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
Expand Down Expand Up @@ -424,6 +429,7 @@ github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQ
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/zclconf/go-cty v1.14.0 h1:/Xrd39K7DXbHzlisFP9c4pHao4yyf+/Ug9LEz+Y/yhc=
github.com/zclconf/go-cty v1.14.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.45.0 h1:IheWOjAlqLJB0oRsfy640dvUy4T5ARTohgUKR23705U=
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.45.0/go.mod h1:uJGvUG+4OT1N41mbAgng0iNdOTvv9chnfavACM2z2DA=
go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs=
Expand Down Expand Up @@ -522,6 +528,7 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV
gopkg.in/dnaeon/go-vcr.v3 v3.1.2 h1:F1smfXBqQqwpVifDfUBQG6zzaGjzT+EnVZakrOdr5wA=
gopkg.in/dnaeon/go-vcr.v3 v3.1.2/go.mod h1:2IMOnnlx9I6u9x+YBsM3tAMx6AlOxnJ0pWxQAzZ79Ag=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
Expand Down
6 changes: 3 additions & 3 deletions internal/conns/awsclient_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

171 changes: 88 additions & 83 deletions internal/service/sns/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,124 +8,129 @@ import (
)

const (
FIFOTopicNameSuffix = ".fifo"
fifoTopicNameSuffix = ".fifo"
)

const (
PlatformApplicationAttributeNameAppleCertificateExpiryDate = "AppleCertificateExpiryDate"
PlatformApplicationAttributeNameApplePlatformBundleID = "ApplePlatformBundleID"
PlatformApplicationAttributeNameApplePlatformTeamID = "ApplePlatformTeamID"
PlatformApplicationAttributeNameEventDeliveryFailure = "EventDeliveryFailure"
PlatformApplicationAttributeNameEventEndpointCreated = "EventEndpointCreated"
PlatformApplicationAttributeNameEventEndpointDeleted = "EventEndpointDeleted"
PlatformApplicationAttributeNameEventEndpointUpdated = "EventEndpointUpdated"
PlatformApplicationAttributeNameFailureFeedbackRoleARN = "FailureFeedbackRoleArn"
PlatformApplicationAttributeNamePlatformCredential = "PlatformCredential"
PlatformApplicationAttributeNamePlatformPrincipal = "PlatformPrincipal"
PlatformApplicationAttributeNameSuccessFeedbackRoleARN = "SuccessFeedbackRoleArn"
PlatformApplicationAttributeNameSuccessFeedbackSampleRate = "SuccessFeedbackSampleRate"
platformApplicationAttributeNameAppleCertificateExpiryDate = "AppleCertificateExpiryDate"
platformApplicationAttributeNameApplePlatformBundleID = "ApplePlatformBundleID"
platformApplicationAttributeNameApplePlatformTeamID = "ApplePlatformTeamID"
platformApplicationAttributeNameEventDeliveryFailure = "EventDeliveryFailure"
platformApplicationAttributeNameEventEndpointCreated = "EventEndpointCreated"
platformApplicationAttributeNameEventEndpointDeleted = "EventEndpointDeleted"
platformApplicationAttributeNameEventEndpointUpdated = "EventEndpointUpdated"
platformApplicationAttributeNameFailureFeedbackRoleARN = "FailureFeedbackRoleArn"
platformApplicationAttributeNamePlatformCredential = "PlatformCredential"
platformApplicationAttributeNamePlatformPrincipal = "PlatformPrincipal"
platformApplicationAttributeNameSuccessFeedbackRoleARN = "SuccessFeedbackRoleArn"
platformApplicationAttributeNameSuccessFeedbackSampleRate = "SuccessFeedbackSampleRate"
)

/*
const (
PlatfomAPNS = "APNS"
PlatfomAPNSSandbox = "APNS_SANDBOX"
PlatfomGCM = "GCM"
platfomAPNS = "APNS"
platfomAPNSSandbox = "APNS_SANDBOX"
platfomGCM = "GCM"
)
*/

const (
SubscriptionProtocolApplication = "application"
SubscriptionProtocolEmail = "email"
SubscriptionProtocolEmailJSON = "email-json"
SubscriptionProtocolFirehose = "firehose"
SubscriptionProtocolHTTP = "http"
SubscriptionProtocolHTTPS = "https"
SubscriptionProtocolLambda = "lambda"
SubscriptionProtocolSMS = "sms"
SubscriptionProtocolSQS = "sqs"
subscriptionProtocolApplication = "application"
subscriptionProtocolEmail = "email"
subscriptionProtocolEmailJSON = "email-json"
subscriptionProtocolFirehose = "firehose"
subscriptionProtocolHTTP = "http"
subscriptionProtocolHTTPS = "https"
subscriptionProtocolLambda = "lambda"
subscriptionProtocolSMS = "sms"
subscriptionProtocolSQS = "sqs"
)

func SubscriptionProtocol_Values() []string {
func subscriptionProtocol_Values() []string {
return []string{
SubscriptionProtocolApplication,
SubscriptionProtocolEmail,
SubscriptionProtocolEmailJSON,
SubscriptionProtocolFirehose,
SubscriptionProtocolHTTP,
SubscriptionProtocolHTTPS,
SubscriptionProtocolLambda,
SubscriptionProtocolSMS,
SubscriptionProtocolSQS,
subscriptionProtocolApplication,
subscriptionProtocolEmail,
subscriptionProtocolEmailJSON,
subscriptionProtocolFirehose,
subscriptionProtocolHTTP,
subscriptionProtocolHTTPS,
subscriptionProtocolLambda,
subscriptionProtocolSMS,
subscriptionProtocolSQS,
}
}

const (
SubscriptionAttributeNameConfirmationWasAuthenticated = "ConfirmationWasAuthenticated"
SubscriptionAttributeNameDeliveryPolicy = "DeliveryPolicy"
SubscriptionAttributeNameEndpoint = "Endpoint"
SubscriptionAttributeNameFilterPolicy = "FilterPolicy"
SubscriptionAttributeNameFilterPolicyScope = "FilterPolicyScope"
SubscriptionAttributeNameOwner = "Owner"
SubscriptionAttributeNamePendingConfirmation = "PendingConfirmation"
SubscriptionAttributeNameProtocol = "Protocol"
SubscriptionAttributeNameRawMessageDelivery = "RawMessageDelivery"
SubscriptionAttributeNameRedrivePolicy = "RedrivePolicy"
SubscriptionAttributeNameSubscriptionARN = "SubscriptionArn"
SubscriptionAttributeNameSubscriptionRoleARN = "SubscriptionRoleArn"
SubscriptionAttributeNameTopicARN = "TopicArn"
subscriptionAttributeNameConfirmationWasAuthenticated = "ConfirmationWasAuthenticated"
subscriptionAttributeNameDeliveryPolicy = "DeliveryPolicy"
subscriptionAttributeNameEndpoint = "Endpoint"
subscriptionAttributeNameFilterPolicy = "FilterPolicy"
subscriptionAttributeNameFilterPolicyScope = "FilterPolicyScope"
subscriptionAttributeNameOwner = "Owner"
subscriptionAttributeNamePendingConfirmation = "PendingConfirmation"
subscriptionAttributeNameProtocol = "Protocol"
subscriptionAttributeNameRawMessageDelivery = "RawMessageDelivery"
subscriptionAttributeNameRedrivePolicy = "RedrivePolicy"
subscriptionAttributeNameReplayPolicy = "ReplayPolicy"
subscriptionAttributeNameSubscriptionARN = "SubscriptionArn"
subscriptionAttributeNameSubscriptionRoleARN = "SubscriptionRoleArn"
subscriptionAttributeNameTopicARN = "TopicArn"
)

const (
TopicAttributeNameApplicationFailureFeedbackRoleARN = "ApplicationFailureFeedbackRoleArn"
TopicAttributeNameApplicationSuccessFeedbackRoleARN = "ApplicationSuccessFeedbackRoleArn"
TopicAttributeNameApplicationSuccessFeedbackSampleRate = "ApplicationSuccessFeedbackSampleRate"
TopicAttributeNameContentBasedDeduplication = "ContentBasedDeduplication"
TopicAttributeNameDeliveryPolicy = "DeliveryPolicy"
TopicAttributeNameDisplayName = "DisplayName"
TopicAttributeNameFIFOTopic = "FifoTopic"
TopicAttributeNameFirehoseFailureFeedbackRoleARN = "FirehoseFailureFeedbackRoleArn"
TopicAttributeNameFirehoseSuccessFeedbackRoleARN = "FirehoseSuccessFeedbackRoleArn"
TopicAttributeNameFirehoseSuccessFeedbackSampleRate = "FirehoseSuccessFeedbackSampleRate"
TopicAttributeNameHTTPFailureFeedbackRoleARN = "HTTPFailureFeedbackRoleArn"
TopicAttributeNameHTTPSuccessFeedbackRoleARN = "HTTPSuccessFeedbackRoleArn"
TopicAttributeNameHTTPSuccessFeedbackSampleRate = "HTTPSuccessFeedbackSampleRate"
TopicAttributeNameKMSMasterKeyId = "KmsMasterKeyId"
TopicAttributeNameLambdaFailureFeedbackRoleARN = "LambdaFailureFeedbackRoleArn"
TopicAttributeNameLambdaSuccessFeedbackRoleARN = "LambdaSuccessFeedbackRoleArn"
TopicAttributeNameLambdaSuccessFeedbackSampleRate = "LambdaSuccessFeedbackSampleRate"
TopicAttributeNameOwner = "Owner"
TopicAttributeNamePolicy = "Policy"
TopicAttributeNameSignatureVersion = "SignatureVersion"
TopicAttributeNameSQSFailureFeedbackRoleARN = "SQSFailureFeedbackRoleArn"
TopicAttributeNameSQSSuccessFeedbackRoleARN = "SQSSuccessFeedbackRoleArn"
TopicAttributeNameSQSSuccessFeedbackSampleRate = "SQSSuccessFeedbackSampleRate"
TopicAttributeNameTopicARN = "TopicArn"
TopicAttributeNameTracingConfig = "TracingConfig"
topicAttributeNameApplicationFailureFeedbackRoleARN = "ApplicationFailureFeedbackRoleArn"
topicAttributeNameApplicationSuccessFeedbackRoleARN = "ApplicationSuccessFeedbackRoleArn"
topicAttributeNameApplicationSuccessFeedbackSampleRate = "ApplicationSuccessFeedbackSampleRate"
topicAttributeNameArchivePolicy = "ArchivePolicy"
topicAttributeNameBeginningArchiveTime = "BeginningArchiveTime"
topicAttributeNameContentBasedDeduplication = "ContentBasedDeduplication"
topicAttributeNameDeliveryPolicy = "DeliveryPolicy"
topicAttributeNameDisplayName = "DisplayName"
topicAttributeNameFIFOTopic = "FifoTopic"
topicAttributeNameFirehoseFailureFeedbackRoleARN = "FirehoseFailureFeedbackRoleArn"
topicAttributeNameFirehoseSuccessFeedbackRoleARN = "FirehoseSuccessFeedbackRoleArn"
topicAttributeNameFirehoseSuccessFeedbackSampleRate = "FirehoseSuccessFeedbackSampleRate"
topicAttributeNameHTTPFailureFeedbackRoleARN = "HTTPFailureFeedbackRoleArn"
topicAttributeNameHTTPSuccessFeedbackRoleARN = "HTTPSuccessFeedbackRoleArn"
topicAttributeNameHTTPSuccessFeedbackSampleRate = "HTTPSuccessFeedbackSampleRate"
topicAttributeNameKMSMasterKeyId = "KmsMasterKeyId"
topicAttributeNameLambdaFailureFeedbackRoleARN = "LambdaFailureFeedbackRoleArn"
topicAttributeNameLambdaSuccessFeedbackRoleARN = "LambdaSuccessFeedbackRoleArn"
topicAttributeNameLambdaSuccessFeedbackSampleRate = "LambdaSuccessFeedbackSampleRate"
topicAttributeNameOwner = "Owner"
topicAttributeNamePolicy = "Policy"
topicAttributeNameSignatureVersion = "SignatureVersion"
topicAttributeNameSQSFailureFeedbackRoleARN = "SQSFailureFeedbackRoleArn"
topicAttributeNameSQSSuccessFeedbackRoleARN = "SQSSuccessFeedbackRoleArn"
topicAttributeNameSQSSuccessFeedbackSampleRate = "SQSSuccessFeedbackSampleRate"
topicAttributeNameTopicARN = "TopicArn"
topicAttributeNameTracingConfig = "TracingConfig"
)

const (
propagationTimeout = 2 * time.Minute
)

const (
SubscriptionFilterPolicyScopeMessageAttributes = "MessageAttributes"
SubscriptionFilterPolicyScopeMessageBody = "MessageBody"
subscriptionFilterPolicyScopeMessageAttributes = "MessageAttributes"
subscriptionFilterPolicyScopeMessageBody = "MessageBody"
)

func SubscriptionFilterPolicyScope_Values() []string {
func subscriptionFilterPolicyScope_Values() []string {
return []string{
SubscriptionFilterPolicyScopeMessageAttributes,
SubscriptionFilterPolicyScopeMessageBody,
subscriptionFilterPolicyScopeMessageAttributes,
subscriptionFilterPolicyScopeMessageBody,
}
}

const (
TopicTracingConfigActive = "Active"
TopicTracingConfigPassThrough = "PassThrough"
topicTracingConfigActive = "Active"
topicTracingConfigPassThrough = "PassThrough"
)

func TopicTracingConfig_Values() []string {
func topicTracingConfig_Values() []string {
return []string{
TopicTracingConfigActive,
TopicTracingConfigPassThrough,
topicTracingConfigActive,
topicTracingConfigPassThrough,
}
}
23 changes: 23 additions & 0 deletions internal/service/sns/exports_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package sns

// Exports for use in tests only.
var (
ResourcePlatformApplication = resourcePlatformApplication
ResourceTopic = resourceTopic
ResourceTopicDataProtectionPolicy = resourceTopicDataProtectionPolicy
ResourceTopicPolicy = resourceTopicPolicy
ResourceTopicSubscription = resourceTopicSubscription

FindPlatformApplicationAttributesByARN = findPlatformApplicationAttributesByARN
FindSubscriptionAttributesByARN = findSubscriptionAttributesByARN
FindTopicAttributesByARN = findTopicAttributesByARN
FindTopicAttributesWithValidAWSPrincipalsByARN = findTopicAttributesWithValidAWSPrincipalsByARN // nosemgrep:ci.aws-in-var-name

FIFOTopicNameSuffix = fifoTopicNameSuffix
ParsePlatformApplicationResourceID = parsePlatformApplicationResourceID
TopicAttributeNameDeliveryPolicy = topicAttributeNameDeliveryPolicy
TopicAttributeNamePolicy = topicAttributeNamePolicy
)
Loading
Loading