diff --git a/builtin/providers/aws/resource_aws_iam_access_key.go b/builtin/providers/aws/resource_aws_iam_access_key.go index 3aaf64ee9..4a8dd3d3d 100644 --- a/builtin/providers/aws/resource_aws_iam_access_key.go +++ b/builtin/providers/aws/resource_aws_iam_access_key.go @@ -72,6 +72,10 @@ func resourceAwsIamAccessKeyCreate(d *schema.ResourceData, meta interface{}) err ) } + if err := d.Set("secret", createResp.AccessKey.SecretAccessKey); err != nil { + return err + } + d.SetId(*createResp.AccessKey.AccessKeyId) if createResp.AccessKey == nil || createResp.AccessKey.SecretAccessKey == nil {