Skip to content

feat: support server_certificate_rotation_mode for SQL instance#16743

Open
shuyama1 wants to merge 2 commits intomainfrom
revert-16398-revert-16320-auto-rotation2
Open

feat: support server_certificate_rotation_mode for SQL instance#16743
shuyama1 wants to merge 2 commits intomainfrom
revert-16398-revert-16320-auto-rotation2

Conversation

@shuyama1
Copy link
Member

Reverts #16398 to reintroduce #16320

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

@shuyama1
Copy link
Member Author

@wuchris-g FYI

if newMode == "" && oldMode == "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED" {
return true
}
return false
Copy link
Contributor

Choose a reason for hiding this comment

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

Tabs vs. spaces looks inconsistent in this function. Looks like I messed that up in #16320

@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, 79 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 79 insertions(+), 3 deletions(-))

Missing test report

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

Resource: google_sql_database_instance (243 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

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, 79 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 79 insertions(+), 3 deletions(-))

Missing test report

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

Resource: google_sql_database_instance (243 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: 149
Passed tests: 71
Skipped tests: 27
Affected tests: 51

Click here to see the affected service packages
  • sql

Action taken

Found 51 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_AutoUpgradeEnabled
  • TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithDiskSize
  • TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithoutDiskSize
  • TestAccSqlDatabaseInstance_Edition_Downgrade
  • TestAccSqlDatabaseInstance_EnableGoogleDataplexIntegration
  • TestAccSqlDatabaseInstance_EnableGoogleMlIntegration
  • TestAccSqlDatabaseInstance_FinalBackupConfig
  • TestAccSqlDatabaseInstance_MysqlEplusWithFailoverReplicaSetupWithPrivateNetwork
  • TestAccSqlDatabaseInstance_MysqlReadPoolAutoScaleEnableDisableSuccess
  • TestAccSqlDatabaseInstance_MysqlReadPoolEnableDisableSuccess
  • TestAccSqlDatabaseInstance_MysqlSwitchoverSuccess
  • TestAccSqlDatabaseInstance_Mysql_Edition_Upgrade
  • TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabled
  • TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabledForSqlServer
  • TestAccSqlDatabaseInstance_PostgresEplusWithFailoverReplicaSetupWithPrivateNetwork
  • TestAccSqlDatabaseInstance_PostgresReadPoolAutoScaleChangeNodeCount
  • TestAccSqlDatabaseInstance_PostgresReadPoolScaleOutSuccess
  • TestAccSqlDatabaseInstance_PostgresReadPoolScaleUpSuccess
  • TestAccSqlDatabaseInstance_PostgresSwitchoverSuccess
  • TestAccSqlDatabaseInstance_Postgres_Edition_Upgrade
  • TestAccSqlDatabaseInstance_RetainBackupOnDelete
  • TestAccSqlDatabaseInstance_Smt
  • TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate
  • TestAccSqlDatabaseInstance_SwitchoverSuccess
  • TestAccSqlDatabaseInstance_authNets
  • TestAccSqlDatabaseInstance_basicMSSQL
  • TestAccSqlDatabaseInstance_basicMSSQL_passwordWo
  • TestAccSqlDatabaseInstance_basic_with_user_labels
  • TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls
  • TestAccSqlDatabaseInstance_editionUpdateForEnhancedBackupTierInstance
  • TestAccSqlDatabaseInstance_hyperdisk
  • TestAccSqlDatabaseInstance_insights_enhanced_postgres17
  • TestAccSqlDatabaseInstance_majorVersionUpgradeForEnhancedBackupTierInstance
  • TestAccSqlDatabaseInstance_rootPasswordShouldBeUpdatable
  • TestAccSqlDatabaseInstance_settings_deletionProtection
  • TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled
  • TestAccSqlDatabaseInstance_settings_upgrade
  • TestAccSqlDatabaseInstance_updateInstanceTierForEnhancedBackupTierInstance
  • TestAccSqlDatabaseInstance_updateMCPEnabled
  • TestAccSqlDatabaseInstance_updateReadReplicaWithBinaryLogEnabled
  • TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL
  • TestAccSqlDatabaseInstance_useCustomSubjectAlternateName
  • TestAccSqlDatabaseInstance_useCustomerManagedServerCa
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddPscAutoConnections_thenRemovePscAutoConnections
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange
  • TestAccSqlDatabaseInstance_withPscEnabled_withNetworkAttachmentUri_thenRemoveNetworkAttachment
  • TestAccSqlDatabase_instanceWithActivationPolicy

Get to know how VCR tests work

1 similar comment
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 149
Passed tests: 71
Skipped tests: 27
Affected tests: 51

Click here to see the affected service packages
  • sql

Action taken

Found 51 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_AutoUpgradeEnabled
  • TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithDiskSize
  • TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithoutDiskSize
  • TestAccSqlDatabaseInstance_Edition_Downgrade
  • TestAccSqlDatabaseInstance_EnableGoogleDataplexIntegration
  • TestAccSqlDatabaseInstance_EnableGoogleMlIntegration
  • TestAccSqlDatabaseInstance_FinalBackupConfig
  • TestAccSqlDatabaseInstance_MysqlEplusWithFailoverReplicaSetupWithPrivateNetwork
  • TestAccSqlDatabaseInstance_MysqlReadPoolAutoScaleEnableDisableSuccess
  • TestAccSqlDatabaseInstance_MysqlReadPoolEnableDisableSuccess
  • TestAccSqlDatabaseInstance_MysqlSwitchoverSuccess
  • TestAccSqlDatabaseInstance_Mysql_Edition_Upgrade
  • TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabled
  • TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabledForSqlServer
  • TestAccSqlDatabaseInstance_PostgresEplusWithFailoverReplicaSetupWithPrivateNetwork
  • TestAccSqlDatabaseInstance_PostgresReadPoolAutoScaleChangeNodeCount
  • TestAccSqlDatabaseInstance_PostgresReadPoolScaleOutSuccess
  • TestAccSqlDatabaseInstance_PostgresReadPoolScaleUpSuccess
  • TestAccSqlDatabaseInstance_PostgresSwitchoverSuccess
  • TestAccSqlDatabaseInstance_Postgres_Edition_Upgrade
  • TestAccSqlDatabaseInstance_RetainBackupOnDelete
  • TestAccSqlDatabaseInstance_Smt
  • TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate
  • TestAccSqlDatabaseInstance_SwitchoverSuccess
  • TestAccSqlDatabaseInstance_authNets
  • TestAccSqlDatabaseInstance_basicMSSQL
  • TestAccSqlDatabaseInstance_basicMSSQL_passwordWo
  • TestAccSqlDatabaseInstance_basic_with_user_labels
  • TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls
  • TestAccSqlDatabaseInstance_editionUpdateForEnhancedBackupTierInstance
  • TestAccSqlDatabaseInstance_hyperdisk
  • TestAccSqlDatabaseInstance_insights_enhanced_postgres17
  • TestAccSqlDatabaseInstance_majorVersionUpgradeForEnhancedBackupTierInstance
  • TestAccSqlDatabaseInstance_rootPasswordShouldBeUpdatable
  • TestAccSqlDatabaseInstance_settings_deletionProtection
  • TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled
  • TestAccSqlDatabaseInstance_settings_upgrade
  • TestAccSqlDatabaseInstance_updateInstanceTierForEnhancedBackupTierInstance
  • TestAccSqlDatabaseInstance_updateMCPEnabled
  • TestAccSqlDatabaseInstance_updateReadReplicaWithBinaryLogEnabled
  • TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL
  • TestAccSqlDatabaseInstance_useCustomSubjectAlternateName
  • TestAccSqlDatabaseInstance_useCustomerManagedServerCa
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddPscAutoConnections_thenRemovePscAutoConnections
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange
  • 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_AutoUpgradeEnabled [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_MysqlEplusWithFailoverReplicaSetupWithPrivateNetwork [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_PostgresEplusWithFailoverReplicaSetupWithPrivateNetwork [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_Smt [Debug log]
TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate [Debug log]
TestAccSqlDatabaseInstance_SwitchoverSuccess [Debug log]
TestAccSqlDatabaseInstance_authNets [Debug log]
TestAccSqlDatabaseInstance_basicMSSQL [Debug log]
TestAccSqlDatabaseInstance_basicMSSQL_passwordWo [Debug log]
TestAccSqlDatabaseInstance_basic_with_user_labels [Debug log]
TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls [Debug log]
TestAccSqlDatabaseInstance_editionUpdateForEnhancedBackupTierInstance [Debug log]
TestAccSqlDatabaseInstance_hyperdisk [Debug log]
TestAccSqlDatabaseInstance_insights_enhanced_postgres17 [Debug log]
TestAccSqlDatabaseInstance_majorVersionUpgradeForEnhancedBackupTierInstance [Debug log]
TestAccSqlDatabaseInstance_rootPasswordShouldBeUpdatable [Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtection [Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled [Debug log]
TestAccSqlDatabaseInstance_settings_upgrade [Debug log]
TestAccSqlDatabaseInstance_updateInstanceTierForEnhancedBackupTierInstance [Debug log]
TestAccSqlDatabaseInstance_updateMCPEnabled [Debug log]
TestAccSqlDatabaseInstance_updateReadReplicaWithBinaryLogEnabled [Debug log]
TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL [Debug log]
TestAccSqlDatabaseInstance_useCustomSubjectAlternateName [Debug log]
TestAccSqlDatabaseInstance_useCustomerManagedServerCa [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddPscAutoConnections_thenRemovePscAutoConnections [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange [Debug log]
TestAccSqlDatabaseInstance_withPscEnabled_withNetworkAttachmentUri_thenRemoveNetworkAttachment [Debug log]
TestAccSqlDatabase_instanceWithActivationPolicy [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccSQLDatabaseInstance_sqlMysqlDataCacheConfig [Debug log]
TestAccSQLDatabaseInstance_sqlPostgresDataCacheConfig [Debug log]
TestAccSqlDatabaseInstance_AutoUpgradeEnabled [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_MysqlEplusWithFailoverReplicaSetupWithPrivateNetwork [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_PostgresEplusWithFailoverReplicaSetupWithPrivateNetwork [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_Smt [Debug log]
TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate [Debug log]
TestAccSqlDatabaseInstance_SwitchoverSuccess [Debug log]
TestAccSqlDatabaseInstance_authNets [Debug log]
TestAccSqlDatabaseInstance_basicMSSQL [Debug log]
TestAccSqlDatabaseInstance_basicMSSQL_passwordWo [Debug log]
TestAccSqlDatabaseInstance_basic_with_user_labels [Debug log]
TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls [Debug log]
TestAccSqlDatabaseInstance_editionUpdateForEnhancedBackupTierInstance [Debug log]
TestAccSqlDatabaseInstance_hyperdisk [Debug log]
TestAccSqlDatabaseInstance_insights_enhanced_postgres17 [Debug log]
TestAccSqlDatabaseInstance_majorVersionUpgradeForEnhancedBackupTierInstance [Debug log]
TestAccSqlDatabaseInstance_rootPasswordShouldBeUpdatable [Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtection [Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled [Debug log]
TestAccSqlDatabaseInstance_settings_upgrade [Debug log]
TestAccSqlDatabaseInstance_updateInstanceTierForEnhancedBackupTierInstance [Debug log]
TestAccSqlDatabaseInstance_updateMCPEnabled [Debug log]
TestAccSqlDatabaseInstance_updateReadReplicaWithBinaryLogEnabled [Debug log]
TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL [Debug log]
TestAccSqlDatabaseInstance_useCustomSubjectAlternateName [Debug log]
TestAccSqlDatabaseInstance_useCustomerManagedServerCa [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddPscAutoConnections_thenRemovePscAutoConnections [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange [Debug log]
TestAccSqlDatabaseInstance_withPscEnabled_withNetworkAttachmentUri_thenRemoveNetworkAttachment [Debug log]
TestAccSqlDatabase_instanceWithActivationPolicy [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@shuyama1 shuyama1 requested a review from NickElliot March 19, 2026 18:06
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