Skip to content

Commit

Permalink
Merge pull request #4 from truefoundry/update-cloud-integration-refer…
Browse files Browse the repository at this point in the history
…ence

update cloud integration reference
  • Loading branch information
DeeAjayi authored Jul 3, 2024
2 parents 3eece4f + 8aedf50 commit 254618e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -54,7 +54,7 @@ Truefoundry AWS platform features
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of the EKS cluster | `string` | n/a | yes |
| <a name="input_control_plane_roles"></a> [control\_plane\_roles](#input\_control\_plane\_roles) | Control plane roles that can assume your platform role | `list(string)` | <pre>[<br> "arn:aws:iam::416964291864:role/tfy-ctl-euwe1-production-truefoundry-deps"<br>]</pre> | no |
| <a name="input_feature_blob_storage_enabled"></a> [feature\_blob\_storage\_enabled](#input\_feature\_blob\_storage\_enabled) | Enable blob storage feature in the platform | `bool` | `true` | no |
| <a name="input_feature_cloud_integration_enabled"></a> [feature\_cloud\_integration\_enabled](#input\_feature\_cloud\_integration\_enabled) | Enable cloud integration feature in the platform | `bool` | `true` | no |
| <a name="input_feature_cluster_integration_enabled"></a> [feature\_cluster\_integration\_enabled](#input\_feature\_cluster\_integration\_enabled) | Enable cluster integration feature in the platform | `bool` | `true` | no |
| <a name="input_feature_docker_registry_enabled"></a> [feature\_docker\_registry\_enabled](#input\_feature\_docker\_registry\_enabled) | Enable docker registry feature in the platform | `bool` | `true` | no |
| <a name="input_feature_secrets_enabled"></a> [feature\_secrets\_enabled](#input\_feature\_secrets\_enabled) | Enable secrets manager feature in the platform | `bool` | `true` | no |
| <a name="input_platform_feature_enabled"></a> [platform\_feature\_enabled](#input\_platform\_feature\_enabled) | Enable platform features like docker registry, secrets manager and blob storage | `bool` | `true` | no |
Expand Down
22 changes: 11 additions & 11 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}
policy_arn = aws_iam_policy.truefoundry_platform_feature_cluster_integration_policy[0].arn
}
8 changes: 4 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ variable "feature_docker_registry_enabled" {
}

################################################################################
# Cloud Integration
# Cluster Integration
################################################################################
variable "feature_cloud_integration_enabled" {
description = "Enable cloud integration feature in the platform"
variable "feature_cluster_integration_enabled" {
description = "Enable cluster integration feature in the platform"
type = bool
default = true
}
Expand All @@ -132,4 +132,4 @@ variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
}

0 comments on commit 254618e

Please sign in to comment.