-
-
Notifications
You must be signed in to change notification settings - Fork 0
remove datadog lookup #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update modifies how Datadog API and App keys are managed in Terraform. It introduces new variables for SSM parameter names and the Datadog site, adds conditional data sources for retrieving keys from AWS SSM Parameter Store, and removes the external Datadog configuration module. Key references are updated to use these new data sources and variables. Changes
Sequence Diagram(s)sequenceDiagram
participant Terraform
participant AWS SSM
participant Datadog Agent Sidecar
Terraform->>AWS SSM: Retrieve datadog_api_key (if SSM parameter name provided)
Terraform->>AWS SSM: Retrieve datadog_app_key (if SSM parameter name provided)
Terraform->>Datadog Agent Sidecar: Pass API key and site from SSM/variable
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Important Do not edit the Please update the Could you fix it @Benbentwo? 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
src/datadog-agent.tf (1)
69-82
: Guard SSM lookup in FireLens configurationUnconditionally using
one(data.aws_ssm_parameter.datadog_api_key[*].value)
whendatadog_agent_sidecar_enabled
may cause errors if the SSM param name is null or incorrect.
Wrap theone(...)
call in a conditional that also checks the data source count or validate the input earlier.
🧹 Nitpick comments (1)
src/datadog-agent.tf (1)
119-122
: Map environment variables for Datadog API key and siteYou’ve updated
DD_API_KEY
andDD_SITE
correctly. Consider also mapping the App key (if required) to an environment variable likeDD_APP_KEY
.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/README.md
(0 hunks)src/cloud-map.tf
(2 hunks)src/context.tf
(1 hunks)src/datadog-agent.tf
(7 hunks)src/main.tf
(6 hunks)src/remote-state.tf
(10 hunks)
💤 Files with no reviewable changes (1)
- src/README.md
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: component / terraform / Lint (./src)
- GitHub Check: Summary
🔇 Additional comments (9)
src/context.tf (1)
267-268
: Formatting only: indentation adjustment in descriptor_formats descriptionThe indentation of
format
andlabels
has been updated for consistency without changing behavior.src/main.tf (1)
86-87
: Module version downgradesMultiple Cloud Posse modules (
cloudwatch-logs
,ecs-container-definition
,ecs-alb-service-task
,alb-ingress
,ecs-cloudwatch-autoscaling
,ecs-cloudwatch-sns-alarms
) have been pinned to earlier versions for alignment. No functional changes were introduced.
Ensureterraform init
andterraform plan
succeed and verify compatibility across your stack.Also applies to: 185-186, 257-258, 345-346, 446-447, 478-479
src/cloud-map.tf (1)
7-7
: Downgraded remote-state module version to 1.5.0The
cloudposse/stack-config/yaml//modules/remote-state
source has been reverted to1.5.0
in both namespace and service discovery blocks. Confirm there are no breaking changes from the previous1.8.0
.Also applies to: 28-28
src/remote-state.tf (1)
57-59
: Uniform remote-state module downgrades to 1.5.0Across multiple components (
vpc
,security_group
,rds
,ecs_cluster
,alb
,nlb
,s3
,service_domain
,iam_role
,efs
), the version ofcloudposse/stack-config/yaml//modules/remote-state
has been rolled back from1.8.0
to1.5.0
. Please validate remote-state initialization and outputs after this change.Also applies to: 68-70, 78-80, 86-88, 95-97, 106-109, 116-118, 128-131, 164-167, 176-179
src/datadog-agent.tf (5)
25-29
: Add variable for Datadog siteThe
datadog_site
variable (default"us5.datadoghq.com"
) is introduced correctly. No issues observed.
49-53
: SSM parameter data sourcesThe
aws_ssm_parameter
data blocks for both API and App keys are correctly gated on the presence of variable values and sidecar enablement.Also applies to: 55-59
85-88
: Module version pin for sidecar logsDowngraded
cloudposse/cloudwatch-logs/aws
to0.6.6
. This aligns with other version changes and does not affect core logic.
107-110
: Module version pin for Datadog agent containerThe Datadog agent container definition has been downgraded to
0.58.1
. Looks good.
155-158
: Module version pin for Fluent Bit containerDowngraded
ecs-container-definition/aws
to0.58.1
for the Fluent Bit router. All good.
These changes were released in v2.0.0. |
what
datadog_configuration
componentwhy
Summary by CodeRabbit
New Features
Chores