yandex.IamServiceAccount
Explore with Pulumi AI
Allows management of a Yandex.Cloud IAM service account. To assign roles and permissions, use the yandex_iam_service_account_iam_binding, yandex.IamServiceAccountIamMember and yandex.IamServiceAccountIamPolicy resources.
Example Usage
This snippet creates a service account.
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var sa = new Yandex.IamServiceAccount("sa", new Yandex.IamServiceAccountArgs
{
Description = "service account to manage VMs",
});
}
}
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.NewIamServiceAccount(ctx, "sa", &yandex.IamServiceAccountArgs{
Description: pulumi.String("service account to manage VMs"),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
sa = yandex.IamServiceAccount("sa", description="service account to manage VMs")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const sa = new yandex.IamServiceAccount("sa", {
description: "service account to manage VMs",
});
Coming soon!
Create IamServiceAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamServiceAccount(name: string, args?: IamServiceAccountArgs, opts?: CustomResourceOptions);
@overload
def IamServiceAccount(resource_name: str,
args: Optional[IamServiceAccountArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def IamServiceAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
name: Optional[str] = None)
func NewIamServiceAccount(ctx *Context, name string, args *IamServiceAccountArgs, opts ...ResourceOption) (*IamServiceAccount, error)
public IamServiceAccount(string name, IamServiceAccountArgs? args = null, CustomResourceOptions? opts = null)
public IamServiceAccount(String name, IamServiceAccountArgs args)
public IamServiceAccount(String name, IamServiceAccountArgs args, CustomResourceOptions options)
type: yandex:IamServiceAccount
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 IamServiceAccountArgs
- 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 IamServiceAccountArgs
- 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 IamServiceAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamServiceAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamServiceAccountArgs
- 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 iamServiceAccountResource = new Yandex.IamServiceAccount("iamServiceAccountResource", new()
{
Description = "string",
FolderId = "string",
Name = "string",
});
example, err := yandex.NewIamServiceAccount(ctx, "iamServiceAccountResource", &yandex.IamServiceAccountArgs{
Description: pulumi.String("string"),
FolderId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var iamServiceAccountResource = new IamServiceAccount("iamServiceAccountResource", IamServiceAccountArgs.builder()
.description("string")
.folderId("string")
.name("string")
.build());
iam_service_account_resource = yandex.IamServiceAccount("iamServiceAccountResource",
description="string",
folder_id="string",
name="string")
const iamServiceAccountResource = new yandex.IamServiceAccount("iamServiceAccountResource", {
description: "string",
folderId: "string",
name: "string",
});
type: yandex:IamServiceAccount
properties:
description: string
folderId: string
name: string
IamServiceAccount 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 IamServiceAccount resource accepts the following input properties:
- Description string
- Description of the service account.
- Folder
Id string - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- Name string
- Name of the service account. Can be updated without creating a new resource.
- Description string
- Description of the service account.
- Folder
Id string - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- Name string
- Name of the service account. Can be updated without creating a new resource.
- description String
- Description of the service account.
- folder
Id String - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- name String
- Name of the service account. Can be updated without creating a new resource.
- description string
- Description of the service account.
- folder
Id string - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- name string
- Name of the service account. Can be updated without creating a new resource.
- description str
- Description of the service account.
- folder_
id str - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- name str
- Name of the service account. Can be updated without creating a new resource.
- description String
- Description of the service account.
- folder
Id String - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- name String
- Name of the service account. Can be updated without creating a new resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the IamServiceAccount resource produces the following output properties:
- created_
at str - id str
- The provider-assigned unique ID for this managed resource.
Look up Existing IamServiceAccount Resource
Get an existing IamServiceAccount 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?: IamServiceAccountState, opts?: CustomResourceOptions): IamServiceAccount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
name: Optional[str] = None) -> IamServiceAccount
func GetIamServiceAccount(ctx *Context, name string, id IDInput, state *IamServiceAccountState, opts ...ResourceOption) (*IamServiceAccount, error)
public static IamServiceAccount Get(string name, Input<string> id, IamServiceAccountState? state, CustomResourceOptions? opts = null)
public static IamServiceAccount get(String name, Output<String> id, IamServiceAccountState 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.
- Created
At string - Description string
- Description of the service account.
- Folder
Id string - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- Name string
- Name of the service account. Can be updated without creating a new resource.
- Created
At string - Description string
- Description of the service account.
- Folder
Id string - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- Name string
- Name of the service account. Can be updated without creating a new resource.
- created
At String - description String
- Description of the service account.
- folder
Id String - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- name String
- Name of the service account. Can be updated without creating a new resource.
- created
At string - description string
- Description of the service account.
- folder
Id string - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- name string
- Name of the service account. Can be updated without creating a new resource.
- created_
at str - description str
- Description of the service account.
- folder_
id str - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- name str
- Name of the service account. Can be updated without creating a new resource.
- created
At String - description String
- Description of the service account.
- folder
Id String - ID of the folder that the service account will be created in. Defaults to the provider folder configuration.
- name String
- Name of the service account. Can be updated without creating a new resource.
Import
A service account can be imported using the id
of the resource, e.g.
$ pulumi import yandex:index/iamServiceAccount:IamServiceAccount sa account_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
yandex
Terraform Provider.