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 support of storage pool on boot disk. #11230

Merged

Conversation

sizzle0121
Copy link
Contributor

Add storage_pool to the boot_disk of google_compute_instance resource to support creating boot disk with the storage pool specified.
Since the storage pool is not a resource in the terraform provider (due to some security concern, please reference #10793), it's only a URL string.

Release Note Template for Downstream PRs (will be copied)

compute: added `storage_pool` under `boot_disk.initialize_params` to `google_compute_instance` resource

@github-actions github-actions bot requested a review from trodge July 23, 2024 00:09
Copy link

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

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

Missing test report

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

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

resource "google_compute_instance" "primary" {
  boot_disk {
    initialize_params {
      labels = # value needed
    }
  }
}

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

resource "google_compute_instance_from_machine_image" "primary" {
  boot_disk {
    initialize_params {
      storage_pool = # value needed
    }
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  boot_disk {
    initialize_params {
      enable_confidential_compute = # value needed
      image                       = # value needed
      labels                      = # value needed
      provisioned_iops            = # value needed
      provisioned_throughput      = # value needed
      resource_manager_tags       = # value needed
      size                        = # value needed
      storage_pool                = # value needed
      type                        = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 974
Passed tests: 897
Skipped tests: 74
Affected tests: 3

Click here to see the affected service packages
  • compute

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
  • TestAccComputeDisk_storagePoolSpecified
  • TestAccComputeInstance_bootDisk_storagePoolSpecified
  • TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccComputeInstance_bootDisk_storagePoolSpecified[Error message] [Debug log]

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@sizzle0121 sizzle0121 force-pushed the add-storage-pool-to-boot-disk branch from 56d8f78 to d2af5fa Compare July 23, 2024 01:13
@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 ( 3 files changed, 119 insertions(+))
google-beta provider: Diff ( 3 files changed, 119 insertions(+))

Missing test report

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

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

resource "google_compute_instance" "primary" {
  boot_disk {
    initialize_params {
      labels = # value needed
    }
  }
}

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

resource "google_compute_instance_from_machine_image" "primary" {
  boot_disk {
    initialize_params {
      storage_pool = # value needed
    }
  }
}

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

resource "google_compute_instance_from_template" "primary" {
  boot_disk {
    initialize_params {
      enable_confidential_compute = # value needed
      image                       = # value needed
      labels                      = # value needed
      provisioned_iops            = # value needed
      provisioned_throughput      = # value needed
      resource_manager_tags       = # value needed
      size                        = # value needed
      storage_pool                = # value needed
      type                        = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 974
Passed tests: 899
Skipped tests: 74
Affected tests: 1

Click here to see the affected service packages
  • compute

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
  • TestAccComputeInstance_bootDisk_storagePoolSpecified

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeInstance_bootDisk_storagePoolSpecified[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

@sizzle0121
Copy link
Contributor Author

Hi @trodge, we already have different test cases for the fields it mentioned, and the one I added I also added a test for it and made sure it passes, please review, thanks!

@trodge trodge merged commit a91e512 into GoogleCloudPlatform:main Jul 23, 2024
13 checks passed
EZIOJQ pushed a commit to EZIOJQ/magic-modules that referenced this pull request Jul 24, 2024
abd-goog pushed a commit to abd-goog/magic-modules that referenced this pull request Jul 30, 2024
Charlesleonius pushed a commit to Charlesleonius/magic-modules that referenced this pull request Aug 1, 2024
BBBmau pushed a commit to bschaatsbergen/magic-modules that referenced this pull request Aug 21, 2024
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