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

Warning: redundant ignore_changes element (maintenance_schedule) #166

Closed
gservat opened this issue Sep 25, 2023 · 2 comments · Fixed by #195
Closed

Warning: redundant ignore_changes element (maintenance_schedule) #166

gservat opened this issue Sep 25, 2023 · 2 comments · Fixed by #195
Labels
bug Something isn't working

Comments

@gservat
Copy link

gservat commented Sep 25, 2023

TL;DR

I keep seeing this warning:

│ Warning: Redundant ignore_changes element
│ 
│   on .terraform/modules/pcloud.redis/main.tf line 17, in resource "google_redis_instance" "default":
│   17: resource "google_redis_instance" "default" {
│ 
│ Adding an attribute name to ignore_changes tells Terraform to ignore future
│ changes to the argument in configuration after the object has been created,
│ retaining the value originally configured.
│ 
│ The attribute maintenance_schedule is decided by the provider alone and
│ therefore there can be no configured value to compare with. Including this
│ attribute in ignore_changes has no effect. Remove the attribute from
│ ignore_changes to quiet this warning.

Seems like the ignore_changes lifecycle change was added in #152, however soon after there was a provider change that marked maintenance_schedule as output only (hashicorp/terraform-provider-google#15063).

So can we remove the ignore_changes setting now?

Expected behavior

No warning shown.

Observed behavior

Warning about the redundant ignore_changes element shown.

Terraform Configuration

module "redis" {
  source  = "terraform-google-modules/memorystore/google"
  version = "7.1.2"

  name           = "redis"
  tier           = var.memorystore_tier
  memory_size_gb = var.memorystore_memory_size_gb

  project = var.gcp_project_id
  region  = var.gcp_region

  authorized_network = var.memorystore_authorized_network

  redis_version = var.memorystore_redis_version
  redis_configs = var.memorystore_redis_configs
}

Terraform Version

1.5.7

Additional information

No response

@aprettyloner
Copy link

Also getting this on Terraform v1.5.5

image
module "redis_instance" {
  source  = "terraform-google-modules/memorystore/google"
  version = "7.1.3" # https://github.com/terraform-google-modules/terraform-google-memorystore/releases

  auth_enabled            = var.auth_enabled
  authorized_network      = var.authorized_network_id
  connect_mode            = var.connect_mode
  display_name            = var.display_name
  enable_apis             = var.enable_apis
  labels                  = var.labels
  location_id             = var.location_id
  maintenance_policy      = var.maintenance_policy
  memory_size_gb          = var.memory_size_gb
  name                    = var.name
  persistence_config      = var.persistence_config
  project                 = var.project
  read_replicas_mode      = var.read_replicas_mode
  redis_configs           = var.redis_configs
  redis_version           = var.redis_version
  region                  = var.region
  replica_count           = var.replica_count
  tier                    = var.tier
  transit_encryption_mode = var.transit_encryption_mode
}

Copy link

github-actions bot commented Jan 2, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants