-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Compute - Add update support for Network IP when changing network/subnetwork #4030
Compute - Add update support for Network IP when changing network/subnetwork #4030
Conversation
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149271" |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149271" |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149271" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly suggestions
third_party/terraform/tests/resource_compute_instance_test.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
also cc @ndmckinley who at one point was looking into what it would take to generate instance- nathan, not sure if you ran into trying to update network interfaces yet but there's a lot of different cases that require different handling, and the new update method won't help in this case (https://cloud.google.com/compute/docs/instances/update-instance-properties#updatable-properties) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed some issues. Refactored code
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/tests/resource_compute_instance_test.go.erb
Outdated
Show resolved
Hide resolved
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149477" |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149480" |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=149481" |
I've made changes now to extrapolate functions when there is either code reuse or to avoid the creation of an inline function. I'm rather happy with this result. These should be the changes that in essence are the pure functionality improvements. I've scrapped the refactor and the concept of network interface helper. Thanks for your time and assistance here! |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 5 files changed, 303 insertions(+), 60 deletions(-)) |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151409" |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccProviderMeta_setModuleName You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151411" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting there! Most of my comments are pretty small at this point, and sorry again for the back-and-forth on the structure/refactoring part.
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/tests/resource_compute_instance_test.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/tests/resource_compute_instance_test.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/utils/compute_instance_network_interface_helpers.go
Outdated
Show resolved
Hide resolved
third_party/terraform/utils/compute_instance_network_interface_helpers.go
Show resolved
Hide resolved
third_party/terraform/utils/compute_instance_network_interface_helpers.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved formatting and comment concerns
third_party/terraform/utils/compute_instance_network_interface_helpers.go
Show resolved
Hide resolved
third_party/terraform/tests/resource_compute_instance_test.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/resources/resource_compute_instance.go.erb
Outdated
Show resolved
Hide resolved
third_party/terraform/utils/compute_instance_network_interface_helpers.go
Outdated
Show resolved
Hide resolved
No worries ! I learned a lot between these refactors. I appreciate your dedication to getting things right and not just getting them in. |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 5 files changed, 331 insertions(+), 80 deletions(-)) |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151424" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming tests pass!
…comment friends. Truly truly a beautiful site to behold. Please be well and safe comment because the world needs you. YOU TOO are important
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 5 files changed, 326 insertions(+), 74 deletions(-)) |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151427" |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 5 files changed, 326 insertions(+), 74 deletions(-)) |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151459" |
…-modules into compute_instance_network_ip
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 5 files changed, 326 insertions(+), 74 deletions(-)) |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151763" |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 5 files changed, 304 insertions(+), 54 deletions(-)) |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151775" |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceGoogleSQLCaCerts_basic|TestAccDataSourceSqlDatabaseInstance_basic|TestAccProviderMeta_setModuleName|TestAccCloudRunService_cloudRunServiceSqlExample|TestAccProjectServiceIdentity_basic|TestAccSQLDatabase_sqlDatabaseBasicExample You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=151781" |
Compute - add support for changing network ip when moving network/subnetwork only
Fixed a scenario where changes access configs at the same time as network could result in an incompatible accessconfig being applied with the previous subnetwork.
Closes 7118
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)