Skip to content

Commit 30b21d6

Browse files
author
Marko Bocevski
committed
resource/aws_timestreaminfluxdb_db_cluster: Add computed engine_type attribute
1 parent c9853ee commit 30b21d6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

internal/service/timestreaminfluxdb/db_cluster.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ func (r *dbClusterResource) Schema(ctx context.Context, req resource.SchemaReque
145145
},
146146
Description: `Specifies the type of cluster to create.`,
147147
},
148+
"engine_type": schema.StringAttribute{
149+
Computed: true,
150+
PlanModifiers: []planmodifier.String{
151+
stringplanmodifier.UseStateForUnknown(),
152+
},
153+
Description: `The database engine type of the DB cluster.`,
154+
},
148155
names.AttrEndpoint: schema.StringAttribute{
149156
Computed: true,
150157
PlanModifiers: []planmodifier.String{
@@ -689,6 +696,7 @@ type dbClusterResourceModel struct {
689696
DBParameterGroupIdentifier types.String `tfsdk:"db_parameter_group_identifier"`
690697
DBStorageType fwtypes.StringEnum[awstypes.DbStorageType] `tfsdk:"db_storage_type"`
691698
DeploymentType fwtypes.StringEnum[awstypes.ClusterDeploymentType] `tfsdk:"deployment_type"`
699+
EngineType types.String `tfsdk:"engine_type"`
692700
Endpoint types.String `tfsdk:"endpoint"`
693701
FailoverMode fwtypes.StringEnum[awstypes.FailoverMode] `tfsdk:"failover_mode"`
694702
ID types.String `tfsdk:"id"`

internal/service/timestreaminfluxdb/db_cluster_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func TestAccTimestreamInfluxDBDBCluster_basic(t *testing.T) {
4848
acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "timestream-influxdb", regexache.MustCompile(`db-cluster/.+$`)),
4949
resource.TestCheckResourceAttr(resourceName, "db_storage_type", string(awstypes.DbStorageTypeInfluxIoIncludedT1)),
5050
resource.TestCheckResourceAttr(resourceName, "deployment_type", string(awstypes.ClusterDeploymentTypeMultiNodeReadReplicas)),
51+
resource.TestCheckResourceAttrSet(resourceName, "engine_type"),
5152
resource.TestCheckResourceAttr(resourceName, "failover_mode", string(awstypes.FailoverModeAutomatic)),
5253
resource.TestCheckResourceAttrSet(resourceName, "influx_auth_parameters_secret_arn"),
5354
resource.TestCheckResourceAttr(resourceName, "network_type", string(awstypes.NetworkTypeIpv4)),
@@ -533,6 +534,7 @@ func TestAccTimestreamInfluxDBDBCluster_dbParameterGroupV3(t *testing.T) {
533534
acctest.MatchResourceAttrRegionalARN(ctx, resourceName, names.AttrARN, "timestream-influxdb", regexache.MustCompile(`db-cluster/.+$`)),
534535
resource.TestCheckResourceAttr(resourceName, "db_parameter_group_identifier", "InfluxDBV3Core"),
535536
resource.TestCheckResourceAttrSet(resourceName, names.AttrEndpoint),
537+
resource.TestCheckResourceAttrSet(resourceName, "engine_type"),
536538
// Verify cluster was created successfully without requiring allocated_storage, bucket, organization, username, or password
537539
),
538540
},

0 commit comments

Comments
 (0)