From df450003598689499f08a144caafe31de687c5d8 Mon Sep 17 00:00:00 2001 From: rawmind0 Date: Thu, 16 May 2019 18:56:30 +0200 Subject: [PATCH 1/6] Feat: Added default_project_id & system_project_id attributes to cluster resource. Added option to move namespace resource to a project on import. Go files. --- rancher2/config.go | 79 +++++++++++++++++++++++++++ rancher2/import_rancher2_namespace.go | 26 +++++++-- rancher2/resource_rancher2_cluster.go | 7 ++- rancher2/schema_cluster.go | 8 +++ rancher2/schema_project.go | 5 ++ rancher2/structure_cluster.go | 4 +- rancher2/structure_namespace.go | 12 ++-- rancher2/util.go | 2 +- 8 files changed, 128 insertions(+), 15 deletions(-) diff --git a/rancher2/config.go b/rancher2/config.go index 234255969..a85fac857 100644 --- a/rancher2/config.go +++ b/rancher2/config.go @@ -183,6 +183,34 @@ func (c *Config) GetProjectRoleTemplateBindingsByProjectID(projectID string) ([] return data, err } +func (c *Config) IsProjectDefault(project *managementClient.Project) bool { + if project == nil { + return false + } + + for k, v := range project.Labels { + if k == projectDefaultLabel && v == "true" { + return true + } + } + + return false +} + +func (c *Config) IsProjectSystem(project *managementClient.Project) bool { + if project == nil { + return false + } + + for k, v := range project.Labels { + if k == projectSystemLabel && v == "true" { + return true + } + } + + return false +} + func (c *Config) GetProjectByName(name, clusterID string) (*managementClient.Project, error) { if name == "" { return nil, fmt.Errorf("[ERROR] Project name is nil") @@ -277,6 +305,57 @@ func (c *Config) RoleTemplateExist(id string) error { return nil } +func (c *Config) GetClusterProjects(id string) ([]managementClient.Project, error) { + if id == "" { + return nil, fmt.Errorf("[ERROR] Cluster id is nil") + } + + client, err := c.ManagementClient() + if err != nil { + return nil, err + } + + filters := map[string]interface{}{"clusterId": id} + listOpts := NewListOpts(filters) + + collection, err := client.Project.List(listOpts) + if err != nil { + return nil, err + } + + return collection.Data, nil +} + +func (c *Config) GetClusterSpecialProjectsID(id string) (string, string, error) { + if id == "" { + return "", "", fmt.Errorf("[ERROR] Cluster id is nil") + } + + projects, err := c.GetClusterProjects(id) + if err != nil { + return "", "", err + } + + found := 0 + defaultProjectID := "" + systemProjectID := "" + for _, project := range projects { + if c.IsProjectDefault(&project) { + found += 1 + defaultProjectID = project.ID + } + if c.IsProjectSystem(&project) { + found += 1 + systemProjectID = project.ID + } + if found == 2 { + return defaultProjectID, systemProjectID, nil + } + } + + return defaultProjectID, systemProjectID, nil +} + func (c *Config) GetClusterByName(name string) (*managementClient.Cluster, error) { if name == "" { return nil, fmt.Errorf("[ERROR] Cluster name is nil") diff --git a/rancher2/import_rancher2_namespace.go b/rancher2/import_rancher2_namespace.go index 3603a1441..6e0e459fd 100644 --- a/rancher2/import_rancher2_namespace.go +++ b/rancher2/import_rancher2_namespace.go @@ -1,25 +1,41 @@ package rancher2 import ( + "log" + "github.com/hashicorp/terraform/helper/schema" + clusterClient "github.com/rancher/types/client/cluster/v3" ) func resourceRancher2NamespaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - clusterID, resourceID := splitID(d.Id()) + projectID, resourceID := splitID(d.Id()) + + clusterID, projectID := splitProjectID(projectID) client, err := meta.(*Config).ClusterClient(clusterID) if err != nil { return []*schema.ResourceData{}, err } - err = d.Set("project_id", clusterID) - if err != nil { - return []*schema.ResourceData{}, err - } + ns, err := client.Namespace.ByID(resourceID) if err != nil { return []*schema.ResourceData{}, err } + d.Set("project_id", clusterID) + if projectID != "" { + log.Printf("[INFO] Moving Namespace ID %s to project %s", d.Id(), projectID) + nsMove := &clusterClient.NamespaceMove{ + ProjectID: projectID, + } + + err = client.Namespace.ActionMove(ns, nsMove) + if err != nil { + return []*schema.ResourceData{}, err + } + d.Set("project_id", projectID) + } + err = flattenNamespace(d, ns) if err != nil { return []*schema.ResourceData{}, err diff --git a/rancher2/resource_rancher2_cluster.go b/rancher2/resource_rancher2_cluster.go index 70778bc03..7ec5c0e1d 100644 --- a/rancher2/resource_rancher2_cluster.go +++ b/rancher2/resource_rancher2_cluster.go @@ -113,7 +113,12 @@ func resourceRancher2ClusterRead(d *schema.ResourceData, meta interface{}) error return err } - err = flattenCluster(d, cluster, clusterRegistrationToken, kubeConfig) + defaultProjectID, systemProjectID, err := meta.(*Config).GetClusterSpecialProjectsID(cluster.ID) + if err != nil { + return err + } + + err = flattenCluster(d, cluster, clusterRegistrationToken, kubeConfig, defaultProjectID, systemProjectID) if err != nil { return err } diff --git a/rancher2/schema_cluster.go b/rancher2/schema_cluster.go index 87fd08312..ab919e98d 100644 --- a/rancher2/schema_cluster.go +++ b/rancher2/schema_cluster.go @@ -127,6 +127,14 @@ func clusterFields() map[string]*schema.Schema { Schema: clusterGKEConfigFields(), }, }, + "default_project_id": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "system_project_id": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, "description": &schema.Schema{ Type: schema.TypeString, Optional: true, diff --git a/rancher2/schema_project.go b/rancher2/schema_project.go index edf649a4b..401bc5fdd 100644 --- a/rancher2/schema_project.go +++ b/rancher2/schema_project.go @@ -4,6 +4,11 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) +const ( + projectDefaultLabel = "authz.management.cattle.io/default-project" + projectSystemLabel = "authz.management.cattle.io/system-project" +) + //Schemas func projectResourceQuotaLimitFields() map[string]*schema.Schema { diff --git a/rancher2/structure_cluster.go b/rancher2/structure_cluster.go index 9ac78353a..92b25599a 100644 --- a/rancher2/structure_cluster.go +++ b/rancher2/structure_cluster.go @@ -29,7 +29,7 @@ func flattenClusterRegistationToken(in *managementClient.ClusterRegistrationToke return []interface{}{obj}, nil } -func flattenCluster(d *schema.ResourceData, in *Cluster, clusterRegToken *managementClient.ClusterRegistrationToken, kubeConfig *managementClient.GenerateKubeConfigOutput) error { +func flattenCluster(d *schema.ResourceData, in *Cluster, clusterRegToken *managementClient.ClusterRegistrationToken, kubeConfig *managementClient.GenerateKubeConfigOutput, defaultProjectID, systemProjectID string) error { if in == nil { return fmt.Errorf("[ERROR] flattening cluster: Input cluster is nil") } @@ -67,6 +67,8 @@ func flattenCluster(d *schema.ResourceData, in *Cluster, clusterRegToken *manage } d.Set("kube_config", kubeConfig.Config) + d.Set("default_project_id", defaultProjectID) + d.Set("system_project_id", systemProjectID) d.Set("driver", in.Driver) switch in.Driver { diff --git a/rancher2/structure_namespace.go b/rancher2/structure_namespace.go index b1b1f7559..9308f62f8 100644 --- a/rancher2/structure_namespace.go +++ b/rancher2/structure_namespace.go @@ -96,15 +96,13 @@ func flattenNamespace(d *schema.ResourceData, in *clusterClient.Namespace) error d.Set("name", in.Name) d.Set("description", in.Description) - if in.ResourceQuota != nil { - resourceQuota := flattenNamespaceResourceQuota(in.ResourceQuota) - err := d.Set("resource_quota", resourceQuota) - if err != nil { - return err - } + resourceQuota := flattenNamespaceResourceQuota(in.ResourceQuota) + err := d.Set("resource_quota", resourceQuota) + if err != nil { + return err } - err := d.Set("annotations", toMapInterface(in.Annotations)) + err = d.Set("annotations", toMapInterface(in.Annotations)) if err != nil { return err } diff --git a/rancher2/util.go b/rancher2/util.go index 2989980d6..dbfdd7d7b 100644 --- a/rancher2/util.go +++ b/rancher2/util.go @@ -155,7 +155,7 @@ func splitTokenID(token string) string { } func splitID(id string) (clusterID, resourceID string) { - separator := ":" + separator := "." if strings.Contains(id, separator) { return id[0:strings.Index(id, separator)], id[strings.Index(id, separator)+1:] } From 0000afe716659bcffac7c7c8de92e168f0ad269f Mon Sep 17 00:00:00 2001 From: rawmind0 Date: Thu, 16 May 2019 18:57:29 +0200 Subject: [PATCH 2/6] Feat: Added default_project_id & system_project_id attributes to cluster resource. Test files. --- rancher2/resource_rancher2_node_driver_test.go | 2 +- rancher2/structure_cluster_test.go | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/rancher2/resource_rancher2_node_driver_test.go b/rancher2/resource_rancher2_node_driver_test.go index 7d4bda003..05a6a99da 100644 --- a/rancher2/resource_rancher2_node_driver_test.go +++ b/rancher2/resource_rancher2_node_driver_test.go @@ -33,7 +33,7 @@ resource "rancher2_node_driver" "foo" { ` testAccRancher2NodeDriverUpdateConfig = ` resource "rancher2_node_driver" "foo" { - active = false, + active = false builtin = false checksum = "0x1" description= "Foo description - updated" diff --git a/rancher2/structure_cluster_test.go b/rancher2/structure_cluster_test.go index d15c1ce29..9506661ec 100644 --- a/rancher2/structure_cluster_test.go +++ b/rancher2/structure_cluster_test.go @@ -85,11 +85,13 @@ func init() { testClusterInterfaceAKS = map[string]interface{}{ "id": "id", "name": "test", + "default_project_id": "default_project_id", "description": "description", "cluster_registration_token": testClusterRegistrationTokenInterface, "kube_config": "kube_config", "driver": clusterDriverAKS, "aks_config": testClusterAKSConfigInterface, + "system_project_id": "system_project_id", } testClusterConfEKS = &Cluster{ AmazonElasticContainerServiceConfig: testClusterEKSConfigConf, @@ -100,11 +102,13 @@ func init() { testClusterInterfaceEKS = map[string]interface{}{ "id": "id", "name": "test", + "default_project_id": "default_project_id", "description": "description", "cluster_registration_token": testClusterRegistrationTokenInterface, "kube_config": "kube_config", "driver": clusterDriverEKS, "eks_config": testClusterEKSConfigInterface, + "system_project_id": "system_project_id", } testClusterConfGKE = &Cluster{ GoogleKubernetesEngineConfig: testClusterGKEConfigConf, @@ -115,11 +119,13 @@ func init() { testClusterInterfaceGKE = map[string]interface{}{ "id": "id", "name": "test", + "default_project_id": "default_project_id", "description": "description", "cluster_registration_token": testClusterRegistrationTokenInterface, "kube_config": "kube_config", "driver": clusterDriverGKE, "gke_config": testClusterGKEConfigInterface, + "system_project_id": "system_project_id", } testClusterConfRKE = &Cluster{} testClusterConfRKE.Name = "test" @@ -129,11 +135,13 @@ func init() { testClusterInterfaceRKE = map[string]interface{}{ "id": "id", "name": "test", + "default_project_id": "default_project_id", "description": "description", "cluster_registration_token": testClusterRegistrationTokenInterface, "kube_config": "kube_config", "driver": clusterDriverRKE, "rke_config": testClusterRKEConfigInterface, + "system_project_id": "system_project_id", } } @@ -199,7 +207,7 @@ func TestFlattenCluster(t *testing.T) { for _, tc := range cases { output := schema.TestResourceDataRaw(t, clusterFields(), map[string]interface{}{}) tc.InputToken.ID = "id" - err := flattenCluster(output, tc.Input, tc.InputToken, tc.InputKube) + err := flattenCluster(output, tc.Input, tc.InputToken, tc.InputKube, tc.ExpectedOutput["default_project_id"].(string), tc.ExpectedOutput["system_project_id"].(string)) if err != nil { t.Fatalf("[ERROR] on flattener: %#v", err) } From e76aadd4e4aaf21f3c634e38b2d121d934df0096 Mon Sep 17 00:00:00 2001 From: rawmind0 Date: Thu, 16 May 2019 18:58:05 +0200 Subject: [PATCH 3/6] Feat: Added default_project_id & system_project_id attributes to cluster resource. Added option to move namespace resource to a project on import. Docs files. --- website/docs/r/cluster.html.markdown | 2 ++ website/docs/r/namespace.html.markdown | 36 +++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/website/docs/r/cluster.html.markdown b/website/docs/r/cluster.html.markdown index 3e1ae6395..9a53a1635 100644 --- a/website/docs/r/cluster.html.markdown +++ b/website/docs/r/cluster.html.markdown @@ -97,8 +97,10 @@ The following attributes are exported: * `id` - (Computed) The ID of the resource (string) * `cluster_registration_token` - (Computed) Cluster Registration Token generated for the cluster (list maxitems:1) +* `default_project_id` - (Computed) Default project ID for the cluster (string) * `driver` - (Computed) The driver used for the Cluster. `imported`, `azurekubernetesservice`, `amazonelasticcontainerservice`, `googlekubernetesengine` and `rancherKubernetesEngine` are supported (string) * `kube_config` - (Computed) Kube Config generated for the cluster (string) +* `system_project_id` - (Computed) System project ID for the cluster (string) ## Nested blocks diff --git a/website/docs/r/namespace.html.markdown b/website/docs/r/namespace.html.markdown index ab225ffcc..b7dd09844 100644 --- a/website/docs/r/namespace.html.markdown +++ b/website/docs/r/namespace.html.markdown @@ -28,6 +28,32 @@ resource "rancher2_namespace" "foo" { } ``` +```hcl +# Create a new rancher2 Cluster +resource "rancher2_cluster" "foo-custom" { + name = "foo-custom" + description = "Foo rancher2 custom cluster" + rke_config { + network { + plugin = "canal" + } + } +} +# Create a new rancher2 Namespace assigned to default cluster project +resource "rancher2_namespace" "foo" { + name = "foo" + project_id = "${rancher2_cluster.foo-custom.default_project_id}" + description = "foo namespace" + resource_quota { + limit { + limits_cpu = "100m" + limits_memory = "100Mi" + requests_storage = "1Gi" + } + } +} +``` + ## Argument Reference The following arguments are supported: @@ -83,10 +109,14 @@ More info at [resource-quotas](https://rancher.com/docs/rancher/v2.x/en/k8s-in-r ## Import -Projects can be imported using the namespace ID in the format `:` +Namespaces can be imported using the namespace ID in the format `.` ``` -$ terraform import rancher2_namespace.foo : +$ terraform import rancher2_namespace.foo . ``` -When you import a raw k8s namespace, `project_id=`. It'll not be assigned to any project. To move it into a project, update `project_id=:`. Namespace move is only supported inside same `cluster_id`. +`` is in the format `:`, but part is optional: + +- If full project_id is provided, `=:`, the namespace'll be assigned to corresponding cluster project once it's imported. +- If `` part is omitted `=`, the namespace'll not be assigned to any project. To move it into a project, `=:` needs to be updated in tf file. Namespace movement is only supported inside same `cluster_id`. + From 5bab24f7d5cae922c9c98d06b9e3d96738e8c71b Mon Sep 17 00:00:00 2001 From: rawmind0 Date: Mon, 27 May 2019 20:39:28 +0200 Subject: [PATCH 4/6] Fix: on cluster resource rke_config openstack cloud_provider: Removed used_id field on global argument. Set computed=true on optional field. go files --- ...ter_rke_config_cloud_provider_openstack.go | 20 ++++++++-------- ...ter_rke_config_cloud_provider_openstack.go | 24 +++++++------------ 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/rancher2/schema_cluster_rke_config_cloud_provider_openstack.go b/rancher2/schema_cluster_rke_config_cloud_provider_openstack.go index 1866f538a..1aea08500 100644 --- a/rancher2/schema_cluster_rke_config_cloud_provider_openstack.go +++ b/rancher2/schema_cluster_rke_config_cloud_provider_openstack.go @@ -46,16 +46,6 @@ func clusterRKEConfigCloudProviderOpenstackGlobalFields() map[string]*schema.Sch Required: true, Sensitive: true, }, - "tenant_id": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, - "user_id": { - Type: schema.TypeString, - Required: true, - Sensitive: true, - }, "username": { Type: schema.TypeString, Required: true, @@ -82,6 +72,12 @@ func clusterRKEConfigCloudProviderOpenstackGlobalFields() map[string]*schema.Sch Optional: true, Computed: true, }, + "tenant_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + Computed: true, + }, "tenant_name": { Type: schema.TypeString, Optional: true, @@ -199,6 +195,7 @@ func clusterRKEConfigCloudProviderOpenstackFields() map[string]*schema.Schema { Type: schema.TypeList, MaxItems: 1, Optional: true, + Computed: true, Elem: &schema.Resource{ Schema: clusterRKEConfigCloudProviderOpenstackBlockStorageFields(), }, @@ -207,6 +204,7 @@ func clusterRKEConfigCloudProviderOpenstackFields() map[string]*schema.Schema { Type: schema.TypeList, MaxItems: 1, Optional: true, + Computed: true, Elem: &schema.Resource{ Schema: clusterRKEConfigCloudProviderOpenstackLoadBalancerFields(), }, @@ -215,6 +213,7 @@ func clusterRKEConfigCloudProviderOpenstackFields() map[string]*schema.Schema { Type: schema.TypeList, MaxItems: 1, Optional: true, + Computed: true, Elem: &schema.Resource{ Schema: clusterRKEConfigCloudProviderOpenstackMetadataFields(), }, @@ -223,6 +222,7 @@ func clusterRKEConfigCloudProviderOpenstackFields() map[string]*schema.Schema { Type: schema.TypeList, MaxItems: 1, Optional: true, + Computed: true, Elem: &schema.Resource{ Schema: clusterRKEConfigCloudProviderOpenstackRouteFields(), }, diff --git a/rancher2/structure_cluster_rke_config_cloud_provider_openstack.go b/rancher2/structure_cluster_rke_config_cloud_provider_openstack.go index 27a090b4f..673d959a0 100644 --- a/rancher2/structure_cluster_rke_config_cloud_provider_openstack.go +++ b/rancher2/structure_cluster_rke_config_cloud_provider_openstack.go @@ -42,14 +42,6 @@ func flattenClusterRKEConfigCloudProviderOpenstackGlobal(in *managementClient.Gl obj["password"] = in.Password } - if len(in.TenantID) > 0 { - obj["tenant_id"] = in.TenantID - } - - if len(in.UserID) > 0 { - obj["user_id"] = in.UserID - } - if len(in.Username) > 0 { obj["username"] = in.Username } @@ -70,6 +62,10 @@ func flattenClusterRKEConfigCloudProviderOpenstackGlobal(in *managementClient.Gl obj["region"] = in.Region } + if len(in.TenantID) > 0 { + obj["tenant_id"] = in.TenantID + } + if len(in.TenantName) > 0 { obj["tenant_name"] = in.TenantName } @@ -256,14 +252,6 @@ func expandClusterRKEConfigCloudProviderOpenstackGlobal(p []interface{}) (*manag obj.Password = v } - if v, ok := in["tenant_id"].(string); ok && len(v) > 0 { - obj.TenantID = v - } - - if v, ok := in["user_id"].(string); ok && len(v) > 0 { - obj.UserID = v - } - if v, ok := in["username"].(string); ok && len(v) > 0 { obj.Username = v } @@ -284,6 +272,10 @@ func expandClusterRKEConfigCloudProviderOpenstackGlobal(p []interface{}) (*manag obj.Region = v } + if v, ok := in["tenant_id"].(string); ok && len(v) > 0 { + obj.TenantID = v + } + if v, ok := in["tenant_name"].(string); ok && len(v) > 0 { obj.TenantName = v } From 9b14838b2a862d19eca758c3af5d879c4c17354f Mon Sep 17 00:00:00 2001 From: rawmind0 Date: Mon, 27 May 2019 20:41:36 +0200 Subject: [PATCH 5/6] Fix: on cluster resource rke_config openstack cloud_provider: Removed used_id field on global argument. Set computed=true on optional field. test and doc files --- ...ke_config_cloud_provider_openstack_test.go | 2 -- website/docs/r/cluster.html.markdown | 23 +++++++++---------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/rancher2/structure_cluster_rke_config_cloud_provider_openstack_test.go b/rancher2/structure_cluster_rke_config_cloud_provider_openstack_test.go index 87643d70d..388961046 100644 --- a/rancher2/structure_cluster_rke_config_cloud_provider_openstack_test.go +++ b/rancher2/structure_cluster_rke_config_cloud_provider_openstack_test.go @@ -39,7 +39,6 @@ func init() { AuthURL: "auth.terraform.test", Password: "XXXXXXXX", TenantID: "YYYYYYYY", - UserID: "ZZZZZZZZ", Username: "user", CAFile: "ca_file", DomainID: "domain_id", @@ -53,7 +52,6 @@ func init() { "auth_url": "auth.terraform.test", "password": "XXXXXXXX", "tenant_id": "YYYYYYYY", - "user_id": "ZZZZZZZZ", "username": "user", "ca_file": "ca_file", "domain_id": "domain_id", diff --git a/website/docs/r/cluster.html.markdown b/website/docs/r/cluster.html.markdown index 9a53a1635..03b6dc499 100644 --- a/website/docs/r/cluster.html.markdown +++ b/website/docs/r/cluster.html.markdown @@ -235,10 +235,10 @@ The following attributes are exported: ###### Arguments * `global` - (Required) (list maxitems:1) -* `block_storage` - (Optional) (list maxitems:1) -* `load_balancer` - (Optional) (list maxitems:1) -* `metadata` - (Optional) (list maxitems:1) -* `route` - (Optional) (list maxitems:1) +* `block_storage` - (Optional/Computed) (list maxitems:1) +* `load_balancer` - (Optional/Computed) (list maxitems:1) +* `metadata` - (Optional/Computed) (list maxitems:1) +* `route` - (Optional/Computed) (list maxitems:1) ###### `global` @@ -246,14 +246,13 @@ The following attributes are exported: * `auth_url` - (Required) (string) * `password` - (Required/Sensitive) (string) -* `tenant_id` - (Required/Sensitive) (string) -* `user_id` - (Required/Sensitive) (string) * `username` - (Required/Sensitive) (string) * `ca_file` - (Optional/Computed) (string) -* `domain_id` - (Optional/Computed/Sensitive) (string) -* `domain_name` - (Optional/Computed) (string) +* `domain_id` - (Optional/Computed/Sensitive) Required if `domain_name` not provided. (string) +* `domain_name` - (Optional/Computed) Required if `domain_id` not provided. (string) * `region` - (Optional/Computed) (string) -* `tenant_name` - (Optional/Computed) (string) +* `tenant_id` - (Optional/Computed/Sensitive) Required if `tenant_name` not provided. (string) +* `tenant_name` - (Optional/Computed) Required if `tenant_id` not provided. (string) * `trust_id` - (Optional/Computed/Sensitive) (string) ###### `block_storage` @@ -274,9 +273,9 @@ The following attributes are exported: * `lb_provider` - (Optional/Computed) (string) * `lb_version` - (Optional/Computed) (string) * `manage_security_groups` - (Optional/Computed) (bool) -* `monitor_delay` - (Optional/Computed) Default 60 (int) -* `monitor_max_retries` - (Optional/Computed) Default 5 (int) -* `monitor_timeout` - (Optional/Computed) Default 30 (int) +* `monitor_delay` - (Optional/Computed) Default `60` (int) +* `monitor_max_retries` - (Optional/Computed) Default `5` (int) +* `monitor_timeout` - (Optional/Computed) Default `30` (int) * `subnet_id` - (Optional/Computed) (string) * `use_octavia` - (Optional/Computed) (bool) From fdb971f5ca898a161374286936983956d4dd39a6 Mon Sep 17 00:00:00 2001 From: rawmind0 Date: Thu, 16 May 2019 19:07:06 +0200 Subject: [PATCH 6/6] Updated CHANGELOG.md --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d0c83d9d..ae0930ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,20 @@ ## 1.0.1 (Unreleased) + +FEATURES: + +ENHANCEMENTS: + +* Added `default_project_id` & `system_project_id` attributes to `rancher2_cluster` resource +* Added support to move `rancher2_namespace` resource to a rancher project when import +* Added support to terraform 0.12 + +BUG FIXES: + +* Fix: Updated `flattenNamespace` function on `rancher2_namespace` resource to avoid no empty plan if `resource_quota` is not specified +* Fix: Updated `rke_config` argument for openstack cloud_provider on `rancher2_cluster` resource: + * Removed `used_id` field on global argument in favour of `username` following [k8s openstack cloud provider docs](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/provider-configuration.md#global-required-parameters) + * Set computed=true on optional field to avoid no empty plan if not specified + ## 1.0.0 (May 14, 2019) * Initial Terraform Ecosystem Release