Skip to content

Commit

Permalink
Merge branch 'main' into module-import-old
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniellem97 authored Sep 18, 2023
2 parents 7426286 + 34b90c6 commit 3cc1faf
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/concepts/policy/approval-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The approval policy allows organizations to create sophisticated run review and approval flows that reflect their preferred workflow, security goals, and business objectives. Without an explicit approval policy, anyone with write access to a stack can create a [run](../run/README.md) (or a [task](../run/task.md)). An approval policy can make this way more granular and contextual.

Runs can be reviewed when they enter one of the two states - [queued](../run/README.md#queued) or [unconfirmed](../run/tracked.md#unconfirmed). When a [queued](../run/README.md#queued) run needs approval, it will not be scheduled before that approval is received, and if it is of a blocking type, it will block newer runs from scheduling, too. A [queued](../run/README.md#queued) run that's pending approval can be [canceled](../run/README.md#canceled) at any point.
Runs can be reviewed when they enter one of the three states - [queued](../run/README.md#queued), [unconfirmed](../run/tracked.md#unconfirmed), or [pending review](../run/proposed.md#unconfirmed). When a [queued](../run/README.md#queued) run needs approval, it will not be scheduled before that approval is received, and if it is of a blocking type, it will block newer runs from scheduling, too. A [queued](../run/README.md#queued) run that's pending approval can be [canceled](../run/README.md#canceled) at any point.

Here's an example of a queued run waiting for a human review - note how the last approval policy evaluation returned an _Undecided_ decision. There's also a Review button next to the Cancel button:

Expand Down
6 changes: 6 additions & 0 deletions docs/concepts/run/proposed.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ If any [plan policies](../policy/terraform-plan-policy.md) are attached to the c

You can read more about plan policies [here](../policy/terraform-plan-policy.md).

## Pending Review

If any [plan policy](../policy/terraform-plan-policy.md) results in a warning and there are [approval policies](../policy/approval-policy.md) attached, the run will enter a pending review state after planning, in which approval policies will be evaluated. The run will only finish once all approval policies approve.

This is useful to e.g. block pull requests related to a proposed run when the changes made by the run should be reviewed by another team, like security.

## Delta

If the planning phase is successful (which includes policy evaluation), Spacelift analyses the diff and counts the resources and outputs that would be added, changed and deleted if the changes were to be applied. Here's one example of one such delta being reported:
Expand Down
7 changes: 7 additions & 0 deletions docs/integrations/source-control/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,13 @@ If a GitHub repository is renamed, we update its name in all the [stacks](../../

You can use the [Setup Spacectl](https://github.com/marketplace/actions/setup-spacectl){: rel="nofollow"} GitHub Action to install our [spacectl](https://github.com/spacelift-io/spacectl){: rel="nofollow"} CLI tool to easily interact with Spacelift.

## Git checkout support

By default Spacelift uses the GitHub API to download a tarball containing the source code for your stack or module. We are introducing experimental support for downloading the code using a standard Git checkout. If you would like to enable this for your stacks/modules, there are currently two options available:

1. Add a label called `feature:enable_git_checkout` to each stack or module that you want to use Git checkout on. This allows you to test the new support without switching over all your stacks at once.
2. Contact our support team and ask us to enable the feature for all stacks/modules in your account.

## Unlinking GitHub and Spacelift

=== "Uninstalling the Marketplace application"
Expand Down
22 changes: 22 additions & 0 deletions docs/vendors/terraform/state-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,28 @@ To do this, use the following steps:

![](<../../assets/screenshots/Screen Shot 2022-02-15 at 1.31.29 PM.png>)

## Importing existing state file into your Terraform Stacks

When creating a stack, you can optionally import an existing Terraform state file so that Spacelift can manage it going forward.

![](../../assets/screenshots/Stack_settings_importing_state_file.png)

You can also import an existing Terraform state file when using Spacelift Terraform provider.

```terraform title="stack.tf"
resource "spacelift_stack" "example-stack" {
name = "Example Stack in Spacelift"
# Source code.
repository = "<Repository Name>"
branch = "main"
# State file information
import_state = "<State File to Upload>"
import_state_file = "<Path to the State file>"
}
```

## Exporting Spacelift-managed Terraform state file

!!! info
Expand Down

0 comments on commit 3cc1faf

Please sign in to comment.