Skip to content

Conversation

@wuchris-g
Copy link
Contributor

@wuchris-g wuchris-g commented Jan 5, 2026

sql: added `server_certificate_rotation_mode` field to `google_sql_database_instance` resource

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 5, 2026
@wuchris-g wuchris-g marked this pull request as ready for review January 5, 2026 21:42
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@zli82016, 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.

@github-actions github-actions bot requested a review from zli82016 January 5, 2026 21:43
@modular-magician modular-magician added service/sqladmin-cp and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 6, 2026
@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, 20 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 20 insertions(+), 3 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_sql_database_instance (215 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_sql_database_instance" "primary" {
  settings {
    ip_configuration {
      enable_private_path_for_google_cloud_services = # value needed
    }
  }
}

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.ip_configuration.server_certificate_rotation_mode]

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 137
Passed tests: 46
Skipped tests: 26
Affected tests: 65

Click here to see the affected service packages
  • sql

Action taken

Found 65 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccSQLDatabaseInstance_sqlMysqlDataCacheConfig
  • TestAccSQLDatabaseInstance_sqlPostgresDataCacheConfig
  • TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithDiskSize
  • TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithoutDiskSize
  • TestAccSqlDatabaseInstance_Edition_Downgrade
  • TestAccSqlDatabaseInstance_EnableGoogleDataplexIntegration
  • TestAccSqlDatabaseInstance_EnableGoogleMlIntegration
  • TestAccSqlDatabaseInstance_FinalBackupConfig
  • TestAccSqlDatabaseInstance_MysqlEplusWithFailoverReplicaSetupWithPrivateNetwork
  • TestAccSqlDatabaseInstance_MysqlEplusWithPrivateNetwork
  • TestAccSqlDatabaseInstance_MysqlReadPoolAutoScaleEnableDisableSuccess
  • TestAccSqlDatabaseInstance_MysqlReadPoolEnableDisableSuccess
  • TestAccSqlDatabaseInstance_MysqlSwitchoverSuccess
  • TestAccSqlDatabaseInstance_Mysql_Edition_Upgrade
  • TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabled
  • TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabledForSqlServer
  • TestAccSqlDatabaseInstance_PostgresEplusWithFailoverReplicaSetupWithPrivateNetwork
  • TestAccSqlDatabaseInstance_PostgresEplusWithPrivateNetwork
  • TestAccSqlDatabaseInstance_PostgresReadPoolAutoScaleChangeNodeCount
  • TestAccSqlDatabaseInstance_PostgresReadPoolScaleOutSuccess
  • TestAccSqlDatabaseInstance_PostgresReadPoolScaleUpSuccess
  • TestAccSqlDatabaseInstance_PostgresSwitchoverSuccess
  • TestAccSqlDatabaseInstance_Postgres_Edition_Upgrade
  • TestAccSqlDatabaseInstance_RetainBackupOnDelete
  • TestAccSqlDatabaseInstance_Smt
  • TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate
  • TestAccSqlDatabaseInstance_SwitchoverSuccess
  • TestAccSqlDatabaseInstance_Timezone
  • TestAccSqlDatabaseInstance_activationPolicy
  • TestAccSqlDatabaseInstance_authNets
  • TestAccSqlDatabaseInstance_basicMSSQL
  • TestAccSqlDatabaseInstance_basicMSSQL_passwordWo
  • TestAccSqlDatabaseInstance_basic_with_user_labels
  • TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls
  • TestAccSqlDatabaseInstance_editionUpdateForEnhancedBackupTierInstance
  • TestAccSqlDatabaseInstance_hyperdisk
  • TestAccSqlDatabaseInstance_majorVersionUpgradeForEnhancedBackupTierInstance
  • TestAccSqlDatabaseInstance_rootPasswordShouldBeUpdatable
  • TestAccSqlDatabaseInstance_settingsDowngrade
  • TestAccSqlDatabaseInstance_settings_basic
  • TestAccSqlDatabaseInstance_settings_deletionProtection
  • TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled
  • TestAccSqlDatabaseInstance_settings_secondary
  • TestAccSqlDatabaseInstance_settings_upgrade
  • TestAccSqlDatabaseInstance_updateInstanceTierForEnhancedBackupTierInstance
  • TestAccSqlDatabaseInstance_updateMCPEnabled
  • TestAccSqlDatabaseInstance_updateReadReplicaWithBinaryLogEnabled
  • TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL
  • TestAccSqlDatabaseInstance_useCasBasedServerCa
  • TestAccSqlDatabaseInstance_useCustomSubjectAlternateName
  • TestAccSqlDatabaseInstance_useCustomerManagedServerCa
  • TestAccSqlDatabaseInstance_useInternalCaByDefault
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddPscAutoConnections_thenRemovePscAutoConnections
  • TestAccSqlDatabaseInstance_withPSCEnabled_withAllowedConsumerProjects
  • TestAccSqlDatabaseInstance_withPSCEnabled_withEmptyAllowedConsumerProjects
  • TestAccSqlDatabaseInstance_withPSCEnabled_withPscAutoConnections
  • TestAccSqlDatabaseInstance_withPSCEnabled_withoutAllowedConsumerProjects
  • TestAccSqlDatabaseInstance_withPSCEnabled_withoutPscAutoConnections
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange
  • TestAccSqlDatabaseInstance_withPscEnabled_withNetworkAttachmentUri_thenRemoveNetworkAttachment
  • TestAccSqlDatabase_instanceWithActivationPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccSQLDatabaseInstance_sqlMysqlDataCacheConfig [Debug log]
TestAccSQLDatabaseInstance_sqlPostgresDataCacheConfig [Debug log]
TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithDiskSize [Debug log]
TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithoutDiskSize [Debug log]
TestAccSqlDatabaseInstance_Edition_Downgrade [Debug log]
TestAccSqlDatabaseInstance_EnableGoogleDataplexIntegration [Debug log]
TestAccSqlDatabaseInstance_EnableGoogleMlIntegration [Debug log]
TestAccSqlDatabaseInstance_FinalBackupConfig [Debug log]
TestAccSqlDatabaseInstance_MysqlReadPoolAutoScaleEnableDisableSuccess [Debug log]
TestAccSqlDatabaseInstance_MysqlReadPoolEnableDisableSuccess [Debug log]
TestAccSqlDatabaseInstance_MysqlSwitchoverSuccess [Debug log]
TestAccSqlDatabaseInstance_Mysql_Edition_Upgrade [Debug log]
TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabled [Debug log]
TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabledForSqlServer [Debug log]
TestAccSqlDatabaseInstance_PostgresReadPoolAutoScaleChangeNodeCount [Debug log]
TestAccSqlDatabaseInstance_PostgresReadPoolScaleOutSuccess [Debug log]
TestAccSqlDatabaseInstance_PostgresReadPoolScaleUpSuccess [Debug log]
TestAccSqlDatabaseInstance_PostgresSwitchoverSuccess [Debug log]
TestAccSqlDatabaseInstance_Postgres_Edition_Upgrade [Debug log]
TestAccSqlDatabaseInstance_RetainBackupOnDelete [Debug log]
TestAccSqlDatabaseInstance_SwitchoverSuccess [Debug log]
TestAccSqlDatabaseInstance_basicMSSQL_passwordWo [Debug log]
TestAccSqlDatabaseInstance_basic_with_user_labels [Debug log]
TestAccSqlDatabaseInstance_editionUpdateForEnhancedBackupTierInstance [Debug log]
TestAccSqlDatabaseInstance_hyperdisk [Debug log]
TestAccSqlDatabaseInstance_majorVersionUpgradeForEnhancedBackupTierInstance [Debug log]
TestAccSqlDatabaseInstance_rootPasswordShouldBeUpdatable [Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled [Debug log]
TestAccSqlDatabaseInstance_updateInstanceTierForEnhancedBackupTierInstance [Debug log]
TestAccSqlDatabaseInstance_updateMCPEnabled [Debug log]
TestAccSqlDatabaseInstance_updateReadReplicaWithBinaryLogEnabled [Debug log]
TestAccSqlDatabaseInstance_useCustomSubjectAlternateName [Debug log]
TestAccSqlDatabaseInstance_useCustomerManagedServerCa [Debug log]
TestAccSqlDatabase_instanceWithActivationPolicy [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_MysqlEplusWithFailoverReplicaSetupWithPrivateNetwork [Error message] [Debug log]
TestAccSqlDatabaseInstance_MysqlEplusWithPrivateNetwork [Error message] [Debug log]
TestAccSqlDatabaseInstance_PostgresEplusWithFailoverReplicaSetupWithPrivateNetwork [Error message] [Debug log]
TestAccSqlDatabaseInstance_PostgresEplusWithPrivateNetwork [Error message] [Debug log]
TestAccSqlDatabaseInstance_Smt [Error message] [Debug log]
TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate [Error message] [Debug log]
TestAccSqlDatabaseInstance_Timezone [Error message] [Debug log]
TestAccSqlDatabaseInstance_activationPolicy [Error message] [Debug log]
TestAccSqlDatabaseInstance_authNets [Error message] [Debug log]
TestAccSqlDatabaseInstance_basicMSSQL [Error message] [Debug log]
TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls [Error message] [Debug log]
TestAccSqlDatabaseInstance_settingsDowngrade [Error message] [Debug log]
TestAccSqlDatabaseInstance_settings_basic [Error message] [Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtection [Error message] [Debug log]
TestAccSqlDatabaseInstance_settings_secondary [Error message] [Debug log]
TestAccSqlDatabaseInstance_settings_upgrade [Error message] [Debug log]
TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL [Error message] [Debug log]
TestAccSqlDatabaseInstance_useCasBasedServerCa [Error message] [Debug log]
TestAccSqlDatabaseInstance_useInternalCaByDefault [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddPscAutoConnections_thenRemovePscAutoConnections [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withAllowedConsumerProjects [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withEmptyAllowedConsumerProjects [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withPscAutoConnections [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withoutAllowedConsumerProjects [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withoutPscAutoConnections [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPscEnabled_withNetworkAttachmentUri_thenRemoveNetworkAttachment [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

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 6, 2026
@github-actions github-actions bot requested a review from zli82016 January 6, 2026 22:10
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 8, 2026
@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, 20 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 20 insertions(+), 3 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_sql_database_instance (215 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_sql_database_instance" "primary" {
  settings {
    ip_configuration {
      enable_private_path_for_google_cloud_services = # value needed
    }
  }
}

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.ip_configuration.server_certificate_rotation_mode]

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 137
Passed tests: 79
Skipped tests: 27
Affected tests: 31

Click here to see the affected service packages
  • sql

Action taken

Found 31 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccSqlDatabaseInstance_MysqlEplusWithFailoverReplicaSetupWithPrivateNetwork
  • TestAccSqlDatabaseInstance_MysqlEplusWithPrivateNetwork
  • TestAccSqlDatabaseInstance_PostgresEplusWithFailoverReplicaSetupWithPrivateNetwork
  • TestAccSqlDatabaseInstance_PostgresEplusWithPrivateNetwork
  • TestAccSqlDatabaseInstance_Smt
  • TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate
  • TestAccSqlDatabaseInstance_Timezone
  • TestAccSqlDatabaseInstance_authNets
  • TestAccSqlDatabaseInstance_basicMSSQL
  • TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls
  • TestAccSqlDatabaseInstance_settingsDowngrade
  • TestAccSqlDatabaseInstance_settings_basic
  • TestAccSqlDatabaseInstance_settings_deletionProtection
  • TestAccSqlDatabaseInstance_settings_secondary
  • TestAccSqlDatabaseInstance_settings_upgrade
  • TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL
  • TestAccSqlDatabaseInstance_useCasBasedServerCa
  • TestAccSqlDatabaseInstance_useCustomSubjectAlternateName
  • TestAccSqlDatabaseInstance_useInternalCaByDefault
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddPscAutoConnections_thenRemovePscAutoConnections
  • TestAccSqlDatabaseInstance_withPSCEnabled_withAllowedConsumerProjects
  • TestAccSqlDatabaseInstance_withPSCEnabled_withEmptyAllowedConsumerProjects
  • TestAccSqlDatabaseInstance_withPSCEnabled_withPscAutoConnections
  • TestAccSqlDatabaseInstance_withPSCEnabled_withoutAllowedConsumerProjects
  • TestAccSqlDatabaseInstance_withPSCEnabled_withoutPscAutoConnections
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange
  • TestAccSqlDatabaseInstance_withPscEnabled_withNetworkAttachmentUri_thenRemoveNetworkAttachment

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccSqlDatabaseInstance_useCustomSubjectAlternateName [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_MysqlEplusWithFailoverReplicaSetupWithPrivateNetwork [Error message] [Debug log]
TestAccSqlDatabaseInstance_MysqlEplusWithPrivateNetwork [Error message] [Debug log]
TestAccSqlDatabaseInstance_PostgresEplusWithFailoverReplicaSetupWithPrivateNetwork [Error message] [Debug log]
TestAccSqlDatabaseInstance_PostgresEplusWithPrivateNetwork [Error message] [Debug log]
TestAccSqlDatabaseInstance_Smt [Error message] [Debug log]
TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate [Error message] [Debug log]
TestAccSqlDatabaseInstance_Timezone [Error message] [Debug log]
TestAccSqlDatabaseInstance_authNets [Error message] [Debug log]
TestAccSqlDatabaseInstance_basicMSSQL [Error message] [Debug log]
TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls [Error message] [Debug log]
TestAccSqlDatabaseInstance_settingsDowngrade [Error message] [Debug log]
TestAccSqlDatabaseInstance_settings_basic [Error message] [Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtection [Error message] [Debug log]
TestAccSqlDatabaseInstance_settings_secondary [Error message] [Debug log]
TestAccSqlDatabaseInstance_settings_upgrade [Error message] [Debug log]
TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL [Error message] [Debug log]
TestAccSqlDatabaseInstance_useCasBasedServerCa [Error message] [Debug log]
TestAccSqlDatabaseInstance_useInternalCaByDefault [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddPscAutoConnections_thenRemovePscAutoConnections [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withAllowedConsumerProjects [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withEmptyAllowedConsumerProjects [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withPscAutoConnections [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withoutAllowedConsumerProjects [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withoutPscAutoConnections [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange [Error message] [Debug log]
TestAccSqlDatabaseInstance_withPscEnabled_withNetworkAttachmentUri_thenRemoveNetworkAttachment [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

"ssl_mode": ipConfiguration.SslMode,
"server_ca_mode": ipConfiguration.ServerCaMode,
"server_ca_pool": ipConfiguration.ServerCaPool,
"server_certificate_rotation_mode": ipConfiguration.ServerCertificateRotationMode,
Copy link
Member

Choose a reason for hiding this comment

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

A bunch of tests failed in this PR #16072 (comment).

 resource_sql_database_instance_test.go:1052: Step 1/2 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # google_sql_database_instance.instance will be updated in-place
          ~ resource "google_sql_database_instance" "instance" {
                id                             = "tf-test-bkfrxgq263"
                name                           = "tf-test-bkfrxgq263"
                # (21 unchanged attributes hidden)
        
              ~ settings {
                    # (21 unchanged attributes hidden)
        
                  ~ ip_configuration {
                      + custom_subject_alternative_names              = []
                      - server_certificate_rotation_mode              = "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED" -> null
                        # (7 unchanged attributes hidden)

The reason is that the API returns SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED by default.
Can you try to fix this?
One solution could be that checking the value of ipConfiguration.ServerCertificateRotationMode. If the value is not SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED, then add server_certificate_rotation_mode to the data.

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