Skip to content

Conversation

DebPaine
Copy link
Collaborator

@DebPaine DebPaine commented Aug 19, 2025

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

  • Added multi-platform support when building the Docker image, it was defaulting to amd64 arch

@DebPaine DebPaine requested a review from a team as a code owner August 19, 2025 09:46
Copy link

Changelog Warning

Please add a changelog entry to CHANGELOG.md for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.

# devbuild compiles the binary
# -----------------------------------
FROM golang:1.24.4-alpine@sha256:e5c2e59960f8636d02f77029c8f0a7a6b882f87fee8d2e4a9ce6c9ff112ed735 AS devbuild
FROM golang:1.24.4-alpine AS devbuild
Copy link
Member

Choose a reason for hiding this comment

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

Could we make sure this is pinned to a SHA instead of alpine in general?

COPY . ./
# Build the server
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -ldflags="-s -w -X terraform-mcp-server/version.GitCommit=$(shell git rev-parse HEAD) -X terraform-mcp-server/version.BuildDate=$(shell git show --no-show-signature -s --format=%cd --date=format:'%Y-%m-%dT%H:%M:%SZ' HEAD)" \
RUN --mount=type=cache,target=/root/.cache/go-build \
Copy link
Member

Choose a reason for hiding this comment

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

we need the version commit and build Date information, please put them back

# Build multi-platform docker image
docker-build:
$(DOCKER) build --build-arg VERSION=$(VERSION) -t $(BINARY_NAME):$(VERSION) .
$(DOCKER) buildx build --platform linux/amd64,linux/arm64 \
Copy link
Member

Choose a reason for hiding this comment

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

This is meant for local deployment only, which is satisfactory unless you think otherwise? When we actually deploy the container image we do it for most arch (armv6, arm64, amd64, 386 )--> https://hub.docker.com/r/hashicorp/terraform-mcp-server/tags

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.

2 participants