-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gridscale_mysql resource example
- Loading branch information
1 parent
3680839
commit 2a55541
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# MySQL Example | ||
|
||
This example shows how you can manage a MySQL with Terraform using the `"gridscale_mysql"` resource. | ||
|
||
Before you run Terraform, you need to set the `GRIDSCALE_TOKEN` and `GRIDSCALE_UUID` environment variables to their appropriate values. Take a look at the `.envrc` file for all variables. | ||
|
||
## Example | ||
|
||
In this example we will provision 2 MySQL resources: | ||
- The first one is a simple MySQL resource without any MySQL parameters. | ||
- The second one is a MySQL resourece with some MySQL parameters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
terraform { | ||
required_providers { | ||
gridscale = { | ||
source = "gridscale/gridscale" | ||
version = "~> 1.11.0" | ||
} | ||
} | ||
} | ||
|
||
resource "gridscale_mysql" "my-mysql" { | ||
name = "my new mysql" | ||
release = "5.7" | ||
performance_class = "insane" | ||
} | ||
|
||
resource "gridscale_mysql" "mysql-with-params" { | ||
name = "my mysql with params" | ||
release = "10.5" | ||
performance_class = "insane" | ||
labels = ["test"] | ||
mysql_query_cache_limit = "2M" | ||
mysql_default_time_zone = "Europe/Berlin" | ||
mysql_server_id = 2 | ||
mysql_binlog_format = "MIXED" | ||
} |