scalr_environment_hook
Resource: scalr_environment_hook
Manages the link between a hook and an environment in Scalr. This allows you to attach hooks to specific environments for execution during the Terraform workflow.
Example Usage
resource "scalr_environment_hook" "test_link" {
hook_id = "hook-xxxxx"
environment_id = "env-xxxxx"
events = ["pre-init", "post-apply"]
}
resource "scalr_environment_hook" "test_link_all" {
hook_id = "hook-xxxxx"
environment_id = "env-xxxxx"
events = ["*"]
}
Schema
Required
environment_id
(String) ID of the environment, in the formatenv-<RANDOM STRING>
.events
(Set of String) Set of events that trigger the hook execution. Valid values include:pre-init
,pre-plan
,post-plan
,pre-apply
,post-apply
. Use["*"]
to select all events.hook_id
(String) ID of the hook, in the formathook-<RANDOM STRING>
.
Read-Only
id
(String) The ID of this resource.
Import
Import is supported using the following syntax:
terraform import scalr_environment_hook.example hkenv-xxxxxxxxxx
Updated about 23 hours ago