Skip to content

Commit 48769bd

Browse files
authored
Merge pull request #331 from sassoftware/staging
8.8.0 - March 19, 2025
2 parents e8de51f + 93ba750 commit 48769bd

37 files changed

+1449
-123
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright © 2025, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Default Plan Unit Tests
5+
on:
6+
push:
7+
branches: ['**'] # '*' will cause the workflow to run on all commits to all branches.
8+
9+
jobs:
10+
go-tests:
11+
name: Default Plan Unit Tests
12+
runs-on: ubuntu-latest
13+
environment: terraformSecrets
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
- name: Build Docker Image
18+
run: docker build -t viya4-iac-aws:terratest -f Dockerfile.terratest .
19+
- name: Run Tests
20+
run: |
21+
docker run \
22+
-e TF_VAR_aws_access_key_id=$TF_VAR_aws_access_key_id \
23+
-e TF_VAR_aws_secret_access_key=$TF_VAR_aws_secret_access_key \
24+
-v $(pwd):/viya4-iac-aws \
25+
viya4-iac-aws:terratest -v
26+
env:
27+
# TF ENVIRONMENT
28+
TF_VAR_aws_access_key_id: "${{ secrets.TF_VAR_AWS_ACCESS_KEY_ID }}"
29+
TF_VAR_aws_secret_access_key: "${{ secrets.TF_VAR_AWS_SECRET_ACCESS_KEY }}"

.github/workflows/linter-analysis.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ jobs:
4848
path: ~/.tflint.d/plugins
4949
key: ubuntu-latest-tflint-${{ hashFiles('.tflint.hcl') }}
5050

51+
- name: Setup Terraform
52+
uses: hashicorp/setup-terraform@v3
53+
with:
54+
terraform_version: "^1.10.5"
55+
terraform_wrapper: false
56+
5157
- name: Setup TFLint
5258
uses: terraform-linters/[email protected]
5359
with:

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Local .terraform directories
22
**/.terraform/*
33

4+
# Local IDE configurations
5+
.vscode/*
6+
.idea/*
7+
48
# .tfstate files
59
*.tfstate
610
*.tfstate.*
@@ -41,3 +45,6 @@ terraform.tfvars
4145

4246
# Configuration files
4347
*.conf
48+
49+
# Testing output files
50+
test/test_output/*

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
default_stages: [pre-commit]
3+
repos:
4+
- repo: https://github.com/gitleaks/gitleaks
5+
rev: v8.23.3
6+
hooks:
7+
- id: gitleaks
8+
9+
ci:
10+
autofix_prs: false
11+
autoupdate_commit_msg: "chore: auto-update of pre-commit hooks"

CONTRIBUTING.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
# How to Contribute
2-
We'd love to accept your patches and contributions to this project.
3-
We just ask that you follow our contribution guidelines when you do.
2+
This project is community-driven, and we'd love to accept your patches and contributions.
3+
We just ask that you follow our contribution guidelines when you do. Refer
4+
to the [Contributor Handbook](https://sassoftware.github.io/contributor-handbook.html)
5+
for guidance.
46

57
## Contributor License Agreement
68
Contributions to this project must be accompanied by a signed [Contributor Agreement](ContributorAgreement.txt).
7-
You (or your employer) retain the copyright to your contribution; this simply grants us permission to use and redistribute your contributions as part of the project.
9+
You (or your employer) retain the copyright to your contribution; this agreement simply grants
10+
us permission to use and redistribute your contributions as part of the project.
811

9-
## Code reviews
10-
All submissions to this project—including submissions from project members—require review.
11-
Our review process typically involves performing unit tests, development tests, integration tests, and security scans using internal SAS infrastructure.
12-
For this reason, we don’t often merge pull requests directly from GitHub.
12+
## Code Reviews
13+
All submissions to this project—including submissions from project members—require
14+
review. Our review process typically involves performing unit tests, development
15+
tests, integration tests, and security scans.
1316

14-
Instead, we work with submissions internally first, vetting them to ensure they meet our security and quality standards.
15-
We’ll do our best to work with contributors in public issues and pull requests; however, to ensure our code meets our internal compliance standards, we may need to incorporate your submission into a solution we push ourselves.
17+
## Pull Request Requirement
18+
All contributions (PRs) must be accompanied by passing unit and/or integration
19+
tests, following our [testing philosophy](./docs/user/TestingPhilosophy.md). If you are unfamiliar with this process,
20+
we are happy to help you navigate it by providing continuous collaboration within the pull request.
21+
All pull requests must also pass our linter analysis checks. Contributions might
22+
be subjected to security scans before they can be accepted.
1623

17-
This does not mean we don’t value or appreciate your contribution.
18-
We simply need to review your code internally before merging it.
19-
We work to ensure all contributors receive appropriate recognition for their contributions, at least by acknowledging them in our release notes.
24+
## Security Scans
25+
To ensure that all submissions meet our security and quality standards, we perform security
26+
scans using internal SAS infrastructure. Reporting of any Common Vulnerabilities and Exposures
27+
(CVEs) that are detected is not available in this project at this time.

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
ARG TERRAFORM_VERSION=1.9.6
2-
ARG AWS_CLI_VERSION=2.17.58
1+
ARG TERRAFORM_VERSION=1.10.5
2+
ARG AWS_CLI_VERSION=2.24.16
33
FROM hashicorp/terraform:$TERRAFORM_VERSION AS terraform
44

55
FROM almalinux:minimal AS amin
66
WORKDIR /app
77
USER root
8-
ARG KUBECTL_VERSION=1.30.6
9-
ARG KUBECTL_CHECKSUM=7a3adf80ca74b1b2afdfc7f4570f0005ca03c2812367ffb6ee2f731d66e45e61
8+
ARG KUBECTL_VERSION=1.30.10
9+
ARG KUBECTL_CHECKSUM=bc74dbeefd4b9d53f03016f6778f3ffc9a72ef4ca7b7c80fd5dc1a41d52dcab7
1010
RUN /usr/bin/bash -eux \
1111
&& curl -fSLO https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \
1212
&& chmod 755 ./kubectl \

Dockerfile.terratest

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM golang:1.23
2+
3+
# Install terraform from apt repository and terratest_log_parser
4+
RUN \
5+
apt-get update \
6+
&& apt-get install -y jq lsb-release \
7+
&& wget -O - https://apt.releases.hashicorp.com/gpg \
8+
| gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg \
9+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
10+
| tee /etc/apt/sources.list.d/hashicorp.list \
11+
&& apt update \
12+
&& apt install terraform \
13+
&& ssh-keygen -f ~/.ssh/id_rsa -P "" \
14+
&& go install github.com/gruntwork-io/terratest/cmd/terratest_log_parser@latest
15+
16+
WORKDIR /viya4-iac-aws/test
17+
18+
# Copy the test directory so it can install the go modules
19+
# during the docker build rather than the docker run
20+
COPY ./test ./
21+
RUN go mod tidy
22+
23+
ENTRYPOINT ["/viya4-iac-aws/test/terratest_docker_entrypoint.sh"]

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ The following are also required:
4747

4848
#### Terraform Requirements:
4949

50-
- [Terraform](https://www.terraform.io/downloads.html) v1.9.6
51-
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) - v1.30.6
50+
- [Terraform](https://www.terraform.io/downloads.html) v1.10.5
51+
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) - v1.30.10
5252
- [jq](https://stedolan.github.io/jq/) v1.6
53-
- [AWS CLI](https://aws.amazon.com/cli) (optional; useful as an alternative to the AWS Web Console) v2.17.58
53+
- [AWS CLI](https://aws.amazon.com/cli) (optional; useful as an alternative to the AWS Web Console) v2.24.16
5454

5555
#### Docker Requirements:
5656

5757
- [Docker](https://docs.docker.com/get-docker/)
5858

5959
## Getting Started
6060

61-
Ubuntu 18.04 LTS is the operating system that is used on the jump server and NFS server VMs. Ubuntu creates the `/mnt` location as an ephemeral drive, so it cannot be used as the root location of the `jump_rwx_filestore_path` variable.
61+
Ubuntu 20.04 LTS is the operating system that is used on the jump server and NFS server VMs. Ubuntu creates the `/mnt` location as an ephemeral drive, so it cannot be used as the root location of the `jump_rwx_filestore_path` variable.
6262

6363
### Clone this Project
6464

container-structure-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ commandTests:
1717
- name: "terraform version"
1818
command: "terraform"
1919
args: ["--version"]
20-
expectedOutput: ["Terraform v1.9.6"]
20+
expectedOutput: ["Terraform v1.10.5"]
2121
- name: "aws-cli version"
2222
command: "sh"
2323
args:
2424
- -c
2525
- |
2626
aws --version
27-
expectedOutput: ["aws-cli/2.17.58"]
27+
expectedOutput: ["aws-cli/2.24.16"]
2828

2929
metadataTest:
3030
workdir: "/viya4-iac-aws"

docs/CONFIG-VARS.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ By default, two custom IAM policies and two custom IAM roles (with instance prof
187187

188188
| <div style="width:50px">Name</div> | <div style="width:150px">Description</div> | <div style="width:50px">Type</div> | <div style="width:75px">Default</div> | <div style="width:150px">Notes</div> |
189189
| :--- | :--- | :--- | :--- | :--- |
190-
| cluster_iam_role_arn | ARN of the pre-existing IAM role for the EKS cluster | string | null | If an existing EKS cluster IAM role is being used, the IAM role's 'ARN' is required. |
190+
| cluster_iam_role_arn | Amazon Resource Name (ARN) of the pre-existing IAM role for the EKS cluster | string | null | If an existing EKS cluster IAM role is being used, the IAM role's 'ARN' is required. |
191191
| workers_iam_role_arn | ARN of the pre-existing IAM role for the cluster node VMs | string | null | If an existing EKS node IAM role is being used, the IAM role's 'ARN' is required. |
192192

193193
The cluster IAM role must include three AWS-managed policies and one custom policy.
@@ -266,6 +266,8 @@ Custom policy:
266266
| autoscaling_enabled | Enable cluster autoscaling | bool | true | |
267267
| ssh_public_key | File name of public ssh key for jump and nfs VM | string | "~/.ssh/id_rsa.pub" | Required with `create_jump_vm=true` or `storage_type=standard` |
268268
| cluster_api_mode | Public or private IP for the cluster api| string|"public"|Valid Values: "public", "private" |
269+
| authentication_mode | The authentication mode for the EKS cluster.| string|"API_AND_CONFIG_MAP"| Valid values are CONFIG_MAP, API or API_AND_CONFIG_MAP |
270+
| admin_access_entry_role_arns | Create an EKS access entry associated with the AmazonEKSClusterAdminPolicy for each of the existing IAM role ARNs that are included in this list. | list of strings | | **Note:** Do not include the assumed-role that is used to authenticate to Terraform in this list. The format for role ARNs resembles the following example: "arn:aws:iam::<Account_ID>:role/<rolename>"|
269271

270272
## Node Pools
271273

@@ -388,8 +390,8 @@ Each server element, like `foo = {}`, can contain none, some, or all of the para
388390
| <div style="width:50px">Name</div> | <div style="width:150px">Description</div> | <div style="width:50px">Type</div> | <div style="width:75px">Default</div> | <div style="width:150px">Notes</div> |
389391
| :--- | :--- | :--- | :--- | :--- |
390392
| server_version | The version of the PostgreSQL server | string | "15" | Refer to the [SAS Viya platform Administration Guide](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. |
391-
| instance_type | The VM type for the PostgreSQL Server | string | "db.m5.xlarge" | |
392-
| storage_size | Max storage allowed for the PostgreSQL server in MB | number | 50 | |
393+
| instance_type | The VM type for the PostgreSQL Server | string | "db.m6idn.xlarge" | |
394+
| storage_size | Max storage allowed for the PostgreSQL server in GB | number | 128 | |
393395
| backup_retention_days | Backup retention days for the PostgreSQL server | number | 7 | Supported values are between 7 and 35 days. |
394396
| storage_encrypted | Encrypt PostgreSQL data at rest | bool | false| |
395397
| administrator_login | The Administrator Login for the PostgreSQL Server | string | "pgadmin" | The admin login name can not be 'admin', must start with a letter, and must be between 1-16 characters in length, and can only contain underscores, letters, and numbers. Changing this forces a new resource to be created |
@@ -410,8 +412,8 @@ postgres_servers = {
410412
administrator_password = "D0ntL00kTh1sWay"
411413
},
412414
cds-postgres = {
413-
instance_type = "db.m5.xlarge"
414-
storage_size = 50
415+
instance_type = "db.m6idn.xlarge"
416+
storage_size = 128
415417
storage_encrypted = false
416418
backup_retention_days = 7
417419
multi_az = false

0 commit comments

Comments
 (0)