Skip to content

Commit

Permalink
Merge pull request #40700 from matthewbaggett/f-add-supports_local_wr…
Browse files Browse the repository at this point in the history
…ite_forwarding

Add support for supports_local_write_forwarding, supports_certificate_rotation_without_restart and supports_integrations
  • Loading branch information
ewbankkit authored Dec 26, 2024
2 parents 65947b9 + e68330c commit 1f4bced
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/40700.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
data-source/aws_rds_engine_version: Add `supports_certificate_rotation_without_restart`, `supports_integrations`, and `supports_local_write_forwarding` attributes
```
15 changes: 15 additions & 0 deletions internal/service/rds/engine_version_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,26 @@ func dataSourceEngineVersion() *schema.Resource {
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
},
"supports_certificate_rotation_without_restart": {
Type: schema.TypeBool,
Computed: true,
},
"supports_global_databases": {
Type: schema.TypeBool,
Computed: true,
},
"supports_integrations": {
Type: schema.TypeBool,
Computed: true,
},
"supports_limitless_database": {
Type: schema.TypeBool,
Computed: true,
},
"supports_local_write_forwarding": {
Type: schema.TypeBool,
Computed: true,
},
"supports_log_exports_to_cloudwatch": {
Type: schema.TypeBool,
Computed: true,
Expand Down Expand Up @@ -392,8 +404,11 @@ func dataSourceEngineVersionRead(ctx context.Context, d *schema.ResourceData, me
d.Set("supported_timezones", tfslices.ApplyToAll(found.SupportedTimezones, func(v awstypes.Timezone) string {
return aws.ToString(v.TimezoneName)
}))
d.Set("supports_certificate_rotation_without_restart", found.SupportsCertificateRotationWithoutRestart)
d.Set("supports_global_databases", found.SupportsGlobalDatabases)
d.Set("supports_integrations", found.SupportsIntegrations)
d.Set("supports_limitless_database", found.SupportsLimitlessDatabase)
d.Set("supports_local_write_forwarding", found.SupportsLocalWriteForwarding)
d.Set("supports_log_exports_to_cloudwatch", found.SupportsLogExportsToCloudwatchLogs)
d.Set("supports_parallel_query", found.SupportsParallelQuery)
d.Set("supports_read_replica", found.SupportsReadReplica)
Expand Down
5 changes: 4 additions & 1 deletion internal/service/rds/engine_version_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ func TestAccRDSEngineVersionDataSource_basic(t *testing.T) {
resource.TestMatchResourceAttr(dataSourceName, "supported_feature_names.#", regexache.MustCompile(`^[1-9][0-9]*`)),
resource.TestMatchResourceAttr(dataSourceName, "supported_modes.#", regexache.MustCompile(`^[0-9]*`)),
resource.TestMatchResourceAttr(dataSourceName, "supported_timezones.#", regexache.MustCompile(`^[0-9]*`)),
resource.TestCheckResourceAttrSet(dataSourceName, "supports_certificate_rotation_without_restart"),
resource.TestCheckResourceAttrSet(dataSourceName, "supports_global_databases"),
resource.TestCheckResourceAttrSet(dataSourceName, "supports_integrations"),
resource.TestCheckResourceAttrSet(dataSourceName, "supports_limitless_database"),
resource.TestCheckResourceAttrSet(dataSourceName, "supports_local_write_forwarding"),
resource.TestCheckResourceAttrSet(dataSourceName, "supports_log_exports_to_cloudwatch"),
resource.TestCheckResourceAttrSet(dataSourceName, "supports_parallel_query"),
resource.TestCheckResourceAttrSet(dataSourceName, "supports_read_replica"),
Expand Down Expand Up @@ -168,7 +171,7 @@ func TestAccRDSEngineVersionDataSource_preferredMajorTargets(t *testing.T) {
{
Config: testAccEngineVersionDataSourceConfig_preferredMajorTarget(tfrds.InstanceEngineMySQL),
Check: resource.ComposeTestCheckFunc(
resource.TestMatchResourceAttr(dataSourceName, names.AttrVersion, regexache.MustCompile(`^5\.7\.`)),
resource.TestMatchResourceAttr(dataSourceName, names.AttrVersion, regexache.MustCompile(`^8\.0\.`)),
),
},
{
Expand Down
3 changes: 3 additions & 0 deletions website/docs/d/rds_engine_version.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ This data source exports the following attributes in addition to the arguments a
* `supported_feature_names` - Set of features supported by the engine version.
* `supported_modes` - Set of supported engine version modes.
* `supported_timezones` - Set of the time zones supported by the engine version.
* `supports_certificate_rotation_without_restart` - Whether the certificates can be rotated without restarting the Aurora instance.
* `supports_global_databases` - Whether you can use Aurora global databases with the engine version.
* `supports_integrations` - Whether the engine version supports integrations with other AWS services.
* `supports_log_exports_to_cloudwatch` - Whether the engine version supports exporting the log types specified by `exportable_log_types` to CloudWatch Logs.
* `supports_local_write_forwarding` - Whether the engine version supports local write forwarding or not.
* `supports_limitless_database` - Whether the engine version supports Aurora Limitless Database.
* `supports_parallel_query` - Whether you can use Aurora parallel query with the engine version.
* `supports_read_replica` - Whether the engine version supports read replicas.
Expand Down

0 comments on commit 1f4bced

Please sign in to comment.