# Main terraform - Modified iam `resource "aws_iam_role_policy_attachment" "extras"` from `for_each` to `count`, which allows terraform to apply even if roles are not yet created. In cases where role is not yet created, a second terraform apply is required for the resource to attach the policy. - Modified iam `resource "aws_iam_role_policy_attachment" "execution_extras"`, which allows terraform to apply even if roles are not yet created. In cases where role is not yet created, a second terraform apply is required for the resource to attach the policy. - Added support for internal load balancers to be provisioned. - Added support for toggling deletion protection on and off on the load balancer resource. # Example Module - Updated example module with changes alb changes. # Module: Cloudfront Software Installers - Added a count & tertiary to cloudfront software installer kms key policy, as it's fed in as an input. In cases where the key had not yet been created, apply would fail. - Modified `variable "s3_kms_key_id"` to allow default value `null` # Module: Logging Destination Firehose - Added prefix variable to support use-cases where multiple environments are deployed in the same account # Module: Osquery Perf - Added dependency on `data.aws_secretsmanager_secret_version.enroll_secret` to fix race condition.
35 lines
2.6 KiB
Markdown
35 lines
2.6 KiB
Markdown
# osquery-perf addon
|
|
This addon adds osquery-perf hosts to the Fleet installation.
|
|
These are generally used for loadtesting or other testing purposes. See https://github.com/fleetdm/fleet/tree/main/cmd/osquery-perf to learn more about osquery-perf itself.
|
|
|
|
This addon:
|
|
1. Creates an AWS Secrets Manager secret that will be used to store the enroll secret that the osquery-perf hosts use to enroll into Fleet. AND
|
|
2. Optionally takes a string, `enroll_secret` (string), to create an AWS Secrets Manager secret version, in the AWS Secrets Manager Secret created by the addon. If not specified directly to the module, the secret will need to have its `SecretString` populated with the enroll secret manually once everything is setup in order for the osquery-perf hosts to connect. OR
|
|
3. Optionally takes a AWS Secrets Manager secret ARN, `enroll_secret_arn` (string), for an already existing Secrets Manager secret.
|
|
|
|
If both an `enroll_secret` and an `enroll_secret_arn` are defined, the module will prioritize the `enroll_secret_arn`.
|
|
If neither an `enroll_secret` or an `enroll_secret_arn` are defined, the module will create a placeholder secret, you will need to add a `secret_version` manually and `terraform apply` one more time.
|
|
|
|
Below is an example implementation of the module:
|
|
|
|
```
|
|
module "osquery_perf" {
|
|
source = "github.com/fleetdm/fleet-terraform//addons/osquery-perf?ref=tf-mod-addon-osquery-perf-v1.2.0"
|
|
customer_prefix = "fleet"
|
|
ecs_cluster = module.main.byo-vpc.byo-db.byo-ecs.service.cluster
|
|
subnets = module.main.byo-vpc.byo-db.byo-ecs.service.network_configuration[0].subnets
|
|
security_groups = module.main.byo-vpc.byo-db.byo-ecs.service.network_configuration[0].security_groups
|
|
ecs_iam_role_arn = module.main.byo-vpc.byo-db.byo-ecs.iam_role_arn
|
|
ecs_execution_iam_role_arn = module.main.byo-vpc.byo-db.byo-ecs.execution_iam_role_arn
|
|
server_url = "https://${aws_route53_record.main.fqdn}"
|
|
osquery_perf_image = local.osquery_perf_image
|
|
extra_flags = ["--os_templates", "mac10.14.6,ubuntu_22.04,windows_11"]
|
|
logging_options = module.main.byo-vpc.byo-db.byo-ecs.logging_config
|
|
# Optional - One of enroll_secret or enroll_secret_arn can be used, but neither are required.
|
|
# If neither are passed in, you will need to populate the secret version manually,
|
|
# in the secret that is created by the addon.
|
|
# enroll_secret = "mGNJvwKhs4PIa6ZNxMiXqqBfXKO67n2Y"
|
|
# enroll_secret_arn = "arn:aws:secretsmanager:<region>:<account-id>:secret:<secret-name>"
|
|
}
|
|
```
|