diff --git a/docs/data-sources/gcore_loadbalancer.md b/docs/data-sources/gcore_loadbalancer.md index a0f6226..5c871a7 100644 --- a/docs/data-sources/gcore_loadbalancer.md +++ b/docs/data-sources/gcore_loadbalancer.md @@ -45,6 +45,8 @@ output "view" { ### Optional +- `metadata_k` (String) +- `metadata_kv` (Map of String) - `project_id` (Number) - `project_name` (String) - `region_id` (Number) @@ -54,6 +56,7 @@ output "view" { - `id` (String) The ID of this resource. - `listener` (List of Object) (see [below for nested schema](#nestedatt--listener)) +- `metadata_read_only` (List of Object) (see [below for nested schema](#nestedatt--metadata_read_only)) - `vip_address` (String) - `vip_port_id` (String) @@ -68,3 +71,13 @@ Read-Only: - `protocol_port` (Number) + +### Nested Schema for `metadata_read_only` + +Read-Only: + +- `key` (String) +- `read_only` (Boolean) +- `value` (String) + + diff --git a/docs/data-sources/gcore_loadbalancerv2.md b/docs/data-sources/gcore_loadbalancerv2.md index cd2d2f1..9eb4c0e 100644 --- a/docs/data-sources/gcore_loadbalancerv2.md +++ b/docs/data-sources/gcore_loadbalancerv2.md @@ -45,6 +45,8 @@ output "view" { ### Optional +- `metadata_k` (String) +- `metadata_kv` (Map of String) - `project_id` (Number) - `project_name` (String) - `region_id` (Number) @@ -53,7 +55,17 @@ output "view" { ### Read-Only - `id` (String) The ID of this resource. +- `metadata_read_only` (List of Object) (see [below for nested schema](#nestedatt--metadata_read_only)) - `vip_address` (String) - `vip_port_id` (String) + +### Nested Schema for `metadata_read_only` + +Read-Only: + +- `key` (String) +- `read_only` (Boolean) +- `value` (String) + diff --git a/docs/data-sources/gcore_volume.md b/docs/data-sources/gcore_volume.md index 5d6f8ba..910d2e2 100644 --- a/docs/data-sources/gcore_volume.md +++ b/docs/data-sources/gcore_volume.md @@ -45,6 +45,8 @@ output "view" { ### Optional +- `metadata_k` (String) +- `metadata_kv` (Map of String) - `project_id` (Number) - `project_name` (String) - `region_id` (Number) @@ -53,7 +55,17 @@ output "view" { ### Read-Only - `id` (String) The ID of this resource. +- `metadata_read_only` (List of Object) (see [below for nested schema](#nestedatt--metadata_read_only)) - `size` (Number) - `type_name` (String) Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'. Defaults to standard + +### Nested Schema for `metadata_read_only` + +Read-Only: + +- `key` (String) +- `read_only` (Boolean) +- `value` (String) + diff --git a/docs/resources/gcore_loadbalancer.md b/docs/resources/gcore_loadbalancer.md index 9653f8f..68abcc7 100644 --- a/docs/resources/gcore_loadbalancer.md +++ b/docs/resources/gcore_loadbalancer.md @@ -46,6 +46,7 @@ resource "gcore_loadbalancer" "lb" { - `flavor` (String) - `last_updated` (String) +- `metadata_map` (Map of String) - `project_id` (Number) - `project_name` (String) - `region_id` (Number) @@ -57,6 +58,7 @@ resource "gcore_loadbalancer" "lb" { ### Read-Only - `id` (String) The ID of this resource. +- `metadata_read_only` (List of Object) (see [below for nested schema](#nestedatt--metadata_read_only)) - `vip_address` (String) Load balancer IP address @@ -90,6 +92,16 @@ Optional: - `create` (String) - `delete` (String) + + +### Nested Schema for `metadata_read_only` + +Read-Only: + +- `key` (String) +- `read_only` (Boolean) +- `value` (String) + ## Import Import is supported using the following syntax: diff --git a/docs/resources/gcore_loadbalancerv2.md b/docs/resources/gcore_loadbalancerv2.md index 605ac79..ffd5e24 100644 --- a/docs/resources/gcore_loadbalancerv2.md +++ b/docs/resources/gcore_loadbalancerv2.md @@ -36,6 +36,7 @@ resource "gcore_loadbalancerv2" "lb" { - `flavor` (String) - `last_updated` (String) +- `metadata_map` (Map of String) - `project_id` (Number) - `project_name` (String) - `region_id` (Number) @@ -47,6 +48,7 @@ resource "gcore_loadbalancerv2" "lb" { ### Read-Only - `id` (String) The ID of this resource. +- `metadata_read_only` (List of Object) (see [below for nested schema](#nestedatt--metadata_read_only)) - `vip_address` (String) Load balancer IP address @@ -57,6 +59,16 @@ Optional: - `create` (String) - `delete` (String) + + +### Nested Schema for `metadata_read_only` + +Read-Only: + +- `key` (String) +- `read_only` (Boolean) +- `value` (String) + ## Import Import is supported using the following syntax: diff --git a/docs/resources/gcore_network.md b/docs/resources/gcore_network.md index 5f8d4c9..c9b8cc4 100644 --- a/docs/resources/gcore_network.md +++ b/docs/resources/gcore_network.md @@ -38,7 +38,6 @@ resource "gcore_network" "network" { - `create_router` (Boolean) Create external router to the network, default true - `last_updated` (String) - `metadata_map` (Map of String) -- `mtu` (Number) - `project_id` (Number) - `project_name` (String) - `region_id` (Number) @@ -49,6 +48,7 @@ resource "gcore_network" "network" { - `id` (String) The ID of this resource. - `metadata_read_only` (List of Object) (see [below for nested schema](#nestedatt--metadata_read_only)) +- `mtu` (Number) ### Nested Schema for `metadata_read_only` diff --git a/docs/resources/gcore_volume.md b/docs/resources/gcore_volume.md index 2709ebc..f2e1f87 100644 --- a/docs/resources/gcore_volume.md +++ b/docs/resources/gcore_volume.md @@ -37,6 +37,7 @@ resource "gcore_volume" "volume" { - `image_id` (String) Mandatory if volume is created from image - `last_updated` (String) +- `metadata_map` (Map of String) - `project_id` (Number) - `project_name` (String) - `region_id` (Number) @@ -48,6 +49,16 @@ resource "gcore_volume" "volume" { ### Read-Only - `id` (String) The ID of this resource. +- `metadata_read_only` (List of Object) (see [below for nested schema](#nestedatt--metadata_read_only)) + + +### Nested Schema for `metadata_read_only` + +Read-Only: + +- `key` (String) +- `read_only` (Boolean) +- `value` (String) ## Import diff --git a/gcore/resource_gcore_network.go b/gcore/resource_gcore_network.go index fc5eddf..70e70c1 100644 --- a/gcore/resource_gcore_network.go +++ b/gcore/resource_gcore_network.go @@ -81,7 +81,6 @@ func resourceNetwork() *schema.Resource { }, "mtu": &schema.Schema{ Type: schema.TypeInt, - Optional: true, Computed: true, }, "type": &schema.Schema{ @@ -145,7 +144,6 @@ func resourceNetworkCreate(ctx context.Context, d *schema.ResourceData, m interf createOpts := networks.CreateOpts{ Name: d.Get("name").(string), - Mtu: d.Get("mtu").(int), Type: d.Get("type").(string), CreateRouter: d.Get("create_router").(bool), } diff --git a/go.mod b/go.mod index 3a77da6..ec32422 100644 --- a/go.mod +++ b/go.mod @@ -47,6 +47,7 @@ require ( github.com/hashicorp/hcl/v2 v2.11.1 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-json v0.14.0 // indirect + github.com/hashicorp/terraform-plugin-docs v0.13.0 // indirect github.com/hashicorp/terraform-plugin-go v0.5.0 // indirect github.com/hashicorp/terraform-plugin-log v0.2.0 // indirect github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 // indirect diff --git a/go.sum b/go.sum index 36deb10..1263afc 100644 --- a/go.sum +++ b/go.sum @@ -88,8 +88,13 @@ github.com/G-Core/gcorelabscdn-go v0.1.24/go.mod h1:iSGXaTvZBzDHQW+rKFS918BgFVpO github.com/G-Core/gcorelabscloud-go v0.5.20 h1:pqwzbdRhuJK7TlzvQkWkz2ozGyk2UCuup+WNyOQYeqk= github.com/G-Core/gcorelabscloud-go v0.5.20/go.mod h1:EFyllSaVpPPIXnU35ALXXXQJhPRmwjShgOGHqHnb2Xk= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= @@ -138,6 +143,7 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -153,6 +159,7 @@ github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -489,6 +496,8 @@ github.com/hashicorp/terraform-json v0.12.0/go.mod h1:pmbq9o4EuL43db5+0ogX10Yofv github.com/hashicorp/terraform-json v0.13.0/go.mod h1:y5OdLBCT+rxbwnpxZs9kGL7R9ExU76+cpdY8zHwoazk= github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= +github.com/hashicorp/terraform-plugin-docs v0.13.0 h1:6e+VIWsVGb6jYJewfzq2ok2smPzZrt1Wlm9koLeKazY= +github.com/hashicorp/terraform-plugin-docs v0.13.0/go.mod h1:W0oCmHAjIlTHBbvtppWHe8fLfZ2BznQbuv8+UD8OucQ= github.com/hashicorp/terraform-plugin-go v0.4.0/go.mod h1:7u/6nt6vaiwcWE2GuJKbJwNlDFnf5n95xKw4hqIVr58= github.com/hashicorp/terraform-plugin-go v0.5.0 h1:+gCDdF0hcYCm0YBTxrP4+K1NGIS5ZKZBKDORBewLJmg= github.com/hashicorp/terraform-plugin-go v0.5.0/go.mod h1:PAVN26PNGpkkmsvva1qfriae5Arky3xl3NfzKa8XFVM= @@ -505,6 +514,7 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKe github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -608,6 +618,7 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= +github.com/mitchellh/cli v1.1.4 h1:qj8czE26AU4PbiaPXK5uVmMSM+V5BYsFBiM9HhGRLUA= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -685,6 +696,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -698,6 +710,7 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -720,6 +733,7 @@ github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=