sourcegraph/dev/managedservicesplatform/internal/stack
James Cotter 8c9e114549
msp: add monitoring stack (#58816)
Adds GCP Monitoring Alert Policies for Cloud Run Services, Cloud Run Jobs and, if enabled, Cloud Redis
2023-12-13 19:40:57 +00:00
..
cloudrun msp: add monitoring stack (#58816) 2023-12-13 19:40:57 +00:00
iam msp/iam: provison secret access for external secrets (#58909) 2023-12-12 15:51:12 -08:00
monitoring msp: add monitoring stack (#58816) 2023-12-13 19:40:57 +00:00
options dev/msp: extract resolved image tag to tfvars, add stable generate mode (#58180) 2023-11-08 09:40:39 -08:00
project dev/msp: add CloudSQL integration (#58420) 2023-11-22 15:32:53 -08:00
BUILD.bazel dev/msp: extract resolved image tag to tfvars, add stable generate mode (#58180) 2023-11-08 09:40:39 -08:00
README.md dev/msp: add explicit outputs to stack workspaces (#58165) 2023-11-07 14:02:02 -08:00
stacks_test.go dev/msp: extract resolved image tag to tfvars, add stable generate mode (#58180) 2023-11-08 09:40:39 -08:00
stacks.go dev/msp: fix custom role ID, update resourceid with warnings (#58239) 2023-11-09 10:06:21 -08:00

CDKTF stacks

A stack is a fully composed set of CDKTF resources that maps to a Terraform workspace. A set of stacks composes a CDKTF application.

Each stack package must declare the following interface:

import (
  "github.com/sourcegraph/sourcegraph/dev/managedservicesplatform/internal/stack"
  "github.com/sourcegraph/sourcegraph/dev/managedservicesplatform/internal/stack/options/googleprovider"
)

// CrossStackOutput allows programatic access to stack outputs across stacks.
// For human reference outputs, use (stack.ExplicitStackOutputs).Add(...)
type CrossStackOutput struct {}

type Variables struct {}

const StackName = "..."

func NewStack(stacks *stack.Set, vars Variables) (*CrossStackOutput, error) {
  stack, outputs := stacks.New(StackName,
    googleprovider.With(vars.ProjectID),
    // ... other stack-wide options
  )

  // ...
}