Skip to content
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

Add DMS MigrationJob resource #11604

Merged
merged 17 commits into from
Sep 16, 2024

Conversation

owaismawasy
Copy link
Contributor

Add the DMS resource MigrationJob to the Terraform Google provider.

`google_database_migration_service_migration_job`

@github-actions github-actions bot requested a review from rileykarson September 2, 2024 06:29
Copy link

github-actions bot commented Sep 2, 2024

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

@rileykarson, 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 ( 5 files changed, 2449 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 5 files changed, 2449 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 339 insertions(+))
Open in Cloud Shell: Diff ( 12 files changed, 612 insertions(+))

Missing test report

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

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

resource "google_database_migration_service_migration_job" "primary" {
  dump_path = # value needed
  reverse_ssh_connectivity {
    vm      = # value needed
    vm_ip   = # value needed
    vm_port = # value needed
    vpc     = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 11
Passed tests: 8
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • databasemigrationservice

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobMysqlToMysqlExample
  • TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToAlloydbExample
  • TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToPostgresExample

Get to know how VCR tests work

@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 ( 5 files changed, 2449 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 5 files changed, 2449 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 339 insertions(+))
Open in Cloud Shell: Diff ( 12 files changed, 612 insertions(+))

Missing test report

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

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

resource "google_database_migration_service_migration_job" "primary" {
  dump_path = # value needed
  reverse_ssh_connectivity {
    vm      = # value needed
    vm_ip   = # value needed
    vm_port = # value needed
    vpc     = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 11
Passed tests: 8
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • databasemigrationservice

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobMysqlToMysqlExample
  • TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToAlloydbExample
  • TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToPostgresExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobMysqlToMysqlExample[Debug log]
TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToAlloydbExample[Debug log]
TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToPostgresExample[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobMysqlToMysqlExample[Debug log]
TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToAlloydbExample[Debug log]
TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToPostgresExample[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$

View the build log or the debug log for each test

Copy link

github-actions bot commented Sep 5, 2024

@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

]
base_url: 'projects/{{project}}/locations/{{location}}/migrationJobs'
create_url: 'projects/{{project}}/locations/{{location}}/migrationJobs?migrationJobId={{migration_job_id}}'
update_verb: :PATCH
Copy link
Member

Choose a reason for hiding this comment

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

Can you add update test(s) for the resource? https://googlecloudplatform.github.io/magic-modules/develop/test/test/#add-an-update-test

See comment below confirming the mutability of some fields, we generally want to cover every updatable field in at least one test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

- !ruby/object:Api::Type::String
name: 'vm'
description: |
he name of the virtual machine (Compute Engine) used as the bastion server
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
he name of the virtual machine (Compute Engine) used as the bastion server
The name of the virtual machine (Compute Engine) used as the bastion server

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

- !ruby/object:Api::Type::NestedObject
name: 'staticIpConnectivity'
description: |
static ip connectivity data (default, no additional details needed).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
static ip connectivity data (default, no additional details needed).
If set to an empty object (`{}`), the source database will allow incoming connections from the public IP of the destination database. You can retrieve the public IP of the Cloud SQL instance from the Cloud SQL console or using Cloud SQL APIs.

Text from https://cloud.google.com/database-migration/docs/reference/rest/v1/StaticIpConnectivity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

}
static_ip_connectivity {
}
source = "projects/${data.google_project.project.project_id}/locations/us-central1/connectionProfiles/<%= ctx[:vars]["source_cp"] %>"
Copy link
Member

Choose a reason for hiding this comment

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

Here + other connection profile URLs, can we use a reference to their id field? That would also allow removing the depends_on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@github-actions github-actions bot requested a review from rileykarson September 9, 2024 13:15
@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 ( 6 files changed, 2680 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 2680 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 339 insertions(+))
Open in Cloud Shell: Diff ( 12 files changed, 609 insertions(+))

Missing test report

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

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

resource "google_database_migration_service_migration_job" "primary" {
  dump_path = # value needed
  reverse_ssh_connectivity {
    vm      = # value needed
    vm_ip   = # value needed
    vm_port = # value needed
    vpc     = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 11
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • databasemigrationservice

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccDatabaseMigrationServiceMigrationJob_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDatabaseMigrationServiceMigrationJob_update[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$

View the build log or the debug log for each test

@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 ( 6 files changed, 2680 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 2680 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 339 insertions(+))
Open in Cloud Shell: Diff ( 12 files changed, 609 insertions(+))

Missing test report

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

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

resource "google_database_migration_service_migration_job" "primary" {
  dump_path = # value needed
  reverse_ssh_connectivity {
    vm      = # value needed
    vm_ip   = # value needed
    vm_port = # value needed
    vpc     = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 12
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • databasemigrationservice

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

Copy link

@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link

@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@rileykarson
Copy link
Member

LGTM, thanks!

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