This will be needed to make the initial tags. Once merged to main, I will tag with the same module revisions as what exists in the Fleet repo. We can then test the example module using the new settings. Once validated, we'll then update the main fleet repo to redirect here for /terraform and remove everything there. Anything referring to old tags will still work in-place. Additionally any website references will be updated as well to reflect these changes.
34 lines
1.2 KiB
Markdown
34 lines
1.2 KiB
Markdown
# Private Container Image Registry
|
|
|
|
This addon will provision the correct IAM policy to attach to the Fleet config for the ECS task definition
|
|
to utilize private registry credentials when pulling container images.
|
|
|
|
## Using a private container image repository
|
|
|
|
First create an AWS Secrets Manager Secret with your preferred method, for example:
|
|
```shell
|
|
aws secretsmanager create-secret --name MyRegistryCredentials \
|
|
--description "Private registry credentials" \
|
|
--secret-string '{"username":"<your_username>","password":"<your_password>"}'
|
|
```
|
|
|
|
Then provide this secret's ARN as the input to the variable `secret_arn`.
|
|
|
|
### Using in Fleet Config
|
|
|
|
```hcl
|
|
module "private-auth" {
|
|
source = "github.com/fleetdm/fleet-terraform//addons/private-registry"
|
|
secret_arn = "arn:aws:secretsmanager:us-east-2:123456789:secret:MyRegistryCredentials"
|
|
}
|
|
|
|
module "main" {
|
|
source = "github.com/fleetdm/fleet-terraform/"
|
|
fleet_config = {
|
|
# other fleet configs
|
|
extra_execution_iam_policies = concat(module.private-auth.extra_execution_iam_policies /*, additional execution policies*/)
|
|
repository_credentials = "arn:aws:secretsmanager:us-east-2:123456789:secret:MyRegistryCredentials"
|
|
}
|
|
}
|
|
```
|