Apply for invite to IaCP

scalr_current_run

Important

Only avaible in Scalr IaCP remote backend workspaces

This data source allows you to get information about the current Terraform run, including VCS (Git) metadata.

Syntax

data scalr_current_run example {
}

Arguments

No arguments required. This data source returns details of the current run.

Attributes

Attribute

Description

id

The ID of the run in run-xxxxxxxxxxx format.

is_destroy

Boolean indicates if this is a “destroy” run.

is_dry

Boolean indicates if this is a dry run, i.e. triggered by a Pull Request (PR). No apply phase if this is true.

message

The last commit message to the linked VCS repo.

source

TBD

vcs

Contains details of the VCS configuration if the workspace is linked to a VCS repo.

     branch

The linked VCS repo branch.

     commit

Details of the last commit to the linked VCS repo.

          author

Details of the commit author.

               email

email_address of author in the VCS.

               name

Name of author in the VCS.

               username

Username of author in the VCS.

          message

Message for the last commit.

          sha

SHA of the last commit.

     repository_id

ID of the VCS repo in the for :user/:repo.

workspace

Details of the workspace.

     auto_apply

Shows (true/false) if terrafrom apply should autimatically run when terraform plan ends without error.

     name

Name of the workspace.

     working_directory

If set shows the sub-directory that Terraform will run in.