Skip to content

Commit

Permalink
* 1.4.1 -- 2026-01-16
Browse files Browse the repository at this point in the history
  - created policies
    - policies/sc-servicecatalog-t2
    - policies/sc-servicecatalog-t3
  • Loading branch information
badra001 committed Jan 16, 2026
1 parent 4eafc11 commit a097623
Show file tree
Hide file tree
Showing 30 changed files with 320 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,8 @@
- create new central policies to be used for permissionsets so they can be consistent across orgs
- created policies
- policies/sc-servicecatalog-t1

* 1.4.1 -- 2026-01-16
- created policies
- policies/sc-servicecatalog-t2
- policies/sc-servicecatalog-t3
2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "1.4.0"
_module_version = "1.4.1"
}
44 changes: 44 additions & 0 deletions policies/sc-servicecatalog-t2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.12 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [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.inline](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_account_alias"></a> [account\_alias](#input\_account\_alias) | AWS Account Alias | `string` | `""` | no |
| <a name="input_account_id"></a> [account\_id](#input\_account\_id) | AWS Account ID (default will pull from current user) | `string` | `""` | no |
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component. This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | AWS Tags to apply to appropriate resources | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_customer_managed_policy_names"></a> [customer\_managed\_policy\_names](#output\_customer\_managed\_policy\_names) | Map of policy name to permission boundary of Customer Managed Policy to attach to the permissionset |
| <a name="output_inline_policy"></a> [inline\_policy](#output\_inline\_policy) | AWS Policy document for the single allowed inline policy (use .json to get policy) |
| <a name="output_managed_policy_names"></a> [managed\_policy\_names](#output\_managed\_policy\_names) | Names of AWS Managed Policy to attach to the permissionset |
| <a name="output_name"></a> [name](#output\_name) | Permission Set Name for which all settings apply |
| <a name="output_relay_state"></a> [relay\_state](#output\_relay\_state) | Relay State to pass along to permissionset |
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t2/data.tf
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t2/defaults.tf
12 changes: 12 additions & 0 deletions policies/sc-servicecatalog-t2/locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
locals {
account_id = var.account_id != "" ? var.account_id : data.aws_caller_identity.current.account_id
account_environment = data.aws_arn.current.partition == "aws-us-gov" ? "gov" : "ew"
region = data.aws_region.current.region
region_short = join("", [for c in split("-", local.region) : substr(c, 0, 1)])

base_tags = {
"boc:tf_module_version" = local._module_version
"boc:tf_module_name" = local._module_name
"boc:created_by" = "terraform"
}
}
2 changes: 2 additions & 0 deletions policies/sc-servicecatalog-t2/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*
*/
3 changes: 3 additions & 0 deletions policies/sc-servicecatalog-t2/module_name.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
locals {
_module_name = "aws-sso/policies/sc-servicecatalog-t2"
}
24 changes: 24 additions & 0 deletions policies/sc-servicecatalog-t2/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
output "name" {
description = "Permission Set Name for which all settings apply"
value = local.name
}

output "managed_policy_names" {
description = "Names of AWS Managed Policy to attach to the permissionset"
value = local.managed_policy_names
}

output "customer_managed_policy_names" {
description = "Map of policy name to permission boundary of Customer Managed Policy to attach to the permissionset"
value = local.customer_managed_policy_names
}

output "inline_policy" {
description = "AWS Policy document for the single allowed inline policy (use .json to get policy)"
value = local.inline_policy
}

output "relay_state" {
description = "Relay State to pass along to permissionset"
value = local.relay_state
}
13 changes: 13 additions & 0 deletions policies/sc-servicecatalog-t2/policy.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
data "aws_iam_policy_document" "inline" {
statement {
sid = "OnlyReadOperationsOnOrganizations"
effect = "Allow"
actions = [
"organizations:Describe*",
"organizations:List*",
"account:Get*",
"account:List*"
]
resources = ["*"]
}
}
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t2/prefixes.tf
11 changes: 11 additions & 0 deletions policies/sc-servicecatalog-t2/settings.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
locals {
name = "servicecatalog-t2"
managed_policy_names = [
"ReadOnlyAccess",
"AWSServiceCatalogEndUserFullAccess",
"AWSServiceCatalogAdminFullAccess",
]
customer_managed_policy_names = {}
relay_state = data.aws_arn.current.partition == "aws-us-gov" ? "https://console.amazonaws-us-gov.com/servicecatalog/home" : "https://console.aws.amazon.com/servicecatalog/home"
inline_policy = data.aws_iam_policy_document.inline
}
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t2/variables.common.tf
29 changes: 29 additions & 0 deletions policies/sc-servicecatalog-t2/variables.tf.unused
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
variable "name" {
description = "Permission Set Name for which all settings apply"
type = string
default = null
}

variable "managed_policy_names" {
description = "Names of AWS Managed Policy to attach to the permissionset"
type = list(string)
default = []
}

variable "customer_managed_policy_names" {
description = "Map of policy name to permission boundary of Customer Managed Policy to attach to the permissionset"
type = map(string)
default = {}
}

# variable "inline_policy" {
# description = "AWS Policy document for the single allowed inline policy"
# type = string
# default = null
# }

variable "relay_state" {
description = "Relay State to pass along to permissionset"
type = string
default = null
}
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t2/version.tf
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t2/versions.tf
44 changes: 44 additions & 0 deletions policies/sc-servicecatalog-t3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.12 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [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.inline](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_account_alias"></a> [account\_alias](#input\_account\_alias) | AWS Account Alias | `string` | `""` | no |
| <a name="input_account_id"></a> [account\_id](#input\_account\_id) | AWS Account ID (default will pull from current user) | `string` | `""` | no |
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component. This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | AWS Tags to apply to appropriate resources | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_customer_managed_policy_names"></a> [customer\_managed\_policy\_names](#output\_customer\_managed\_policy\_names) | Map of policy name to permission boundary of Customer Managed Policy to attach to the permissionset |
| <a name="output_inline_policy"></a> [inline\_policy](#output\_inline\_policy) | AWS Policy document for the single allowed inline policy (use .json to get policy) |
| <a name="output_managed_policy_names"></a> [managed\_policy\_names](#output\_managed\_policy\_names) | Names of AWS Managed Policy to attach to the permissionset |
| <a name="output_name"></a> [name](#output\_name) | Permission Set Name for which all settings apply |
| <a name="output_relay_state"></a> [relay\_state](#output\_relay\_state) | Relay State to pass along to permissionset |
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t3/data.tf
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t3/defaults.tf
12 changes: 12 additions & 0 deletions policies/sc-servicecatalog-t3/locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
locals {
account_id = var.account_id != "" ? var.account_id : data.aws_caller_identity.current.account_id
account_environment = data.aws_arn.current.partition == "aws-us-gov" ? "gov" : "ew"
region = data.aws_region.current.region
region_short = join("", [for c in split("-", local.region) : substr(c, 0, 1)])

base_tags = {
"boc:tf_module_version" = local._module_version
"boc:tf_module_name" = local._module_name
"boc:created_by" = "terraform"
}
}
2 changes: 2 additions & 0 deletions policies/sc-servicecatalog-t3/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*
*/
3 changes: 3 additions & 0 deletions policies/sc-servicecatalog-t3/module_name.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
locals {
_module_name = "aws-sso/policies/sc-servicecatalog-t3"
}
24 changes: 24 additions & 0 deletions policies/sc-servicecatalog-t3/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
output "name" {
description = "Permission Set Name for which all settings apply"
value = local.name
}

output "managed_policy_names" {
description = "Names of AWS Managed Policy to attach to the permissionset"
value = local.managed_policy_names
}

output "customer_managed_policy_names" {
description = "Map of policy name to permission boundary of Customer Managed Policy to attach to the permissionset"
value = local.customer_managed_policy_names
}

output "inline_policy" {
description = "AWS Policy document for the single allowed inline policy (use .json to get policy)"
value = local.inline_policy
}

output "relay_state" {
description = "Relay State to pass along to permissionset"
value = local.relay_state
}
39 changes: 39 additions & 0 deletions policies/sc-servicecatalog-t3/policy.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
data "aws_iam_policy_document" "inline" {
statement {
sid = "OnlyReadOperationsOnOrganizations"
effect = "Allow"
actions = [
"organizations:Describe*",
"organizations:List*",
"account:Get*",
"account:List*"
]
resources = ["*"]
}
statement {
sid = "EC2AndServiceCatalogAdminActions"
effect = "Allow"
actions = [
"cloudwatch:DescribeAlarms",
"ec2:AttachVolume",
"ec2:CreateTags",
"ec2:CreateVolume",
"ec2:DeleteTags",
"ec2:DescribeTags",
"ec2:DescribeVolumeAttribute",
"ec2:DescribeVolumeStatus",
"ec2:DescribeVolumes",
"ec2:DescribeVolumesModifications",
"ec2:ModifyInstanceAttribute",
"ec2:ModifyVolume",
"ec2:ModifyVolumeAttribute",
"ec2:RebootInstances",
"ec2:RegisterImage",
"ec2:RunInstances",
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:TerminateInstances",
]
resources = ["*"]
}
}
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t3/prefixes.tf
11 changes: 11 additions & 0 deletions policies/sc-servicecatalog-t3/settings.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
locals {
name = "servicecatalog-t3"
managed_policy_names = [
"ReadOnlyAccess",
"AWSServiceCatalogEndUserFullAccess",
"AWSServiceCatalogAdminFullAccess",
]
customer_managed_policy_names = {}
relay_state = data.aws_arn.current.partition == "aws-us-gov" ? "https://console.amazonaws-us-gov.com/servicecatalog/home" : "https://console.aws.amazon.com/servicecatalog/home"
inline_policy = data.aws_iam_policy_document.inline
}
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t3/variables.common.tf
29 changes: 29 additions & 0 deletions policies/sc-servicecatalog-t3/variables.tf.unused
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
variable "name" {
description = "Permission Set Name for which all settings apply"
type = string
default = null
}

variable "managed_policy_names" {
description = "Names of AWS Managed Policy to attach to the permissionset"
type = list(string)
default = []
}

variable "customer_managed_policy_names" {
description = "Map of policy name to permission boundary of Customer Managed Policy to attach to the permissionset"
type = map(string)
default = {}
}

# variable "inline_policy" {
# description = "AWS Policy document for the single allowed inline policy"
# type = string
# default = null
# }

variable "relay_state" {
description = "Relay State to pass along to permissionset"
type = string
default = null
}
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t3/version.tf
1 change: 1 addition & 0 deletions policies/sc-servicecatalog-t3/versions.tf

0 comments on commit a097623

Please sign in to comment.