Skip to content

add hyperdisk related fields to sql_database_instance #13679

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

Merged
merged 1 commit into from
Apr 17, 2025

Conversation

translucens
Copy link
Member

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

sql: added `data_disk_provisioned_iops` and `data_disk_provisioned_throughput` fields to `google_sql_database_instance` resource

@github-actions github-actions bot requested a review from NickElliot April 15, 2025 12:44
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: see go/terraform-auto-test-runs to set up automatic test runs.

@NickElliot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 4 files changed, 17 insertions(+), 7 deletions(-))
google-beta provider: Diff ( 5 files changed, 150 insertions(+), 51 deletions(-))

Missing doc report (experimental)

The following resources have fields missing in documents.

  • google_sql_database_instance
    • Expected Document Path: /website/docs/r/sql_database_instance.html.markdown
    • Fields: [settings.data_disk_provisioned_iops settings.data_disk_provisioned_throughput]

The following data sources are missing documents:

  • google_sql_database_instance, expect file /website/docs/d/sql_database_instance.html.markdown to exist.
  • google_sql_database_instances, expect file /website/docs/d/sql_database_instances.html.markdown to exist.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4833
Passed tests: 4374
Skipped tests: 447
Affected tests: 12

Click here to see the affected service packages

All service packages are affected

Action taken

Found 12 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAccessContextManager
  • TestAccAlloydbInstance_createInstanceWithPscInterfaceConfigs
  • TestAccBigQueryExternalDataTable_deltaLake
  • TestAccCloudRunService_cloudRunServiceSqlExample
  • TestAccCloudbuildWorkerPool_basic
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataLossPreventionDiscoveryConfig_Update
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToAlloydbExample
  • TestAccDatastreamConnectionProfile_sshKey_update
  • TestAccHealthcarePipelineJob_healthcarePipelineJobBackfillExample
  • TestAccSqlDatabaseInstance_hyperdisk

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccAccessContextManager [Debug log]
TestAccAlloydbInstance_createInstanceWithPscInterfaceConfigs [Debug log]
TestAccCloudRunService_cloudRunServiceSqlExample [Debug log]
TestAccDataLossPreventionDiscoveryConfig_Update [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]
TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToAlloydbExample [Debug log]
TestAccDatastreamConnectionProfile_sshKey_update [Debug log]
TestAccSqlDatabaseInstance_hyperdisk [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccAccessContextManager [Error message] [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🔴 Tests failed during RECORDING mode:
TestAccBigQueryExternalDataTable_deltaLake [Error message] [Debug log]
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]
TestAccHealthcarePipelineJob_healthcarePipelineJobBackfillExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly lgtm, the missing docs errors are erroneous, however would it be helpful to add this field to the sql database instance data source at the same time?

@translucens
Copy link
Member Author

data_source_sql_database_instance.go loads the schema from resource definition so it is already available these fields via data source.

I tested the config and worked fine.

resource "google_sql_database_instance" "c4a" {
  provider = google-beta

  name                = "c4a-hyperdisk"
  region              = "us-east1"
  database_version    = "POSTGRES_17"
  deletion_protection = false
  settings {
    tier                             = "db-c4a-highmem-2"
    edition                          = "ENTERPRISE_PLUS"
    disk_type                        = "HYPERDISK_BALANCED"
    disk_size                        = 20
    data_disk_provisioned_iops       = 3000
    data_disk_provisioned_throughput = 140
  }
}

data "google_sql_database_instance" "test" {
  provider = google-beta

  name = google_sql_database_instance.c4a.name
}

output "iops" {
  value = data.google_sql_database_instance.test.settings[0].data_disk_provisioned_iops
}
output "throughput" {
  value = data.google_sql_database_instance.test.settings[0].data_disk_provisioned_throughput
}

@github-actions github-actions bot requested a review from NickElliot April 16, 2025 02:47
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 8 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 3 files changed, 141 insertions(+), 48 deletions(-))

Missing doc report (experimental)

The following resources have fields missing in documents.

  • google_sql_database_instance
    • Expected Document Path: /website/docs/r/sql_database_instance.html.markdown
    • Fields: [settings.data_disk_provisioned_iops settings.data_disk_provisioned_throughput]

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 111
Passed tests: 90
Skipped tests: 21
Affected tests: 0

Click here to see the affected service packages
  • sql

🟢 All tests passed!

View the build log

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NickElliot NickElliot added this pull request to the merge queue Apr 17, 2025
Merged via the queue into GoogleCloudPlatform:main with commit f0e3b7f Apr 17, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants