Skip to content

Commit

Permalink
chore: bump sumologic terraform provider
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek committed Feb 1, 2022
1 parent 96b8bb4 commit acf8f2c
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 20 deletions.
2 changes: 1 addition & 1 deletion deploy/helm/sumologic/conf/cleanup/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export NO_PROXY=${NO_PROXY:=""}
cp /etc/terraform/*.tf /terraform/
cd /terraform || exit 1

terraform init
terraform init -input=false -get=false || terraform init -input=false -upgrade

# shellcheck disable=SC1083
terraform import sumologic_collector.collector {{ template "terraform.collector.name" . }}
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/sumologic/conf/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
sumologic = {
source = "sumologic/sumologic"
version = "~> 2.8.0"
version = "~> 2.11"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
4 changes: 3 additions & 1 deletion deploy/helm/sumologic/conf/setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ function should_create_fields() {
cp /etc/terraform/{locals,main,providers,resources,variables,fields}.tf /terraform/
cd /terraform || exit 1

terraform init
# Fall back to init -upgrade to prevent:
# Error: Inconsistent dependency lock file
terraform init -input=false -get=false || terraform init -input=false -upgrade

# Sumo Logic fields
if should_create_fields ; then
Expand Down
4 changes: 2 additions & 2 deletions tests/helm/terraform/static/all_fields.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ data:
required_providers {
sumologic = {
source = "sumologic/sumologic"
version = "~> 2.8.0"
version = "~> 2.11"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down Expand Up @@ -343,7 +343,7 @@ data:
cp /etc/terraform/{locals,main,providers,resources,variables,fields}.tf /terraform/
cd /terraform || exit 1
terraform init
terraform init -input=false -get=false || terraform init -input=false -upgrade
# Sumo Logic fields
if should_create_fields ; then
Expand Down
4 changes: 2 additions & 2 deletions tests/helm/terraform/static/collector_fields.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ data:
required_providers {
sumologic = {
source = "sumologic/sumologic"
version = "~> 2.8.0"
version = "~> 2.11"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down Expand Up @@ -298,7 +298,7 @@ data:
cp /etc/terraform/{locals,main,providers,resources,variables,fields}.tf /terraform/
cd /terraform || exit 1
terraform init
terraform init -input=false -get=false || terraform init -input=false -upgrade
# Sumo Logic fields
if should_create_fields ; then
Expand Down
4 changes: 2 additions & 2 deletions tests/helm/terraform/static/conditional_sources.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ data:
required_providers {
sumologic = {
source = "sumologic/sumologic"
version = "~> 2.8.0"
version = "~> 2.11"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down Expand Up @@ -225,7 +225,7 @@ data:
cp /etc/terraform/{locals,main,providers,resources,variables,fields}.tf /terraform/
cd /terraform || exit 1
terraform init
terraform init -input=false -get=false || terraform init -input=false -upgrade
# Sumo Logic fields
if should_create_fields ; then
Expand Down
4 changes: 2 additions & 2 deletions tests/helm/terraform/static/custom.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ data:
required_providers {
sumologic = {
source = "sumologic/sumologic"
version = "~> 2.8.0"
version = "~> 2.11"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down Expand Up @@ -225,7 +225,7 @@ data:
cp /etc/terraform/{locals,main,providers,resources,variables,fields}.tf /terraform/
cd /terraform || exit 1
terraform init
terraform init -input=false -get=false || terraform init -input=false -upgrade
# Sumo Logic fields
if should_create_fields ; then
Expand Down
4 changes: 2 additions & 2 deletions tests/helm/terraform/static/default.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ data:
required_providers {
sumologic = {
source = "sumologic/sumologic"
version = "~> 2.8.0"
version = "~> 2.11"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down Expand Up @@ -296,7 +296,7 @@ data:
cp /etc/terraform/{locals,main,providers,resources,variables,fields}.tf /terraform/
cd /terraform || exit 1
terraform init
terraform init -input=false -get=false || terraform init -input=false -upgrade
# Sumo Logic fields
if should_create_fields ; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ data:
required_providers {
sumologic = {
source = "sumologic/sumologic"
version = "~> 2.8.0"
version = "~> 2.11"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down Expand Up @@ -289,7 +289,7 @@ data:
cp /etc/terraform/{locals,main,providers,resources,variables,fields}.tf /terraform/
cd /terraform || exit 1
terraform init
terraform init -input=false -get=false || terraform init -input=false -upgrade
# Sumo Logic fields
if should_create_fields ; then
Expand Down
4 changes: 2 additions & 2 deletions tests/helm/terraform/static/strip_extrapolation.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ data:
required_providers {
sumologic = {
source = "sumologic/sumologic"
version = "~> 2.8.0"
version = "~> 2.11"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down Expand Up @@ -297,7 +297,7 @@ data:
cp /etc/terraform/{locals,main,providers,resources,variables,fields}.tf /terraform/
cd /terraform || exit 1
terraform init
terraform init -input=false -get=false || terraform init -input=false -upgrade
# Sumo Logic fields
if should_create_fields ; then
Expand Down
4 changes: 2 additions & 2 deletions tests/helm/terraform/static/traces.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ data:
required_providers {
sumologic = {
source = "sumologic/sumologic"
version = "~> 2.8.0"
version = "~> 2.11"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down Expand Up @@ -233,7 +233,7 @@ data:
cp /etc/terraform/{locals,main,providers,resources,variables,fields}.tf /terraform/
cd /terraform || exit 1
terraform init
terraform init -input=false -get=false || terraform init -input=false -upgrade
# Sumo Logic fields
if should_create_fields ; then
Expand Down
14 changes: 13 additions & 1 deletion tests/integration/internal/stepfuncs/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ package stepfuncs

import (
"context"
"fmt"
"os"
"path"
"testing"

"github.com/gruntwork-io/terratest/modules/helm"
"github.com/gruntwork-io/terratest/modules/k8s"
"github.com/stretchr/testify/require"
"sigs.k8s.io/e2e-framework/pkg/envconf"
"sigs.k8s.io/e2e-framework/pkg/features"
Expand Down Expand Up @@ -53,7 +55,17 @@ func HelmDependencyUpdateOpt(path string) features.Func {
func HelmInstallOpt(path string, releaseName string) features.Func {
return func(ctx context.Context, t *testing.T, envConf *envconf.Config) context.Context {
ctx = ctxopts.WithHelmRelease(ctx, releaseName)
helm.Install(t, ctxopts.HelmOptions(ctx), path, releaseName)

err := helm.InstallE(t, ctxopts.HelmOptions(ctx), path, releaseName)
if err != nil {
// Print setup job logs if installation failed.
k8s.RunKubectl(t, ctxopts.KubectlOptions(ctx),
"logs", fmt.Sprintf("-ljob-name=%s-sumologic-setup", releaseName),
)

require.NoError(t, err)
}

return ctx
}
}
Expand Down

0 comments on commit acf8f2c

Please sign in to comment.