-
Notifications
You must be signed in to change notification settings - Fork 168
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 several components #73
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one comment.
// for a complete list of API: https://godoc.org/google.golang.org/api | ||
// ex: compute, storage | ||
// default goes to `compute` | ||
API string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would potentially name it Service
, they refer to "them" as Google Cloud Services
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Google SDK, API
refers to Google Cloud Service
and Service
refers to a component of this API.
Example: Google Compute Engine is a Google Cloud Service
, compute
is the name of the API in the SDK and InstancesService
is a service
to manage instances
.
Replace API
with Service
could lead to potential errors, since we already have a ServiceName
fields:
terracognita/google/cmd/template.go
Lines 99 to 102 in 7d4f144
// ServiceName is name of the Google SDK service name | |
// If your service is `TargetHttpProxy`, your service name will | |
// be `TargetHttpProxies` | |
ServiceName string |
doc: https://www.terraform.io/docs/providers/google/r/storage_bucket.html To add this component, some updates have been made: * add API to template since the beginning, we work only with `compute` APIs. We need to be able to easily switch from one API to the other when we declare a new component. In order to keep compatibility, default API goes to `compute` * add `NoFilter` option to the template most of the resource are based on filters. We need a way to specify if a resource is not using filter * add `storage` to the reader * add `ResourceList` option ResourceList overrides the default name of the resources list: `resourceList` exemple: for the components Instance, the list struct is `InstanceList` but for the components Bucket, the list struct is `Buckets`
since this component is in beta4 access, you will need to manually enable API from the console. See: https://cloud.google.com/sql/docs/postgres/admin-api/
c29aad5
to
7efe437
Compare
In this PR, I added three more components for Google provider:
google_sql_database_instance
(SQL service)google_storage_bucket
(Cloud storage)google_compute_disk
(Persistent disks)For the first time, we are using APIs different than
compute
. I slightly updated the template to handle different APIs (new fieldAPI
).As mentioned in this commit: c29aad5, you'll need to enable SQL APIs if you want to play with SQL instances.
I also added a field
NoFilter
field sincebuckets
can not be filtered.