Skip to content

Commit

Permalink
Aks node resource group (#1649)
Browse files Browse the repository at this point in the history
* adding support for node_resource_group

* Fixing syntax error

* Changing language in documentation
  • Loading branch information
Matt Betts authored and tombuildsstuff committed Jul 26, 2018
1 parent 788d959 commit a55d19e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions azurerm/data_source_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ func dataSourceArmKubernetesCluster() *schema.Resource {
Computed: true,
},

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

"kube_config": {
Type: schema.TypeList,
Computed: true,
Expand Down Expand Up @@ -233,6 +238,7 @@ func dataSourceArmKubernetesClusterRead(d *schema.ResourceData, meta interface{}
d.Set("dns_prefix", props.DNSPrefix)
d.Set("fqdn", props.Fqdn)
d.Set("kubernetes_version", props.KubernetesVersion)
d.Set("node_resource_group", props.NodeResourceGroup)

linuxProfile := flattenKubernetesClusterDataSourceLinuxProfile(props.LinuxProfile)
if err := d.Set("linux_profile", linuxProfile); err != nil {
Expand Down
6 changes: 6 additions & 0 deletions azurerm/resource_arm_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ func resourceArmKubernetesCluster() *schema.Resource {
Computed: true,
},

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

"kube_config": {
Type: schema.TypeList,
Computed: true,
Expand Down Expand Up @@ -394,6 +399,7 @@ func resourceArmKubernetesClusterRead(d *schema.ResourceData, meta interface{})
d.Set("dns_prefix", props.DNSPrefix)
d.Set("fqdn", props.Fqdn)
d.Set("kubernetes_version", props.KubernetesVersion)
d.Set("node_resource_group", props.NodeResourceGroup)

linuxProfile := flattenAzureRmKubernetesClusterLinuxProfile(props.LinuxProfile)
if err := d.Set("linux_profile", linuxProfile); err != nil {
Expand Down
2 changes: 2 additions & 0 deletions website/docs/d/kubernetes_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ The following attributes are exported:

* `kube_config_raw` - Base64 encoded Kubernetes configuration.

* `node_resource_group` - Auto-generated Resource Group containing AKS Cluster resources.

* `kube_config` - A `kube_config` block as defined below.

* `location` - The Azure Region in which the managed Kubernetes Cluster exists.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/kubernetes_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ The following attributes are exported:

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

* `node_resource_group` - Auto-generated Resource Group containing AKS Cluster resources.

* `kube_config_raw` - Base64 encoded Kubernetes configuration

* `kube_config` - Kubernetes configuration, sub-attributes defined below:
Expand Down

0 comments on commit a55d19e

Please sign in to comment.