mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-05 17:52:38 +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
|
@ -180,6 +180,7 @@ func resourceContainerCluster() *schema.Resource {
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Default: "default",
|
Default: "default",
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
|
StateFunc: StoreResourceName,
|
||||||
},
|
},
|
||||||
"subnetwork": {
|
"subnetwork": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
|
|
|
@ -69,3 +69,7 @@ func GetResourceNameFromSelfLink(link string) string {
|
||||||
parts := strings.Split(link, "/")
|
parts := strings.Split(link, "/")
|
||||||
return parts[len(parts)-1]
|
return parts[len(parts)-1]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func StoreResourceName(resourceLink interface{}) string {
|
||||||
|
return GetResourceNameFromSelfLink(resourceLink.(string))
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user