HTTP Backend support for `terraform.state`
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 175
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 134
Description
### Describe the Feature
The `terraform.state` feature introduced with v1.183 sounds like an interesting feature which could eliminate some of our performance issues with `terraform.output`.
Since we use the HTTP (GitLab) backend we can't use it though. It would be nice if support for the HTTP backend was considered as well.
### Expected Behavior
Read https://atmos.tools/core-concepts/stacks/yaml-functions/terraform.state/ and hoped that the `http` backend was listed as a potential future (or even current) backend type.
### Use Case
Replace `terraform.output` with `terraform.state`.
### Describe Ideal Solution
This works out of the box:
```yaml
terraform:
backend_type: http
backend:
http:
address: 'https://gitlab.example.com/api/v4/projects/42/terraform/state/{{ .stack }}-{{ regexp.Replace "/" "_" .atmos_component }}'
lock_address: 'https://gitlab.example.com/api/v4/projects/42/terraform/state/{{ .stack }}-{{ regexp.Replace "/" "_" .atmos_component }}/lock'
unlock_address: 'https://gitlab.example.com/api/v4/projects/42/terraform/state/{{ .stack }}-{{ regexp.Replace "/" "_" .atmos_component }}/lock'
lock_method: 'POST'
unlock_method: 'DELETE'
retry_wait_min: '3'
username: atmos
password: !env GITLAB_TOKEN
```
### Alternatives Considered
_No response_
### Additional Context
_No response_
Contributor guide
Research direction
Read the terraform.state documentation and compare its current backend coverage with the supplied HTTP backend configuration. The work is done when the HTTP backend supports the shown state access flow and the documentation identifies HTTP as supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- terraform
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100