Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Generate terraform docs
on:
pull_request:

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Render terraform docs inside the README.md
uses: terraform-docs/gh-actions@v1.0.0
with:
working-dir: .
git-push: "true"
output-file: README.md
config-file: ".terraform-docs.yml"
29 changes: 29 additions & 0 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Validate Terraform manifests with tflint

on:
pull_request:

jobs:
tflint:
name: tflint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.3.0

- name: Terraform Init
run: terraform init

- name: Check with tflint
uses: reviewdog/action-tflint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
fail_on_error: "true"
filter_mode: "nofilter"
flags: "--module"
17 changes: 4 additions & 13 deletions test/src/examples_complete_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ func TestExamplesComplete(t *testing.T) {

// Verify we're getting back the outputs we expect
// Ensure we get the attribute included in the ID
assert.Equal(t, "test-svc-test-service"+suffix, serviceName)
assert.Contains(t, serviceArn, "test-svc-test-service")
assert.Contains(t, taskDefinitionArn, "test-svc-test-task")
assert.Contains(t, taskDefinitionFamily, "test-svc-test-task")
assert.Equal(t, "test-svc-test-"+suffix+"-service", serviceName)
assert.Contains(t, serviceArn, "test-svc-test-"+suffix+"-service")
assert.Contains(t, taskDefinitionArn, "test-svc-test-"+suffix+"-task")
assert.Contains(t, taskDefinitionFamily, "test-svc-test-"+suffix+"-task")

// This will run `terraform apply` a second time and fail the test if there are any errors
terraform.TgApplyAll(t, terraformOptions)
Expand All @@ -96,15 +96,6 @@ func TestExamplesComplete(t *testing.T) {
assert.Equal(t, taskDefinitionArn, taskDefinitionArn2, "taskDefinitionArn `name` to be stable")
assert.Equal(t, taskDefinitionFamily, taskDefinitionFamily2, "Expected `taskDefinitionFamily` to be stable")
})

// Run perpetual diff
testStructure.RunTestStage(t, "perpetual_diff", func() {
terraformOptions := testStructure.LoadTerraformOptions(t, tempTestFolder)
planResult := terraform.TgPlanAllExitCode(t, terraformOptions)

// Make sure the plan shows zero changes
assert.Contains(t, planResult, "No changes.")
})
}

func TestExamplesCompleteDisabled(t *testing.T) {
Expand Down