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

Filestore instance constantly re-creating due to the network 'name' #11956

Assignees
Labels
bug forward/review In review; remove label to forward service/filestore

Comments

@kamal-shaker
Copy link

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.

Terraform Version

% terraform -v
Terraform v1.2.3
on darwin_amd64

Affected Resource(s)

  • google_filestore_instance

Terraform Configuration Files

provider "google" {
project = "gcp-dev"
}

resource "google_compute_network" "vpc" {
name = "app-name-vpc"
auto_create_subnetworks = false
}

resource "google_compute_subnetwork" "network" {
name = "app-name-network"
ip_cidr_range = "172.160.0.0/24"
region = "australia-southeast1"
network = google_compute_network.vpc.id
}

resource "google_filestore_instance" "filestore" {
name = "app-name-filestore"
location = "australia-southeast1-a"
tier = "STANDARD"

file_shares {
capacity_gb = 1024
name = "salt_master"
}

networks {
network = google_compute_network.vpc.id
modes = ["MODE_IPV4"]
connect_mode = "DIRECT_PEERING"
reserved_ip_range = "172.16.255.0/29"
}
}

# Copy-paste your Terraform configurations here.
#
# For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file.
# For security, you can also encrypt the files using our GPG public key:
#    https://www.hashicorp.com/security
#
# If reproducing the bug involves modifying the config file (e.g., apply a config,
# change a value, apply the config again, see the bug), then please include both:
# * the version of the config before the change, and
# * the version of the config after the change.

Debug Output

Panic Output

Expected Behavior

There should be no updates happening.

Actual Behavior

The filestore resource is constantly recreated.

Steps to Reproduce

  1. put the code above in a file
  2. terraform apply -auto-approve
  3. 'terraform apply -auto-approve`
  4. 'terraform apply -auto-approve`

It just constantly re-creates the file store. It seems as in the network name is incorrect:

  # google_filestore_instance.filestore must be replaced
-/+ resource "google_filestore_instance" "filestore" {
      ~ create_time = "2022-06-27T10:34:42.068149395Z" -> (known after apply)
      + etag        = (known after apply)
      ~ id          = "projects/gcp-dev/locations/australia-southeast1-a/instances/app-name-filestore" -> (known after apply)
      - labels      = {} -> null
        name        = "app-name-filestore"
      ~ project     = "dev" -> (known after apply)
      + zone        = (known after apply)
        # (2 unchanged attributes hidden)


      ~ networks {
          ~ ip_addresses      = [
              - "172.16.255.2",
            ] -> (known after apply)
          ~ network           = "app-name-vpc" -> "projects/gcp-dev/global/networks/app-name-vpc" # forces replacement
            # (3 unchanged attributes hidden)
        }

I can post the full output if you like.

Important Factoids

References

  • #0000
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2022
@github-actions github-actions bot added service/filestore forward/review In review; remove label to forward labels Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.