From 758a1b2430f4d3ae580b38f17215af59b830c228 Mon Sep 17 00:00:00 2001 From: KF Date: Thu, 30 May 2024 14:28:31 +0800 Subject: [PATCH] Renamed layer name --- .../Exercise1/.terraform.lock.hcl | 17 -------- .../Exercise1/README.md | 40 ------------------- .../Exercise1/main.tf | 6 --- .../Exercise1/outputs.tf | 4 -- .../Exercise1/provider.tf | 27 ------------- .../Exercise1/terraform.tfvars | 0 .../Exercise1/variables.tf | 0 .../Exercise2/.terraform.lock.hcl | 17 -------- .../Exercise2/README.md | 40 ------------------- .../Exercise2/main.tf | 12 ------ .../Exercise2/outputs.tf | 4 -- .../Exercise2/provider.tf | 27 ------------- .../Exercise2/terraform.tfvars | 0 .../Exercise2/variables.tf | 0 14 files changed, 194 deletions(-) delete mode 100644 SecurityManagementCompliance/Exercise1/.terraform.lock.hcl delete mode 100644 SecurityManagementCompliance/Exercise1/README.md delete mode 100644 SecurityManagementCompliance/Exercise1/main.tf delete mode 100644 SecurityManagementCompliance/Exercise1/outputs.tf delete mode 100644 SecurityManagementCompliance/Exercise1/provider.tf delete mode 100644 SecurityManagementCompliance/Exercise1/terraform.tfvars delete mode 100644 SecurityManagementCompliance/Exercise1/variables.tf delete mode 100644 SecurityManagementCompliance/Exercise2/.terraform.lock.hcl delete mode 100644 SecurityManagementCompliance/Exercise2/README.md delete mode 100644 SecurityManagementCompliance/Exercise2/main.tf delete mode 100644 SecurityManagementCompliance/Exercise2/outputs.tf delete mode 100644 SecurityManagementCompliance/Exercise2/provider.tf delete mode 100644 SecurityManagementCompliance/Exercise2/terraform.tfvars delete mode 100644 SecurityManagementCompliance/Exercise2/variables.tf diff --git a/SecurityManagementCompliance/Exercise1/.terraform.lock.hcl b/SecurityManagementCompliance/Exercise1/.terraform.lock.hcl deleted file mode 100644 index e51eea3..0000000 --- a/SecurityManagementCompliance/Exercise1/.terraform.lock.hcl +++ /dev/null @@ -1,17 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/aws" { - version = "5.51.1" - constraints = ">= 5.0.0" - hashes = [ - "h1:ESfxP2tCO6IZldSQnepXmIm+x+VtaQt/bKgGjYE+0BY=", - ] -} - -provider "registry.terraform.io/hashicorp/random" { - version = "3.6.2" - hashes = [ - "h1:wmG0QFjQ2OfyPy6BB7mQ57WtoZZGGV07uAPQeDmIrAE=", - ] -} diff --git a/SecurityManagementCompliance/Exercise1/README.md b/SecurityManagementCompliance/Exercise1/README.md deleted file mode 100644 index 0ad9714..0000000 --- a/SecurityManagementCompliance/Exercise1/README.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Requirements - -| Name | Version | -|------|---------| -| terraform | >= 1.3.0 | -| aws | >= 5.0 | - -## Providers - -| Name | Version | -|------|---------| -| aws | 5.51.1 | -| random | 3.6.2 | - -## Modules - -No modules. - -## Resources - -| Name | Type | -|------|------| -| [aws_iam_group.Group1](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_group) | resource | -| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource | - -## Inputs - -No inputs. - -## Outputs - -| Name | Description | -|------|-------------| -| GroupName | Name of IAM group | -| last-updated | n/a | - ---- -## Authorship -This module was developed by xpk. \ No newline at end of file diff --git a/SecurityManagementCompliance/Exercise1/main.tf b/SecurityManagementCompliance/Exercise1/main.tf deleted file mode 100644 index 15eaf14..0000000 --- a/SecurityManagementCompliance/Exercise1/main.tf +++ /dev/null @@ -1,6 +0,0 @@ -resource "aws_iam_group" "Group1" { - name = "Team-${random_pet.this.id}" - path = "/users/" -} - -resource "random_pet" "this" {} \ No newline at end of file diff --git a/SecurityManagementCompliance/Exercise1/outputs.tf b/SecurityManagementCompliance/Exercise1/outputs.tf deleted file mode 100644 index c2042e9..0000000 --- a/SecurityManagementCompliance/Exercise1/outputs.tf +++ /dev/null @@ -1,4 +0,0 @@ -output "GroupName" { - value = aws_iam_group.Group1.name - description = "Name of IAM group" -} \ No newline at end of file diff --git a/SecurityManagementCompliance/Exercise1/provider.tf b/SecurityManagementCompliance/Exercise1/provider.tf deleted file mode 100644 index b6ed192..0000000 --- a/SecurityManagementCompliance/Exercise1/provider.tf +++ /dev/null @@ -1,27 +0,0 @@ -provider "aws" { - region = "ap-east-1" - - default_tags { - tags = { - ServiceProvider = "RackspaceTechnology" - Environment = "Training" - Project = "Iac" - TerraformMode = "managed" - TerraformDir = "${reverse(split("/", path.cwd))[1]}/${reverse(split("/", path.cwd))[0]}" - } - } -} - -output "last-updated" { - value = timestamp() -} - -terraform { - required_version = ">= 1.3.0" - required_providers { - aws = { - source = "hashicorp/aws" - version = ">= 5.0" - } - } -} \ No newline at end of file diff --git a/SecurityManagementCompliance/Exercise1/terraform.tfvars b/SecurityManagementCompliance/Exercise1/terraform.tfvars deleted file mode 100644 index e69de29..0000000 diff --git a/SecurityManagementCompliance/Exercise1/variables.tf b/SecurityManagementCompliance/Exercise1/variables.tf deleted file mode 100644 index e69de29..0000000 diff --git a/SecurityManagementCompliance/Exercise2/.terraform.lock.hcl b/SecurityManagementCompliance/Exercise2/.terraform.lock.hcl deleted file mode 100644 index 60379cc..0000000 --- a/SecurityManagementCompliance/Exercise2/.terraform.lock.hcl +++ /dev/null @@ -1,17 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/aws" { - version = "5.51.1" - constraints = ">= 4.0.0, >= 5.0.0" - hashes = [ - "h1:ESfxP2tCO6IZldSQnepXmIm+x+VtaQt/bKgGjYE+0BY=", - ] -} - -provider "registry.terraform.io/hashicorp/random" { - version = "3.6.2" - hashes = [ - "h1:wmG0QFjQ2OfyPy6BB7mQ57WtoZZGGV07uAPQeDmIrAE=", - ] -} diff --git a/SecurityManagementCompliance/Exercise2/README.md b/SecurityManagementCompliance/Exercise2/README.md deleted file mode 100644 index ae79607..0000000 --- a/SecurityManagementCompliance/Exercise2/README.md +++ /dev/null @@ -1,40 +0,0 @@ - -## Requirements - -| Name | Version | -|------|---------| -| terraform | >= 1.3.0 | -| aws | >= 5.0 | - -## Providers - -| Name | Version | -|------|---------| -| random | 3.6.2 | - -## Modules - -| Name | Source | Version | -|------|--------|---------| -| iam | terraform-aws-modules/iam/aws//modules/iam-group-with-policies | 5.39.1 | - -## Resources - -| Name | Type | -|------|------| -| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource | - -## Inputs - -No inputs. - -## Outputs - -| Name | Description | -|------|-------------| -| GroupName | Name of IAM group | -| last-updated | n/a | - ---- -## Authorship -This module was developed by xpk. \ No newline at end of file diff --git a/SecurityManagementCompliance/Exercise2/main.tf b/SecurityManagementCompliance/Exercise2/main.tf deleted file mode 100644 index 2f4c196..0000000 --- a/SecurityManagementCompliance/Exercise2/main.tf +++ /dev/null @@ -1,12 +0,0 @@ -module "iam" { - source = "terraform-aws-modules/iam/aws//modules/iam-group-with-policies" - version = "5.39.1" - - name = "Team-${random_pet.this.id}" - create_group = true - custom_group_policy_arns = [ - "arn:aws:iam::aws:policy/job-function/ViewOnlyAccess" - ] -} - -resource "random_pet" "this" {} \ No newline at end of file diff --git a/SecurityManagementCompliance/Exercise2/outputs.tf b/SecurityManagementCompliance/Exercise2/outputs.tf deleted file mode 100644 index 7a28d68..0000000 --- a/SecurityManagementCompliance/Exercise2/outputs.tf +++ /dev/null @@ -1,4 +0,0 @@ -output "GroupName" { - value = module.iam.group_name - description = "Name of IAM group" -} \ No newline at end of file diff --git a/SecurityManagementCompliance/Exercise2/provider.tf b/SecurityManagementCompliance/Exercise2/provider.tf deleted file mode 100644 index b6ed192..0000000 --- a/SecurityManagementCompliance/Exercise2/provider.tf +++ /dev/null @@ -1,27 +0,0 @@ -provider "aws" { - region = "ap-east-1" - - default_tags { - tags = { - ServiceProvider = "RackspaceTechnology" - Environment = "Training" - Project = "Iac" - TerraformMode = "managed" - TerraformDir = "${reverse(split("/", path.cwd))[1]}/${reverse(split("/", path.cwd))[0]}" - } - } -} - -output "last-updated" { - value = timestamp() -} - -terraform { - required_version = ">= 1.3.0" - required_providers { - aws = { - source = "hashicorp/aws" - version = ">= 5.0" - } - } -} \ No newline at end of file diff --git a/SecurityManagementCompliance/Exercise2/terraform.tfvars b/SecurityManagementCompliance/Exercise2/terraform.tfvars deleted file mode 100644 index e69de29..0000000 diff --git a/SecurityManagementCompliance/Exercise2/variables.tf b/SecurityManagementCompliance/Exercise2/variables.tf deleted file mode 100644 index e69de29..0000000