Skip to content

Commit 82c90f0

Browse files
authored
Merge pull request #483 from sassoftware/staging
10.3.0 - April 16, 2025
2 parents 4d69214 + af5ac6c commit 82c90f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1557
-1370
lines changed

.github/workflows/container-structure-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
acceptance:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313

1414
- name: Build the Docker image
1515
run: docker build . --file Dockerfile --tag sas-iac-aks:local
1616

1717
- name: Container Structure Test Action
18-
uses: plexsystems/container-structure-test-action@v0.2.0
18+
uses: plexsystems/container-structure-test-action@v0.3.0
1919
with:
2020
image: sas-iac-aks:local
2121
config: container-structure-test.yaml

.github/workflows/linter-analysis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Repo
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Run Hadolint Action
18-
uses: jbergstroem/hadolint-gh-action@v1.11.0
18+
uses: jbergstroem/hadolint-gh-action@v1.12.2
1919
with:
2020
dockerfile: ./Dockerfile
2121
config_file: linting-configs/.hadolint.yaml
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout Repo
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131

3232
- name: Run ShellCheck Action
3333
uses: ludeeus/action-shellcheck@master
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
steps:
4242
- name: Checkout Repo
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444

4545
- name: Cache Plugin Directory
4646
uses: actions/cache@v3
@@ -55,7 +55,7 @@ jobs:
5555
terraform_wrapper: false
5656

5757
- name: Setup TFLint
58-
uses: terraform-linters/setup-tflint@v3.0.0
58+
uses: terraform-linters/setup-tflint@v4.1.1
5959
with:
6060
tflint_version: latest
6161
github_token: ${{ secrets.LINTER_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ sas_iac_buildinfo.yaml
1313
.vscode
1414
test/bin
1515
test/pkg
16-
test/test_output
16+
test/testoutput

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG AZURECLI_VERSION=2.70.0
33

44
FROM hashicorp/terraform:$TERRAFORM_VERSION AS terraform
55
FROM mcr.microsoft.com/azure-cli:$AZURECLI_VERSION
6-
ARG KUBECTL_VERSION=1.30.10
6+
ARG KUBECTL_VERSION=1.31.6
77

88
WORKDIR /viya4-iac-azure
99

Dockerfile.terratest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23
1+
FROM golang:1.24
22

33
# Install terraform from apt repository and terratest_log_parser
44
RUN \

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# SAS Viya 4 Infrastructure as Code (IaC) for Microsoft Azure
22

3+
## Table of Contents
4+
- [Overview](#overview)
5+
- [Prerequisites](#prerequisites)
6+
- [Technical Prerequisites](#technical-prerequisites)
7+
- [Terraform Requirements](#terraform-requirements)
8+
- [Docker Requirements](#docker-requirements)
9+
- [Getting Started](#getting-started)
10+
- [Clone this Project](#clone-this-project)
11+
- [Authenticating Terraform to Access Microsoft Azure](#authenticating-terraform-to-access-microsoft-azure)
12+
- [Customizing Input Values](#customizing-input-values)
13+
- [Creating and Managing the Cloud Resources](#creating-and-managing-the-cloud-resources)
14+
- [Troubleshooting](#troubleshooting)
15+
- [Security](#security)
16+
- [Contributing](#contributing)
17+
- [License](#license)
18+
- [Additional Resources](#additional-resources)
19+
- [Azure Resources](#azure-resources)
20+
- [Terraform Resources](#terraform-resources)
21+
322
## Overview
423

524
This project helps you to automate the cluster-provisioning phase of SAS Viya platform deployment. It contains Terraform scripts to provision the Microsoft Azure Cloud infrastructure resources that are required to deploy SAS Viya platform product offerings. Here is a list of resources that this project can create:
@@ -58,7 +77,7 @@ Access to an **Azure Subscription** and an [**Identity**](./docs/user/TerraformA
5877

5978
#### Terraform Requirements:
6079
- [Terraform](https://www.terraform.io/downloads.html) - v1.10.5
61-
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) - v1.30.10
80+
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) - v1.31.6
6281
- [jq](https://stedolan.github.io/jq/) - v1.6
6382
- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure) - (optional - useful as an alternative to the Azure Portal) - v2.70.0
6483

container-structure-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ commandTests:
3636
- name: "kubectl version"
3737
command: "kubectl"
3838
args: ["version", "--client"]
39-
expectedOutput: ["Client Version: v1.30.10"]
39+
expectedOutput: ["Client Version: v1.31.6"]
4040

4141
metadataTest:
4242
workdir: "/viya4-iac-azure"

docs/CONFIG-VARS.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@ The ability to manage RBAC for Kubernetes resources from Azure gives you the cho
6161
Following are the possible ways to configure Authentication and Authorization in an AKS cluster:
6262
1. Authentication using local accounts with Kubernetes RBAC. This is traditionally used and current default, see details [here](https://learn.microsoft.com/en-us/azure/aks/concepts-identity#kubernetes-rbac)
6363
2. Microsoft Entra authentication with Kubernetes RBAC. See details [here](https://learn.microsoft.com/en-us/azure/aks/azure-ad-rbac)
64+
3. Microsoft Entra authentication with Azure RBAC. See details [here](https://learn.microsoft.com/en-us/azure/aks/manage-azure-rbac)
6465

65-
| Name | Description | Type | Default |
66-
| :--- | ---: | ---: | ---: |
67-
| rbac_aad_enabled | Enables Azure Active Directory integration with Kubernetes RBAC. | bool | false |
68-
| rbac_aad_admin_group_object_ids | A list of Object IDs of Azure Active Directory Groups which should have Admin Role on the Cluster. | list(string) | null |
69-
| rbac_aad_tenant_id | (Optional) The Tenant ID used for Azure Active Directory Application. If this isn't specified the Tenant ID of the current Subscription is used.| string | |
66+
| Name | Description | Type | Default | Notes |
67+
| :--- | ---: | ---: | ---: | ---: |
68+
| rbac_aad_enabled | Enables Azure Active Directory integration with Kubernetes or Azure RBAC. | bool | false |
69+
| rbac_aad_azure_rbac_enabled | Enables Azure RBAC. If false and `rbac_aad_enabled` is true`, Kubernetes RBAC is used. Only relevant if rbac_aad_enabled is true. | bool | false |
70+
| rbac_aad_admin_group_object_ids | A list of Object IDs of Azure Active Directory Groups which should have Admin Role on the Cluster. | list(string) | null | One of `rbac_aad_admin_group_object_ids` or `rbac_aad_tenant_id` is required if `rbac_aad_enabled` is true. Not relevant if `rbac_aad_azure_rbac_enabled` is true.
71+
| rbac_aad_tenant_id | (Optional) The Tenant ID used for Azure Active Directory Application. If this isn't specified, the Tenant ID of the current Subscription is used.| string | | One of `rbac_aad_admin_group_object_ids` or `rbac_aad_tenant_id` is required if `rbac_aad_enabled` is true.
7072

7173
## Admin Access
7274

@@ -197,21 +199,27 @@ Ubuntu 20.04 LTS is the operating system used on the Jump/NFS servers. Ubuntu cr
197199
| :--- | ---: | ---: | ---: | ---: |
198200
| partner_id | A GUID that is registered with Microsoft to facilitate partner resource usage attribution | string | "5d27f3ae-e49c-4dea-9aa3-b44e4750cd8c" | Defaults to SAS partner GUID. When you deploy this Terraform configuration, Microsoft can identify the installation of SAS software with the deployed Azure resources. Microsoft can then correlate the resources that are used to support the software. Microsoft collects this information to provide the best experiences with their products and to operate their business. The data is collected and governed by Microsoft's privacy policies, located at https://www.microsoft.com/trustcenter. |
199201
| create_static_kubeconfig | Allows the user to create a provider / service account-based kubeconfig file | bool | true | A value of `false` will default to using the cloud provider's mechanism for generating the kubeconfig file. A value of `true` will create a static kubeconfig that uses a `Service Account` and `Cluster Role Binding` to provide credentials. |
200-
| kubernetes_version | The AKS cluster Kubernetes version | string | "1.30" |Use of specific versions is still supported. If you need exact kubernetes version please use format `x.y.z`, where `x` is the major version, `y` is the minor version, and `z` is the patch version |
202+
| kubernetes_version | The AKS cluster Kubernetes version | string | "1.31" | Use of specific versions is still supported. If you need exact kubernetes version please use format `x.y.z`, where `x` is the major version, `y` is the minor version, and `z` is the patch version |
201203
| create_jump_vm | Create bastion host | bool | true | |
202204
| create_jump_public_ip | Add public IP address to the jump VM | bool | true | |
203205
| enable_jump_public_static_ip | Enables `Static` allocation method for the public IP address of Jump Server. Setting false will enable `Dynamic` allocation method. | bool | true | Only used with `create_jump_public_ip=true` |
204206
| jump_vm_admin | Operating system Admin User for the jump VM | string | "jumpuser" | |
205-
| jump_vm_machine_type | SKU to use for the jump VM | string | "Standard_B2s" | To check for valid types for your subscription, run: `az vm list-skus --resource-type virtualMachines --subscription $subscription --location $location -o table`|
207+
| jump_vm_machine_type | SKU to use for the jump VM | string | "Standard_B2s" | To check for valid types for your subscription, run: `az vm list-skus --resource-type virtualMachines --subscription $subscription --location $location -o table` |
206208
| jump_rwx_filestore_path | File store mount point on jump server | string | "/viya-share" | This location cannot include `/mnt` as its root location. This disk is ephemeral on Ubuntu, which is the operating system being used for the jump/NFS servers. |
207209
| tags | Map of common tags to be placed on all Azure resources created by this script | map | { project_name = "sasviya4", environment = "dev" } | |
208-
| aks_identity | Use UserAssignedIdentity or Service Principal as [AKS identity](https://docs.microsoft.com/en-us/azure/aks/concepts-identity) | string | "uai" | A value of `uai` wil create a Managed Identity based on the permissions of the authenticated user or use [`AKS_UAI_NAME`](#use-existing), if set. A value of `sp` will use values from [`CLIENT_ID`/`CLIENT_SECRET`](#azure-authentication), if set. |
210+
| aks_identity | Use UserAssignedIdentity or Service Principal as [AKS identity](https://docs.microsoft.com/en-us/azure/aks/concepts-identity) | string | "uai" | A value of `uai` wil create a Managed Identity based on the permissions of the authenticated user or use [`AKS_UAI_NAME`](#use-existing), if set. A value of `sp` will use values from [`CLIENT_ID`/`CLIENT_SECRET`](#azure-authentication), if set. |
209211
| 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` |
210212
| cluster_api_mode | Public or private IP for the cluster api | string | "public" | Valid Values: "public", "private" |
211213
| aks_cluster_private_dns_zone_id | Specifies private DNS zone resource ID for AKS private cluster to use | string | "" | For `cluster_api_mode=private` if `aks_cluster_private_dns_zone_id` is not specified then the value `System` is used else it is set to null. For details see [Configure a private DNS zone](https://learn.microsoft.com/en-us/azure/aks/private-clusters?tabs=azure-portal#configure-a-private-dns-zone) |
212214
| aks_cluster_sku_tier | The SKU Tier that should be used for this Kubernetes Cluster. Optimizes api server for cost vs availability | string | "Free" | Valid Values: "Free", "Standard" and "Premium" |
213-
| cluster_support_tier | Specifies the support plan which should be used for this Kubernetes Cluster. | string | "KubernetesOfficial" | Possible values are `KubernetesOfficial` and `AKSLongTermSupport`. To enable long term K8s support is a combination of setting `aks_cluster_sku_tier` to `Premium` tier and explicitly selecting the `cluster_support_tier` as `AKSLongTermSupport`. For details see [Long term Support](https://learn.microsoft.com/en-us/azure/aks/long-term-support) and for which K8s version has long term support see [AKS Kubernetes release calendar](https://learn.microsoft.com/en-us/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-kubernetes-release-calendar).|
215+
| cluster_support_tier | Specifies the support plan which should be used for this Kubernetes Cluster. | string | "KubernetesOfficial" | Possible values are `KubernetesOfficial` and `AKSLongTermSupport`. To enable long term K8s support is a combination of setting `aks_cluster_sku_tier` to `Premium` tier and explicitly selecting the `cluster_support_tier` as `AKSLongTermSupport`. For details see [Long term Support](https://learn.microsoft.com/en-us/azure/aks/long-term-support) and for which K8s version has long term support see [AKS Kubernetes release calendar](https://learn.microsoft.com/en-us/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-kubernetes-release-calendar). |
216+
| aks_cluster_run_command_enabled | Enable or disable the AKS Run Command feature | bool | false | The AKS Run Command feature in AKS allows you to remotely execute commands within a running container of your AKS cluster directly from the Azure CLI or Azure portal. To enable the Run Command feature for an AKS cluster where Run Command is disabled, navigate to the Run Command tab for your AKS Cluster in the Azure Portal and select the Enable button. |
217+
| aks_azure_policy_enabled | Enable or disable the Azure Policy Add-on or extension | bool | false | Azure Policy makes it possible to manage and report on the compliance state of your Kubernetes cluster components from one place. By using Azure Policy's Add-on or Extension, governing your cluster components is enhanced with Azure Policy features, like the ability to use selectors and overrides for safe policy rollout and rollback. |
218+
| node_resource_group_name | Specifies the resource group name for the cluster resources | string | `MC_${local.aks_rg.name}_${var.prefix}-aks_${var.location}` | |
219+
| aks_cluster_sku_tier | The SKU Tier that should be used for this Kubernetes Cluster. Optimizes api server for cost vs availability | string | "Free" | Valid Values: "Free", "Standard" and "Premium" |
220+
| cluster_support_tier | Specifies the support plan which should be used for this Kubernetes Cluster. | string | "KubernetesOfficial" | Possible values are `KubernetesOfficial` and `AKSLongTermSupport`. To enable long term K8s support is a combination of setting `aks_cluster_sku_tier` to `Premium` tier and explicitly selecting the `cluster_support_tier` as `AKSLongTermSupport`. For details see [Long term Support](https://learn.microsoft.com/en-us/azure/aks/long-term-support) and for which K8s version has long term support see [AKS Kubernetes release calendar](https://learn.microsoft.com/en-us/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-kubernetes-release-calendar).|
214221
| aks_cluster_run_command_enabled | Enable or disable the AKS Run Command feature | bool | false | The AKS Run Command feature in AKS allows you to remotely execute commands within a running container of your AKS cluster directly from the Azure CLI or Azure portal. To enable the Run Command feature for an AKS cluster where Run Command is disabled, navigate to the Run Command tab for your AKS Cluster in the Azure Portal and select the Enable button. |
222+
| aks_azure_policy_enabled | Enable or disable the Azure Policy Add-on or extension | bool | false | Azure Policy makes it possible to manage and report on the compliance state of your Kubernetes cluster components from one place. By using Azure Policy's Add-on or Extension, governing your cluster components is enhanced with Azure Policy features, like the ability to use selectors and overrides for safe policy rollout and rollback. |
215223

216224
## Node Pools
217225

@@ -229,17 +237,18 @@ Ubuntu 20.04 LTS is the operating system used on the Jump/NFS servers. Ubuntu cr
229237

230238
### Additional Node Pools
231239

232-
Additional node pools can be created separate from the default node pool. This is done with the `node_pools` variable, which is a map of objects. Irrespective of the default values, the following variables are required for each node pool:
240+
Additional node pools can be created separate from the default node pool. This is done with the `node_pools` variable, which is a map of objects. Irrespective of the default values, the following variables are required for each node pool unless marked optional:
233241

234242
| Name | Description | Type | Notes |
235243
| :--- | ---: | ---: | ---: |
236244
| machine_type | Type of the node pool VMs | string | |
237245
| os_disk_size | Disk size for node pool VMs in GB | number | |
238246
| min_nodes | Minimum number of nodes for the node pool | number | Value must be between 0 and 100. Setting min and max node counts to the same value disables autoscaling |
239247
| max_nodes | Maximum number of nodes for the node pool | number | Value must be between 0 and 100. Setting min and max node counts to the same value disables autoscaling |
240-
| max_pods | Maximum number of pods per node | number | Default is 110
248+
| max_pods | Maximum number of pods per node | number | Default is 110 |
241249
| node_taints | Taints for the node pool VMs | list of strings | |
242250
| node_labels | Labels to add to the node pool VMs | map | |
251+
| vm_max_map_count (Optional) | Linux kernel parameter that defines the maximum number of memory map areas that a process can have | map | Value is set as follows: "linux_os_config" = {"sysctl_config" = {"vm_max_map_count" = 262144}} |
243252

244253
The default values for the `node_pools` variable are as follows:
245254

@@ -378,7 +387,7 @@ Each server element, like `foo = {}`, can contain none, some, or all of the para
378387
| server_version | The version of the PostgreSQL Flexible server instance | 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. |
379388
| ssl_enforcement_enabled | Enforce SSL on connection to the Azure Database for PostgreSQL Flexible server instance | bool | true | |
380389
| connectivity_method | Network connectivity option to connect to your flexible server. There are two connectivity options available: Public access (allowed IP addresses) and Private access (VNet Integration). Defaults to public access with firewall rules enabled.| string | "public" | Valid options are `public` and `private`. See sample input file [here](../examples/sample-input-postgres.tfvars) and Private access documentation [here](./user/PostgreSQLPrivateAccess.md). For more details see [Networking overview](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-networking) |
381-
| postgresql_configurations | Sets a PostgreSQL Configuration value on a Azure PostgreSQL Flexible Server | list(object) | [] | More details can be found [here](https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/howto-configure-server-parameters-using-cli) |
390+
| postgresql_configurations | Sets a PostgreSQL Configuration value on a Azure PostgreSQL Flexible Server | list(object) | [{ name : "azure.extensions", value : "PLPGSQL,PGCRYPTO" }] | More details can be found [here](https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/howto-configure-server-parameters-using-cli) |
382391

383392
Multiple SAS offerings require a second PostgreSQL instance referred to as SAS Common Data Store, or CDS PostgreSQL. For more information, see [Common Customizations](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=dplyml0phy0dkr&docsetTarget=n08u2yg8tdkb4jn18u8zsi6yfv3d.htm#p0wkxxi9s38zbzn19ukjjaxsc0kl). A list of SAS offerings that require CDS PostgreSQL is provided in [SAS Common Data Store Requirements](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#n03wzanutmc6gon1val5fykas9aa). To create and configure an external CDS PostgreSQL instance in addition to the external platform PostgreSQL instance named `default`, specify `cds-postgres` as a second PostgreSQL instance, as shown in the example below.
384393

@@ -391,7 +400,7 @@ postgres_servers = {
391400
postgresql_configurations = [
392401
{
393402
name = "azure.extensions"
394-
value = "PLPGSQL,LTREE"
403+
value = "PLPGSQL,PGCRYPTO,LTREE"
395404
}
396405
]
397406
},

0 commit comments

Comments
 (0)