Skip to content

Commit b605a91

Browse files
authored
Update dependencies and README (#5)
1 parent 6b96d7c commit b605a91

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

README.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Terraform module aws-ecs-tfc-agent
22

3-
This module creates a Terraform Cloud Agent pool in a TFC org, and deploys a task definition and service into an existing ECS Fargate cluster. It includes the required security group and IAM roles for a basic deployment. For all options, see variables.tf
3+
This module creates an HCP Terraform agent pool in a TFC org, and deploys a task definition and service into an existing ECS Fargate cluster. It includes the required security group and IAM roles for a basic deployment. For all options, see variables.tf
44

55
Prerequisites:
66

77
- An existing VPC with at least one public subnet
8-
- An existing ECS Fargate cluster
9-
- A Terraform Cloud organization with self-hosted agent support (Business tier), or a Terraform Enterprise instance
8+
- An existing ECS Fargate cluster and CloudWatch log group
9+
- An HCP Terraform organization or a Terraform Enterprise instance
1010

1111
Hat tip to Andy Assareh for his [excellent examples](https://github.com/assareh/tfc-agent).
1212

1313
Minimal example using the standard agent image (hashicorp/tfc-agent):
1414

1515
```terraform
1616
module "agent_standard" {
17-
source = "github.com/danbarr/terraform-aws-ecs-tfc-agent?ref=v0.3.0"
17+
source = "github.com/danbarr/terraform-aws-ecs-tfc-agent?ref=v1.0.0"
1818
1919
name = "ecs"
2020
tfc_org_name = "My-TFC-Org"
@@ -29,15 +29,19 @@ Example using a customized tfc-agent image hosted in ECR, plus my aws-ecs-fargat
2929

3030
```terraform
3131
module "agent_cluster" {
32-
source = "github.com/danbarr/terraform-aws-ecs-fargate-cluster?ref=v0.9.1"
33-
cluster_name = "tfc-agent-cluster"
32+
source = "github.com/danbarr/terraform-aws-ecs-fargate-cluster?ref=v1.0.1"
33+
cluster_name = "terraform-agent-cluster"
34+
}
35+
36+
resource "aws_cloudwatch_log_group" "example" {
37+
name = "/ecs/tfc-agents-module-test"
3438
}
3539
3640
module "agent_standard" {
37-
source = "github.com/danbarr/terraform-aws-ecs-tfc-agent?ref=v0.3.0"
41+
source = "github.com/danbarr/terraform-aws-ecs-tfc-agent?ref=v1.0.0"
3842
3943
name = "ecs-custom"
40-
tfc_org_name = "My-TFC-Org"
44+
tfc_org_name = "My-Terraform-Org"
4145
agent_image = "111111111111.dkr.ecr.us-east-1.amazonaws.com/tfc-custom-agent"
4246
ecs_cluster_arn = module.agent_cluster.cluster_arn
4347
use_spot_instances = true

example/basic-example.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = "~> 4.24"
7+
version = "~> 5.0"
88
}
99

1010
tfe = {
1111
source = "hashicorp/tfe"
12-
version = "~> 0.36"
12+
version = "~> 0.56"
1313
}
1414
}
1515
}

main.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = "~> 4.24"
7+
version = ">= 4.24"
88
}
99

1010
tfe = {
1111
source = "hashicorp/tfe"
12-
version = "~> 0.36"
12+
version = ">= 0.36"
1313
}
1414
}
1515
}
@@ -28,7 +28,7 @@ resource "tfe_agent_token" "ecs_agent_token" {
2828

2929
resource "aws_ssm_parameter" "agent_token" {
3030
name = "/tfc-agent-token/${var.tfc_org_name}/${var.name}"
31-
description = "Terraform Cloud agent token"
31+
description = "HCP Terraform agent token"
3232
type = "SecureString"
3333
value = tfe_agent_token.ecs_agent_token.token
3434
}

variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ variable "num_agents" {
8787

8888
variable "cloudwatch_log_group_name" {
8989
type = string
90-
description = "The name of the CloudWatch log group where agent logs will be sent."
90+
description = "The name of the CloudWatch log group where agent logs will be sent. The log group must already exist."
9191
}
9292

9393
variable "ecs_cluster_arn" {

0 commit comments

Comments
 (0)