Skip to content

Commit 1e9a644

Browse files
committed
Edit default feature flag and start_command
1 parent 3a8603a commit 1e9a644

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

terraform/ec2/amis.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ variable "ami_family" {
2222
otconfig_destination = "/tmp/ot-default.yml"
2323
download_command_pattern = "wget %s"
2424
install_command = "while sudo fuser /var/cache/apt/archives/lock /var/lib/apt/lists/lock /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend; do echo 'Waiting for dpkg lock...' && sleep 1; done; echo 'No dpkg lock and install collector.' && sudo dpkg -i aws-otel-collector.deb"
25-
start_command = "sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -c \"$(echo -n 'CONFIGURATION_URI_PLACEHOLDER' | base64 -d)\" -f $FEATUREGATE_PLACEHOLDER -a start"
25+
start_command = "sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -c \"$(echo -n 'CONFIGURATION_URI_PLACEHOLDER' | base64 -d)\" -f FEATUREGATE_PLACEHOLDER -a start"
2626
status_command = "sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -a status"
2727
ssm_validate = "sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -a status | grep running"
2828
connection_type = "ssh"
@@ -36,7 +36,7 @@ variable "ami_family" {
3636
otconfig_destination = "/tmp/ot-default.yml"
3737
download_command_pattern = "curl %s --output aws-otel-collector.rpm"
3838
install_command = "sudo rpm -Uvh aws-otel-collector.rpm"
39-
start_command = "sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -c \"$(echo -n 'CONFIGURATION_URI_PLACEHOLDER' | base64 -d)\" -f $FEATUREGATE_PLACEHOLDER -a start"
39+
start_command = "sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -c \"$(echo -n 'CONFIGURATION_URI_PLACEHOLDER' | base64 -d)\" -f FEATUREGATE_PLACEHOLDER -a start"
4040
status_command = "sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -a status"
4141
ssm_validate = "sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -a status | grep running"
4242
connection_type = "ssh"
@@ -50,7 +50,7 @@ variable "ami_family" {
5050
otconfig_destination = "C:\\ot-default.yml"
5151
download_command_pattern = "powershell -command \"Invoke-WebRequest -Uri %s -OutFile C:\\aws-otel-collector.msi\""
5252
install_command = "msiexec /i C:\\aws-otel-collector.msi"
53-
start_command = "powershell -command \"&{ $url = \\\"$([System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String('CONFIGURATION_URI_PLACEHOLDER')))\\\"; . 'C:\\Program Files\\Amazon\\AwsOtelCollector\\aws-otel-collector-ctl.ps1' -ConfigLocation \\\"$url\\\" -FeatureGates $FEATUREGATE_PLACEHOLDER -Action start}\""
53+
start_command = "powershell -command \"&{ $url = \\\"$([System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String('CONFIGURATION_URI_PLACEHOLDER')))\\\"; . 'C:\\Program Files\\Amazon\\AwsOtelCollector\\aws-otel-collector-ctl.ps1' -ConfigLocation \\\"$url\\\" -FeatureGates FEATUREGATE_PLACEHOLDER -Action start}\""
5454
status_command = "powershell \"& 'C:\\Program Files\\Amazon\\AwsOtelCollector\\aws-otel-collector-ctl.ps1' -Action status\""
5555
ssm_validate = "powershell \"& 'C:\\Program Files\\Amazon\\AwsOtelCollector\\aws-otel-collector-ctl.ps1' -Action status\" | findstr running"
5656
connection_type = "winrm"

terraform/ec2/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ resource "null_resource" "collector_file_configuration" {
304304
locals {
305305
configuration_uri = var.configuration_source == "file" ? local.otconfig_destination : module.remote_configuration[0].configuration_uri
306306
// adding default if none provided
307-
feature_gates = var.otconfig_args == [] ? ["--feature-gates=-adot.exporter.datadogexporter.deprecation"][0] : split("--feature-gates=", var.otconfig_args[0])[1]
307+
feature_gates = var.otconfig_args == [] ? ["-adot.exporter.datadogexporter.deprecation"][0] : split("--feature-gates=", var.otconfig_args[0])[1]
308308
// encode the uri used during tests to base64 to avoid problems while this string is sent across the wire on windows.
309309
// we are normalizing this behavior across all operating systems.
310310
command_with_config = replace(

0 commit comments

Comments
 (0)