Giter Site home page Giter Site logo

Comments (4)

techspeque avatar techspeque commented on August 10, 2024 1

@Bharathkumarraju Instead of ID for the password you need to use:

${random_password.db_password.result}

from terraform-provider-random.

Bharathkumarraju avatar Bharathkumarraju commented on August 10, 2024

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.

Bharathkumarraju avatar Bharathkumarraju commented on August 10, 2024

Thanks @techspeque worked!!!

from terraform-provider-random.

github-actions avatar github-actions commented on August 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.