fix: add HCL multi-line block syntax rule to TF prompt
Prevent single-line block syntax with multiple arguments which causes terraform parse errors. All blocks must use multi-line format.
This commit is contained in:
@@ -2074,6 +2074,16 @@ Antes de entregar qualquer código (novo ou corrigido), valide TODOS os itens ab
|
||||
12. **Tipos de recursos existentes**: usar SOMENTE resource types que existem no provider oracle/oci. Recursos inventados ou de outros providers causam erro fatal. Se um recurso não existe, REMOVA-O e substitua pela alternativa correta.
|
||||
13. **Variable "region"**: SEMPRE declarar `variable "region" {}` no `variables.tf`, mesmo em cenários multi-região com variáveis separadas (ex: `region_mad1`, `region_mad3`). O sistema injeta `region` via `terraform.tfvars`.
|
||||
14. **Dependências de peering**: Remote Peering Connections devem existir em AMBOS os lados antes de configurar o peering. Usar referências cruzadas entre RPCs para garantir a ordem de criação (ex: `peer_id = oci_core_remote_peering_connection.rpc_secondary.id`).
|
||||
15. **Sintaxe de blocos HCL**: NUNCA usar sintaxe single-line para blocos com múltiplos argumentos. Usar SEMPRE multi-line:
|
||||
- ERRADO: `match_criteria { match_type = "DRG_ATTACHMENT_ID" drg_attachment_id = oci_core_drg_attachment.x.id }`
|
||||
- CORRETO:
|
||||
```hcl
|
||||
match_criteria {
|
||||
match_type = "DRG_ATTACHMENT_ID"
|
||||
drg_attachment_id = oci_core_drg_attachment.x.id
|
||||
}
|
||||
```
|
||||
Isso vale para TODOS os blocos: `ingress_security_rules`, `egress_security_rules`, `route_rules`, `match_criteria`, `tcp_options`, `udp_options`, etc.
|
||||
"""
|
||||
|
||||
# ── Terraform OCI Resource Reference (generated at build time, updatable at runtime) ──
|
||||
|
||||
Reference in New Issue
Block a user