Skip to content

Commit

Permalink
Merge pull request #25036 from JamesMarino/f-aws_pinpoint_phone_numbe…
Browse files Browse the repository at this point in the history
…r-new-resource

r/aws_pinpointsmsvoicev2_phone_number - new resource
  • Loading branch information
ewbankkit authored Sep 16, 2024
2 parents 312d87d + 62ca78f commit 81a5e59
Show file tree
Hide file tree
Showing 36 changed files with 2,649 additions and 88 deletions.
7 changes: 7 additions & 0 deletions .changelog/25036.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:new-resource
aws_pinpointsmsvoicev2_phone_number
```

```release-note:new-resource
aws_pinpointsmsvoicev2_opt_out_list
```
15 changes: 15 additions & 0 deletions .ci/.semgrep-service-name0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4254,3 +4254,18 @@ rules:
- focus-metavariable: $NAME
- pattern-not: func $NAME($T *testing.T)
severity: WARNING
- id: connect-in-test-name
languages:
- go
message: Include "Connect" in test name
paths:
include:
- internal/service/connect/*_test.go
patterns:
- pattern: func $NAME( ... )
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccConnect"
- pattern-regex: ^TestAcc.*
severity: WARNING
47 changes: 32 additions & 15 deletions .ci/.semgrep-service-name1.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
# Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT.
rules:
- id: connect-in-test-name
languages:
- go
message: Include "Connect" in test name
paths:
include:
- internal/service/connect/*_test.go
patterns:
- pattern: func $NAME( ... )
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccConnect"
- pattern-regex: ^TestAcc.*
severity: WARNING
- id: connect-in-const-name
languages:
- go
Expand Down Expand Up @@ -4244,3 +4229,35 @@ rules:
patterns:
- pattern-regex: "(?i)IoT"
severity: WARNING
- id: iot-in-var-name
languages:
- go
message: Do not use "IoT" in var name inside iot package
paths:
include:
- internal/service/iot
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)IoT"
severity: WARNING
- id: iotanalytics-in-func-name
languages:
- go
message: Do not use "IoTAnalytics" in func name inside iotanalytics package
paths:
include:
- internal/service/iotanalytics
exclude:
- internal/service/iotanalytics/list_pages_gen.go
patterns:
- pattern: func $NAME( ... )
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)IoTAnalytics"
- focus-metavariable: $NAME
- pattern-not: func $NAME($T *testing.T)
severity: WARNING
107 changes: 61 additions & 46 deletions .ci/.semgrep-service-name2.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,5 @@
# Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT.
rules:
- id: iot-in-var-name
languages:
- go
message: Do not use "IoT" in var name inside iot package
paths:
include:
- internal/service/iot
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)IoT"
severity: WARNING
- id: iotanalytics-in-func-name
languages:
- go
message: Do not use "IoTAnalytics" in func name inside iotanalytics package
paths:
include:
- internal/service/iotanalytics
exclude:
- internal/service/iotanalytics/list_pages_gen.go
patterns:
- pattern: func $NAME( ... )
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)IoTAnalytics"
- focus-metavariable: $NAME
- pattern-not: func $NAME($T *testing.T)
severity: WARNING
- id: iotanalytics-in-test-name
languages:
- go
Expand Down Expand Up @@ -3554,6 +3522,67 @@ rules:
patterns:
- pattern-regex: "(?i)Pinpoint"
severity: WARNING
- id: pinpointsmsvoicev2-in-func-name
languages:
- go
message: Do not use "PinpointSMSVoiceV2" in func name inside pinpointsmsvoicev2 package
paths:
include:
- internal/service/pinpointsmsvoicev2
exclude:
- internal/service/pinpointsmsvoicev2/list_pages_gen.go
patterns:
- pattern: func $NAME( ... )
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)PinpointSMSVoiceV2"
- focus-metavariable: $NAME
- pattern-not: func $NAME($T *testing.T)
severity: WARNING
- id: pinpointsmsvoicev2-in-test-name
languages:
- go
message: Include "PinpointSMSVoiceV2" in test name
paths:
include:
- internal/service/pinpointsmsvoicev2/*_test.go
patterns:
- pattern: func $NAME( ... )
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-not-regex: "^TestAccPinpointSMSVoiceV2"
- pattern-regex: ^TestAcc.*
severity: WARNING
- id: pinpointsmsvoicev2-in-const-name
languages:
- go
message: Do not use "PinpointSMSVoiceV2" in const name inside pinpointsmsvoicev2 package
paths:
include:
- internal/service/pinpointsmsvoicev2
patterns:
- pattern: const $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)PinpointSMSVoiceV2"
severity: WARNING
- id: pinpointsmsvoicev2-in-var-name
languages:
- go
message: Do not use "PinpointSMSVoiceV2" in var name inside pinpointsmsvoicev2 package
paths:
include:
- internal/service/pinpointsmsvoicev2
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)PinpointSMSVoiceV2"
severity: WARNING
- id: pipes-in-func-name
languages:
- go
Expand Down Expand Up @@ -4233,17 +4262,3 @@ rules:
patterns:
- pattern-regex: "(?i)recyclebin"
severity: WARNING
- id: recyclebin-in-var-name
languages:
- go
message: Do not use "recyclebin" in var name inside rbin package
paths:
include:
- internal/service/rbin
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)recyclebin"
severity: WARNING
14 changes: 14 additions & 0 deletions .ci/.semgrep-service-name3.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Generated by internal/generate/servicesemgrep/main.go; DO NOT EDIT.
rules:
- id: recyclebin-in-var-name
languages:
- go
message: Do not use "recyclebin" in var name inside rbin package
paths:
include:
- internal/service/rbin
patterns:
- pattern: var $NAME = ...
- metavariable-pattern:
metavariable: $NAME
patterns:
- pattern-regex: "(?i)recyclebin"
severity: WARNING
- id: redshift-in-func-name
languages:
- go
Expand Down
2 changes: 2 additions & 0 deletions .github/labeler-issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ service/pinpointemail:
- '((\*|-)\s*`?|(data|resource)\s+"?)aws_pinpointemail_'
service/pinpointsmsvoice:
- '((\*|-)\s*`?|(data|resource)\s+"?)aws_pinpointsmsvoice_'
service/pinpointsmsvoicev2:
- '((\*|-)\s*`?|(data|resource)\s+"?)aws_pinpointsmsvoicev2_'
service/pipes:
- '((\*|-)\s*`?|(data|resource)\s+"?)aws_pipes_'
service/polly:
Expand Down
6 changes: 6 additions & 0 deletions .github/labeler-pr-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1665,6 +1665,12 @@ service/pinpointsmsvoice:
- any-glob-to-any-file:
- 'internal/service/pinpointsmsvoice/**/*'
- 'website/**/pinpointsmsvoice_*'
service/pinpointsmsvoicev2:
- any:
- changed-files:
- any-glob-to-any-file:
- 'internal/service/pinpointsmsvoicev2/**/*'
- 'website/**/pinpointsmsvoicev2_*'
service/pipes:
- any:
- changed-files:
Expand Down
1 change: 1 addition & 0 deletions .teamcity/components/generated/services_all.kt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ val services = mapOf(
"pcaconnectorad" to ServiceSpec("Private CA Connector for Active Directory"),
"pcs" to ServiceSpec("Parallel Computing Service"),
"pinpoint" to ServiceSpec("Pinpoint"),
"pinpointsmsvoicev2" to ServiceSpec("End User Messaging SMS"),
"pipes" to ServiceSpec("EventBridge Pipes"),
"polly" to ServiceSpec("Polly"),
"pricing" to ServiceSpec("Pricing Calculator", regionOverride = "us-east-1"),
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.7.6
github.com/aws/aws-sdk-go-v2/service/pcs v1.0.2
github.com/aws/aws-sdk-go-v2/service/pinpoint v1.32.6
github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.12.8
github.com/aws/aws-sdk-go-v2/service/pipes v1.15.0
github.com/aws/aws-sdk-go-v2/service/polly v1.43.2
github.com/aws/aws-sdk-go-v2/service/pricing v1.30.6
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ github.com/aws/aws-sdk-go-v2/service/pcs v1.0.2 h1:+PSbd/wTgCueA9agqNNeSmVoOgcgA
github.com/aws/aws-sdk-go-v2/service/pcs v1.0.2/go.mod h1:acm3akB4exauzjZeKNonTwkxCPIdWT1LWLRM09eZP7c=
github.com/aws/aws-sdk-go-v2/service/pinpoint v1.32.6 h1:S5SxTH9Ue7cwK9O76RQKkt9xY+zapTJv6dutXEyKOGQ=
github.com/aws/aws-sdk-go-v2/service/pinpoint v1.32.6/go.mod h1:2yK6vZtj8t8tmEOk2/XBk/7oC9QggiRIDhwt1rUNkPE=
github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.12.8 h1:3GiUwkpy6GXMqVdfIfbWkBR86dOsd38obv4sBwyRxZ8=
github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2 v1.12.8/go.mod h1:Ek88Y1SlTvTDgX9L7DWUPfQIYtT++3eqK7cMK0TdW8Q=
github.com/aws/aws-sdk-go-v2/service/pipes v1.15.0 h1:2P3Y9TFqZP2V8rJquXMEcXQ3D2Ybdvj+qD9wG9m0Sio=
github.com/aws/aws-sdk-go-v2/service/pipes v1.15.0/go.mod h1:JKl45FQijnuqkji3jAlVTH0tRTbYYZSUb00P9HClkRg=
github.com/aws/aws-sdk-go-v2/service/polly v1.43.2 h1:AmoLJRNIJQvN4CcXPhLwXPaDOnke2EXAWe9T+MNloEE=
Expand Down
1 change: 1 addition & 0 deletions infrastructure/repository/labels-service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ variable "service_labels" {
"pinpoint",
"pinpointemail",
"pinpointsmsvoice",
"pinpointsmsvoicev2",
"pipes",
"polly",
"pricing",
Expand Down
5 changes: 5 additions & 0 deletions internal/conns/awsclient_gen.go

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

2 changes: 2 additions & 0 deletions internal/provider/service_packages_gen.go

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

10 changes: 10 additions & 0 deletions internal/sdkv2/resource_differ.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@ type ResourceDiffer interface {
HasChanges(...string) bool
Id() string
}

// HasNonZeroValues returns true if any of the keys have non-zero values.
func HasNonZeroValues(d ResourceDiffer, keys ...string) bool {
for _, key := range keys {
if _, ok := d.GetOk(key); ok {
return true
}
}
return false
}
1 change: 1 addition & 0 deletions internal/service/pinpoint/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: MPL-2.0

//go:generate go run ../../generate/tags/main.go -ListTags -ListTagsOutTagsElem=TagsModel.Tags -ServiceTagsMap "-TagInCustomVal=&awstypes.TagsModel{Tags: Tags(updatedTags.IgnoreAWS())}" -TagInTagsElem=TagsModel -UpdateTags -KVTValues
//go:generate go run ../../generate/listpages/main.go -ListOps=GetApps -OutputPaginator=ApplicationsResponse.NextToken -InputPaginator=Token
//go:generate go run ../../generate/servicepackage/main.go
// ONLY generate directives and package declaration! Do not add anything else to this file.

Expand Down
27 changes: 27 additions & 0 deletions internal/service/pinpoint/list_pages_gen.go

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

Loading

0 comments on commit 81a5e59

Please sign in to comment.