Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure Elem is always either a *Schema or *Resource #929

Merged
merged 2 commits into from Jan 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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