Skip to content

Commit

Permalink
Merge branch 'main' into f-finspace_kx_cluster_sg
Browse files Browse the repository at this point in the history
  • Loading branch information
jar-b committed Dec 14, 2023
2 parents 9f3f49b + 3de2fd3 commit 30a99c2
Show file tree
Hide file tree
Showing 47 changed files with 2,879 additions and 639 deletions.
3 changes: 3 additions & 0 deletions .changelog/33731.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_dms_event_subscription: `source_ids` and `source_type` are Required
```
3 changes: 3 additions & 0 deletions .changelog/34828.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
aws_finspace_kx_dataview
```
3 changes: 3 additions & 0 deletions .changelog/34832.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
aws_finspace_kx_scaling_group
```
3 changes: 3 additions & 0 deletions .changelog/34833.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
aws_finspace_kx_volume
```
3 changes: 3 additions & 0 deletions .changelog/34916.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-data-source
aws_polly_voices
```
2 changes: 1 addition & 1 deletion .ci/providerlint/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-aws/ci/providerlint
go 1.20

require (
github.com/aws/aws-sdk-go v1.49.1
github.com/aws/aws-sdk-go v1.49.2
github.com/bflad/tfproviderlint v0.29.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0
golang.org/x/tools v0.13.0
Expand Down
4 changes: 2 additions & 2 deletions .ci/providerlint/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki
github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=
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/aws/aws-sdk-go v1.49.1 h1:Dsamcd8d/nNb3A+bZ0ucfGl0vGZsW5wlRW0vhoYGoeQ=
github.com/aws/aws-sdk-go v1.49.1/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go v1.49.2 h1:+4BEcm1nPCoDbVd+gg8cdxpa1qJfrvnddy12vpEVWjw=
github.com/aws/aws-sdk-go v1.49.2/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/bflad/gopaniccheck v0.1.0 h1:tJftp+bv42ouERmUMWLoUn/5bi/iQZjHPznM00cP/bU=
github.com/bflad/gopaniccheck v0.1.0/go.mod h1:ZCj2vSr7EqVeDaqVsWN4n2MwdROx1YL+LFo47TSWtsA=
github.com/bflad/tfproviderlint v0.29.0 h1:zxKYAAM6IZ4ace1a3LX+uzMRIMP8L+iOtEc+FP2Yoow=
Expand Down

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

2 changes: 1 addition & 1 deletion .ci/providerlint/vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ github.com/agext/levenshtein
# github.com/apparentlymart/go-textseg/v15 v15.0.0
## explicit; go 1.16
github.com/apparentlymart/go-textseg/v15/textseg
# github.com/aws/aws-sdk-go v1.49.1
# github.com/aws/aws-sdk-go v1.49.2
## explicit; go 1.19
github.com/aws/aws-sdk-go/aws/awserr
github.com/aws/aws-sdk-go/aws/endpoints
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

FEATURES:

* **New Data Source:** `aws_polly_voices` ([#34916](https://github.com/hashicorp/terraform-provider-aws/issues/34916))
* **New Data Source:** `aws_ssoadmin_application_assignments` ([#34796](https://github.com/hashicorp/terraform-provider-aws/issues/34796))
* **New Data Source:** `aws_ssoadmin_principal_application_assignments` ([#34815](https://github.com/hashicorp/terraform-provider-aws/issues/34815))
* **New Resource:** `aws_finspace_kx_scaling_group` ([#34832](https://github.com/hashicorp/terraform-provider-aws/issues/34832))
* **New Resource:** `aws_ssoadmin_trusted_token_issuer` ([#34839](https://github.com/hashicorp/terraform-provider-aws/issues/34839))

ENHANCEMENTS:

Expand All @@ -30,6 +33,7 @@ BUG FIXES:
* resource/aws_cloudwatch_log_group: Fix `invalid new value for .skip_destroy: was cty.False, but now null` errors ([#30354](https://github.com/hashicorp/terraform-provider-aws/issues/30354))
* resource/aws_cloudwatch_log_group: Remove default value (`STANDARD`) for `log_group_class` argument and mark as Computed. This fixes `InvalidParameterException: Only Standard log class is supported` errors in AWS Regions other than AWS Commercial ([#34812](https://github.com/hashicorp/terraform-provider-aws/issues/34812))
* resource/aws_db_instance: Fix error where Terraform loses track of resource if Blue/Green Deployment is applied outside of Terraform ([#34728](https://github.com/hashicorp/terraform-provider-aws/issues/34728))
* resource/aws_dms_event_subscription: `source_ids` and `source_type` are Required ([#33731](https://github.com/hashicorp/terraform-provider-aws/issues/33731))
* resource/aws_ecr_pull_through_cache_rule: Fix plan time validation for `ecr_repository_prefix` ([#34716](https://github.com/hashicorp/terraform-provider-aws/issues/34716))
* resource/aws_lb: Correct in-place update of `security_groups` for Network Load Balancers when the new value is Computed ([#33205](https://github.com/hashicorp/terraform-provider-aws/issues/33205))
* resource/aws_lb: Fix `InvalidConfigurationRequest: Load balancer attribute key 'dns_record.client_routing_policy' is not supported on load balancers with type 'network'` errors on resource Create in AWS GovCloud (US) ([#34135](https://github.com/hashicorp/terraform-provider-aws/issues/34135))
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
require (
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c
github.com/YakDriver/regexache v0.23.0
github.com/aws/aws-sdk-go v1.49.1
github.com/aws/aws-sdk-go v1.49.2
github.com/aws/aws-sdk-go-v2 v1.24.0
github.com/aws/aws-sdk-go-v2/config v1.26.1
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10
Expand Down Expand Up @@ -41,7 +41,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/ecr v1.24.5
github.com/aws/aws-sdk-go-v2/service/eks v1.35.5
github.com/aws/aws-sdk-go-v2/service/emr v1.35.5
github.com/aws/aws-sdk-go-v2/service/emrserverless v1.14.5
github.com/aws/aws-sdk-go-v2/service/emrserverless v1.14.6
github.com/aws/aws-sdk-go-v2/service/evidently v1.16.5
github.com/aws/aws-sdk-go-v2/service/finspace v1.20.0
github.com/aws/aws-sdk-go-v2/service/fis v1.21.5
Expand All @@ -65,7 +65,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/oam v1.7.5
github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.9.5
github.com/aws/aws-sdk-go-v2/service/osis v1.6.5
github.com/aws/aws-sdk-go-v2/service/pipes v1.9.5
github.com/aws/aws-sdk-go-v2/service/pipes v1.9.6
github.com/aws/aws-sdk-go-v2/service/polly v1.36.5
github.com/aws/aws-sdk-go-v2/service/pricing v1.24.5
github.com/aws/aws-sdk-go-v2/service/qldb v1.19.5
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmms
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/aws/aws-sdk-go v1.49.1 h1:Dsamcd8d/nNb3A+bZ0ucfGl0vGZsW5wlRW0vhoYGoeQ=
github.com/aws/aws-sdk-go v1.49.1/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go v1.49.2 h1:+4BEcm1nPCoDbVd+gg8cdxpa1qJfrvnddy12vpEVWjw=
github.com/aws/aws-sdk-go v1.49.2/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go-v2 v1.24.0 h1:890+mqQ+hTpNuw0gGP6/4akolQkSToDJgHfQE7AwGuk=
github.com/aws/aws-sdk-go-v2 v1.24.0/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs=
Expand Down Expand Up @@ -108,8 +108,8 @@ github.com/aws/aws-sdk-go-v2/service/eks v1.35.5 h1:LEYyWSnfdSSysPr5JWUkNwOD0MvX
github.com/aws/aws-sdk-go-v2/service/eks v1.35.5/go.mod h1:L1uv3UgQlAkdM9v0gpec7nnfUiQkCnGMjBE7MJArfWQ=
github.com/aws/aws-sdk-go-v2/service/emr v1.35.5 h1:dZtEDpqYVg3i5oT8lSXxEsg6dInewHA3qNuyzHTvWck=
github.com/aws/aws-sdk-go-v2/service/emr v1.35.5/go.mod h1:Drh6y2qLaw/wnDKTIcdqM2m358MIRXsZ2Bj2tjhVLq0=
github.com/aws/aws-sdk-go-v2/service/emrserverless v1.14.5 h1:IsLomor7ErBzqMCtI71gqTw0ENKbZxVhHMwSnDImbTw=
github.com/aws/aws-sdk-go-v2/service/emrserverless v1.14.5/go.mod h1:G2r5cqojvwkdJJx6NDxszEfHC8f02TF15dE/3bg8P9A=
github.com/aws/aws-sdk-go-v2/service/emrserverless v1.14.6 h1:O2ppygCppB40GS7lDJUX4dGEgEdsKkX62oIAGgre/rY=
github.com/aws/aws-sdk-go-v2/service/emrserverless v1.14.6/go.mod h1:G2r5cqojvwkdJJx6NDxszEfHC8f02TF15dE/3bg8P9A=
github.com/aws/aws-sdk-go-v2/service/evidently v1.16.5 h1:qMMMld3RbqxSZ5KEokAu+w4MGV9YlSvisJbk4iMO4m0=
github.com/aws/aws-sdk-go-v2/service/evidently v1.16.5/go.mod h1:ydI4dfZIWil2hOsneE1QWDOxY/CdC37oT96S4JOrD24=
github.com/aws/aws-sdk-go-v2/service/finspace v1.20.0 h1:n3TWZAn4gV2/GiJMnuNuSEkgyXHkKPEkenU5ZmmFS1o=
Expand Down Expand Up @@ -168,8 +168,8 @@ github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.9.5 h1:V+zBQiUAATdw
github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.9.5/go.mod h1:Hky91JAG7y6hJrIoZ6IyJlB99+AFOPUIfqVQcZ+fbhY=
github.com/aws/aws-sdk-go-v2/service/osis v1.6.5 h1:u0FL7wY1ni4WQkpfUiBslPmwKOltziQkGg5njTpPH6M=
github.com/aws/aws-sdk-go-v2/service/osis v1.6.5/go.mod h1:wRTpbH8h5d4SJmdsy9LNEuZNHrNtUCZMl+U1slAW4Ng=
github.com/aws/aws-sdk-go-v2/service/pipes v1.9.5 h1:BKJlKvRxWQCjd7UyZPLlvkvBDOf7UziF5spBSkMq3J4=
github.com/aws/aws-sdk-go-v2/service/pipes v1.9.5/go.mod h1:N3pAD/7GiKZAOBFFsF9BqWdSg33HM8ibXoAyPQXgcNI=
github.com/aws/aws-sdk-go-v2/service/pipes v1.9.6 h1:cDjJ1OsUDDHP0DERFe+kon0awE0vMt+6xjd9zuOaOv8=
github.com/aws/aws-sdk-go-v2/service/pipes v1.9.6/go.mod h1:N3pAD/7GiKZAOBFFsF9BqWdSg33HM8ibXoAyPQXgcNI=
github.com/aws/aws-sdk-go-v2/service/polly v1.36.5 h1:/BHypWAWPEuwfnlb4hJz5R1uedDGNtorZgEHYtW/wI4=
github.com/aws/aws-sdk-go-v2/service/polly v1.36.5/go.mod h1:mmQzyk89+rKEfieMV8gHoFoVmrPiyKjqORj2Uk5+O04=
github.com/aws/aws-sdk-go-v2/service/pricing v1.24.5 h1:yJniPHxzGy0jtJNkXYTqI8ps587kl1Jf8Luz5K8Jxjs=
Expand Down
7 changes: 0 additions & 7 deletions internal/errs/diag.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ func NewWarningDiagnostic(summary, detail string) diag.Diagnostic {
}
}

func FromAttributeError(path cty.Path, err error) diag.Diagnostic {
return withPath(
NewErrorDiagnostic(err.Error(), ""),
path,
)
}

func withPath(d diag.Diagnostic, path cty.Path) diag.Diagnostic {
d.AttributePath = path
return d
Expand Down
52 changes: 0 additions & 52 deletions internal/framework/flex/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
"github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag"
fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types"
"github.com/hashicorp/terraform-provider-aws/internal/slices"
)

func ExpandFrameworkStringList(ctx context.Context, v basetypes.ListValuable) []*string {
Expand Down Expand Up @@ -86,52 +83,3 @@ func FlattenFrameworkStringValueListLegacy[T ~string](_ context.Context, vs []T)

return types.ListValueMust(types.StringType, elems)
}

type FrameworkElementExpanderFunc[T any, U any] func(context.Context, T) U

func ExpandFrameworkListNestedBlock[T any, U any](ctx context.Context, tfList types.List, f FrameworkElementExpanderFunc[T, U]) []U {
if tfList.IsNull() || tfList.IsUnknown() {
return nil
}

var data []T

_ = fwdiag.Must(0, tfList.ElementsAs(ctx, &data, false))

return slices.ApplyToAll(data, func(t T) U {
return f(ctx, t)
})
}

func ExpandFrameworkListNestedBlockPtr[T any, U any](ctx context.Context, tfList types.List, f FrameworkElementExpanderFunc[T, *U]) *U {
if tfList.IsNull() || tfList.IsUnknown() {
return nil
}

var data []T

_ = fwdiag.Must(0, tfList.ElementsAs(ctx, &data, false))

if len(data) == 0 {
return nil
}

return f(ctx, data[0])
}

type FrameworkElementFlattenerFunc[T any, U any] func(context.Context, U) T

func FlattenFrameworkListNestedBlock[T any, U any](ctx context.Context, apiObjects []U, f FrameworkElementFlattenerFunc[T, U]) types.List {
attributeTypes := fwtypes.AttributeTypesMust[T](ctx)
elementType := types.ObjectType{AttrTypes: attributeTypes}

if len(apiObjects) == 0 {
return types.ListNull(elementType)
}

data := slices.ApplyToAll(apiObjects, func(apiObject U) T {
return f(ctx, apiObject)
})

return fwdiag.Must(types.ListValueFrom(ctx, elementType, data))
}
7 changes: 7 additions & 0 deletions internal/service/dms/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,10 @@ func networkType_Values() []string {
networkTypeIPv4,
}
}

const (
eventSubscriptionStatusActive = "active"
eventSubscriptionStatusCreating = "creating"
eventSubscriptionStatusDeleting = "deleting"
eventSubscriptionStatusModifying = "modifying"
)
Loading

0 comments on commit 30a99c2

Please sign in to comment.