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.
This commit is contained in:
Robert Fairburn authored and GitHub committed 2025-02-04 10:07:51 -06:00
1 parent ab9ac9862e
commit f378f62db2
186 files changed
+9900 -3

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
# AWS Xrays ECS Sidecar
This addon provides a sidecar for AWS Xrays Opentelemetry to allow Fleet to send traces to AWS Xrays.
+1
View File
@@ -0,0 +1 @@
header-from: .header.md
+36
View File
@@ -0,0 +1,36 @@
# AWS Xrays ECS Sidecar
This addon provides a sidecar for AWS Xrays Opentelemetry to allow Fleet to send traces to AWS Xrays.
## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_iam_policy.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
| [aws_iam_policy_document.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
## Inputs
No inputs.
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_fleet_extra_environment_variables"></a> [fleet\_extra\_environment\_variables](#output\_fleet\_extra\_environment\_variables) | n/a |
| <a name="output_fleet_extra_iam_policies"></a> [fleet\_extra\_iam\_policies](#output\_fleet\_extra\_iam\_policies) | n/a |
| <a name="output_fleet_sidecars"></a> [fleet\_sidecars](#output\_fleet\_sidecars) | n/a |
+35
View File
@@ -0,0 +1,35 @@
data "aws_region" "current" {}
data "aws_iam_policy_document" "main" {
statement {
actions = [
"xray:PutTraceSegments",
"xray:PutTelemetryRecords",
"xray:GetSamplingRules",
"xray:GetSamplingTargets",
"xray:GetSamplingStatisticSummaries",
"logs:PutLogEvents",
"logs:CreateLogStream",
]
resources = ["*"]
}
}
resource "aws_iam_policy" "main" {
policy = data.aws_iam_policy_document.main.json
}
data "aws_iam_policy_document" "execution" {
statement {
actions = [
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:CreateLogGroup",
]
resources = ["*"]
}
}
resource "aws_iam_policy" "execution" {
policy = data.aws_iam_policy_document.execution.json
}
+38
View File
@@ -0,0 +1,38 @@
output "fleet_extra_iam_policies" {
value = [aws_iam_policy.main.arn]
}
output "fleet_extra_execution_iam_policies" {
value = [aws_iam_policy.execution.arn]
}
output "fleet_sidecars" {
value = [
{
"name" : "aws-otel-collector",
"image" : "public.ecr.aws/aws-observability/aws-otel-collector:v0.26.1",
"essential" : true,
"command" : [
"--config=/etc/ecs/ecs-default-config.yaml"
],
"logConfiguration" : {
"logDriver" : "awslogs",
"options" : {
"awslogs-create-group" : "True",
"awslogs-group" : "/ecs/ecs-aws-otel-sidecar-collector",
"awslogs-region" : data.aws_region.current.name,
"awslogs-stream-prefix" : "ecs"
}
}
}
]
}
output "fleet_extra_environment_variables" {
value = {
FLEET_LOGGING_TRACING_ENABLED = "true"
FLEET_LOGGING_TRACING_TYPE = "opentelemetry"
OTEL_SERVICE_NAME = "fleet"
OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317"
}
}
+1
View File
@@ -0,0 +1 @@