ngrok.SshCredential
Explore with Pulumi AI
SSH Credentials are SSH public keys that can be used to start SSH tunnels via the ngrok SSH tunnel gateway.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ngrok = PiersKarsenbarg.Ngrok;
return await Deployment.RunAsync(() =>
{
var example = new Ngrok.SshCredential("example", new()
{
Acls = new[]
{
"bind:1.tcp.ngrok.io:20002",
"bind:132.devices.company.com",
},
Description = "for device #132",
PublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmGS49FkSODAcKhn3+/47DW2zEn19BZvzRQ8RZjL3v6hCIX2qXfsFK35EGxNI0wV23H4xXC2gVRPHKU71YnCb50tad3yMBTM6+2yfGsEDasEH/anmBLclChKvuGiT547RskZlpbAbdq3GvbzmY+R/2EBRMOiObpc8XmSzKAd05j28kqN0+rZO65SWId0MXdvJdSCSAnuRqBNd/aXKlu8hBPDcgwbT2lMkuR+ApoBS2FLRBOiQyt2Ol0T7Uuf7lTLlazpGB3uTw5zFYUNXkuuI6cAP8QYuY1Bne/hNrG8t3Aw9a1yc2C4Fz1hJ/4OMRxTQ8SUQf+Rmxs8DryMlMFJ8r device132@example.com",
});
});
package main
import (
"github.com/pulumi/pulumi-ngrok/sdk/go/ngrok"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ngrok.NewSshCredential(ctx, "example", &ngrok.SshCredentialArgs{
Acls: pulumi.StringArray{
pulumi.String("bind:1.tcp.ngrok.io:20002"),
pulumi.String("bind:132.devices.company.com"),
},
Description: pulumi.String("for device #132"),
PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmGS49FkSODAcKhn3+/47DW2zEn19BZvzRQ8RZjL3v6hCIX2qXfsFK35EGxNI0wV23H4xXC2gVRPHKU71YnCb50tad3yMBTM6+2yfGsEDasEH/anmBLclChKvuGiT547RskZlpbAbdq3GvbzmY+R/2EBRMOiObpc8XmSzKAd05j28kqN0+rZO65SWId0MXdvJdSCSAnuRqBNd/aXKlu8hBPDcgwbT2lMkuR+ApoBS2FLRBOiQyt2Ol0T7Uuf7lTLlazpGB3uTw5zFYUNXkuuI6cAP8QYuY1Bne/hNrG8t3Aw9a1yc2C4Fz1hJ/4OMRxTQ8SUQf+Rmxs8DryMlMFJ8r device132@example.com"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ngrok.SshCredential;
import com.pulumi.ngrok.SshCredentialArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new SshCredential("example", SshCredentialArgs.builder()
.acls(
"bind:1.tcp.ngrok.io:20002",
"bind:132.devices.company.com")
.description("for device #132")
.publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmGS49FkSODAcKhn3+/47DW2zEn19BZvzRQ8RZjL3v6hCIX2qXfsFK35EGxNI0wV23H4xXC2gVRPHKU71YnCb50tad3yMBTM6+2yfGsEDasEH/anmBLclChKvuGiT547RskZlpbAbdq3GvbzmY+R/2EBRMOiObpc8XmSzKAd05j28kqN0+rZO65SWId0MXdvJdSCSAnuRqBNd/aXKlu8hBPDcgwbT2lMkuR+ApoBS2FLRBOiQyt2Ol0T7Uuf7lTLlazpGB3uTw5zFYUNXkuuI6cAP8QYuY1Bne/hNrG8t3Aw9a1yc2C4Fz1hJ/4OMRxTQ8SUQf+Rmxs8DryMlMFJ8r device132@example.com")
.build());
}
}
import pulumi
import pierskarsenbarg_pulumi_ngrok as ngrok
example = ngrok.SshCredential("example",
acls=[
"bind:1.tcp.ngrok.io:20002",
"bind:132.devices.company.com",
],
description="for device #132",
public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmGS49FkSODAcKhn3+/47DW2zEn19BZvzRQ8RZjL3v6hCIX2qXfsFK35EGxNI0wV23H4xXC2gVRPHKU71YnCb50tad3yMBTM6+2yfGsEDasEH/anmBLclChKvuGiT547RskZlpbAbdq3GvbzmY+R/2EBRMOiObpc8XmSzKAd05j28kqN0+rZO65SWId0MXdvJdSCSAnuRqBNd/aXKlu8hBPDcgwbT2lMkuR+ApoBS2FLRBOiQyt2Ol0T7Uuf7lTLlazpGB3uTw5zFYUNXkuuI6cAP8QYuY1Bne/hNrG8t3Aw9a1yc2C4Fz1hJ/4OMRxTQ8SUQf+Rmxs8DryMlMFJ8r device132@example.com")
import * as pulumi from "@pulumi/pulumi";
import * as ngrok from "@pierskarsenbarg/ngrok";
const example = new ngrok.SshCredential("example", {
acls: [
"bind:1.tcp.ngrok.io:20002",
"bind:132.devices.company.com",
],
description: "for device #132",
publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmGS49FkSODAcKhn3+/47DW2zEn19BZvzRQ8RZjL3v6hCIX2qXfsFK35EGxNI0wV23H4xXC2gVRPHKU71YnCb50tad3yMBTM6+2yfGsEDasEH/anmBLclChKvuGiT547RskZlpbAbdq3GvbzmY+R/2EBRMOiObpc8XmSzKAd05j28kqN0+rZO65SWId0MXdvJdSCSAnuRqBNd/aXKlu8hBPDcgwbT2lMkuR+ApoBS2FLRBOiQyt2Ol0T7Uuf7lTLlazpGB3uTw5zFYUNXkuuI6cAP8QYuY1Bne/hNrG8t3Aw9a1yc2C4Fz1hJ/4OMRxTQ8SUQf+Rmxs8DryMlMFJ8r device132@example.com",
});
resources:
example:
type: ngrok:SshCredential
properties:
acls:
- bind:1.tcp.ngrok.io:20002
- bind:132.devices.company.com
description: 'for device #132'
publicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmGS49FkSODAcKhn3+/47DW2zEn19BZvzRQ8RZjL3v6hCIX2qXfsFK35EGxNI0wV23H4xXC2gVRPHKU71YnCb50tad3yMBTM6+2yfGsEDasEH/anmBLclChKvuGiT547RskZlpbAbdq3GvbzmY+R/2EBRMOiObpc8XmSzKAd05j28kqN0+rZO65SWId0MXdvJdSCSAnuRqBNd/aXKlu8hBPDcgwbT2lMkuR+ApoBS2FLRBOiQyt2Ol0T7Uuf7lTLlazpGB3uTw5zFYUNXkuuI6cAP8QYuY1Bne/hNrG8t3Aw9a1yc2C4Fz1hJ/4OMRxTQ8SUQf+Rmxs8DryMlMFJ8r device132@example.com
Create SshCredential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SshCredential(name: string, args: SshCredentialArgs, opts?: CustomResourceOptions);
@overload
def SshCredential(resource_name: str,
args: SshCredentialArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SshCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
public_key: Optional[str] = None,
acls: Optional[Sequence[str]] = None,
description: Optional[str] = None,
metadata: Optional[str] = None)
func NewSshCredential(ctx *Context, name string, args SshCredentialArgs, opts ...ResourceOption) (*SshCredential, error)
public SshCredential(string name, SshCredentialArgs args, CustomResourceOptions? opts = null)
public SshCredential(String name, SshCredentialArgs args)
public SshCredential(String name, SshCredentialArgs args, CustomResourceOptions options)
type: ngrok:SshCredential
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SshCredentialArgs
- 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 SshCredentialArgs
- 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 SshCredentialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SshCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SshCredentialArgs
- 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 sshCredentialResource = new Ngrok.SshCredential("sshCredentialResource", new()
{
PublicKey = "string",
Acls = new[]
{
"string",
},
Description = "string",
Metadata = "string",
});
example, err := ngrok.NewSshCredential(ctx, "sshCredentialResource", &ngrok.SshCredentialArgs{
PublicKey: pulumi.String("string"),
Acls: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
Metadata: pulumi.String("string"),
})
var sshCredentialResource = new SshCredential("sshCredentialResource", SshCredentialArgs.builder()
.publicKey("string")
.acls("string")
.description("string")
.metadata("string")
.build());
ssh_credential_resource = ngrok.SshCredential("sshCredentialResource",
public_key="string",
acls=["string"],
description="string",
metadata="string")
const sshCredentialResource = new ngrok.SshCredential("sshCredentialResource", {
publicKey: "string",
acls: ["string"],
description: "string",
metadata: "string",
});
type: ngrok:SshCredential
properties:
acls:
- string
description: string
metadata: string
publicKey: string
SshCredential 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 SshCredential resource accepts the following input properties:
- Public
Key string - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- Acls List<string>
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - Description string
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- Metadata string
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- Public
Key string - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- Acls []string
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - Description string
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- Metadata string
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- public
Key String - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- acls List<String>
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - description String
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- metadata String
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- public
Key string - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- acls string[]
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - description string
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- metadata string
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- public_
key str - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- acls Sequence[str]
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - description str
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- metadata str
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- public
Key String - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- acls List<String>
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - description String
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- metadata String
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
Outputs
All input properties are implicitly available as output properties. Additionally, the SshCredential 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 str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SshCredential Resource
Get an existing SshCredential 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?: SshCredentialState, opts?: CustomResourceOptions): SshCredential
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acls: Optional[Sequence[str]] = None,
description: Optional[str] = None,
metadata: Optional[str] = None,
public_key: Optional[str] = None) -> SshCredential
func GetSshCredential(ctx *Context, name string, id IDInput, state *SshCredentialState, opts ...ResourceOption) (*SshCredential, error)
public static SshCredential Get(string name, Input<string> id, SshCredentialState? state, CustomResourceOptions? opts = null)
public static SshCredential get(String name, Output<String> id, SshCredentialState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Acls List<string>
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - Description string
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- Metadata string
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- Public
Key string - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- Acls []string
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - Description string
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- Metadata string
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- Public
Key string - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- acls List<String>
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - description String
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- metadata String
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- public
Key String - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- acls string[]
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - description string
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- metadata string
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- public
Key string - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- acls Sequence[str]
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - description str
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- metadata str
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- public_
key str - the PEM-encoded public key of the SSH keypair that will be used to authenticate
- acls List<String>
- optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the
bind
rule. Thebind
rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rulebind:example.ngrok.io
. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule ofbind:*.example.com
which will allowx.example.com
,y.example.com
,*.example.com
, etc. A rule of'*'
is equivalent to no acl at all and will explicitly permit all actions. - description String
- human-readable description of who or what will use the ssh credential to authenticate. Optional, max 255 bytes.
- metadata String
- arbitrary user-defined machine-readable data of this ssh credential. Optional, max 4096 bytes.
- public
Key String - the PEM-encoded public key of the SSH keypair that will be used to authenticate
Package Details
- Repository
- ngrok pierskarsenbarg/pulumi-ngrok
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ngrok
Terraform Provider.