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

aws_elasticache_subnet_group.default[0] will be created even if we pass elasticache_subnet_group_name #78

Open
flightlesstux opened this issue May 7, 2024 · 0 comments
Labels
bug 🐛 An issue with the system

Comments

@flightlesstux
Copy link
Contributor

Describe the Bug

aws_elasticache_subnet_group.default[0] will be created even if we pass elasticache_subnet_group_name

Expected Behavior

If we pass elasticache_subnet_group_name, the aws_elasticache_subnet_group.default[0] won't be created anymore

Steps to Reproduce

Just pass the vpc elasticache subnet group name as a variable.

Screenshots

  # aws_elasticache_cluster.default[0] will be created
  + resource "aws_elasticache_cluster" "default" {
      + apply_immediately            = true
      + arn                          = (known after apply)
      + auto_minor_version_upgrade   = "true"
      + availability_zone            = (known after apply)
      + az_mode                      = "single-az"
      + cache_nodes                  = (known after apply)
      + cluster_address              = (known after apply)
      + cluster_id                   = "dev-memcached"
      + configuration_endpoint       = (known after apply)
      + engine                       = "memcached"
      + engine_version               = "1.6.22"
      + engine_version_actual        = (known after apply)
      + id                           = (known after apply)
      + ip_discovery                 = (known after apply)
      + maintenance_window           = "wed:03:00-wed:04:00"
      + network_type                 = (known after apply)
      + node_type                    = "cache.t4g.micro"
      + num_cache_nodes              = 1
      + parameter_group_name         = "dev-memcached"
      + port                         = 11211
      + preferred_availability_zones = [
          + "eu-central-1a",
        ]
      + preferred_outpost_arn        = (known after apply)
      + replication_group_id         = (known after apply)
      + security_group_ids           = [
          + "sg-xxx",
        ]
      + snapshot_window              = (known after apply)
      + subnet_group_name            = "dev-vpc"
      + tags                         = {
          + "Environment" = "dev"
          + "Name"        = "dev-memcached"
        }
      + tags_all                     = {
          + "Environment"  = "dev"
          + "Name"         = "dev-memcached"
          + "map-migrated" = "xxx"
          + "terraform"    = "true"
        }
      + transit_encryption_enabled   = false
    }

  # aws_elasticache_subnet_group.default[0] will be created
  + resource "aws_elasticache_subnet_group" "default" {
      + arn         = (known after apply)
      + description = "Managed by Terraform"
      + id          = (known after apply)
      + name        = "dev-memcached"
      + subnet_ids  = [
          + "subnet-xxx",
          + "subnet-xxx",
          + "subnet-xxx",
        ]
      + tags_all    = {
          + "map-migrated" = "xxx"
          + "terraform"    = "true"
        }
      + vpc_id      = (known after apply)
    }

Environment

  • OS: devops-infra/aws-latest docker image on any kind of host
  • Module version: 0.19.2
  • OpenTofu: 1.7.0
  • Terragrunt: 0.58.2

Additional Context

If you approve quickly, I'll open a PR ASAP. The solution is easy.

@flightlesstux flightlesstux added the bug 🐛 An issue with the system label May 7, 2024
flightlesstux added a commit to flightlesstux/terraform-aws-elasticache-memcached that referenced this issue May 7, 2024
gberenice added a commit that referenced this issue May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant