Skip to content

Commit

Permalink
Add Redis resources' examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nvthongswansea authored Jun 22, 2021
1 parent 2a55541 commit d929edb
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
11 changes: 11 additions & 0 deletions redis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Redis Example

This example shows how you can manage a Redis store/cache with Terraform using the `"gridscale_redis_store"` and `"gridscale_redis_cache"` resources.

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 Redis resources:
- The first one is a Redis store resource.
- The second one is a Redis cache resource.
20 changes: 20 additions & 0 deletions redis/redis.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
terraform {
required_providers {
gridscale = {
source = "gridscale/gridscale"
version = "~> 1.11.0"
}
}
}

resource "gridscale_redis_store" "terra-redis-store-test" {
name = "my redis store"
release = "5.0"
performance_class = "insane"
}

resource "gridscale_redis_cache" "terra-redis-cache-test" {
name = "my redis cache"
release = "5.0"
performance_class = "insane"
}

0 comments on commit d929edb

Please sign in to comment.