terraform-example-foundation icon indicating copy to clipboard operation
terraform-example-foundation copied to clipboard

Error: validating: FCV: initializing gcv validator: failed to read files in /workspace/policy-library/policies: error visiting path /workspace/policy-library/policies: lstat /workspace/policy-library/policies: no such file or directory

Open jesus-martin1 opened this issue 3 years ago • 0 comments

Terraform validator error in module 5-app-infra

Already has the content uploaded in source repositories for the gcp-policies and bu1-sample-base in the correct project of business unit, when launch git push origin plan the trigger of cloud build throws this error in the part of terraform validator, it seems to be in the step for clone /workspace/policy-library, I made also ls -la in the tfwrapper.sh but nothing shows in cloud build logs

2022-07-15T12:51:28.491065429ZStep #1 - "tf plan validate all": 2022-07-15T12:51:28.492416515ZStep #1 - "tf plan validate all": Project [prj-bu1-c-infra-pipeline-f676] repository [gcp-policies] was cloned to [/workspace/policy-library]. 2022-07-15T12:51:28.816233815ZStep #1 - "tf plan validate all": ERROR: logging before flag.Parse: I0715 12:51:28.815905 281 convert.go:213] unsupported resource: google_service_account 2022-07-15T12:51:28.816316825ZStep #1 - "tf plan validate all": ERROR: logging before flag.Parse: I0715 12:51:28.816174 281 convert.go:207] unknown resource: google_compute_zones 2022-07-15T12:51:28.816552523ZStep #1 - "tf plan validate all": ERROR: logging before flag.Parse: I0715 12:51:28.816299 281 convert.go:213] unsupported resource: google_compute_instance_from_template 2022-07-15T12:51:28.816687798ZStep #1 - "tf plan validate all": ERROR: logging before flag.Parse: I0715 12:51:28.816559 281 convert.go:213] unsupported resource: google_compute_instance_template 2022-07-15T12:51:28.816949025ZStep #1 - "tf plan validate all": Error: validating: FCV: initializing gcv validator: failed to read files in /workspace/policy-library/policies: error visiting path /workspace/policy-library/policies: lstat /workspace/policy-library/policies: no such file or directory 2022-07-15T12:51:28.817536527ZStep #1 - "tf plan validate all": Usage: 2022-07-15T12:51:28.817544050ZStep #1 - "tf plan validate all": terraform-validator validate [flags] 2022-07-15T12:51:28.817551035ZStep #1 - "tf plan validate all": 2022-07-15T12:51:28.817551700ZStep #1 - "tf plan validate all": Flags: 2022-07-15T12:51:28.817552741ZStep #1 - "tf plan validate all": --ancestry string Override the ancestry location of the project when validating resources 2022-07-15T12:51:28.817553356ZStep #1 - "tf plan validate all": -h, --help help for validate 2022-07-15T12:51:28.817554361ZStep #1 - "tf plan validate all": --offline Do not make network requests 2022-07-15T12:51:28.817554971ZStep #1 - "tf plan validate all": --output-json Print violations as JSON 2022-07-15T12:51:28.817556067ZStep #1 - "tf plan validate all": --policy-path string Path to directory containing validation policies 2022-07-15T12:51:28.817557291ZStep #1 - "tf plan validate all": --project string Provider project override (override the default project configuration assigned to the google terraform provider when validating resources) 2022-07-15T12:51:28.817557790ZStep #1 - "tf plan validate all": 2022-07-15T12:51:28.817558477ZStep #1 - "tf plan validate all": Global Flags: 2022-07-15T12:51:28.817559024ZStep #1 - "tf plan validate all": --verbose Log output to stderr 2022-07-15T12:51:28.817559400ZStep #1 - "tf plan validate all": 2022-07-15T12:51:30.166914559ZFinished Step #1 - "tf plan validate all"

jesus-martin1 avatar Jul 15 '22 13:07 jesus-martin1