Skip to content

Commit

Permalink
make the example portable
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Jan 22, 2021
1 parent aecae11 commit d9df0a5
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ No requirements.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| artifact\_store | Map to populate the artifact block | `map` | n/a | yes |
| common\_tags | Implements the common tags scheme | `map` | n/a | yes |
| artifact\_store | Map to populate the artifact block | `map(any)` | n/a | yes |
| common\_tags | Implements the common tags scheme | `map(any)` | n/a | yes |
| description | Description of build project | `string` | n/a | yes |
| name | n/a | `string` | n/a | yes |
| policypath | n/a | `string` | `""` | no |
| role\_arn | Optionally supply an existing role | `string` | `""` | no |
| stages | This list describes each stage of the build | `list` | n/a | yes |
| stages | This list describes each stage of the build | `list(any)` | n/a | yes |

## Outputs

Expand Down
1 change: 0 additions & 1 deletion aws_pipeline.pipe.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ resource "aws_codepipeline" "pipe" {

tags = var.common_tags
}

13 changes: 11 additions & 2 deletions example/examplea/aws_s3_bucket.codepipeline.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,14 @@ resource "aws_s3_bucket" "codepipeline" {
#checkov:skip=CKV_AWS_18: "Ensure the S3 bucket has access logging enabled"
bucket = local.artifact_store.location
acl = "private"
tags = var.common_tags
}

server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}
tags = var.common_tags

}
2 changes: 1 addition & 1 deletion example/examplea/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ locals {
}

data "aws_caller_identity" "current" {}
data "aws_region" "current" {}
data "aws_region" "current" {}
1 change: 0 additions & 1 deletion example/examplea/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ variable "common_tags" {
type = map(any)
description = "Implements the common tags scheme"
}

2 changes: 1 addition & 1 deletion locals.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

locals {
role_arn = var.role_arn == "" ? aws_iam_role.pipeline.0.arn : var.role_arn
}
}
6 changes: 3 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variable "artifact_store" {
description = "Map to populate the artifact block"
type = map
type = map(any)
}

variable "name" {
Expand All @@ -14,7 +14,7 @@ variable "role_arn" {
}

variable "stages" {
type = list
type = list(any)
description = "This list describes each stage of the build"
}

Expand All @@ -24,7 +24,7 @@ variable "description" {
}

variable "common_tags" {
type = map
type = map(any)
description = "Implements the common tags scheme"
}

Expand Down

0 comments on commit d9df0a5

Please sign in to comment.