aws.iam.InstanceProfile
Explore with Pulumi AI
Provides an IAM instance profile.
NOTE: When managing instance profiles, remember that the
nameattribute must always be unique. This means that even if you have differentroleorpathvalues, duplicating an existing instance profilenamewill lead to anEntityAlreadyExistserror.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const assumeRole = aws.iam.getPolicyDocument({
statements: [{
effect: "Allow",
principals: [{
type: "Service",
identifiers: ["ec2.amazonaws.com"],
}],
actions: ["sts:AssumeRole"],
}],
});
const role = new aws.iam.Role("role", {
name: "test_role",
path: "/",
assumeRolePolicy: assumeRole.then(assumeRole => assumeRole.json),
});
const testProfile = new aws.iam.InstanceProfile("test_profile", {
name: "test_profile",
role: role.name,
});
import pulumi
import pulumi_aws as aws
assume_role = aws.iam.get_policy_document(statements=[{
"effect": "Allow",
"principals": [{
"type": "Service",
"identifiers": ["ec2.amazonaws.com"],
}],
"actions": ["sts:AssumeRole"],
}])
role = aws.iam.Role("role",
name="test_role",
path="/",
assume_role_policy=assume_role.json)
test_profile = aws.iam.InstanceProfile("test_profile",
name="test_profile",
role=role.name)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
Statements: []iam.GetPolicyDocumentStatement{
{
Effect: pulumi.StringRef("Allow"),
Principals: []iam.GetPolicyDocumentStatementPrincipal{
{
Type: "Service",
Identifiers: []string{
"ec2.amazonaws.com",
},
},
},
Actions: []string{
"sts:AssumeRole",
},
},
},
}, nil)
if err != nil {
return err
}
role, err := iam.NewRole(ctx, "role", &iam.RoleArgs{
Name: pulumi.String("test_role"),
Path: pulumi.String("/"),
AssumeRolePolicy: pulumi.String(assumeRole.Json),
})
if err != nil {
return err
}
_, err = iam.NewInstanceProfile(ctx, "test_profile", &iam.InstanceProfileArgs{
Name: pulumi.String("test_profile"),
Role: role.Name,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()
{
Statements = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
{
Effect = "Allow",
Principals = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
{
Type = "Service",
Identifiers = new[]
{
"ec2.amazonaws.com",
},
},
},
Actions = new[]
{
"sts:AssumeRole",
},
},
},
});
var role = new Aws.Iam.Role("role", new()
{
Name = "test_role",
Path = "/",
AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
});
var testProfile = new Aws.Iam.InstanceProfile("test_profile", new()
{
Name = "test_profile",
Role = role.Name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.iam.InstanceProfile;
import com.pulumi.aws.iam.InstanceProfileArgs;
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) {
final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
.statements(GetPolicyDocumentStatementArgs.builder()
.effect("Allow")
.principals(GetPolicyDocumentStatementPrincipalArgs.builder()
.type("Service")
.identifiers("ec2.amazonaws.com")
.build())
.actions("sts:AssumeRole")
.build())
.build());
var role = new Role("role", RoleArgs.builder()
.name("test_role")
.path("/")
.assumeRolePolicy(assumeRole.json())
.build());
var testProfile = new InstanceProfile("testProfile", InstanceProfileArgs.builder()
.name("test_profile")
.role(role.name())
.build());
}
}
resources:
testProfile:
type: aws:iam:InstanceProfile
name: test_profile
properties:
name: test_profile
role: ${role.name}
role:
type: aws:iam:Role
properties:
name: test_role
path: /
assumeRolePolicy: ${assumeRole.json}
variables:
assumeRole:
fn::invoke:
function: aws:iam:getPolicyDocument
arguments:
statements:
- effect: Allow
principals:
- type: Service
identifiers:
- ec2.amazonaws.com
actions:
- sts:AssumeRole
Create InstanceProfile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InstanceProfile(name: string, args?: InstanceProfileArgs, opts?: CustomResourceOptions);@overload
def InstanceProfile(resource_name: str,
args: Optional[InstanceProfileArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def InstanceProfile(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
path: Optional[str] = None,
role: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)func NewInstanceProfile(ctx *Context, name string, args *InstanceProfileArgs, opts ...ResourceOption) (*InstanceProfile, error)public InstanceProfile(string name, InstanceProfileArgs? args = null, CustomResourceOptions? opts = null)
public InstanceProfile(String name, InstanceProfileArgs args)
public InstanceProfile(String name, InstanceProfileArgs args, CustomResourceOptions options)
type: aws:iam:InstanceProfile
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 InstanceProfileArgs
- 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 InstanceProfileArgs
- 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 InstanceProfileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceProfileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceProfileArgs
- 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 awsInstanceProfileResource = new Aws.Iam.InstanceProfile("awsInstanceProfileResource", new()
{
Name = "string",
NamePrefix = "string",
Path = "string",
Role = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := iam.NewInstanceProfile(ctx, "awsInstanceProfileResource", &iam.InstanceProfileArgs{
Name: pulumi.String("string"),
NamePrefix: pulumi.String("string"),
Path: pulumi.String("string"),
Role: pulumi.Any("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var awsInstanceProfileResource = new com.pulumi.aws.iam.InstanceProfile("awsInstanceProfileResource", com.pulumi.aws.iam.InstanceProfileArgs.builder()
.name("string")
.namePrefix("string")
.path("string")
.role("string")
.tags(Map.of("string", "string"))
.build());
aws_instance_profile_resource = aws.iam.InstanceProfile("awsInstanceProfileResource",
name="string",
name_prefix="string",
path="string",
role="string",
tags={
"string": "string",
})
const awsInstanceProfileResource = new aws.iam.InstanceProfile("awsInstanceProfileResource", {
name: "string",
namePrefix: "string",
path: "string",
role: "string",
tags: {
string: "string",
},
});
type: aws:iam:InstanceProfile
properties:
name: string
namePrefix: string
path: string
role: string
tags:
string: string
InstanceProfile 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 InstanceProfile resource accepts the following input properties:
- Name string
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name. - Path string
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - Role string | string
- Name of the role to add to the profile.
- Dictionary<string, string>
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Name string
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name. - Path string
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - Role string | string
- Name of the role to add to the profile.
- map[string]string
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- name String
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name. - path String
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - role String | String
- Name of the role to add to the profile.
- Map<String,String>
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- name string
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name. - path string
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - role string | Role
- Name of the role to add to the profile.
- {[key: string]: string}
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- name str
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - name_
prefix str - Creates a unique name beginning with the specified prefix. Conflicts with
name. - path str
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - role str | str
- Name of the role to add to the profile.
- Mapping[str, str]
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- name String
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name. - path String
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - role String |
- Name of the role to add to the profile.
- Map<String>
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the InstanceProfile resource produces the following output properties:
- Arn string
- ARN assigned by AWS to the instance profile.
- Create
Date string - Creation timestamp of the instance profile.
- Id string
- The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - Unique
Id string - [Unique ID][1] assigned by AWS.
- Arn string
- ARN assigned by AWS to the instance profile.
- Create
Date string - Creation timestamp of the instance profile.
- Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - Unique
Id string - [Unique ID][1] assigned by AWS.
- arn String
- ARN assigned by AWS to the instance profile.
- create
Date String - Creation timestamp of the instance profile.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - unique
Id String - [Unique ID][1] assigned by AWS.
- arn string
- ARN assigned by AWS to the instance profile.
- create
Date string - Creation timestamp of the instance profile.
- id string
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - unique
Id string - [Unique ID][1] assigned by AWS.
- arn str
- ARN assigned by AWS to the instance profile.
- create_
date str - Creation timestamp of the instance profile.
- id str
- The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - unique_
id str - [Unique ID][1] assigned by AWS.
- arn String
- ARN assigned by AWS to the instance profile.
- create
Date String - Creation timestamp of the instance profile.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - unique
Id String - [Unique ID][1] assigned by AWS.
Look up Existing InstanceProfile Resource
Get an existing InstanceProfile 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?: InstanceProfileState, opts?: CustomResourceOptions): InstanceProfile@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
create_date: Optional[str] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
path: Optional[str] = None,
role: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
unique_id: Optional[str] = None) -> InstanceProfilefunc GetInstanceProfile(ctx *Context, name string, id IDInput, state *InstanceProfileState, opts ...ResourceOption) (*InstanceProfile, error)public static InstanceProfile Get(string name, Input<string> id, InstanceProfileState? state, CustomResourceOptions? opts = null)public static InstanceProfile get(String name, Output<String> id, InstanceProfileState state, CustomResourceOptions options)resources: _: type: aws:iam:InstanceProfile 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.
- Arn string
- ARN assigned by AWS to the instance profile.
- Create
Date string - Creation timestamp of the instance profile.
- Name string
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name. - Path string
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - Role string | string
- Name of the role to add to the profile.
- Dictionary<string, string>
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - Unique
Id string - [Unique ID][1] assigned by AWS.
- Arn string
- ARN assigned by AWS to the instance profile.
- Create
Date string - Creation timestamp of the instance profile.
- Name string
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name. - Path string
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - Role string | string
- Name of the role to add to the profile.
- map[string]string
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - Unique
Id string - [Unique ID][1] assigned by AWS.
- arn String
- ARN assigned by AWS to the instance profile.
- create
Date String - Creation timestamp of the instance profile.
- name String
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name. - path String
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - role String | String
- Name of the role to add to the profile.
- Map<String,String>
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - unique
Id String - [Unique ID][1] assigned by AWS.
- arn string
- ARN assigned by AWS to the instance profile.
- create
Date string - Creation timestamp of the instance profile.
- name string
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name. - path string
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - role string | Role
- Name of the role to add to the profile.
- {[key: string]: string}
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - unique
Id string - [Unique ID][1] assigned by AWS.
- arn str
- ARN assigned by AWS to the instance profile.
- create_
date str - Creation timestamp of the instance profile.
- name str
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - name_
prefix str - Creates a unique name beginning with the specified prefix. Conflicts with
name. - path str
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - role str | str
- Name of the role to add to the profile.
- Mapping[str, str]
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - unique_
id str - [Unique ID][1] assigned by AWS.
- arn String
- ARN assigned by AWS to the instance profile.
- create
Date String - Creation timestamp of the instance profile.
- name String
- Name of the instance profile. If omitted, this provider will assign a random, unique name. Conflicts with
name_prefix. Can be a string of characters consisting of upper and lowercase alphanumeric characters and these special characters:_,+,=,,,.,@,-. Spaces are not allowed. Thenamemust be unique, regardless of thepathorrole. In other words, if there are differentroleorpathvalues but the samenameas an existing instance profile, it will still cause anEntityAlreadyExistserror. - name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name. - path String
- Path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide. Can be a string of characters consisting of either a forward slash (
/) by itself or a string that must begin and end with forward slashes. Can include any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercase letters. - role String |
- Name of the role to add to the profile.
- Map<String>
- Map of resource tags for the IAM Instance Profile. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - unique
Id String - [Unique ID][1] assigned by AWS.
Import
Using pulumi import, import Instance Profiles using the name. For example:
$ pulumi import aws:iam/instanceProfile:InstanceProfile test_profile app-instance-profile-1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.