Skip to content

Commit

Permalink
Update CAI Asset Type to use v1 format
Browse files Browse the repository at this point in the history
  • Loading branch information
nstogner committed Mar 20, 2019
1 parent d693e64 commit c150a99
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion templates/terraform/objectlib/base.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func Get<%= resource_name -%>CaiObject(d TerraformResourceData, config *Config)
if obj, err := Get<%= resource_name -%>ApiObject(d, config); err == nil {
return Asset{
Name: name,
Type: "google.<%= product_ns.downcase -%>.<%= object.name -%>",
Type: "<%= product_ns.downcase -%>.googleapis.com/<%= object.name -%>",
Resource: &AssetResource{
Version: "<%= api_version -%>",
DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/<%= product_ns.downcase -%>/<%= api_version -%>/rest",
Expand Down
2 changes: 1 addition & 1 deletion third_party/validator/compute_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func GetComputeInstanceCaiObject(d TerraformResourceData, config *Config) (Asset
if obj, err := GetComputeInstanceApiObject(d, config); err == nil {
return Asset{
Name: name,
Type: "google.compute.Instance",
Type: "compute.googleapis.com/Instance",
Resource: &AssetResource{
Version: "v1",
DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest",
Expand Down
2 changes: 1 addition & 1 deletion third_party/validator/sql_database_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func GetSQLDatabaseInstanceCaiObject(d TerraformResourceData, config *Config) (A
if obj, err := GetSQLDatabaseInstanceApiObject(d, config); err == nil {
return Asset{
Name: name,
Type: "google.cloud.sql.Instance",
Type: "sqladmin.googleapis.com/Instance",
Resource: &AssetResource{
Version: "v1beta4",
DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/sqladmin/v1beta4/rest",
Expand Down
2 changes: 1 addition & 1 deletion third_party/validator/storage_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func GetStorageBucketCaiObject(d TerraformResourceData, config *Config) (Asset,
if obj, err := GetStorageBucketApiObject(d, config); err == nil {
return Asset{
Name: name,
Type: "google.cloud.storage.Bucket",
Type: "storage.googleapis.com/Bucket",
Resource: &AssetResource{
Version: "v1",
DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/storage/v1/rest",
Expand Down

0 comments on commit c150a99

Please sign in to comment.