Skip to content

Commit

Permalink
Merge pull request #106 from Scalr/run-triggers
Browse files Browse the repository at this point in the history
updated CHANGELOG
  • Loading branch information
rtfee authored Jan 21, 2022
2 parents 2edc29a + f1d50f2 commit 7d3dec2
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.0.0-rc26] - 2022-01-21

### Changed
- **New resource:** `scalr_run_triggers` ([#102](https://github.com/Scalr/terraform-provider-scalr/pull/102))
- `data.scalr_environment`: allow to obtain scalr_environment by name ([#101](https://github.com/Scalr/terraform-provider-scalr/pull/101))
- `data.scalr_environment`: `id` become optional ([#101](https://github.com/Scalr/terraform-provider-scalr/pull/101))
- `data.scalr_environment`: added new optional attribute `name` ([#101](https://github.com/Scalr/terraform-provider-scalr/pull/101))
- `data.scalr_environment`: added new optional attribute `account_id` ([#101](https://github.com/Scalr/terraform-provider-scalr/pull/101))

### Required

- scalr-server >= `8.9.0`

## [1.0.0-rc25] - 2021-11-24

### Changed

- `data.scalr_role`: argument `account_id` is optional now ([#97](https://github.com/Scalr/terraform-provider-scalr/pull/97))
Expand Down Expand Up @@ -360,7 +368,8 @@ Requires Scalr 8.0.1-beta.20200625 at least

- Initial release.

[Unreleased]: https://github.com/Scalr/terraform-provider-scalr/compare/v1.0.0-rc25...HEAD
[Unreleased]: https://github.com/Scalr/terraform-provider-scalr/compare/v1.0.0-rc26...HEAD
[1.0.0-rc26]: https://github.com/Scalr/terraform-provider-scalr/releases/tag/v1.0.0-rc26
[1.0.0-rc25]: https://github.com/Scalr/terraform-provider-scalr/releases/tag/v1.0.0-rc25
[1.0.0-rc24]: https://github.com/Scalr/terraform-provider-scalr/releases/tag/v1.0.0-rc24
[1.0.0-rc23]: https://github.com/Scalr/terraform-provider-scalr/releases/tag/v1.0.0-rc23
Expand Down
4 changes: 3 additions & 1 deletion docs/data-sources/scalr_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ This data source is used to retrieve details of a an environment.

```hcl
data "scalr_environment" "test" {
id = "env-xxxxxxxxxx"
id = "env-xxxxxxxxxx" # optional, can only use id or name for the environment filter, if both are used there will be a conflict.
account_id = "acc-xxxxxxxx" # mandatory if user has access to few accounts and environment name is not unique
name = "environment-name" # optional, can only use id or name for the environment filter, if both are used there will be a conflict.
}
```

Expand Down
55 changes: 55 additions & 0 deletions docs/resources/scalr_run_triggers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
layout: "scalr"
page_title: "Scalr: scalr_run_trigger"
sidebar_current: "docs-resource-scalr-run-trigger"
description: |-
Manages vcs provider.
---

# scalr_vcs_provider Resource

Run triggers are a way to chain workspaces together.
The use case for this is that you might have one or more upstream workspaces that need to automatically kick off a downstream workspace based on a successful run in the upstream workspace.
To set a trigger, go to the downstream workspace and set the upstream workspace(s).
Now, whenever the upstream workspace has a successful run, the downstream workspace will automatically start a run.

## Example Usage

Basic usage:

```hcl
data "scalr_workspace" "downstream" {
name = "downstream"
environment_id = "env-xxxxxxxxx"
}
data "scalr_workspace" "upstream" {
name = "upstream"
environment_id = "env-xxxxxxxxx"
}
resource "scalr_run_trigger" "set_downstream" {
downstream_id = data.scalr_workspace.downstream.id # run automatically triggered in this workspace once the run in the upstream workspace is applied
upstream_id = data.scalr_workspace.upstream.id
}
```

## Argument Reference

* `downstream_id` - (Required) The identifier of the workspace in which new runs will be triggered.
* `upstream_id` (Required) The identifier of the upstream workspace.


## Attribute Reference

All arguments plus:

* `id` - The identifier of the created trigger

## Import

To import existing run trigger use its identifier. For example:
```shell
terraform import scalr_run_trigger.set_downstream rt-xxxxxxxxxx
```

0 comments on commit 7d3dec2

Please sign in to comment.