edgecenter.Keypair
Explore with Pulumi AI
Represent a ssh key, do not depends on region
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";
const kpKeypair = new edgecenter.Keypair("kpKeypair", {
projectId: 1,
publicKey: "your public key here",
sshkeyName: "test",
});
export const kp = kpKeypair;
import pulumi
import pulumi_edgecenter as edgecenter
kp_keypair = edgecenter.Keypair("kpKeypair",
project_id=1,
public_key="your public key here",
sshkey_name="test")
pulumi.export("kp", kp_keypair)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
kpKeypair, err := edgecenter.NewKeypair(ctx, "kpKeypair", &edgecenter.KeypairArgs{
ProjectId: pulumi.Float64(1),
PublicKey: pulumi.String("your public key here"),
SshkeyName: pulumi.String("test"),
})
if err != nil {
return err
}
ctx.Export("kp", kpKeypair)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;
return await Deployment.RunAsync(() =>
{
var kpKeypair = new Edgecenter.Keypair("kpKeypair", new()
{
ProjectId = 1,
PublicKey = "your public key here",
SshkeyName = "test",
});
return new Dictionary<string, object?>
{
["kp"] = kpKeypair,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.Keypair;
import com.pulumi.edgecenter.KeypairArgs;
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 kpKeypair = new Keypair("kpKeypair", KeypairArgs.builder()
.projectId(1)
.publicKey("your public key here")
.sshkeyName("test")
.build());
ctx.export("kp", kpKeypair);
}
}
resources:
kpKeypair:
type: edgecenter:Keypair
properties:
projectId: 1
publicKey: your public key here
sshkeyName: test
outputs:
kp: ${kpKeypair}
Create Keypair Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Keypair(name: string, args: KeypairArgs, opts?: CustomResourceOptions);
@overload
def Keypair(resource_name: str,
args: KeypairArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Keypair(resource_name: str,
opts: Optional[ResourceOptions] = None,
public_key: Optional[str] = None,
sshkey_name: Optional[str] = None,
keypair_id: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None)
func NewKeypair(ctx *Context, name string, args KeypairArgs, opts ...ResourceOption) (*Keypair, error)
public Keypair(string name, KeypairArgs args, CustomResourceOptions? opts = null)
public Keypair(String name, KeypairArgs args)
public Keypair(String name, KeypairArgs args, CustomResourceOptions options)
type: edgecenter:Keypair
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 KeypairArgs
- 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 KeypairArgs
- 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 KeypairArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KeypairArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KeypairArgs
- 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 keypairResource = new Edgecenter.Keypair("keypairResource", new()
{
PublicKey = "string",
SshkeyName = "string",
KeypairId = "string",
ProjectId = 0,
ProjectName = "string",
});
example, err := edgecenter.NewKeypair(ctx, "keypairResource", &edgecenter.KeypairArgs{
PublicKey: pulumi.String("string"),
SshkeyName: pulumi.String("string"),
KeypairId: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
ProjectName: pulumi.String("string"),
})
var keypairResource = new Keypair("keypairResource", KeypairArgs.builder()
.publicKey("string")
.sshkeyName("string")
.keypairId("string")
.projectId(0)
.projectName("string")
.build());
keypair_resource = edgecenter.Keypair("keypairResource",
public_key="string",
sshkey_name="string",
keypair_id="string",
project_id=0,
project_name="string")
const keypairResource = new edgecenter.Keypair("keypairResource", {
publicKey: "string",
sshkeyName: "string",
keypairId: "string",
projectId: 0,
projectName: "string",
});
type: edgecenter:Keypair
properties:
keypairId: string
projectId: 0
projectName: string
publicKey: string
sshkeyName: string
Keypair 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 Keypair resource accepts the following input properties:
- Public
Key string - The public portion of the SSH key pair.
- Sshkey
Name string - The name assigned to the SSH key pair, used for identification purposes.
- Keypair
Id string - The ID of this resource.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Public
Key string - The public portion of the SSH key pair.
- Sshkey
Name string - The name assigned to the SSH key pair, used for identification purposes.
- Keypair
Id string - The ID of this resource.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- public
Key String - The public portion of the SSH key pair.
- sshkey
Name String - The name assigned to the SSH key pair, used for identification purposes.
- keypair
Id String - The ID of this resource.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- public
Key string - The public portion of the SSH key pair.
- sshkey
Name string - The name assigned to the SSH key pair, used for identification purposes.
- keypair
Id string - The ID of this resource.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- public_
key str - The public portion of the SSH key pair.
- sshkey_
name str - The name assigned to the SSH key pair, used for identification purposes.
- keypair_
id str - The ID of this resource.
- project_
id float - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_
name str - The name of the project. Either 'projectid' or 'projectname' must be specified.
- public
Key String - The public portion of the SSH key pair.
- sshkey
Name String - The name assigned to the SSH key pair, used for identification purposes.
- keypair
Id String - The ID of this resource.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
Outputs
All input properties are implicitly available as output properties. Additionally, the Keypair resource produces the following output properties:
- Fingerprint string
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Sshkey
Id string - The unique identifier assigned by the provider to the SSH key pair.
- Fingerprint string
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Sshkey
Id string - The unique identifier assigned by the provider to the SSH key pair.
- fingerprint String
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- id String
- The provider-assigned unique ID for this managed resource.
- sshkey
Id String - The unique identifier assigned by the provider to the SSH key pair.
- fingerprint string
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- id string
- The provider-assigned unique ID for this managed resource.
- sshkey
Id string - The unique identifier assigned by the provider to the SSH key pair.
- fingerprint str
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- id str
- The provider-assigned unique ID for this managed resource.
- sshkey_
id str - The unique identifier assigned by the provider to the SSH key pair.
- fingerprint String
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- id String
- The provider-assigned unique ID for this managed resource.
- sshkey
Id String - The unique identifier assigned by the provider to the SSH key pair.
Look up Existing Keypair Resource
Get an existing Keypair 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?: KeypairState, opts?: CustomResourceOptions): Keypair
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
fingerprint: Optional[str] = None,
keypair_id: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
public_key: Optional[str] = None,
sshkey_id: Optional[str] = None,
sshkey_name: Optional[str] = None) -> Keypair
func GetKeypair(ctx *Context, name string, id IDInput, state *KeypairState, opts ...ResourceOption) (*Keypair, error)
public static Keypair Get(string name, Input<string> id, KeypairState? state, CustomResourceOptions? opts = null)
public static Keypair get(String name, Output<String> id, KeypairState state, CustomResourceOptions options)
resources: _: type: edgecenter:Keypair get: 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.
- Fingerprint string
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- Keypair
Id string - The ID of this resource.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Public
Key string - The public portion of the SSH key pair.
- Sshkey
Id string - The unique identifier assigned by the provider to the SSH key pair.
- Sshkey
Name string - The name assigned to the SSH key pair, used for identification purposes.
- Fingerprint string
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- Keypair
Id string - The ID of this resource.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Public
Key string - The public portion of the SSH key pair.
- Sshkey
Id string - The unique identifier assigned by the provider to the SSH key pair.
- Sshkey
Name string - The name assigned to the SSH key pair, used for identification purposes.
- fingerprint String
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- keypair
Id String - The ID of this resource.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- public
Key String - The public portion of the SSH key pair.
- sshkey
Id String - The unique identifier assigned by the provider to the SSH key pair.
- sshkey
Name String - The name assigned to the SSH key pair, used for identification purposes.
- fingerprint string
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- keypair
Id string - The ID of this resource.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- public
Key string - The public portion of the SSH key pair.
- sshkey
Id string - The unique identifier assigned by the provider to the SSH key pair.
- sshkey
Name string - The name assigned to the SSH key pair, used for identification purposes.
- fingerprint str
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- keypair_
id str - The ID of this resource.
- project_
id float - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_
name str - The name of the project. Either 'projectid' or 'projectname' must be specified.
- public_
key str - The public portion of the SSH key pair.
- sshkey_
id str - The unique identifier assigned by the provider to the SSH key pair.
- sshkey_
name str - The name assigned to the SSH key pair, used for identification purposes.
- fingerprint String
- A fingerprint of the SSH public key, used to verify the integrity of the key.
- keypair
Id String - The ID of this resource.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- public
Key String - The public portion of the SSH key pair.
- sshkey
Id String - The unique identifier assigned by the provider to the SSH key pair.
- sshkey
Name String - The name assigned to the SSH key pair, used for identification purposes.
Package Details
- Repository
- edgecenter edge-center/terraform-provider-edgecenter
- License
- Notes
- This Pulumi package is based on the
edgecenter
Terraform Provider.