profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/gmile/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Eugene Pirogov gmile @contractbook Kyiv The signals are strong tonight.

gmile/everyelixirvideo.page 23

Page with all @elixir-lang conference videos ever published

gmile/algo 0

Set up a personal VPN in the cloud

gmile/aports 0

Mirror of aports repository

gmile/brew 0

🍺 The missing package manager for macOS (or Linux)

gmile/bundler 0

Manage your Ruby application's gem dependencies

startedcheat-engine/cheat-engine

started time in 26 minutes

startedsjvermeu/cvechecker

started time in 2 days

startedevryfs/github-actions-runner-operator

started time in 2 days

startedanderspitman/awesome-tunneling

started time in 3 days

startedFinancial-Times/structured-google-docs-client

started time in 3 days

pull request commenthexpm/bob

update alpine version to 3.13.6 and 3.14.2

Anything I could help with to get alpine 3.14.2 out? 🙏

baseballlover723

comment created time in 3 days

startedgolang/go

started time in 5 days

startedalexlouden/Terraform.tmLanguage

started time in 6 days

startedmvisonneau/terraform-provider-updown

started time in 7 days

startedshuaibiyy/awesome-terraform

started time in 7 days

startedgaia-app/gaia

started time in 7 days

starteddatreeio/datree

started time in 12 days

startednrkno/terraform-provider-lastpass

started time in 12 days

startedinspec/inspec-gcp

started time in 14 days

issue commenthashicorp/terraform-provider-google

google_compute_network: auto_create_subnetworks = {true -> false} causes resource re-creation

Does changing auto_create_subnetworks change the type of the network?

I don't believe changing auto_create_subnetworks impacts the type (legacy vs non-legacy) of the network either.

As I understand it that field controls the type (legacy vs non-legacy) of the network being created.

This aligns with my thinking as well. As I understand, it's the presence (null vs not null) of the value that controls the type of network: as long as the value is non-empty, e.g. it's either true or false, the network is VPC (e.g. non-legacy).

To sum up a bit:

  • for the network to be VPC (e.g. non-legacy) the value of auto_create_subnetworks has to be non-empty, either true or false (it's set true by default for this resource),
  • changing the value from true to false should be not interpreted as operation forcing recreation of network resource,
  • changing the value from false to true is not allowed by Google Cloud API, and shall force recreation of network resource.
gmile

comment created time in 14 days

issue commenthashicorp/terraform-provider-google

google_compute_network: auto_create_subnetworks = {true -> false} causes resource re-creation

Terraform detects a diff and correctly forces a recreation

Right, current behaviour is understandable.

I'm challenging whether this behaviour can be adjusted to match that of Google Cloud API. Google Cloud Console, will let switch network's auto_create_subnetworks from true to false without forcing network re-creation. Question is, could google_compute_network resource possibly be made similarly "tolerant" to the change and update the resource in-place?

For completeness, the behaviour according to Google Cloud:

  • changing auto_create_subnetworks from true to false will update the network in-place,
  • changing auto_create_subnetworks from false back to true is not possible.

Currently I work around this issue like this:

  • go to Google Cloud console,
  • find the network, change its auto_create_subnetworks value from true to false from the UI,
  • run terraform apply -refresh-only to pick up out-of-band change above,
  • update google_compute_network resource definition to have auto_create_subnetworks = false.

After this sequence, running terraform apply won't be noticing any changes.

gmile

comment created time in 15 days

issue openedhashicorp/terraform-provider-google

google_compute_network: auto_create_subnetworks = {true -> false} causes resource re-creation

<!--- Please keep this note for the community --->

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

<!--- Thank you for keeping this note for the community --->

Terraform Version

Terraform v1.0.5

<details> <summary>More</summary>

on darwin_amd64
+ provider registry.terraform.io/cloudflare/cloudflare v2.21.0
+ provider registry.terraform.io/cyrilgdn/postgresql v1.13.0
+ provider registry.terraform.io/hashicorp/google v3.71.0
+ provider registry.terraform.io/hashicorp/helm v2.1.2
+ provider registry.terraform.io/hashicorp/kubernetes v2.3.1
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/integrations/github v4.11.0
+ provider registry.terraform.io/louy/uptimerobot v0.5.1
+ provider registry.terraform.io/rjpearson94/twilio v0.11.0
+ provider registry.terraform.io/trois-six/sendgrid v0.1.6

Your version of Terraform is out of date! The latest version
is 1.0.6. You can update by downloading from https://www.terraform.io/downloads.html

</details>

Affected Resource(s)

  • google_compute_network

Terraform Configuration Files

resource "google_compute_network" "my_network" {
  name = "my-network"
}

Debug Output

None.

Panic Output

None.

Expected Behavior

Changing from:

resource "google_compute_network" "my_network" {
  name = "my-network"
}

...to:

resource "google_compute_network" "my_network" {
  name = "my-network"
  auto_create_subnetworks = false
}

...does not trigger re-creation of network (as well as dependent resources), similarly to how Google Cloud console UI handles checking off the flag.

Actual Behavior

Changing from:

resource "google_compute_network" "my_network" {
  name = "my-network"
}

...to:

resource "google_compute_network" "my_network" {
  name = "my-network"
  auto_create_subnetworks = false
}

...triggers re-creation of network (as well as dependent resources).

Steps to Reproduce

  1. define a new network:

    resource "google_compute_network" "my_network" {
      name = "my-network"
    }
    
  2. run: terraform apply

  3. update network resource definition:

    resource "google_compute_network" "my_network" {
      name = "my-network"
      auto_create_subnetworks = true
    }
    
  4. Observe recreation of resource in plan.

Important Factoids

None.

References

  • changing this fields currently forces creation of a new network, see: https://github.com/hashicorp/terraform-provider-google/blob/ae256439801b117f63742afd9743336a793e5c99/google/resource_compute_network.go#L59-L70

created time in 15 days

startedsupabase/supabase

started time in 15 days

startedkubernetes-sigs/kubefed

started time in 16 days

startedbillchurch/webssh2

started time in 16 days

startedGoogleCloudPlatform/gke-networking-demos

started time in 17 days

startedhaskellcamargo/sclack

started time in 17 days

startedwritethedocs/www

started time in 17 days

startedietf-wg-jsonpath/draft-ietf-jsonpath-base

started time in 17 days

startedmithrandie/csvq

started time in 17 days

startedmgdm/htmlq

started time in 18 days

startedLingDong-/fishdraw

started time in 18 days

startedgoogle/go-cloud

started time in 18 days

started1Password/terraform-provider-onepassword

started time in 19 days

startedigorbrigadir/twitter-advanced-search

started time in 19 days