This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
forked from inspec/inspec-gcp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add InSpec support for source repositories
Signed-off-by: Modular Magician <magic-modules@google.com>
- Loading branch information
1 parent
2688372
commit fb2b900
Showing
62 changed files
with
876 additions
and
460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: About the google_sourcerepo_repositories resource | ||
platform: gcp | ||
--- | ||
|
||
## Syntax | ||
A `google_sourcerepo_repositories` is used to test a Google Repository resource | ||
|
||
## Examples | ||
``` | ||
repo_name = 'inspec-gcp-repository' | ||
describe.one do | ||
google_sourcerepo_repositories(project: 'chef-gcp-inspec').names.each do |name| | ||
describe name do | ||
it { should match /\/repos\/#{repo_name}$/ } | ||
end | ||
end | ||
end | ||
``` | ||
|
||
## Properties | ||
Properties that can be accessed from the `google_sourcerepo_repositories` resource: | ||
|
||
See [google_sourcerepo_repository.md](google_sourcerepo_repository.md) for more detailed information | ||
* `names`: an array of `google_sourcerepo_repository` name | ||
* `urls`: an array of `google_sourcerepo_repository` url | ||
* `sizes`: an array of `google_sourcerepo_repository` size | ||
|
||
## 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: About the google_sourcerepo_repository resource | ||
platform: gcp | ||
--- | ||
|
||
## Syntax | ||
A `google_sourcerepo_repository` is used to test a Google Repository resource | ||
|
||
## Examples | ||
``` | ||
describe google_sourcerepo_repository(project: 'chef-gcp-inspec', name: 'inspec-gcp-repository') do | ||
it { should exist } | ||
end | ||
describe google_sourcerepo_repository(project: 'chef-gcp-inspec', name: 'nonexistent') do | ||
it { should_not exist } | ||
end | ||
``` | ||
|
||
## Properties | ||
Properties that can be accessed from the `google_sourcerepo_repository` resource: | ||
|
||
* `name`: Resource name of the repository, of the form projects/{{project}}/repos/{{repo}}. The repo name may contain slashes. eg, projects/myproject/repos/name/with/slash | ||
|
||
* `url`: URL to clone the repository from Google Cloud Source Repositories. | ||
|
||
* `size`: The disk usage of the repo, in bytes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.