ibm 1.86.0 published on Wednesday, Dec 3, 2025 by ibm-cloud
ibm 1.86.0 published on Wednesday, Dec 3, 2025 by ibm-cloud
Provides a read-only data source to retrieve information about an iam_role_template. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const iamRoleTemplate = ibm.getIamRoleTemplate({});
import pulumi
import pulumi_ibm as ibm
iam_role_template = ibm.get_iam_role_template()
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.LookupIamRoleTemplate(ctx, &ibm.LookupIamRoleTemplateArgs{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var iamRoleTemplate = Ibm.GetIamRoleTemplate.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetIamRoleTemplateArgs;
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 iamRoleTemplate = IbmFunctions.getIamRoleTemplate(GetIamRoleTemplateArgs.builder()
.build());
}
}
variables:
iamRoleTemplate:
fn::invoke:
function: ibm:getIamRoleTemplate
arguments: {}
Using getIamRoleTemplate
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getIamRoleTemplate(args: GetIamRoleTemplateArgs, opts?: InvokeOptions): Promise<GetIamRoleTemplateResult>
function getIamRoleTemplateOutput(args: GetIamRoleTemplateOutputArgs, opts?: InvokeOptions): Output<GetIamRoleTemplateResult>def get_iam_role_template(id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIamRoleTemplateResult
def get_iam_role_template_output(id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIamRoleTemplateResult]func LookupIamRoleTemplate(ctx *Context, args *LookupIamRoleTemplateArgs, opts ...InvokeOption) (*LookupIamRoleTemplateResult, error)
func LookupIamRoleTemplateOutput(ctx *Context, args *LookupIamRoleTemplateOutputArgs, opts ...InvokeOption) LookupIamRoleTemplateResultOutput> Note: This function is named LookupIamRoleTemplate in the Go SDK.
public static class GetIamRoleTemplate
{
public static Task<GetIamRoleTemplateResult> InvokeAsync(GetIamRoleTemplateArgs args, InvokeOptions? opts = null)
public static Output<GetIamRoleTemplateResult> Invoke(GetIamRoleTemplateInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetIamRoleTemplateResult> getIamRoleTemplate(GetIamRoleTemplateArgs args, InvokeOptions options)
public static Output<GetIamRoleTemplateResult> getIamRoleTemplate(GetIamRoleTemplateArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIamRoleTemplate:getIamRoleTemplate
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- Id string
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- id String
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- id string
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- id str
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- id String
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
getIamRoleTemplate Result
The following output properties are available:
- Id string
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- Role
Templates List<GetIam Role Template Role Template> - (List) List of role templates.
- Constraints: The maximum length is
100items. The minimum length is0items. Nested schema for role_templates:
- Constraints: The maximum length is
- Id string
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- Role
Templates []GetIam Role Template Role Template - (List) List of role templates.
- Constraints: The maximum length is
100items. The minimum length is0items. Nested schema for role_templates:
- Constraints: The maximum length is
- id String
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- role
Templates List<GetIam Role Template Role Template> - (List) List of role templates.
- Constraints: The maximum length is
100items. The minimum length is0items. Nested schema for role_templates:
- Constraints: The maximum length is
- id string
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- role
Templates GetIam Role Template Role Template[] - (List) List of role templates.
- Constraints: The maximum length is
100items. The minimum length is0items. Nested schema for role_templates:
- Constraints: The maximum length is
- id str
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- role_
templates Sequence[GetIam Role Template Role Template] - (List) List of role templates.
- Constraints: The maximum length is
100items. The minimum length is0items. Nested schema for role_templates:
- Constraints: The maximum length is
- id String
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- role
Templates List<Property Map> - (List) List of role templates.
- Constraints: The maximum length is
100items. The minimum length is0items. Nested schema for role_templates:
- Constraints: The maximum length is
Supporting Types
GetIamRoleTemplateRoleTemplate
- Account
Id string - (String) Enterprise account ID where this template is created.
- Constraints: The maximum length is
32characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9-]*$/.
- Constraints: The maximum length is
- Committed bool
- (Boolean) Committed status of the template. If committed is set to true, then the template version can no longer be updated.
- Description string
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- Id string
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- Name string
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- Roles
List<Get
Iam Role Template Role Template Role> - (List) The role properties that are created in an action resource when the template is assigned. Nested schema for role:
- Version string
- (String) The version number of the template used to identify different versions of same template.
- Constraints: The maximum length is
2characters. The minimum length is1character. The value must match regular expression/^[0-9]*$/.
- Constraints: The maximum length is
- Account
Id string - (String) Enterprise account ID where this template is created.
- Constraints: The maximum length is
32characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9-]*$/.
- Constraints: The maximum length is
- Committed bool
- (Boolean) Committed status of the template. If committed is set to true, then the template version can no longer be updated.
- Description string
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- Id string
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- Name string
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- Roles
[]Get
Iam Role Template Role Template Role - (List) The role properties that are created in an action resource when the template is assigned. Nested schema for role:
- Version string
- (String) The version number of the template used to identify different versions of same template.
- Constraints: The maximum length is
2characters. The minimum length is1character. The value must match regular expression/^[0-9]*$/.
- Constraints: The maximum length is
- account
Id String - (String) Enterprise account ID where this template is created.
- Constraints: The maximum length is
32characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9-]*$/.
- Constraints: The maximum length is
- committed Boolean
- (Boolean) Committed status of the template. If committed is set to true, then the template version can no longer be updated.
- description String
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- id String
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- name String
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- roles
List<Get
Iam Role Template Role Template Role> - (List) The role properties that are created in an action resource when the template is assigned. Nested schema for role:
- version String
- (String) The version number of the template used to identify different versions of same template.
- Constraints: The maximum length is
2characters. The minimum length is1character. The value must match regular expression/^[0-9]*$/.
- Constraints: The maximum length is
- account
Id string - (String) Enterprise account ID where this template is created.
- Constraints: The maximum length is
32characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9-]*$/.
- Constraints: The maximum length is
- committed boolean
- (Boolean) Committed status of the template. If committed is set to true, then the template version can no longer be updated.
- description string
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- id string
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- name string
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- roles
Get
Iam Role Template Role Template Role[] - (List) The role properties that are created in an action resource when the template is assigned. Nested schema for role:
- version string
- (String) The version number of the template used to identify different versions of same template.
- Constraints: The maximum length is
2characters. The minimum length is1character. The value must match regular expression/^[0-9]*$/.
- Constraints: The maximum length is
- account_
id str - (String) Enterprise account ID where this template is created.
- Constraints: The maximum length is
32characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9-]*$/.
- Constraints: The maximum length is
- committed bool
- (Boolean) Committed status of the template. If committed is set to true, then the template version can no longer be updated.
- description str
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- id str
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- name str
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- roles
Sequence[Get
Iam Role Template Role Template Role] - (List) The role properties that are created in an action resource when the template is assigned. Nested schema for role:
- version str
- (String) The version number of the template used to identify different versions of same template.
- Constraints: The maximum length is
2characters. The minimum length is1character. The value must match regular expression/^[0-9]*$/.
- Constraints: The maximum length is
- account
Id String - (String) Enterprise account ID where this template is created.
- Constraints: The maximum length is
32characters. The minimum length is1character. The value must match regular expression/^[A-Za-z0-9-]*$/.
- Constraints: The maximum length is
- committed Boolean
- (Boolean) Committed status of the template. If committed is set to true, then the template version can no longer be updated.
- description String
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- id String
- (String) The role template ID.
- Constraints: The maximum length is
49characters. The minimum length is1character. The value must match regular expression/^roleTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
- Constraints: The maximum length is
- name String
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- roles List<Property Map>
- (List) The role properties that are created in an action resource when the template is assigned. Nested schema for role:
- version String
- (String) The version number of the template used to identify different versions of same template.
- Constraints: The maximum length is
2characters. The minimum length is1character. The value must match regular expression/^[0-9]*$/.
- Constraints: The maximum length is
GetIamRoleTemplateRoleTemplateRole
- Actions List<string>
- (List) The actions of the role.
- Constraints: The minimum length is
1item.
- Constraints: The minimum length is
- Description string
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- Display
Name string - (String) The display the name of the role that is shown in the console.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^((?!<|>).)*$/.
- Constraints: The maximum length is
- Name string
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- Service
Name string - (String) The service name that the role refers.
- Constraints: The maximum length is
300characters. The minimum length is1character.
- Constraints: The maximum length is
- Actions []string
- (List) The actions of the role.
- Constraints: The minimum length is
1item.
- Constraints: The minimum length is
- Description string
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- Display
Name string - (String) The display the name of the role that is shown in the console.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^((?!<|>).)*$/.
- Constraints: The maximum length is
- Name string
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- Service
Name string - (String) The service name that the role refers.
- Constraints: The maximum length is
300characters. The minimum length is1character.
- Constraints: The maximum length is
- actions List<String>
- (List) The actions of the role.
- Constraints: The minimum length is
1item.
- Constraints: The minimum length is
- description String
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- display
Name String - (String) The display the name of the role that is shown in the console.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^((?!<|>).)*$/.
- Constraints: The maximum length is
- name String
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- service
Name String - (String) The service name that the role refers.
- Constraints: The maximum length is
300characters. The minimum length is1character.
- Constraints: The maximum length is
- actions string[]
- (List) The actions of the role.
- Constraints: The minimum length is
1item.
- Constraints: The minimum length is
- description string
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- display
Name string - (String) The display the name of the role that is shown in the console.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^((?!<|>).)*$/.
- Constraints: The maximum length is
- name string
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- service
Name string - (String) The service name that the role refers.
- Constraints: The maximum length is
300characters. The minimum length is1character.
- Constraints: The maximum length is
- actions Sequence[str]
- (List) The actions of the role.
- Constraints: The minimum length is
1item.
- Constraints: The minimum length is
- description str
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- display_
name str - (String) The display the name of the role that is shown in the console.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^((?!<|>).)*$/.
- Constraints: The maximum length is
- name str
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- service_
name str - (String) The service name that the role refers.
- Constraints: The maximum length is
300characters. The minimum length is1character.
- Constraints: The maximum length is
- actions List<String>
- (List) The actions of the role.
- Constraints: The minimum length is
1item.
- Constraints: The minimum length is
- description String
- (String) Description of the role.
- Constraints: The maximum length is
300characters. The minimum length is1character. The value must match regular expression/^.*$/.
- Constraints: The maximum length is
- display
Name String - (String) The display the name of the role that is shown in the console.
- Constraints: The maximum length is
50characters. The minimum length is1character. The value must match regular expression/^((?!<|>).)*$/.
- Constraints: The maximum length is
- name String
- (String) The name of the role that is used in the CRN. This must be alphanumeric and capitalized.
- Constraints: The maximum length is
30characters. The minimum length is1character. The value must match regular expression/^[A-Z]{1}[A-Za-z0-9]{0,29}$/.
- Constraints: The maximum length is
- service
Name String - (String) The service name that the role refers.
- Constraints: The maximum length is
300characters. The minimum length is1character.
- Constraints: The maximum length is
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibmTerraform Provider.
ibm 1.86.0 published on Wednesday, Dec 3, 2025 by ibm-cloud
