From 5312cfcb4e8f9db8d3aaa722fe8bdce7c6132f39 Mon Sep 17 00:00:00 2001 From: Sam Yuen Date: Tue, 12 Dec 2023 16:28:24 -0800 Subject: [PATCH] Fix parsing error when using assume_role --- provider/provider.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/provider/provider.go b/provider/provider.go index 18d8693..42440ac 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -153,13 +153,12 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { profile := d.Get("profile").(string) region := d.Get("region").(string) endpoint := d.Get("dynamodb_endpoint").(string) - assume_role_config := d.Get("assume_role").([]interface{}) + assume_role_config := d.Get("assume_role").(map[string]interface{}) validate := d.Get("validate").(bool) role_arn := "" if len(assume_role_config) > 0 { - configmap := assume_role_config[0].(map[string]interface{}) - if v, ok := configmap["role_arn"].(string); ok && v != "" { + if v, ok := assume_role_config["role_arn"].(string); ok && v != "" { role_arn = v } }