Skip to content

Commit

Permalink
fix wrong ARN output for aws_ssm_parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
smittnacht committed Jan 31, 2018
1 parent 2c027cb commit 7ce1096
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aws/data_source_aws_ssm_parameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package aws
import (
"fmt"
"log"
"strings"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/arn"
Expand Down Expand Up @@ -72,7 +73,7 @@ func dataAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error {
Region: meta.(*AWSClient).region,
Service: "ssm",
AccountID: meta.(*AWSClient).accountid,
Resource: fmt.Sprintf("parameter/%s", d.Id()),
Resource: fmt.Sprintf("parameter/%s", strings.TrimPrefix(d.Id(), "/")),
}
d.Set("arn", arn.String())

Expand Down

0 comments on commit 7ce1096

Please sign in to comment.