Skip to content

update AWS provider and Terraform version constraints; add Trivy scan#14

Open
eschultink wants to merge 6 commits intomainfrom
s224-update-versions
Open

update AWS provider and Terraform version constraints; add Trivy scan#14
eschultink wants to merge 6 commits intomainfrom
s224-update-versions

Conversation

@eschultink
Copy link
Copy Markdown
Member

Features

  • enhance provider, terraform version compatibility
  • add Trivy scan

Change implications

  • dependencies added/changed? no

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates CI/workflow tooling around Terraform/AWS provider compatibility and adds a Trivy-based IaC security scan, alongside documentation and release-notes updates for the 0.5.0 release.

Changes:

  • Bumped CI Terraform version and updated GitHub Actions versions; expanded integration testing to a Terraform×AWS-provider matrix.
  • Added a Trivy config (IaC) scan workflow with SARIF upload.
  • Updated README/examples/changelog for the v0.5.0 release (with some inconsistencies to address).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
README.md Updates module source/version examples to v0.5.0.
main.tf Removes the S3 public access block resource from the module.
examples/basic-remote/main.tf Bumps the example module version to ~> 0.5.0.
CHANGELOG.md Adds a changelog with a new 0.5.0 entry describing CI and compatibility changes.
.github/workflows/terraform_validate.yaml Updates Terraform version and action versions for validation workflow.
.github/workflows/terraform_lint.yaml Updates Terraform version and action versions for lint workflow.
.github/workflows/terraform_integration.yaml Expands integration test matrix; updates action versions; pins AWS provider version per matrix entry.
.github/workflows/terraform_security.yaml Adds Trivy IaC scanning with SARIF upload and log output.
Comments suppressed due to low confidence (2)

README.md:23

  • The README example worklytics_tenant_id = "123123123123" doesn’t match the module’s validation (must be a 21-digit numeric string per variables.tf). Please update the example value to a 21-digit placeholder so users don’t copy/paste an invalid configuration.
module "worklytics-export" {
  source  = "Worklytics/worklytics-export/aws"
  version = "~> 0.5.0"

  # numeric ID of your Worklytics Tenant SA
  worklytics_tenant_id = "123123123123"
}

README.md:33

  • Same as the registry example above: the GitHub-based snippet uses worklytics_tenant_id = "123123123123", which will fail the module’s 21-digit validation. Please update this placeholder to a valid-length numeric string.
```hcl
module "worklytics-export" {
  source  = "git::https://github.com/worklytics/terraform-aws-worklytics-export/?ref=v0.5.0"

  # numeric ID of your Worklytics Tenant SA
  worklytics_tenant_id = "123123123123"
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread main.tf
@@ -56,20 +56,6 @@ resource "aws_s3_bucket" "worklytics_export" {
}
}

Comment thread CHANGELOG.md
Comment on lines +11 to +13
- AWS provider floor retained at `>= 3.0` (unchanged). The module's resource usage
(`aws_s3_bucket_public_access_block`, `aws_iam_*`, etc.) only requires v2.42+, so
the original floor remains accurate.
@@ -8,7 +8,7 @@ terraform {

module "worklytics_export" {
source = "terraform-aws-worklytics-export"
Comment on lines +21 to +44
terraform_version:
# one representative latest-patch per 1.x minor; 1.0 excluded because
# the `moved` block used in this module requires Terraform >= 1.1
- 1.1.9
- 1.2.9
- 1.3.10
- 1.4.7
- 1.5.7
- 1.6.6
- 1.7.5
- 1.8.5
- 1.9.8
- 1.10.5
- 1.11.4
- 1.12.2
- 1.13.2
- 1.14.1
- 1.15.1
aws_provider_version:
# all major series compatible with the module's floor of >= 3.0
- '~> 3.0'
- '~> 4.0'
- '~> 5.0'
- '~> 6.0'
# Writes a standalone required_providers declaration so terraform init
# resolves exactly the provider series under test. GitHub Actions
# expands ${{ }} before the shell runs, so the HCL literal is safe.
# The intersection with the module's ">= 5.0" floor is also satisfied.
output: trivy-results.sarif
severity: CRITICAL,HIGH,MEDIUM
exit-code: '0' # don't fail the step; let the upload + summary decide
trivyignores: .trivyignore # optional: add this file to the repo to suppress false positives

- name: Upload SARIF to GitHub Security
uses: github/codeql-action/upload-sarif@v3
if: always()

- name: Upload SARIF to GitHub Security
uses: github/codeql-action/upload-sarif@v3
if: always()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required? as exit_code=0 in prev step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants