Skip to content

Commit

Permalink
fix: Add missing admin_login attribute to azure authentication block (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
denys-octopus authored Nov 19, 2024
1 parent ee600ff commit 696ec1f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/data-sources/kubernetes_cluster_deployment_targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Read-Only:
Read-Only:

- `account_id` (String)
- `admin_login` (String)
- `cluster_name` (String)
- `cluster_resource_group` (String)

Expand Down
4 changes: 4 additions & 0 deletions docs/resources/kubernetes_cluster_deployment_target.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ Required:
- `cluster_name` (String)
- `cluster_resource_group` (String)

Optional:

- `admin_login` (String)


<a id="nestedblock--certificate_authentication"></a>
### Nested Schema for `certificate_authentication`
Expand Down
7 changes: 7 additions & 0 deletions octopusdeploy/schema_kubernetes_azure_authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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,
}}
}

Expand All @@ -43,5 +46,9 @@ func getKubernetesAzureAuthenticationSchema() map[string]*schema.Schema {
Required: true,
Type: schema.TypeString,
},
"admin_login": {
Optional: true,
Type: schema.TypeString,
},
}
}

0 comments on commit 696ec1f

Please sign in to comment.