Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
460e9d2
Fix localstack pro image (#669)
rmvangun Feb 22, 2025
6dea6d5
Auto-configure AWS config for localstack (#670)
rmvangun Feb 23, 2025
3b122a0
Update dependency aquaproj/aqua-registry to v4.319.2 (#672)
renovate[bot] Feb 24, 2025
741a723
Update dependency aquaproj/aqua-renovate-config to v2.7.5 (#673)
renovate[bot] Feb 24, 2025
1fbaee7
Update dependency aquaproj/aqua to v2.45.0 (#674)
renovate[bot] Feb 24, 2025
7a2f103
Generate AWS terraform provider override when localstack is enabled (…
rmvangun Feb 24, 2025
4414cac
Windsor docker image (#675)
rmvangun Feb 24, 2025
4752eda
Update ghcr.io/siderolabs/talos Docker tag to v1.9.4 (#676)
renovate[bot] Feb 24, 2025
37c7fb4
Update coredns/coredns Docker tag to v1.12.0 (#677)
renovate[bot] Feb 24, 2025
b6c1df3
Update google.golang.org/genproto digest to 546df14 (#679)
renovate[bot] Feb 24, 2025
866458b
Update module github.com/go-jose/go-jose/v4 to v4.0.5 [SECURITY] (#681)
renovate[bot] Feb 25, 2025
c5a57a6
Update google.golang.org/genproto/googleapis/api digest to 546df14 (#…
renovate[bot] Feb 25, 2025
a5e5b5d
Update google.golang.org/genproto/googleapis/rpc digest to 546df14 (#…
renovate[bot] Feb 25, 2025
152f682
Update dependency aws/aws-cli to v2.24.11 (#683)
renovate[bot] Feb 25, 2025
2cf20b6
Update dependency fluxcd/flux2 to v2.5.1 (#686)
renovate[bot] Feb 25, 2025
e0e26ed
Update dependency aws/aws-cli to v2.24.12 (#687)
renovate[bot] Feb 26, 2025
fc4caea
Update module github.com/fluxcd/kustomize-controller/api to v1.5.1 (#…
renovate[bot] Feb 26, 2025
5c6dd71
Update dependency aquaproj/aqua-registry to v4.320.0 (#684)
renovate[bot] Feb 26, 2025
4f0b4ca
Sign binaries (#678)
tvangundy Feb 26, 2025
2d159eb
Update module github.com/emicklei/go-restful/v3 to v3.12.2 (#690)
renovate[bot] Feb 26, 2025
74b3c62
Update dependency aquaproj/aqua-registry to v4.321.0 (#691)
renovate[bot] Feb 26, 2025
c3ea5a9
Update dependency aws/aws-cli to v2.24.13 (#692)
renovate[bot] Feb 27, 2025
c8c9782
Update dependency siderolabs/omni/omnictl to v0.47.0 (#685)
renovate[bot] Feb 27, 2025
653face
Update docker/build-push-action action to v6.15.0 (#693)
renovate[bot] Feb 27, 2025
a099d9f
Update module github.com/ProtonMail/go-crypto to v1.1.6 (#695)
renovate[bot] Feb 27, 2025
68661d1
Update dependency hashicorp/terraform to v1.11.0 (#696)
renovate[bot] Feb 27, 2025
2f60340
Update actions/cache action to v4.2.2 (#697)
renovate[bot] Feb 27, 2025
f0e4e93
Update aws-sdk-go-v2 monorepo (#698)
renovate[bot] Feb 28, 2025
ce6f69f
Update google.golang.org/genproto digest to 55c9018 (#699)
renovate[bot] Feb 28, 2025
cf9cf91
Update google.golang.org/genproto/googleapis/api digest to 55c9018 (#…
renovate[bot] Feb 28, 2025
bcdf9de
Update google.golang.org/genproto/googleapis/rpc digest to 55c9018 (#…
renovate[bot] Feb 28, 2025
8a5c8e1
Update dependency aws/aws-cli to v2.24.14 (#702)
renovate[bot] Feb 28, 2025
a4fc01e
Update dependency siderolabs/omni/omnictl to v0.47.1 (#703)
renovate[bot] Feb 28, 2025
227c555
Update golang.org/x/exp digest to dead583 (#704)
renovate[bot] Mar 1, 2025
067c71d
Update dependency aws/aws-cli to v2.24.15 (#705)
renovate[bot] Mar 1, 2025
8e84a8a
Return correct error codes from exec (#706)
rmvangun Mar 1, 2025
68a47b5
Update module github.com/AzureAD/microsoft-authentication-library-for…
renovate[bot] Mar 1, 2025
cdff1d4
Update module github.com/googleapis/enterprise-certificate-proxy to v…
renovate[bot] Mar 1, 2025
178bf79
Update dependency aquaproj/aqua-registry to v4.322.0 (#709)
renovate[bot] Mar 1, 2025
c29dc30
Update docker/setup-buildx-action action to v3.10.0 (#694)
renovate[bot] Mar 1, 2025
026acc5
Update golang Docker tag to v1.24.0 (#689)
renovate[bot] Mar 2, 2025
c3201fb
Update module github.com/GoogleCloudPlatform/opentelemetry-operations…
renovate[bot] Mar 2, 2025
183ee5a
Update module github.com/GoogleCloudPlatform/opentelemetry-operations…
renovate[bot] Mar 2, 2025
9849e2f
Update module golang.org/x/oauth2 to v0.27.0 (#713)
renovate[bot] Mar 2, 2025
190b22e
Update module google.golang.org/api to v0.223.0 (#714)
renovate[bot] Mar 2, 2025
e31670f
Update localstack/localstack Docker tag to v4 (#715)
renovate[bot] Mar 2, 2025
c7f09cf
Update localstack/localstack-pro Docker tag to v4 (#716)
renovate[bot] Mar 3, 2025
6d41378
Update dependency aquaproj/aqua-registry to v4.323.0 (#717)
renovate[bot] Mar 3, 2025
2f111b9
Windsor Exec container mode (#718)
rmvangun Mar 3, 2025
045ad6a
Add support for wildcard dns (#719)
rmvangun Mar 3, 2025
a772f59
Update google.golang.org/genproto digest to a0af3ef (#720)
renovate[bot] Mar 3, 2025
3d9ab0c
Update google.golang.org/genproto/googleapis/api digest to a0af3ef (#…
renovate[bot] Mar 3, 2025
b2ba6b9
Update google.golang.org/genproto/googleapis/rpc digest to a0af3ef (#…
renovate[bot] Mar 4, 2025
7043889
Update dependency aws/aws-cli to v2.24.16 (#723)
renovate[bot] Mar 4, 2025
f52795f
Update dependency aquaproj/aqua-registry to v4.324.0 (#724)
renovate[bot] Mar 4, 2025
741aa76
Terraform state key prefix (#725)
rmvangun Mar 4, 2025
86a14d0
Update k8s.io/kube-openapi digest to e5f78fe (#726)
renovate[bot] Mar 5, 2025
82f62aa
Update aws-sdk-go-v2 monorepo (#727)
renovate[bot] Mar 5, 2025
bcb3172
Update dependency aws/aws-cli to v2.24.17 (#728)
renovate[bot] Mar 5, 2025
b072a44
Update dependency securego/gosec to v2.22.2 (#731)
renovate[bot] Mar 5, 2025
9042b1d
Update dependency hashicorp/terraform to v1.11.1 (#732)
renovate[bot] Mar 5, 2025
e33e967
Update golang Docker tag to v1.24.1 (#729)
renovate[bot] Mar 5, 2025
4cae316
Update dependency aws/aws-cli to v2.24.18 (#734)
renovate[bot] Mar 6, 2025
6a252cc
Update golang.org/x/exp digest to 054e65f (#735)
renovate[bot] Mar 6, 2025
830cc2b
Update dependency golang/go to v1.24.1 (#621)
renovate[bot] Mar 6, 2025
ed70a8c
Update module cel.dev/expr to v0.22.0 (#733)
renovate[bot] Mar 6, 2025
f8ee81a
Update dependency aquaproj/aqua-registry to v4.324.1 (#739)
renovate[bot] Mar 6, 2025
a97691b
Update module golang.org/x/oauth2 to v0.28.0 (#736)
renovate[bot] Mar 6, 2025
f404e84
Update dependency aws/aws-cli to v2.24.19 (#741)
renovate[bot] Mar 7, 2025
0bc993a
Update module cloud.google.com/go/iam to v1.4.1 (#742)
renovate[bot] Mar 7, 2025
2d13827
Update module cloud.google.com/go/longrunning to v0.6.5 (#743)
renovate[bot] Mar 7, 2025
33b8a3b
Update dependency aquaproj/aqua-registry to v4.324.2 (#744)
renovate[bot] Mar 7, 2025
ffb1595
Update module github.com/hashicorp/go-secure-stdlib/parseutil to v0.2…
renovate[bot] Mar 7, 2025
40eff19
Update module golang.org/x/time to v0.11.0 (#737)
renovate[bot] Mar 7, 2025
a039c38
Update dependency aws/aws-cli to v2.24.20 (#747)
renovate[bot] Mar 8, 2025
15a9a73
Update module google.golang.org/api to v0.224.0 (#740)
renovate[bot] Mar 8, 2025
fdf7d41
Update module google.golang.org/grpc to v1.71.0 (#738)
renovate[bot] Mar 8, 2025
171fff0
Update opentelemetry-go-contrib monorepo (#748)
renovate[bot] Mar 8, 2025
e316c04
Update module sigs.k8s.io/controller-runtime to v0.20.3 (#749)
renovate[bot] Mar 8, 2025
1f2c419
Pair down and improve Docker image (#750)
rmvangun Mar 8, 2025
e8e47bf
Update dependency go-task/task to v3.42.0 (#751)
renovate[bot] Mar 9, 2025
ceb2be4
DockerShell ExecProgress (#753)
rmvangun Mar 9, 2025
c00728f
Update dependency aquaproj/aqua-registry to v4.325.0 (#752)
renovate[bot] Mar 9, 2025
eda191c
Run dual DNS servers when running in container exec mode (#754)
rmvangun Mar 9, 2025
170a126
Update dependency aquaproj/aqua-registry to v4.326.0 (#755)
renovate[bot] Mar 10, 2025
7c1797e
Correct localstack s3 endpoint (#756)
rmvangun Mar 10, 2025
7f6d73a
Execute windsor up terraform commands via container exec mode (#759)
rmvangun Mar 10, 2025
f936ae0
Update dependency aquaproj/aqua-registry to v4.326.1 (#760)
renovate[bot] Mar 11, 2025
1f5de3d
Update dependency aws/aws-cli to v2.24.21 (#761)
renovate[bot] Mar 11, 2025
b5fe358
Update dependency go-task/task to v3.42.1 (#762)
renovate[bot] Mar 11, 2025
d2e7e23
Update google.golang.org/genproto digest to 81fb87f (#763)
renovate[bot] Mar 12, 2025
602760f
Update google.golang.org/genproto/googleapis/api digest to 81fb87f (#…
renovate[bot] Mar 12, 2025
9994fa1
Update google.golang.org/genproto/googleapis/rpc digest to 81fb87f (#…
renovate[bot] Mar 12, 2025
a047051
Update aws-sdk-go-v2 monorepo (#766)
renovate[bot] Mar 12, 2025
3413f1a
Update dependency aws/aws-cli to v2.24.22 (#767)
renovate[bot] Mar 12, 2025
8087d7a
Update dependency hashicorp/terraform to v1.11.2 (#770)
renovate[bot] Mar 12, 2025
2e74834
Update dependency kubernetes/kubectl to v1.32.3 (#769)
renovate[bot] Mar 13, 2025
44e5085
Update dependency aquaproj/aqua to v2.45.1 (#773)
renovate[bot] Mar 13, 2025
a6a458a
Update dependency siderolabs/talos to v1.9.5 (#771)
renovate[bot] Mar 13, 2025
e98a8af
Update ghcr.io/siderolabs/talos Docker tag to v1.9.5 (#772)
renovate[bot] Mar 13, 2025
f7e0eb8
Update github.com/planetscale/vtprotobuf digest to ba97887 (#776)
renovate[bot] Mar 13, 2025
d6d40b8
Update go-openapi packages (#774)
renovate[bot] Mar 13, 2025
7b4a087
Update google.golang.org/genproto digest to e70fdf4 (#780)
renovate[bot] Mar 14, 2025
96f51ed
Update google.golang.org/genproto/googleapis/api digest to e70fdf4 (#…
renovate[bot] Mar 14, 2025
cfaf70c
Update google.golang.org/genproto/googleapis/rpc digest to e70fdf4 (#…
renovate[bot] Mar 14, 2025
d0f36bd
Update dependency aws/aws-cli to v2.24.23 (#783)
renovate[bot] Mar 14, 2025
8dcf1ae
Update dependency helm/helm to v3.17.2 (#784)
renovate[bot] Mar 14, 2025
29d155b
Update kubernetes packages to v0.32.3 (#775)
renovate[bot] Mar 14, 2025
580895f
Update dependency aws/aws-cli to v2.24.24 (#786)
renovate[bot] Mar 15, 2025
8e9868e
Update module cloud.google.com/go/iam to v1.4.2 (#785)
renovate[bot] Mar 15, 2025
73f3216
Update module cloud.google.com/go/kms to v1.21.1 (#787)
renovate[bot] Mar 15, 2025
f747bcb
Update module cloud.google.com/go/longrunning to v0.6.6 (#788)
renovate[bot] Mar 15, 2025
108f0d5
Update module cloud.google.com/go/monitoring to v1.24.1 (#789)
renovate[bot] Mar 15, 2025
a3d1bc9
Update module github.com/googleapis/enterprise-certificate-proxy to v…
renovate[bot] Mar 15, 2025
709a05b
Update dependency docker/compose to v2.34.0 (#791)
renovate[bot] Mar 16, 2025
eaf7d1d
Update dependency goreleaser/goreleaser to v2.8.1 (#778)
renovate[bot] Mar 16, 2025
b044546
Update docker/login-action action to v3.4.0 (#792)
renovate[bot] Mar 16, 2025
2559eb8
Update dependency aquaproj/aqua-registry to v4.327.0 (#794)
renovate[bot] Mar 16, 2025
de9093c
Update module cloud.google.com/go to v0.119.0 (#768)
renovate[bot] Mar 16, 2025
b4ed453
Update module cloud.google.com/go/storage to v1.51.0 (#779)
renovate[bot] Mar 16, 2025
709e4a3
Remove breaks so providers are created
rmvangun Mar 17, 2025
fe01d0e
Merge branch 'main' into ENG-294_Fix-for-malfunction-involving-two-1P…
rmvangun Mar 17, 2025
e71b97a
go deps
rmvangun Mar 17, 2025
dc48d65
Only parse secrets belonging to the provider
rmvangun Mar 17, 2025
d27b40a
Improve regex
rmvangun Mar 17, 2025
c3e51a0
Add test
rmvangun Mar 17, 2025
c400e5c
Merge branch 'main' into ENG-294_Fix-for-malfunction-involving-two-1P…
rmvangun Apr 4, 2025
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
28 changes: 4 additions & 24 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,35 +77,15 @@
{
"customType": "regex",
"fileMatch": [
"^pkg/constants/constants.go$"
"^Dockerfile$",
"^.*\\.yaml$",
"^.*\\.go$"
],
"matchStrings": [
"// renovate: datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)\n\\s*const\\s+\\S+\\s*=\\s*\"(?<currentValue>[^\"]+)\""
"(//|#)\\s*renovate\\s*:\\s*datasource\\s*=\\s*(?<datasource>\\S+)\\s*depName\\s*=\\s*(?<depName>\\S+)\\s*\\n.*?(?<currentValue>v?\\d+\\.\\d+\\.\\d+)"
],
"datasourceTemplate": "{{datasource}}",
"versioningTemplate": "semver"
},
{
"customType": "regex",
"fileMatch": [
"^Taskfile.yaml$"
],
"matchStrings": [
"go install (?<depName>\\S+)@(?<currentValue>\\S+)"
],
"datasourceTemplate": "go",
"versioningTemplate": "semver"
},
{
"customType": "regex",
"fileMatch": [
"^Taskfile.yaml$"
],
"matchStrings": [
"choco install (?<depName>\\S+) --version=(?<currentValue>\\S+)"
],
"datasourceTemplate": "chocolatey",
"versioningTemplate": "semver"
}
],
"labels": [
Expand Down
67 changes: 65 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+'

permissions:
contents: write # Allows creating releases
contents: write
issues: read
pull-requests: read
pull-requests: read
packages: write

jobs:
build-and-test:
strategy:
Expand Down Expand Up @@ -158,3 +160,64 @@ jobs:
GPG_FINGERPRINT: ${{ env.GPG_FINGERPRINT }}
HOMEBREW_CLI_WRITE_PAT: ${{ secrets.HOMEBREW_CLI_WRITE_PAT }}
GITHUB_SHA: ${{ github.sha }}

docker:
runs-on: ubuntu-latest
needs: [build-and-test, sast-scan]
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0

- name: Cache Docker layers
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-docker-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-

- name: Log in to GitHub Container Registry
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
context: .
push: false
tags: ghcr.io/windsorcli/windsorcli:latest
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Push Docker image
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
context: .
push: true
tags: ghcr.io/windsorcli/windsorcli:${{ github.ref_name }}
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Push Docker image latest
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
context: .
push: true
tags: ghcr.io/windsorcli/windsorcli:latest
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ windsor.yaml
.windsor/
.volumes/
terraform/**/backend_override.tf
terraform/**/provider_override.tf
contexts/**/.terraform/
contexts/**/.tfstate/
contexts/**/.kube/
Expand Down
20 changes: 19 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/windsor/main.go",
"args": ["init", "local"]
"args": ["init", "local"],
"env": {
"WINDSOR_EXEC_MODE": "container",
"WINDSOR_CONTEXT": "local",
"WINDSOR_PROJECT_ROOT": "${workspaceFolder}"
}
},
{
"name": "Windsor Up",
Expand Down Expand Up @@ -75,6 +80,19 @@
"WINDSOR_CONTEXT": "local",
"WINDSOR_PROJECT_ROOT": "${workspaceFolder}"
}
},
{
"name": "Windsor Exec",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/windsor/main.go",
"args": ["exec", "--verbose", "--", "sh", "-c", "exit 2"],
"env": {
"WINDSOR_EXEC_MODE": "container",
"WINDSOR_CONTEXT": "local",
"WINDSOR_PROJECT_ROOT": "${workspaceFolder}"
}
}
]
}
66 changes: 66 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Stage 1: Aqua Installer
# -----------------------
FROM alpine:3.21.3 AS aqua

# Set environment variables
ENV PATH="/root/.local/share/aquaproj-aqua/bin:$PATH"
ENV AQUA_GLOBAL_CONFIG=/etc/aqua/aqua.yaml

# renovate: datasource=github-releases depName=aquaproj/aqua-installer
ARG AQUA_INSTALLER_VERSION=v3.1.1
# renovate: datasource=github-releases depName=aquaproj/aqua
ARG AQUA_VERSION=v2.45.1

# Update package index and install dependencies
RUN apk update && apk add bash wget --no-cache wget

# Copy aqua configuration
COPY aqua.docker.yaml /etc/aqua/aqua.yaml

# Install Aqua and tools from aqua.docker.yaml using wget instead of curl
RUN wget -q https://raw.githubusercontent.com/aquaproj/aqua-installer/${AQUA_INSTALLER_VERSION}/aqua-installer -O aqua-installer && \
echo "e9d4c99577c6b2ce0b62edf61f089e9b9891af1708e88c6592907d2de66e3714 aqua-installer" | sha256sum -c - && \
chmod +x aqua-installer && \
./aqua-installer -v ${AQUA_VERSION} && \
aqua i && \
aqua cp -o /dist kubectl talosctl terraform && \
rm aqua-installer

# Stage 2: Builder
# ----------------
FROM --platform=$BUILDPLATFORM golang:1.24.1-alpine AS builder

# Install dependencies
RUN apk add --no-cache git

# Build the windsor binary
COPY . .
RUN go build -o /work/windsor ./cmd/windsor

# Stage 3: Runtime
# ----------------
FROM alpine:3.21.3

# Install runtime dependencies
RUN apk add --no-cache bash git wget unzip

# Copy tools from aqua-installer
COPY --from=aqua /dist/* /usr/local/bin/

# Create a non-root user and group
RUN addgroup -S appgroup && adduser -S windsor -G appgroup

# Switch to windsor user
USER windsor

# Copy windsor binary
COPY --from=builder /work/windsor /usr/local/bin/

# Create the .trusted file and add the file pointing to /work
RUN mkdir -p /home/windsor/.config/windsor && echo "/work" > /home/windsor/.config/windsor/.trusted

# Set working directory
WORKDIR /work

# Set entrypoint
ENTRYPOINT ["/usr/local/bin/windsor", "exec", "--"]
33 changes: 21 additions & 12 deletions api/v1alpha1/aws/aws_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ type AWSConfig struct {
// Enabled indicates whether AWS integration is enabled.
Enabled *bool `yaml:"enabled,omitempty"`

// AWSEndpointURL specifies the custom endpoint URL for AWS services.
AWSEndpointURL *string `yaml:"aws_endpoint_url,omitempty"`
// EndpointURL specifies the custom endpoint URL for AWS services.
EndpointURL *string `yaml:"endpoint_url,omitempty"`

// AWSProfile defines the AWS CLI profile to use for authentication.
AWSProfile *string `yaml:"aws_profile,omitempty"`
// Profile defines the AWS CLI profile to use for authentication.
Profile *string `yaml:"profile,omitempty"`

// S3Hostname sets the custom hostname for the S3 service.
S3Hostname *string `yaml:"s3_hostname,omitempty"`
Expand All @@ -19,6 +19,9 @@ type AWSConfig struct {

// Localstack contains the configuration for Localstack, a local AWS cloud emulator.
Localstack *LocalstackConfig `yaml:"localstack,omitempty"`

// Region specifies the AWS region to use.
Region *string `yaml:"region,omitempty"`
}

// LocalstackConfig represents the Localstack configuration
Expand All @@ -32,11 +35,11 @@ func (base *AWSConfig) Merge(overlay *AWSConfig) {
if overlay.Enabled != nil {
base.Enabled = overlay.Enabled
}
if overlay.AWSEndpointURL != nil {
base.AWSEndpointURL = overlay.AWSEndpointURL
if overlay.EndpointURL != nil {
base.EndpointURL = overlay.EndpointURL
}
if overlay.AWSProfile != nil {
base.AWSProfile = overlay.AWSProfile
if overlay.Profile != nil {
base.Profile = overlay.Profile
}
if overlay.S3Hostname != nil {
base.S3Hostname = overlay.S3Hostname
Expand All @@ -55,6 +58,9 @@ func (base *AWSConfig) Merge(overlay *AWSConfig) {
base.Localstack.Services = overlay.Localstack.Services
}
}
if overlay.Region != nil {
base.Region = overlay.Region
}
}

// Copy creates a deep copy of the AWSConfig object
Expand All @@ -66,11 +72,11 @@ func (c *AWSConfig) Copy() *AWSConfig {
if c.Enabled != nil {
copy.Enabled = c.Enabled
}
if c.AWSEndpointURL != nil {
copy.AWSEndpointURL = c.AWSEndpointURL
if c.EndpointURL != nil {
copy.EndpointURL = c.EndpointURL
}
if c.AWSProfile != nil {
copy.AWSProfile = c.AWSProfile
if c.Profile != nil {
copy.Profile = c.Profile
}
if c.S3Hostname != nil {
copy.S3Hostname = c.S3Hostname
Expand All @@ -87,5 +93,8 @@ func (c *AWSConfig) Copy() *AWSConfig {
copy.Localstack.Services = c.Localstack.Services
}
}
if c.Region != nil {
copy.Region = c.Region
}
return copy
}
Loading
Loading