diff --git a/.changelog/5198.txt b/.changelog/5198.txt new file mode 100644 index 00000000000..8ec013c0699 --- /dev/null +++ b/.changelog/5198.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google/resource_assured_workloads_workload.go b/google/resource_assured_workloads_workload.go index ad2c4e16d7e..57595d275a0 100644 --- a/google/resource_assured_workloads_workload.go +++ b/google/resource_assured_workloads_workload.go @@ -22,7 +22,6 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" dcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl" assuredworkloads "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/assuredworkloads" @@ -55,11 +54,10 @@ func resourceAssuredWorkloadsWorkload() *schema.Resource { }, "compliance_regime": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Description: "Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS", - ValidateFunc: validation.StringInSlice([]string{"COMPLIANCE_REGIME_UNSPECIFIED", "IL4", "CJIS", "FEDRAMP_HIGH", "FEDRAMP_MODERATE", "US_REGIONAL_ACCESS", ""}, false), + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS", }, "display_name": { @@ -167,11 +165,10 @@ func AssuredWorkloadsWorkloadResourceSettingsSchema() *schema.Resource { }, "resource_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Description: "Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) Possible values: RESOURCE_TYPE_UNSPECIFIED, CONSUMER_PROJECT, ENCRYPTION_KEYS_PROJECT, KEYRING, CONSUMER_FOLDER", - ValidateFunc: validation.StringInSlice([]string{"RESOURCE_TYPE_UNSPECIFIED", "CONSUMER_PROJECT", "ENCRYPTION_KEYS_PROJECT", "KEYRING", "CONSUMER_FOLDER", ""}, false), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: "Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) Possible values: RESOURCE_TYPE_UNSPECIFIED, CONSUMER_PROJECT, ENCRYPTION_KEYS_PROJECT, KEYRING, CONSUMER_FOLDER", }, }, } diff --git a/google/resource_composer_environment.go b/google/resource_composer_environment.go index fcee2760325..7a9d37a9e3a 100644 --- a/google/resource_composer_environment.go +++ b/google/resource_composer_environment.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-version" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "google.golang.org/api/composer/v1beta1" + composer "google.golang.org/api/composer/v1beta1" ) const ( diff --git a/google/resource_compute_firewall_policy_rule.go b/google/resource_compute_firewall_policy_rule.go index cc2dd87b68f..f9d8094ca71 100644 --- a/google/resource_compute_firewall_policy_rule.go +++ b/google/resource_compute_firewall_policy_rule.go @@ -22,7 +22,6 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" dcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl" compute "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/compute" @@ -53,10 +52,9 @@ func resourceComputeFirewallPolicyRule() *schema.Resource { }, "direction": { - Type: schema.TypeString, - Required: true, - Description: "The direction in which this rule applies. Possible values: INGRESS, EGRESS", - ValidateFunc: validation.StringInSlice([]string{"INGRESS", "EGRESS", ""}, false), + Type: schema.TypeString, + Required: true, + Description: "The direction in which this rule applies. Possible values: INGRESS, EGRESS", }, "firewall_policy": { diff --git a/google/resource_compute_forwarding_rule.go b/google/resource_compute_forwarding_rule.go index 5f77fb10b70..4ea059cb55b 100644 --- a/google/resource_compute_forwarding_rule.go +++ b/google/resource_compute_forwarding_rule.go @@ -22,7 +22,6 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" dcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl" compute "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/compute" @@ -97,7 +96,6 @@ func resourceComputeForwardingRule() *schema.Resource { ForceNew: true, DiffSuppressFunc: caseDiffSuppress, Description: "The IP protocol to which this rule applies. For protocol forwarding, valid options are `TCP`, `UDP`, `ESP`, `AH`, `SCTP` or `ICMP`. For Internal TCP/UDP Load Balancing, the load balancing scheme is `INTERNAL`, and one of `TCP` or `UDP` are valid. For Traffic Director, the load balancing scheme is `INTERNAL_SELF_MANAGED`, and only `TCP`is valid. For Internal HTTP(S) Load Balancing, the load balancing scheme is `INTERNAL_MANAGED`, and only `TCP` is valid. For HTTP(S), SSL Proxy, and TCP Proxy Load Balancing, the load balancing scheme is `EXTERNAL` and only `TCP` is valid. For Network TCP/UDP Load Balancing, the load balancing scheme is `EXTERNAL`, and one of `TCP` or `UDP` is valid.", - ValidateFunc: validation.StringInSlice([]string{"TCP", "UDP", "ESP", "AH", "SCTP", "ICMP", "L3_DEFAULT", ""}, false), }, "is_mirroring_collector": { @@ -115,12 +113,11 @@ func resourceComputeForwardingRule() *schema.Resource { }, "load_balancing_scheme": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Description: "Specifies the forwarding rule type.\n\n* `EXTERNAL` is used for:\n * Classic Cloud VPN gateways\n * Protocol forwarding to VMs from an external IP address\n * The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP\n* `INTERNAL` is used for:\n * Protocol forwarding to VMs from an internal IP address\n * Internal TCP/UDP load balancers\n* `INTERNAL_MANAGED` is used for:\n * Internal HTTP(S) load balancers\n* `INTERNAL_SELF_MANAGED` is used for:\n * Traffic Director\n\nFor more information about forwarding rules, refer to [Forwarding rule concepts](/load-balancing/docs/forwarding-rule-concepts). Possible values: INVALID, INTERNAL, INTERNAL_MANAGED, INTERNAL_SELF_MANAGED, EXTERNAL", - Default: "EXTERNAL", - ValidateFunc: validation.StringInSlice([]string{"INVALID", "INTERNAL", "INTERNAL_MANAGED", "INTERNAL_SELF_MANAGED", "EXTERNAL", ""}, false), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: "Specifies the forwarding rule type.\n\n* `EXTERNAL` is used for:\n * Classic Cloud VPN gateways\n * Protocol forwarding to VMs from an external IP address\n * The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP\n* `INTERNAL` is used for:\n * Protocol forwarding to VMs from an internal IP address\n * Internal TCP/UDP load balancers\n* `INTERNAL_MANAGED` is used for:\n * Internal HTTP(S) load balancers\n* `INTERNAL_SELF_MANAGED` is used for:\n * Traffic Director\n\nFor more information about forwarding rules, refer to [Forwarding rule concepts](/load-balancing/docs/forwarding-rule-concepts). Possible values: INVALID, INTERNAL, INTERNAL_MANAGED, INTERNAL_SELF_MANAGED, EXTERNAL", + Default: "EXTERNAL", }, "network": { @@ -133,12 +130,11 @@ func resourceComputeForwardingRule() *schema.Resource { }, "network_tier": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - Description: "This signifies the networking tier used for configuring this load balancer and can only take the following values: `PREMIUM`, `STANDARD`. For regional ForwardingRule, the valid values are `PREMIUM` and `STANDARD`. For GlobalForwardingRule, the valid value is `PREMIUM`. If this field is not specified, it is assumed to be `PREMIUM`. If `IPAddress` is specified, this value must be equal to the networkTier of the Address.", - ValidateFunc: validation.StringInSlice([]string{"PREMIUM", "STANDARD", ""}, false), + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + Description: "This signifies the networking tier used for configuring this load balancer and can only take the following values: `PREMIUM`, `STANDARD`. For regional ForwardingRule, the valid values are `PREMIUM` and `STANDARD`. For GlobalForwardingRule, the valid value is `PREMIUM`. If this field is not specified, it is assumed to be `PREMIUM`. If `IPAddress` is specified, this value must be equal to the networkTier of the Address.", }, "port_range": { diff --git a/google/resource_compute_global_forwarding_rule.go b/google/resource_compute_global_forwarding_rule.go index 04dbfdff4fd..0413e662458 100644 --- a/google/resource_compute_global_forwarding_rule.go +++ b/google/resource_compute_global_forwarding_rule.go @@ -22,7 +22,6 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" dcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl" compute "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/compute" @@ -83,15 +82,13 @@ func resourceComputeGlobalForwardingRule() *schema.Resource { ForceNew: true, DiffSuppressFunc: caseDiffSuppress, Description: "The IP protocol to which this rule applies. For protocol forwarding, valid options are `TCP`, `UDP`, `ESP`, `AH`, `SCTP` or `ICMP`. For Internal TCP/UDP Load Balancing, the load balancing scheme is `INTERNAL`, and one of `TCP` or `UDP` are valid. For Traffic Director, the load balancing scheme is `INTERNAL_SELF_MANAGED`, and only `TCP`is valid. For Internal HTTP(S) Load Balancing, the load balancing scheme is `INTERNAL_MANAGED`, and only `TCP` is valid. For HTTP(S), SSL Proxy, and TCP Proxy Load Balancing, the load balancing scheme is `EXTERNAL` and only `TCP` is valid. For Network TCP/UDP Load Balancing, the load balancing scheme is `EXTERNAL`, and one of `TCP` or `UDP` is valid.", - ValidateFunc: validation.StringInSlice([]string{"TCP", "UDP", "ESP", "AH", "SCTP", "ICMP", "L3_DEFAULT", ""}, false), }, "ip_version": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Description: "The IP Version that will be used by this forwarding rule. Valid options are `IPV4` or `IPV6`. This can only be specified for an external global forwarding rule. Possible values: UNSPECIFIED_VERSION, IPV4, IPV6", - ValidateFunc: validation.StringInSlice([]string{"UNSPECIFIED_VERSION", "IPV4", "IPV6", ""}, false), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: "The IP Version that will be used by this forwarding rule. Valid options are `IPV4` or `IPV6`. This can only be specified for an external global forwarding rule. Possible values: UNSPECIFIED_VERSION, IPV4, IPV6", }, "labels": { @@ -102,12 +99,11 @@ func resourceComputeGlobalForwardingRule() *schema.Resource { }, "load_balancing_scheme": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Description: "Specifies the forwarding rule type.\n\n* `EXTERNAL` is used for:\n * Classic Cloud VPN gateways\n * Protocol forwarding to VMs from an external IP address\n * The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP\n* `INTERNAL` is used for:\n * Protocol forwarding to VMs from an internal IP address\n * Internal TCP/UDP load balancers\n* `INTERNAL_MANAGED` is used for:\n * Internal HTTP(S) load balancers\n* `INTERNAL_SELF_MANAGED` is used for:\n * Traffic Director\n\nFor more information about forwarding rules, refer to [Forwarding rule concepts](/load-balancing/docs/forwarding-rule-concepts). Possible values: INVALID, INTERNAL, INTERNAL_MANAGED, INTERNAL_SELF_MANAGED, EXTERNAL", - Default: "EXTERNAL", - ValidateFunc: validation.StringInSlice([]string{"INVALID", "INTERNAL", "INTERNAL_MANAGED", "INTERNAL_SELF_MANAGED", "EXTERNAL", ""}, false), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: "Specifies the forwarding rule type.\n\n* `EXTERNAL` is used for:\n * Classic Cloud VPN gateways\n * Protocol forwarding to VMs from an external IP address\n * The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP\n* `INTERNAL` is used for:\n * Protocol forwarding to VMs from an internal IP address\n * Internal TCP/UDP load balancers\n* `INTERNAL_MANAGED` is used for:\n * Internal HTTP(S) load balancers\n* `INTERNAL_SELF_MANAGED` is used for:\n * Traffic Director\n\nFor more information about forwarding rules, refer to [Forwarding rule concepts](/load-balancing/docs/forwarding-rule-concepts). Possible values: INVALID, INTERNAL, INTERNAL_MANAGED, INTERNAL_SELF_MANAGED, EXTERNAL", + Default: "EXTERNAL", }, "metadata_filters": { @@ -173,11 +169,10 @@ func ComputeGlobalForwardingRuleMetadataFilterSchema() *schema.Resource { }, "filter_match_criteria": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Description: "Specifies how individual `filterLabel` matches within the list of `filterLabel`s contribute towards the overall `metadataFilter` match.\n\nSupported values are:\n\n* MATCH_ANY: At least one of the `filterLabels` must have a matching label in the provided metadata.\n* MATCH_ALL: All `filterLabels` must have matching labels in the provided metadata. Possible values: NOT_SET, MATCH_ALL, MATCH_ANY", - ValidateFunc: validation.StringInSlice([]string{"NOT_SET", "MATCH_ALL", "MATCH_ANY", ""}, false), + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Specifies how individual `filterLabel` matches within the list of `filterLabel`s contribute towards the overall `metadataFilter` match.\n\nSupported values are:\n\n* MATCH_ANY: At least one of the `filterLabels` must have a matching label in the provided metadata.\n* MATCH_ALL: All `filterLabels` must have matching labels in the provided metadata. Possible values: NOT_SET, MATCH_ALL, MATCH_ANY", }, }, } diff --git a/google/resource_dataproc_workflow_template.go b/google/resource_dataproc_workflow_template.go index d3ff4dd7081..872e867eae9 100644 --- a/google/resource_dataproc_workflow_template.go +++ b/google/resource_dataproc_workflow_template.go @@ -22,7 +22,6 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" dcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl" dataproc "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/dataproc" @@ -1115,11 +1114,10 @@ func DataprocWorkflowTemplateClusterInstanceGroupConfigSchema() *schema.Resource }, "preemptibility": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Description: "Optional. Specifies the preemptibility of the instance group. The default value for master and worker groups is `NON_PREEMPTIBLE`. This default cannot be changed. The default value for secondary instances is `PREEMPTIBLE`. Possible values: PREEMPTIBILITY_UNSPECIFIED, NON_PREEMPTIBLE, PREEMPTIBLE", - ValidateFunc: validation.StringInSlice([]string{"PREEMPTIBILITY_UNSPECIFIED", "NON_PREEMPTIBLE", "PREEMPTIBLE", ""}, false), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: "Optional. Specifies the preemptibility of the instance group. The default value for master and worker groups is `NON_PREEMPTIBLE`. This default cannot be changed. The default value for secondary instances is `PREEMPTIBLE`. Possible values: PREEMPTIBILITY_UNSPECIFIED, NON_PREEMPTIBLE, PREEMPTIBLE", }, "instance_names": { @@ -1416,11 +1414,10 @@ func DataprocWorkflowTemplateClusterClusterConfigGceClusterConfigSchema() *schem }, "private_ipv6_google_access": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Description: "Optional. The type of IPv6 access for a cluster. Possible values: PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED, INHERIT_FROM_SUBNETWORK, OUTBOUND, BIDIRECTIONAL", - ValidateFunc: validation.StringInSlice([]string{"PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED", "INHERIT_FROM_SUBNETWORK", "OUTBOUND", "BIDIRECTIONAL", ""}, false), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: "Optional. The type of IPv6 access for a cluster. Possible values: PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED, INHERIT_FROM_SUBNETWORK, OUTBOUND, BIDIRECTIONAL", }, "reservation_affinity": { @@ -1493,11 +1490,10 @@ func DataprocWorkflowTemplateClusterClusterConfigGceClusterConfigReservationAffi return &schema.Resource{ Schema: map[string]*schema.Schema{ "consume_reservation_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Description: "Optional. Type of reservation to consume Possible values: TYPE_UNSPECIFIED, NO_RESERVATION, ANY_RESERVATION, SPECIFIC_RESERVATION", - ValidateFunc: validation.StringInSlice([]string{"TYPE_UNSPECIFIED", "NO_RESERVATION", "ANY_RESERVATION", "SPECIFIC_RESERVATION", ""}, false), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: "Optional. Type of reservation to consume Possible values: TYPE_UNSPECIFIED, NO_RESERVATION, ANY_RESERVATION, SPECIFIC_RESERVATION", }, "key": {