Skip to content

Commit

Permalink
chore(deps): update terraform cloudposse/efs/aws to v0.32.7 (#86)
Browse files Browse the repository at this point in the history
* chore(deps): update terraform cloudposse/efs/aws to v0.32.7

* Auto Format

* Add random

* Update versions.tf

* Update versions.tf

* Auto Format

* Update examples_complete_test.go

* Update main.tf

* Ensure attributes are part of outputs check

* Bump terratest and testify

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 21, 2022
1 parent 4ae2c93 commit 53f8437
Show file tree
Hide file tree
Showing 8 changed files with 466 additions and 381 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Available targets:

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.0 |

## Providers
Expand All @@ -246,7 +246,7 @@ Available targets:
|------|--------|---------|
| <a name="module_cicd"></a> [cicd](#module\_cicd) | cloudposse/cicd/aws | 0.12.0 |
| <a name="module_ecr"></a> [ecr](#module\_ecr) | cloudposse/ecr/aws | 0.34.0 |
| <a name="module_efs"></a> [efs](#module\_efs) | cloudposse/efs/aws | 0.25.0 |
| <a name="module_efs"></a> [efs](#module\_efs) | cloudposse/efs/aws | 0.32.7 |
| <a name="module_efs_backup"></a> [efs\_backup](#module\_efs\_backup) | cloudposse/backup/aws | 0.13.1 |
| <a name="module_elastic_beanstalk_application"></a> [elastic\_beanstalk\_application](#module\_elastic\_beanstalk\_application) | cloudposse/elastic-beanstalk-application/aws | 0.11.1 |
| <a name="module_elastic_beanstalk_environment"></a> [elastic\_beanstalk\_environment](#module\_elastic\_beanstalk\_environment) | cloudposse/elastic-beanstalk-environment/aws | 0.36.1 |
Expand Down
4 changes: 2 additions & 2 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.0 |

## Providers
Expand All @@ -18,7 +18,7 @@
|------|--------|---------|
| <a name="module_cicd"></a> [cicd](#module\_cicd) | cloudposse/cicd/aws | 0.12.0 |
| <a name="module_ecr"></a> [ecr](#module\_ecr) | cloudposse/ecr/aws | 0.34.0 |
| <a name="module_efs"></a> [efs](#module\_efs) | cloudposse/efs/aws | 0.25.0 |
| <a name="module_efs"></a> [efs](#module\_efs) | cloudposse/efs/aws | 0.32.7 |
| <a name="module_efs_backup"></a> [efs\_backup](#module\_efs\_backup) | cloudposse/backup/aws | 0.13.1 |
| <a name="module_elastic_beanstalk_application"></a> [elastic\_beanstalk\_application](#module\_elastic\_beanstalk\_application) | cloudposse/elastic-beanstalk-application/aws | 0.11.1 |
| <a name="module_elastic_beanstalk_environment"></a> [elastic\_beanstalk\_environment](#module\_elastic\_beanstalk\_environment) | cloudposse/elastic-beanstalk-environment/aws | 0.36.1 |
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 0.13.0"
required_version = ">= 0.14.0"

required_providers {
aws = {
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ module "ecr" {
# EFS to store Jenkins state (settings, jobs, etc.)
module "efs" {
source = "cloudposse/efs/aws"
version = "0.25.0"
version = "0.32.7"
attributes = ["efs"]
region = var.region
vpc_id = var.vpc_id
subnets = var.application_subnets
zone_id = var.dns_zone_id
zone_id = [var.dns_zone_id]

# EC2 instances (from `elastic_beanstalk_environment`) are allowed to connect to the EFS
security_groups = [module.elastic_beanstalk_environment.security_group_id]
Expand Down
27 changes: 18 additions & 9 deletions test/src/examples_complete_test.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
package test

import (
"strings"
"testing"

"github.com/gruntwork-io/terratest/modules/random"
"github.com/gruntwork-io/terratest/modules/terraform"
"github.com/stretchr/testify/assert"
)

// Test the Terraform module in examples/complete using Terratest.
func TestExamplesComplete(t *testing.T) {
t.Parallel()
randID := strings.ToLower(random.UniqueId())
attributes := []string{randID}
varFiles := []string{"fixtures.us-east-2.tfvars"}

terraformOptions := &terraform.Options{
// The path to where our Terraform code is located
TerraformDir: "../../examples/complete",
Upgrade: true,
// Variables to pass to our Terraform code using -var-file options
VarFiles: []string{"fixtures.us-east-2.tfvars"},
VarFiles: varFiles,
Vars: map[string]interface{}{
"attributes": attributes,
},
}

// At the end of the test, run `terraform destroy` to clean up any resources that were created
Expand Down Expand Up @@ -61,12 +70,12 @@ func TestExamplesComplete(t *testing.T) {
// Run `terraform output` to get the value of an output variable
elasticBeanstalkApplicationName := terraform.Output(t, terraformOptions, "elastic_beanstalk_application_name")
// Verify we're getting back the outputs we expect
assert.Equal(t, "eg-test-jenkins-app", elasticBeanstalkApplicationName)
assert.Equal(t, "eg-test-jenkins-"+randID+"-app", elasticBeanstalkApplicationName)

// Run `terraform output` to get the value of an output variable
elasticBeanstalkEnvironmentName := terraform.Output(t, terraformOptions, "elastic_beanstalk_environment_name")
// Verify we're getting back the outputs we expect
assert.Equal(t, "eg-test-jenkins-env", elasticBeanstalkEnvironmentName)
assert.Equal(t, "eg-test-jenkins-"+randID+"-env", elasticBeanstalkEnvironmentName)

// Run `terraform output` to get the value of an output variable
elasticBeanstalkEnvironmentHostname := terraform.Output(t, terraformOptions, "elastic_beanstalk_environment_hostname")
Expand All @@ -76,22 +85,22 @@ func TestExamplesComplete(t *testing.T) {
// Run `terraform output` to get the value of an output variable
ecrRepositoryName := terraform.Output(t, terraformOptions, "ecr_repository_name")
// Verify we're getting back the outputs we expect
assert.Equal(t, "eg-test-jenkins", ecrRepositoryName)
assert.Equal(t, "eg-test-jenkins-"+randID, ecrRepositoryName)

// Run `terraform output` to get the value of an output variable
codebuildProjectName := terraform.Output(t, terraformOptions, "codebuild_project_name")
// Verify we're getting back the outputs we expect
assert.Equal(t, "eg-test-jenkins-build-cicd", codebuildProjectName)
assert.Equal(t, "eg-test-jenkins-build-"+randID+"-cicd", codebuildProjectName)

// Run `terraform output` to get the value of an output variable
codebuildCacheBucketName := terraform.Output(t, terraformOptions, "codebuild_cache_bucket_name")
// Verify we're getting back the outputs we expect
assert.Contains(t, codebuildCacheBucketName, "eg-test-jenkins-build-cicd")
assert.Contains(t, codebuildCacheBucketName, "eg-test-jenkins-build-"+randID+"-cicd")

// Run `terraform output` to get the value of an output variable
codepipelineId := terraform.Output(t, terraformOptions, "codepipeline_id")
// Verify we're getting back the outputs we expect
assert.Equal(t, "eg-test-jenkins-cicd", codepipelineId)
assert.Equal(t, "eg-test-jenkins-"+randID+"-cicd", codepipelineId)

// Run `terraform output` to get the value of an output variable
efsArn := terraform.Output(t, terraformOptions, "efs_arn")
Expand All @@ -106,10 +115,10 @@ func TestExamplesComplete(t *testing.T) {
// Run `terraform output` to get the value of an output variable
efsBackupVaultArn := terraform.Output(t, terraformOptions, "efs_backup_vault_arn")
// Verify we're getting back the outputs we expect
assert.Equal(t, "arn:aws:backup:us-east-2:126450723953:backup-vault:eg-test-jenkins-efs", efsBackupVaultArn)
assert.Equal(t, "arn:aws:backup:us-east-2:126450723953:backup-vault:eg-test-jenkins-"+randID+"-efs", efsBackupVaultArn)

// Run `terraform output` to get the value of an output variable
efsBackupVaultId := terraform.Output(t, terraformOptions, "efs_backup_vault_id")
// Verify we're getting back the outputs we expect
assert.Equal(t, "eg-test-jenkins-efs", efsBackupVaultId)
assert.Equal(t, "eg-test-jenkins-"+randID+"-efs", efsBackupVaultId)
}
56 changes: 53 additions & 3 deletions test/src/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,58 @@
module github.com/cloudposse/terraform-aws-jenkins

go 1.14
go 1.17

require (
github.com/gruntwork-io/terratest v0.30.23
github.com/stretchr/testify v1.6.1
github.com/gruntwork-io/terratest v0.40.16
github.com/stretchr/testify v1.7.0
)

require (
cloud.google.com/go v0.83.0 // indirect
cloud.google.com/go/storage v1.10.0 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/aws/aws-sdk-go v1.40.56 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.6.1 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.3.0 // indirect
github.com/hashicorp/hcl/v2 v2.9.1 // indirect
github.com/hashicorp/terraform-json v0.13.0 // indirect
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/klauspost/compress v1.13.0 // indirect
github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/tmccombs/hcl2json v0.3.3 // indirect
github.com/ulikunitz/xz v0.5.8 // indirect
github.com/zclconf/go-cty v1.9.1 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/tools v0.1.2 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/api v0.47.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
google.golang.org/grpc v1.38.0 // indirect
google.golang.org/protobuf v1.26.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
Loading

0 comments on commit 53f8437

Please sign in to comment.