You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,15 +156,16 @@ Available targets:
156
156
| build_image | Docker image for build environment, e.g. 'aws/codebuild/standard:2.0' or 'aws/codebuild/eb-nodejs-6.10.0-amazonlinux-64:4.0.0'. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html| string |`aws/codebuild/standard:2.0`| no |
157
157
| build_timeout | How long in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed | string |`60`| no |
158
158
| buildspec | Optional buildspec declaration to use for building the project | string | `` | no |
159
-
| cache_bucket_suffix_enabled | The cache bucket generates a random 13 character string to generate a unique bucket name. If set to false it uses terraform-null-label's id value | bool |`true`| no |
160
-
|cache_enabled|If cache_enabled is true, create an S3 bucket for storing codebuild cache inside | bool|`true`| no |
161
-
|cache_expiration_days|How many days should the build cache be kept | string |`7`| no |
159
+
| cache_bucket_suffix_enabled | The cache bucket generates a random 13 character string to generate a unique bucket name. If set to false it uses terraform-null-label's id value. It only works when cache_type is 'S3| bool |`true`| no |
160
+
|cache_expiration_days|How many days should the build cache be kept. It only works when cache_type is 'S3' | string|`7`| no |
161
+
|cache_type|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 | string |`NO_CACHE`| no |
162
162
| delimiter | Delimiter to be used between `name`, `namespace`, `stage`, etc. | string |`-`| no |
163
163
| enabled | A boolean to enable/disable resource creation | bool |`true`| no |
164
164
| environment_variables | A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build | object |`<list>`| no |
| image_repo_name | (Optional) ECR repository name to store the Docker image built by this module. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html| string |`UNSET`| no |
167
167
| image_tag | (Optional) Docker image tag in the ECR repository, e.g. 'latest'. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html| string |`latest`| no |
168
+
| 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) |`<list>`| no |
168
169
| name | Solution name, e.g. 'app' or 'jenkins' | string | - | yes |
169
170
| namespace | Namespace, which could be your organization name, e.g. 'eg' or 'cp' | string | `` | no |
170
171
| privileged_mode | (Optional) If set to true, enables running the Docker daemon inside a Docker container on the CodeBuild instance. Used when building Docker images | bool |`false`| no |
Copy file name to clipboardExpand all lines: docs/terraform.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,16 @@
11
11
| build_image | Docker image for build environment, e.g. 'aws/codebuild/standard:2.0' or 'aws/codebuild/eb-nodejs-6.10.0-amazonlinux-64:4.0.0'. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html| string |`aws/codebuild/standard:2.0`| no |
12
12
| build_timeout | How long in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed | string |`60`| no |
13
13
| buildspec | Optional buildspec declaration to use for building the project | string | `` | no |
14
-
| cache_bucket_suffix_enabled | The cache bucket generates a random 13 character string to generate a unique bucket name. If set to false it uses terraform-null-label's id value | bool |`true`| no |
15
-
|cache_enabled|If cache_enabled is true, create an S3 bucket for storing codebuild cache inside | bool|`true`| no |
16
-
|cache_expiration_days|How many days should the build cache be kept | string |`7`| no |
14
+
| cache_bucket_suffix_enabled | The cache bucket generates a random 13 character string to generate a unique bucket name. If set to false it uses terraform-null-label's id value. It only works when cache_type is 'S3| bool |`true`| no |
15
+
|cache_expiration_days|How many days should the build cache be kept. It only works when cache_type is 'S3' | string|`7`| no |
16
+
|cache_type|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 | string |`NO_CACHE`| no |
17
17
| delimiter | Delimiter to be used between `name`, `namespace`, `stage`, etc. | string |`-`| no |
18
18
| enabled | A boolean to enable/disable resource creation | bool |`true`| no |
19
19
| environment_variables | A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build | object |`<list>`| no |
| image_repo_name | (Optional) ECR repository name to store the Docker image built by this module. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html| string |`UNSET`| no |
22
22
| image_tag | (Optional) Docker image tag in the ECR repository, e.g. 'latest'. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html| string |`latest`| no |
23
+
| 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) |`<list>`| no |
23
24
| name | Solution name, e.g. 'app' or 'jenkins' | string | - | yes |
24
25
| namespace | Namespace, which could be your organization name, e.g. 'eg' or 'cp' | string | `` | no |
25
26
| privileged_mode | (Optional) If set to true, enables running the Docker daemon inside a Docker container on the CodeBuild instance. Used when building Docker images | bool |`false`| no |
description="A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build"
35
35
}
36
36
37
-
variable"cache_enabled" {
38
-
type=bool
39
-
description="If cache_enabled is true, create an S3 bucket for storing codebuild cache inside"
37
+
variable"cache_expiration_days" {
38
+
type=number
39
+
description="How many days should the build cache be kept. It only works when cache_type is 'S3'"
40
40
}
41
41
42
42
variable"cache_bucket_suffix_enabled" {
43
43
type=bool
44
44
description="The cache bucket generates a random 13 character string to generate a unique bucket name. If set to false it uses terraform-null-label's id value"
45
45
}
46
+
47
+
variable"cache_type" {
48
+
type=string
49
+
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"
Copy file name to clipboardExpand all lines: variables.tf
+14-8Lines changed: 14 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -37,21 +37,27 @@ variable "enabled" {
37
37
description="A boolean to enable/disable resource creation"
38
38
}
39
39
40
-
variable"cache_enabled" {
41
-
type=bool
42
-
default=true
43
-
description="If cache_enabled is true, create an S3 bucket for storing codebuild cache inside"
44
-
}
45
-
46
40
variable"cache_expiration_days" {
47
41
default=7
48
-
description="How many days should the build cache be kept"
42
+
description="How many days should the build cache be kept. It only works when cache_type is 'S3'"
49
43
}
50
44
51
45
variable"cache_bucket_suffix_enabled" {
52
46
type=bool
53
47
default=true
54
-
description="The cache bucket generates a random 13 character string to generate a unique bucket name. If set to false it uses terraform-null-label's id value"
48
+
description="The cache bucket generates a random 13 character string to generate a unique bucket name. If set to false it uses terraform-null-label's id value. It only works when cache_type is 'S3"
49
+
}
50
+
51
+
variable"cache_type" {
52
+
type=string
53
+
default="NO_CACHE"
54
+
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"
55
+
}
56
+
57
+
variable"local_cache_modes" {
58
+
type=list(string)
59
+
default=[]
60
+
description="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"
0 commit comments