mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-01 07:42:40 +00:00
Add DiffSuppressFunc to GKE cluster networks (#419)
* fix gke network test * use a state func to store the resource name
This commit is contained in:
parent
68303edb42
commit
5f86f52d1f
|
@ -176,10 +176,11 @@ func resourceContainerCluster() *schema.Resource {
|
|||
},
|
||||
|
||||
"network": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Default: "default",
|
||||
ForceNew: true,
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Default: "default",
|
||||
ForceNew: true,
|
||||
StateFunc: StoreResourceName,
|
||||
},
|
||||
"subnetwork": {
|
||||
Type: schema.TypeString,
|
||||
|
|
|
@ -69,3 +69,7 @@ func GetResourceNameFromSelfLink(link string) string {
|
|||
parts := strings.Split(link, "/")
|
||||
return parts[len(parts)-1]
|
||||
}
|
||||
|
||||
func StoreResourceName(resourceLink interface{}) string {
|
||||
return GetResourceNameFromSelfLink(resourceLink.(string))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user