scalr_hook

Resource: scalr_hook

Manages a hook in Scalr. Hooks allow you to execute custom scripts at different stages of the Terraform workflow.

Example Usage

resource "scalr_hook" "example" {
  name            = "hook-test"
  description     = "Hook description"
  interpreter     = "bash"
  scriptfile_path = "root.sh"
  vcs_provider_id = "vcs-xxxxx"
  vcs_repo {
    identifier = "TestRepo/example"
    branch     = "main"
  }
}

Schema

Required

  • interpreter (String) The interpreter to execute the hook script, such as 'bash', 'python3', etc.
  • name (String) Name of the hook.
  • scriptfile_path (String) Path to the script file in the repository.
  • vcs_provider_id (String) ID of the VCS provider in the format vcs-<RANDOM STRING>.

Optional

  • description (String) Description of the hook.
  • vcs_repo (Block List) Source configuration of a VCS repository. (see below for nested schema)

Read-Only

  • id (String) The ID of the hook.

Nested Schema for vcs_repo

Required:

  • identifier (String) The identifier of a VCS repository in the format :org/:repo.

Optional:

  • branch (String) Repository branch name.

Import

Import is supported using the following syntax:

terraform import scalr_hook.example hook-xxxxxxxxxx