inspec-gcp icon indicating copy to clipboard operation
inspec-gcp copied to clipboard

google_dns_managed_zones - zone type not returned

Open lhasadreams opened this issue 6 years ago • 5 comments

Detailed Description

Currently google_dns_managed_zones does not give you the ability to find out the zones Type, ie Public or Private.

Context

I would like to be able to iterate over the zones with some InSpec tests but only if the zone is Public.

Possible Implementation

Return an array that shows whether the zones are Public or Private.

lhasadreams avatar Nov 01 '19 12:11 lhasadreams

I'm unable to find this info on the managed zone object that is returned by the API client. I'd guess that this client is out of date, similar to https://github.com/inspec/inspec-gcp/issues/202

slevenick avatar Nov 06 '19 19:11 slevenick

Hi Sam, gcloud dns managed-zones list --format json returns the visibility of each zone.

I have created a Gemfile to use the latest google api with train (@skpaterson branch on train). The visibility information does appear be available through the resource with the latest API.

Hopefully that makes sense!

lhasadreams avatar Nov 06 '19 21:11 lhasadreams

Hi @slevenick Is this to do with using v1 or beta versions of the google api? Cheers Adrian

lhasadreams avatar Nov 12 '19 22:11 lhasadreams

This should be available in the v1 version of the api, as it appears in the v1 version of the object that comes back from the REST call: https://cloud.google.com/dns/docs/reference/v1/managedZones#resource

slevenick avatar Nov 18 '19 20:11 slevenick

Are you able to reproduce the same issue in the 1.0 release of inspec-gcp? I believe this was an issue with versioning on the API clients, which are no longer being used

slevenick avatar Apr 13 '20 16:04 slevenick