Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #37 from modular-magician/codegen-pr-967
Browse files Browse the repository at this point in the history
Plural doc generation
  • Loading branch information
slevenick authored Nov 30, 2018
2 parents c85c587 + 70e629b commit f7e7b04
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 52 deletions.
44 changes: 44 additions & 0 deletions docs/resources/google_compute_ssl_policies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: About the SslPolicy resource
platform: gcp
---


## Syntax
A `google_compute_ssl_policies` is used to test a Google SslPolicy resource

## Examples
```
resource = google_compute_ssl_policies({project: 'graphite-test-sam-chef'})
describe resource do
it { should exist }
its('names') { should include 'inspec-gcp-ssl-policy' }
its('profiles') { should include 'CUSTOM' }
its('count') { should eq 1 }
end
resource.names.each do |policy_name|
describe google_compute_ssl_policy({project: 'graphite-test-sam-chef', name: policy_name}) do
its('min_tls_version') { should cmp 'TLS_1_2' }
end
end
```

## Properties
Properties that can be accessed from the `google_compute_ssl_policies` resource:

See [google_compute_ssl_policy.md](google_compute_ssl_policy.md) for more detailed information
* `creation_timestamps`: an array of `google_compute_ssl_policy` creation_timestamp
* `descriptions`: an array of `google_compute_ssl_policy` description
* `ids`: an array of `google_compute_ssl_policy` id
* `names`: an array of `google_compute_ssl_policy` name
* `profiles`: an array of `google_compute_ssl_policy` profile
* `min_tls_versions`: an array of `google_compute_ssl_policy` min_tls_version
* `enabled_features`: an array of `google_compute_ssl_policy` enabled_features
* `custom_features`: an array of `google_compute_ssl_policy` custom_features
* `fingerprints`: an array of `google_compute_ssl_policy` fingerprint
* `warnings`: an array of `google_compute_ssl_policy` warnings

## Filter Criteria
This resource supports all of the above properties as filter criteria, which can be used
with `where` as a block or a method.
2 changes: 0 additions & 2 deletions docs/resources/google_compute_ssl_policy.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


---
title: About the SslPolicy resource
platform: gcp
Expand Down
13 changes: 0 additions & 13 deletions libraries/google_compute_ssl_policies.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# frozen_string_literal: false

# Copyright 2018 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
Expand Down
13 changes: 0 additions & 13 deletions libraries/google_compute_ssl_policy.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# frozen_string_literal: false

# Copyright 2018 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
Expand Down
19 changes: 7 additions & 12 deletions test/integration/verify-mm/controls/google_compute_ssl_policies.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# Copyright 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
Expand Down Expand Up @@ -40,6 +28,13 @@
it { should exist }
its('names') { should include ssl_policy['name'] }
its('profiles') { should include ssl_policy['profile'] }
its('count') { should eq 1 }
end

resource.names.each do |policy_name|
describe google_compute_ssl_policy({project: project_name, name: policy_name}) do
its('min_tls_version') { should cmp ssl_policy['min_tls_version'] }
end
end
end
end
12 changes: 0 additions & 12 deletions test/integration/verify-mm/controls/google_compute_ssl_policy.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# Copyright 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
Expand Down

0 comments on commit f7e7b04

Please sign in to comment.