From 88cf20193ad260e08289f8627f31be26c8781401 Mon Sep 17 00:00:00 2001 From: PacoDw <__pm@outlook.com> Date: Wed, 11 Sep 2019 13:14:02 -0500 Subject: [PATCH 1/4] fix: add project_id value to the state chore: change error comment --- .../resource_mongodbatlas_project_ip_whitelist.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mongodbatlas/resource_mongodbatlas_project_ip_whitelist.go b/mongodbatlas/resource_mongodbatlas_project_ip_whitelist.go index 56c91e7745..0ac8f1accf 100644 --- a/mongodbatlas/resource_mongodbatlas_project_ip_whitelist.go +++ b/mongodbatlas/resource_mongodbatlas_project_ip_whitelist.go @@ -175,16 +175,20 @@ func resourceMongoDBAtlasProjectIPWhitelistImportState(d *schema.ResourceData, m entries = append(entries, entry) }) + if err := d.Set("project_id", d.Id()); err != nil { + log.Printf("[WARN] Error setting project_id for (%s): %s", d.Id(), err) + return []*schema.ResourceData{d}, err + } + if err := d.Set("whitelist", flattenProjectIPWhitelist(whitelist)); err != nil { + log.Printf("[WARN] Error setting whitelist for (%s): %s", d.Id(), err) + return []*schema.ResourceData{d}, err + } + d.SetId(encodeStateID(map[string]string{ "project_id": d.Id(), "entries": strings.Join(entries, ","), })) - if err := d.Set("whitelist", flattenProjectIPWhitelist(whitelist)); err != nil { - log.Printf("[WARN] Error setting project_id for (%s): %s", d.Id(), err) - return []*schema.ResourceData{d}, err - } - return []*schema.ResourceData{d}, nil } From 57b0479e5d6038f5799533b0b79140e4f381a8d3 Mon Sep 17 00:00:00 2001 From: Marin Salinas Date: Thu, 12 Sep 2019 16:29:24 -0500 Subject: [PATCH 2/4] website: make resources side nav expanded as default --- website/mongodbatlas.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/mongodbatlas.erb b/website/mongodbatlas.erb index 961783de6c..b2d75571cb 100644 --- a/website/mongodbatlas.erb +++ b/website/mongodbatlas.erb @@ -54,7 +54,7 @@ > Resources -