Files
Robert Fairburn f378f62db2 Initial migration (#1)
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.
2025-02-04 10:07:51 -06:00
..
2025-02-04 10:07:51 -06:00
2025-02-04 10:07:51 -06:00
2025-02-04 10:07:51 -06:00
2025-02-04 10:07:51 -06:00
2025-02-04 10:07:51 -06:00
2025-02-04 10:07:51 -06:00

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:

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

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"
  }
}

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

No modules.

Resources

Name Type
aws_iam_policy.main resource
aws_iam_policy_document.main data source

Inputs

Name Description Type Default Required
secret_arn ARN of the AWS Secrets Manager secret that stores the private registry credentials string n/a yes

Outputs

Name Description
extra_execution_iam_policies n/a
secret_arn n/a