ngrok.Credential
Explore with Pulumi AI
Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok
agent to connect the ngrok service as your account. They are installed with
the ngrok authtoken
command or by specifying it in the ngrok.yml
configuration file with the authtoken
property.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ngrok = PiersKarsenbarg.Ngrok;
return await Deployment.RunAsync(() =>
{
var example = new Ngrok.Credential("example", new()
{
Description = "development cred for alan@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.NewCredential(ctx, "example", &ngrok.CredentialArgs{
Description: pulumi.String("development cred for alan@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.Credential;
import com.pulumi.ngrok.CredentialArgs;
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 Credential("example", CredentialArgs.builder()
.description("development cred for alan@example.com")
.build());
}
}
import pulumi
import pierskarsenbarg_pulumi_ngrok as ngrok
example = ngrok.Credential("example", description="development cred for alan@example.com")
import * as pulumi from "@pulumi/pulumi";
import * as ngrok from "@pierskarsenbarg/ngrok";
const example = new ngrok.Credential("example", {description: "development cred for alan@example.com"});
resources:
example:
type: ngrok:Credential
properties:
description: development cred for alan@example.com
Create Credential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Credential(name: string, args?: CredentialArgs, opts?: CustomResourceOptions);
@overload
def Credential(resource_name: str,
args: Optional[CredentialArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Credential(resource_name: str,
opts: Optional[ResourceOptions] = None,
acls: Optional[Sequence[str]] = None,
description: Optional[str] = None,
metadata: Optional[str] = None)
func NewCredential(ctx *Context, name string, args *CredentialArgs, opts ...ResourceOption) (*Credential, error)
public Credential(string name, CredentialArgs? args = null, CustomResourceOptions? opts = null)
public Credential(String name, CredentialArgs args)
public Credential(String name, CredentialArgs args, CustomResourceOptions options)
type: ngrok:Credential
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 CredentialArgs
- 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 CredentialArgs
- 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 CredentialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CredentialArgs
- 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 credentialResource = new Ngrok.Credential("credentialResource", new()
{
Acls = new[]
{
"string",
},
Description = "string",
Metadata = "string",
});
example, err := ngrok.NewCredential(ctx, "credentialResource", &ngrok.CredentialArgs{
Acls: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
Metadata: pulumi.String("string"),
})
var credentialResource = new Credential("credentialResource", CredentialArgs.builder()
.acls("string")
.description("string")
.metadata("string")
.build());
credential_resource = ngrok.Credential("credentialResource",
acls=["string"],
description="string",
metadata="string")
const credentialResource = new ngrok.Credential("credentialResource", {
acls: ["string"],
description: "string",
metadata: "string",
});
type: ngrok:Credential
properties:
acls:
- string
description: string
metadata: string
Credential Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Credential resource accepts the following input properties:
- 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 credential to authenticate. Optional, max 255 bytes.
- Metadata string
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- 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 credential to authenticate. Optional, max 255 bytes.
- Metadata string
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- 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 credential to authenticate. Optional, max 255 bytes.
- metadata String
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- 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 credential to authenticate. Optional, max 255 bytes.
- metadata string
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- 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 credential to authenticate. Optional, max 255 bytes.
- metadata str
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- 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 credential to authenticate. Optional, max 255 bytes.
- metadata String
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
Outputs
All input properties are implicitly available as output properties. Additionally, the Credential resource produces the following output properties:
Look up Existing Credential Resource
Get an existing Credential 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?: CredentialState, opts?: CustomResourceOptions): Credential
@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,
token: Optional[str] = None) -> Credential
func GetCredential(ctx *Context, name string, id IDInput, state *CredentialState, opts ...ResourceOption) (*Credential, error)
public static Credential Get(string name, Input<string> id, CredentialState? state, CustomResourceOptions? opts = null)
public static Credential get(String name, Output<String> id, CredentialState 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 credential to authenticate. Optional, max 255 bytes.
- Metadata string
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- Token string
- the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
- 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 credential to authenticate. Optional, max 255 bytes.
- Metadata string
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- Token string
- the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
- 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 credential to authenticate. Optional, max 255 bytes.
- metadata String
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- token String
- the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
- 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 credential to authenticate. Optional, max 255 bytes.
- metadata string
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- token string
- the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
- 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 credential to authenticate. Optional, max 255 bytes.
- metadata str
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- token str
- the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
- 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 credential to authenticate. Optional, max 255 bytes.
- metadata String
- arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
- token String
- the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
Package Details
- Repository
- ngrok pierskarsenbarg/pulumi-ngrok
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ngrok
Terraform Provider.