Skip to content

Commit e703054

Browse files
Merge pull request #219 in ORC/terraform-provider from api_key_fix to dev
Squashed commit of the following: commit 0a71f8db84f476db53297c9cc1082009fe36fb0b Author: Brian Gustafson <[email protected]> Date: Wed May 9 17:30:10 2018 -0700 Fix crash when API key not found Fix for https://jira-sd.mc1.oracleiaas.com/browse/TOP-35. I don't have a test case to cover this, and it is a general class of changes that we are not testing: changes to resources that happen outside of TF. Something to consider for the future as a type of test that would be good to add. I'll open a JIRA to track.
1 parent 644da6c commit e703054

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

provider/identity_api_key_resource.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package provider
44

55
import (
66
"context"
7+
"errors"
78
"regexp"
89

910
"github.com/hashicorp/terraform/helper/schema"
@@ -179,7 +180,7 @@ func (s *ApiKeyResourceCrud) Get() error {
179180
}
180181
}
181182

182-
return nil
183+
return errors.New("API key not found")
183184
}
184185

185186
func (s *ApiKeyResourceCrud) Delete() error {

0 commit comments

Comments
 (0)