Skip to content

Commit

Permalink
Update TF EC2 module to v5 (#572)
Browse files Browse the repository at this point in the history
* Update TF EC2 module to v5

* Update missing references
  • Loading branch information
wcmjunior authored Oct 23, 2024
1 parent 0806f0f commit 20d143c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 92 deletions.
8 changes: 4 additions & 4 deletions docs/guides/iam_auth_rds_pg.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ module "cyral_sidecar" {
source = "cyralinc/sidecar-ec2/aws"
# Use the module version that is compatible with your sidecar.
version = "~> 4.3"
version = "~> 5.0"
sidecar_id = cyral_sidecar.sidecar.id
control_plane = local.control_plane_host
Expand All @@ -265,11 +265,11 @@ module "cyral_sidecar" {
load_balancer_scheme = local.sidecar.public_sidecar ? "internet-facing" : "internal"
associate_public_ip_address = local.sidecar.public_sidecar
sidecar_dns_hosted_zone_id = local.sidecar.dns_hosted_zone_id
sidecar_dns_name = local.sidecar.dns_name
dns_hosted_zone_id = local.sidecar.dns_hosted_zone_id
dns_name = local.sidecar.dns_name
}
output "sidecar_load_balancer_dns" {
value = module.cyral_sidecar.sidecar_load_balancer_dns
value = module.cyral_sidecar.load_balancer_dns
}
```
23 changes: 3 additions & 20 deletions docs/guides/mongodb_cluster_okta_idp.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,6 @@ locals {
# Name of the CloudWatch log group used to push logs
cloudwatch_log_group_name = "cyral-example-loggroup"
# Set the parameters to access the private Cyral container
# registry. These parameters can be found in the sidecar
# Terraform template downloaded from the UI. Use the
# commented values to locate the variables and copy the
# values from the downloaded template.
container_registry = {
name = "" # container_registry
username = "" # container_registry_username
registry_key = "" # container_registry_key
}
# Specify the maximum number of nodes you expect this cluster to
# have, taking into consideration future growth. This number must be
# at least equal to the number of nodes currently in your
Expand Down Expand Up @@ -254,7 +243,7 @@ module "cyral_sidecar" {
source = "cyralinc/sidecar-ec2/aws"
# Use the module version that is compatible with your sidecar.
version = "~> 4.0"
version = "~> 5.0"
sidecar_version = local.sidecar.sidecar_version
Expand All @@ -280,22 +269,16 @@ module "cyral_sidecar" {
load_balancer_scheme = local.sidecar.public_sidecar ? "internet-facing" : "internal"
associate_public_ip_address = local.sidecar.public_sidecar
deploy_secrets = true
secrets_location = "/cyral/sidecars/${cyral_sidecar.sidecar.id}/secrets"
container_registry = local.sidecar.container_registry.name
container_registry_username = local.sidecar.container_registry.username
container_registry_key = local.sidecar.container_registry.registry_key
client_id = cyral_sidecar_credentials.sidecar_credentials.client_id
client_secret = cyral_sidecar_credentials.sidecar_credentials.client_secret
}
output "sidecar_dns" {
value = module.cyral_sidecar.sidecar_dns
value = module.cyral_sidecar.dns
}
output "sidecar_load_balancer_dns" {
value = module.cyral_sidecar.sidecar_load_balancer_dns
value = module.cyral_sidecar.load_balancer_dns
}
```

Expand Down
9 changes: 4 additions & 5 deletions docs/guides/s3_browser_and_aws_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ module "cyral_sidecar" {
source = "cyralinc/sidecar-ec2/aws"
# Use the module version that is compatible with your sidecar.
version = "~> 4.3"
version = "~> 5.0"
sidecar_id = cyral_sidecar.sidecar.id
control_plane = local.control_plane_host
Expand All @@ -271,17 +271,16 @@ module "cyral_sidecar" {
load_balancer_scheme = local.sidecar.public_sidecar ? "internet-facing" : "internal"
associate_public_ip_address = local.sidecar.public_sidecar
load_balancer_certificate_arn = local.sidecar.load_balancer_certificate_arn
load_balancer_tls_ports = [
local.repos.s3.browser_port
]
sidecar_dns_hosted_zone_id = local.sidecar.dns_hosted_zone_id
sidecar_dns_name = local.sidecar.dns_name
dns_hosted_zone_id = local.sidecar.dns_hosted_zone_id
dns_name = local.sidecar.dns_name
}
output "sidecar_load_balancer_dns" {
value = module.cyral_sidecar.sidecar_load_balancer_dns
value = module.cyral_sidecar.load_balancer_dns
}
```
24 changes: 3 additions & 21 deletions docs/guides/setup_cp_and_deploy_sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,6 @@ locals {
# Set the allowed CIDR block for monitoring requests to the
# sidecar
monitoring_inbound_cidr = ["0.0.0.0/0"]
# Set the parameters to access the private Cyral container
# registry. These parameters can be found in the sidecar
# Terraform template downloaded from the UI. Use the
# commented values to locate the variables and copy the
# values from the downloaded template.
container_registry = {
name = "" # container_registry
username = "" # container_registry_username
registry_key = "" # container_registry_key
}
}
}
Expand Down Expand Up @@ -159,7 +148,7 @@ module "cyral_sidecar" {
source = "cyralinc/sidecar-ec2/aws"
# Use the module version that is compatible with your sidecar.
version = "~> 4.0"
version = "~> 5.0"
sidecar_version = local.sidecar.sidecar_version
Expand All @@ -181,23 +170,16 @@ module "cyral_sidecar" {
load_balancer_scheme = local.sidecar.public_sidecar ? "internet-facing" : "internal"
associate_public_ip_address = local.sidecar.public_sidecar
deploy_secrets = true
secrets_location = "/cyral/sidecars/${cyral_sidecar.sidecar.id}/secrets"
container_registry = local.sidecar.container_registry.name
container_registry_username = local.sidecar.container_registry.username
container_registry_key = local.sidecar.container_registry.registry_key
client_id = cyral_sidecar_credentials.sidecar_credentials.client_id
client_secret = cyral_sidecar_credentials.sidecar_credentials.client_secret
}
output "sidecar_dns" {
value = module.cyral_sidecar.sidecar_dns
value = module.cyral_sidecar.dns
}
output "sidecar_load_balancer_dns" {
value = module.cyral_sidecar.sidecar_load_balancer_dns
value = module.cyral_sidecar.load_balancer_dns
}
```

Expand Down
44 changes: 4 additions & 40 deletions docs/guides/smart_ports.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,6 @@ locals {
# Set the allowed CIDR block for monitoring requests to the
# sidecar
monitoring_inbound_cidr = ["0.0.0.0/0"]
# Set the parameters to access the private Cyral container
# registry. These parameters can be found in the sidecar
# Terraform template downloaded from the UI. Use the
# commented values to locate the variables and copy the
# values from the downloaded template.
container_registry = {
name = "" # container_registry
username = "" # container_registry_username
registry_key = "" # container_registry_key
}
}
}
Expand Down Expand Up @@ -316,7 +305,7 @@ module "cyral_sidecar" {
source = "cyralinc/sidecar-ec2/aws"
# Use the module version that is compatible with your sidecar.
version = "~> 4.0"
version = "~> 5.0"
sidecar_version = local.sidecar.sidecar_version
Expand All @@ -336,19 +325,12 @@ module "cyral_sidecar" {
load_balancer_scheme = local.sidecar.public_sidecar ? "internet-facing" : "internal"
associate_public_ip_address = local.sidecar.public_sidecar
deploy_secrets = true
secrets_location = "/cyral/sidecars/${cyral_sidecar.sidecar.id}/secrets"
container_registry = local.sidecar.container_registry.name
container_registry_username = local.sidecar.container_registry.username
container_registry_key = local.sidecar.container_registry.registry_key
client_id = cyral_sidecar_credentials.sidecar_credentials.client_id
client_secret = cyral_sidecar_credentials.sidecar_credentials.client_secret
}
output "sidecar_load_balancer_dns" {
value = module.cyral_sidecar.sidecar_load_balancer_dns
value = module.cyral_sidecar.load_balancer_dns
}
```

Expand Down Expand Up @@ -429,17 +411,6 @@ locals {
# Set the allowed CIDR block for monitoring requests to the
# sidecar
monitoring_inbound_cidr = ["0.0.0.0/0"]
# Set the parameters to access the private Cyral container
# registry. These parameters can be found in the sidecar
# Terraform template downloaded from the UI. Use the
# commented values to locate the variables and copy the
# values from the downloaded template.
container_registry = {
name = "" # container_registry
username = "" # container_registry_username
registry_key = "" # container_registry_key
}
}
}
Expand Down Expand Up @@ -588,7 +559,7 @@ module "cyral_sidecar" {
source = "cyralinc/sidecar-ec2/aws"
# Use the module version that is compatible with your sidecar.
version = "~> 4.0"
version = "~> 5.0"
sidecar_version = local.sidecar.sidecar_version
Expand All @@ -608,18 +579,11 @@ module "cyral_sidecar" {
load_balancer_scheme = local.sidecar.public_sidecar ? "internet-facing" : "internal"
associate_public_ip_address = local.sidecar.public_sidecar
deploy_secrets = true
secrets_location = "/cyral/sidecars/${cyral_sidecar.sidecar.id}/secrets"
container_registry = local.sidecar.container_registry.name
container_registry_username = local.sidecar.container_registry.username
container_registry_key = local.sidecar.container_registry.registry_key
client_id = cyral_sidecar_credentials.sidecar_credentials.client_id
client_secret = cyral_sidecar_credentials.sidecar_credentials.client_secret
}
output "sidecar_load_balancer_dns" {
value = module.cyral_sidecar.sidecar_load_balancer_dns
value = module.cyral_sidecar.load_balancer_dns
}
```
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ terraform {
required_providers {
cyral = {
source = "cyralinc/cyral"
version = "~> 4.1"
version = "~> 4.0"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/integration_logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ resource "cyral_sidecar_credentials" "creds" {
module "cyral_sidecar" {
source = "cyralinc/sidecar-ec2/aws"
version = "~> 4.0"
version = "~> 5.0"
sidecar_id = cyral_sidecar.sidecar.id
Expand Down

0 comments on commit 20d143c

Please sign in to comment.