Automates maven build creation and load the build to cloud using terraform
sample pipeline.yml
:
steps:
- label: ":package: Deploy"
plugins:
- madan712/maven-terraform#v1.3:
below is the sample .tf file to create AWS lambda function main.tf
:
variable "build" {}
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.27"
}
}
required_version = ">= 0.14.9"
}
provider "aws" {
profile = "default"
region = "us-east-1"
}
resource "aws_lambda_function" "aws_lambda_demo" {
filename = var.build
function_name = "awsLambdaDemo"
role = "arn:aws:iam::695663959248:role/lambda-role"
handler = "com.javaxp.lambda.demo.LambdaFunctionHandler::handleRequest"
runtime = "java11"
source_code_hash = filebase64sha256(var.build)
}
To run the tests:
TODO
- Fork the repo
- Make the changes
- Run the tests
- Commit and push your changes
- Send a pull request