Comments (4)
@Bharathkumarraju Instead of ID for the password you need to use:
${random_password.db_password.result}
from terraform-provider-random.
When i use random_string
it is showing password as below..
code
resource "random_string" "db_password" {
length = 16
special = true
override_special = "!#()-[]<>"
}
resource "aws_db_instance" "bharaths_mysql" {
instance_class = "db.t2.micro"
identifier_prefix = "bharaths-terraform-up-and-running"
engine = "mysql"
allocated_storage = 10
name = "bharaths_example_database"
username = "bharath_admin"
skip_final_snapshot = true
apply_immediately = true
password = random_string.db_password.result
lifecycle {
ignore_changes = ["password"]
}
}
output
random_string.db_password: Creating...
random_string.db_password: Creation complete after 0s [id=Z29ZTNntBzwfjeAg]
aws_db_instance.bharaths_mysql: Creating...
aws_db_instance.bharaths_mysql: Still creating... [10s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [20s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [30s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [40s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [50s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [1m0s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [1m10s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [1m20s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [1m30s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [1m41s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [1m51s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [2m1s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [2m11s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [2m21s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [2m31s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [2m41s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [2m51s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [3m1s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [3m11s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [3m21s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [3m31s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [3m41s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [3m51s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [4m1s elapsed]
aws_db_instance.bharaths_mysql: Still creating... [4m11s elapsed]
aws_db_instance.bharaths_mysql: Creation complete after 4m14s [id=bharaths-terraform-up-and-running20190822061908468900000001]
Apply complete! Resources: 2 added, 0 changed, 1 destroyed.
Releasing state lock. This may take a few moments...
Bharaths-MacBook-Pro:mysql bharathdasaraju$
from terraform-provider-random.
Thanks @techspeque worked!!!
from terraform-provider-random.
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.
from terraform-provider-random.
Related Issues (20)
- Documentation: random_shuffle output is already list HOT 2
- random_pet generating non unique names
- Update Go Module to Go 1.20 Minimum HOT 1
- tyring to upgrade azurerm version but getting below error. HOT 3
- Ambiguous wording in docs on the parameters for RandomPassword, eg "numeric = true" can still generate a password without numerics.
- Resource 'snowflake_grant_privileges_to_role' marks 'priveleges' attribute as changed regardless of any changes being made HOT 2
- random_shuffle need to add position 0 of an array to return 1 single result string HOT 2
- Support UUIDv7
- Enable password cannot have more than 2 repeated characters
- Feature Request: random IP from CIDR range HOT 4
- Feature Request: Random Date HOT 2
- `random_bytes` resource does not explicitly mention being "sufficiently random for cryptographic use HOT 2
- `random_bytes` resource does not explicitly mention being "sufficiently random for cryptographic use" HOT 2
- Improve documentation HOT 2
- Adjust Go Module Address
- Panic on `random_string` when all properties set to `false` HOT 3
- After importing random_string, special flag is changed HOT 2
- Importing a random password using an import block outputs a sensitive value during apply. HOT 1
- `provider::random::string()` function HOT 2
- Add word/profanity filter for random_pet HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-random.