1. Packages
  2. Scaleway
  3. API Docs
  4. IamSshKey
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.IamSshKey

Explore with Pulumi AI

Deprecated: scaleway.index/iamsshkey.IamSshKey has been deprecated in favor of scaleway.iam/sshkey.SshKey

Creates and manages Scaleway IAM SSH Keys. For more information refer to the IAM API documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const main = new scaleway.iam.SshKey("main", {
    name: "main",
    publicKey: "<YOUR-PUBLIC-SSH-KEY>",
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.iam.SshKey("main",
    name="main",
    public_key="<YOUR-PUBLIC-SSH-KEY>")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iam"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.NewSshKey(ctx, "main", &iam.SshKeyArgs{
			Name:      pulumi.String("main"),
			PublicKey: pulumi.String("<YOUR-PUBLIC-SSH-KEY>"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.Iam.SshKey("main", new()
    {
        Name = "main",
        PublicKey = "<YOUR-PUBLIC-SSH-KEY>",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iam.SshKey;
import com.pulumi.scaleway.iam.SshKeyArgs;
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 main = new SshKey("main", SshKeyArgs.builder()
            .name("main")
            .publicKey("<YOUR-PUBLIC-SSH-KEY>")
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:iam:SshKey
    properties:
      name: main
      publicKey: <YOUR-PUBLIC-SSH-KEY>
Copy

Create IamSshKey Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new IamSshKey(name: string, args: IamSshKeyArgs, opts?: CustomResourceOptions);
@overload
def IamSshKey(resource_name: str,
              args: IamSshKeyArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def IamSshKey(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              disabled: Optional[bool] = None,
              name: Optional[str] = None,
              project_id: Optional[str] = None,
              public_key: Optional[str] = None)
func NewIamSshKey(ctx *Context, name string, args IamSshKeyArgs, opts ...ResourceOption) (*IamSshKey, error)
public IamSshKey(string name, IamSshKeyArgs args, CustomResourceOptions? opts = null)
public IamSshKey(String name, IamSshKeyArgs args)
public IamSshKey(String name, IamSshKeyArgs args, CustomResourceOptions options)
type: scaleway:IamSshKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. IamSshKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. IamSshKeyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. IamSshKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. IamSshKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. IamSshKeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

IamSshKey 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 IamSshKey resource accepts the following input properties:

PublicKey
This property is required.
Changes to this property will trigger replacement.
string
The public SSH key to be added.
Disabled bool
The SSH key status.
Name string
The name of the SSH key.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the SSH key is associated with.
PublicKey
This property is required.
Changes to this property will trigger replacement.
string
The public SSH key to be added.
Disabled bool
The SSH key status.
Name string
The name of the SSH key.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the SSH key is associated with.
publicKey
This property is required.
Changes to this property will trigger replacement.
String
The public SSH key to be added.
disabled Boolean
The SSH key status.
name String
The name of the SSH key.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the SSH key is associated with.
publicKey
This property is required.
Changes to this property will trigger replacement.
string
The public SSH key to be added.
disabled boolean
The SSH key status.
name string
The name of the SSH key.
projectId Changes to this property will trigger replacement. string
project_id) The ID of the project the SSH key is associated with.
public_key
This property is required.
Changes to this property will trigger replacement.
str
The public SSH key to be added.
disabled bool
The SSH key status.
name str
The name of the SSH key.
project_id Changes to this property will trigger replacement. str
project_id) The ID of the project the SSH key is associated with.
publicKey
This property is required.
Changes to this property will trigger replacement.
String
The public SSH key to be added.
disabled Boolean
The SSH key status.
name String
The name of the SSH key.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the SSH key is associated with.

Outputs

All input properties are implicitly available as output properties. Additionally, the IamSshKey resource produces the following output properties:

CreatedAt string
The date and time of the creation of the SSH key.
Fingerprint string
The fingerprint of the iam SSH key.
Id string
The provider-assigned unique ID for this managed resource.
OrganizationId string
The ID of the organization the SSH key is associated with.
UpdatedAt string
The date and time of the last update of the SSH key.
CreatedAt string
The date and time of the creation of the SSH key.
Fingerprint string
The fingerprint of the iam SSH key.
Id string
The provider-assigned unique ID for this managed resource.
OrganizationId string
The ID of the organization the SSH key is associated with.
UpdatedAt string
The date and time of the last update of the SSH key.
createdAt String
The date and time of the creation of the SSH key.
fingerprint String
The fingerprint of the iam SSH key.
id String
The provider-assigned unique ID for this managed resource.
organizationId String
The ID of the organization the SSH key is associated with.
updatedAt String
The date and time of the last update of the SSH key.
createdAt string
The date and time of the creation of the SSH key.
fingerprint string
The fingerprint of the iam SSH key.
id string
The provider-assigned unique ID for this managed resource.
organizationId string
The ID of the organization the SSH key is associated with.
updatedAt string
The date and time of the last update of the SSH key.
created_at str
The date and time of the creation of the SSH key.
fingerprint str
The fingerprint of the iam SSH key.
id str
The provider-assigned unique ID for this managed resource.
organization_id str
The ID of the organization the SSH key is associated with.
updated_at str
The date and time of the last update of the SSH key.
createdAt String
The date and time of the creation of the SSH key.
fingerprint String
The fingerprint of the iam SSH key.
id String
The provider-assigned unique ID for this managed resource.
organizationId String
The ID of the organization the SSH key is associated with.
updatedAt String
The date and time of the last update of the SSH key.

Look up Existing IamSshKey Resource

Get an existing IamSshKey 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?: IamSshKeyState, opts?: CustomResourceOptions): IamSshKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        disabled: Optional[bool] = None,
        fingerprint: Optional[str] = None,
        name: Optional[str] = None,
        organization_id: Optional[str] = None,
        project_id: Optional[str] = None,
        public_key: Optional[str] = None,
        updated_at: Optional[str] = None) -> IamSshKey
func GetIamSshKey(ctx *Context, name string, id IDInput, state *IamSshKeyState, opts ...ResourceOption) (*IamSshKey, error)
public static IamSshKey Get(string name, Input<string> id, IamSshKeyState? state, CustomResourceOptions? opts = null)
public static IamSshKey get(String name, Output<String> id, IamSshKeyState state, CustomResourceOptions options)
resources:  _:    type: scaleway:IamSshKey    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
CreatedAt string
The date and time of the creation of the SSH key.
Disabled bool
The SSH key status.
Fingerprint string
The fingerprint of the iam SSH key.
Name string
The name of the SSH key.
OrganizationId string
The ID of the organization the SSH key is associated with.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the SSH key is associated with.
PublicKey Changes to this property will trigger replacement. string
The public SSH key to be added.
UpdatedAt string
The date and time of the last update of the SSH key.
CreatedAt string
The date and time of the creation of the SSH key.
Disabled bool
The SSH key status.
Fingerprint string
The fingerprint of the iam SSH key.
Name string
The name of the SSH key.
OrganizationId string
The ID of the organization the SSH key is associated with.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the SSH key is associated with.
PublicKey Changes to this property will trigger replacement. string
The public SSH key to be added.
UpdatedAt string
The date and time of the last update of the SSH key.
createdAt String
The date and time of the creation of the SSH key.
disabled Boolean
The SSH key status.
fingerprint String
The fingerprint of the iam SSH key.
name String
The name of the SSH key.
organizationId String
The ID of the organization the SSH key is associated with.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the SSH key is associated with.
publicKey Changes to this property will trigger replacement. String
The public SSH key to be added.
updatedAt String
The date and time of the last update of the SSH key.
createdAt string
The date and time of the creation of the SSH key.
disabled boolean
The SSH key status.
fingerprint string
The fingerprint of the iam SSH key.
name string
The name of the SSH key.
organizationId string
The ID of the organization the SSH key is associated with.
projectId Changes to this property will trigger replacement. string
project_id) The ID of the project the SSH key is associated with.
publicKey Changes to this property will trigger replacement. string
The public SSH key to be added.
updatedAt string
The date and time of the last update of the SSH key.
created_at str
The date and time of the creation of the SSH key.
disabled bool
The SSH key status.
fingerprint str
The fingerprint of the iam SSH key.
name str
The name of the SSH key.
organization_id str
The ID of the organization the SSH key is associated with.
project_id Changes to this property will trigger replacement. str
project_id) The ID of the project the SSH key is associated with.
public_key Changes to this property will trigger replacement. str
The public SSH key to be added.
updated_at str
The date and time of the last update of the SSH key.
createdAt String
The date and time of the creation of the SSH key.
disabled Boolean
The SSH key status.
fingerprint String
The fingerprint of the iam SSH key.
name String
The name of the SSH key.
organizationId String
The ID of the organization the SSH key is associated with.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the SSH key is associated with.
publicKey Changes to this property will trigger replacement. String
The public SSH key to be added.
updatedAt String
The date and time of the last update of the SSH key.

Import

SSH keys can be imported using the id, e.g.

bash

$ pulumi import scaleway:index/iamSshKey:IamSshKey main 11111111-1111-1111-1111-111111111111
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.