From 52a4ac4e030412dca7bf5c9d88094f45e71b4495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BC=D0=BE=D0=BB=D0=BA=D0=B8=D0=BD=20=D0=9F=D0=B0?= =?UTF-8?q?=D0=B2=D0=B5=D0=BB=20=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B8=D1=87?= Date: Thu, 14 Oct 2021 18:39:42 +0300 Subject: [PATCH 1/9] resourcemanager: add `folders` attribute to `yandex_resourcemanager_cloud` datasource --- CHANGELOG.md | 1 + ...source_resourcemanager_cloud.html.markdown | 1 + ...ata_source_yandex_resourcemanager_cloud.go | 29 +++++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89d76dbdc..5c3b2ad03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.65.0 (Unreleased) FEATURES: * mdb: support Schema Registry in `yandex_mdb_kafka_cluster` +* resourcemanager: data source `yandex_resourcemanager_cloud` now provides `folders` attribute FEATURES: * **New Resource:** `yandex_kms_symmetric_key_iam_binding` diff --git a/website/docs/d/datasource_resourcemanager_cloud.html.markdown b/website/docs/d/datasource_resourcemanager_cloud.html.markdown index ce2c562a4..45ebbcc5f 100644 --- a/website/docs/d/datasource_resourcemanager_cloud.html.markdown +++ b/website/docs/d/datasource_resourcemanager_cloud.html.markdown @@ -39,3 +39,4 @@ The following attributes are returned: * `name` - Name of the cloud. * `description` - Description of the cloud. * `created_at` - Cloud creation timestamp. +* `folders` - List of folders in the cloud diff --git a/yandex/data_source_yandex_resourcemanager_cloud.go b/yandex/data_source_yandex_resourcemanager_cloud.go index 0465500f3..2c424242f 100644 --- a/yandex/data_source_yandex_resourcemanager_cloud.go +++ b/yandex/data_source_yandex_resourcemanager_cloud.go @@ -32,6 +32,25 @@ func dataSourceYandexResourceManagerCloud() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "folders": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "folder_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + }, + }, }, } } @@ -59,6 +78,15 @@ func dataSourceYandexResourceManagerCloudRead(d *schema.ResourceData, meta inter CloudId: cloudID, }) + req := &resourcemanager.ListFoldersRequest{CloudId: cloudID} + it := config.sdk.ResourceManager().Folder().FolderIterator(ctx, req) + var folders []map[string]string + for it.Next() { + id := it.Value().GetId() + name := it.Value().Name + folders = append(folders, map[string]string{"name": name, "folder_id": id}) + } + if err != nil { return fmt.Errorf("failed to resolve data source cloud by id: %v", err) } @@ -67,6 +95,7 @@ func dataSourceYandexResourceManagerCloudRead(d *schema.ResourceData, meta inter d.Set("name", cloud.Name) d.Set("description", cloud.Description) d.Set("created_at", getTimestamp(cloud.CreatedAt)) + d.Set("folders", folders) d.SetId(cloud.Id) return nil From 5338dcc56c29fc69bf223b0efbc060c3de37f174 Mon Sep 17 00:00:00 2001 From: houstonheat Date: Thu, 11 Nov 2021 22:07:11 +0300 Subject: [PATCH 2/9] Add missed member type to function_iam_binding doc --- website/docs/r/function_iam_binding.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/r/function_iam_binding.html.markdown b/website/docs/r/function_iam_binding.html.markdown index 84072760b..9288d6727 100644 --- a/website/docs/r/function_iam_binding.html.markdown +++ b/website/docs/r/function_iam_binding.html.markdown @@ -30,4 +30,5 @@ The following arguments are supported: * `members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values: * **userAccount:{user_id}**: A unique user ID that represents a specific Yandex account. + * **serviceAccount:{service_account_id}**: A unique service account ID. * **system:{allUsers|allAuthenticatedUsers}**: see [system groups](https://cloud.yandex.com/docs/iam/concepts/access-control/system-group) From 6fcb8a16ca4bb3784cb29a52b9d0fea2e5ffe32e Mon Sep 17 00:00:00 2001 From: Mikhail Snetkov Date: Wed, 1 Dec 2021 21:25:59 +0700 Subject: [PATCH 3/9] Fix mdb_mongodb_cluster.user.permission.roles argument name in docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Documentation contains wrong argument name for `mdb_mongodb_cluster.user.permission.roles`. Now it named as `role` but Terraform throws error: ``` │ Error: Unsupported argument │ │ on mongodb.tf line 42, in resource "yandex_mdb_mongodb_cluster" "mongodb-cluster": │ 42: role = "readWrite" │ │ An argument named "role" is not expected here. Did you mean "roles"? ``` --- website/docs/r/mdb_mongodb_cluster.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/mdb_mongodb_cluster.html.markdown b/website/docs/r/mdb_mongodb_cluster.html.markdown index e606e876e..3828a0bd2 100644 --- a/website/docs/r/mdb_mongodb_cluster.html.markdown +++ b/website/docs/r/mdb_mongodb_cluster.html.markdown @@ -142,7 +142,7 @@ The `permission` block supports: * `database_name` - (Required) The name of the database that the permission grants access to. -* `role` - (Optional) The role of the user in this database. For more information see [the official documentation](https://cloud.yandex.com/docs/managed-mongodb/concepts/users-and-roles). +* `roles` - (Optional) The roles of the user in this database. For more information see [the official documentation](https://cloud.yandex.com/docs/managed-mongodb/concepts/users-and-roles). The `database` block supports: From 73508f71348561eea49312fd517612f067b1a8d6 Mon Sep 17 00:00:00 2001 From: Timur Batyrshin Date: Fri, 10 Dec 2021 23:16:42 +0300 Subject: [PATCH 4/9] typo fix in docs --- website/docs/r/alb_target_group.html.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/r/alb_target_group.html.markdown b/website/docs/r/alb_target_group.html.markdown index b575fc23a..7d901b8d8 100644 --- a/website/docs/r/alb_target_group.html.markdown +++ b/website/docs/r/alb_target_group.html.markdown @@ -19,12 +19,12 @@ resource "yandex_alb_target_group" "foo" { target { subnet_id = "${yandex_vpc_subnet.my-subnet.id}" - address = "${yandex_compute_instance.my-instance-1.network_interface.0.ip_address}" + ip_address = "${yandex_compute_instance.my-instance-1.network_interface.0.ip_address}" } target { subnet_id = "${yandex_vpc_subnet.my-subnet.id}" - address = "${yandex_compute_instance.my-instance-2.network_interface.0.ip_address}" + ip_address = "${yandex_compute_instance.my-instance-2.network_interface.0.ip_address}" } } ``` @@ -77,4 +77,4 @@ A target group can be imported using the `id` of the resource, e.g.: ``` $ terraform import yandex_alb_target_group.default target_group_id -``` \ No newline at end of file +``` From 0d59703ed6a6fa65cdbf65450d842443e97c3202 Mon Sep 17 00:00:00 2001 From: Roman Bug Date: Thu, 13 Jan 2022 00:48:40 +0300 Subject: [PATCH 5/9] Some minor fixes --- website/docs/r/cdn_resource.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/cdn_resource.html.markdown b/website/docs/r/cdn_resource.html.markdown index e79cdfec6..9b08fa355 100644 --- a/website/docs/r/cdn_resource.html.markdown +++ b/website/docs/r/cdn_resource.html.markdown @@ -69,9 +69,9 @@ Resource block supports following options: * `gzip_on` - GZip compression at CDN servers reduces file size by 70% and can be as high as 90%. -* `redirect_http_to_https` - set up a redirect from HTTPS to HTTP. +* `redirect_http_to_https` - set up a redirect from HTTP to HTTPS. -* `redirect_https_to_http` - set up a redirect from HTTP to HTTPS. +* `redirect_https_to_http` - set up a redirect from HTTPS to HTTP. * `custom_host_header` - custom value for the Host header. Your server must be able to process requests with the chosen header. From f9385f3c3c517d778ddf083c5f00bac0c4e29ddc Mon Sep 17 00:00:00 2001 From: Anatoly Pilikov Date: Mon, 17 Jan 2022 15:30:11 +0000 Subject: [PATCH 6/9] Merge pull request #546 in CLOUD/terraform-provider-yandex-mirror from release/0.70.0 to master Squashed commit of the following: commit f0de99681f488af8b5a4796c0dd2c352d9ad5e58 Author: Anatoly Pilikov Date: Mon Jan 17 17:10:29 2022 +0300 Release v0.70.0 --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 931c0d7dc..add171d57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## 0.70.0 (Unreleased) +## 0.71.0 (Unreleased) + +## 0.70.0 (January 17, 2022) FEATURES: * **New Resource:** `yandex_datatransfer_endpoint` * **New Resource:** `yandex_datatransfer_transfer` From 675af3ebc79202d381a10d7c41974b562b3a4e0f Mon Sep 17 00:00:00 2001 From: Anatoly Pilikov Date: Tue, 18 Jan 2022 15:00:13 +0000 Subject: [PATCH 7/9] Merge pull request #547 in CLOUD/terraform-provider-yandex-mirror from feature/k8s-node-group-scale-policy/1 to master Squashed commit of the following: commit 49cd18a3f1f29cf9631907e3b3557f9df965149c Author: Anatoly Pilikov Date: Tue Jan 18 17:13:19 2022 +0300 go fmt commit 5fc89c79eb855b72b527170821528e7d113a516f Author: Anatoly Pilikov Date: Tue Jan 18 14:57:36 2022 +0300 CHANGELOG commit a58ed4372ba397ddd27bda00b3e8ba65a50f790e Author: Anatoly Pilikov Date: Tue Jan 18 14:50:15 2022 +0300 Do not check if value exists for k8s node group's scale_policy --- CHANGELOG.md | 2 + .../resource_yandex_kubernetes_node_group.go | 38 ++++++++----------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index add171d57..d449b6dec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ## 0.71.0 (Unreleased) +ENHANCEMENTS: +* allow `initial` of `0` for `yandex_kubernetes_node_group` `auto_scale` policy. ## 0.70.0 (January 17, 2022) FEATURES: diff --git a/yandex/resource_yandex_kubernetes_node_group.go b/yandex/resource_yandex_kubernetes_node_group.go index e501b62a1..aa3a0e3e4 100644 --- a/yandex/resource_yandex_kubernetes_node_group.go +++ b/yandex/resource_yandex_kubernetes_node_group.go @@ -236,19 +236,22 @@ func resourceYandexKubernetesNodeGroup() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "min": { - Type: schema.TypeInt, - Required: true, - ForceNew: false, + Type: schema.TypeInt, + Required: true, + ForceNew: false, + ValidateFunc: validation.IntAtLeast(0), }, "max": { - Type: schema.TypeInt, - Required: true, - ForceNew: false, + Type: schema.TypeInt, + Required: true, + ForceNew: false, + ValidateFunc: validation.IntAtLeast(0), }, "initial": { - Type: schema.TypeInt, - Required: true, - ForceNew: false, + Type: schema.TypeInt, + Required: true, + ForceNew: false, + ValidateFunc: validation.IntAtLeast(0), }, }, }, @@ -616,23 +619,12 @@ func getNodeGroupScalePolicy(d *schema.ResourceData) (*k8s.ScalePolicy, error) { } return nil, fmt.Errorf("no size has been specified for a node group with a fixed scale policy") default: // okAuto - var min, max, initial interface{} - var ok bool - if min, ok = d.GetOk("scale_policy.0.auto_scale.0.min"); !ok { - return nil, fmt.Errorf("no min size has been specified for a node group with an auto scale policy") - } - if max, ok = d.GetOk("scale_policy.0.auto_scale.0.max"); !ok { - return nil, fmt.Errorf("no max size has been specified for a node group with an auto scale policy") - } - if initial, ok = d.GetOk("scale_policy.0.auto_scale.0.initial"); !ok { - return nil, fmt.Errorf("no initial size has been specified for a node group with an auto scale policy") - } return &k8s.ScalePolicy{ ScaleType: &k8s.ScalePolicy_AutoScale_{ AutoScale: &k8s.ScalePolicy_AutoScale{ - MinSize: int64(min.(int)), - MaxSize: int64(max.(int)), - InitialSize: int64(initial.(int)), + MinSize: int64(d.Get("scale_policy.0.auto_scale.0.min").(int)), + MaxSize: int64(d.Get("scale_policy.0.auto_scale.0.max").(int)), + InitialSize: int64(d.Get("scale_policy.0.auto_scale.0.initial").(int)), }, }, }, nil From 089bda5fd2018ef3daf8570f923a0e42383c4313 Mon Sep 17 00:00:00 2001 From: Liubov Karlina Date: Fri, 21 Jan 2022 12:48:52 +0000 Subject: [PATCH 8/9] Merge pull request #531 in CLOUD/terraform-provider-yandex-mirror from feature/fix-weight to master Squashed commit of the following: commit a34150b6113dd1570cfd624e3648f1e0d2be56df Author: Liubov Karlina Date: Fri Jan 21 13:31:19 2022 +0300 Load Balancer tests fixed. commit 77e2875e078751d42ea09c18ada90952a78ddeab Author: Liubov Karlina Date: Thu Jan 20 16:57:45 2022 +0300 Tests fixed. commit 89764a7d3629c39cab14e2d301ce0677088b1525 Author: Liubov Karlina Date: Thu Jan 20 13:25:58 2022 +0300 CHANGELOG updated. commit 5752ac5c04727938c6952af900b942d547acdb20 Author: Liubov Karlina Date: Wed Jan 19 17:00:15 2022 +0300 minor fixes. commit 0153d6ef48d31ff05462d39f258c05b35c99f239 Author: Liubov Karlina Date: Thu Dec 23 12:53:26 2021 +0300 Backend weight behavior fixed. --- CHANGELOG.md | 3 ++ yandex/alb_structures.go | 17 +++++++-- yandex/base_alb_test.go | 35 +++++++++++++++++-- ...ta_source_yandex_alb_backend_group_test.go | 2 +- yandex/resource_yandex_alb_backend_group.go | 3 ++ .../resource_yandex_alb_backend_group_test.go | 4 +-- 6 files changed, 56 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d449b6dec..fe814215f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ENHANCEMENTS: * allow `initial` of `0` for `yandex_kubernetes_node_group` `auto_scale` policy. +BUG FIXES: +* alb: fix behavior of attribute `weight` in `http_backend` and `grpc_backend` and `stream_backend` in `yandex_alb_backend_group` resource + ## 0.70.0 (January 17, 2022) FEATURES: * **New Resource:** `yandex_datatransfer_endpoint` diff --git a/yandex/alb_structures.go b/yandex/alb_structures.go index be5bb3c54..edda771bf 100644 --- a/yandex/alb_structures.go +++ b/yandex/alb_structures.go @@ -3,6 +3,7 @@ package yandex import ( "bytes" "fmt" + "google.golang.org/protobuf/types/known/wrapperspb" "strings" "github.com/golang/protobuf/ptypes/wrappers" @@ -1471,12 +1472,13 @@ func flattenALBHTTPBackends(bg *apploadbalancer.BackendGroup) (*schema.Set, erro } flHealthchecks := flattenALBHealthchecks(b.GetHealthchecks()) + weight := getWeight(b.GetBackendWeight()) flBackend := map[string]interface{}{ "name": b.Name, "port": int(b.Port), "http2": b.UseHttp2, - "weight": int(b.BackendWeight.Value), + "weight": weight, "tls": flTls, "load_balancing_config": flLoadBalancingConfig, "healthcheck": flHealthchecks, @@ -1516,11 +1518,12 @@ func flattenALBStreamBackends(bg *apploadbalancer.BackendGroup) (*schema.Set, er } flHealthchecks := flattenALBHealthchecks(b.GetHealthchecks()) + weight := getWeight(b.GetBackendWeight()) flBackend := map[string]interface{}{ "name": b.Name, "port": int(b.Port), - "weight": int(b.BackendWeight.Value), + "weight": weight, "tls": flTls, "load_balancing_config": flLoadBalancingConfig, "healthcheck": flHealthchecks, @@ -1535,6 +1538,13 @@ func flattenALBStreamBackends(bg *apploadbalancer.BackendGroup) (*schema.Set, er return result, nil } +func getWeight(weight *wrapperspb.Int64Value) int { + if weight == nil { + return 1 + } + return int(weight.Value) +} + func flattenALBGRPCBackends(bg *apploadbalancer.BackendGroup) (*schema.Set, error) { result := &schema.Set{F: resourceALBBackendGroupBackendHash} @@ -1559,11 +1569,12 @@ func flattenALBGRPCBackends(bg *apploadbalancer.BackendGroup) (*schema.Set, erro } } flHealthchecks := flattenALBHealthchecks(b.GetHealthchecks()) + weight := getWeight(b.GetBackendWeight()) flBackend := map[string]interface{}{ "name": b.Name, "port": int(b.Port), - "weight": int(b.BackendWeight.Value), + "weight": weight, "tls": flTls, "load_balancing_config": flLoadBalancingConfig, "healthcheck": flHealthchecks, diff --git a/yandex/base_alb_test.go b/yandex/base_alb_test.go index 210cab8a0..193a2859a 100644 --- a/yandex/base_alb_test.go +++ b/yandex/base_alb_test.go @@ -52,6 +52,8 @@ type resourceALBLoadBalancerInfo struct { BalancerName string RouterName string + BackendGroupName string + TargetGroupName string ListenerName string BalancerDescription string AllowHTTP10 string @@ -75,6 +77,8 @@ func albLoadBalancerInfo() resourceALBLoadBalancerInfo { BaseTemplate: testAccALBBaseTemplate(acctest.RandomWithPrefix("tf-instance")), BalancerName: acctest.RandomWithPrefix("tf-load-balancer"), RouterName: acctest.RandomWithPrefix("tf-router"), + BackendGroupName: acctest.RandomWithPrefix("tf-bg"), + TargetGroupName: acctest.RandomWithPrefix("tf-tg"), ListenerName: acctest.RandomWithPrefix("tf-listener"), BalancerDescription: acctest.RandomWithPrefix("tf-load-balancer-description"), AllowHTTP10: albDefaultAllowHTTP10, @@ -345,7 +349,34 @@ data "yandex_alb_load_balancer" "test-alb-ds" { resource "yandex_alb_http_router" "test-router" { name = "{{.RouterName}}" } +{{ if .IsStreamHandler }} +resource "yandex_alb_backend_group" "test-bg" { + name = "{{.BackendGroupName}}" + stream_backend { + name = "test-stream-backend" + port = 8080 + target_group_ids = ["${yandex_alb_target_group.test-target-group.id}"] + load_balancing_config { + panic_threshold = "50" + locality_aware_routing_percent = "35" + strict_locality = "true" + } + healthcheck { + timeout = "10s" + interval = "10s" + http_healthcheck { + host = "tf-test-host" + path = "tf-test-path" + http2 = "true" + } + } + } +} +resource "yandex_alb_target_group" "test-target-group" { + name = "{{.TargetGroupName}}" +} +{{ end }} resource "yandex_alb_load_balancer" "test-balancer" { name = "{{.BalancerName}}" description = "{{.BalancerDescription}}" @@ -399,7 +430,7 @@ resource "yandex_alb_load_balancer" "test-balancer" { stream { {{if .IsStreamHandler}} handler { - backend_group_id = "ds760hlsaj9kj4p01uc7" + backend_group_id = yandex_alb_backend_group.test-bg.id } {{end}} } @@ -422,7 +453,7 @@ resource "yandex_alb_load_balancer" "test-balancer" { {{end}} {{if .IsStreamHandler}} stream_handler { - backend_group_id = "ds760hlsaj9kj4p01uc7" + backend_group_id = yandex_alb_backend_group.test-bg.id } {{end}} certificate_ids = ["{{.CertificateID}}"] diff --git a/yandex/data_source_yandex_alb_backend_group_test.go b/yandex/data_source_yandex_alb_backend_group_test.go index b0de46920..7b545b165 100644 --- a/yandex/data_source_yandex_alb_backend_group_test.go +++ b/yandex/data_source_yandex_alb_backend_group_test.go @@ -160,7 +160,7 @@ func TestAccDataSourceALBBackendGroup_fullWithStreamBackend(t *testing.T) { Config: testALBBackendGroupConfig_basic(BGResource), Check: resource.ComposeTestCheckFunc( testAccDataSourceALBBackendGroupExists(albBgDataSourceResource, &bg), - testAccCheckALBBackendGroupValues(&bg, false, false, false), + testAccCheckALBBackendGroupValues(&bg, false, false, true), testExistsFirstElementWithAttr( albBgDataSourceResource, "stream_backend", "tls", &backendPath, ), diff --git a/yandex/resource_yandex_alb_backend_group.go b/yandex/resource_yandex_alb_backend_group.go index 6256c5464..fdb5a510c 100644 --- a/yandex/resource_yandex_alb_backend_group.go +++ b/yandex/resource_yandex_alb_backend_group.go @@ -69,6 +69,7 @@ func resourceYandexALBBackendGroup() *schema.Resource { "weight": { Type: schema.TypeInt, Optional: true, + Default: 1, }, "port": { Type: schema.TypeInt, @@ -106,6 +107,7 @@ func resourceYandexALBBackendGroup() *schema.Resource { "weight": { Type: schema.TypeInt, Optional: true, + Default: 1, }, "port": { Type: schema.TypeInt, @@ -139,6 +141,7 @@ func resourceYandexALBBackendGroup() *schema.Resource { "weight": { Type: schema.TypeInt, Optional: true, + Default: 1, }, "port": { Type: schema.TypeInt, diff --git a/yandex/resource_yandex_alb_backend_group_test.go b/yandex/resource_yandex_alb_backend_group_test.go index e5b7d7938..11cb888ca 100644 --- a/yandex/resource_yandex_alb_backend_group_test.go +++ b/yandex/resource_yandex_alb_backend_group_test.go @@ -335,7 +335,7 @@ func TestAccALBBackendGroup_streamBackend(t *testing.T) { BGResource := albBackendGroupInfo() BGResource.IsStreamBackend = true - BGResource.IsGRPCCheck = true + BGResource.IsHTTPCheck = true var bg apploadbalancer.BackendGroup backendPath := "" @@ -360,7 +360,7 @@ func TestAccALBBackendGroup_streamBackend(t *testing.T) { albBGResource, "stream_backend", "healthcheck.*.interval", albDefaultInterval, &backendPath, ), testExistsElementWithAttrValue( - albBGResource, "stream_backend", "healthcheck.*.grpc_healthcheck.0.service_name", albDefaultServiceName, &backendPath, + albBGResource, "stream_backend", "healthcheck.*.http_healthcheck.0.host", albDefaultHost, &backendPath, ), ), }, From 5277b894da38dbd19b3754c7d6b7da09e683c0ab Mon Sep 17 00:00:00 2001 From: Liubov Karlina Date: Mon, 24 Jan 2022 09:45:51 +0000 Subject: [PATCH 9/9] Merge pull request #549 in CLOUD/terraform-provider-yandex-mirror from add-example-to-readme to master Squashed commit of the following: commit f280e0420d799305b727d97c5dfc14afff424d5b Author: Liubov Karlina Date: Wed Jan 19 15:35:40 2022 +0300 add config. commit 578695be7e19c1c6dc727486b883ea4af619c36a Author: Liubov Karlina Date: Wed Jan 19 14:55:48 2022 +0300 add example. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index c0c649c17..bcf3cefc5 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,18 @@ $ make build Using the provider ---------------------- If you're building the provider, follow the instructions to [install it as a plugin.](https://www.terraform.io/docs/plugins/basics.html#installing-plugins) After placing it into your plugins directory, run `terraform init` to initialize it. Documentation about the provider specific configuration options can be found on the [provider's website](https://registry.terraform.io/providers/yandex-cloud/yandex/latest/docs). +An example of using an installed provider from local directory: + +Write following config into `~/.terraformrc` +``` +provider_installation { + dev_overrides { + "yandex-cloud/yandex" = "/path/to/local/provider" + } + + direct {} + } +``` Developing the Provider ---------------------------