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
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"
- Update version and add source in
provider.tf
- Go to
/generated/squadcast/<RESOURCE>/<REGION>/provider.tf
- Add
source = "SquadcastHub/squadcast"
to squadcast insiderequired_providers
- Update
version
inrequired_providers
by removing.exe
(Windows users only)
- Go to
- Update
terraform_version
cd /generated/squadcast/<RESOURCE>/<REGION>
terraform state replace-provider -auto-approve "registry.terraform.io/-/squadcast" "SquadcastHub/squadcast"
terraform {
required_providers {
squadcast = {
version = "~> 2.0.1"
source = "SquadcastHub/squadcast"
}
}
}
-
--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
- Required for the following resources:
-
--region
- Supported Values:
us
eu
- Supported Values:
-
--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
- Supported for the following resources:
-
--refresh-token
(optional)- Supported Values:
- <YOUR_SQUADCAST_REFRESH_TOKEN>
- Supported Values:
deduplication_rules
deduplication_rule_v2
escalation_policy
routing_rules
routing_rule_v2
runbook
service
slo
squad
suppression_rules
suppression_rule_v2
tagging_rules
tagging_rule_v2
team
team_member
team_roles
user
webforms
status_pages
status_page_components
status_page_groups
global_event_rules
schedules_v2