Skip to content

Commit

Permalink
Export FQDN for managed Kubernetes cluster
Browse files Browse the repository at this point in the history
- Set the FQDN for the Kubernetes cluster
- Deprecate the FQDN on the agent_pool_profile as it's not populated by
Azure for managed Kubernetes
  • Loading branch information
Payam Hekmat committed Feb 28, 2018
1 parent d329df7 commit bd38231
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions azurerm/resource_arm_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ func resourceArmKubernetesCluster() *schema.Resource {
Computed: true,
},

"fqdn": {
Type: schema.TypeString,
Computed: true,
},

"kubernetes_version": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -99,8 +104,9 @@ func resourceArmKubernetesCluster() *schema.Resource {
},

"fqdn": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Deprecated: "This field has been deprecated. Use the parent `fqdn` instead",
},

"vm_size": {
Expand Down Expand Up @@ -246,6 +252,7 @@ func resourceArmKubernetesClusterRead(d *schema.ResourceData, meta interface{})
}
d.Set("resource_group_name", resGroup)
d.Set("dns_prefix", resp.DNSPrefix)
d.Set("fqdn", resp.Fqdn)
d.Set("kubernetes_version", resp.KubernetesVersion)

linuxProfile := flattenAzureRmKubernetesClusterLinuxProfile(*resp.ManagedClusterProperties.LinuxProfile)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/kubernetes_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The following attributes are exported:

* `id` - The Kubernetes Managed Cluster ID.

* `agent_pool_profile.#.fqdn` - The FQDN of the Azure Kubernetes Managed Cluster.
* `fqdn` - The FQDN of the Azure Kubernetes Managed Cluster.

## Import

Expand Down

0 comments on commit bd38231

Please sign in to comment.