@gambi97/keel-cli 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ terraform {
2
+ required_providers {
3
+ scaleway = {
4
+ source = "scaleway/scaleway"
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,20 @@
1
+ output "container_url" {
2
+ description = "Auto-generated Scaleway URL of the deployed container (null until an image is deployed)."
3
+ value = module.app_stack.container_url
4
+ }
5
+
6
+ output "registry_endpoint" {
7
+ description = "Container Registry endpoint to push application images to."
8
+ value = module.app_stack.registry_endpoint
9
+ }
10
+
11
+ output "database_url" {
12
+ description = "Ready-to-use Postgres connection string (dedicated least-privilege IAM credential)."
13
+ value = module.app_stack.database_url
14
+ sensitive = true
15
+ }
16
+
17
+ output "container_namespace_id" {
18
+ description = "Scaleway Containers namespace ID."
19
+ value = module.app_stack.container_namespace_id
20
+ }
@@ -0,0 +1,7 @@
1
+ # Non-sensitive production configuration. Safe to commit.
2
+ project_name = "__PROJECT_NAME__"
3
+ region = "__REGION__"
4
+ environment = "prod"
5
+ enable_basic_auth = false
6
+ min_scale = __PROD_MIN_SCALE__
7
+ max_scale = __PROD_MAX_SCALE__
@@ -0,0 +1,16 @@
1
+ # Scaleway credentials are read from the environment:
2
+ # SCW_ACCESS_KEY, SCW_SECRET_KEY, SCW_DEFAULT_PROJECT_ID, SCW_DEFAULT_ORGANIZATION_ID
3
+ provider "scaleway" {
4
+ region = var.region
5
+ }
6
+
7
+ provider "infisical" {
8
+ host = var.infisical_host
9
+
10
+ auth = {
11
+ universal = {
12
+ client_id = var.infisical_client_id
13
+ client_secret = var.infisical_client_secret
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,7 @@
1
+ # Non-sensitive staging configuration. Safe to commit.
2
+ project_name = "__PROJECT_NAME__"
3
+ region = "__REGION__"
4
+ environment = "staging"
5
+ enable_basic_auth = true
6
+ min_scale = __STAGING_MIN_SCALE__
7
+ max_scale = __STAGING_MAX_SCALE__
@@ -0,0 +1,96 @@
1
+ variable "project_name" {
2
+ description = "Project name, used as prefix for every resource."
3
+ type = string
4
+ }
5
+
6
+ variable "region" {
7
+ description = "Scaleway region."
8
+ type = string
9
+ }
10
+
11
+ variable "environment" {
12
+ description = "Deployment environment. Must match the Terraform workspace and the Infisical environment slug."
13
+ type = string
14
+
15
+ validation {
16
+ condition = contains(["staging", "prod"], var.environment)
17
+ error_message = "environment must be either \"staging\" or \"prod\"."
18
+ }
19
+ }
20
+
21
+ variable "container_image" {
22
+ description = "Full registry image to deploy (e.g. rg.fr-par.scw.cloud/ns/app:tag). Leave empty to provision everything except the container."
23
+ type = string
24
+ default = ""
25
+ }
26
+
27
+ variable "container_port" {
28
+ description = "Port the application listens on."
29
+ type = number
30
+ default = 8080
31
+ }
32
+
33
+ variable "cpu_limit" {
34
+ description = "Container CPU limit in mvCPU."
35
+ type = number
36
+ default = 500
37
+ }
38
+
39
+ variable "memory_limit" {
40
+ description = "Container memory limit in MB."
41
+ type = number
42
+ default = 1024
43
+ }
44
+
45
+ variable "min_scale" {
46
+ description = "Minimum number of container instances."
47
+ type = number
48
+ default = 0
49
+ }
50
+
51
+ variable "max_scale" {
52
+ description = "Maximum number of container instances."
53
+ type = number
54
+ default = 2
55
+ }
56
+
57
+ variable "db_min_cpu" {
58
+ description = "Serverless SQL Database minimum CPU."
59
+ type = number
60
+ default = 0
61
+ }
62
+
63
+ variable "db_max_cpu" {
64
+ description = "Serverless SQL Database maximum CPU."
65
+ type = number
66
+ default = 4
67
+ }
68
+
69
+ variable "enable_basic_auth" {
70
+ description = "When true, the container gets BASIC_AUTH_ENABLED=true and the app is expected to enforce Basic Auth using credentials stored in Infisical."
71
+ type = bool
72
+ default = false
73
+ }
74
+
75
+ variable "infisical_host" {
76
+ description = "Infisical instance URL."
77
+ type = string
78
+ default = "https://app.infisical.com"
79
+ }
80
+
81
+ variable "infisical_project_id" {
82
+ description = "Infisical project (workspace) ID holding the application secrets."
83
+ type = string
84
+ }
85
+
86
+ variable "infisical_client_id" {
87
+ description = "Infisical machine identity client ID (Universal Auth)."
88
+ type = string
89
+ sensitive = true
90
+ }
91
+
92
+ variable "infisical_client_secret" {
93
+ description = "Infisical machine identity client secret (Universal Auth)."
94
+ type = string
95
+ sensitive = true
96
+ }
@@ -0,0 +1,15 @@
1
+ terraform {
2
+ # 1.10+ is required for S3-native state locking (use_lockfile).
3
+ required_version = ">= 1.10.0"
4
+
5
+ required_providers {
6
+ scaleway = {
7
+ source = "scaleway/scaleway"
8
+ version = "~> 2.0"
9
+ }
10
+ infisical = {
11
+ source = "infisical/infisical"
12
+ version = "~> 0.15"
13
+ }
14
+ }
15
+ }