From ffc302dccd650173690aaa870a9429515c5e0979 Mon Sep 17 00:00:00 2001 From: "denys.kostynchuk" Date: Wed, 20 Nov 2024 10:19:35 +1300 Subject: [PATCH 1/2] Add admin_login attribute to azure authentication for kubernetes deployment target --- octopusdeploy/schema_kubernetes_azure_authentication.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/octopusdeploy/schema_kubernetes_azure_authentication.go b/octopusdeploy/schema_kubernetes_azure_authentication.go index 5d1c08bb8..c478b529e 100644 --- a/octopusdeploy/schema_kubernetes_azure_authentication.go +++ b/octopusdeploy/schema_kubernetes_azure_authentication.go @@ -14,6 +14,8 @@ func expandKubernetesAzureAuthentication(values interface{}) *machines.Kubernete authentication.AuthenticationType = "KubernetesAzure" authentication.ClusterName = flattenedAuthentication["cluster_name"].(string) authentication.ClusterResourceGroup = flattenedAuthentication["cluster_resource_group"].(string) + authentication.AdminLogin = flattenedAuthentication["admin_login"].(string) + return authentication } @@ -26,6 +28,7 @@ func flattenKubernetesAzureAuthentication(kubernetesAzureAuthentication *machine "account_id": kubernetesAzureAuthentication.AccountID, "cluster_name": kubernetesAzureAuthentication.ClusterName, "cluster_resource_group": kubernetesAzureAuthentication.ClusterResourceGroup, + "admin_login": kubernetesAzureAuthentication.AdminLogin, }} } @@ -43,5 +46,9 @@ func getKubernetesAzureAuthenticationSchema() map[string]*schema.Schema { Required: true, Type: schema.TypeString, }, + "admin_login": { + Optional: true, + Type: schema.TypeString, + }, } } From f1988489b42d4045993b2e6db29aacb1b5230aa4 Mon Sep 17 00:00:00 2001 From: "denys.kostynchuk" Date: Wed, 20 Nov 2024 10:40:33 +1300 Subject: [PATCH 2/2] Regenerate docs --- docs/data-sources/kubernetes_cluster_deployment_targets.md | 1 + docs/resources/kubernetes_cluster_deployment_target.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/data-sources/kubernetes_cluster_deployment_targets.md b/docs/data-sources/kubernetes_cluster_deployment_targets.md index 7b7da7741..d1e59eea0 100644 --- a/docs/data-sources/kubernetes_cluster_deployment_targets.md +++ b/docs/data-sources/kubernetes_cluster_deployment_targets.md @@ -110,6 +110,7 @@ Read-Only: Read-Only: - `account_id` (String) +- `admin_login` (String) - `cluster_name` (String) - `cluster_resource_group` (String) diff --git a/docs/resources/kubernetes_cluster_deployment_target.md b/docs/resources/kubernetes_cluster_deployment_target.md index 7e52faee8..f778fd983 100644 --- a/docs/resources/kubernetes_cluster_deployment_target.md +++ b/docs/resources/kubernetes_cluster_deployment_target.md @@ -109,6 +109,10 @@ Required: - `cluster_name` (String) - `cluster_resource_group` (String) +Optional: + +- `admin_login` (String) + ### Nested Schema for `certificate_authentication`