Skip to content

Commit b0b4c95

Browse files
authored
Merge pull request #23 from zama-ai/ghislain/chore/rework-tf-modules
chore: update docs and fmt all tf files
2 parents e42c59d + 9a7fd30 commit b0b4c95

File tree

15 files changed

+49
-49
lines changed

15 files changed

+49
-49
lines changed

examples/mpc-network-consumer/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ module "vpc_endpoint_consumer" {
2323
route_table_ids = []
2424

2525
# Naming and tagging
26-
name_prefix = var.name_prefix
27-
tags = var.common_tags
26+
name_prefix = var.name_prefix
27+
tags = var.common_tags
2828

2929
# Timeouts
3030
endpoint_create_timeout = var.endpoint_create_timeout

examples/mpc-network-consumer/providers.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ terraform {
2020

2121
# Configure providers
2222
provider "aws" {
23-
region = var.aws_region
23+
region = var.aws_region
2424
profile = var.aws_profile
2525
}
2626

2727
data "aws_eks_cluster" "this_provider" {
28-
count = var.use_eks_cluster_authentication ? 1 : 0
28+
count = var.use_eks_cluster_authentication ? 1 : 0
2929
region = var.aws_region
30-
name = var.cluster_name
30+
name = var.cluster_name
3131
}
3232

3333
provider "kubernetes" {
34-
config_path = var.use_eks_cluster_authentication ? null : var.kubeconfig_path
35-
config_context = var.use_eks_cluster_authentication ? null : var.kubeconfig_context
36-
host = var.use_eks_cluster_authentication ? data.aws_eks_cluster.this_provider[0].endpoint : null
34+
config_path = var.use_eks_cluster_authentication ? null : var.kubeconfig_path
35+
config_context = var.use_eks_cluster_authentication ? null : var.kubeconfig_context
36+
host = var.use_eks_cluster_authentication ? data.aws_eks_cluster.this_provider[0].endpoint : null
3737
cluster_ca_certificate = var.use_eks_cluster_authentication ? base64decode(data.aws_eks_cluster.this_provider[0].certificate_authority[0].data) : null
3838

3939
exec {

examples/mpc-network-provider/providers.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ terraform {
2020

2121
# Configure providers
2222
provider "aws" {
23-
region = var.aws_region
23+
region = var.aws_region
2424
profile = var.aws_profile
2525
}
2626

2727
data "aws_eks_cluster" "this_provider" {
28-
count = var.use_eks_cluster_authentication ? 1 : 0
28+
count = var.use_eks_cluster_authentication ? 1 : 0
2929
region = var.aws_region
30-
name = var.cluster_name
30+
name = var.cluster_name
3131
}
3232

3333
provider "kubernetes" {
34-
config_path = var.use_eks_cluster_authentication ? null : var.kubeconfig_path
35-
config_context = var.use_eks_cluster_authentication ? null : var.kubeconfig_context
36-
host = var.use_eks_cluster_authentication ? data.aws_eks_cluster.this_provider[0].endpoint : null
34+
config_path = var.use_eks_cluster_authentication ? null : var.kubeconfig_path
35+
config_context = var.use_eks_cluster_authentication ? null : var.kubeconfig_context
36+
host = var.use_eks_cluster_authentication ? data.aws_eks_cluster.this_provider[0].endpoint : null
3737
cluster_ca_certificate = var.use_eks_cluster_authentication ? base64decode(data.aws_eks_cluster.this_provider[0].certificate_authority[0].data) : null
3838

3939
exec {

examples/mpc-party/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ module "mpc_party" {
1111
enable_region_validation = var.enable_region_validation
1212

1313
# Party configuration
14-
party_name = var.party_name
15-
bucket_prefix = var.bucket_prefix
14+
party_name = var.party_name
15+
bucket_prefix = var.bucket_prefix
1616

1717
# EKS Cluster configuration
1818
cluster_name = var.cluster_name

examples/mpc-party/providers.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ terraform {
1919

2020
# Configure providers
2121
provider "aws" {
22-
region = var.aws_region
22+
region = var.aws_region
2323
profile = var.aws_profile
2424
}
2525

2626
data "aws_eks_cluster" "this_provider" {
27-
count = var.use_eks_cluster_authentication ? 1 : 0
27+
count = var.use_eks_cluster_authentication ? 1 : 0
2828
region = var.aws_region
29-
name = var.cluster_name
29+
name = var.cluster_name
3030
}
3131

3232
provider "kubernetes" {
33-
config_path = var.use_eks_cluster_authentication ? null : var.kubeconfig_path
34-
config_context = var.use_eks_cluster_authentication ? null : var.kubeconfig_context
35-
host = var.use_eks_cluster_authentication ? data.aws_eks_cluster.this_provider[0].endpoint : null
33+
config_path = var.use_eks_cluster_authentication ? null : var.kubeconfig_path
34+
config_context = var.use_eks_cluster_authentication ? null : var.kubeconfig_context
35+
host = var.use_eks_cluster_authentication ? data.aws_eks_cluster.this_provider[0].endpoint : null
3636
cluster_ca_certificate = var.use_eks_cluster_authentication ? base64decode(data.aws_eks_cluster.this_provider[0].certificate_authority[0].data) : null
3737

3838
exec {

examples/terragrunt-infra/kms-dev-v1/mpc-network-provider/terraform.tfvars

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ network_environment = "testnet"
44
# AWS Configuration
55
enable_region_validation = false
66

7-
namespace = "kms-decentralized"
7+
namespace = "kms-decentralized"
88
create_namespace = false
99

1010
# Party Configuration
@@ -13,8 +13,8 @@ party_id = "4"
1313
# VPC Endpoint Services Configuration
1414
# Indicate all aws accounts and regions from which the partner services will be consumed
1515
# By default, the terraform module will add the current region to the supported regions list
16-
allowed_principals = ["arn:aws:iam::715841358639:root"]
17-
supported_regions = ["eu-west-1"]
16+
allowed_principals = ["arn:aws:iam::715841358639:root"]
17+
supported_regions = ["eu-west-1"]
1818
acceptance_required = false
1919

2020
# Tagging

examples/terragrunt-infra/kms-dev-v1/mpc-party/terraform.tfvars

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ network_environment = "testnet"
44
enable_region_validation = false
55

66
# MPC Party Configuration
7-
party_name = "mpc-party-4"
7+
party_name = "mpc-party-4"
88

99
# S3 Bucket Configuration
1010
bucket_prefix = "zama-kms-decentralized-threshold-4"
1111
config_map_name = "mpc-party-4"
1212

1313
# Kubernetes Configuration
14-
cluster_name = "zws-dev"
14+
cluster_name = "zws-dev"
1515
k8s_namespace = "kms-decentralized"
1616
k8s_service_account_name = "mpc-party-4"
17-
create_namespace = false
17+
create_namespace = false
1818

1919
# IRSA Configuration (recommended for production)
2020
create_irsa = true

examples/terragrunt-infra/zws-dev/mpc-network-consumer/terraform.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ network_environment = "testnet"
88
cluster_name = "zws-dev"
99

1010
# Partner Services Namespace
11-
namespace = "kms-decentralized"
11+
namespace = "kms-decentralized"
1212
create_namespace = false
1313

1414

examples/terragrunt-infra/zws-dev/mpc-party/terraform.tfvars

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ network_environment = "testnet"
44
enable_region_validation = false
55

66
# MPC Party Configuration
7-
party_name = "mpc-party-2"
7+
party_name = "mpc-party-2"
88

99
# S3 Bucket Configuration
1010
bucket_prefix = "zama-kms-decentralized-threshold-2"
1111
config_map_name = "mpc-party-2"
1212

1313
# Kubernetes Configuration
14-
cluster_name = "zws-dev"
14+
cluster_name = "zws-dev"
1515
k8s_namespace = "kms-decentralized"
1616
k8s_service_account_name = "mpc-party-2"
17-
create_namespace = false
17+
create_namespace = false
1818

1919
# IRSA Configuration (recommended for production)
2020
create_irsa = true

modules/mpc-party/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,16 +288,17 @@ The module can optionally create:
288288
| Name | Version |
289289
|------|---------|
290290
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
291-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0 |
291+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
292292
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 2.23 |
293293
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.1 |
294294

295295
## Providers
296296

297297
| Name | Version |
298298
|------|---------|
299-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0 |
299+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
300300
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | >= 2.23 |
301+
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.1 |
301302

302303
## Modules
303304

@@ -330,6 +331,7 @@ The module can optionally create:
330331
| [kubernetes_namespace.mpc_party_namespace](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource |
331332
| [kubernetes_service.externalname](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service) | resource |
332333
| [kubernetes_service_account.mpc_party_service_account](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service_account) | resource |
334+
| [random_id.mpc_party_suffix](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource |
333335
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
334336
| [aws_ec2_instance_type.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ec2_instance_type) | data source |
335337
| [aws_eks_cluster.cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster) | data source |
@@ -342,8 +344,9 @@ The module can optionally create:
342344
| Name | Description | Type | Default | Required |
343345
|------|-------------|------|---------|:--------:|
344346
| <a name="input_additional_config_data"></a> [additional\_config\_data](#input\_additional\_config\_data) | Additional key-value pairs to add to the ConfigMap | `map(string)` | `{}` | no |
347+
| <a name="input_bucket_prefix"></a> [bucket\_prefix](#input\_bucket\_prefix) | The prefix for the S3 bucket names | `string` | `"mpc-vault"` | no |
345348
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | The name of the EKS cluster for IRSA configuration | `string` | n/a | yes |
346-
| <a name="input_common_tags"></a> [common\_tags](#input\_common\_tags) | Common tags to apply to all AWS resources | `map(string)` | <pre>{<br/> "module": "mpc-party",<br/> "terraform": "true"<br/>}</pre> | no |
349+
| <a name="input_common_tags"></a> [common\_tags](#input\_common\_tags) | Deprecated common tags to apply to all AWS resources | `map(string)` | <pre>{<br/> "module": "mpc-party",<br/> "terraform": "true"<br/>}</pre> | no |
347350
| <a name="input_config_map_name"></a> [config\_map\_name](#input\_config\_map\_name) | Name of the ConfigMap (defaults to 'mpc-party-config-{party\_name}' if not provided) | `string` | `null` | no |
348351
| <a name="input_create_config_map"></a> [create\_config\_map](#input\_create\_config\_map) | Whether to create a ConfigMap with S3 bucket environment variables | `bool` | `true` | no |
349352
| <a name="input_create_irsa"></a> [create\_irsa](#input\_create\_irsa) | Whether to create IRSA (IAM Roles for Service Accounts) role for secure AWS access | `bool` | `true` | no |
@@ -428,10 +431,8 @@ The module can optionally create:
428431
| <a name="input_rds_vpc_id"></a> [rds\_vpc\_id](#input\_rds\_vpc\_id) | VPC ID hosting the RDS instance. | `string` | `null` | no |
429432
| <a name="input_service_account_annotations"></a> [service\_account\_annotations](#input\_service\_account\_annotations) | Additional annotations to apply to the service account (excluding IRSA annotations which are handled automatically) | `map(string)` | `{}` | no |
430433
| <a name="input_service_account_labels"></a> [service\_account\_labels](#input\_service\_account\_labels) | Additional labels to apply to the service account | `map(string)` | `{}` | no |
431-
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to assign to the resource | `map(string)` | `{}` | no |
434+
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to assign to the resource | `map(string)` | <pre>{<br/> "module": "mpc-party",<br/> "terraform": "true"<br/>}</pre> | no |
432435
| <a name="input_testnet_supported_regions"></a> [testnet\_supported\_regions](#input\_testnet\_supported\_regions) | AWS regions supported by the MPC party for testnet | `list(string)` | <pre>[<br/> "eu-west-1"<br/>]</pre> | no |
433-
| <a name="input_vault_private_bucket_name"></a> [vault\_private\_bucket\_name](#input\_vault\_private\_bucket\_name) | The name of the S3 bucket for private MPC party storage | `string` | n/a | yes |
434-
| <a name="input_vault_public_bucket_name"></a> [vault\_public\_bucket\_name](#input\_vault\_public\_bucket\_name) | The name of the S3 bucket for public MPC party storage | `string` | n/a | yes |
435436

436437
## Outputs
437438

0 commit comments

Comments
 (0)