Skip to content

Latest commit

 

History

History
143 lines (113 loc) · 5.58 KB

squadcast.md

File metadata and controls

143 lines (113 loc) · 5.58 KB

Use with Squadcast

Syntax:

export SQUADCAST_REFRESH_TOKEN=<YOUR_SQUADCAST_REFRESH_TOKEN>

OR

Add --refresh-token flag in cmd

terraformer import squadcast --resources=<SERVICE_NAMES> --region=SQUADCAST_REGION

Examples:

  • Import Resource by providing refresh-token as a flag
terraformer import squadcast --resources=team --region=us --team-name="Default Team" --refresh-token=YOUR_REFRESH_TOKEN
  • Import User Resource
terraformer import squadcast --resources=user --region=us --team-name="Defualt Team"
  • Import Squad Resource
terraformer import squadcast --resources=team --region=us --team-name="Default Team"
  • Import Deduplication Rules Resource (without --service-name flag)
    • Deduplication Rules for all the services under Default Team will be generated.
terraformer import squadcast --resources=deduplication_rules --region=us --team-name="Default Team"
  • Import Deduplication Rules Resource
    • Deduplication Rules only for Example Service will be generated.
terraformer import squadcast --resources=deduplication_rules --region=us --team-name="Default Team" --service-name="Example Service"

In order to use terraform files:

  • Update version and add source in provider.tf
    • Go to /generated/squadcast/<RESOURCE>/<REGION>/provider.tf
    • Add source = "SquadcastHub/squadcast" to squadcast inside required_providers
    • Update version in required_providers by removing .exe (Windows users only)
  • Update terraform_version
    • cd /generated/squadcast/<RESOURCE>/<REGION>
    • terraform state replace-provider -auto-approve "registry.terraform.io/-/squadcast" "SquadcastHub/squadcast"

Example:

terraform {
    required_providers {
        squadcast = {
            version = "~> 2.0.1"
            source = "SquadcastHub/squadcast"
        }
    }
}

Flags:

  • --team-name

    • Required for the following resources:
      • deduplication_rules
      • escalation_policy
      • routing_rules
      • runbook
      • service
      • slo
      • squad
      • suppression_rules
      • tagging_rules
      • team_member
      • team_roles
      • user
      • webform
      • schedules_v2
      • global_event_rules
      • status_pages
      • status_page_components
      • status_page_groups
  • --region

    • Supported Values:
      • us
      • eu
  • --service-name (optional)

    • Supported for the following resources:
      • deduplication_rules
      • routing_rules
      • suppression_rules
      • tagging_rules
      • deduplication_rules_v2
      • routing_rules_v2
      • suppression_rules_v2
      • tagging_rules_v2
    • If service name is not provided, resources for specified automation rule for all the service within the specified team will be generated. However it will only generate for a specific service when this flag is used. see examples
  • --refresh-token (optional)

    • Supported Values:
      • <YOUR_SQUADCAST_REFRESH_TOKEN>

Supported resources: