mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
Merge pull request #10702 from hashicorp/pr-10694
provider/aws: Save `iam_access_key` secret to state if no PGP key given (supersedes #10694)
This commit is contained in:
commit
b2136beff2
@ -91,6 +91,10 @@ func resourceAwsIamAccessKeyCreate(d *schema.ResourceData, meta interface{}) err
|
||||
|
||||
d.Set("key_fingerprint", fingerprint)
|
||||
d.Set("encrypted_secret", encrypted)
|
||||
} else {
|
||||
if err := d.Set("secret", createResp.AccessKey.SecretAccessKey); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
d.Set("ses_smtp_password",
|
||||
|
@ -29,6 +29,7 @@ func TestAccAWSAccessKey_basic(t *testing.T) {
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAWSAccessKeyExists("aws_iam_access_key.a_key", &conf),
|
||||
testAccCheckAWSAccessKeyAttributes(&conf),
|
||||
resource.TestCheckResourceAttrSet("aws_iam_access_key.a_key", "secret"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user