Skip to content

Instantly share code, notes, and snippets.

@petoju
Created November 14, 2022 21:41
Show Gist options
  • Save petoju/5c64ed802e9cd155326e954ba0fc588d to your computer and use it in GitHub Desktop.
Save petoju/5c64ed802e9cd155326e954ba0fc588d to your computer and use it in GitHub Desktop.
$ ./terraform apply
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# mysql_database.app will be created
+ resource "mysql_database" "app" {
+ default_character_set = "utf8mb4"
+ default_collation = "utf8mb4_general_ci"
+ id = (known after apply)
+ name = "databasename"
}
# mysql_grant.this will be created
+ resource "mysql_grant" "this" {
+ database = "databasename"
+ grant = false
+ host = "%"
+ id = (known after apply)
+ privileges = [
+ "SELECT",
]
+ table = "*"
+ tls_option = "NONE"
+ user = "dbusername"
}
# mysql_user.user will be created
+ resource "mysql_user" "user" {
+ host = "%"
+ id = (known after apply)
+ plaintext_password = (sensitive value)
+ tls_option = "NONE"
+ user = "dbusername"
}
Plan: 3 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
mysql_database.app: Creating...
mysql_user.user: Creating...
mysql_user.user: Creation complete after 0s [id=dbusername@%]
mysql_database.app: Creation complete after 0s [id=databasename]
mysql_grant.this: Creating...
mysql_grant.this: Creation complete after 0s [id=dbusername@%:`databasename`]
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment