← Catalogue

terraform

Terraform's boxed `Error:` and the `on main.tf line 12` it points at.

iactoolmatcher

Open in playgroundFile on GitHubHistory

Install: ci-doctor matchers add official/terraform

matchers/iac/terraform/matcher.yaml

id: terraformrole: toolclassification: [iac]description: Terraform's boxed `Error:` and the `on main.tf line 12` it points at.pattern: '^\s*│\s*Error: |on .+\.tf line \d+'before: 1after: 12

In bundles

alliac

Fixtures

Framing stripped per provider. Highlighted lines are what this matcher selects; the marked line is the anchor.

terraform_apply_errorOpen in playground

1Current runner version: '2.336.0'
2##[group]Operating System
3Ubuntu
424.04.4
5LTS
6##[endgroup]
7Secret source: Actions
8Prepare workflow directory
9Prepare all required actions
10Complete job name: terraform_apply_error
11##[group]Set up job
12Image: ubuntu-24.04
13Runner name: 'GitHub Actions 12'
14##[endgroup]
15Download action repository 'actions/checkout@v4'
16Download action repository 'actions/cache@v4'
17##[group]Run actions/checkout@v4
18 with:
19 fetch-depth: 20
20 lfs: false
21##[endgroup]
22Syncing repository: acme/ledger
23##[group]Getting Git version info
24Working directory is '/home/runner/work/ledger/ledger'
25##[endgroup]
26/usr/bin/git checkout --progress --force 8ad41f02
27##[group]Run actions/cache@v4
28 with:
29 path: ~/.cache
30 key: Linux-deps-8ad41f02
31##[endgroup]
32Received 41943040 of 41943040 (100.0%), 40.0 MBs/sec
33Cache restored from key: Linux-deps-8ad41f02
34##[group]Run terraform init -input=false
35terraform init -input=false
36terraform apply -auto-approve -input=false
37shell: /usr/bin/bash -e {0}
38##[endgroup]
39Initializing the backend...
40Terraform has been successfully initialized!
41data.aws_caller_identity.current: Reading...
42data.aws_caller_identity.current: Read complete after 1s [id=123456789012]
43aws_s3_bucket.artifacts: Creating...
44╷
45│ Error: creating S3 Bucket (team-artifacts-prod): BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it
46│
47│ with aws_s3_bucket.artifacts,
48│ on s3.tf line 12, in resource "aws_s3_bucket" "artifacts":
49│ 12: resource "aws_s3_bucket" "artifacts" {
50│
51╵
52##[error]Process completed with exit code 1.
53##[group]Post Run actions/checkout@v4
54##[endgroup]
55/usr/bin/git version
56git version 2.54.0
57##[group]Post Run actions/upload-artifact@v4
58##[endgroup]
59Artifact upload complete.
60Post job cleanup.
61Cleaning up orphan processes