Yandex

Pulumi Official
Package maintained by Pulumi
v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

IamServiceAccountKey

Allows management of Yandex.Cloud IAM service account authorized keys. Generated pair of keys is used to create a JSON Web Token which is necessary for requesting an IAM Token for a service account.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var sa_auth_key = new Yandex.IamServiceAccountKey("sa-auth-key", new Yandex.IamServiceAccountKeyArgs
        {
            Description = "key for service account",
            KeyAlgorithm = "RSA_4096",
            PgpKey = "keybase:keybaseusername",
            ServiceAccountId = "some_sa_id",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := yandex.NewIamServiceAccountKey(ctx, "sa-auth-key", &yandex.IamServiceAccountKeyArgs{
			Description:      pulumi.String("key for service account"),
			KeyAlgorithm:     pulumi.String("RSA_4096"),
			PgpKey:           pulumi.String("keybase:keybaseusername"),
			ServiceAccountId: pulumi.String("some_sa_id"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_yandex as yandex

sa_auth_key = yandex.IamServiceAccountKey("sa-auth-key",
    description="key for service account",
    key_algorithm="RSA_4096",
    pgp_key="keybase:keybaseusername",
    service_account_id="some_sa_id")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const sa_auth_key = new yandex.IamServiceAccountKey("sa-auth-key", {
    description: "key for service account",
    keyAlgorithm: "RSA_4096",
    pgpKey: "keybase:keybaseusername",
    serviceAccountId: "some_sa_id",
});

Coming soon!

Create a IamServiceAccountKey Resource

new IamServiceAccountKey(name: string, args: IamServiceAccountKeyArgs, opts?: CustomResourceOptions);
@overload
def IamServiceAccountKey(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         description: Optional[str] = None,
                         format: Optional[str] = None,
                         key_algorithm: Optional[str] = None,
                         pgp_key: Optional[str] = None,
                         service_account_id: Optional[str] = None)
@overload
def IamServiceAccountKey(resource_name: str,
                         args: IamServiceAccountKeyArgs,
                         opts: Optional[ResourceOptions] = None)
func NewIamServiceAccountKey(ctx *Context, name string, args IamServiceAccountKeyArgs, opts ...ResourceOption) (*IamServiceAccountKey, error)
public IamServiceAccountKey(string name, IamServiceAccountKeyArgs args, CustomResourceOptions? opts = null)
public IamServiceAccountKey(String name, IamServiceAccountKeyArgs args)
public IamServiceAccountKey(String name, IamServiceAccountKeyArgs args, CustomResourceOptions options)
type: yandex:IamServiceAccountKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args IamServiceAccountKeyArgs
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 IamServiceAccountKeyArgs
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 IamServiceAccountKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args IamServiceAccountKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args IamServiceAccountKeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

ServiceAccountId string

ID of the service account to create a pair for.

Description string

The description of the key pair.

Format string

The output format of the keys. PEM_FILE is the default format.

KeyAlgorithm string

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

PgpKey string

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

ServiceAccountId string

ID of the service account to create a pair for.

Description string

The description of the key pair.

Format string

The output format of the keys. PEM_FILE is the default format.

KeyAlgorithm string

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

PgpKey string

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

serviceAccountId String

ID of the service account to create a pair for.

description String

The description of the key pair.

format String

The output format of the keys. PEM_FILE is the default format.

keyAlgorithm String

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

pgpKey String

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

serviceAccountId string

ID of the service account to create a pair for.

description string

The description of the key pair.

format string

The output format of the keys. PEM_FILE is the default format.

keyAlgorithm string

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

pgpKey string

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

service_account_id str

ID of the service account to create a pair for.

description str

The description of the key pair.

format str

The output format of the keys. PEM_FILE is the default format.

key_algorithm str

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

pgp_key str

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

serviceAccountId String

ID of the service account to create a pair for.

description String

The description of the key pair.

format String

The output format of the keys. PEM_FILE is the default format.

keyAlgorithm String

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

pgpKey String

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

Outputs

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

CreatedAt string

Creation timestamp of the static access key.

EncryptedPrivateKey string

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

Id string

The provider-assigned unique ID for this managed resource.

KeyFingerprint string

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

PrivateKey string

The private key. This is only populated when no pgp_key is provided.

PublicKey string

The public key.

CreatedAt string

Creation timestamp of the static access key.

EncryptedPrivateKey string

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

Id string

The provider-assigned unique ID for this managed resource.

KeyFingerprint string

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

PrivateKey string

The private key. This is only populated when no pgp_key is provided.

PublicKey string

The public key.

createdAt String

Creation timestamp of the static access key.

encryptedPrivateKey String

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

id String

The provider-assigned unique ID for this managed resource.

keyFingerprint String

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

privateKey String

The private key. This is only populated when no pgp_key is provided.

publicKey String

The public key.

createdAt string

Creation timestamp of the static access key.

encryptedPrivateKey string

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

id string

The provider-assigned unique ID for this managed resource.

keyFingerprint string

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

privateKey string

The private key. This is only populated when no pgp_key is provided.

publicKey string

The public key.

created_at str

Creation timestamp of the static access key.

encrypted_private_key str

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

id str

The provider-assigned unique ID for this managed resource.

key_fingerprint str

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

private_key str

The private key. This is only populated when no pgp_key is provided.

public_key str

The public key.

createdAt String

Creation timestamp of the static access key.

encryptedPrivateKey String

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

id String

The provider-assigned unique ID for this managed resource.

keyFingerprint String

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

privateKey String

The private key. This is only populated when no pgp_key is provided.

publicKey String

The public key.

Look up an Existing IamServiceAccountKey Resource

Get an existing IamServiceAccountKey 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?: IamServiceAccountKeyState, opts?: CustomResourceOptions): IamServiceAccountKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        encrypted_private_key: Optional[str] = None,
        format: Optional[str] = None,
        key_algorithm: Optional[str] = None,
        key_fingerprint: Optional[str] = None,
        pgp_key: Optional[str] = None,
        private_key: Optional[str] = None,
        public_key: Optional[str] = None,
        service_account_id: Optional[str] = None) -> IamServiceAccountKey
func GetIamServiceAccountKey(ctx *Context, name string, id IDInput, state *IamServiceAccountKeyState, opts ...ResourceOption) (*IamServiceAccountKey, error)
public static IamServiceAccountKey Get(string name, Input<string> id, IamServiceAccountKeyState? state, CustomResourceOptions? opts = null)
public static IamServiceAccountKey get(String name, Output<String> id, IamServiceAccountKeyState 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.
The following state arguments are supported:
CreatedAt string

Creation timestamp of the static access key.

Description string

The description of the key pair.

EncryptedPrivateKey string

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

Format string

The output format of the keys. PEM_FILE is the default format.

KeyAlgorithm string

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

KeyFingerprint string

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

PgpKey string

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

PrivateKey string

The private key. This is only populated when no pgp_key is provided.

PublicKey string

The public key.

ServiceAccountId string

ID of the service account to create a pair for.

CreatedAt string

Creation timestamp of the static access key.

Description string

The description of the key pair.

EncryptedPrivateKey string

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

Format string

The output format of the keys. PEM_FILE is the default format.

KeyAlgorithm string

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

KeyFingerprint string

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

PgpKey string

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

PrivateKey string

The private key. This is only populated when no pgp_key is provided.

PublicKey string

The public key.

ServiceAccountId string

ID of the service account to create a pair for.

createdAt String

Creation timestamp of the static access key.

description String

The description of the key pair.

encryptedPrivateKey String

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

format String

The output format of the keys. PEM_FILE is the default format.

keyAlgorithm String

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

keyFingerprint String

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

pgpKey String

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

privateKey String

The private key. This is only populated when no pgp_key is provided.

publicKey String

The public key.

serviceAccountId String

ID of the service account to create a pair for.

createdAt string

Creation timestamp of the static access key.

description string

The description of the key pair.

encryptedPrivateKey string

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

format string

The output format of the keys. PEM_FILE is the default format.

keyAlgorithm string

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

keyFingerprint string

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

pgpKey string

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

privateKey string

The private key. This is only populated when no pgp_key is provided.

publicKey string

The public key.

serviceAccountId string

ID of the service account to create a pair for.

created_at str

Creation timestamp of the static access key.

description str

The description of the key pair.

encrypted_private_key str

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

format str

The output format of the keys. PEM_FILE is the default format.

key_algorithm str

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

key_fingerprint str

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

pgp_key str

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

private_key str

The private key. This is only populated when no pgp_key is provided.

public_key str

The public key.

service_account_id str

ID of the service account to create a pair for.

createdAt String

Creation timestamp of the static access key.

description String

The description of the key pair.

encryptedPrivateKey String

The encrypted private key, base64 encoded. This is only populated when pgp_key is supplied.

format String

The output format of the keys. PEM_FILE is the default format.

keyAlgorithm String

The algorithm used to generate the key. RSA_2048 is the default algorithm. Valid values are listed in the API reference.

keyFingerprint String

The fingerprint of the PGP key used to encrypt the private key. This is only populated when pgp_key is supplied.

pgpKey String

An optional PGP key to encrypt the resulting private key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.

privateKey String

The private key. This is only populated when no pgp_key is provided.

publicKey String

The public key.

serviceAccountId String

ID of the service account to create a pair for.

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes

This Pulumi package is based on the yandex Terraform Provider.