-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from aidanmelen/hybrid-aws-msk-secure
added hybrid-aws-msk examples for tls and iam
- Loading branch information
Showing
51 changed files
with
7,199 additions
and
8,883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.2.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# hybrid_aws_msk | ||
|
||
This example is divided into to four parts | ||
|
||
## aws_msk | ||
|
||
First, create a new VPC and deploy an MSK and EKS cluster into it. Then try one of the confluent platform deployment. | ||
|
||
## confluent_platform | ||
|
||
Deploy the Confluent Platform components connected with an AWS MSK cluster over PLAINTEXT. The Confluent Components are also configured with PLAINTEXT. | ||
|
||
## confluent_platform_tls_only | ||
|
||
Deploy the Confluent Platform components connected with an AWS MSK cluster over TLS. The Confluent Components are also configured with TSL. | ||
|
||
## confluent_platform_iam_secure | ||
|
||
Deploy the Confluent Platform components connected with an AWS MSK cluster over TLS. Authenticate and Authorize with IAM. Please see [aws-msk-iam-auth](https://github.com/aws/aws-msk-iam-auth) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module "confluent_operator" { | ||
source = "../../../modules/confluent_operator" | ||
create_namespace = true | ||
namespace = var.namespace | ||
name = "confluent-operator" | ||
chart_version = "0.517.12" | ||
} |
12 changes: 12 additions & 0 deletions
12
examples/hybrid_aws_msk/aws/crds.tf → ...s/hybrid_aws_msk/aws/crds_only.tf.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
data "aws_caller_identity" "current" {} | ||
|
||
data "aws_eks_cluster_auth" "eks" { | ||
name = var.name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# https://docs.aws.amazon.com/msk/latest/developerguide/security-iam-awsmanpol.html | ||
# https://docs.aws.amazon.com/msk/latest/developerguide/security_iam_id-based-policy-examples.html | ||
resource "aws_iam_policy" "aws_msk_cluster_full_access" { | ||
name = "msk-cluster-full-access" | ||
path = "/" | ||
description = "MSK Cluster full access." | ||
|
||
policy = <<-EOF | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"kafka-cluster:Connect", | ||
"kafka-cluster:AlterCluster", | ||
"kafka-cluster:DescribeCluster" | ||
], | ||
"Resource": [ | ||
"${module.msk_cluster.arn}" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"kafka-cluster:*Topic*", | ||
"kafka-cluster:WriteData", | ||
"kafka-cluster:ReadData" | ||
], | ||
"Resource": [ | ||
"arn:aws:kafka:${var.aws_region}:${data.aws_caller_identity.current.account_id}:topic/${var.name}/*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"kafka-cluster:AlterGroup", | ||
"kafka-cluster:DescribeGroup" | ||
], | ||
"Resource": [ | ||
"arn:aws:kafka:${var.aws_region}:${data.aws_caller_identity.current.account_id}:group/${var.name}/*" | ||
] | ||
} | ||
] | ||
} | ||
EOF | ||
} | ||
|
||
module "iam_eks_confluent_platform_role" { | ||
source = "terraform-aws-modules/iam/aws//modules/iam-eks-role" | ||
version = "5.3.0" | ||
|
||
role_name = "confluent-platform" | ||
|
||
cluster_service_accounts = { | ||
confluent_platform = ["${module.confluent_operator.namespace}:confluent-platform"] | ||
} | ||
|
||
role_policy_arns = { | ||
aws_msk_cluster_full_access = aws_iam_policy.aws_msk_cluster_full_access.arn | ||
} | ||
} |
Oops, something went wrong.