-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add Support for App Engine #162
Comments
Hey @callppatel, Thanks for your interest in contributing new resources! There are currently two types of resources in the inspec-gcp repo, handwritten and auto generated. I have written most of the auto generated resources using this tool: https://github.com/GoogleCloudPlatform/magic-modules I'm happy to help you through the process if you want to use magic modules. Otherwise, hand writing the resource using a gcp client library is probably the easiest path forward. |
Hi @slevenick - I am trying to create Inpsec for AppEngine resource. I have set-up environment as well. It will be better if we have any specific guideline for inspec resource, one my team member is already adding terraform resource with magic module. I would like to know more specifics steps for inspec resource. |
Here is an example of adding a new resource via Magic Modules: https://github.com/GoogleCloudPlatform/magic-modules/pull/1545/files You will need to write a test for both the plural and singular resource which are used for both integration tests as well as documentation. Also add configuration to the .tf file and the attributes file so that terraform can construct the resource that will be tested. You may have to add a description of the API you want the resource written against. This will go in this file: https://github.com/GoogleCloudPlatform/magic-modules/blob/master/products/appengine/api.yaml which currently only supports the AppEngine firewall rule. This should be based off of the REST API that the resource will use. I'm happy to help if you have further questions |
Thanks a lot for info, its very useful. I am getting below error _**root@dd1b3f476d1e:/mm/magic-modules# bundle exec compiler -p products/appengine -e inspec -o build/inspec s' I am attaching my changed file. New to ruby, not sure where this error is coming |
Could you push a branch to github and send me a link? I'd prefer that over downloading zips! |
Please check this repo https://github.com/callppatel/magic-modules |
Looks like there is an issue compiling the documentation template at
It's also reasonable to add a nil check on the line in |
@rileykarson @slevenick I have been working on this, here are some new errors after getting over this issue with <% unless @api.apis_required.nil? -%>
I get this :
You see there were twice "start_time is ..." I am not sure why the Gemfile is being generated twice. After that I was able to compile, but when I try to run the inspec, I get the following error:
I have debugged the issue with no success, when I try this with
it is perfectly fine, but when I run this with newly generated inspec-gcp in build/inspec it fails with the above error. |
If you've included the following lines in your I added a check that copied files didn't clobber other files recently (previously I'd added a check for compiled and generated files but it didn't work for copied ones) and it caught that Gemfile which was copied over by each product. The |
Added in #178 |
🎛 Description
Choose one: is this 🙋 feature request?
Current App Engine Validation is not supported by the inspec. I would like to know if there is plan. Also I would like to contribute to this for more resource like big query, dataproc and etc.
Do we have any help and guide document to add GCP inspec for any new GCP resource
The text was updated successfully, but these errors were encountered: