forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade DCL to v1.51.0 (GoogleCloudPlatform#8876)
- Loading branch information
1 parent
b4b6804
commit 4f10d54
Showing
26 changed files
with
299 additions
and
29 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
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
40 changes: 40 additions & 0 deletions
40
mmv1/third_party/terraform/tpgresource/tpgtools_custom_flattens.go.erb
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,40 @@ | ||
<% autogen_exception -%> | ||
package tpgresource | ||
|
||
import ( | ||
containeraws "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/containeraws<%= dcl_version(version) -%>" | ||
containerazure "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/containerazure<%= dcl_version(version) -%>" | ||
|
||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" | ||
transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" | ||
) | ||
|
||
func FlattenContainerAwsNodePoolManagement(obj *containeraws.NodePoolManagement, d *schema.ResourceData, config *transport_tpg.Config) interface{} { | ||
if obj == nil { | ||
return nil | ||
} | ||
transformed := make(map[string]interface{}) | ||
|
||
if obj.AutoRepair == nil || obj.Empty() { | ||
transformed["auto_repair"] = false | ||
} else { | ||
transformed["auto_repair"] = obj.AutoRepair | ||
} | ||
|
||
return []interface{}{transformed} | ||
} | ||
|
||
func FlattenContainerAzureNodePoolManagement(obj *containerazure.NodePoolManagement, d *schema.ResourceData, config *transport_tpg.Config) interface{} { | ||
if obj == nil { | ||
return nil | ||
} | ||
transformed := make(map[string]interface{}) | ||
|
||
if obj.AutoRepair == nil || obj.Empty() { | ||
transformed["auto_repair"] = false | ||
} else { | ||
transformed["auto_repair"] = obj.AutoRepair | ||
} | ||
|
||
return []interface{}{transformed} | ||
} |
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.