Use this data source to access information about an existing SSH Public Key.
data "azurerm_ssh_public_key" "example" {
name = "existing"
resource_group_name = "existing"
}
output "id" {
value = data.azurerm_ssh_public_key.example.id
}
The following arguments are supported:
name
- (Required) The name of this SSH Public Key.
resource_group_name
- (Required) The name of the Resource Group where the SSH Public Key exists.
tags
- (Optional) A mapping of tags which should be assigned to the SSH Public Key.In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the SSH Public Key.
public_key
- The SSH public key used to authenticate to a virtual machine through ssh.
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the SSH Public Key.