1. Packages
  2. Platform Provider
  3. API Docs
  4. AwsIamRole
platform 2.2.2 published on Thursday, Apr 3, 2025 by jfrog

platform.AwsIamRole

Explore with Pulumi AI

Provides a resource to manage AWS IAM roles for JFrog platform users. You can use the AWS IAM roles for passwordless access to Amazon EKS. For more information, see Passwordless Access for Amazon EKS.

->Only available for Artifactory 7.90.10 or later.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as platform from "@pulumi/platform";

const myuser_aws_iam_role = new platform.AwsIamRole("myuser-aws-iam-role", {
    iamRole: "arn:aws:iam::000000000000:role/example",
    username: "myuser",
});
Copy
import pulumi
import pulumi_platform as platform

myuser_aws_iam_role = platform.AwsIamRole("myuser-aws-iam-role",
    iam_role="arn:aws:iam::000000000000:role/example",
    username="myuser")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/platform/v2/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.NewAwsIamRole(ctx, "myuser-aws-iam-role", &platform.AwsIamRoleArgs{
			IamRole:  pulumi.String("arn:aws:iam::000000000000:role/example"),
			Username: pulumi.String("myuser"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Platform = Pulumi.Platform;

return await Deployment.RunAsync(() => 
{
    var myuser_aws_iam_role = new Platform.AwsIamRole("myuser-aws-iam-role", new()
    {
        IamRole = "arn:aws:iam::000000000000:role/example",
        Username = "myuser",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.platform.AwsIamRole;
import com.pulumi.platform.AwsIamRoleArgs;
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 myuser_aws_iam_role = new AwsIamRole("myuser-aws-iam-role", AwsIamRoleArgs.builder()
            .iamRole("arn:aws:iam::000000000000:role/example")
            .username("myuser")
            .build());

    }
}
Copy
resources:
  myuser-aws-iam-role:
    type: platform:AwsIamRole
    properties:
      iamRole: arn:aws:iam::000000000000:role/example
      username: myuser
Copy

Create AwsIamRole Resource

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

Constructor syntax

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

@overload
def AwsIamRole(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               iam_role: Optional[str] = None,
               username: Optional[str] = None)
func NewAwsIamRole(ctx *Context, name string, args AwsIamRoleArgs, opts ...ResourceOption) (*AwsIamRole, error)
public AwsIamRole(string name, AwsIamRoleArgs args, CustomResourceOptions? opts = null)
public AwsIamRole(String name, AwsIamRoleArgs args)
public AwsIamRole(String name, AwsIamRoleArgs args, CustomResourceOptions options)
type: platform:AwsIamRole
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. AwsIamRoleArgs
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. AwsIamRoleArgs
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. AwsIamRoleArgs
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. AwsIamRoleArgs
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. AwsIamRoleArgs
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 awsIamRoleResource = new Platform.AwsIamRole("awsIamRoleResource", new()
{
    IamRole = "string",
    Username = "string",
});
Copy
example, err := platform.NewAwsIamRole(ctx, "awsIamRoleResource", &platform.AwsIamRoleArgs{
IamRole: pulumi.String("string"),
Username: pulumi.String("string"),
})
Copy
var awsIamRoleResource = new AwsIamRole("awsIamRoleResource", AwsIamRoleArgs.builder()
    .iamRole("string")
    .username("string")
    .build());
Copy
aws_iam_role_resource = platform.AwsIamRole("awsIamRoleResource",
    iam_role="string",
    username="string")
Copy
const awsIamRoleResource = new platform.AwsIamRole("awsIamRoleResource", {
    iamRole: "string",
    username: "string",
});
Copy
type: platform:AwsIamRole
properties:
    iamRole: string
    username: string
Copy

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

IamRole This property is required. string
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
Username This property is required. string
The JFrog Platform user name.
IamRole This property is required. string
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
Username This property is required. string
The JFrog Platform user name.
iamRole This property is required. String
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
username This property is required. String
The JFrog Platform user name.
iamRole This property is required. string
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
username This property is required. string
The JFrog Platform user name.
iam_role This property is required. str
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
username This property is required. str
The JFrog Platform user name.
iamRole This property is required. String
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
username This property is required. String
The JFrog Platform user name.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing AwsIamRole Resource

Get an existing AwsIamRole 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?: AwsIamRoleState, opts?: CustomResourceOptions): AwsIamRole
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        iam_role: Optional[str] = None,
        username: Optional[str] = None) -> AwsIamRole
func GetAwsIamRole(ctx *Context, name string, id IDInput, state *AwsIamRoleState, opts ...ResourceOption) (*AwsIamRole, error)
public static AwsIamRole Get(string name, Input<string> id, AwsIamRoleState? state, CustomResourceOptions? opts = null)
public static AwsIamRole get(String name, Output<String> id, AwsIamRoleState state, CustomResourceOptions options)
resources:  _:    type: platform:AwsIamRole    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:
IamRole string
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
Username string
The JFrog Platform user name.
IamRole string
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
Username string
The JFrog Platform user name.
iamRole String
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
username String
The JFrog Platform user name.
iamRole string
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
username string
The JFrog Platform user name.
iam_role str
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
username str
The JFrog Platform user name.
iamRole String
The AWS IAM role. Must follow the regex, "^arn:aws:iam::\d{12}:role/[\w+=,.@:-]+$"
username String
The JFrog Platform user name.

Import

$ pulumi import platform:index/awsIamRole:AwsIamRole myuser-aws-iam-role myuser
Copy

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

Package Details

Repository
platform jfrog/terraform-provider-platform
License
Notes
This Pulumi package is based on the platform Terraform Provider.