Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
Adding examples directory and LICENSE file
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjosh committed Dec 31, 2020
1 parent 583f8c8 commit 6113914
Show file tree
Hide file tree
Showing 4 changed files with 214 additions and 0 deletions.
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2021 Alireza Josheghani

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

11 changes: 11 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Casty module examples
Configuration in this directory creates casty helm-chart deployments on kubernetes!

## Usage
To run this example you need to execute:

```bash
$ terraform init
$ terraform plan
$ terraform apply
```
20 changes: 20 additions & 0 deletions examples/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module "casty" {
source = "github.com/CastyLab/terraform-module-casty?ref=0.0.1"
cdn = var.cdn
object_storage = var.object_storage
dashboard = var.dashboard
api = var.api
gateway = var.gateway
grpc = var.grpc
oauth_google_secret = var.oauth_google_secret
oauth_spotify_secret = var.oauth_spotify_secret
oauth_discord_secret = var.oauth_discord_secret
mongodb = var.mongodb
redis = var.redis
tls_email = var.tls_email
cloudflare = var.cloudflare
hcaptcha_secret = var.hcaptcha_secret
storageClass = var.storageClass
ingressController = var.ingressController
}

161 changes: 161 additions & 0 deletions examples/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
variable "storageClass" {
type = string
description = "Kubernetes storageClass name"
}

variable "ingressController" {
type = string
description = "Ingress controller"
}

variable "tls_email" {
type = string
description = "Tls email"
}

variable "cloudflare" {
type = object({
email = string
token = string
})
description = "Cloudflare Secrets"
sensitive = true
}

variable "hcaptcha_secret" {
type = string
description = "Hcaptcha secret"
sensitive = true
}

variable "object_storage" {
type = object({
endpoint = string
access_key = string
secret_key = string
})
default = {
endpoint = "minio.minio.svc.cluster.local:9000"
access_key = ""
secret_key = ""
}
description = "ObjectStorage Configurations"
sensitive = true
}

variable "cdn" {
type = object({
env = string
imageTag = string
debug = bool
domain_name = string
sentry_dsn = string
tls_enabled = bool
tls_caServer = string
})
description = "CDN server Configurations"
}

variable "dashboard" {
type = object({
domain_name = string
imageTag = string
tls_enabled = bool
tls_caServer = string
})
description = "Dashboard Configurations"
}

variable "api" {
type = object({
env = string
imageTag = string
debug = bool
domain_name = string
access_control_allow_origin = string
sentry_dsn = string
tls_enabled = bool
tls_caServer = string
})
description = "ApiServer Configurations"
}

variable "gateway" {
type = object({
env = string
imageTag = string
debug = string
user_gateway_domain = string
theater_gateway_domain = string
sentry_dsn = string
tls_enabled = bool
tls_caServer = string
})
description = "GatewayServer Configurations"
}

variable "grpc" {
type = object({
env = string
imageTag = string
debug = bool
sentry_dsn = string
access_token_secret = string
refresh_token_secret = string
})
description = "GrpcServer Configurations"
sensitive = true
}

variable "oauth_google_secret" {
type = object({
client_id = string
client_secret = string
project_id = string
redirect_uri = string
})
description = "Google oauth configiguration"
sensitive = true
}

variable "oauth_spotify_secret" {
type = object({
client_id = string
client_secret = string
redirect_uri = string
})
description = "Spotify oauth configiguration"
sensitive = true
}

variable "oauth_discord_secret" {
type = object({
client_id = string
client_secret = string
redirect_uri = string
})
description = "Discord oauth configiguration"
sensitive = true
}

variable "redis" {
type = object({
auth_enabled = bool
password = string
masterName = string
})
description = "Redis config"
sensitive = true
}

variable "mongodb" {
type = object({
auth_enabled = bool
root_password = string
username = string
password = string
database = string
})
description = "Mongodb config"
sensitive = true
}

0 comments on commit 6113914

Please sign in to comment.