From 67fec233c38a68df5c70393f76dc246d9d485df1 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Wed, 5 Aug 2020 22:44:00 +0000 Subject: [PATCH] Update ospatch's windows update classification field to be an array. (#3823) Signed-off-by: Modular Magician --- .changelog/3823.txt | 6 ++++++ ...urce_access_context_manager_access_level.go | 4 ++-- .../resource_compute_packet_mirroring.go | 2 +- google-beta/resource_dialogflow_intent.go | 2 +- google-beta/resource_filestore_instance.go | 2 +- .../resource_os_config_patch_deployment.go | 18 ++++++++++-------- ...s_config_patch_deployment_generated_test.go | 2 +- .../resource_security_scanner_scan_config.go | 2 +- ..._context_manager_access_level.html.markdown | 2 ++ .../r/compute_packet_mirroring.html.markdown | 1 + website/docs/r/dialogflow_intent.html.markdown | 1 + .../docs/r/filestore_instance.html.markdown | 1 + .../r/os_config_patch_deployment.html.markdown | 4 ++-- .../security_scanner_scan_config.html.markdown | 1 + 14 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 .changelog/3823.txt diff --git a/.changelog/3823.txt b/.changelog/3823.txt new file mode 100644 index 0000000000..945f693aa4 --- /dev/null +++ b/.changelog/3823.txt @@ -0,0 +1,6 @@ +```release-note:bug +osconfig: `google_os_config_patch_deployment`'s `windows_update.classifications` field now works correctly, accepting multiple values. +``` +```release-note:note +all: Lists of enums now display the enum options in the documentation pages. +``` diff --git a/google-beta/resource_access_context_manager_access_level.go b/google-beta/resource_access_context_manager_access_level.go index 697cf8fdb2..edf45f5f22 100644 --- a/google-beta/resource_access_context_manager_access_level.go +++ b/google-beta/resource_access_context_manager_access_level.go @@ -90,7 +90,7 @@ allowed.`, Type: schema.TypeList, Optional: true, Description: `A list of allowed device management levels. -An empty list allows all management levels.`, +An empty list allows all management levels. Possible values: ["MANAGEMENT_UNSPECIFIED", "NONE", "BASIC", "COMPLETE"]`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -99,7 +99,7 @@ An empty list allows all management levels.`, Type: schema.TypeList, Optional: true, Description: `A list of allowed encryptions statuses. -An empty list allows all statuses.`, +An empty list allows all statuses. Possible values: ["ENCRYPTION_UNSPECIFIED", "ENCRYPTION_UNSUPPORTED", "UNENCRYPTED", "ENCRYPTED"]`, Elem: &schema.Schema{ Type: schema.TypeString, }, diff --git a/google-beta/resource_compute_packet_mirroring.go b/google-beta/resource_compute_packet_mirroring.go index 84588fa8da..1115c40abf 100644 --- a/google-beta/resource_compute_packet_mirroring.go +++ b/google-beta/resource_compute_packet_mirroring.go @@ -161,7 +161,7 @@ destination (egress) IP in the IP header. Only IPv4 is supported.`, "ip_protocols": { Type: schema.TypeList, Optional: true, - Description: `Protocols that apply as a filter on mirrored traffic.`, + Description: `Protocols that apply as a filter on mirrored traffic. Possible values: ["tcp", "udp", "icmp"]`, Elem: &schema.Schema{ Type: schema.TypeString, }, diff --git a/google-beta/resource_dialogflow_intent.go b/google-beta/resource_dialogflow_intent.go index 0ad2061483..90dcf115f3 100644 --- a/google-beta/resource_dialogflow_intent.go +++ b/google-beta/resource_dialogflow_intent.go @@ -60,7 +60,7 @@ Note: The action name must not contain whitespaces.`, Type: schema.TypeList, Optional: true, Description: `The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED -(i.e. default platform).`, +(i.e. default platform). Possible values: ["FACEBOOK", "SLACK", "TELEGRAM", "KIK", "SKYPE", "LINE", "VIBER", "ACTIONS_ON_GOOGLE", "GOOGLE_HANGOUTS"]`, Elem: &schema.Schema{ Type: schema.TypeString, }, diff --git a/google-beta/resource_filestore_instance.go b/google-beta/resource_filestore_instance.go index e6c870f03e..88770ecb98 100644 --- a/google-beta/resource_filestore_instance.go +++ b/google-beta/resource_filestore_instance.go @@ -136,7 +136,7 @@ only a single network is supported.`, Required: true, ForceNew: true, Description: `IP versions for which the instance has -IP addresses assigned.`, +IP addresses assigned. Possible values: ["ADDRESS_MODE_UNSPECIFIED", "MODE_IPV4", "MODE_IPV6"]`, Elem: &schema.Schema{ Type: schema.TypeString, }, diff --git a/google-beta/resource_os_config_patch_deployment.go b/google-beta/resource_os_config_patch_deployment.go index c68e297f02..52b6f0af1b 100644 --- a/google-beta/resource_os_config_patch_deployment.go +++ b/google-beta/resource_os_config_patch_deployment.go @@ -527,12 +527,14 @@ be executed directly, which will likely only succeed for scripts with shebang li Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "classifications": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{"CRITICAL", "SECURITY", "DEFINITION", "DRIVER", "FEATURE_PACK", "SERVICE_PACK", "TOOL", "UPDATE_ROLLUP", "UPDATE", ""}, false), - Description: `Only apply updates of these windows update classifications. If empty, all updates are applied. Possible values: ["CRITICAL", "SECURITY", "DEFINITION", "DRIVER", "FEATURE_PACK", "SERVICE_PACK", "TOOL", "UPDATE_ROLLUP", "UPDATE"]`, - AtLeastOneOf: []string{}, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `Only apply updates of these windows update classifications. If empty, all updates are applied. Possible values: ["CRITICAL", "SECURITY", "DEFINITION", "DRIVER", "FEATURE_PACK", "SERVICE_PACK", "TOOL", "UPDATE_ROLLUP", "UPDATE"]`, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + ExactlyOneOf: []string{}, }, "excludes": { Type: schema.TypeList, @@ -542,7 +544,7 @@ be executed directly, which will likely only succeed for scripts with shebang li Elem: &schema.Schema{ Type: schema.TypeString, }, - AtLeastOneOf: []string{}, + ExactlyOneOf: []string{}, }, "exclusive_patches": { Type: schema.TypeList, @@ -553,7 +555,7 @@ This field must not be used with other patch configurations.`, Elem: &schema.Schema{ Type: schema.TypeString, }, - AtLeastOneOf: []string{}, + ExactlyOneOf: []string{}, }, }, }, diff --git a/google-beta/resource_os_config_patch_deployment_generated_test.go b/google-beta/resource_os_config_patch_deployment_generated_test.go index 960fa564a5..5a66d93a81 100644 --- a/google-beta/resource_os_config_patch_deployment_generated_test.go +++ b/google-beta/resource_os_config_patch_deployment_generated_test.go @@ -229,7 +229,7 @@ resource "google_os_config_patch_deployment" "patch" { } windows_update { - exclusive_patches = ["KB4339284"] + classifications = ["CRITICAL", "SECURITY", "UPDATE"] } pre_step { diff --git a/google-beta/resource_security_scanner_scan_config.go b/google-beta/resource_security_scanner_scan_config.go index 19ca2d37d5..c3a7648b26 100644 --- a/google-beta/resource_security_scanner_scan_config.go +++ b/google-beta/resource_security_scanner_scan_config.go @@ -170,7 +170,7 @@ which means the scan will be scheduled to start immediately.`, "target_platforms": { Type: schema.TypeList, Optional: true, - Description: `Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.`, + Description: `Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be used as a default. Possible values: ["APP_ENGINE", "COMPUTE"]`, Elem: &schema.Schema{ Type: schema.TypeString, }, diff --git a/website/docs/r/access_context_manager_access_level.html.markdown b/website/docs/r/access_context_manager_access_level.html.markdown index cf5bd2addd..a609acd133 100644 --- a/website/docs/r/access_context_manager_access_level.html.markdown +++ b/website/docs/r/access_context_manager_access_level.html.markdown @@ -186,11 +186,13 @@ The `device_policy` block supports: (Optional) A list of allowed encryptions statuses. An empty list allows all statuses. + Each value may be one of `ENCRYPTION_UNSPECIFIED`, `ENCRYPTION_UNSUPPORTED`, `UNENCRYPTED`, and `ENCRYPTED`. * `allowed_device_management_levels` - (Optional) A list of allowed device management levels. An empty list allows all management levels. + Each value may be one of `MANAGEMENT_UNSPECIFIED`, `NONE`, `BASIC`, and `COMPLETE`. * `os_constraints` - (Optional) diff --git a/website/docs/r/compute_packet_mirroring.html.markdown b/website/docs/r/compute_packet_mirroring.html.markdown index dc8594ca71..f626ed6f61 100644 --- a/website/docs/r/compute_packet_mirroring.html.markdown +++ b/website/docs/r/compute_packet_mirroring.html.markdown @@ -231,6 +231,7 @@ The `filter` block supports: * `ip_protocols` - (Optional) Protocols that apply as a filter on mirrored traffic. + Each value may be one of `tcp`, `udp`, and `icmp`. * `cidr_ranges` - (Optional) diff --git a/website/docs/r/dialogflow_intent.html.markdown b/website/docs/r/dialogflow_intent.html.markdown index 462154e2e9..6a75d79a28 100644 --- a/website/docs/r/dialogflow_intent.html.markdown +++ b/website/docs/r/dialogflow_intent.html.markdown @@ -163,6 +163,7 @@ The following arguments are supported: (Optional) The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + Each value may be one of `FACEBOOK`, `SLACK`, `TELEGRAM`, `KIK`, `SKYPE`, `LINE`, `VIBER`, `ACTIONS_ON_GOOGLE`, and `GOOGLE_HANGOUTS`. * `parent_followup_intent_name` - (Optional) diff --git a/website/docs/r/filestore_instance.html.markdown b/website/docs/r/filestore_instance.html.markdown index 35cacc2973..ba32099919 100644 --- a/website/docs/r/filestore_instance.html.markdown +++ b/website/docs/r/filestore_instance.html.markdown @@ -192,6 +192,7 @@ The `networks` block supports: (Required) IP versions for which the instance has IP addresses assigned. + Each value may be one of `ADDRESS_MODE_UNSPECIFIED`, `MODE_IPV4`, and `MODE_IPV6`. * `reserved_ip_range` - (Optional) diff --git a/website/docs/r/os_config_patch_deployment.html.markdown b/website/docs/r/os_config_patch_deployment.html.markdown index 12a724848e..8b8db88bb0 100644 --- a/website/docs/r/os_config_patch_deployment.html.markdown +++ b/website/docs/r/os_config_patch_deployment.html.markdown @@ -180,7 +180,7 @@ resource "google_os_config_patch_deployment" "patch" { } windows_update { - exclusive_patches = ["KB4339284"] + classifications = ["CRITICAL", "SECURITY", "UPDATE"] } pre_step { @@ -442,7 +442,7 @@ The `windows_update` block supports: * `classifications` - (Optional) Only apply updates of these windows update classifications. If empty, all updates are applied. - Possible values are `CRITICAL`, `SECURITY`, `DEFINITION`, `DRIVER`, `FEATURE_PACK`, `SERVICE_PACK`, `TOOL`, `UPDATE_ROLLUP`, and `UPDATE`. + Each value may be one of `CRITICAL`, `SECURITY`, `DEFINITION`, `DRIVER`, `FEATURE_PACK`, `SERVICE_PACK`, `TOOL`, `UPDATE_ROLLUP`, and `UPDATE`. * `excludes` - (Optional) diff --git a/website/docs/r/security_scanner_scan_config.html.markdown b/website/docs/r/security_scanner_scan_config.html.markdown index f28e0453b9..8b94a368d7 100644 --- a/website/docs/r/security_scanner_scan_config.html.markdown +++ b/website/docs/r/security_scanner_scan_config.html.markdown @@ -110,6 +110,7 @@ The following arguments are supported: * `target_platforms` - (Optional) Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be used as a default. + Each value may be one of `APP_ENGINE` and `COMPUTE`. * `export_to_security_command_center` - (Optional)