# Copyright IBM Corp. 2021, 2026 # SPDX-License-Identifier: MPL-2.0 resource "random_id" "aws_iam_user_name" { count = var.iam_user_count prefix = "demo-${local.hashicorp_email}-boundary-iam-user" byte_length = 4 } resource "aws_iam_user" "user" { count = var.iam_user_count name = random_id.aws_iam_user_name[count.index].dec force_destroy = true permissions_boundary = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:policy/DemoUser" tags = { "boundary-demo" = local.hashicorp_email } } resource "aws_iam_access_key" "user_initial_key" { count = var.iam_user_count user = aws_iam_user.user[count.index].name } resource "random_id" "aws_ec2_policy_name" { prefix = "BoundaryPluginHost" byte_length = 4 } resource "aws_iam_policy" "ec2_describeinstances" { name = random_id.aws_ec2_policy_name.dec policy = <