techlite/terraform-apply
repeating redoes the action Acts beyond its own outputs: publishes, deploys, creates a release. A second run does it all again.
Aplica um plano de infraestrutura já calculado
task
How to use
oren add techlite/terraform-applyAplica o arquivo de plano produzido por `techlite/terraform-plan`.
Recebe o plano em vez de recalcular: é o que garante que o que foi revisado é exatamente o que foi aplicado.
The step the command writes
- id: terraform-apply
task: techlite/terraform-apply@^1.1.0
implementation: techlite/terraform-apply-hashicorp
inputs:
plan: ...
dependencies:
source: ...
artifacts: ...
gcpCredential: ...
gcloudToken: ...
clusterProxy: ...What it requires from your environment
This is the floor: every implementation of this task asks for at least this.
| dependency | type | access | privilege |
|---|---|---|---|
sourceProjeto contendo os arquivos .tf. | directory | read only | low |
artifactsDiretório contendo o plano a aplicar. | directory | read only | low |
gcpCredentialService account com permissão de criar e alterar os recursos do plano. Privilégio alto, e aqui de fato exercido — aplicar altera infraestrutura. | secret-file | read only | medium |
gcloudTokenAlternative to gcpCredential: a short-lived access token (gcloud auth print-access-token), delivered as GOOGLE_OAUTH_ACCESS_TOKEN — the google provider and the GCS backend read it natively. With neither this nor gcpCredential, the runner's own identity (workload identity / ADC) carries authentication. | secret | read only | medium |
clusterProxyA SOCKS proxy that reaches a private control plane, when there is one. The worker only joins it to the step's network; the address travels into the configuration through `vars` — e.g. k8s_proxy_url: "socks5://${dependencies.clusterProxy.address}". | endpoint/tcp | read only | medium |
Inputs
planstringrequired- Caminho do plano dentro do diretório de artefatos. Normalmente a saída de `techlite/terraform-plan`.
directorystring- Diretório com os arquivos .tf, relativo ao workspace. default:
. workspacestring- Workspace do Terraform. Precisa ser o mesmo do plano.
backendConfigobject- Configuração do backend, a mesma usada no plano.
Outputs
What later steps can reference.
appliedbooleanoutputsobject- Outputs declarados no módulo, como mapa de nome para valor.
Implementations
Usa a imagem oficial do Terraform
ghcr.io/techlitebr/oren-terraform-hashicorp:1.1.0