Skip to content

Conversation

Jno21
Copy link
Contributor

@Jno21 Jno21 commented Oct 11, 2025

This PR adds a backwards-compatible feature that simplifies deployment across multiple AWS regions by leveraging the new region argument capability introduced in AWS Provider v6.

Implementation

New optional variable: region

  • Allows explicit control over which AWS region the Datadog Forwarder is deployed to
  • When omitted, defaults to the provider's configured region (maintains backwards compatibility)
  • Enables deploying multiple forwarder instances in different regions without provider aliasing

Tests

Add multi_region.tftest.hcl:

  • test that region is properly set
  • test that applies on different regions don't conflict (IAM roles, etc.)
terraform test

tests/default_config.tftest.hcl... in progress
  run "default_config_test"... pass
  run "environment_variables_test"... pass
tests/default_config.tftest.hcl... tearing down
tests/default_config.tftest.hcl... pass
tests/enhanced_features.tftest.hcl... in progress
  run "enhanced_features_test"... pass
  run "enhanced_features_env_vars_test"... pass
tests/enhanced_features.tftest.hcl... tearing down
tests/enhanced_features.tftest.hcl... pass
tests/existing_resources.tftest.hcl... in progress
  run "existing_resources_test"... pass
tests/existing_resources.tftest.hcl... tearing down
tests/existing_resources.tftest.hcl... pass
tests/multi_region.tftest.hcl... in progress
  run "multi_region_us_east_1"... pass
  run "multi_region_us_east_2"... pass
  run "multi_region_us_east_1_existing_resources"... pass
  run "multi_region_us_east_2_existing_resources"... pass
tests/multi_region.tftest.hcl... tearing down
tests/multi_region.tftest.hcl... pass
tests/optional_env_vars.tftest.hcl... in progress
  run "optional_env_vars_test"... pass
tests/optional_env_vars.tftest.hcl... tearing down
tests/optional_env_vars.tftest.hcl... pass
tests/vpc_config.tftest.hcl... in progress
  run "vpc_configuration_test"... pass
tests/vpc_config.tftest.hcl... tearing down
tests/vpc_config.tftest.hcl... pass

@Jno21 Jno21 requested review from a team as code owners October 11, 2025 11:46
@RaphaelAllier
Copy link
Member

Thanks for contribution ! We're reviewing this internally and will get back to you

@ktmq ktmq self-assigned this Oct 14, 2025
Copy link
Contributor

@ktmq ktmq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is awesome, thanks so much @Jno21 ! we'll include this in v1.0.3 🙌

@ktmq ktmq merged commit 9ed5413 into DataDog:main Oct 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants