diff --git a/.gitignore b/.gitignore index decfcce..2c7b5f8 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,6 @@ bootstrap .aws-sam +# Local SAM configuration (not committed) samconfig.toml +samconfig.yaml diff --git a/README.md b/README.md index dec5c97..38c72da 100644 --- a/README.md +++ b/README.md @@ -31,3 +31,15 @@ sam deploy \ The `ExtraRunnerLabels` parameter is optional. When supplied, the labels are added to the default runner labels. All other parameters are required and must be specified for your environment. + +## Local `samconfig.toml` + +This repository ignores `samconfig.toml` and `samconfig.yaml` so you can +maintain environment-specific settings locally. Copy `samconfig.example.yaml` +to `samconfig.yaml` and adjust the values for your AWS account. Then run SAM +commands with the desired configuration environment, for example: + +```bash +sam build --config-env dev +sam deploy --config-env dev +``` diff --git a/samconfig.example.yaml b/samconfig.example.yaml new file mode 100644 index 0000000..607513d --- /dev/null +++ b/samconfig.example.yaml @@ -0,0 +1,31 @@ +version: 0.1 +dev: + deploy: + parameters: + stack_name: github-runner-autoscaler + region: us-east-2 + resolve_s3: true + s3_prefix: github-runner-autoscaler + capabilities: CAPABILITY_IAM + parameter_overrides: + - GitHubPATSecretName=github-runner-autoscaler-pat + - ExtraRunnerLabels=dev + - ImageId=ami-0c0c88099397fccb4 + - SubnetId=subnet-0123456789def + - SecurityGroupIds=sg-0123456789def + - KeyName=terraform-2025051802 +prod: + deploy: + parameters: + stack_name: github-runner-autoscaler + region: us-east-2 + resolve_s3: true + s3_prefix: github-runner-autoscaler + capabilities: CAPABILITY_IAM + parameter_overrides: + - GitHubPATSecretName=github-runner-autoscaler-pat + - ExtraRunnerLabels=prod + - ImageId=ami-0c0c88099397fccb4 + - SubnetId=subnet-0123456789def + - SecurityGroupIds=sg-0123456789def + - KeyName=terraform-2025051801