objectscale_iam_role (Resource)
This resource manages an Dell ObjectScale IAM role.
Example Usage
/*
Copyright (c) 2025 Dell Inc., or its subsidiaries. All Rights Reserved.
Licensed under the Mozilla Public License Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://mozilla.org/MPL/2.0/
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
resource "objectscale_iam_role" "example" {
name = "example-role"
namespace = "ns1"
description = "An example role updated"
permissions_boundary_arn = "urn:ecs:iam:::policy/ECSS3Access"
max_session_duration = 4000
assume_role_policy_document = jsonencode({
Version = "2012-11-17"
Statement = [
{
Effect = "Allow"
Principal = {
AWS = [
"urn:ecs:iam::ns1:user/sample_user_1"
]
}
Action = "sts:AssumeRole"
}
]
})
tags = [
{
"key" : "key1",
"value" : "value1"
},
{
"key" : "key2",
"value" : "value2"
}
]
}
Schema
Required
assume_role_policy_document(String) The trust relationship policy document that grants an entity permission to assume the role.name(String) Simple name identifying the Role. Requirednamespace(String) Namespace under which Role exists. Required
Optional
description(String) The description of the role.max_session_duration(Number) The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 1 hour to 12 hours.permissions_boundary_arn(String) Arn of the permissions boundary.permissions_boundary_type(String) Type of the permissions boundary.tags(Attributes Set) The list of Tags associated with the role.. Default: []. Updatable. (see below for nested schema)
Read-Only
path(String) The path to the IAM Role. Defaults to / and only / is allowed
Nested Schema for tags
Optional:
key(String) Key of the tag associated to the role.value(String) Value of the tag associated to the role.
Unless specified otherwise, all fields of this resource can be updated.
Import
Import is supported using the following syntax:
# Copyright (c) 2025 Dell Inc., or its subsidiaries. All Rights Reserved.
# Licensed under the Mozilla Public License Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://mozilla.org/MPL/2.0/
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The command is
# terraform import objectscale_iam_role.example <role_name:namespace>
# Example:
terraform import objectscale_iam_role.iam_role example_role:ns1
# after running this command, populate the name field and other required parameters in the config file to start managing this resource.
# Note: running "terraform show" after importing shows the current config/state of the resource. You can copy/paste that config to make it easier to manage the resource.