Skip to content

Commit

Permalink
d/aws_db_instance: Add max_allocated_storage attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
an2nb2 committed Jul 12, 2023
1 parent 2aa1162 commit 6bab9e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/service/rds/instance_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ func DataSourceInstance() *schema.Resource {
},
},
},
"max_allocated_storage": {
Type: schema.TypeInt,
Computed: true,
},
"monitoring_interval": {
Type: schema.TypeInt,
Computed: true,
Expand Down Expand Up @@ -252,6 +256,7 @@ func dataSourceInstanceRead(ctx context.Context, d *schema.ResourceData, meta in
return sdkdiag.AppendErrorf(diags, "setting master_user_secret: %s", err)
}
}
d.Set("max_allocated_storage", v.MaxAllocatedStorage)
d.Set("monitoring_interval", v.MonitoringInterval)
d.Set("monitoring_role_arn", v.MonitoringRoleArn)
d.Set("multi_az", v.MultiAZ)
Expand Down
2 changes: 2 additions & 0 deletions internal/service/rds/instance_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func TestAccRDSInstanceDataSource_basic(t *testing.T) {
resource.TestCheckResourceAttrPair(dataSourceName, "hosted_zone_id", resourceName, "hosted_zone_id"),
resource.TestCheckResourceAttrPair(dataSourceName, "iops", resourceName, "iops"),
resource.TestCheckResourceAttrPair(dataSourceName, "master_username", resourceName, "username"),
resource.TestCheckResourceAttrPair(dataSourceName, "max_allocated_storage", resourceName, "max_allocated_storage"),
resource.TestCheckResourceAttrPair(dataSourceName, "multi_az", resourceName, "multi_az"),
resource.TestCheckResourceAttrPair(dataSourceName, "network_type", resourceName, "network_type"),
resource.TestCheckResourceAttrPair(dataSourceName, "port", resourceName, "port"),
Expand Down Expand Up @@ -120,6 +121,7 @@ resource "aws_db_instance" "test" {
password = "avoid-plaintext-passwords"
skip_final_snapshot = true
username = "tfacctest"
max_allocated_storage = 100
enabled_cloudwatch_logs_exports = [
"audit",
Expand Down

0 comments on commit 6bab9e4

Please sign in to comment.