Skip to content

Commit

Permalink
Ensure Elem is always either a *Schema or *Resource (hashicorp#929)
Browse files Browse the repository at this point in the history
* Ensure Elem is always either a *Schema or *Resource

* Revert vendor file
  • Loading branch information
jimmy-btn authored and danawillow committed Jan 8, 2018
1 parent a767b11 commit a335265
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion google/data_source_storage_object_signed_url.go
Expand Up @@ -62,7 +62,7 @@ func dataSourceGoogleSignedUrl() *schema.Resource {
"extension_headers": &schema.Schema{
Type: schema.TypeMap,
Optional: true,
Elem: schema.TypeString,
Elem: &schema.Schema{Type: schema.TypeString},
ValidateFunc: validateExtensionHeaders,
},
"http_method": &schema.Schema{
Expand Down
4 changes: 2 additions & 2 deletions google/node_config.go
Expand Up @@ -33,7 +33,7 @@ var schemaNodeConfig = &schema.Schema{
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Elem: schema.TypeString,
Elem: &schema.Schema{Type: schema.TypeString},
},

"local_ssd_count": {
Expand All @@ -55,7 +55,7 @@ var schemaNodeConfig = &schema.Schema{
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Elem: schema.TypeString,
Elem: &schema.Schema{Type: schema.TypeString},
},

"min_cpu_platform": {
Expand Down
2 changes: 1 addition & 1 deletion google/resource_bigquery_dataset.go
Expand Up @@ -105,7 +105,7 @@ func resourceBigQueryDataset() *schema.Resource {
"labels": &schema.Schema{
Type: schema.TypeMap,
Optional: true,
Elem: schema.TypeString,
Elem: &schema.Schema{Type: schema.TypeString},
},

// SelfLink: [Output-only] A URL that can be used to access the resource
Expand Down
2 changes: 1 addition & 1 deletion google/resource_bigquery_table.go
Expand Up @@ -78,7 +78,7 @@ func resourceBigQueryTable() *schema.Resource {
"labels": &schema.Schema{
Type: schema.TypeMap,
Optional: true,
Elem: schema.TypeString,
Elem: &schema.Schema{Type: schema.TypeString},
},

// Schema: [Optional] Describes the schema of this table.
Expand Down
2 changes: 1 addition & 1 deletion google/resource_compute_instance.go
Expand Up @@ -271,7 +271,7 @@ func resourceComputeInstance() *schema.Resource {
"metadata": &schema.Schema{
Type: schema.TypeMap,
Optional: true,
Elem: schema.TypeString,
Elem: &schema.Schema{Type: schema.TypeString},
},

"metadata_startup_script": &schema.Schema{
Expand Down
2 changes: 1 addition & 1 deletion google/resource_compute_project_metadata.go
Expand Up @@ -22,7 +22,7 @@ func resourceComputeProjectMetadata() *schema.Resource {

Schema: map[string]*schema.Schema{
"metadata": &schema.Schema{
Elem: schema.TypeString,
Elem: &schema.Schema{Type: schema.TypeString},
Type: schema.TypeMap,
Required: true,
},
Expand Down
4 changes: 2 additions & 2 deletions google/resource_dataproc_cluster.go
Expand Up @@ -76,7 +76,7 @@ func resourceDataprocCluster() *schema.Resource {
"labels": {
Type: schema.TypeMap,
Optional: true,
Elem: schema.TypeString,
Elem: &schema.Schema{Type: schema.TypeString},
// GCP automatically adds two labels
// 'goog-dataproc-cluster-uuid'
// 'goog-dataproc-cluster-name'
Expand Down Expand Up @@ -257,7 +257,7 @@ func resourceDataprocCluster() *schema.Resource {
Type: schema.TypeMap,
Optional: true,
ForceNew: true,
Elem: schema.TypeString,
Elem: &schema.Schema{Type: schema.TypeString},
},

"properties": {
Expand Down
2 changes: 1 addition & 1 deletion google/resource_pubsub_subscription.go
Expand Up @@ -61,7 +61,7 @@ func resourcePubsubSubscription() *schema.Resource {
"attributes": &schema.Schema{
Type: schema.TypeMap,
Optional: true,
Elem: schema.TypeString,
Elem: &schema.Schema{Type: schema.TypeString},
},

"push_endpoint": &schema.Schema{
Expand Down

0 comments on commit a335265

Please sign in to comment.