Skip to content

Commit

Permalink
mfa_delete removed due to issue in terraform (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximmi authored Jan 29, 2021
1 parent 24cdea3 commit 7284ad7
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ Available targets:
| label\_order | The naming order of the id output and Name tag.<br>Defaults to ["namespace", "environment", "stage", "name", "attributes"].<br>You can omit any of the 5 elements, but at least one must be present. | `list(string)` | `null` | no |
| local\_cache\_modes | Specifies settings that AWS CodeBuild uses to store and reuse build dependencies. Valid values: LOCAL\_SOURCE\_CACHE, LOCAL\_DOCKER\_LAYER\_CACHE, and LOCAL\_CUSTOM\_CACHE | `list(string)` | `[]` | no |
| logs\_config | Configuration for the builds to store log data to CloudWatch or S3. | `any` | `{}` | no |
| mfa\_delete | A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 ) | `bool` | `true` | no |
| name | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no |
| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no |
| private\_repository | Set to true to login into private repository with credentials supplied in source\_credential variable. | `bool` | `false` | no |
Expand Down
1 change: 0 additions & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
| label\_order | The naming order of the id output and Name tag.<br>Defaults to ["namespace", "environment", "stage", "name", "attributes"].<br>You can omit any of the 5 elements, but at least one must be present. | `list(string)` | `null` | no |
| local\_cache\_modes | Specifies settings that AWS CodeBuild uses to store and reuse build dependencies. Valid values: LOCAL\_SOURCE\_CACHE, LOCAL\_DOCKER\_LAYER\_CACHE, and LOCAL\_CUSTOM\_CACHE | `list(string)` | `[]` | no |
| logs\_config | Configuration for the builds to store log data to CloudWatch or S3. | `any` | `{}` | no |
| mfa\_delete | A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 ) | `bool` | `true` | no |
| name | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no |
| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no |
| private\_repository | Set to true to login into private repository with credentials supplied in source\_credential variable. | `bool` | `false` | no |
Expand Down
3 changes: 0 additions & 3 deletions examples/bitbucket/build.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,4 @@ module "build" {
attributes = var.attributes
tags = var.tags




}
2 changes: 0 additions & 2 deletions examples/complete/fixtures.us-west-1.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ environment_variables = [
cache_expiration_days = 7

cache_type = "S3"

mfa_delete = false
1 change: 0 additions & 1 deletion examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module "codebuild" {
environment_variables = var.environment_variables
cache_expiration_days = var.cache_expiration_days
cache_type = var.cache_type
mfa_delete = var.mfa_delete

context = module.this.context
}
5 changes: 0 additions & 5 deletions examples/complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,3 @@ variable "cache_type" {
type = string
description = "The type of storage that will be used for the AWS CodeBuild project cache. Valid values: NO_CACHE, LOCAL, and S3. Defaults to NO_CACHE. If cache_type is S3, it will create an S3 bucket for storing codebuild cache inside"
}

variable "mfa_delete" {
type = bool
description = "A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 )"
}
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ data "aws_region" "default" {
resource "aws_s3_bucket" "cache_bucket" {
#bridgecrew:skip=BC_AWS_S3_13:Skipping `Enable S3 Bucket Logging` check until bridgecrew will support dynamic blocks (https://github.com/bridgecrewio/checkov/issues/776).
#bridgecrew:skip=BC_AWS_S3_14:Skipping `Ensure all data stored in the S3 bucket is securely encrypted at rest` check until bridgecrew will support dynamic blocks (https://github.com/bridgecrewio/checkov/issues/776).
#bridgecrew:skip=CKV_AWS_52:Skipping `Ensure S3 bucket has MFA delete enabled` due to issue in terraform (https://github.com/hashicorp/terraform-provider-aws/issues/629).
count = module.this.enabled && local.s3_cache_enabled ? 1 : 0
bucket = local.cache_bucket_name_normalised
acl = "private"
force_destroy = true
tags = module.this.tags

versioning {
enabled = var.versioning_enabled
mfa_delete = var.mfa_delete
enabled = var.versioning_enabled
}

dynamic "logging" {
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,6 @@ variable "versioning_enabled" {
description = "A state of versioning. Versioning is a means of keeping multiple variants of an object in the same bucket"
}

variable "mfa_delete" {
type = bool
description = "A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 )"
default = true
}

variable "access_log_bucket_name" {
type = string
default = ""
Expand Down

0 comments on commit 7284ad7

Please sign in to comment.