From 2cfcb5797ee9f389f2fa9a0279df7d8b89980c97 Mon Sep 17 00:00:00 2001 From: Dipo Ajayi Date: Thu, 13 Jun 2024 12:06:53 +0100 Subject: [PATCH 1/4] update cloud integration reference --- iam.tf | 22 +++++++++++----------- variables.tf | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/iam.tf b/iam.tf index 61c481a..eb593fc 100644 --- a/iam.tf +++ b/iam.tf @@ -74,8 +74,8 @@ data "aws_iam_policy_document" "truefoundry_platform_feature_user_ecr_policy_doc } } -data "aws_iam_policy_document" "truefoundry_platform_feature_cloud_integration_policy_document" { - count = var.platform_feature_enabled ? var.feature_cloud_integration_enabled ? 1 : 0 : 0 +data "aws_iam_policy_document" "truefoundry_platform_feature_cluster_integration_policy_document" { + count = var.platform_feature_enabled ? var.feature_cluster_integration_enabled ? 1 : 0 : 0 statement { effect = "Allow" actions = [ @@ -146,11 +146,11 @@ resource "aws_iam_policy" "truefoundry_platform_feature_user_ecr_policy" { } -resource "aws_iam_policy" "truefoundry_platform_feature_cloud_integration_policy" { - count = var.platform_feature_enabled ? var.feature_cloud_integration_enabled ? 1 : 0 : 0 - name_prefix = "${local.truefoundry_unique_name}-cloud-integration-access" - description = "IAM policy for TrueFoundry user for platform features cloud integration" - policy = data.aws_iam_policy_document.truefoundry_platform_feature_cloud_integration_policy_document[0].json +resource "aws_iam_policy" "truefoundry_platform_feature_cluster_integration_policy" { + count = var.platform_feature_enabled ? var.feature_cluster_integration_enabled ? 1 : 0 : 0 + name_prefix = "${local.truefoundry_unique_name}-cluster-integration-access" + description = "IAM policy for TrueFoundry user for platform features cluster integration" + policy = data.aws_iam_policy_document.truefoundry_platform_feature_cluster_integration_policy_document[0].json tags = local.tags } @@ -197,8 +197,8 @@ resource "aws_iam_role_policy_attachment" "truefoundry_platform_user_ecr_policy_ policy_arn = aws_iam_policy.truefoundry_platform_feature_user_ecr_policy[0].arn } -resource "aws_iam_role_policy_attachment" "truefoundry_platform_user_cloud_integration_policy_attachment" { - count = var.platform_feature_enabled ? var.feature_cloud_integration_enabled ? 1 : 0 : 0 +resource "aws_iam_role_policy_attachment" "truefoundry_platform_user_cluster_integration_policy_attachment" { + count = var.platform_feature_enabled ? var.feature_cluster_integration_enabled ? 1 : 0 : 0 role = aws_iam_role.truefoundry_platform_feature_iam_role[0].name - policy_arn = aws_iam_policy.truefoundry_platform_feature_cloud_integration_policy[0].arn -} \ No newline at end of file + policy_arn = aws_iam_policy.truefoundry_platform_feature_cluster_integration_policy[0].arn +} diff --git a/variables.tf b/variables.tf index 9181483..b1a09bd 100644 --- a/variables.tf +++ b/variables.tf @@ -116,9 +116,9 @@ variable "feature_docker_registry_enabled" { } ################################################################################ -# Cloud Integration +# Cluster Integration ################################################################################ -variable "feature_cloud_integration_enabled" { +variable "feature_cluster_integration_enabled" { description = "Enable cloud integration feature in the platform" type = bool default = true @@ -132,4 +132,4 @@ variable "tags" { description = "A map of tags to add to all resources" type = map(string) default = {} -} \ No newline at end of file +} From 224b956d316741d7c7f0c21f78181ca70253a4d6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 13 Jun 2024 12:11:47 +0000 Subject: [PATCH 2/4] terraform-docs: automated action --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6752a64..3bd904c 100644 --- a/README.md +++ b/README.md @@ -25,16 +25,16 @@ Truefoundry AWS platform features | Name | Type | |------|------| -| [aws_iam_policy.truefoundry_platform_feature_cloud_integration_policy](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_policy) | resource | +| [aws_iam_policy.truefoundry_platform_feature_cluster_integration_policy](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_policy) | resource | | [aws_iam_policy.truefoundry_platform_feature_user_ecr_policy](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_policy) | resource | | [aws_iam_policy.truefoundry_platform_feature_user_s3_policy](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_policy) | resource | | [aws_iam_policy.truefoundry_platform_feature_user_ssm_policy](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_policy) | resource | | [aws_iam_role.truefoundry_platform_feature_iam_role](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_role) | resource | -| [aws_iam_role_policy_attachment.truefoundry_platform_user_cloud_integration_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_role_policy_attachment) | resource | +| [aws_iam_role_policy_attachment.truefoundry_platform_user_cluster_integration_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.truefoundry_platform_user_ecr_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.truefoundry_platform_user_s3_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.truefoundry_platform_user_ssm_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/resources/iam_role_policy_attachment) | resource | -| [aws_iam_policy_document.truefoundry_platform_feature_cloud_integration_policy_document](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/data-sources/iam_policy_document) | data source | +| [aws_iam_policy_document.truefoundry_platform_feature_cluster_integration_policy_document](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/data-sources/iam_policy_document) | data source | | [aws_iam_policy_document.truefoundry_platform_feature_user_ecr_policy_document](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/data-sources/iam_policy_document) | data source | | [aws_iam_policy_document.truefoundry_platform_feature_user_s3_policy_document](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/data-sources/iam_policy_document) | data source | | [aws_iam_policy_document.truefoundry_platform_feature_user_ssm_policy_document](https://registry.terraform.io/providers/hashicorp/aws/5.14.0/docs/data-sources/iam_policy_document) | data source | @@ -54,7 +54,7 @@ Truefoundry AWS platform features | [cluster\_name](#input\_cluster\_name) | Name of the EKS cluster | `string` | n/a | yes | | [control\_plane\_roles](#input\_control\_plane\_roles) | Control plane roles that can assume your platform role | `list(string)` |
[
"arn:aws:iam::416964291864:role/tfy-ctl-euwe1-production-truefoundry-deps"
]
| no | | [feature\_blob\_storage\_enabled](#input\_feature\_blob\_storage\_enabled) | Enable blob storage feature in the platform | `bool` | `true` | no | -| [feature\_cloud\_integration\_enabled](#input\_feature\_cloud\_integration\_enabled) | Enable cloud integration feature in the platform | `bool` | `true` | no | +| [feature\_cluster\_integration\_enabled](#input\_feature\_cluster\_integration\_enabled) | Enable cloud integration feature in the platform | `bool` | `true` | no | | [feature\_docker\_registry\_enabled](#input\_feature\_docker\_registry\_enabled) | Enable docker registry feature in the platform | `bool` | `true` | no | | [feature\_secrets\_enabled](#input\_feature\_secrets\_enabled) | Enable secrets manager feature in the platform | `bool` | `true` | no | | [platform\_feature\_enabled](#input\_platform\_feature\_enabled) | Enable platform features like docker registry, secrets manager and blob storage | `bool` | `true` | no | From 847758bce9edd4d1b97a626a2c356fdab4968eaf Mon Sep 17 00:00:00 2001 From: Ajayi Dipo Date: Wed, 3 Jul 2024 10:20:09 +0100 Subject: [PATCH 3/4] Update variables.tf Co-authored-by: Vedant Pareek <36420365+dunefro@users.noreply.github.com> --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index b1a09bd..6848b53 100644 --- a/variables.tf +++ b/variables.tf @@ -119,7 +119,7 @@ variable "feature_docker_registry_enabled" { # Cluster Integration ################################################################################ variable "feature_cluster_integration_enabled" { - description = "Enable cloud integration feature in the platform" + description = "Enable cluster integration feature in the platform" type = bool default = true } From 8aedf50552be29632d66c34482807443f6db6f77 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 09:20:25 +0000 Subject: [PATCH 4/4] terraform-docs: automated action --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3bd904c..a6a0301 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Truefoundry AWS platform features | [cluster\_name](#input\_cluster\_name) | Name of the EKS cluster | `string` | n/a | yes | | [control\_plane\_roles](#input\_control\_plane\_roles) | Control plane roles that can assume your platform role | `list(string)` |
[
"arn:aws:iam::416964291864:role/tfy-ctl-euwe1-production-truefoundry-deps"
]
| no | | [feature\_blob\_storage\_enabled](#input\_feature\_blob\_storage\_enabled) | Enable blob storage feature in the platform | `bool` | `true` | no | -| [feature\_cluster\_integration\_enabled](#input\_feature\_cluster\_integration\_enabled) | Enable cloud integration feature in the platform | `bool` | `true` | no | +| [feature\_cluster\_integration\_enabled](#input\_feature\_cluster\_integration\_enabled) | Enable cluster integration feature in the platform | `bool` | `true` | no | | [feature\_docker\_registry\_enabled](#input\_feature\_docker\_registry\_enabled) | Enable docker registry feature in the platform | `bool` | `true` | no | | [feature\_secrets\_enabled](#input\_feature\_secrets\_enabled) | Enable secrets manager feature in the platform | `bool` | `true` | no | | [platform\_feature\_enabled](#input\_platform\_feature\_enabled) | Enable platform features like docker registry, secrets manager and blob storage | `bool` | `true` | no |