Skip to content

Commit 9e907cd

Browse files
authored
Merge pull request #359 from sassoftware/staging
8.5.0 - January 19, 2024
2 parents 18c34b8 + e9d36a5 commit 9e907cd

28 files changed

+93
-103
lines changed

.github/workflows/linter-analysis.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Linter Analysis
22
on:
33
push:
4-
branches: ['*'] # '*' will cause the workflow to run on all commits to all branches.
4+
branches: ['**'] # '*' will cause the workflow to run on all commits to all branches.
55

66
jobs:
77
# Hadolint: Job-1
@@ -52,8 +52,11 @@ jobs:
5252
tflint_version: latest
5353
github_token: ${{ secrets.LINTER_TOKEN }}
5454

55+
- name: Initializing viya4-iac-azure
56+
run: terraform init
57+
5558
- name: Initializing TFLint
56-
run: TFLINT_LOG=info tflint --init -c .tflint.hcl
59+
run: TFLINT_LOG=info tflint --init -c "$(pwd)/linting-configs/.tflint.hcl"
5760

5861
- name: Run TFLint Action
59-
run: TFLINT_LOG=info tflint -c .tflint.hcl
62+
run: TFLINT_LOG=info tflint -c "$(pwd)/linting-configs/.tflint.hcl" --recursive

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
ARG TERRAFORM_VERSION=1.6.4
2-
ARG AZURECLI_VERSION=2.54.0
1+
ARG TERRAFORM_VERSION=1.6.6
2+
ARG AZURECLI_VERSION=2.56.0
33

44
FROM hashicorp/terraform:$TERRAFORM_VERSION as terraform
55
FROM mcr.microsoft.com/azure-cli:$AZURECLI_VERSION
6-
ARG KUBECTL_VERSION=1.26.10
6+
ARG KUBECTL_VERSION=1.27.9
77

88
WORKDIR /viya4-iac-azure
99

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ This project supports two options for running Terraform scripts:
5757
Access to an **Azure Subscription** and an [**Identity**](./docs/user/TerraformAzureAuthentication.md) with the *Contributor* role are required.
5858

5959
#### Terraform Requirements:
60-
- [Terraform](https://www.terraform.io/downloads.html) - v1.6.4
61-
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) - v1.26
60+
- [Terraform](https://www.terraform.io/downloads.html) - v1.6.6
61+
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) - v1.27.9
6262
- [jq](https://stedolan.github.io/jq/) - v1.6
63-
- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure) - (optional - useful as an alternative to the Azure Portal) - v2.54.0
63+
- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure) - (optional - useful as an alternative to the Azure Portal) - v2.56.0
6464

6565
#### Docker Requirements:
6666
- [Docker](https://docs.docker.com/get-docker/)

container-structure-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ commandTests:
1717
- name: "terraform version"
1818
command: "terraform"
1919
args: ["--version"]
20-
expectedOutput: ["Terraform v1.6.4"]
20+
expectedOutput: ["Terraform v1.6.6"]
2121
- name: "python version"
2222
command: "python3"
2323
args: ["--version"]
@@ -29,7 +29,7 @@ commandTests:
2929
- -c
3030
- |
3131
az version -o tsv
32-
expectedOutput: ["2.54.0\t2.54.0\t1.1.0"]
32+
expectedOutput: ["2.56.0\t2.56.0\t1.1.0"]
3333

3434
metadataTest:
3535
workdir: "/viya4-iac-azure"

docs/CONFIG-VARS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Ubuntu 20.04 LTS is the operating system used on the Jump/NFS servers. Ubuntu cr
182182
| :--- | ---: | ---: | ---: | ---: |
183183
| 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. |
184184
| 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. |
185-
| kubernetes_version | The AKS cluster Kubernetes version | string | "1.26" |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 |
185+
| kubernetes_version | The AKS cluster Kubernetes version | string | "1.27" |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 |
186186
| create_jump_vm | Create bastion host | bool | true | |
187187
| create_jump_public_ip | Add public IP address to the jump VM | bool | true | |
188188
| 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` |

examples/sample-input-byo.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ container_registry_sku = "Standard"
4545
container_registry_admin_enabled = false
4646

4747
# AKS config
48-
kubernetes_version = "1.26"
48+
kubernetes_version = "1.27"
4949
default_nodepool_min_nodes = 2
5050
default_nodepool_vm_type = "Standard_D8s_v4"
5151

examples/sample-input-connect.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ container_registry_sku = "Standard"
3434
container_registry_admin_enabled = false
3535

3636
# AKS config
37-
kubernetes_version = "1.26"
37+
kubernetes_version = "1.27"
3838
default_nodepool_min_nodes = 2
3939
default_nodepool_vm_type = "Standard_D8s_v4"
4040

examples/sample-input-ha.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ container_registry_sku = "Standard"
3232
container_registry_admin_enabled = false
3333

3434
# AKS config
35-
kubernetes_version = "1.26"
35+
kubernetes_version = "1.27"
3636
default_nodepool_min_nodes = 2
3737
default_nodepool_vm_type = "Standard_D8s_v4"
3838

examples/sample-input-minimal.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ container_registry_sku = "Standard"
3232
container_registry_admin_enabled = false
3333

3434
# AKS config
35-
kubernetes_version = "1.26"
35+
kubernetes_version = "1.27"
3636
default_nodepool_min_nodes = 2
3737
default_nodepool_vm_type = "Standard_D4_v3"
3838
#v3 still has local temp storage

examples/sample-input-postgres.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ container_registry_sku = "Standard"
8686
container_registry_admin_enabled = false
8787

8888
# AKS config
89-
kubernetes_version = "1.26"
89+
kubernetes_version = "1.27"
9090
default_nodepool_min_nodes = 2
9191
default_nodepool_vm_type = "Standard_D8s_v4"
9292

examples/sample-input-ppg.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ container_registry_sku = "Standard"
3333
container_registry_admin_enabled = false
3434

3535
# AKS config
36-
kubernetes_version = "1.26"
36+
kubernetes_version = "1.27"
3737
default_nodepool_min_nodes = 2
3838
default_nodepool_vm_type = "Standard_D8s_v4"
3939

examples/sample-input-singlestore.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ container_registry_sku = "Standard"
3434
container_registry_admin_enabled = false
3535

3636
# AKS config
37-
kubernetes_version = "1.26"
37+
kubernetes_version = "1.27"
3838
default_nodepool_min_nodes = 2
3939
default_nodepool_vm_type = "Standard_D8s_v4"
4040

examples/sample-input.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ container_registry_sku = "Standard"
3434
container_registry_admin_enabled = false
3535

3636
# AKS config
37-
kubernetes_version = "1.26"
37+
kubernetes_version = "1.27"
3838
default_nodepool_min_nodes = 2
3939
default_nodepool_vm_type = "Standard_D8s_v4"
4040

linting-configs/.tflint.hcl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,14 @@ plugin "terraform" {
2626
rule "azurerm_kubernetes_cluster_default_node_pool_invalid_vm_size" {
2727
enabled = false
2828
}
29+
30+
# We specify the versions and providers in the top level versions.tf.
31+
# This stops it from throwing a warning when scanning our modules
32+
# in viya4-iac-azure/modules/
33+
rule "terraform_required_version" {
34+
enabled = false
35+
}
36+
37+
rule "terraform_required_providers" {
38+
enabled = false
39+
}

locals.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ locals {
55

66
# Useful flags
77
ssh_public_key = (var.create_jump_vm || var.storage_type == "standard"
8-
? file(var.ssh_public_key)
8+
? can(file(var.ssh_public_key)) ? file(var.ssh_public_key) : var.ssh_public_key != null ? length(var.ssh_public_key) > 0 ? var.ssh_public_key : null : null
99
: null
1010
)
1111

main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ module "aks" {
131131

132132
aks_cluster_name = "${var.prefix}-aks"
133133
aks_cluster_rg = local.aks_rg.name
134-
aks_cluster_rg_id = local.aks_rg.id
135134
aks_cluster_dns_prefix = "${var.prefix}-aks"
136135
aks_cluster_sku_tier = var.aks_cluster_sku_tier
137136
aks_cluster_location = var.location
@@ -241,7 +240,6 @@ module "netapp" {
241240
prefix = var.prefix
242241
resource_group_name = local.aks_rg.name
243242
location = var.location
244-
vnet_name = module.vnet.name
245243
subnet_id = module.vnet.subnets["netapp"].id
246244
network_features = var.netapp_network_features
247245
service_level = var.netapp_service_level

modules/aks_node_pool/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ variable "min_nodes" {
8585

8686
variable "node_taints" {
8787
description = "A list of the taints added to new nodes during node pool create and scale. Changing this forces a new resource to be created."
88-
type = list(any)
89-
default = []
88+
type = list(any)
89+
default = []
9090
}
9191

9292
variable "node_labels" {

modules/azure_aks/main.tf

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33

44
# Reference: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster
55
resource "azurerm_kubernetes_cluster" "aks" {
6-
name = var.aks_cluster_name
7-
location = var.aks_cluster_location
8-
resource_group_name = var.aks_cluster_rg
9-
dns_prefix = var.aks_private_cluster == false || var.aks_cluster_private_dns_zone_id == "" ? var.aks_cluster_dns_prefix : null
10-
dns_prefix_private_cluster = var.aks_private_cluster && var.aks_cluster_private_dns_zone_id != "" ? var.aks_cluster_dns_prefix : null
11-
12-
sku_tier = var.aks_cluster_sku_tier
13-
role_based_access_control_enabled = true
14-
http_application_routing_enabled = false
15-
6+
name = var.aks_cluster_name
7+
location = var.aks_cluster_location
8+
resource_group_name = var.aks_cluster_rg
9+
dns_prefix = var.aks_private_cluster == false || var.aks_cluster_private_dns_zone_id == "" ? var.aks_cluster_dns_prefix : null
10+
dns_prefix_private_cluster = var.aks_private_cluster && var.aks_cluster_private_dns_zone_id != "" ? var.aks_cluster_dns_prefix : null
11+
12+
sku_tier = var.aks_cluster_sku_tier
13+
role_based_access_control_enabled = true
14+
http_application_routing_enabled = false
15+
1616
# https://docs.microsoft.com/en-us/azure/aks/supported-kubernetes-versions
1717
# az aks get-versions --location eastus -o table
18-
kubernetes_version = var.kubernetes_version
19-
api_server_authorized_ip_ranges = var.aks_cluster_endpoint_public_access_cidrs
20-
private_cluster_enabled = var.aks_private_cluster
21-
private_dns_zone_id = var.aks_private_cluster && var.aks_cluster_private_dns_zone_id != "" ? var.aks_cluster_private_dns_zone_id : (var.aks_private_cluster ? "System" : null)
18+
kubernetes_version = var.kubernetes_version
19+
api_server_authorized_ip_ranges = var.aks_cluster_endpoint_public_access_cidrs
20+
private_cluster_enabled = var.aks_private_cluster
21+
private_dns_zone_id = var.aks_private_cluster && var.aks_cluster_private_dns_zone_id != "" ? var.aks_cluster_private_dns_zone_id : (var.aks_private_cluster ? "System" : null)
2222

2323
network_profile {
2424
network_plugin = var.aks_network_plugin
@@ -45,7 +45,7 @@ resource "azurerm_kubernetes_cluster" "aks" {
4545
content {
4646
admin_username = var.aks_cluster_node_admin
4747
ssh_key {
48-
key_data = var.aks_cluster_ssh_public_key
48+
key_data = var.aks_cluster_ssh_public_key
4949
}
5050
}
5151
}
@@ -80,7 +80,7 @@ resource "azurerm_kubernetes_cluster" "aks" {
8080
dynamic "identity" {
8181
for_each = var.aks_uai_id == null ? [] : [1]
8282
content {
83-
type = "UserAssigned"
83+
type = "UserAssigned"
8484
identity_ids = [var.aks_uai_id]
8585
}
8686
}
@@ -108,8 +108,8 @@ resource "azurerm_kubernetes_cluster" "aks" {
108108

109109
}
110110

111-
data "azurerm_public_ip" "cluster_public_ip" {
112-
count = var.cluster_egress_type == "loadBalancer" ? 1 : 0
111+
data "azurerm_public_ip" "cluster_public_ip" {
112+
count = var.cluster_egress_type == "loadBalancer" ? 1 : 0
113113

114114
# effective_outbound_ips is a set of strings, that needs to be converted to a list type
115115
name = split("/", tolist(azurerm_kubernetes_cluster.aks.network_profile[0].load_balancer_profile[0].effective_outbound_ips)[0])[8]

modules/azure_aks/variables.tf

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ variable "aks_cluster_rg" {
1111
type = string
1212
}
1313

14-
variable "aks_cluster_rg_id" {
15-
description = "The `azurerm_kubernetes_cluster`'s id."
16-
type = string
17-
}
18-
1914
variable "aks_cluster_dns_prefix" {
2015
description = "DNS prefix specified when creating the managed cluster."
2116
type = string
@@ -115,7 +110,7 @@ variable "aks_cluster_max_pods" {
115110
variable "kubernetes_version" {
116111
description = "The AKS cluster K8s version"
117112
type = string
118-
default = "1.26"
113+
default = "1.27"
119114
}
120115

121116
variable "aks_cluster_endpoint_public_access_cidrs" {
@@ -146,7 +141,7 @@ variable "aks_dns_service_ip" {
146141
type = string
147142
default = "10.0.0.10"
148143
validation {
149-
condition = var.aks_dns_service_ip != null ? can(regex("^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$",var.aks_dns_service_ip)) : false
144+
condition = var.aks_dns_service_ip != null ? can(regex("^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", var.aks_dns_service_ip)) : false
150145
error_message = "ERROR: aks_dns_service_ip - value must not be null and must be a valid IP address."
151146
}
152147

@@ -225,6 +220,6 @@ variable "cluster_egress_type" {
225220
}
226221

227222
variable "aks_cluster_private_dns_zone_id" {
228-
type = string
223+
type = string
229224
default = ""
230225
}

modules/azurerm_netapp/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ output "netapp_pool_id" {
1010
}
1111

1212
output "netapp_endpoint" {
13-
value = azurerm_netapp_volume.anf.mount_ip_addresses.0
13+
value = azurerm_netapp_volume.anf.mount_ip_addresses[0]
1414
}
1515

1616
output "netapp_path" {

modules/azurerm_netapp/variables.tf

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# Copyright © 2020-2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
variable create_netapp {
5-
description = "Boolean flag to create Azure NetApp Files"
6-
type = bool
7-
default = false
8-
}
9-
104
variable "prefix" {
115
description = "A prefix used in the name for all the Azure resources created by this script."
126
type = string
@@ -22,11 +16,6 @@ variable "location" {
2216
type = string
2317
}
2418

25-
variable "vnet_name" {
26-
description = "Azure Virtual Network"
27-
type = string
28-
}
29-
3019
variable "subnet_id" {
3120
description = "Azure subnet id for Azure NetApp Files"
3221
type = string

modules/azurerm_postgresql_flex/main.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ resource "azurerm_postgresql_flexible_server" "flexpsql" {
4949
}
5050

5151
resource "azurerm_postgresql_flexible_server_configuration" "flexpsql" {
52-
for_each = {
53-
for config in var.postgresql_configurations:
54-
config.name => config
52+
for_each = {
53+
for config in var.postgresql_configurations :
54+
config.name => config
5555
}
5656

57-
name = each.value.name
58-
server_id = azurerm_postgresql_flexible_server.flexpsql.id
59-
value = each.value.value
57+
name = each.value.name
58+
server_id = azurerm_postgresql_flexible_server.flexpsql.id
59+
value = each.value.value
6060
}
6161

6262
resource "azurerm_postgresql_flexible_server_firewall_rule" "flexpsql" {

modules/azurerm_postgresql_flex/variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,3 @@ variable "delegated_subnet_id" {
9898
description = "The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created."
9999
type = string
100100
}
101-
102-
variable "private_dns_zone_id" {
103-
description = "The ID of the private DNS zone to create the PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created."
104-
type = string
105-
default = null
106-
}

0 commit comments

Comments
 (0)