Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix terraform platform information #1805

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

czunker
Copy link
Contributor

@czunker czunker commented Sep 20, 2023

This fixes the values for:

  • platform name
  • platform title
  • platform ID

Fixes #1743

This fixes the values for:
- platform name
- platform title
- platform ID

Fixes #1743

Signed-off-by: Christian Zunker <[email protected]>
@czunker
Copy link
Contributor Author

czunker commented Sep 20, 2023

I tried it with state, plan, and hcl files from the testdata directory:

cnquery run terraform $(pwd)/providers/terraform/provider/testdata/terraform/ -c "asset{ name title platform ids }" 
! using builtin provider for terraform
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
! using builtin provider for terraform
asset: {
  title: "Terraform HCL"
  platform: "terraform-hcl"
  ids: [
    0: "//platformid.api.mondoo.app/runtime/terraform/hash/e1ac02440b24d46476b83765aa55a00648e9daf4031e1f0bae41854888ec3582"
  ]
  name: "Terraform Static Analysis directory terraform"
}

cnquery run terraform state /home/christian/workspace/mondoo/github.com/cnquery/providers/terraform/provider/testdata/tfstate/state_aws_simple.json -c "asset{ name title platform ids }"
! using builtin provider for terraform
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
! using builtin provider for terraform
asset: {
  title: "Terraform State"
  platform: "terraform-state"
  ids: [
    0: "//platformid.api.mondoo.app/runtime/terraform/hash/4f294ab005aeede50073bf451ac48a536f5bde62a4ee2f57df8a237ce7971795"
  ]
  name: "Terraform Static Analysis state_aws_simple"
}
cnquery run terraform plan /home/christian/workspace/mondoo/github.com/cnquery/providers/terraform/provider/testdata/tfplan/plan_gcp_simple.json -c "asset{ name title platform ids }"
! using builtin provider for terraform
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
! using builtin provider for terraform
asset: {
  title: "Terraform Plan"
  platform: "terraform-plan"
  ids: [
    0: "//platformid.api.mondoo.app/runtime/terraform/hash/6190d0bc7a287c5605b67672adf8c3a326b93cd87cd9f1e959b20ac33f6e8076"
  ]
  name: "Terraform Static Analysis plan_gcp_simple"
}

@czunker czunker merged commit c345e42 into main Sep 20, 2023
10 checks passed
@czunker czunker deleted the christian/v9_terraform_platform branch September 20, 2023 12:05
@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

terraform asset missing platform id
2 participants