From 632b612981b61794ada5b0ff9f0702d129eb03da Mon Sep 17 00:00:00 2001 From: Stuart Paterson Date: Thu, 14 Jun 2018 13:50:54 +0100 Subject: [PATCH] README improvements and update resource docs to make more accessible. Rename resources to pure markdown and add resource section linking these. Add a helper section for profile creation. Signed-off-by: Stuart Paterson --- README.md | 41 +++++++++++++++++++ ...dress.md.erb => google_compute_address.md} | 0 ...wall.md.erb => google_compute_firewall.md} | 0 ...lls.md.erb => google_compute_firewalls.md} | 0 ...e_image.md.erb => google_compute_image.md} | 0 ...ance.md.erb => google_compute_instance.md} | 0 ...d.erb => google_compute_instance_group.md} | 0 ...ces.md.erb => google_compute_instances.md} | 0 ...ute_zone.md.erb => google_compute_zone.md} | 0 ...e_zones.md.erb => google_compute_zones.md} | 0 ...ter.md.erb => google_container_cluster.md} | 0 ...l.md.erb => google_container_node_pool.md} | 0 ...oogle_project.md.erb => google_project.md} | 0 ....erb => google_project_iam_custom_role.md} | 0 ...count.md.erb => google_service_account.md} | 0 ...bucket.md.erb => google_storage_bucket.md} | 0 16 files changed, 41 insertions(+) rename docs/resources/{google_compute_address.md.erb => google_compute_address.md} (100%) rename docs/resources/{google_compute_firewall.md.erb => google_compute_firewall.md} (100%) rename docs/resources/{google_compute_firewalls.md.erb => google_compute_firewalls.md} (100%) rename docs/resources/{google_compute_image.md.erb => google_compute_image.md} (100%) rename docs/resources/{google_compute_instance.md.erb => google_compute_instance.md} (100%) rename docs/resources/{google_compute_instance_group.md.erb => google_compute_instance_group.md} (100%) rename docs/resources/{google_compute_instances.md.erb => google_compute_instances.md} (100%) rename docs/resources/{google_compute_zone.md.erb => google_compute_zone.md} (100%) rename docs/resources/{google_compute_zones.md.erb => google_compute_zones.md} (100%) rename docs/resources/{google_container_cluster.md.erb => google_container_cluster.md} (100%) rename docs/resources/{google_container_node_pool.md.erb => google_container_node_pool.md} (100%) rename docs/resources/{google_project.md.erb => google_project.md} (100%) rename docs/resources/{google_project_iam_custom_role.md.erb => google_project_iam_custom_role.md} (100%) rename docs/resources/{google_service_account.md.erb => google_service_account.md} (100%) rename docs/resources/{google_storage_bucket.md.erb => google_storage_bucket.md} (100%) diff --git a/README.md b/README.md index 6500072db..c3153e82c 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,47 @@ $ cat ~/.config/gcloud/application_default_credentials.json - [Enable Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) - [Enable Kubernetes Engine API](https://console.cloud.google.com/apis/library/container.googleapis.com) +## Use the resources + +Since this is an InSpec resource pack, it only defines InSpec resources. It includes example tests only. To easily use the GCP resources in your tests do the following: + +### Create a new profile + +```bash +$ inspec init profile my-profile +``` + +```yaml +name: my-profile +title: My own Oneview profile +version: 0.1.0 +inspec_version: '>= 2.2.10' +depends: + - name: inspec-gcp + url: https://github.com/inspec/inspec-gcp/archive/master.tar.gz +supports: + - platform: gcp +``` + +## Resource documentation + +The following resources are available in the InSpec GCP Profile + +- [google_project_iam_custom_role](docs/resources/google_project_iam_custom_role.md) +- [google_compute_instance](docs/resources/google_compute_instance.md) +- [google_service_account](docs/resources/google_service_account.md) +- [google_container_cluster](docs/resources/google_container_cluster.md) +- [google_compute_firewalls](docs/resources/google_compute_firewalls.md) +- [google_project](docs/resources/google_project.md) +- [google_compute_address](docs/resources/google_compute_address.md) +- [google_compute_firewall](docs/resources/google_compute_firewall.md) +- [google_compute_image](docs/resources/google_compute_image.md) +- [google_compute_instance_group](docs/resources/google_compute_instance_group.md) +- [google_compute_zones](docs/resources/google_compute_zones.md) +- [google_compute_zone](docs/resources/google_compute_zone.md) +- [google_compute_instances](docs/resources/google_compute_instances.md) +- [google_storage_bucket](docs/resources/google_storage_bucket.md) +- [google_container_node_pool](docs/resources/google_container_node_pool.md) ## Test inspec-gcp resources diff --git a/docs/resources/google_compute_address.md.erb b/docs/resources/google_compute_address.md similarity index 100% rename from docs/resources/google_compute_address.md.erb rename to docs/resources/google_compute_address.md diff --git a/docs/resources/google_compute_firewall.md.erb b/docs/resources/google_compute_firewall.md similarity index 100% rename from docs/resources/google_compute_firewall.md.erb rename to docs/resources/google_compute_firewall.md diff --git a/docs/resources/google_compute_firewalls.md.erb b/docs/resources/google_compute_firewalls.md similarity index 100% rename from docs/resources/google_compute_firewalls.md.erb rename to docs/resources/google_compute_firewalls.md diff --git a/docs/resources/google_compute_image.md.erb b/docs/resources/google_compute_image.md similarity index 100% rename from docs/resources/google_compute_image.md.erb rename to docs/resources/google_compute_image.md diff --git a/docs/resources/google_compute_instance.md.erb b/docs/resources/google_compute_instance.md similarity index 100% rename from docs/resources/google_compute_instance.md.erb rename to docs/resources/google_compute_instance.md diff --git a/docs/resources/google_compute_instance_group.md.erb b/docs/resources/google_compute_instance_group.md similarity index 100% rename from docs/resources/google_compute_instance_group.md.erb rename to docs/resources/google_compute_instance_group.md diff --git a/docs/resources/google_compute_instances.md.erb b/docs/resources/google_compute_instances.md similarity index 100% rename from docs/resources/google_compute_instances.md.erb rename to docs/resources/google_compute_instances.md diff --git a/docs/resources/google_compute_zone.md.erb b/docs/resources/google_compute_zone.md similarity index 100% rename from docs/resources/google_compute_zone.md.erb rename to docs/resources/google_compute_zone.md diff --git a/docs/resources/google_compute_zones.md.erb b/docs/resources/google_compute_zones.md similarity index 100% rename from docs/resources/google_compute_zones.md.erb rename to docs/resources/google_compute_zones.md diff --git a/docs/resources/google_container_cluster.md.erb b/docs/resources/google_container_cluster.md similarity index 100% rename from docs/resources/google_container_cluster.md.erb rename to docs/resources/google_container_cluster.md diff --git a/docs/resources/google_container_node_pool.md.erb b/docs/resources/google_container_node_pool.md similarity index 100% rename from docs/resources/google_container_node_pool.md.erb rename to docs/resources/google_container_node_pool.md diff --git a/docs/resources/google_project.md.erb b/docs/resources/google_project.md similarity index 100% rename from docs/resources/google_project.md.erb rename to docs/resources/google_project.md diff --git a/docs/resources/google_project_iam_custom_role.md.erb b/docs/resources/google_project_iam_custom_role.md similarity index 100% rename from docs/resources/google_project_iam_custom_role.md.erb rename to docs/resources/google_project_iam_custom_role.md diff --git a/docs/resources/google_service_account.md.erb b/docs/resources/google_service_account.md similarity index 100% rename from docs/resources/google_service_account.md.erb rename to docs/resources/google_service_account.md diff --git a/docs/resources/google_storage_bucket.md.erb b/docs/resources/google_storage_bucket.md similarity index 100% rename from docs/resources/google_storage_bucket.md.erb rename to docs/resources/google_storage_bucket.md