IaC describe command examples
For a full list of snyk iac describe
options, see snyk iac describe
command help or display the help by running:
Use --from
to specify state files
--from
to specify state filesRead and aggregate all Terraform states in a given directory:
Use any unsupported backend by using terraform
to pipe your state into a file and then use the file:
Use --to
to specify the cloud provider to scan
--to
to specify the cloud provider to scanExplicitly scan AWS in a Terraform context:
Use --tf-provider-version
to specify the Terraform provider version
--tf-provider-version
to specify the Terraform provider versionSpecify terraform provider 3.43.0 to use this provider to avoid scan errors:
Use the same parameter for every cloud provider:
Use --tf-lockfile
to specify the Terraform lock file
--tf-lockfile
to specify the Terraform lock fileSpecify a custom path for the Terraform lock file (.terraform.lock.hcl
):
Use --fetch-tfstate-headers
to specify HTTP headers when fetching Terraform state
--fetch-tfstate-headers
to specify HTTP headers when fetching Terraform stateSpecify HTTPS authentication to use a Terraform state stored on GitLab:
Use --tfc-endpoint
to read state from a Terraform Enterprise workspace
--tfc-endpoint
to read state from a Terraform Enterprise workspaceYou can obtain your workspace ID from the General Settings of the Terraform Enterprise workspace.
Remember to provide your Terraform Enterprise API token.
Example:
Use --service
to specify multiple services to inspect
--service
to specify multiple services to inspectInclude AWS S3 and AWS EC2 resources in the report:
Use --strict
to include service-linked resources in the report
--strict
to include service-linked resources in the reportNote: When using strict mode with an AWS account, you may experience unnecessary noise from resources that do not belong to you.
This can happen if you have an Organization account in which you, by default, have a service-linked role associated with your account; for example, AWSServiceRoleForOrganizations
.
Example to enable strict mode:
Use --json
to output the report as JSON
--json
to output the report as JSONSave the report to a JSON file through redirection:
Last updated