diff --git a/.gitignore b/.gitignore index 41d06d6..7f25ecd 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,7 @@ forums/migrations .vscode .env .python-version + +# infra creds +infra/credentials +infra/.terraform/* diff --git a/infra/.terraform.lock.hcl b/infra/.terraform.lock.hcl new file mode 100644 index 0000000..15d7c84 --- /dev/null +++ b/infra/.terraform.lock.hcl @@ -0,0 +1,25 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/aws" { + version = "4.48.0" + constraints = "~> 4.48.0" + hashes = [ + "h1:t/R3B4mibkp2zLer4MfhFbwHAVLAq71mJz4nwdUydBE=", + "zh:08f5e3c5256a4fbd5c988863d10e5279172b2470fec6d4fb13c372663e7f7cac", + "zh:2a04376b7fa84681bd2938973c7d0822c8c0f0656a4e7661a2f50ac4d852d4a3", + "zh:30d6cdf321aaba874934cbde505333d89d172d8d5ffcf40b6e66626c57bc6ab2", + "zh:364639ee19cf4cfaa65de84a2a71d32725d5b728b71dd88d01ccb639c006c1cf", + "zh:4e02252cd88b6f59f556f49c5ce46a358046c98f069230358ac15f4030ae1e76", + "zh:611717320f20b3512ceb90abddd5198a85e1093965ce59e3ef8183188c84f8c3", + "zh:630be3b9ba5b3a95ecb2ce2f3523714ab37cd8bcd7479c879a769e6a446ab5ed", + "zh:6701f9d3ae1ffadb3ebefbe75c9d82668cc5495b8f826e498adb8530e202b652", + "zh:6dc6fdfa7469c9de7b405c68b2f6a09a3438db1ef09d348e49c7ceff4300b01a", + "zh:84c8140d8af6965fa9cd80e52eb2ee3d273e3ab7762719a8d1af665c08fab748", + "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", + "zh:9b6b4f7d4cea37ba7a42a47d506115498858bcd6440ad97dfb214c13a688ba90", + "zh:a7f876af20f5c5dae8e333ec0dfc901e26aa801137e7df65fb365565637bbfe2", + "zh:ad107b8e11dd0609b856584ce70ae6621aa4f1f946da51f7c792f1259e3f9c27", + "zh:d5dc1683693a5fe2652952f50dbbeccd02716799c26c6d1a1378b226cf845e9b", + ] +} diff --git a/infra/README.md b/infra/README.md new file mode 100644 index 0000000..586d8fe --- /dev/null +++ b/infra/README.md @@ -0,0 +1,2 @@ +https://aws.amazon.com/getting-started/hands-on/deploy-docker-containers/ + diff --git a/infra/main.tf b/infra/main.tf new file mode 100644 index 0000000..c348d77 --- /dev/null +++ b/infra/main.tf @@ -0,0 +1,30 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 4.48.0" + } + } + + required_version = ">= 1.3.6" +} + +provider "aws" { + region = "us-east-1" + shared_credentials_files = ["./credentials"] + profile = "minictf" + default_tags { + tags = { + Service = "minictf" + } + } +} + +resource "aws_ecr_repository" "minictf_ecr" { + name = "minictf" + image_tag_mutability = "MUTABLE" + tags = { + Name = "minictf-ecr" + } +} + diff --git a/infra/terraform.tfstate b/infra/terraform.tfstate new file mode 100644 index 0000000..5181db7 --- /dev/null +++ b/infra/terraform.tfstate @@ -0,0 +1,51 @@ +{ + "version": 4, + "terraform_version": "1.3.6", + "serial": 11, + "lineage": "9c8c0fd2-3972-3452-d36a-3de87f12af8c", + "outputs": {}, + "resources": [ + { + "mode": "managed", + "type": "aws_ecr_repository", + "name": "minictf_ecr", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ecr:us-east-1:479426508990:repository/minictf", + "encryption_configuration": [ + { + "encryption_type": "AES256", + "kms_key": "" + } + ], + "force_delete": null, + "id": "minictf", + "image_scanning_configuration": [ + { + "scan_on_push": false + } + ], + "image_tag_mutability": "MUTABLE", + "name": "minictf", + "registry_id": "479426508990", + "repository_url": "479426508990.dkr.ecr.us-east-1.amazonaws.com/minictf", + "tags": { + "Name": "minictf-ecr" + }, + "tags_all": { + "Name": "minictf-ecr", + "Service": "minictf" + }, + "timeouts": null + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxMjAwMDAwMDAwMDAwfX0=" + } + ] + } + ], + "check_results": null +} diff --git a/infra/terraform.tfstate.backup b/infra/terraform.tfstate.backup new file mode 100644 index 0000000..ce8cfca --- /dev/null +++ b/infra/terraform.tfstate.backup @@ -0,0 +1,9 @@ +{ + "version": 4, + "terraform_version": "1.3.6", + "serial": 9, + "lineage": "9c8c0fd2-3972-3452-d36a-3de87f12af8c", + "outputs": {}, + "resources": [], + "check_results": null +}