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.
Add client, permissions, monitoring and mfa configs to google_identit…
…y_platform_config (GoogleCloudPlatform#9609) * Reapply "Add client config and permissions to google_identity_platform_config (GoogleCloudPlatform#9417)" This reverts commit 1c1f4d2. * Fix diff from API for GCIP client * Add mfa config to GCIP * Add multiTenant to google_identity_platform_config * Add monitoring and request Logging to google_identity_platform_config * Add test cases * Extend update test to the new attributes * Findings from review * First set of review findings from zli82016 * Fix monitoring permadiff via custom flatten * Fix client.permissions permadiff via custom flatten * Fix mfa.state permadiff * Adapt tests to latest changes * Ignore only outputs for the import verify
- Loading branch information
1 parent
f03c87c
commit e9d9385
Showing
5 changed files
with
240 additions
and
7 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
22 changes: 22 additions & 0 deletions
22
mmv1/templates/terraform/custom_flatten/identity_platform_config_client_permissions.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,22 @@ | ||
func flatten<%= prefix -%><%= titlelize_property(property) -%>(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { | ||
if v == nil { | ||
return nil | ||
} | ||
|
||
original := v.(map[string]interface{}) | ||
transformed := make(map[string]interface{}) | ||
|
||
if original["disabledUserSignup"] == nil { | ||
transformed["disabled_user_signup"] = false | ||
} else { | ||
transformed["disabled_user_signup"] = original["disabledUserSignup"] | ||
} | ||
|
||
if original["disabledUserDeletion"] == nil { | ||
transformed["disabled_user_deletion"] = false | ||
} else { | ||
transformed["disabled_user_deletion"] = original["disabledUserDeletion"] | ||
} | ||
|
||
return []interface{}{transformed} | ||
} |
16 changes: 16 additions & 0 deletions
16
mmv1/templates/terraform/custom_flatten/identity_platform_config_logging.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,16 @@ | ||
func flatten<%= prefix -%><%= titlelize_property(property) -%>(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { | ||
if v == nil { | ||
return nil | ||
} | ||
|
||
original := v.(map[string]interface{}) | ||
transformed := make(map[string]interface{}) | ||
|
||
if original["enabled"] == nil { | ||
transformed["enabled"] = false | ||
} else { | ||
transformed["enabled"] = original["enabled"] | ||
} | ||
|
||
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