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

New Resource aws_rds_integration #35199

Merged
merged 25 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
99f2724
add New Resource aws_rds_integration
showwin Jan 9, 2024
b7f1a83
add CHANGELOG
showwin Jan 9, 2024
bfaba52
Merge branch 'main' into HEAD
ewbankkit Aug 1, 2024
1502737
Run 'make fix-constants PKG=rds'.
ewbankkit Aug 1, 2024
55d9f47
r/aws_rds_integration: Tidy up.
ewbankkit Aug 1, 2024
cd46119
r/aws_rds_integration: Fix semgrep errors.
ewbankkit Aug 1, 2024
b22d6e4
Fix terrafmt errors.
ewbankkit Aug 1, 2024
58d0a5b
r/aws_rds_integration: 'kms_key_id' is Computed.
ewbankkit Aug 1, 2024
5fab0ff
r/aws_rds_integration: Fixes after some testing.
ewbankkit Aug 2, 2024
7da216d
d/aws_rds_orderable_db_instance: Migrate to AWS SDK for Go v2.
ewbankkit Aug 2, 2024
df426f3
Fix 'TestAccRDSIntegration_disappears'.
ewbankkit Aug 2, 2024
9727b17
internal/generate/namevaluesfiltersv2: Actually generate.
ewbankkit Aug 2, 2024
4e6a353
d/aws_rds_engine_version: Migrate to AWS SDK for Go v2.
ewbankkit Aug 2, 2024
86cde18
Fix 'TestAccRDSEngineVersionDataSource_preferredVersionsPreferredUpgr…
ewbankkit Aug 2, 2024
460ada7
d/aws_rds_certificate: Migrate to AWS SDK for Go v2.
ewbankkit Aug 2, 2024
747a18f
d/aws_db_parameter_group: Migrate to AWS SDK for Go v2.
ewbankkit Aug 2, 2024
37c5d9a
r/aws_rds_reserved_instance: Migrate to AWS SDK for Go v2.
ewbankkit Aug 2, 2024
4355e15
internal/generate/namevaluesfilters: Actually generate.
ewbankkit Aug 2, 2024
4e10842
internal/generate/namevaluesfilters: Use 'names.ProviderNameUpper' to…
ewbankkit Aug 2, 2024
cf43e20
internal/generate/namevaluesfiltersv2: Use 'names.ProviderNameUpper' …
ewbankkit Aug 2, 2024
bef379e
namevaluesfilters: Move files around.
ewbankkit Aug 2, 2024
88980ec
Fix terrafmt errors.
ewbankkit Aug 2, 2024
a5b1d63
Run 'make gen'.
ewbankkit Aug 2, 2024
04bdac9
internal/namevaluesfilters: Fix tests.
ewbankkit Aug 2, 2024
6d7e4ed
Fix providerlint 'AWSAT005: avoid hardcoded ARN AWS partitions, use a…
ewbankkit Aug 2, 2024
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
3 changes: 3 additions & 0 deletions .changelog/35199.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
aws_rds_integration
```
1 change: 1 addition & 0 deletions .teamcity/scripts/provider_tests/acceptance_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ TF_ACC=1 go test \
./internal/json/... \
./internal/logging/... \
./internal/maps/... \
./internal/namevaluesfilters/... \
./internal/provider/... \
./internal/retry/... \
./internal/sdkv2/... \
Expand Down
1 change: 1 addition & 0 deletions .teamcity/scripts/provider_tests/unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ go test \
./internal/json/... \
./internal/logging/... \
./internal/maps/... \
./internal/namevaluesfilters/... \
./internal/provider/... \
./internal/retry/... \
./internal/sdkv2/... \
Expand Down
12 changes: 8 additions & 4 deletions internal/generate/common/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"bytes"
"fmt"
"go/format"
"maps"
"os"
"path"
"strings"
Expand Down Expand Up @@ -58,7 +59,7 @@ type Destination interface {
CreateDirectories() error
Write() error
WriteBytes(body []byte) error
WriteTemplate(templateName, templateBody string, templateData any) error
WriteTemplate(templateName, templateBody string, templateData any, funcMaps ...template.FuncMap) error
WriteTemplateSet(templates *template.Template, templateData any) error
}

Expand Down Expand Up @@ -129,8 +130,8 @@ func (d *baseDestination) WriteBytes(body []byte) error {
return err
}

func (d *baseDestination) WriteTemplate(templateName, templateBody string, templateData any) error {
body, err := parseTemplate(templateName, templateBody, templateData)
func (d *baseDestination) WriteTemplate(templateName, templateBody string, templateData any, funcMaps ...template.FuncMap) error {
body, err := parseTemplate(templateName, templateBody, templateData, funcMaps...)

if err != nil {
return err
Expand All @@ -144,7 +145,7 @@ func (d *baseDestination) WriteTemplate(templateName, templateBody string, templ
return d.WriteBytes(body)
}

func parseTemplate(templateName, templateBody string, templateData any) ([]byte, error) {
func parseTemplate(templateName, templateBody string, templateData any, funcMaps ...template.FuncMap) ([]byte, error) {
funcMap := template.FuncMap{
// FirstUpper returns a string with the first character as upper case.
"FirstUpper": func(s string) string {
Expand All @@ -157,6 +158,9 @@ func parseTemplate(templateName, templateBody string, templateData any) ([]byte,
// Title returns a string with the first character of each word as upper case.
"Title": cases.Title(language.Und, cases.NoLower).String,
}
for _, v := range funcMaps {
maps.Copy(funcMap, v) // Extras overwrite defaults.
}
tmpl, err := template.New(templateName).Funcs(funcMap).Parse(templateBody)

if err != nil {
Expand Down
24 changes: 0 additions & 24 deletions internal/generate/namevaluesfilters/README.md

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading