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
Add support for pushing consul-lambda-registrator public image to p… (#82)
* Add support for pushing `consul-lambda-registrator` public image to private ecr repo through terraform
* fmt tf
* minor readme fix
* addressed review comments
* added fixes and fixed acceptance test
* updated aws provider version
* updated aws provider version
* added force_delete to aws_ecr_repository in test
* fmt tf
* Update modules/lambda-registrator/main.tf
Co-authored-by: Chris Thain <[email protected]>
* Update modules/lambda-registrator/main.tf
Co-authored-by: Chris Thain <[email protected]>
* Update modules/lambda-registrator/variables.tf
Co-authored-by: Chris Thain <[email protected]>
* grouped data sources together
* added review changes
* add some fixes
* test fixes
* minor test fix
* added default "" to test ecr_image_uri
* fmt tf
* Update modules/lambda-registrator/main.tf
Co-authored-by: Chris Thain <[email protected]>
* added validation test
* fixed tf fmt and made validation test parallel
* removed validation test from basic test
* added test case to validate when privateEcrReponame is set
* updated enable_auto_publish_ecr_image var description
* fixed tf fmt
* Update modules/lambda-registrator/variables.tf
Co-authored-by: Chris Thain <[email protected]>
* changed consul_image version in basic_test
---------
Co-authored-by: Chris Thain <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,9 @@ FEATURES
4
4
* Add support for storing parameter values greater than 4 KB. The `lambda-registrator` module and source code have been updated to accept a configurable value for the [SSM parameter tier](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html). This allows users to choose if they want to use the `Advanced` tier feature. Charges apply for the `Advanved` tier so if the tier is not expressly set to `Advanced`, then the `Standard` tier will be used. Using the `Advanced` tier allows for parameter values up to 8 KB. The Lambda-registrator Terraform module can be configured using the new `consul_extension_data_tier` variable.
require_ecr_image_uri_or_enable_auto_publish_ecr_image_set=var.ecr_image_uri==""&& var.enable_auto_publish_ecr_image==false?file("ERROR: either ecr_image_uri or enable_auto_publish_ecr_image must be set") :null
Copy file name to clipboardExpand all lines: modules/lambda-registrator/variables.tf
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,7 @@ variable "ecr_image_uri" {
84
84
repository or configuring pull through cache rules (https://docs.aws.amazon.com/AmazonECR/latest/userguide/pull-through-cache.html).
85
85
EOT
86
86
type=string
87
+
default=""
87
88
}
88
89
89
90
variable"sync_frequency_in_minutes" {
@@ -109,3 +110,39 @@ variable "tags" {
109
110
type=map(string)
110
111
default={}
111
112
}
113
+
114
+
variable"private_ecr_repo_name" {
115
+
description="The name of the repository to republish the ECR image if one exists. If no name is passed, it is assumed that no repository exists and one needs to be created."
116
+
type=string
117
+
default=""
118
+
}
119
+
120
+
variable"consul_lambda_registrator_image" {
121
+
description="The Lambda registrator image to use. Must be provided as <registry/repository:tag>"
error_message="Image format of 'consul_lambda_registrator_image' is invalid. It must be in the format 'registry/repository:tag'."
128
+
}
129
+
}
130
+
131
+
variable"docker_host" {
132
+
description="The docker socket for your system"
133
+
type=string
134
+
default="unix:///var/run/docker.sock"
135
+
}
136
+
137
+
variable"enable_auto_publish_ecr_image" {
138
+
description=<<-EOT
139
+
Enables automatic publishing of a public Lambda Registrator image to a private ECR repository via Docker.
140
+
When enable_auto_publish_ecr_image is set to true, the image defined by consul_lambda_registrator_image will be pulled and published to a private ECR repository. If private_ecr_repo_name is set, that name will be used to create the private ECR repository, otherwise the default name, consul-lambda-registrator-<random-suffix>, will be used
141
+
142
+
You must set at least one of ecr_image_uri or enable_auto_publish_ecr_image. If enable_auto_publish_ecr_image is set to true then ecr_image_uri is ignored.
143
+
144
+
Using this method to automatically pull the public image and push it to a private ECR repository requires access to the docker command in the local environment.
0 commit comments