Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKotowick committed Jul 29, 2021
1 parent 8626131 commit 1f11e71
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ What might you use this for? We're not entirely sure. It definitely accesses inf
- Use the backend configuration to create a `provider` that has the same permissions/access as the internal provider Terraform uses for the backend
- Using a provider with the backend configuration, combined with data about where the state is stored (e.g. which S3 bucket and object) to load the raw state data for use in the configuration (be warned, this is a MAJOR hack)

Current state:
- The backend config should work for all backend types and workspace settings
- The `output_state` should work for all backend types and workspace settings
- The `raw_state` should work for `S3` and `local` backend types (for `local` backends, `terraform plan` and `terraform apply` must be run with `-lock=false`)

Usage:
```
module "backend_config" {
source = "Invicton-Labs/backend-config/null"
fetch_state = true
fetch_output_state = true
// Currently only supported for S3 and local backends
fetch_raw_state = false
}
output "backend_config" {
Expand All @@ -31,9 +38,10 @@ backend_config = {
...
}
}
"state" = {
"output_state" = {
// Equivalent output to the terraform_remote_state data source's `outputs` field
}
"raw_state" = null
"workspace" = "myworkspace"
}
```

0 comments on commit 1f11e71

Please sign in to comment.