Skip to content

Commit

Permalink
Fixed validation of service_level_indicator.0.windows_based_sli.0.met…
Browse files Browse the repository at this point in the history
…ric_sum_in_range.0.range.0.max (#3826)

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Aug 7, 2020
1 parent a87422d commit 5685ca1
Show file tree
Hide file tree
Showing 22 changed files with 1,435 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .changelog/3826.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
monitoring: fixed validation rules for `google_monitoring_slo` `windows_based_sli.metric_sum_in_range.max` field
```
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ func dataSourceGoogleContainerEngineVersions() *schema.Resource {
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},

"release_channel_default_version": {
Type: schema.TypeMap,
Computed: true,
Expand Down
5 changes: 3 additions & 2 deletions google-beta/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,9 @@ func Provider() terraform.ResourceProvider {
return provider
}

// Generated resources: 179
// Generated resources: 180
// Generated IAM resources: 66
// Total generated resources: 245
// Total generated resources: 246
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -786,6 +786,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_compute_network_endpoint_group": resourceComputeNetworkEndpointGroup(),
"google_compute_global_network_endpoint": resourceComputeGlobalNetworkEndpoint(),
"google_compute_global_network_endpoint_group": resourceComputeGlobalNetworkEndpointGroup(),
"google_compute_region_network_endpoint_group": resourceComputeRegionNetworkEndpointGroup(),
"google_compute_node_group": resourceComputeNodeGroup(),
"google_compute_network_peering_routes_config": resourceComputeNetworkPeeringRoutesConfig(),
"google_compute_node_template": resourceComputeNodeTemplate(),
Expand Down
6 changes: 4 additions & 2 deletions google-beta/resource_access_context_manager_access_level.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ allowed.`,
Description: `A list of allowed device management levels.
An empty list allows all management levels. Possible values: ["MANAGEMENT_UNSPECIFIED", "NONE", "BASIC", "COMPLETE"]`,
Elem: &schema.Schema{
Type: schema.TypeString,
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{"MANAGEMENT_UNSPECIFIED", "NONE", "BASIC", "COMPLETE"}, false),
},
},
"allowed_encryption_statuses": {
Expand All @@ -101,7 +102,8 @@ An empty list allows all management levels. Possible values: ["MANAGEMENT_UNSPEC
Description: `A list of allowed encryptions statuses.
An empty list allows all statuses. Possible values: ["ENCRYPTION_UNSPECIFIED", "ENCRYPTION_UNSUPPORTED", "UNENCRYPTED", "ENCRYPTED"]`,
Elem: &schema.Schema{
Type: schema.TypeString,
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{"ENCRYPTION_UNSPECIFIED", "ENCRYPTION_UNSUPPORTED", "UNENCRYPTED", "ENCRYPTED"}, false),
},
},
"os_constraints": {
Expand Down
5 changes: 3 additions & 2 deletions google-beta/resource_app_engine_flexible_app_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,10 @@ All URLs that begin with this prefix are handled by this handler, using the port
"inbound_services": {
Type: schema.TypeSet,
Optional: true,
Description: `Before an application can receive email or XMPP messages, the application must be configured to enable the service.`,
Description: `A list of the types of messages that this application is able to receive. Possible values: ["INBOUND_SERVICE_MAIL", "INBOUND_SERVICE_MAIL_BOUNCE", "INBOUND_SERVICE_XMPP_ERROR", "INBOUND_SERVICE_XMPP_MESSAGE", "INBOUND_SERVICE_XMPP_SUBSCRIBE", "INBOUND_SERVICE_XMPP_PRESENCE", "INBOUND_SERVICE_CHANNEL_PRESENCE", "INBOUND_SERVICE_WARMUP"]`,
Elem: &schema.Schema{
Type: schema.TypeString,
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{"INBOUND_SERVICE_MAIL", "INBOUND_SERVICE_MAIL_BOUNCE", "INBOUND_SERVICE_XMPP_ERROR", "INBOUND_SERVICE_XMPP_MESSAGE", "INBOUND_SERVICE_XMPP_SUBSCRIBE", "INBOUND_SERVICE_XMPP_PRESENCE", "INBOUND_SERVICE_CHANNEL_PRESENCE", "INBOUND_SERVICE_WARMUP"}, false),
},
Set: schema.HashString,
},
Expand Down
5 changes: 3 additions & 2 deletions google-beta/resource_app_engine_standard_app_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,10 @@ All URLs that begin with this prefix are handled by this handler, using the port
"inbound_services": {
Type: schema.TypeSet,
Optional: true,
Description: `Before an application can receive email or XMPP messages, the application must be configured to enable the service.`,
Description: `A list of the types of messages that this application is able to receive. Possible values: ["INBOUND_SERVICE_MAIL", "INBOUND_SERVICE_MAIL_BOUNCE", "INBOUND_SERVICE_XMPP_ERROR", "INBOUND_SERVICE_XMPP_MESSAGE", "INBOUND_SERVICE_XMPP_SUBSCRIBE", "INBOUND_SERVICE_XMPP_PRESENCE", "INBOUND_SERVICE_CHANNEL_PRESENCE", "INBOUND_SERVICE_WARMUP"]`,
Elem: &schema.Schema{
Type: schema.TypeString,
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{"INBOUND_SERVICE_MAIL", "INBOUND_SERVICE_MAIL_BOUNCE", "INBOUND_SERVICE_XMPP_ERROR", "INBOUND_SERVICE_XMPP_MESSAGE", "INBOUND_SERVICE_XMPP_SUBSCRIBE", "INBOUND_SERVICE_XMPP_PRESENCE", "INBOUND_SERVICE_CHANNEL_PRESENCE", "INBOUND_SERVICE_WARMUP"}, false),
},
Set: schema.HashString,
},
Expand Down
7 changes: 4 additions & 3 deletions google-beta/resource_artifact_registry_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,10 @@ func resourceArtifactRegistryRepositoryDelete(d *schema.ResourceData, meta inter
func resourceArtifactRegistryRepositoryImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
config := meta.(*Config)
if err := parseImportId([]string{
"projects/(?P<project>[^/]+)/locations/(?P<location>[^/]+)/repositories/(?P<name>[^/]+)",
"(?P<project>[^/]+)/(?P<location>[^/]+)/(?P<name>[^/]+)",
"(?P<location>[^/]+)/(?P<name>[^/]+)",
"projects/(?P<project>[^/]+)/locations/(?P<location>[^/]+)/repositories/(?P<repository_id>[^/]+)",
"(?P<project>[^/]+)/(?P<location>[^/]+)/(?P<repository_id>[^/]+)",
"(?P<location>[^/]+)/(?P<repository_id>[^/]+)",
"(?P<repository_id>[^/]+)",
}, d, config); err != nil {
return nil, err
}
Expand Down
4 changes: 3 additions & 1 deletion google-beta/resource_compute_packet_mirroring.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"time"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
)

func resourceComputePacketMirroring() *schema.Resource {
Expand Down Expand Up @@ -163,7 +164,8 @@ destination (egress) IP in the IP header. Only IPv4 is supported.`,
Optional: true,
Description: `Protocols that apply as a filter on mirrored traffic. Possible values: ["tcp", "udp", "icmp"]`,
Elem: &schema.Schema{
Type: schema.TypeString,
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{"tcp", "udp", "icmp"}, false),
},
},
},
Expand Down
Loading

0 comments on commit 5685ca1

Please sign in to comment.