terraform-aws-modules / terraform-aws-rds

Terraform module to create AWS RDS resources πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/rds/aws
Apache License 2.0
886 stars 1.34k forks source link

Only lowercase alphanumeric characters and hyphens allowed in "name" field of db_option_group #552

Closed EdenReuveniRivery closed 3 months ago

EdenReuveniRivery commented 5 months ago

Description

I am importing an RDS instance created using AWS defaults. The option group name given by default is: "default:mysql-8-0".

When I try to import this resource, and align my configuration to reflect it, I get the following error: "Only lowercase alphanumeric characters and hyphens allowed in "name"" (field of db_option_group)

Versions

Terraform v1.8.3 on darwin_arm64

Reproduction Code [Required]

terragrunt.hcl

include { path = find_in_parent_folders() }

terraform { source = "git::https://github.com/terraform-aws-modules/terraform-aws-rds.git?ref=v6.5.4" }

locals {

Automatically load environment-level variables

environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl")) env = local.environment_vars.locals.environment region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl")) region = local.region_vars.locals.aws_region env_region = local.region_vars.locals.env_region

This instances variables to inject to module

name = "${basename(get_terragrunt_dir())}" }

inputs = { identifier = "${basename(get_terragrunt_dir())}"

engine = "mysql" engine_version = "8.0.35" family = "mysql8.0" # DB parameter group major_engine_version = "8.0" # DB option group
instance_class = "db.t3.micro" skip_final_snapshot = true replicas = [] allocated_storage = 20 max_allocated_storage = 1000

option_group_name = "default:mysql-8-0" parameter_group_name = "db-mysql-8-ssl" option_group_description = "Default option group for mysql 8.0" parameter_group_description = "mysql 8 ssl" parameter_group_use_name_prefix = false option_group_use_name_prefix = false

db_name = "" username = "admin" manage_master_user_password = false db_listener_endpoint = [] db_instance_hosted_zone_id = "Z2XHWR1WZ565X2" copy_tags_to_snapshot = true password = null port = 3306

REPLACE VPC to your own

vpc = "vpc-0b92394f2997d1899"

REPLACE VPC SG to your own

vpc_security_group_ids = ["sg-0e251743b94b67fd7"]

publicly_accessible = true }

Steps to reproduce the behavior:

Run terragrunt apply in a folder with the supplied terragrunt.hcl file.

Expected behavior

This module should accept any valid name the AWS API will accept, and not impose further restrictions.

Actual behavior

The module imposes using only lowercase alphanumeric characters even though the default name includes a ':'.

Terminal Output Screenshot(s)

image

Additional context

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 3 months ago

This issue was automatically closed because of stale in 10 days

EdenReuveniRivery commented 3 months ago

Didn't get an answer here

bryantbiggs commented 3 months ago

answered here https://github.com/terraform-aws-modules/terraform-aws-rds/issues/557#issuecomment-2241206172

github-actions[bot] commented 2 months ago

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.