Data Source: awsIamUserSshKey
Use this data source to get information about a SSH public key associated with the specified IAM user.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsIamUserSshKey.DataAwsIamUserSshKey(this, "example", {
encoding: "SSH",
sshPublicKeyId: "APKARUZ32GUTKIGARLXE",
username: "test-user",
});
Argument Reference
encoding
- (Required) Specifies the public key encoding format to use in the response. To retrieve the public key in ssh-rsa format, usessh
. To retrieve the public key in PEM format, usepem
.sshPublicKeyId
- (Required) Unique identifier for the SSH public key.username
- (Required) Name of the IAM user associated with the SSH public key.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
fingerprint
- MD5 message digest of the SSH public key.publicKey
- SSH public key.status
- Status of the SSH public key. Active means that the key can be used for authentication with an CodeCommit repository. Inactive means that the key cannot be used.