From 2d99ba1619bbd2de4e5d096fa47b8e4a3a14d44f Mon Sep 17 00:00:00 2001 From: Jason Zhang Date: Wed, 21 Oct 2020 19:32:36 +0800 Subject: [PATCH] add enterprise_project_id to dcs, nat_gateway --- docs/resources/dcs_instance.md | 2 + docs/resources/nat_gateway.md | 3 + go.mod | 2 +- go.sum | 8 +-- huaweicloud/endpoints.go | 5 +- .../resource_huaweicloud_dcs_instance_v1.go | 48 ++++++++----- ...source_huaweicloud_dcs_instance_v1_test.go | 54 ++++++++++++++ .../resource_huaweicloud_nat_gateway_v2.go | 20 ++++-- ...esource_huaweicloud_nat_gateway_v2_test.go | 45 ++++++++++++ .../openstack/dcs/v1/instances/requests.go | 6 ++ .../openstack/dcs/v1/instances/results.go | 70 ++++++++++--------- .../v2/extensions/natgateways/requests.go | 36 +++++----- .../v2/extensions/natgateways/results.go | 19 ++--- vendor/modules.txt | 2 +- 14 files changed, 227 insertions(+), 93 deletions(-) diff --git a/docs/resources/dcs_instance.md b/docs/resources/dcs_instance.md index 1a7161a6e45..cb0d9b019cb 100644 --- a/docs/resources/dcs_instance.md +++ b/docs/resources/dcs_instance.md @@ -188,6 +188,8 @@ The following arguments are supported: * `backup_at` - (Optional) Day in a week on which backup starts. Range: 1–7. Where: 1 indicates Monday; 7 indicates Sunday. Changing this creates a new instance. +* `enterprise_project_id` - (Optional) The enterprise project id of the dcs instance. Changing this creates a new instance. + The `whitelists` block supports: * `group_name` - (Required) Specifies the name of IP address group. diff --git a/docs/resources/nat_gateway.md b/docs/resources/nat_gateway.md index 5d77b9c0402..b0275f27dfd 100644 --- a/docs/resources/nat_gateway.md +++ b/docs/resources/nat_gateway.md @@ -39,6 +39,9 @@ The following arguments are supported: * `internal_network_id` - (Optional) ID of the network this nat gateway connects to. Changing this creates a new nat gateway. +* `enterprise_project_id` - (Optional) The enterprise project id of the nat gateway. + Changing this creates a new nat gateway. + ## Attributes Reference The following attributes are exported: diff --git a/go.mod b/go.mod index e5d165d634c..8eef3074655 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/hashicorp/errwrap v1.0.0 github.com/hashicorp/go-cleanhttp v0.5.1 github.com/hashicorp/terraform-plugin-sdk v1.13.0 - github.com/huaweicloud/golangsdk v0.0.0-20201019092827-0254ff170b2e + github.com/huaweicloud/golangsdk v0.0.0-20201021110706-4cb6032799d8 github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a github.com/mitchellh/go-homedir v1.1.0 github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa // indirect diff --git a/go.sum b/go.sum index b7ea9ca1382..705a9f87194 100644 --- a/go.sum +++ b/go.sum @@ -129,12 +129,8 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= 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/huaweicloud/golangsdk v0.0.0-20201010022156-88a65d817494 h1:3nOQxuXHUIYRS94unYux1/K+l5p1w/OhcqNVGJ3ejAU= -github.com/huaweicloud/golangsdk v0.0.0-20201010022156-88a65d817494/go.mod h1:fcOI5u+0f62JtJd7zkCch/Z57BNC6bhqb32TKuiF4r0= -github.com/huaweicloud/golangsdk v0.0.0-20201013113019-d00b298c3cdd h1:98+a/BpLn8AJBvFEKZIxAt4TnyWcgfOF02PQQoj9+Js= -github.com/huaweicloud/golangsdk v0.0.0-20201013113019-d00b298c3cdd/go.mod h1:fcOI5u+0f62JtJd7zkCch/Z57BNC6bhqb32TKuiF4r0= -github.com/huaweicloud/golangsdk v0.0.0-20201019092827-0254ff170b2e h1:3/OcFZHyBNfPlLxv8BiCP3b6rkzhfIQWU2TmwBEmb7g= -github.com/huaweicloud/golangsdk v0.0.0-20201019092827-0254ff170b2e/go.mod h1:fcOI5u+0f62JtJd7zkCch/Z57BNC6bhqb32TKuiF4r0= +github.com/huaweicloud/golangsdk v0.0.0-20201021110706-4cb6032799d8 h1:x028T/6qFLr/WXVVqHShpnIgFz9U8NmfjZVag3zvFF8= +github.com/huaweicloud/golangsdk v0.0.0-20201021110706-4cb6032799d8/go.mod h1:fcOI5u+0f62JtJd7zkCch/Z57BNC6bhqb32TKuiF4r0= github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a h1:FyS/ubzBR5xJlnJGRTwe7GUHpJOR4ukYK3y+LFNffuA= github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a/go.mod h1:uoIMjNxUfXi48Ci40IXkPRbghZ1vbti6v9LCbNqRgHY= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= diff --git a/huaweicloud/endpoints.go b/huaweicloud/endpoints.go index 7f21c30b066..90cf5c2202e 100644 --- a/huaweicloud/endpoints.go +++ b/huaweicloud/endpoints.go @@ -122,9 +122,8 @@ var allServiceCatalog = map[string]ServiceCatalog{ WithOutProjectID: true, }, "natv2": ServiceCatalog{ - Name: "nat", - Version: "v2.0", - WithOutProjectID: true, + Name: "nat", + Version: "v2", }, "elb": ServiceCatalog{ Name: "elb", diff --git a/huaweicloud/resource_huaweicloud_dcs_instance_v1.go b/huaweicloud/resource_huaweicloud_dcs_instance_v1.go index 92401cf6561..8fdbc72827a 100644 --- a/huaweicloud/resource_huaweicloud_dcs_instance_v1.go +++ b/huaweicloud/resource_huaweicloud_dcs_instance_v1.go @@ -148,6 +148,18 @@ func resourceDcsInstanceV1() *schema.Resource { }, }, }, + "enterprise_project_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + "enterprise_project_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, "order_id": { Type: schema.TypeString, Computed: true, @@ -293,22 +305,24 @@ func resourceDcsInstancesV1Create(d *schema.ResourceData, meta interface{}) erro no_password_access = "false" } createOpts := &instances.CreateOps{ - Name: d.Get("name").(string), - Description: d.Get("description").(string), - Engine: d.Get("engine").(string), - EngineVersion: d.Get("engine_version").(string), - Capacity: d.Get("capacity").(float64), - NoPasswordAccess: no_password_access, - Password: d.Get("password").(string), - AccessUser: d.Get("access_user").(string), - VPCID: d.Get("vpc_id").(string), - SecurityGroupID: d.Get("security_group_id").(string), - SubnetID: d.Get("subnet_id").(string), - AvailableZones: getAllAvailableZones(d), - ProductID: d.Get("product_id").(string), - InstanceBackupPolicy: getInstanceBackupPolicy(d), - MaintainBegin: d.Get("maintain_begin").(string), - MaintainEnd: d.Get("maintain_end").(string), + Name: d.Get("name").(string), + Description: d.Get("description").(string), + Engine: d.Get("engine").(string), + EngineVersion: d.Get("engine_version").(string), + Capacity: d.Get("capacity").(float64), + NoPasswordAccess: no_password_access, + Password: d.Get("password").(string), + AccessUser: d.Get("access_user").(string), + VPCID: d.Get("vpc_id").(string), + SecurityGroupID: d.Get("security_group_id").(string), + SubnetID: d.Get("subnet_id").(string), + AvailableZones: getAllAvailableZones(d), + ProductID: d.Get("product_id").(string), + InstanceBackupPolicy: getInstanceBackupPolicy(d), + MaintainBegin: d.Get("maintain_begin").(string), + MaintainEnd: d.Get("maintain_end").(string), + EnterpriseProjectID: GetEnterpriseProjectID(d, config), + EnterpriseProjectName: d.Get("enterprise_project_name").(string), } log.Printf("[DEBUG] Create Options: %#v", createOpts) @@ -394,6 +408,8 @@ func resourceDcsInstancesV1Read(d *schema.ResourceData, meta interface{}) error d.Set("maintain_begin", v.MaintainBegin) d.Set("maintain_end", v.MaintainEnd) d.Set("access_user", v.AccessUser) + d.Set("enterprise_project_id", v.EnterpriseProjectID) + d.Set("enterprise_project_name", v.EnterpriseProjectName) // set capacity by Capacity and CapacityMinor var capacity float64 = float64(v.Capacity) diff --git a/huaweicloud/resource_huaweicloud_dcs_instance_v1_test.go b/huaweicloud/resource_huaweicloud_dcs_instance_v1_test.go index 68876d36f63..a2a8cb240cf 100644 --- a/huaweicloud/resource_huaweicloud_dcs_instance_v1_test.go +++ b/huaweicloud/resource_huaweicloud_dcs_instance_v1_test.go @@ -37,6 +37,28 @@ func TestAccDcsInstancesV1_basic(t *testing.T) { }) } +func TestAccDcsInstancesV1_withEpsId(t *testing.T) { + var instance instances.Instance + var instanceName = fmt.Sprintf("dcs_instance_%s", acctest.RandString(5)) + resourceName := "huaweicloud_dcs_instance.instance_1" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheckEpsID(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckDcsV1InstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDcsV1Instance_epsId(instanceName), + Check: resource.ComposeTestCheckFunc( + testAccCheckDcsV1InstanceExists(resourceName, instance), + resource.TestCheckResourceAttr(resourceName, "name", instanceName), + resource.TestCheckResourceAttr(resourceName, "enterprise_project_id", OS_ENTERPRISE_PROJECT_ID), + ), + }, + }, + }) +} + func TestAccDcsInstancesV1_whitelists(t *testing.T) { var instance instances.Instance var instanceName = fmt.Sprintf("dcs_instance_%s", acctest.RandString(5)) @@ -166,6 +188,38 @@ func testAccDcsV1Instance_basic(instanceName string) string { `, OS_AVAILABILITY_ZONE, instanceName, OS_VPC_ID, OS_NETWORK_ID) } +func testAccDcsV1Instance_epsId(instanceName string) string { + return fmt.Sprintf(` + resource "huaweicloud_networking_secgroup" "secgroup_1" { + name = "secgroup_1" + description = "secgroup_1" + } + data "huaweicloud_dcs_az" "az_1" { + code = "%s" + } + + resource "huaweicloud_dcs_instance" "instance_1" { + name = "%s" + engine_version = "3.0" + password = "Huawei_test" + engine = "Redis" + capacity = 2 + vpc_id = "%s" + security_group_id = huaweicloud_networking_secgroup.secgroup_1.id + subnet_id = "%s" + available_zones = [data.huaweicloud_dcs_az.az_1.id] + product_id = "dcs.master_standby-h" + save_days = 1 + backup_type = "manual" + begin_at = "00:00-01:00" + period_type = "weekly" + backup_at = [1] + depends_on = ["huaweicloud_networking_secgroup.secgroup_1"] + enterprise_project_id = "%s" + } + `, OS_AVAILABILITY_ZONE, instanceName, OS_VPC_ID, OS_NETWORK_ID, OS_ENTERPRISE_PROJECT_ID) +} + func testAccDcsV1Instance_tiny(instanceName string) string { return fmt.Sprintf(` data "huaweicloud_dcs_az" "az_1" { diff --git a/huaweicloud/resource_huaweicloud_nat_gateway_v2.go b/huaweicloud/resource_huaweicloud_nat_gateway_v2.go index 9b8969dad13..f032e0032e2 100644 --- a/huaweicloud/resource_huaweicloud_nat_gateway_v2.go +++ b/huaweicloud/resource_huaweicloud_nat_gateway_v2.go @@ -64,6 +64,12 @@ func resourceNatGatewayV2() *schema.Resource { Required: true, ForceNew: true, }, + "enterprise_project_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, }, } } @@ -76,12 +82,13 @@ func resourceNatGatewayV2Create(d *schema.ResourceData, meta interface{}) error } createOpts := &natgateways.CreateOpts{ - Name: d.Get("name").(string), - Description: d.Get("description").(string), - Spec: d.Get("spec").(string), - TenantID: d.Get("tenant_id").(string), - RouterID: d.Get("router_id").(string), - InternalNetworkID: d.Get("internal_network_id").(string), + Name: d.Get("name").(string), + Description: d.Get("description").(string), + Spec: d.Get("spec").(string), + TenantID: d.Get("tenant_id").(string), + RouterID: d.Get("router_id").(string), + InternalNetworkID: d.Get("internal_network_id").(string), + EnterpriseProjectID: GetEnterpriseProjectID(d, config), } log.Printf("[DEBUG] Create Options: %#v", createOpts) @@ -130,6 +137,7 @@ func resourceNatGatewayV2Read(d *schema.ResourceData, meta interface{}) error { d.Set("tenant_id", natGateway.TenantID) d.Set("region", GetRegion(d, config)) + d.Set("enterprise_project_id", natGateway.EnterpriseProjectID) return nil } diff --git a/huaweicloud/resource_huaweicloud_nat_gateway_v2_test.go b/huaweicloud/resource_huaweicloud_nat_gateway_v2_test.go index c516e37192f..5c0518458fa 100644 --- a/huaweicloud/resource_huaweicloud_nat_gateway_v2_test.go +++ b/huaweicloud/resource_huaweicloud_nat_gateway_v2_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" @@ -45,6 +46,25 @@ func TestAccNatGateway_basic(t *testing.T) { }) } +func TestAccNatGateway_withEpsId(t *testing.T) { + natgateway := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheckNat(t); testAccPreCheckEpsID(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckNatV2GatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccNatV2Gateway_epsId(natgateway), + Check: resource.ComposeTestCheckFunc( + testAccCheckNatV2GatewayExists("huaweicloud_nat_gateway.nat_1"), + resource.TestCheckResourceAttr("huaweicloud_nat_gateway.nat_1", "enterprise_project_id", OS_ENTERPRISE_PROJECT_ID), + ), + }, + }, + }) +} + func testAccCheckNatV2GatewayDestroy(s *terraform.State) error { config := testAccProvider.Meta().(*Config) natClient, err := config.natV2Client(OS_REGION_NAME) @@ -128,6 +148,31 @@ resource "huaweicloud_nat_gateway_v2" "nat_1" { } ` +func testAccNatV2Gateway_epsId(name string) string { + return fmt.Sprintf(` + resource "huaweicloud_vpc" "vpc_1" { + name = "%s" + cidr = "192.168.0.0/16" + } + + resource "huaweicloud_vpc_subnet" "subnet_1" { + name = "%s" + cidr = "192.168.199.0/24" + gateway_ip = "192.168.199.1" + vpc_id = huaweicloud_vpc.vpc_1.id + } + + resource "huaweicloud_nat_gateway" "nat_1" { + name = "%s" + description = "test for terraform" + spec = "1" + internal_network_id = huaweicloud_vpc_subnet.subnet_1.id + router_id = huaweicloud_vpc.vpc_1.id + enterprise_project_id = "%s" + } + `, name, name, name, OS_ENTERPRISE_PROJECT_ID) +} + const testAccNatV2Gateway_update = ` resource "huaweicloud_networking_router_v2" "router_1" { name = "router_1" diff --git a/vendor/github.com/huaweicloud/golangsdk/openstack/dcs/v1/instances/requests.go b/vendor/github.com/huaweicloud/golangsdk/openstack/dcs/v1/instances/requests.go index 465b5bf1bfc..2a4073c05c0 100644 --- a/vendor/github.com/huaweicloud/golangsdk/openstack/dcs/v1/instances/requests.go +++ b/vendor/github.com/huaweicloud/golangsdk/openstack/dcs/v1/instances/requests.go @@ -86,6 +86,12 @@ type CreateOps struct { // Indicates the time at which a maintenance time window ends. // Format: HH:mm:ss MaintainEnd string `json:"maintain_end,omitempty"` + + // Enterprise project id. + EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` + + // Enterprise project name. + EnterpriseProjectName string `json:"enterprise_project_name,omitempty"` } // InstanceBackupPolicy for dcs diff --git a/vendor/github.com/huaweicloud/golangsdk/openstack/dcs/v1/instances/results.go b/vendor/github.com/huaweicloud/golangsdk/openstack/dcs/v1/instances/results.go index 70deaa71567..209febd48d1 100644 --- a/vendor/github.com/huaweicloud/golangsdk/openstack/dcs/v1/instances/results.go +++ b/vendor/github.com/huaweicloud/golangsdk/openstack/dcs/v1/instances/results.go @@ -34,40 +34,42 @@ type ListDcsResponse struct { // Instance response type Instance struct { - Name string `json:"name"` - Engine string `json:"engine"` - Capacity int `json:"capacity"` - CapacityMinor string `json:"capacity_minor"` - IP string `json:"ip"` - Port int `json:"port"` - Status string `json:"status"` - Description string `json:"description"` - InstanceID string `json:"instance_id"` - ResourceSpecCode string `json:"resource_spec_code"` - EngineVersion string `json:"engine_version"` - InternalVersion string `json:"internal_version"` - ChargingMode int `json:"charging_mode"` - VPCID string `json:"vpc_id"` - VPCName string `json:"vpc_name"` - CreatedAt string `json:"created_at"` - ErrorCode string `json:"error_code"` - ProductID string `json:"product_id"` - SecurityGroupID string `json:"security_group_id"` - SecurityGroupName string `json:"security_group_name"` - SubnetID string `json:"subnet_id"` - SubnetName string `json:"subnet_name"` - SubnetCIDR string `json:"subnet_cidr"` - AvailableZones []string `json:"available_zones"` - MaxMemory int `json:"max_memory"` - UsedMemory int `json:"used_memory"` - InstanceBackupPolicy InstanceBackupPolicy `json:"instance_backup_policy"` - UserID string `json:"user_id"` - UserName string `json:"user_name"` - OrderID string `json:"order_id"` - MaintainBegin string `json:"maintain_begin"` - MaintainEnd string `json:"maintain_end"` - NoPasswordAccess string `json:"no_password_access"` - AccessUser string `json:"access_user"` + Name string `json:"name"` + Engine string `json:"engine"` + Capacity int `json:"capacity"` + CapacityMinor string `json:"capacity_minor"` + IP string `json:"ip"` + Port int `json:"port"` + Status string `json:"status"` + Description string `json:"description"` + InstanceID string `json:"instance_id"` + ResourceSpecCode string `json:"resource_spec_code"` + EngineVersion string `json:"engine_version"` + InternalVersion string `json:"internal_version"` + ChargingMode int `json:"charging_mode"` + VPCID string `json:"vpc_id"` + VPCName string `json:"vpc_name"` + CreatedAt string `json:"created_at"` + ErrorCode string `json:"error_code"` + ProductID string `json:"product_id"` + SecurityGroupID string `json:"security_group_id"` + SecurityGroupName string `json:"security_group_name"` + SubnetID string `json:"subnet_id"` + SubnetName string `json:"subnet_name"` + SubnetCIDR string `json:"subnet_cidr"` + AvailableZones []string `json:"available_zones"` + MaxMemory int `json:"max_memory"` + UsedMemory int `json:"used_memory"` + InstanceBackupPolicy InstanceBackupPolicy `json:"instance_backup_policy"` + UserID string `json:"user_id"` + UserName string `json:"user_name"` + OrderID string `json:"order_id"` + MaintainBegin string `json:"maintain_begin"` + MaintainEnd string `json:"maintain_end"` + NoPasswordAccess string `json:"no_password_access"` + AccessUser string `json:"access_user"` + EnterpriseProjectID string `json:"enterprise_project_id"` + EnterpriseProjectName string `json:"enterprise_project_name"` } // UpdateResult is a struct from which can get the result of update method diff --git a/vendor/github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/natgateways/requests.go b/vendor/github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/natgateways/requests.go index 89213a65042..77d99190c66 100644 --- a/vendor/github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/natgateways/requests.go +++ b/vendor/github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/natgateways/requests.go @@ -14,26 +14,28 @@ type CreateOptsBuilder interface { // CreateOpts contains all the values needed to create a new nat gateway // resource. type CreateOpts struct { - Name string `json:"name" required:"true"` - Description string `json:"description,omitempty"` - Spec string `json:"spec" required:"true"` - RouterID string `json:"router_id" required:"true"` - InternalNetworkID string `json:"internal_network_id" required:"true"` - TenantID string `json:"tenant_id,omitempty"` + Name string `json:"name" required:"true"` + Description string `json:"description,omitempty"` + Spec string `json:"spec" required:"true"` + RouterID string `json:"router_id" required:"true"` + InternalNetworkID string `json:"internal_network_id" required:"true"` + TenantID string `json:"tenant_id,omitempty"` + EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` } type ListOpts struct { - Limit int `q:"limit"` - ID string `q:"id"` - Name string `q:"name"` - TenantId string `q:"tenant_id"` - Description string `q:"description"` - Spec string `q:"spec"` - RouterID string `q:"router_id"` - InternalNetworkID string `q:"internal_network_id"` - Status string `q:"status"` - AdminStateUp *bool `q:"admin_state_up"` - CreatedAt string `q:"created_at"` + Limit int `q:"limit"` + ID string `q:"id"` + Name string `q:"name"` + TenantId string `q:"tenant_id"` + Description string `q:"description"` + Spec string `q:"spec"` + RouterID string `q:"router_id"` + InternalNetworkID string `q:"internal_network_id"` + Status string `q:"status"` + AdminStateUp *bool `q:"admin_state_up"` + CreatedAt string `q:"created_at"` + EnterpriseProjectID string `q:"enterprise_project_id"` } // ToNatGatewayCreateMap allows CreateOpts to satisfy the CreateOptsBuilder diff --git a/vendor/github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/natgateways/results.go b/vendor/github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/natgateways/results.go index f21a4e02265..bc2ca154285 100644 --- a/vendor/github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/natgateways/results.go +++ b/vendor/github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/natgateways/results.go @@ -7,15 +7,16 @@ import ( // NatGateway is a struct that represents a nat gateway type NatGateway struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description"` - RouterID string `json:"router_id"` - InternalNetworkID string `json:"internal_network_id"` - TenantID string `json:"tenant_id"` - Spec string `json:"spec"` - Status string `json:"status"` - AdminStateUp bool `json:"admin_state_up"` + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + RouterID string `json:"router_id"` + InternalNetworkID string `json:"internal_network_id"` + TenantID string `json:"tenant_id"` + Spec string `json:"spec"` + Status string `json:"status"` + AdminStateUp bool `json:"admin_state_up"` + EnterpriseProjectID string `json:"enterprise_project_id"` } // GetResult is a return struct of get method diff --git a/vendor/modules.txt b/vendor/modules.txt index 5c9587895d9..b58ea84f947 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -186,7 +186,7 @@ github.com/hashicorp/terraform-svchost/auth github.com/hashicorp/terraform-svchost/disco # github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d github.com/hashicorp/yamux -# github.com/huaweicloud/golangsdk v0.0.0-20201019092827-0254ff170b2e +# github.com/huaweicloud/golangsdk v0.0.0-20201021110706-4cb6032799d8 ## explicit github.com/huaweicloud/golangsdk github.com/huaweicloud/golangsdk/internal