Skip to content

When expanding the plan for XXX to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/google" produced an invalid new value for #21837

Open
@Maarc-D

Description

@Maarc-D

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 a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Terraform Version & Provider Version(s)

Terraform v1.10.5
on

  • provider registry.terraform.io/hashicorp/google v6.24.0
  • provider registry.terraform.io/hashicorp/google-beta v6.24.0

Affected Resource(s)

  • google_compute_forwarding_rule
  • google_dns_managed_zone

Terraform Configuration

module call :

module "gsn-consumer" {
  source     = "git::https://XXX.git?ref=2.0.0"
  apis       = module.service-agents.apis
  subnetwork = google_compute_subnetwork.gsn
  project    = local.project_id
  psc-filter-urls = local.gsn-services-to-consume
}

resource "google_compute_subnetwork" "gsn" {
  name                     = lower(replace("subnet-gsn-${local.application_service_prefix}-${var.project}-${terraform.workspace}", "_", "-"))
  ip_cidr_range            = local.gsn_address_space
  region                   = local.gsn-region-selected
  network                  = google_compute_network.this.id
  private_ip_google_access = true
}

concerned module code :

resource "google_compute_forwarding_rule" "this" {
  for_each                = google_compute_address.psc_ilb_consumer_address
  name                    = local.gsn-sa-map[each.key].name
  region                  = var.subnetwork.region
  project                 = var.project
  load_balancing_scheme   = "" # need to override EXTERNAL default when target is a service attachment
  network                 = var.subnetwork.network
  allow_psc_global_access = true
  subnetwork              = var.subnetwork.id
  target                  = local.gsn-sa-map[each.key].id
  ip_address              = each.value.id
}

Debug Output

No response

Expected Behavior

everything running good

Actual Behavior

│ Error: Provider produced inconsistent final plan
│ 
│ When expanding the plan for
│ module.gsn-consumer.google_compute_forwarding_rule.this["kcp.giservices.io"]
│ to include new values learned so far during apply, provider
│ "registry.terraform.io/hashicorp/google" produced an invalid new value for
│ .network: was
│ cty.StringVal("projects/che-pass-ci-dev/global/networks/vpc-pass-ci-dev-passci-dev"),
│ but now
│ cty.StringVal("https://www.googleapis.com/compute/v1/projects/che-pass-ci-dev/global/networks/vpc-pass-ci-dev-passci-dev").
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.


│ Error: Provider produced inconsistent final plan

│ When expanding the plan for
│ module.gsn-consumer.google_dns_managed_zone.gsn-psc["sonarqube.kazan.myworldline.com"]
│ to include new values learned so far during apply, provider
│ "registry.terraform.io/hashicorp/google" produced an invalid new value for
│ .private_visibility_config[0].networks: planned set element
│ cty.ObjectVal(map[string]cty.Value{"network_url":cty.StringVal("projects/che-pass-ci-dev/global/networks/vpc-pass-ci-dev-passci-dev")})
│ does not correlate with any element in actual.

│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵

Steps to reproduce

  1. terraform apply

Important Factoids

No response

References

No response

b/413059323
b/413060293

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions