published on Saturday, Aug 8, 2026 by Formal
published on Saturday, Aug 8, 2026 by Formal
Pin an upstream SSH host public key for a Formal resource. Multiple pins may exist for one resourceId when the host presents multiple key types.
Create ResourceSshHostKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ResourceSshHostKey(name: string, args: ResourceSshHostKeyArgs, opts?: CustomResourceOptions);@overload
def ResourceSshHostKey(resource_name: str,
args: ResourceSshHostKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ResourceSshHostKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
public_key: Optional[str] = None,
resource_id: Optional[str] = None)func NewResourceSshHostKey(ctx *Context, name string, args ResourceSshHostKeyArgs, opts ...ResourceOption) (*ResourceSshHostKey, error)public ResourceSshHostKey(string name, ResourceSshHostKeyArgs args, CustomResourceOptions? opts = null)
public ResourceSshHostKey(String name, ResourceSshHostKeyArgs args)
public ResourceSshHostKey(String name, ResourceSshHostKeyArgs args, CustomResourceOptions options)
type: formal:ResourceSshHostKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "formal_resource_ssh_host_key" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ResourceSshHostKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ResourceSshHostKeyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ResourceSshHostKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourceSshHostKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ResourceSshHostKeyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var resourceSshHostKeyResource = new Pulumi.ResourceSshHostKey("resourceSshHostKeyResource", new()
{
PublicKey = "string",
ResourceId = "string",
});
example, err := formal.NewResourceSshHostKey(ctx, "resourceSshHostKeyResource", &formal.ResourceSshHostKeyArgs{
PublicKey: pulumi.String("string"),
ResourceId: pulumi.String("string"),
})
resource "formal_resource_ssh_host_key" "resourceSshHostKeyResource" {
lifecycle {
create_before_destroy = true
}
public_key = "string"
resource_id = "string"
}
var resourceSshHostKeyResource = new ResourceSshHostKey("resourceSshHostKeyResource", ResourceSshHostKeyArgs.builder()
.publicKey("string")
.resourceId("string")
.build());
resource_ssh_host_key_resource = formal.ResourceSshHostKey("resourceSshHostKeyResource",
public_key="string",
resource_id="string")
const resourceSshHostKeyResource = new formal.ResourceSshHostKey("resourceSshHostKeyResource", {
publicKey: "string",
resourceId: "string",
});
type: formal:ResourceSshHostKey
properties:
publicKey: string
resourceId: string
ResourceSshHostKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ResourceSshHostKey resource accepts the following input properties:
- Public
Key string - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - Resource
Id string - Resource ID for which the SSH host key is pinned.
- Public
Key string - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - Resource
Id string - Resource ID for which the SSH host key is pinned.
- public_
key string - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - resource_
id string - Resource ID for which the SSH host key is pinned.
- public
Key String - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - resource
Id String - Resource ID for which the SSH host key is pinned.
- public
Key string - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - resource
Id string - Resource ID for which the SSH host key is pinned.
- public_
key str - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - resource_
id str - Resource ID for which the SSH host key is pinned.
- public
Key String - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - resource
Id String - Resource ID for which the SSH host key is pinned.
Outputs
All input properties are implicitly available as output properties. Additionally, the ResourceSshHostKey resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ResourceSshHostKey Resource
Get an existing ResourceSshHostKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ResourceSshHostKeyState, opts?: CustomResourceOptions): ResourceSshHostKey@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
public_key: Optional[str] = None,
resource_id: Optional[str] = None) -> ResourceSshHostKeyfunc GetResourceSshHostKey(ctx *Context, name string, id IDInput, state *ResourceSshHostKeyState, opts ...ResourceOption) (*ResourceSshHostKey, error)public static ResourceSshHostKey Get(string name, Input<string> id, ResourceSshHostKeyState? state, CustomResourceOptions? opts = null)public static ResourceSshHostKey get(String name, Output<String> id, ResourceSshHostKeyState state, CustomResourceOptions options)resources: _: type: formal:ResourceSshHostKey get: id: ${id}import {
to = formal_resource_ssh_host_key.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Public
Key string - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - Resource
Id string - Resource ID for which the SSH host key is pinned.
- Public
Key string - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - Resource
Id string - Resource ID for which the SSH host key is pinned.
- public_
key string - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - resource_
id string - Resource ID for which the SSH host key is pinned.
- public
Key String - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - resource
Id String - Resource ID for which the SSH host key is pinned.
- public
Key string - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - resource
Id string - Resource ID for which the SSH host key is pinned.
- public_
key str - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - resource_
id str - Resource ID for which the SSH host key is pinned.
- public
Key String - OpenSSH public key of the upstream SSH host (for example the output of
ssh-keygen -yf /etc/ssh/ssh_host_ed25519_key). - resource
Id String - Resource ID for which the SSH host key is pinned.
Package Details
- Repository
- formal formalco/pulumi-formal
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
formalTerraform Provider.
published on Saturday, Aug 8, 2026 by Formal