Skip to content

Commit

Permalink
update aws and cloudflare providers
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Oct 16, 2024
1 parent b1ca53d commit 5b73934
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 63 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ override.tf.json
.terraformrc
terraform.rc

# Since this is a module, we don't want to retain version locks
.terraform.lock.hcl

# IDE configuration
.idea/
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ module "ecs-service-cloudwatch-dashboard" {
count = var.create_dashboard ? 1 : 0

source = "silinternational/ecs-service-cloudwatch-dashboard/aws"
version = "~> 3.0.1"
version = "~> 3.1"

cluster_name = module.ecsasg.ecs_cluster_name
dashboard_name = "${local.app_name_and_env}-${local.region}"
Expand All @@ -176,7 +176,7 @@ resource "random_password" "db_root" {
* Create an RDS database
*/
module "rds" {
source = "github.com/silinternational/terraform-modules//aws/rds/mariadb?ref=8.8.0"
source = "github.com/silinternational/terraform-modules//aws/rds/mariadb?ref=8.13.3"

app_name = var.app_name
app_env = local.app_env
Expand All @@ -198,7 +198,7 @@ module "rds" {
module "adminer" {
count = var.create_adminer ? 1 : 0
source = "silinternational/adminer/aws"
version = "1.0.2"
version = "~> 1.1"

adminer_default_server = module.rds.address
app_name = var.app_name
Expand All @@ -217,7 +217,7 @@ module "adminer" {
* Create new ecs service
*/
module "ecs" {
source = "github.com/silinternational/terraform-modules//aws/ecs/service-only?ref=8.8.0"
source = "github.com/silinternational/terraform-modules//aws/ecs/service-only?ref=8.13.3"
cluster_id = module.ecsasg.ecs_cluster_id
service_name = var.app_name
service_env = local.app_env
Expand Down
96 changes: 48 additions & 48 deletions test/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ terraform {
required_version = ">= 1.0"
required_providers {
aws = {
version = "~> 4.0"
version = "~> 5.0"
source = "hashicorp/aws"
}
cloudflare = {
version = "~> 3.0"
version = "~> 4.0"
source = "cloudflare/cloudflare"
}
random = {
Expand Down
9 changes: 6 additions & 3 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ terraform {
required_version = ">= 1.0"
required_providers {
aws = {
version = "~> 4.0"
source = "hashicorp/aws"
version = ">= 4.0.0, < 6.0.0"
}
cloudflare = {
version = "~> 3.0"
source = "cloudflare/cloudflare"
source = "cloudflare/cloudflare"

// 4.39.0 deprecated cloudflare_record.value
// While waiting for version 5 to mature, we'll constrain to earlier versions.
version = ">= 2.0.0, < 4.39.0"
}
random = {
version = "~> 3.0"
Expand Down
14 changes: 8 additions & 6 deletions vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
* Create VPC
*/
module "vpc" {
source = "github.com/silinternational/terraform-modules//aws/vpc?ref=8.8.0"
source = "silinternational/vpc/aws"
version = "~> 1.0"

app_name = var.app_name
app_env = var.app_env
aws_zones = var.aws_zones

}

/*
* Security group to limit traffic to Cloudflare IPs
*/
module "cloudflare-sg" {
source = "github.com/silinternational/terraform-modules//aws/cloudflare-sg?ref=8.8.0"
source = "github.com/silinternational/terraform-modules//aws/cloudflare-sg?ref=8.13.3"
vpc_id = module.vpc.id
}

Expand Down Expand Up @@ -90,7 +91,7 @@ data "aws_acm_certificate" "default" {
* Create application load balancer for public access
*/
module "alb" {
source = "github.com/silinternational/terraform-modules//aws/alb?ref=8.8.0"
source = "github.com/silinternational/terraform-modules//aws/alb?ref=8.13.3"
app_name = var.app_name
app_env = var.app_env
internal = "false"
Expand All @@ -106,8 +107,9 @@ module "alb" {
* https://registry.terraform.io/modules/silinternational/ecs-asg/aws
*/
module "ecsasg" {
source = "silinternational/ecs-asg/aws"
version = "3.1.0"
source = "silinternational/ecs-asg/aws"
version = "~> 3.3"

cluster_name = local.app_name_and_env
subnet_ids = module.vpc.private_subnet_ids
security_group_ids = [module.vpc.vpc_default_sg_id]
Expand Down

0 comments on commit 5b73934

Please sign in to comment.