Skip to content

Commit

Permalink
fix; enable tags
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 11, 2021
1 parent 5d587d3 commit 59f1564
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
1 change: 0 additions & 1 deletion iam-general-policies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ No modules.
| Name | Type |
|------|------|
| [aws_iam_policy.general](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
| [aws_iam_policy.policy_network-admin](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
| [aws_arn.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | data source |
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [aws_iam_policy_document.deny_billing](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
Expand Down
12 changes: 6 additions & 6 deletions iam-general-policies/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ resource "aws_iam_policy" "general" {
description = lookup(each.value, "description", "${each.key} policy")
policy = each.value["policy"]

# tags = merge(
# var.tags,
# local.base_tags,
# lookup(var.component_tags, "policy", {}),
# map("Name",format("%vinf-%v", lookup(local._prefixes, "policy", ""), each.value["name"]))
# )
tags = merge(
var.tags,
local.base_tags,
lookup(var.component_tags, "policy", {}),
map("Name", format("%vinf-%v", lookup(local._prefixes, "policy", ""), each.value["name"]))
)
}

12 changes: 0 additions & 12 deletions iam-general-policies/policy_data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,6 @@ data "aws_iam_policy_document" "network_admin" {
}
}

resource "aws_iam_policy" "policy_network-admin" {
name = format("%vinf-%v", "p-", "network-admin")
path = "/"
description = "inf-network-admin policy"
policy = data.aws_iam_policy_document.policy_network-admin.json

tags = merge(
local.common_tags,
tomap({ "boc:created_by" = "terraform" }),
tomap({ "Name" = format("%vinf-%v", "p-", "network-admin") }),
)
}
#---
# sts (for roles)
#---
Expand Down

0 comments on commit 59f1564

Please sign in to comment.