Compare commits

..

17 Commits

Author SHA1 Message Date
hgn
05ab1ed606 updating test.yaml
Some checks failed
build / tfsec (push) Failing after 21s
2025-01-18 12:01:56 +01:00
hgn
5cf3e87c55 ping 2025-01-18 12:01:32 +01:00
hgn
e906fa54a9 adding tests
Some checks failed
build / tfsec (push) Failing after 1m3s
2025-01-18 11:58:06 +01:00
hgn
c25f858d89 adding flow logs
Some checks failed
build / tfsec (push) Failing after 25s
2025-01-17 00:54:02 +01:00
hgn
187525f3ed adding tfsec
Some checks failed
build / tfsec (push) Failing after 1m43s
2025-01-17 00:45:47 +01:00
hgn
a89000a6cc Update .github/workflows/codescanning.yaml
Some checks failed
build / Build (push) Failing after 6m52s
2025-01-16 12:58:42 +01:00
hgn
14b733d7b8 Update .github/workflows/codescanning.yaml 2025-01-16 12:57:42 +01:00
hgn
06bef64e87 Update .github/workflows/codescanning.yaml 2025-01-16 12:57:10 +01:00
hgn
777e4b2b1c Update .github/workflows/codescanning.yaml
Some checks failed
build / Build (push) Failing after 5m26s
2025-01-16 09:30:03 +01:00
hgn
71c7f27be3 Update .github/workflows/start.yaml
Some checks failed
build / Build (push) Failing after 5m22s
2025-01-16 09:23:24 +01:00
hgn
ca47b2da90 Update .github/workflows/start.yaml
Some checks failed
build / Build (push) Failing after 6m28s
2025-01-15 23:35:41 +01:00
hgn
d6bb82d059 Update .github/workflows/start.yaml
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 7m3s
2025-01-15 23:25:43 +01:00
hgn
8201d901f3 Update .github/workflows/start.yaml 2025-01-15 23:24:29 +01:00
hgn
4e3e6caad7 Delete .github/workflows.yaml
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s
2025-01-15 23:23:46 +01:00
hgn
9a0e818403 Update .github/workflows.yaml
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 49s
2025-01-15 23:22:45 +01:00
hgn
5330238c7b Add .github/workflows/start.yaml
Signed-off-by: hgn <info@998px.de>
2024-11-24 02:04:57 +01:00
hgn
acdb55b0f8 Add .github/workflows.yaml
Signed-off-by: hgn <info@998px.de>
2024-11-24 02:03:39 +01:00
7 changed files with 51 additions and 46 deletions

View File

@@ -1,43 +0,0 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "terraform-dev-environment",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/terraform:1": {},
"ghcr.io/dhoeric/features/terraform-docs:1": {},
//"ghcr.io/devcontainers-extra/features/kind:1": {},
"ghcr.io/dhoeric/features/tfsec:1": {}
},
// mounting local aws configuration
"mounts": [
"source=${env:HOME}${env:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind"
],
// a post create command to check the installed versions
"postCreateCommand": "terraform version && tfsec --version && terraform-docs --version",
// setting the default vsc addons and settings
"customizations": {
"vscode": {
"extensions": [
"hashicorp.terraform",
"tfsec.tfsec",
"oderwat.indent-rainbow",
"catppuccin.catppuccin-vsc",
"catppuccin.catppuccin-vsc-icons",
"continue.continue"
],
"settings": {
"editor.formatOnSave": true,
"editor.trimTrailingWhitespace": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"terraform.experimentalFeatures.validateOnSave": true,
"terraform.languageServer": {
"enabled": true,
"args": []
}
}
}
},
"remoteUser": "vscode"
}

17
.github/workflows/codescanning.yaml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: build
on:
push:
branches:
- main
- devpod
pull_request:
jobs:
tfsec:
name: tfsec
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@master
- name: tfsec
uses: aquasecurity/tfsec-action@v1.0.0

18
.github/workflows/test.yaml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: stack test
on:
push:
branches:
- main
- devpod
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: test terraform
uses: "infinite-automations/terraform-all-in-one@v1"
with:
plan: false
test: true
directory: "./terraform"
test-directory: "./terraform"

2
.gitignore vendored
View File

@@ -5,7 +5,7 @@
# .tfstate files
*.tfstate
*.tfstate.*
.terraform.locck.hcl
# Crash log files
crash.log
crash.*.log

7
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"editor.formatOnSave": true,
"files.trimTrailingWhitespace": false,
"files.insertFinalNewline": true,
"terraform.experimentalFeatures.validateOnSave": true,
"editor.tabSize": 2
}

View File

@@ -9,11 +9,13 @@ locals {
### create a key pair
module "key_pair" {
source = "terraform-aws-modules/key-pair/aws"
source = "terraform-aws-modules/key-pair/aws"
key_name = "${local.name}-test-key"
create_private_key = true
}
### create a vpc
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
@@ -26,12 +28,15 @@ module "vpc" {
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
enable_nat_gateway = true
single_nat_gateway = true
enable_dns_hostnames = true
enable_dns_support = true
enable_flow_log = true
tags = {
terraform = "true"
environment = "test"
@@ -41,7 +46,6 @@ module "vpc" {
### create a security group
module "web_server_sg" {
version = "5.2.0"
source = "terraform-aws-modules/security-group/aws//modules/http-80"
name = "${local.name}-web-server-sg"
description = "Security group for web server of ${local.name}"
@@ -50,6 +54,8 @@ module "web_server_sg" {
ingress_rules = ["http-80-tcp", "https-443-tcp", "ssh-tcp"]
}
### create an ec2 instance
module "ec2_instance" {
source = "terraform-aws-modules/ec2-instance/aws"