From 3d16cf04a3acfe3d9d64a067f38f93d83dc1899d Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Mon, 8 Feb 2021 10:11:29 +1100 Subject: [PATCH] access_group: fix attribute mapping With the fixes and refactor in v2.18.0, I copied and pasted the wrong attribute for the GSuite configuration, resulting in a crash. This updates the attribute being accessed to be the correct one and prevents the crash. Fixes #935 --- cloudflare/resource_cloudflare_access_group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudflare/resource_cloudflare_access_group.go b/cloudflare/resource_cloudflare_access_group.go index 5666a02998..8a7cdac885 100644 --- a/cloudflare/resource_cloudflare_access_group.go +++ b/cloudflare/resource_cloudflare_access_group.go @@ -596,7 +596,7 @@ func TransformAccessGroupForSchema(accessGroup []interface{}) []map[string]inter case "gsuite": gsuiteCfg := groupValue.(map[string]interface{}) gsuiteID = gsuiteCfg["identity_provider_id"].(string) - gsuiteEmails = append(gsuiteEmails, gsuiteCfg["name"].(string)) + gsuiteEmails = append(gsuiteEmails, gsuiteCfg["email"].(string)) case "github-organization": githubCfg := groupValue.(map[string]interface{}) githubID = githubCfg["identity_provider_id"].(string)