Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tf): add variable for aws default tags #11

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
"ms-python.python",
"njpwerner.autodocstring",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker"
"streetsidesoftware.code-spell-checker",
"hashicorp.terraform"
]
}
4 changes: 1 addition & 3 deletions terraform/aws-ecs-task/main.tf
Original file line number Diff line number Diff line change
@@ -12,9 +12,7 @@ provider "aws" {
region = var.aws_region

default_tags {
tags = {
"product" = "CensysCloudConnector"
}
tags = var.aws_default_tags
}
}

11 changes: 9 additions & 2 deletions terraform/aws-ecs-task/terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# TODO: fill this in from variables.tf
# Required Variables
censys_api_key = ""
censys_api_key = ""
logging_level = "INFO"
schedule_expression = "rate(4 hours)"
role_name = "CensysCloudConnectorRole"

# Optional Variables
aws_default_tags = {
"Product" : "CensysCloudConnector",
}
8 changes: 8 additions & 0 deletions terraform/aws-ecs-task/variables.tf
Original file line number Diff line number Diff line change
@@ -11,6 +11,14 @@ variable "aws_availability_zone" {
description = "The AWS availability zones to use."
}

variable "aws_default_tags" {
type = map(string)
default = {
"Product" = "CensysCloudConnector"
}
description = "The default tags to apply to AWS resources."
}

variable "image_uri" {
type = string
default = "gcr.io/censys-io/censys-cloud-connector"