Runtime Setup Terraform

Here's the complete file we needed to write to setup the Sym Runtime.

terraform {
  required_version = ">= 0.14"
  required_providers {
    sym = {
      source = "terraform.symops.com/symopsio/sym"
      version = "0.1"
    }
  }
}

provider "sym" {
  org = "healthy-health"
}

# The resources in this configuration are all provisioned into an environment
# keyed off of the local.environment variable. More complex Terraform
# configurations can parameterize the environment so you can manage Sym
# resources using your SDLC.
locals {
  environment = "prod"
}

# The runtime environment where your workflows execute.
# This runtime will write audit logs to an S3 bucket managed by you, so
# that you can ship those logs to places like Splunk.
#
# This runtime is hosted by Sym, but you can also choose to self-host your
# runtime while still using the centralized Sym control plane. You can also
# tune the permissions that each runtime has when required.
resource "sym_runtime" "this" {
  name = local.environment

  settings = {
    log_bucket = "log-bucket-shared-to-sym"
    log_prefix = "/sym/${local.environment}"
  }
}

# Declare the Slack app that your workflows will use.
# When you install the Slack app, you'll be prompted for 
# the ID of this sym_integration.
resource "sym_integration" "slack" {
  type = "slack"
  name = local.environment
}

# Output the Slack integration_id for use in `symflow add-to-slack`
output "slack_integration_id" {
  description = "Slack Integration ID"
  value       = sym_integration.slack.id
}

Did this page help you?