You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Devido a mudança no provider Google Cloud pela hashicorp, será necessário corrigir o modulo network para que seja comply com os requerimentos da function no caminho:
A correção deverá ser feita na condição ternaria do Ingress.
Reproduzindo o problema
Essa função que esta causando problema no terraform.
// Per https://github.com/hashicorp/terraform-provider-google/issues/2924// Make one of the source_ parameters Required in ingress google_compute_firewallfuncresourceComputeFirewallSourceFieldsCustomizeDiff(_ context.Context, diff*schema.ResourceDiff, vinterface{}) error {
direction:=diff.Get("direction").(string)
ifdirection!="EGRESS" {
_, tagsOk:=diff.GetOk("source_tags")
_, rangesOk:=diff.GetOk("source_ranges")
_, sasOk:=diff.GetOk("source_service_accounts")
_, tagsExist:=diff.GetOkExists("source_tags")
// ranges is computed, but this is what we're trying to avoid, so we're not going to check this_, sasExist:=diff.GetOkExists("source_service_accounts")
if!tagsOk&&!rangesOk&&!sasOk&&!tagsExist&&!sasExist {
returnfmt.Errorf("one of source_tags, source_ranges, or source_service_accounts must be defined")
}
}
returnnil
}
DoD
[ ] Corrigir if ternario do ingress, para atender as necessidades da mudança do provider.
The text was updated successfully, but these errors were encountered:
No if ternario para associação de sources ranges e source tags a logica
estava invertida, onde o EGRESS estava utilizando as variaveis de origem
e o INGRESS estava utilizando as variaveis de destino.
Feita também a correção da variavel firewall_allow que recebe as portas
do firewall, atualmente ela recebe somente numbers impossibilitando
receber portas em range. Exemplo 10000 - 15000.
Ref: mentoriaiac#11
Revisado por:
Signed-off-by: Felipe Nobrega <lipenodias@gmail.com>
Co-authored-by: Marcelo Mansur <mansur.ufmg@gmail.com>
Co-authored-by: Vitor Junior <vitorjr81@gmail.com>
Co-authored-by: Guilherme Xavier <guilherme.lnx@gmail.com>
Descrevendo o problema
Devido a mudança no provider Google Cloud pela hashicorp, será necessário corrigir o modulo network para que seja comply com os requerimentos da function no caminho:
https://github.com/hashicorp/terraform-provider-google/pull/10369/files
A correção deverá ser feita na condição ternaria do Ingress.
Reproduzindo o problema
Essa função que esta causando problema no terraform.
DoD
[ ] Corrigir if ternario do ingress, para atender as necessidades da mudança do provider.
The text was updated successfully, but these errors were encountered: