Skip to content

Commit

Permalink
Merge branch 'main' into bmm/update-use-cases
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMMcClain authored Nov 15, 2024
2 parents 12a90dd + dda25d1 commit d39ad03
Show file tree
Hide file tree
Showing 62 changed files with 3,687 additions and 1,633 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ label to enable the backport bot.
-->

1.10.x
1.11.x

## Draft CHANGELOG entry

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ on:
pull_request_target:
types:
- closed
pull_request:
types:
- labeled

permissions:
contents: write # to push to a new branch
pull-requests: write # to create a new PR

jobs:
backport:
if: github.event.pull_request.merged
if: github.event.pull_request
runs-on: ubuntu-latest
container: hashicorpdev/backport-assistant:0.4.7@sha256:36f9d4fba82b9454f1f62bf76c8078fafe3ab0be71356cb96af6d56ac4482cd8
steps:
Expand Down
10 changes: 6 additions & 4 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@
# make GitHub consider this file invalid if not commented.

# Remote-state backend # Maintainer
/internal/backend/remote-state/azure @hashicorp/terraform-azure
/internal/backend/remote-state/azure @hashicorp/terraform-core @hashicorp/terraform-azure
#/internal/backend/remote-state/consul Unmaintained
#/internal/backend/remote-state/cos @likexian
/internal/backend/remote-state/gcs @hashicorp/tf-eco-hybrid-cloud
/internal/backend/remote-state/gcs @hashicorp/terraform-core @hashicorp/tf-eco-hybrid-cloud
/internal/backend/remote-state/http @hashicorp/terraform-core
#/internal/backend/remote-state/oss @xiaozhu36
#/internal/backend/remote-state/pg @remilapeyre
/internal/backend/remote-state/s3 @hashicorp/terraform-aws
/internal/backend/remote-state/kubernetes @hashicorp/tf-eco-hybrid-cloud
/internal/backend/remote-state/s3 @hashicorp/terraform-core @hashicorp/terraform-aws
/internal/backend/remote-state/kubernetes @hashicorp/terraform-core @hashicorp/tf-eco-hybrid-cloud

# Provisioners
builtin/provisioners/file @hashicorp/terraform-core
builtin/provisioners/local-exec @hashicorp/terraform-core
builtin/provisioners/remote-exec @hashicorp/terraform-core

# Docs on developer.hashicorp.com/terraform/docs
website/ @hashicorp/terraform-core @hashicorp/terraform-education
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- Tutorials: [HashiCorp's Learn Platform](https://learn.hashicorp.com/terraform)
- Certification Exam: [HashiCorp Certified: Terraform Associate](https://www.hashicorp.com/certification/#hashicorp-certified-terraform-associate)

<img alt="Terraform" src="https://www.datocms-assets.com/2885/1629941242-logo-terraform-main.svg" width="600px">
<img alt="Terraform" src="https://www.datocms-assets.com/2885/1731373310-terraform_white.svg" width="600px">

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions.

Expand Down
33 changes: 33 additions & 0 deletions docs/debugging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# How to Debug Terraform

As Terraform is written in Go you may use [delve](https://github.com/go-delve/delve) to debug it.

## 1. Compile & Start Debug Server

One way to do it is to compile a binary with the [appropriate compiler flags](https://pkg.go.dev/cmd/compile#hdr-Command_Line):

```sh
go install -gcflags="all=-N -l"
```

This enables you to then execute the compiled binary via delve, pass any arguments as spin up a debug server which you can then connect to:

```sh
dlv exec $GOBIN/terraform --headless --listen :2345 --log -- apply
```

## 2a. Connect via CLI

You may connect to the headless debug server via delve CLI

```sh
dlv connect :2345
```

## 2b. Connect from VS Code

The repository provides a launch configuration, making it possible to use VS Code's native debugging integration:

![vscode debugger](./images/vscode-debugging.png)

Note that this debugging workflow is different from the test-based one, which itself shouldn't require any of the above steps above nor the mentioned launch configuration. Meaning, that if you already have a test that hits the right lines of code you want to be debugging, or you can write one, then that may be an easier workflow.
Binary file added docs/images/vscode-debugging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d39ad03

Please sign in to comment.