Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions database-monitoring/terraform/.module.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[module]
name = "aws-elastio-database-monitoring-agent"
version = "0.1.0"

description = "Terraform module that runs the Elastio database monitoring agent on AWS Fargate"
type = "terraform"
209 changes: 209 additions & 0 deletions database-monitoring/terraform/README.md

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions database-monitoring/terraform/examples/basic/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions database-monitoring/terraform/examples/basic/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module "elastio_database_monitoring_agent" {
source = "../../"

name = "orders-db-prod"
server_url = var.elastio_server_url
api_key = var.elastio_api_key
database_url = var.database_url

subnet_ids = var.subnet_ids
security_group_ids = var.security_group_ids

# The smallest size, and the default. Raise both when the Elastio UI says a
# transaction was too large for the agent to hold; see Sizing in the
# module's README.
task_cpu = 256
task_memory = 512
}
31 changes: 31 additions & 0 deletions database-monitoring/terraform/examples/basic/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
variable "elastio_server_url" {
description = "URL of your Elastio tenant. For example `https://mycompany.app.elastio.com`"
type = string
nullable = false
}

variable "elastio_api_key" {
description = "Agent API key shown by the Elastio Portal when you add the database"
sensitive = true
type = string
nullable = false
}

variable "database_url" {
description = "postgres:// URL of the database to watch, for the role created by the setup SQL"
sensitive = true
type = string
nullable = false
}

variable "subnet_ids" {
description = "Subnets the agent runs in. They must reach the database and the Elastio tenant"
type = list(string)
nullable = false
}

variable "security_group_ids" {
description = "Security groups attached to the agent. They need outbound 443 and 2049"
type = list(string)
nullable = false
}
3 changes: 3 additions & 0 deletions database-monitoring/terraform/examples/basic/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = "~> 1.9"
}
Loading
Loading