diff --git a/backend.tf b/backend.tf new file mode 100644 index 0000000..c1d607d --- /dev/null +++ b/backend.tf @@ -0,0 +1,8 @@ +terraform { + backend "s3" { + bucket = "kunduso-terraform-remote-bucket" + encrypt = true + key = "tf/add-aws-lambda-terraform/terraform.tfstate" + region = "us-east-2" + } +} \ No newline at end of file diff --git a/provider.tf b/provider.tf new file mode 100644 index 0000000..73f2f0b --- /dev/null +++ b/provider.tf @@ -0,0 +1,19 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "5.53.0" + } + } +} + +provider "aws" { + region = var.region + access_key = var.access_key + secret_key = var.secret_key + default_tags { + tags = { + Source = "https://github.com/kunduso/add-aws-lambda-terraform" + } + } +} \ No newline at end of file diff --git a/variables.tf b/variables.tf new file mode 100644 index 0000000..2307f42 --- /dev/null +++ b/variables.tf @@ -0,0 +1,20 @@ +#Define AWS Region +variable "region" { + description = "Infrastructure region" + type = string + default = "us-east-2" +} +#Define IAM User Access Key +variable "access_key" { + description = "The access_key that belongs to the IAM user" + type = string + sensitive = true + default = "" +} +#Define IAM User Secret Key +variable "secret_key" { + description = "The secret_key that belongs to the IAM user" + type = string + sensitive = true + default = "" +} \ No newline at end of file