From eb788730bb46711605e357d019beb61565c93816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 13 Jun 2024 12:59:49 +0200 Subject: [PATCH 1/3] fix(cleanup): use correct Secret name --- deploy/helm/sumologic/conf/cleanup/cleanup.sh | 1 + deploy/helm/sumologic/templates/cleanup/job.yaml | 2 +- tests/helm/testdata/goldenfile/cleanup/basic.output.yaml | 2 +- .../goldenfile/cleanup/sumologic-mock-no-secret.output.yaml | 2 +- .../helm/testdata/goldenfile/cleanup/sumologic-mock.output.yaml | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/deploy/helm/sumologic/conf/cleanup/cleanup.sh b/deploy/helm/sumologic/conf/cleanup/cleanup.sh index 9d88d45ef..7dfaa9976 100755 --- a/deploy/helm/sumologic/conf/cleanup/cleanup.sh +++ b/deploy/helm/sumologic/conf/cleanup/cleanup.sh @@ -15,6 +15,7 @@ readonly NAMESPACE="${NAMESPACE:?}" # Set variables for terraform export TF_VAR_collector_name="${SUMOLOGIC_COLLECTOR_NAME}" +export TF_VAR_secret_name="${SUMOLOGIC_SECRET_NAME}" export TF_VAR_chart_version="${CHART_VERSION:?}" export TF_VAR_namespace_name="${NAMESPACE:?}" diff --git a/deploy/helm/sumologic/templates/cleanup/job.yaml b/deploy/helm/sumologic/templates/cleanup/job.yaml index d4168d21f..7f0387826 100644 --- a/deploy/helm/sumologic/templates/cleanup/job.yaml +++ b/deploy/helm/sumologic/templates/cleanup/job.yaml @@ -50,7 +50,7 @@ spec: command: ["/etc/terraform/cleanup.sh"] envFrom: - secretRef: - name: {{ .Values.sumologic.envFromSecret | default (include "sumologic.metadata.name.setup.secret" .)}} + name: {{ .Values.sumologic.envFromSecret | default (include "sumologic.metadata.name.cleanup.secret" .)}} env: - name: NAMESPACE valueFrom: diff --git a/tests/helm/testdata/goldenfile/cleanup/basic.output.yaml b/tests/helm/testdata/goldenfile/cleanup/basic.output.yaml index 1b9c41e4e..e56e0c172 100644 --- a/tests/helm/testdata/goldenfile/cleanup/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/cleanup/basic.output.yaml @@ -49,7 +49,7 @@ spec: command: ["/etc/terraform/cleanup.sh"] envFrom: - secretRef: - name: RELEASE-NAME-sumologic-setup + name: RELEASE-NAME-sumologic-cleanup env: - name: NAMESPACE valueFrom: diff --git a/tests/helm/testdata/goldenfile/cleanup/sumologic-mock-no-secret.output.yaml b/tests/helm/testdata/goldenfile/cleanup/sumologic-mock-no-secret.output.yaml index d7efd0bc8..58a8b0397 100644 --- a/tests/helm/testdata/goldenfile/cleanup/sumologic-mock-no-secret.output.yaml +++ b/tests/helm/testdata/goldenfile/cleanup/sumologic-mock-no-secret.output.yaml @@ -49,7 +49,7 @@ spec: command: ["/etc/terraform/cleanup.sh"] envFrom: - secretRef: - name: RELEASE-NAME-sumologic-setup + name: RELEASE-NAME-sumologic-cleanup env: - name: NAMESPACE valueFrom: diff --git a/tests/helm/testdata/goldenfile/cleanup/sumologic-mock.output.yaml b/tests/helm/testdata/goldenfile/cleanup/sumologic-mock.output.yaml index f04419b47..4bcad143d 100644 --- a/tests/helm/testdata/goldenfile/cleanup/sumologic-mock.output.yaml +++ b/tests/helm/testdata/goldenfile/cleanup/sumologic-mock.output.yaml @@ -49,7 +49,7 @@ spec: command: ["/etc/terraform/cleanup.sh"] envFrom: - secretRef: - name: RELEASE-NAME-sumologic-setup + name: RELEASE-NAME-sumologic-cleanup env: - name: NAMESPACE valueFrom: From 5b882745b4f12898257b95434517020de40ecfd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 13 Jun 2024 14:50:31 +0200 Subject: [PATCH 2/3] chore(setup): don't use templating for Terraform imports --- deploy/helm/sumologic/conf/setup/setup.sh | 21 +++---------------- .../templates/cleanup/configmap.yaml | 2 +- .../terraform/all_fields.output.yaml | 20 +++--------------- .../terraform/collector_fields.output.yaml | 19 +++-------------- .../terraform/conditional_sources.output.yaml | 4 +++- .../goldenfile/terraform/custom.output.yaml | 4 +++- .../goldenfile/terraform/default.output.yaml | 19 +++-------------- .../disable_default_metrics.output.yaml | 18 +++------------- .../terraform/disabled_dashboards.output.yaml | 19 +++-------------- .../terraform/disabled_monitors.output.yaml | 19 +++-------------- .../terraform/logs_fields.output.yaml | 19 +++-------------- ...itors_with_email_notifications.output.yaml | 19 +++-------------- .../monitors_with_single_email.output.yaml | 19 +++-------------- .../terraform/strip_extrapolation.output.yaml | 19 +++-------------- .../goldenfile/terraform/traces.output.yaml | 7 +++---- .../tracing-metrics-disabled.output.yaml | 19 +++-------------- 16 files changed, 46 insertions(+), 201 deletions(-) diff --git a/deploy/helm/sumologic/conf/setup/setup.sh b/deploy/helm/sumologic/conf/setup/setup.sh index a3eeb4685..25185fb75 100755 --- a/deploy/helm/sumologic/conf/setup/setup.sh +++ b/deploy/helm/sumologic/conf/setup/setup.sh @@ -131,24 +131,9 @@ fi # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then -true # prevent to render empty if; then -{{- $ctx := .Values -}} -{{- range $type, $sources := .Values.sumologic.collector.sources }} -{{- if eq (include "terraform.sources.component_enabled" (dict "Values" $ctx "Type" $type)) "true" }} -{{- range $key, $source := $sources }} -{{- if eq (include "terraform.sources.to_create" (dict "Context" $ctx "Type" $type "Name" $key)) "true" }} -terraform import sumologic_http_source.{{ template "terraform.sources.name" (dict "Name" $key "Type" $type) }} "${SUMOLOGIC_COLLECTOR_NAME}/{{ $source.name }}" -{{- end }} -{{- end }} -{{- else if and (eq $type "metrics") $ctx.sumologic.traces.enabled }} -{{- /* -If traces are enabled and metrics are disabled, create default metrics source anyway -*/}} -{{- if hasKey $sources "default" }} -terraform import sumologic_http_source.{{ template "terraform.sources.name" (dict "Name" "default" "Type" $type) }} "${SUMOLOGIC_COLLECTOR_NAME}/{{ $sources.default.name }}" -{{- end }} -{{- end }} -{{- end }} + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/deploy/helm/sumologic/templates/cleanup/configmap.yaml b/deploy/helm/sumologic/templates/cleanup/configmap.yaml index 5a9dbdf4f..800d14f4a 100644 --- a/deploy/helm/sumologic/templates/cleanup/configmap.yaml +++ b/deploy/helm/sumologic/templates/cleanup/configmap.yaml @@ -11,5 +11,5 @@ metadata: {{- include "sumologic.labels.common" . | nindent 4 }} data: {{- (tpl (.Files.Glob "conf/cleanup/cleanup.sh").AsConfig .) | nindent 2 }} - {{- (tpl (.Files.Glob "conf/setup/{locals,main,providers,resources,variables}.tf").AsConfig .) | nindent 2 }} + {{- (tpl (.Files.Glob "conf/setup/*").AsConfig .) | nindent 2 }} {{- end }} diff --git a/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml index 7954d7615..fa700af23 100644 --- a/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml @@ -482,23 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.test_source_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(Test source)" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml index b57792f82..e91b1b016 100644 --- a/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml @@ -482,22 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml b/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml index 9b96591ee..840a7fd89 100644 --- a/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml @@ -482,7 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/custom.output.yaml b/tests/helm/testdata/goldenfile/terraform/custom.output.yaml index 9b96591ee..840a7fd89 100644 --- a/tests/helm/testdata/goldenfile/terraform/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/custom.output.yaml @@ -482,7 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/default.output.yaml b/tests/helm/testdata/goldenfile/terraform/default.output.yaml index de0e7d0f6..6e2f30fe4 100644 --- a/tests/helm/testdata/goldenfile/terraform/default.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/default.output.yaml @@ -482,22 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml b/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml index 4259207f9..1f16175d7 100644 --- a/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml @@ -482,21 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml b/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml index 513e4037a..3c824bd3a 100644 --- a/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml @@ -482,22 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml b/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml index 957afcf69..cf25ff6a1 100644 --- a/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml @@ -482,22 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml index d4a4a39ea..446b39303 100644 --- a/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml @@ -482,22 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml b/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml index 148a51c2c..d832d3e52 100644 --- a/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml @@ -488,22 +488,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml b/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml index d1018ec4e..bcaf18823 100644 --- a/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml @@ -488,22 +488,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml b/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml index e5fa04e9d..ed350ba9f 100644 --- a/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml @@ -483,22 +483,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/traces.output.yaml b/tests/helm/testdata/goldenfile/terraform/traces.output.yaml index 907ac2443..b01931d84 100644 --- a/tests/helm/testdata/goldenfile/terraform/traces.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/traces.output.yaml @@ -482,10 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret diff --git a/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml b/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml index de0e7d0f6..6e2f30fe4 100644 --- a/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml @@ -482,22 +482,9 @@ data: # Sumo Logic Collector and HTTP sources # Only import sources when collector exists. if terraform import sumologic_collector.collector "${SUMOLOGIC_COLLECTOR_NAME}"; then - true # prevent to render empty if; then - terraform import sumologic_http_source.default_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events" - terraform import sumologic_http_source.default_otlp_events_source "${SUMOLOGIC_COLLECTOR_NAME}/events-otlp" - terraform import sumologic_http_source.default_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs" - terraform import sumologic_http_source.default_otlp_logs_source "${SUMOLOGIC_COLLECTOR_NAME}/logs-otlp" - terraform import sumologic_http_source.apiserver_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/apiserver-metrics" - terraform import sumologic_http_source.control_plane_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/control-plane-metrics" - terraform import sumologic_http_source.controller_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-controller-manager-metrics" - terraform import sumologic_http_source.default_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/(default-metrics)" - terraform import sumologic_http_source.default_otlp_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/metrics-otlp" - terraform import sumologic_http_source.kubelet_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kubelet-metrics" - terraform import sumologic_http_source.node_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/node-exporter-metrics" - terraform import sumologic_http_source.scheduler_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-scheduler-metrics" - terraform import sumologic_http_source.state_metrics_source "${SUMOLOGIC_COLLECTOR_NAME}/kube-state-metrics" - terraform import sumologic_http_source.default_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces" - terraform import sumologic_http_source.default_otlp_traces_source "${SUMOLOGIC_COLLECTOR_NAME}/traces-otlp" + jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do + terraform import "sumologic_http_source.${resource_name}" "${SUMOLOGIC_COLLECTOR_NAME}/${source_name}" + done fi # Kubernetes Secret From 8fc9d2a50b990c1aae7a58502aa8e9944ff86510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 13 Jun 2024 16:39:13 +0200 Subject: [PATCH 3/3] chore(setup): fix generated Secret attributes --- deploy/helm/sumologic/conf/setup/resources.tf | 1 + tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml | 1 + .../testdata/goldenfile/terraform/collector_fields.output.yaml | 1 + .../goldenfile/terraform/conditional_sources.output.yaml | 1 + tests/helm/testdata/goldenfile/terraform/custom.output.yaml | 1 + tests/helm/testdata/goldenfile/terraform/default.output.yaml | 1 + .../goldenfile/terraform/disable_default_metrics.output.yaml | 1 + .../goldenfile/terraform/disabled_dashboards.output.yaml | 1 + .../testdata/goldenfile/terraform/disabled_monitors.output.yaml | 1 + tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml | 1 + .../terraform/monitors_with_email_notifications.output.yaml | 1 + .../goldenfile/terraform/monitors_with_single_email.output.yaml | 1 + .../goldenfile/terraform/strip_extrapolation.output.yaml | 1 + tests/helm/testdata/goldenfile/terraform/traces.output.yaml | 1 + .../goldenfile/terraform/tracing-metrics-disabled.output.yaml | 1 + 15 files changed, 15 insertions(+) diff --git a/deploy/helm/sumologic/conf/setup/resources.tf b/deploy/helm/sumologic/conf/setup/resources.tf index 6fb7e790b..3e7351d0d 100644 --- a/deploy/helm/sumologic/conf/setup/resources.tf +++ b/deploy/helm/sumologic/conf/setup/resources.tf @@ -15,4 +15,5 @@ resource "kubernetes_secret" "sumologic_collection_secret" { } type = "Opaque" + wait_for_service_account_token = false } diff --git a/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml index fa700af23..80b080b15 100644 --- a/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml index e91b1b016..d906b1477 100644 --- a/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml b/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml index 840a7fd89..0ab89e624 100644 --- a/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/custom.output.yaml b/tests/helm/testdata/goldenfile/terraform/custom.output.yaml index 840a7fd89..0ab89e624 100644 --- a/tests/helm/testdata/goldenfile/terraform/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/custom.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/default.output.yaml b/tests/helm/testdata/goldenfile/terraform/default.output.yaml index 6e2f30fe4..2b103c31f 100644 --- a/tests/helm/testdata/goldenfile/terraform/default.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/default.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml b/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml index 1f16175d7..39258952c 100644 --- a/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml b/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml index 3c824bd3a..71a62bbda 100644 --- a/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml b/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml index cf25ff6a1..7e11a674a 100644 --- a/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml index 446b39303..2fab380e6 100644 --- a/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml b/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml index d832d3e52..601e0c12c 100644 --- a/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml @@ -353,6 +353,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml b/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml index bcaf18823..c8aba4c2e 100644 --- a/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml @@ -353,6 +353,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml b/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml index ed350ba9f..74d8e860d 100644 --- a/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml @@ -348,6 +348,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/traces.output.yaml b/tests/helm/testdata/goldenfile/terraform/traces.output.yaml index b01931d84..15e6f0c8f 100644 --- a/tests/helm/testdata/goldenfile/terraform/traces.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/traces.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash diff --git a/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml b/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml index 6e2f30fe4..2b103c31f 100644 --- a/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml @@ -347,6 +347,7 @@ data: } type = "Opaque" + wait_for_service_account_token = false } setup.sh: | #!/bin/bash