ovh.CloudProjectSshKey
Explore with Pulumi AI
Create a SSH key in the given public cloud project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const key = new ovh.CloudProjectSshKey("key", {
serviceName: "<public cloud project ID>",
publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9xPpdqP3sx2H+gcBm65tJEaUbuifQ1uGkgrWtNY0PRKNNPdy+3yoVOtxk6Vjo4YZ0EU/JhmQfnrK7X7Q5vhqYxmozi0LiTRt0BxgqHJ+4hWTWMIOgr+C2jLx7ZsCReRk+fy5AHr6h0PHQEuXVLXeUy/TDyuY2JPtUZ5jcqvLYgQ== my-key",
name: "new_key",
});
import pulumi
import pulumi_ovh as ovh
key = ovh.CloudProjectSshKey("key",
service_name="<public cloud project ID>",
public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9xPpdqP3sx2H+gcBm65tJEaUbuifQ1uGkgrWtNY0PRKNNPdy+3yoVOtxk6Vjo4YZ0EU/JhmQfnrK7X7Q5vhqYxmozi0LiTRt0BxgqHJ+4hWTWMIOgr+C2jLx7ZsCReRk+fy5AHr6h0PHQEuXVLXeUy/TDyuY2JPtUZ5jcqvLYgQ== my-key",
name="new_key")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ovh.NewCloudProjectSshKey(ctx, "key", &ovh.CloudProjectSshKeyArgs{
ServiceName: pulumi.String("<public cloud project ID>"),
PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9xPpdqP3sx2H+gcBm65tJEaUbuifQ1uGkgrWtNY0PRKNNPdy+3yoVOtxk6Vjo4YZ0EU/JhmQfnrK7X7Q5vhqYxmozi0LiTRt0BxgqHJ+4hWTWMIOgr+C2jLx7ZsCReRk+fy5AHr6h0PHQEuXVLXeUy/TDyuY2JPtUZ5jcqvLYgQ== my-key"),
Name: pulumi.String("new_key"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var key = new Ovh.CloudProjectSshKey("key", new()
{
ServiceName = "<public cloud project ID>",
PublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9xPpdqP3sx2H+gcBm65tJEaUbuifQ1uGkgrWtNY0PRKNNPdy+3yoVOtxk6Vjo4YZ0EU/JhmQfnrK7X7Q5vhqYxmozi0LiTRt0BxgqHJ+4hWTWMIOgr+C2jLx7ZsCReRk+fy5AHr6h0PHQEuXVLXeUy/TDyuY2JPtUZ5jcqvLYgQ== my-key",
Name = "new_key",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.ovhcloud.pulumi.ovh.CloudProjectSshKey;
import com.ovhcloud.pulumi.ovh.CloudProjectSshKeyArgs;
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 key = new CloudProjectSshKey("key", CloudProjectSshKeyArgs.builder()
.serviceName("<public cloud project ID>")
.publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9xPpdqP3sx2H+gcBm65tJEaUbuifQ1uGkgrWtNY0PRKNNPdy+3yoVOtxk6Vjo4YZ0EU/JhmQfnrK7X7Q5vhqYxmozi0LiTRt0BxgqHJ+4hWTWMIOgr+C2jLx7ZsCReRk+fy5AHr6h0PHQEuXVLXeUy/TDyuY2JPtUZ5jcqvLYgQ== my-key")
.name("new_key")
.build());
}
}
resources:
key:
type: ovh:CloudProjectSshKey
properties:
serviceName: <public cloud project ID>
publicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9xPpdqP3sx2H+gcBm65tJEaUbuifQ1uGkgrWtNY0PRKNNPdy+3yoVOtxk6Vjo4YZ0EU/JhmQfnrK7X7Q5vhqYxmozi0LiTRt0BxgqHJ+4hWTWMIOgr+C2jLx7ZsCReRk+fy5AHr6h0PHQEuXVLXeUy/TDyuY2JPtUZ5jcqvLYgQ== my-key
name: new_key
Create CloudProjectSshKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CloudProjectSshKey(name: string, args: CloudProjectSshKeyArgs, opts?: CustomResourceOptions);
@overload
def CloudProjectSshKey(resource_name: str,
args: CloudProjectSshKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CloudProjectSshKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
public_key: Optional[str] = None,
service_name: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None)
func NewCloudProjectSshKey(ctx *Context, name string, args CloudProjectSshKeyArgs, opts ...ResourceOption) (*CloudProjectSshKey, error)
public CloudProjectSshKey(string name, CloudProjectSshKeyArgs args, CustomResourceOptions? opts = null)
public CloudProjectSshKey(String name, CloudProjectSshKeyArgs args)
public CloudProjectSshKey(String name, CloudProjectSshKeyArgs args, CustomResourceOptions options)
type: ovh:CloudProjectSshKey
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 CloudProjectSshKeyArgs
- 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 CloudProjectSshKeyArgs
- 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 CloudProjectSshKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudProjectSshKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CloudProjectSshKeyArgs
- 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 cloudProjectSshKeyResource = new Ovh.CloudProjectSshKey("cloudProjectSshKeyResource", new()
{
PublicKey = "string",
ServiceName = "string",
Name = "string",
Region = "string",
});
example, err := ovh.NewCloudProjectSshKey(ctx, "cloudProjectSshKeyResource", &ovh.CloudProjectSshKeyArgs{
PublicKey: pulumi.String("string"),
ServiceName: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var cloudProjectSshKeyResource = new CloudProjectSshKey("cloudProjectSshKeyResource", CloudProjectSshKeyArgs.builder()
.publicKey("string")
.serviceName("string")
.name("string")
.region("string")
.build());
cloud_project_ssh_key_resource = ovh.CloudProjectSshKey("cloudProjectSshKeyResource",
public_key="string",
service_name="string",
name="string",
region="string")
const cloudProjectSshKeyResource = new ovh.CloudProjectSshKey("cloudProjectSshKeyResource", {
publicKey: "string",
serviceName: "string",
name: "string",
region: "string",
});
type: ovh:CloudProjectSshKey
properties:
name: string
publicKey: string
region: string
serviceName: string
CloudProjectSshKey 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 CloudProjectSshKey resource accepts the following input properties:
- Public
Key string - SSH public key
- Service
Name string - Service name
- Name string
- SSH key name
- Region string
- Region to create SSH key
- Public
Key string - SSH public key
- Service
Name string - Service name
- Name string
- SSH key name
- Region string
- Region to create SSH key
- public
Key String - SSH public key
- service
Name String - Service name
- name String
- SSH key name
- region String
- Region to create SSH key
- public
Key string - SSH public key
- service
Name string - Service name
- name string
- SSH key name
- region string
- Region to create SSH key
- public_
key str - SSH public key
- service_
name str - Service name
- name str
- SSH key name
- region str
- Region to create SSH key
- public
Key String - SSH public key
- service
Name String - Service name
- name String
- SSH key name
- region String
- Region to create SSH key
Outputs
All input properties are implicitly available as output properties. Additionally, the CloudProjectSshKey resource produces the following output properties:
- Finger
Print string - SSH key fingerprint
- Id string
- The provider-assigned unique ID for this managed resource.
- Regions List<string>
- SSH key regions
- Finger
Print string - SSH key fingerprint
- Id string
- The provider-assigned unique ID for this managed resource.
- Regions []string
- SSH key regions
- finger
Print String - SSH key fingerprint
- id String
- The provider-assigned unique ID for this managed resource.
- regions List<String>
- SSH key regions
- finger
Print string - SSH key fingerprint
- id string
- The provider-assigned unique ID for this managed resource.
- regions string[]
- SSH key regions
- finger_
print str - SSH key fingerprint
- id str
- The provider-assigned unique ID for this managed resource.
- regions Sequence[str]
- SSH key regions
- finger
Print String - SSH key fingerprint
- id String
- The provider-assigned unique ID for this managed resource.
- regions List<String>
- SSH key regions
Look up Existing CloudProjectSshKey Resource
Get an existing CloudProjectSshKey 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?: CloudProjectSshKeyState, opts?: CustomResourceOptions): CloudProjectSshKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
finger_print: Optional[str] = None,
name: Optional[str] = None,
public_key: Optional[str] = None,
region: Optional[str] = None,
regions: Optional[Sequence[str]] = None,
service_name: Optional[str] = None) -> CloudProjectSshKey
func GetCloudProjectSshKey(ctx *Context, name string, id IDInput, state *CloudProjectSshKeyState, opts ...ResourceOption) (*CloudProjectSshKey, error)
public static CloudProjectSshKey Get(string name, Input<string> id, CloudProjectSshKeyState? state, CustomResourceOptions? opts = null)
public static CloudProjectSshKey get(String name, Output<String> id, CloudProjectSshKeyState state, CustomResourceOptions options)
resources: _: type: ovh:CloudProjectSshKey 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.
- Finger
Print string - SSH key fingerprint
- Name string
- SSH key name
- Public
Key string - SSH public key
- Region string
- Region to create SSH key
- Regions List<string>
- SSH key regions
- Service
Name string - Service name
- Finger
Print string - SSH key fingerprint
- Name string
- SSH key name
- Public
Key string - SSH public key
- Region string
- Region to create SSH key
- Regions []string
- SSH key regions
- Service
Name string - Service name
- finger
Print String - SSH key fingerprint
- name String
- SSH key name
- public
Key String - SSH public key
- region String
- Region to create SSH key
- regions List<String>
- SSH key regions
- service
Name String - Service name
- finger
Print string - SSH key fingerprint
- name string
- SSH key name
- public
Key string - SSH public key
- region string
- Region to create SSH key
- regions string[]
- SSH key regions
- service
Name string - Service name
- finger_
print str - SSH key fingerprint
- name str
- SSH key name
- public_
key str - SSH public key
- region str
- Region to create SSH key
- regions Sequence[str]
- SSH key regions
- service_
name str - Service name
- finger
Print String - SSH key fingerprint
- name String
- SSH key name
- public
Key String - SSH public key
- region String
- Region to create SSH key
- regions List<String>
- SSH key regions
- service
Name String - Service name
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.