-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_kubernetes_cluster
- fix tests
#25200
Changes from all commits
1c29aa0
15e5271
862b86f
810ad36
2b0d7ca
1586c1b
ff1dd66
b0fbe33
89db74d
8c10e6c
303bbfe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,6 +142,7 @@ func TestAccKubernetesCluster_roleBasedAccessControlDisabled(t *testing.T) { | |
} | ||
|
||
func TestAccKubernetesCluster_roleBasedAccessControlAAD(t *testing.T) { | ||
t.Skip("Azure AD Integration (legacy) (https://aka.ms/aks/aad-legacy) is deprecated, the cluster could not be created with the Azure AD integration (legacy) enabled.") | ||
data := acceptance.BuildTestData(t, "azurerm_kubernetes_cluster", "test") | ||
r := KubernetesClusterResource{} | ||
clientData := data.Client() | ||
|
@@ -167,6 +168,7 @@ func TestAccKubernetesCluster_roleBasedAccessControlAAD(t *testing.T) { | |
} | ||
|
||
func TestAccKubernetesCluster_roleBasedAccessControlAADUpdate(t *testing.T) { | ||
t.Skip("Azure AD Integration (legacy) (https://aka.ms/aks/aad-legacy) is deprecated, the cluster could not be created with the Azure AD integration (legacy) enabled.") | ||
data := acceptance.BuildTestData(t, "azurerm_kubernetes_cluster", "test") | ||
r := KubernetesClusterResource{} | ||
|
||
|
@@ -193,6 +195,7 @@ func TestAccKubernetesCluster_roleBasedAccessControlAADUpdate(t *testing.T) { | |
} | ||
|
||
func TestAccKubernetesCluster_roleBasedAccessControlAADUpdateToManaged(t *testing.T) { | ||
t.Skip("Azure AD Integration (legacy) (https://aka.ms/aks/aad-legacy) is deprecated, the cluster could not be created with the Azure AD integration (legacy) enabled.") | ||
data := acceptance.BuildTestData(t, "azurerm_kubernetes_cluster", "test") | ||
r := KubernetesClusterResource{} | ||
clientData := data.Client() | ||
|
@@ -458,6 +461,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
vnet_subnet_id = azurerm_subnet.test.id | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -501,6 +507,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -537,6 +546,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -575,6 +587,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -630,6 +645,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -675,6 +693,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -715,6 +736,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -755,6 +779,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -800,6 +827,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -845,6 +875,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you also update the default value for this property for 4.0? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The max_surge = 10% is only for the clusters created with k8s version = 1.28+, so I think we can't add the default value for this field. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The window for supported versions will continue to move so at some point clusters can only be created with k8s version 1.28+. I don't see what is preventing us from having a default value in place for that field for v4.0. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it correct There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this syntax is required for |
||
} | ||
} | ||
|
||
identity { | ||
|
@@ -890,6 +923,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -934,6 +970,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 2 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -977,6 +1016,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -1022,6 +1064,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
identity { | ||
|
@@ -1082,6 +1127,9 @@ resource "azurerm_kubernetes_cluster" "test" { | |
name = "default" | ||
node_count = 1 | ||
vm_size = "Standard_DS2_v2" | ||
upgrade_settings { | ||
max_surge = "10%%" | ||
} | ||
} | ||
|
||
service_principal { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add a deprecation message to the affected properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deprecated use case is specifying
managed = false
, so I think we couldn't add the deprecated message to the field.refs: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster#managed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If AKS doesn't support clusters where
managed = false
i.e. whereclient_app_id
,server_app_id
,server_app_secret
can be specified for that use case, then those properties (includingmanaged
) should have deprecation messages and be removed in v4.0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it! I'll fix it in the next commit.