diff --git a/.github/workflows/build-latest-docker-image.yaml b/.github/workflows/build-latest-docker-image.yaml index 1c78823d..97f0b191 100644 --- a/.github/workflows/build-latest-docker-image.yaml +++ b/.github/workflows/build-latest-docker-image.yaml @@ -4,7 +4,6 @@ on: push: branches: - main - - feat/dockerize-build workflow_dispatch: jobs: build-and-push-latest-docker-image: diff --git a/terraform/mainnet/main.tf b/terraform/mainnet/main.tf index 1525a520..6a66c75f 100644 --- a/terraform/mainnet/main.tf +++ b/terraform/mainnet/main.tf @@ -91,7 +91,7 @@ resource "aws_iam_role" "lambda_role" { resource "aws_lambda_function" "function" { function_name = "${var.package_name}-${var.environment}" package_type = "Image" - image_uri = "499786161782.dkr.ecr.us-east-2.amazonaws.com/axelarscan-api:v${var.app_version}" + image_uri = "${var.aws_account}.dkr.ecr.us-east-2.amazonaws.com/axelarscan-api:v${var.app_version}" role = aws_iam_role.lambda_role.arn timeout = 840 memory_size = 512 @@ -106,7 +106,7 @@ resource "aws_lambda_function" "function" { LOG_LEVEL = var.log_level DD_LAMBDA_HANDLER = "index.handler" DD_SITE = "datadoghq.com" - DD_API_KEY_SECRET_ARN = "arn:aws:secretsmanager:us-east-2:499786161782:secret:DdApiKeySecret-gJ9EIYVknJGu-HYZ3nM" + DD_API_KEY_SECRET_ARN = "arn:aws:secretsmanager:us-east-2:${var.aws_account}:secret:DdApiKeySecret-gJ9EIYVknJGu-HYZ3nM" DD_TRACE_ENABLED = true DD_ENV = var.environment DD_SERVICE = "${var.package_name}-${var.environment}" diff --git a/terraform/mainnet/variables.tf.example b/terraform/mainnet/variables.tf.example index c767a651..d363a25e 100644 --- a/terraform/mainnet/variables.tf.example +++ b/terraform/mainnet/variables.tf.example @@ -3,6 +3,11 @@ variable "aws_region" { default = "us-east-2" } +variable "aws_account" { + description = "AWS account id" + default = "" +} + variable "iam_role" { description = "AWS IAM role" default = "axelar-gmp-role-lambda" diff --git a/terraform/stagenet/main.tf b/terraform/stagenet/main.tf index 5b1c0061..acb38348 100644 --- a/terraform/stagenet/main.tf +++ b/terraform/stagenet/main.tf @@ -91,7 +91,7 @@ resource "aws_iam_role" "lambda_role" { resource "aws_lambda_function" "function" { function_name = "${var.package_name}-${var.environment}" package_type = "Image" - image_uri = "499786161782.dkr.ecr.us-east-2.amazonaws.com/axelarscan-api:v${var.app_version}" + image_uri = "${var.aws_account}.dkr.ecr.us-east-2.amazonaws.com/axelarscan-api:v${var.app_version}" role = aws_iam_role.lambda_role.arn timeout = 30 memory_size = 512 @@ -106,7 +106,7 @@ resource "aws_lambda_function" "function" { LOG_LEVEL = var.log_level DD_LAMBDA_HANDLER = "index.handler" DD_SITE = "datadoghq.com" - DD_API_KEY_SECRET_ARN = "arn:aws:secretsmanager:us-east-2:499786161782:secret:DdApiKeySecret-gJ9EIYVknJGu-HYZ3nM" + DD_API_KEY_SECRET_ARN = "arn:aws:secretsmanager:us-east-2:${var.aws_account}:secret:DdApiKeySecret-gJ9EIYVknJGu-HYZ3nM" DD_TRACE_ENABLED = true DD_ENV = var.environment DD_SERVICE = "${var.package_name}-${var.environment}" diff --git a/terraform/stagenet/variables.tf.example b/terraform/stagenet/variables.tf.example index b579cb34..266f2139 100644 --- a/terraform/stagenet/variables.tf.example +++ b/terraform/stagenet/variables.tf.example @@ -3,6 +3,11 @@ variable "aws_region" { default = "us-east-2" } +variable "aws_account" { + description = "AWS account id" + default = "" +} + variable "iam_role" { description = "AWS IAM role" default = "axelar-gmp-role-lambda" diff --git a/terraform/testnet/main.tf b/terraform/testnet/main.tf index 0d5e48d4..22735572 100644 --- a/terraform/testnet/main.tf +++ b/terraform/testnet/main.tf @@ -91,7 +91,7 @@ resource "aws_iam_role" "lambda_role" { resource "aws_lambda_function" "function" { function_name = "${var.package_name}-${var.environment}" package_type = "Image" - image_uri = "499786161782.dkr.ecr.us-east-2.amazonaws.com/axelarscan-api:v${var.app_version}" + image_uri = "${var.aws_account}.dkr.ecr.us-east-2.amazonaws.com/axelarscan-api:v${var.app_version}" role = aws_iam_role.lambda_role.arn timeout = 30 memory_size = 512 @@ -106,7 +106,7 @@ resource "aws_lambda_function" "function" { LOG_LEVEL = var.log_level DD_LAMBDA_HANDLER = "index.handler" DD_SITE = "datadoghq.com" - DD_API_KEY_SECRET_ARN = "arn:aws:secretsmanager:us-east-2:499786161782:secret:DdApiKeySecret-gJ9EIYVknJGu-HYZ3nM" + DD_API_KEY_SECRET_ARN = "arn:aws:secretsmanager:us-east-2:${var.aws_account}:secret:DdApiKeySecret-gJ9EIYVknJGu-HYZ3nM" DD_TRACE_ENABLED = true DD_ENV = var.environment DD_SERVICE = "${var.package_name}-${var.environment}" diff --git a/terraform/testnet/variables.tf.example b/terraform/testnet/variables.tf.example index ffbc39a0..7187b9b6 100644 --- a/terraform/testnet/variables.tf.example +++ b/terraform/testnet/variables.tf.example @@ -3,6 +3,11 @@ variable "aws_region" { default = "us-east-2" } +variable "aws_account" { + description = "AWS account id" + default = "" +} + variable "iam_role" { description = "AWS IAM role" default = "axelar-gmp-role-lambda"