-
Notifications
You must be signed in to change notification settings - Fork 118
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
Random_string Override special Issue #325
Comments
Hi @rishabhjain1510 👋 Would it be possible for you to show the (redacted if necessary) current state of that particular resource? e.g. $ terraform state show random_string.password Thanks |
Hi @bendbennett , Here is the state. module.rds-instance-pp-3hdhqno7z4jzo.random_string.password:resource "random_string" "password" { |
@rishabhjain1510 looking at your output from The state also indicates that the configuration for resource "random_string" "password" {
length = 12
min_lower = 1
min_numeric = 1
min_special = 0
min_upper = 1
special = false
} I tried to reproduce the issue you describe by using terraform state show random_string.password
# random_string.password:
resource "random_string" "password" {
id = "tcHyjh5Fuzqi"
length = 12
lower = true
min_lower = 1
min_numeric = 1
min_special = 0
min_upper = 1
number = true
result = "tcHyjh5Fuzqi"
special = false
upper = true
} I then updated to resource "random_string" "password" {
length = 12
min_lower = 1
min_numeric = 1
min_upper = 1
min_special = 1
special = true
override_special = "!#$%&*()-_=+[]{}<>:?"
} Running Terraform will perform the following actions:
# random_string.password must be replaced
-/+ resource "random_string" "password" {
~ id = "tcHyjh5Fuzqi" -> (known after apply)
~ min_special = 0 -> 1 # forces replacement
+ override_special = "!#$%&*()-_=+[]{}<>:?" # forces replacement
~ result = "tcHyjh5Fuzqi" -> (known after apply)
~ special = false -> true # forces replacement
# (8 unchanged attributes hidden)
}
Plan: 1 to add, 0 to change, 1 to destroy. I was unable to reproduce the issue you describe where |
Hi @bendbennett , Thanks for update, to re-produce the error you can use the below code resource "random_string" "password" { |
Hi @rishabhjain1510, If I run through the process I described in #325 (comment) and then update the configuration as you describe prior to running resource "random_string" "password" {
length = 12
min_lower = 1
min_numeric = 1
min_upper = 1
min_special = 1
special = true
override_special = "!#$%&*()-_=+[]{}<>:?"
lifecycle {
ignore_changes = all
}
} random_string.password: Refreshing state... [id=tcHyjh5Fuzqi]
No changes. Your infrastructure matches the configuration. |
@rishabhjain1510 I'm going to close this issue as I'm unable to reproduce the issue you describe and there's been no further feedback. If you are still experiencing problems please file another issue and if possible supply the necessary configuration to reproduce the issue. Thanks. |
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. |
Terraform CLI and Provider Versions
Terraform Version : - v0.13.6
Provider version :- 3.75.1
Random Provider version:- v3.4.3
Terraform Configuration
provider "aws" {
version = "~> 3.75.1"
region = var.region
assume_role {
role_arn = var.role_arn
session_name = "Opticloud_Provisioner"
external_id = "Opticloud"
}
}
Expected Behavior
It should create a password , with all the properties specified .
Actual Behavior
terraform plan throws an error .
Provider "registry.terraform.io/hashicorp/random" planned an invalid value for
module.aurora-pp-26cmbjo6oyplk.random_string.password.override_special:
planned value cty.NullVal(cty.String) does not match config value
cty.StringVal("!#$%&*()-_=+[]{}<>:?").
Steps to Reproduce
terraform plan
How much impact is this issue causing?
High
Logs
https://gist.github.com/rishabhjain1510/65c279d1d2c0149208e109b66fcce29f
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: