From 61f28b424d9c7f0aa6c5527cc39716669b9f482087c708f37979b8671876bd70 Mon Sep 17 00:00:00 2001 From: xpk Date: Fri, 20 Mar 2026 07:50:57 +0800 Subject: [PATCH] feat: updated UserRole example --- UserRole/README.md | 4 +--- UserRole/main.tf | 1 + UserRole/variables.tf | 17 +---------------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/UserRole/README.md b/UserRole/README.md index 4b17e2b..2f4b9b6 100644 --- a/UserRole/README.md +++ b/UserRole/README.md @@ -30,10 +30,8 @@ No requirements. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| DynamicAddressGroup | n/a | `any` | n/a | yes | | application | n/a | `any` | n/a | yes | | aws-region | n/a | `any` | n/a | yes | -| costcenter | n/a | `any` | n/a | yes | | customer-name | n/a | `any` | n/a | yes | | environment | n/a | `any` | n/a | yes | | owner | n/a | `any` | n/a | yes | @@ -50,4 +48,4 @@ No requirements. --- ## Authorship -This module was developed by xpk. +This module was developed by xpk. \ No newline at end of file diff --git a/UserRole/main.tf b/UserRole/main.tf index 497d833..8887ff4 100644 --- a/UserRole/main.tf +++ b/UserRole/main.tf @@ -39,6 +39,7 @@ module "iam-user2" { module "IamReadOnlyRole" { source = "../modules/security_identity_compliance/iam-role-v2" + role-name = "MyReadonlyRole" trusted-entity = "ec2.amazonaws.com" description = "IAM role with read only access. Data decryption is denied" path = "/Management/" diff --git a/UserRole/variables.tf b/UserRole/variables.tf index 0e46195..4fbdc7e 100644 --- a/UserRole/variables.tf +++ b/UserRole/variables.tf @@ -3,19 +3,4 @@ variable "customer-name" {} variable "environment" {} variable "project" {} variable "application" {} -variable "owner" {} -variable "costcenter" {} -variable "DynamicAddressGroup" {} - -locals { - default-tags = { - ServiceProvider = "RackspaceTechnology" - Environment = var.environment - Project = var.project - Application = var.application - TerraformMode = "managed" - Owner = var.owner - TerraformDir = join("/", reverse(slice(reverse(split("/", path.cwd)), 0, 2))) - } - resource-prefix = "${var.environment}-substr(${var.aws-region},0,2)-${var.customer-name}-${var.project}" -} +variable "owner" {} \ No newline at end of file