magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

Sql pvup support

Open usingh83 opened this issue 2 years ago • 34 comments

If this PR is for Terraform, I acknowledge that I have:

  • [X] Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • [X] Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • [X] Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • [X] Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • [X] Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

sql: added  `password_policy` field to `google_sql_user` resource

usingh83 avatar Aug 26 '22 01:08 usingh83

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @slevenick, a repository maintainer, has been assigned to assist you and help review your changes.

:question: First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


modular-magician avatar Aug 26 '22 01:08 modular-magician

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 200 insertions(+)) Terraform Beta: Diff ( 3 files changed, 200 insertions(+)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF Cloud Doc Samples: Diff ( 1 file changed, 10 insertions(+))

modular-magician avatar Aug 26 '22 01:08 modular-magician

Tests analytics

Total tests: 2147 Passed tests 1907 Skipped tests: 233 Failed tests: 7

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCloudFunctions2Function_fullUpdate|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange

modular-magician avatar Aug 26 '22 02:08 modular-magician

Tests passed during RECORDING mode: TestAccCloudFunctions2Function_fullUpdate[view]

Tests failed during RECORDING mode: TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view] TestAccComputeInstance_soleTenantNodeAffinities[view] TestAccComputeGlobalForwardingRule_internalLoadBalancing[view] TestAccCloudRunService_cloudRunServiceStaticOutboundExample[view] TestAccSqlDatabaseInstance_SqlServerAuditConfig[view] TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[view]

Please fix these to complete your PR View the build log or the debug log for each test

modular-magician avatar Aug 26 '22 02:08 modular-magician

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 199 insertions(+)) Terraform Beta: Diff ( 3 files changed, 199 insertions(+)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF Cloud Doc Samples: Diff ( 1 file changed, 10 insertions(+))

modular-magician avatar Aug 29 '22 02:08 modular-magician

Tests analytics

Total tests: 2148 Passed tests 1906 Skipped tests: 234 Failed tests: 8

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCGCSnippet_eventarcWorkflowsExample

modular-magician avatar Aug 29 '22 03:08 modular-magician

Tests passed during RECORDING mode: TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view] TestAccFirebaserulesRelease_BasicRelease[view]

Tests failed during RECORDING mode: TestAccSqlDatabaseInstance_SqlServerAuditConfig[view] TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[view] TestAccComputeInstance_soleTenantNodeAffinities[view] TestAccComputeGlobalForwardingRule_internalLoadBalancing[view] TestAccCloudRunService_cloudRunServiceStaticOutboundExample[view] TestAccCGCSnippet_eventarcWorkflowsExample[view]

Please fix these to complete your PR View the build log or the debug log for each test

modular-magician avatar Aug 29 '22 03:08 modular-magician

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 224 insertions(+)) Terraform Beta: Diff ( 3 files changed, 224 insertions(+)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF Cloud Doc Samples: Diff ( 1 file changed, 10 insertions(+))

modular-magician avatar Sep 01 '22 00:09 modular-magician

Tests analytics

Total tests: 2152 Passed tests 1910 Skipped tests: 234 Failed tests: 8

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccSqlUser_mysqlDisabled|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample

modular-magician avatar Sep 01 '22 01:09 modular-magician

Tests passed during RECORDING mode: TestAccFirebaserulesRelease_BasicRelease[Debug log] TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[Debug log]

Tests failed during RECORDING mode: TestAccSqlUser_mysqlDisabled[Error message] [Debug log] TestAccSqlDatabaseInstance_SqlServerAuditConfig[Error message] [Debug log] TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log] TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log] TestAccComputeGlobalForwardingRule_internalLoadBalancing[Error message] [Debug log] TestAccCloudRunService_cloudRunServiceStaticOutboundExample[Error message] [Debug log]

Please fix these to complete your PR View the build log or the debug log for each test

modular-magician avatar Sep 01 '22 01:09 modular-magician

Are you able to run the TestAccSqlUser_mysqlDisabled locally and see it pass? I'm seeing a diff after apply during the test run that seems to be caused by the flatten not working correctly

slevenick avatar Sep 01 '22 17:09 slevenick

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 225 insertions(+)) Terraform Beta: Diff ( 3 files changed, 225 insertions(+)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-)) TF Cloud Doc Samples: Diff ( 1 file changed, 10 insertions(+))

modular-magician avatar Sep 02 '22 07:09 modular-magician

Tests analytics

Total tests: 2157 Passed tests 1914 Skipped tests: 235 Failed tests: 8

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccSqlUser_mysqlDisabled

modular-magician avatar Sep 02 '22 08:09 modular-magician

Tests passed during RECORDING mode: TestAccFirebaserulesRelease_BasicRelease[Debug log] TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[Debug log]

Tests failed during RECORDING mode: TestAccSqlDatabaseInstance_SqlServerAuditConfig[Error message] [Debug log] TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log] TestAccComputeGlobalForwardingRule_internalLoadBalancing[Error message] [Debug log] TestAccCloudRunService_cloudRunServiceStaticOutboundExample[Error message] [Debug log] TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log] TestAccSqlUser_mysqlDisabled[Error message] [Debug log]

Please fix these to complete your PR View the build log or the debug log for each test

modular-magician avatar Sep 02 '22 09:09 modular-magician

Sorry, I'm not sure how your last change fixes the issue. Have you been able to use this resource locally successfully?

slevenick avatar Sep 02 '22 20:09 slevenick

See previous comments

It didn't, i am still working on it.

usingh83 avatar Sep 02 '22 20:09 usingh83

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 231 insertions(+)) Terraform Beta: Diff ( 3 files changed, 231 insertions(+)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

modular-magician avatar Sep 02 '22 22:09 modular-magician

Tests analytics

Total tests: 2157 Passed tests 1916 Skipped tests: 235 Failed tests: 6

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccSqlDatabaseInstance_SqlServerAuditConfig

modular-magician avatar Sep 02 '22 23:09 modular-magician

Tests passed during RECORDING mode: TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[Debug log]

Tests failed during RECORDING mode: TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log] TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log] TestAccComputeGlobalForwardingRule_internalLoadBalancing[Error message] [Debug log] TestAccCloudRunService_cloudRunServiceStaticOutboundExample[Error message] [Debug log] TestAccSqlDatabaseInstance_SqlServerAuditConfig[Error message] [Debug log]

Please fix these to complete your PR View the build log or the debug log for each test

modular-magician avatar Sep 03 '22 00:09 modular-magician

Are you able to run the TestAccSqlUser_mysqlDisabled locally and see it pass? I'm seeing a diff after apply during the test run that seems to be caused by the flatten not working correctly

Solved it, sorry for the delay, it took me a while to figure this one out.

usingh83 avatar Sep 03 '22 00:09 usingh83

Running this test locally still fails. Have you been able to test this resource locally?

          # google_sql_user.user2 will be updated in-place
          ~ resource "google_sql_user" "user2" {
                id       = "admin/gmail.com/i-8532336729755310092"
                name     = "admin"
                # (4 unchanged attributes hidden)

              ~ password_policy {
                  ~ enable_password_verification = false -> true
                    # (3 unchanged attributes hidden)

                  ~ status {
                      ~ locked                   = false -> true
                      ~ password_expiration_time = "2022-10-03T00:14:56Z" -> "2023-07-23T04:06:22.114-07:00"
                    }
                }
            }

Hi slevenick, sorry for the late response, I was having a lot of problems with the definitions of some of the fields. I have clarified the fields and found that the status block above is going to be a read only block. I have made changes for the same. The tests are passing for me in my local now.

usingh83 avatar Sep 17 '22 06:09 usingh83

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 221 insertions(+)) Terraform Beta: Diff ( 3 files changed, 221 insertions(+)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

modular-magician avatar Sep 17 '22 07:09 modular-magician

Tests analytics

Total tests: 2175 Passed tests 1932 Skipped tests: 239 Failed tests: 4

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccSqlUser_mysqlDisabled|TestAccFirebaserulesRelease_BasicRelease

modular-magician avatar Sep 17 '22 08:09 modular-magician

Tests passed during RECORDING mode: TestAccFirebaserulesRelease_BasicRelease[Debug log]

Tests failed during RECORDING mode: TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log] TestAccCGCSnippet_eventarcWorkflowsExample[Error message] [Debug log] TestAccSqlUser_mysqlDisabled[Error message] [Debug log]

Please fix these to complete your PR View the build log or the debug log for each test

modular-magician avatar Sep 17 '22 08:09 modular-magician

Running this test locally still fails. Have you been able to test this resource locally?

          # google_sql_user.user2 will be updated in-place
          ~ resource "google_sql_user" "user2" {
                id       = "admin/gmail.com/i-8532336729755310092"
                name     = "admin"
                # (4 unchanged attributes hidden)

              ~ password_policy {
                  ~ enable_password_verification = false -> true
                    # (3 unchanged attributes hidden)

                  ~ status {
                      ~ locked                   = false -> true
                      ~ password_expiration_time = "2022-10-03T00:14:56Z" -> "2023-07-23T04:06:22.114-07:00"
                    }
                }
            }

Hi slevenick, sorry for the late response, I was having a lot of problems with the definitions of some of the fields. I have clarified the fields and found that the status block above is going to be a read only block. I have made changes for the same. The tests are passing for me in my local now.

Please wait with the review, i am trying to see why TestAccSqlUser_mysqlDisabled is failing.

usingh83 avatar Sep 18 '22 05:09 usingh83

Running this test locally still fails. Have you been able to test this resource locally?

          # google_sql_user.user2 will be updated in-place
          ~ resource "google_sql_user" "user2" {
                id       = "admin/gmail.com/i-8532336729755310092"
                name     = "admin"
                # (4 unchanged attributes hidden)

              ~ password_policy {
                  ~ enable_password_verification = false -> true
                    # (3 unchanged attributes hidden)

                  ~ status {
                      ~ locked                   = false -> true
                      ~ password_expiration_time = "2022-10-03T00:14:56Z" -> "2023-07-23T04:06:22.114-07:00"
                    }
                }
            }

Hi slevenick, sorry for the late response, I was having a lot of problems with the definitions of some of the fields. I have clarified the fields and found that the status block above is going to be a read only block. I have made changes for the same. The tests are passing for me in my local now.

Please wait with the review, i am trying to see why TestAccSqlUser_mysqlDisabled is failing.

Ok now TestAccSqlUser_mysqlDisabled is passing. Don't know why modular-magician did not run.

usingh83 avatar Sep 19 '22 04:09 usingh83

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 220 insertions(+), 1 deletion(-)) Terraform Beta: Diff ( 3 files changed, 220 insertions(+), 1 deletion(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

modular-magician avatar Sep 19 '22 04:09 modular-magician

The provider crashed while running the VCR tests in REPLAYING mode Please fix it to complete your PR View the build log

modular-magician avatar Sep 19 '22 05:09 modular-magician

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 222 insertions(+), 1 deletion(-)) Terraform Beta: Diff ( 3 files changed, 222 insertions(+), 1 deletion(-)) TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

modular-magician avatar Sep 19 '22 05:09 modular-magician

Tests analytics

Total tests: 2175 Passed tests 1933 Skipped tests: 239 Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample

modular-magician avatar Sep 19 '22 06:09 modular-magician