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 disk.provisioned_iops to compute_instance_template #8528

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

roaks3
Copy link
Contributor

@roaks3 roaks3 commented Aug 2, 2023

Fixes hashicorp/terraform-provider-google#14858

This allows provisioned_iops to be set on a disk directly within a compute_instance_template, instead of needing to specify it on a separate disk resource.

Since they reuse the same functions, I also updated compute_region_instance_template to include this field, which seems like an appropriate change anyway.

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

  • 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).
  • 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).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

compute: added `disk.provisioned_iops` to `google_compute_instance_template`
compute: added `disk.provisioned_iops` to `google_compute_region_instance_template`

@roaks3 roaks3 force-pushed the add-instance-template-provisioned-iops branch 3 times, most recently from 1fb24f6 to 86f8786 Compare August 3, 2023 13:40
@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.

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

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{The provider crashed while running the VCR tests in REPLAYING mode}}$
$\textcolor{red}{\textsf{Please fix it to complete your PR}}$
View the build log

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

Terraform GA: Diff ( 2 files changed, 62 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 4 files changed, 117 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2926
Passed tests 2622
Skipped tests: 302
Affected tests: 2

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccComputeRegionInstanceTemplate_diskIops|TestAccComputeInstanceTemplate_diskIops

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

$\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

@roaks3
Copy link
Contributor Author

roaks3 commented Aug 4, 2023

Note for the reviewer: I found a diskCharacteristics struct being used in the instance template resource that I believe serves as a key for the disks, and ensures they are not reordered to produce a diff. I wasn't sure if provisioned_iops should be added there, so I've left it out of the PR, but it could use a second set of eyes.

@roaks3
Copy link
Contributor Author

roaks3 commented Aug 14, 2023

Per conversation with the team, I've added the new field to diskCharacteristics

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

Terraform GA: Diff ( 2 files changed, 75 insertions(+), 6 deletions(-))
Terraform Beta: Diff ( 4 files changed, 130 insertions(+), 6 deletions(-))
TF Conversion: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

Missing test report

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

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

resource "google_compute_instance_template" "primary" {
  disk {
    provisioned_iops = # value needed
  }
}

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

resource "google_compute_region_instance_template" "primary" {
  disk {
    provisioned_iops = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2951
Passed tests 2645
Skipped tests: 302
Affected tests: 4

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccBigQueryDataTable_bigtable|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample|TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccBigQueryDataTable_bigtable[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\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

@roaks3 roaks3 force-pushed the add-instance-template-provisioned-iops branch from 834bba5 to 869a193 Compare August 14, 2023 20:15
@roaks3 roaks3 requested review from a team and trodge and removed request for a team August 14, 2023 20: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.

Terraform GA: Diff ( 2 files changed, 75 insertions(+), 6 deletions(-))
Terraform Beta: Diff ( 4 files changed, 130 insertions(+), 6 deletions(-))

Missing test report

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

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

resource "google_compute_instance_template" "primary" {
  disk {
    provisioned_iops = # value needed
  }
}

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

resource "google_compute_region_instance_template" "primary" {
  disk {
    provisioned_iops = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2951
Passed tests 2649
Skipped tests: 302
Affected tests: 0

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

@roaks3 roaks3 merged commit 10168f5 into main Aug 15, 2023
8 checks passed
@roaks3 roaks3 deleted the add-instance-template-provisioned-iops branch August 15, 2023 15:17
nevzheng pushed a commit to nevzheng/magic-modules that referenced this pull request Aug 16, 2023
…atform#8528)

* Add disk.provisioned_iops to compute_instance_template

* Add to region template as well

* Add provisioned_iops to disk characteristics that are used for array ordering
ron-gal pushed a commit to ron-gal/magic-modules that referenced this pull request Aug 17, 2023
…atform#8528)

* Add disk.provisioned_iops to compute_instance_template

* Add to region template as well

* Add provisioned_iops to disk characteristics that are used for array ordering
rainshen49 pushed a commit to rainshen49/magic-modules that referenced this pull request Aug 21, 2023
…atform#8528)

* Add disk.provisioned_iops to compute_instance_template

* Add to region template as well

* Add provisioned_iops to disk characteristics that are used for array ordering
joelkattapuram pushed a commit to joelkattapuram/magic-modules that referenced this pull request Sep 20, 2023
…atform#8528)

* Add disk.provisioned_iops to compute_instance_template

* Add to region template as well

* Add provisioned_iops to disk characteristics that are used for array ordering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants