diff --git a/terraform/providers/alicloud/go.mod b/terraform/providers/alicloud/go.mod index 71f18852fe8..81e5d7b3156 100644 --- a/terraform/providers/alicloud/go.mod +++ b/terraform/providers/alicloud/go.mod @@ -2,7 +2,7 @@ module alicloud go 1.17 -require github.com/aliyun/terraform-provider-alicloud v1.148.0 +require github.com/aliyun/terraform-provider-alicloud v1.158.0 require ( cloud.google.com/go v0.54.0 // indirect @@ -39,8 +39,8 @@ require ( github.com/bgentry/speakeasy v0.1.0 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/deckarep/golang-set v1.7.1 // indirect - github.com/denverdino/aliyungo v0.0.0-20211122042034-c78a9788662a // indirect + github.com/deckarep/golang-set v1.8.0 // indirect + github.com/denverdino/aliyungo v0.0.0-20220218034049-d2eb7f483ee8 // indirect github.com/fatih/color v1.7.0 // indirect github.com/go-kit/kit v0.10.0 // indirect github.com/go-logfmt/logfmt v0.5.0 // indirect diff --git a/terraform/providers/alicloud/go.sum b/terraform/providers/alicloud/go.sum index 799b427eeed..99ab0740849 100644 --- a/terraform/providers/alicloud/go.sum +++ b/terraform/providers/alicloud/go.sum @@ -108,8 +108,8 @@ github.com/aliyun/credentials-go v1.1.2 h1:qU1vwGIBb3UJ8BwunHDRFtAhS6jnQLnde/yk0 github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= github.com/aliyun/fc-go-sdk v0.0.0-20200925033337-c013428cbe21 h1:0kcRapGFTtwZIgbGSaM+N1y+GrnLaY4Vz78FqPnt164= github.com/aliyun/fc-go-sdk v0.0.0-20200925033337-c013428cbe21/go.mod h1:X4Pc3TFz4LRXaQPhyzBU4Ec8pL/QvaJ36CFtLJsroIM= -github.com/aliyun/terraform-provider-alicloud v1.148.0 h1:mpf06ophnQHET06jHhT8vB5pN6BYhqdhPI/t4ZYFji8= -github.com/aliyun/terraform-provider-alicloud v1.148.0/go.mod h1:aG6IOiv0rSEz6HYNQ4dir0VVXYbul4olQlMRpBBgqGo= +github.com/aliyun/terraform-provider-alicloud v1.158.0 h1:sCpsUp0ovZg1L8mudkk8xtTzwf3YZfGqVf9qb0EtMqA= +github.com/aliyun/terraform-provider-alicloud v1.158.0/go.mod h1:FOE0DUKxGNcX3SKUelZKu/rqnvpdJCAsEyv7ERbgxgE= github.com/andybalholm/brotli v1.0.1 h1:KqhlKozYbRtJvsPrrEeXcO+N2l6NYT5A2QAFmSULpEc= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -167,10 +167,10 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= -github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= -github.com/denverdino/aliyungo v0.0.0-20211122042034-c78a9788662a h1:86hp5rVR3OECcLLlL04b8qlysYJkV/d5Xv7vPZMAUX4= -github.com/denverdino/aliyungo v0.0.0-20211122042034-c78a9788662a/go.mod h1:VVxx1gyGhdt369208nKOYLI0PVgrZqbU+EuWBZJQ1ZQ= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +github.com/denverdino/aliyungo v0.0.0-20220218034049-d2eb7f483ee8 h1:Y86vVLW1CMFbrS2/S7EeGrsP/q3Ulljnszu4ju3dq+E= +github.com/denverdino/aliyungo v0.0.0-20220218034049-d2eb7f483ee8/go.mod h1:VVxx1gyGhdt369208nKOYLI0PVgrZqbU+EuWBZJQ1ZQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -586,6 +586,7 @@ github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU= github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/waigani/diffparser v0.0.0-20190828052634-7391f219313d/go.mod h1:BzSc3WEF8R+lCaP5iGFRxd5kIXy4JKOZAwNe1w0cdc0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.30/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/CHANGELOG.md b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/CHANGELOG.md index 1be2d44c017..4501f4ad45f 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/CHANGELOG.md +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/CHANGELOG.md @@ -1,1613 +1,1938 @@ -## 1.149.0 (Unreleased) +## 1.159.0 (Unreleased) +## 1.158.0 (February 27, 2022) + +- **New Resource:** `alicloud_ess_alb_server_group_attachment` ([#4594](https://github.com/aliyun/terraform-provider-alicloud/issues/4594)) +- **New Resource:** `alicloud_ecp_instance` ([#4588](https://github.com/aliyun/terraform-provider-alicloud/issues/4588)) +- **New Resource:** `alicloud_dcdn_ipa_domain` ([#4600](https://github.com/aliyun/terraform-provider-alicloud/issues/4600)) +- **New Data Source:** `alicloud_dcdn_ipa_domains` ([#4600](https://github.com/aliyun/terraform-provider-alicloud/issues/4600)) +- **New Data Source:** `alicloud_ecp_instances` ([#4588](https://github.com/aliyun/terraform-provider-alicloud/issues/4588)) +- **New Data Source:** `alicloud_ecp_zones` ([#4588](https://github.com/aliyun/terraform-provider-alicloud/issues/4588)) +- **New Data Source:** `alicloud_ecp_instance_types` ([#4588](https://github.com/aliyun/terraform-provider-alicloud/issues/4588)) + +ENHANCEMENTS: + +- resource/alicloud_gpdb_elastic_instance: Add support for output parameters db_instance_category, encryption_type, encryption_key, tags ([#4608](https://github.com/aliyun/terraform-provider-alicloud/issues/4608)) +- resource/pvtz_rule: add the query field bind_vpcs ([#4607](https://github.com/aliyun/terraform-provider-alicloud/issues/4607)) +- resource/alb_load_balancer: add the query field dns_nam ([#4607](https://github.com/aliyun/terraform-provider-alicloud/issues/4607)) +- resource/alicloud_cs_kubernetes_node_pool: support to specify desired node size for node pool ([#4596](https://github.com/aliyun/terraform-provider-alicloud/issues/4596)) +- datasource/ess_scalinggroups: Add support for output parameters vpc_id,vswitch_id,health_check_type,suspended_processes,group_deletion_protection,modification_time,total_instance_count ([#4603](https://github.com/aliyun/terraform-provider-alicloud/issues/4603)) +- datasource/ecs_network_interfaces: Add support for output parameters network_interface_traffic_mode,owner_id ([#4603](https://github.com/aliyun/terraform-provider-alicloud/issues/4603)) +- testcase: Improve the effectiveness of test cases ([#4554](https://github.com/aliyun/terraform-provider-alicloud/issues/4554)) +- testcase: Adds new unit test case for resource alicloud_oos_patch_baseline alicloud_oos_parameter alicloud_oos_execution ([#4597](https://github.com/aliyun/terraform-provider-alicloud/issues/4597)) +- testcase: Adds new unit test case for resource alicloud_oos_state_configuration alicloud_oos_service_setting alicloud_oos_secret_parameter ([#4601](https://github.com/aliyun/terraform-provider-alicloud/issues/4601)) +- testcase: Adds new unit test case for resource alicloud_nas_access_rule alicloud_nas_access_group alicloud_oos_template ([#4604](https://github.com/aliyun/terraform-provider-alicloud/issues/4604)) +- testcase: Adds new unit test case for resource alicloud_nas_fileset alicloud_nas_auto_snapshot_policy alicloud_nas_file_system ([#4609](https://github.com/aliyun/terraform-provider-alicloud/issues/4609)) +- testcase: Adds new unit test case for resource alicloud_kms_key alicloud_nas_mount_target alicloud_nas_snapshot ([#4613](https://github.com/aliyun/terraform-provider-alicloud/issues/4613)) +- testcase: Improves the provider testcase when changing the supported regions ([#4610](https://github.com/aliyun/terraform-provider-alicloud/issues/4610)) + +BUG FIXES: + +- resource/click_house_db_clusters: Fixed the difference error in the attribute db_cluster_access_white_list; Remove the db_cluster_ip_array_attribute attribute ([#4546](https://github.com/aliyun/terraform-provider-alicloud/issues/4546)) +- testcase: fix CIDR block conflicts for resource alicloud_cs_kubernete ([#4606](https://github.com/aliyun/terraform-provider-alicloud/issues/4606)) + +## 1.157.0 (February 20, 2022) + +- **New Resource:** `alicloud_dts_migration_job` ([#4572](https://github.com/aliyun/terraform-provider-alicloud/issues/4572)) +- **New Resource:** `alicloud_mse_gateway` ([#4577](https://github.com/aliyun/terraform-provider-alicloud/issues/4577)) +- **New Resource:** `alicloud_dts_migration_instance` ([#4572](https://github.com/aliyun/terraform-provider-alicloud/issues/4572)) +- **New Resource:** `alicloud_ram_service_linked_role` ([#4590](https://github.com/aliyun/terraform-provider-alicloud/issues/4590)) +- **New Resource:** `alicloud_mongodb_sharding_network_private_address` ([#4584](https://github.com/aliyun/terraform-provider-alicloud/issues/4584)) +- **New Data Source:** `alicloud_mongodb_sharding_network_private_addresses` ([#4584](https://github.com/aliyun/terraform-provider-alicloud/issues/4584)) +- **New Data Source:** `alicloud_mse_gateways` ([#4577](https://github.com/aliyun/terraform-provider-alicloud/issues/4577)) +- **New Data Source:** `alicloud_dts_migration_jobs` ([#4572](https://github.com/aliyun/terraform-provider-alicloud/issues/4572)) + +ENHANCEMENTS: + +- resource/alicloud_cen_transit_router_peer_attachment: support updating bandwidth_type with DataTransfer ([#4590](https://github.com/aliyun/terraform-provider-alicloud/issues/4590)) +- resource/alicloud_alikafka_consumer_group: change sdk to common api;Support for new parameter description ([#4583](https://github.com/aliyun/terraform-provider-alicloud/issues/4583)) +- datasource/alicloud_slb_zones: Adds new parameter master_zone_id and slave_zone_id; Deprecates tehe output slb_slave_zone_ids ([#4593](https://github.com/aliyun/terraform-provider-alicloud/issues/4593)) +- testcase: Adds new unit test case for resource alicloud_actiontrail_history_delivery_job alicloud_actiontrail_trail alicloud_cr_endpoint_acl_policy ([#4576](https://github.com/aliyun/terraform-provider-alicloud/issues/4576)) +- testcase: Adds new unit test case for resource alicloud_cloud_firewall_control_policy alicloud_security_center_group alicloud_security_center_service_linked_role ([#4580](https://github.com/aliyun/terraform-provider-alicloud/issues/4580)) +- testcase: Adds new unit test case for resource alicloud_arms_alert_contact alicloud_arms_alert_contact_group alicloud_arms_prometheus_alert_rule ([#4585](https://github.com/aliyun/terraform-provider-alicloud/issues/4585)) +- testcase: Adds new unit test case for resource alicloud_pvtz_rule_attachment alicloud_pvtz_rule alicloud_pvtz_endpoint ([#4589](https://github.com/aliyun/terraform-provider-alicloud/issues/4589)) +- testcase: Adds new unit test case for resource alicloud_oos_application_group alicloud_oos_application alicloud_pvtz_user_vpc_authorization ([#4592](https://github.com/aliyun/terraform-provider-alicloud/issues/4592)) + +BUG FIXES: + +- datasource/alicloud_bastionhost_host_account: Fixed the not found error returned by the query after the resource was deleted ([#4576](https://github.com/aliyun/terraform-provider-alicloud/issues/4576)) +- datasource/alicloud_bastionhost_host: Fixed the not found error returned by the query after the resource was deleted ([#4576](https://github.com/aliyun/terraform-provider-alicloud/issues/4576)) + +## 1.156.0 (February 15, 2022) + +- **New Resource:** `alicloud_dbfs_snapshot` ([#4553](https://github.com/aliyun/terraform-provider-alicloud/issues/4553)) +- **New Resource:** `alicloud_dbfs_instance_attachment` ([#4553](https://github.com/aliyun/terraform-provider-alicloud/issues/4553)) +- **New Data Source:** `alicloud_msc_sub_contact_verification_message` ([#4569](https://github.com/aliyun/terraform-provider-alicloud/issues/4569)) +- **New Data Source:** `alicloud_dbfs_snapshots` ([#4553](https://github.com/aliyun/terraform-provider-alicloud/issues/4553)) + +BUG FIXES: + +- resource/alicloud_db_instance: fix the error of the type convertion ([#4573](https://github.com/aliyun/terraform-provider-alicloud/issues/4573)) +- resource/alicloud_db_instance, alicloud_rds_clone_db_instance, alicloud_rds_upgrade_db_instance pg_hba_conf bug fix ([#4575](https://github.com/aliyun/terraform-provider-alicloud/issues/4575)) + +## 1.155.0 (February 13, 2022) + +- **New Resource:** `alicloud_ecs_storage_capacity_unit` ([#4562](https://github.com/aliyun/terraform-provider-alicloud/issues/4562)) +- **New Resource:** `alicloud_nas_recycle_bin` ([#4556](https://github.com/aliyun/terraform-provider-alicloud/issues/4556)) +- **New Data Source:** `alicloud_ecs_storage_capacity_units` ([#4562](https://github.com/aliyun/terraform-provider-alicloud/issues/4562)) + +ENHANCEMENTS: + +- resource/alicloud_db_instance add new Attribute pg_hba_conf to support pgsql AD domain ([#4547](https://github.com/aliyun/terraform-provider-alicloud/issues/4547)) +- resource/alicloud_rds_clone_db_instance, alicloud_rds_upgrade_db_instance add new Attribute pg_hba_conf to support pgsql AD domain ([#4558](https://github.com/aliyun/terraform-provider-alicloud/issues/4558)) +- testcase: Adds new unit test case for resource alicloud_alidns_custom_line alicloud_sddp_config alicloud_alidns_address_pool ([#4551](https://github.com/aliyun/terraform-provider-alicloud/issues/4551)) +- testcase: Adds new unit test case for resource alicloud_waf_instance alicloud_waf_certificate alicloud_waf_protection_module ([#4552](https://github.com/aliyun/terraform-provider-alicloud/issues/4552)) +- testcase: Adds new unit test case for resource alicloud_amqp_instance alicloud_amqp_queue alicloud_amqp_binding ([#4561](https://github.com/aliyun/terraform-provider-alicloud/issues/4561)) +- testcase: Adds new unit test case for resource alicloud_ecs_auto_snapshot_policy alicloud_amqp_exchange alicloud_amqp_virtual_host ([#4563](https://github.com/aliyun/terraform-provider-alicloud/issues/4563)) +- testcase: Adds new unit test case for resource alicloud_bastionhost_host_account alicloud_bastionhost_host alicloud_kvstore_audit_log_config ([#4570](https://github.com/aliyun/terraform-provider-alicloud/issues/4570)) + +## 1.154.0 (January 28, 2022) + +- **New Resource:** `alicloud_nas_data_flow` ([#4538](https://github.com/aliyun/terraform-provider-alicloud/issues/4538)) +- **New Data Source:** `alicloud_nas_data_flows` ([#4538](https://github.com/aliyun/terraform-provider-alicloud/issues/4538)) + +ENHANCEMENTS: + +- resource/alicloud_nas_data_flow: update support regions NASCPFSSupportRegions. ([#4540](https://github.com/aliyun/terraform-provider-alicloud/issues/4540)) +- datasource/alicloud_nat_gateways: Adds three internal parameters current_pagepage_size total_count to support paging ([#4541](https://github.com/aliyun/terraform-provider-alicloud/issues/4541)) +- datasource/alicloud_slb_load_balancers: Adds three internal parameters current_page page_size total_count to support paging ([#4534](https://github.com/aliyun/terraform-provider-alicloud/issues/4534)) +- datasource/alicloud_security_groups: Adds three internal parameters current_pagepage_size total_count to support paging ([#4536](https://github.com/aliyun/terraform-provider-alicloud/issues/4536)) +- datasource/alicloud_vpcs: Adds three internal parameters current_pagepage_size total_count to support paging ([#4533](https://github.com/aliyun/terraform-provider-alicloud/issues/4533)) +- datasource/alicloud_adb_db_clusters: Adds three internal parameters current_pagepage_size total_count to support paging ([#4542](https://github.com/aliyun/terraform-provider-alicloud/issues/4542)) +- datasource/alicloud_db_instances: Adds three internal parameters current_pagepage_size total_count to support paging ([#4542](https://github.com/aliyun/terraform-provider-alicloud/issues/4542)) +- datasource/alicloud_route_tables: Adds three internal parameters current_pagepage_size total_count to support paging ([#4542](https://github.com/aliyun/terraform-provider-alicloud/issues/4542)) +- datasource/alicloud_slb_zones: Supports new output parameters address_type and address_ip_version ([#4543](https://github.com/aliyun/terraform-provider-alicloud/issues/4543)) +- testcase: Adds a new test case for resource alicloud_alb_security_policy ([#4444](https://github.com/aliyun/terraform-provider-alicloud/issues/4444)) +- testcase: Adds a new test case for resource alicloud_alb_security_policy ([#4407](https://github.com/aliyun/terraform-provider-alicloud/issues/4407)) +- testcase: Adds a new test case for resource alicloud_slb_load_balancee ([#4411](https://github.com/aliyun/terraform-provider-alicloud/issues/4411)) +- testcase: Adds a new test case for resource alicloud_alb_load_balancer ([#4443](https://github.com/aliyun/terraform-provider-alicloud/issues/4443)) +- testcase: Adds a new test case for resource alicloud_express_connect_physical_connection ([#4280](https://github.com/aliyun/terraform-provider-alicloud/issues/4280)) +- testcase: Adds a new test case for resource alicloud_cen_transit_router_vpc_attachment ([#4436](https://github.com/aliyun/terraform-provider-alicloud/issues/4436)) +- testcase: Adds a new test case for resource alicloud_alb_rule ([#4446](https://github.com/aliyun/terraform-provider-alicloud/issues/4446)) +- testcase: Adds a new test case for resource alicloud_db_instance ([#4453](https://github.com/aliyun/terraform-provider-alicloud/issues/4453)) +- testcase: Adds a new test case for resource alicloud_cen_bandwidth_package ([#4422](https://github.com/aliyun/terraform-provider-alicloud/issues/4422)) +- testcase: Adds a new test case for resource alicloud_alb_server_group ([#4445](https://github.com/aliyun/terraform-provider-alicloud/issues/4445)) +- testcase: Adds new unit test case for resource alicloud_alb_health_check_template alicloud_slb_tls_cipher_policy alicloud_slb_ca_certificate ([#4529](https://github.com/aliyun/terraform-provider-alicloud/issues/4529)) +- testcase: Adds new unit test case for resource alicloud_cen_transit_router_route_table_association alicloud_cen_transit_router_route_table_propagation alicloud_cen_transit_router_route_table ([#4520](https://github.com/aliyun/terraform-provider-alicloud/issues/4520)) +- testcase: Adds new unit test case for resource alicloud_cdn_real_time_log_delivery alicloud_cen_transit_router_vbr_attachment alicloud_cen_transit_router_vpc_attachment ([#4523](https://github.com/aliyun/terraform-provider-alicloud/issues/4523)) +- testcase: Adds new unit test case for resource alicloud_alb_security_policy alicloud_rds_backup alicloud_ecd_image ([#4531](https://github.com/aliyun/terraform-provider-alicloud/issues/4531)) +- testcase: Adds new unit test case for resource alicloud_ecd_simple_office_site alicloud_ecd_network_package alicloud_ecd_nas_file_system ([#4537](https://github.com/aliyun/terraform-provider-alicloud/issues/4537)) +- testcase: Adds new unit test case for resource alicloud_ecd_user alicloud_ecd_command alicloud_ram_saml_provider ([#4539](https://github.com/aliyun/terraform-provider-alicloud/issues/4539)) +- testcase: Improve the effectiveness of test cases ([#4530](https://github.com/aliyun/terraform-provider-alicloud/issues/4530)) +- testcase/alicloud_nat_gateway: Improves the nat gateway testcases ([#4474](https://github.com/aliyun/terraform-provider-alicloud/issues/4474)) +- testcase/alicloud_snat_entry: Improves the snat entry testcases ([#4474](https://github.com/aliyun/terraform-provider-alicloud/issues/4474)) +- testcase: Adds new unit test case for resource alicloud_nas_lifecycle_policy ([#4535](https://github.com/aliyun/terraform-provider-alicloud/issues/4535)) +- testcase: Improve the unit of the test cases ([#4544](https://github.com/aliyun/terraform-provider-alicloud/issues/4544)) + +BUG FIXES: + +- bug/alicloud_snat_entry: Corrected field source_vswitch_id, source_cidr to Computed ([#4528](https://github.com/aliyun/terraform-provider-alicloud/issues/4528)) + +## 1.153.0 (January 23, 2022) + +- **New Resource:** `alicloud_alidns_monitor_config`([#4477](https://github.com/aliyun/terraform-provider-alicloud/issues/4477)) +- **New Resource:** `alicloud_vpc_bgp_peer`([#4500](https://github.com/aliyun/terraform-provider-alicloud/issues/4500)) +- **New Resource:** `alicloud_vpc_dhcp_options_set_attachment`([#4505](https://github.com/aliyun/terraform-provider-alicloud/issues/4505)) +- **New Resource:** `alicloud_nas_fileset`([#4508](https://github.com/aliyun/terraform-provider-alicloud/issues/4508)) +- **New Resource:** `alicloud_nas_auto_snapshot_policy`([#4509](https://github.com/aliyun/terraform-provider-alicloud/issues/4509)) +- **New Resource:** `alicloud_nas_lifecycle_policy`([#4513](https://github.com/aliyun/terraform-provider-alicloud/issues/4513)) +- **New Resource:** `alicloud_rds_upgrade_db_instance`([#4475](https://github.com/aliyun/terraform-provider-alicloud/issues/4475)) +- **New Resource:** `alicloud_vpc_bgp_network`([#4516](https://github.com/aliyun/terraform-provider-alicloud/issues/4516)) +- **New Data Source:** `alicloud_vpc_bgp_networks`([#4516](https://github.com/aliyun/terraform-provider-alicloud/issues/4516)) +- **New Data Source:** `alicloud_nas_lifecycle_policies`([#4513](https://github.com/aliyun/terraform-provider-alicloud/issues/4513)) +- **New Data Source:** `alicloud_nas_auto_snapshot_policies`([#4509](https://github.com/aliyun/terraform-provider-alicloud/issues/4509)) +- **New Data Source:** `alicloud_nas_filesets`([#4508](https://github.com/aliyun/terraform-provider-alicloud/issues/4508)) +- **New Data Source:** `alicloud_vpc_bgp_peers`([#4500](https://github.com/aliyun/terraform-provider-alicloud/issues/4500)) +- **New Data Source:** `alicloud_cdn_ip_info`([#4511](https://github.com/aliyun/terraform-provider-alicloud/issues/4511)) + +ENHANCEMENTS: + +- resource/alicloud_security_group_rule: support updating prefix_list_id([#4496](https://github.com/aliyun/terraform-provider-alicloud/issues/4496)) +- resource/sae_application: add the Async await process([#4525](https://github.com/aliyun/terraform-provider-alicloud/issues/4525)) +- resource/alicloud_hbr_nas_backup_plan: remove attribute create_time([#4518](https://github.com/aliyun/terraform-provider-alicloud/issues/4518)) +- resource/alicloud_nas_file_system: Support for creating cpfs file system and configuration tags([#4508](https://github.com/aliyun/terraform-provider-alicloud/issues/4508)) +- datasource/alicloud_alikafka_topics: Adds two internal parameters current_page and page_size to support paging([#4514](https://github.com/aliyun/terraform-provider-alicloud/issues/4514)) +- datasource/alicloud_emr_clusters: Adds three internal parameters current_page page_size total_count to support paging([#4519](https://github.com/aliyun/terraform-provider-alicloud/issues/4519)) +- datasource/alicloud_instances: Adds three internal parameters current_page page_size total_count to support paging([#4521](https://github.com/aliyun/terraform-provider-alicloud/issues/4521)) +- datasource/alicloud_ecs_disks: Adds three internal parameters current_page page_size total_count to support paging([#4524](https://github.com/aliyun/terraform-provider-alicloud/issues/4524)) +- testcase: Adds a new test case for resource alicloud_db_database([#4452](https://github.com/aliyun/terraform-provider-alicloud/issues/4452)) +- testcase: Adds a new test case for resource alicloud_cen_transit_router_route_table_association([#4433](https://github.com/aliyun/terraform-provider-alicloud/issues/4433)) +- testcase: Adds a new test case for resource alicloud_cen_transit_router_route_entry([#4431](https://github.com/aliyun/terraform-provider-alicloud/issues/4431)) +- testcase: Adds a new test case for resource alicloud_cen_route_service([#4427](https://github.com/aliyun/terraform-provider-alicloud/issues/4427)) +- testcase: Adds a new test case for resource alicloud_dcdn_domain([#4420](https://github.com/aliyun/terraform-provider-alicloud/issues/4420)) +- testcase: Adds new unit test case for resource alicloud_ecs_session_manager_status alicloud_ecs_key_pair alicloud_ecs_network_interface_attachment([#4506](https://github.com/aliyun/terraform-provider-alicloud/issues/4506)) +- testcase: Adds new unit test case for resource alicloud_ecs_snapshot alicloud_ecs_hpc_cluster alicloud_ecs_deployment_set([#4487](https://github.com/aliyun/terraform-provider-alicloud/issues/4487)) +- testcase: Adds a new test case for resource alicloud_rds_parameter_group([#4449](https://github.com/aliyun/terraform-provider-alicloud/issues/4449)) +- testcase: Adds a new test case for resource alicloud_rds_account([#4448](https://github.com/aliyun/terraform-provider-alicloud/issues/4448)) +- testcase: Adds new unit test case for resource alicloud_cen_transit_router_route_entry alicloud_cen_transit_router_peer_attachment alicloud_cen_transit_router([#4428](https://github.com/aliyun/terraform-provider-alicloud/issues/4428)) +- testcase: Adds new unit test case for resource alicloud_vpc_vbr_ha alicloud_cen_instance alicloud_vpc_bgp_group([#4512](https://github.com/aliyun/terraform-provider-alicloud/issues/4512)) +- testcase: Improve the effectiveness of test cases([#4515](https://github.com/aliyun/terraform-provider-alicloud/issues/4515)) +- testcase: Improve the effectiveness of test cases([#4526](https://github.com/aliyun/terraform-provider-alicloud/issues/4526)) +- testcase: Adds a new test case for resource alicloud_cen_instance([#4424](https://github.com/aliyun/terraform-provider-alicloud/issues/4424)) +- testcase: Adds a new test case for resource alicloud_cen_transit_router_peer_attachment([#4429](https://github.com/aliyun/terraform-provider-alicloud/issues/4429)) +- testcase: Adds a new test case for resource alicloud_cen_transit_router_route_table([#4432](https://github.com/aliyun/terraform-provider-alicloud/issues/4432)) +- testcase: Adds a new test case for resource alicloud_cen_transit_router_route_table_propagation([#4434](https://github.com/aliyun/terraform-provider-alicloud/issues/4434)) +- testcase: Adds a new test case for resource alicloud_cen_transit_router_vbr_attachment([#4435](https://github.com/aliyun/terraform-provider-alicloud/issues/4435)) +- testcase: Adds a new test case for resource alicloud_cen_vbr_health_check ([#4437](https://github.com/aliyun/terraform-provider-alicloud/issues/4437)) +- testcase: Adds a new test case for resource alicloud_alb_acl([#4439](https://github.com/aliyun/terraform-provider-alicloud/issues/4439)) +- testcase: Adds a new test case for resource alicloud_alb_health_check_template([#4440](https://github.com/aliyun/terraform-provider-alicloud/issues/4440)) +- testcase: Adds a new test case for resource alicloud_alb_listener([#4441](https://github.com/aliyun/terraform-provider-alicloud/issues/4441)) + +## 1.152.0 (January 16, 2022) + +- **New Resource:** `alicloud_vpc_bgp_group`([#4465](https://github.com/aliyun/terraform-provider-alicloud/issues/4465)) +- **New Resource:** `alicloud_ram_security_preference`([#4478](https://github.com/aliyun/terraform-provider-alicloud/issues/4478)) +- **New Resource:** `alicloud_nas_snapshot`([#4483](https://github.com/aliyun/terraform-provider-alicloud/issues/4483)) +- **New Resource:** `alicloud_hbr_replication_vault`([#4488](https://github.com/aliyun/terraform-provider-alicloud/issues/4488)) +- **New Resource:** `alicloud_alidns_address_pool`([#4476](https://github.com/aliyun/terraform-provider-alicloud/issues/4476)) +- **New Resource:** `alicloud_ecs_prefix_list`([#4492](https://github.com/aliyun/terraform-provider-alicloud/issues/4492)) +- **New Resource:** `alicloud_alidns_access_strategy`([#4491](https://github.com/aliyun/terraform-provider-alicloud/issues/4491)) +- **New Data Source:** `alicloud_ecs_prefix_lists`([#4492](https://github.com/aliyun/terraform-provider-alicloud/issues/4492)) +- **New Data Source:** `alicloud_alidns_address_pools`([#4476](https://github.com/aliyun/terraform-provider-alicloud/issues/4476)) +- **New Data Source:** `alicloud_hbr_replication_vault_regions`([#4488](https://github.com/aliyun/terraform-provider-alicloud/issues/4488)) +- **New Data Source:** `alicloud_nas_snapshots`([#4483](https://github.com/aliyun/terraform-provider-alicloud/issues/4483)) +- **New Data Source:** `alicloud_vpc_bgp_groups`([#4465](https://github.com/aliyun/terraform-provider-alicloud/issues/4465)) +- **New Data Source:** `alicloud_alidns_access_strategies`([#4491](https://github.com/aliyun/terraform-provider-alicloud/issues/4491)) + +ENHANCEMENTS: + +- resource/alicloud_security_group_rule: support updating prefix_list_id([#4496](https://github.com/aliyun/terraform-provider-alicloud/issues/4496)) +- datasource/alicloud_alikafka_topics: Adds new attribute id status_name instance_id tags([#4494](https://github.com/aliyun/terraform-provider-alicloud/issues/4494)) +- datasource/alicloud_alikafka_instances: Adds new attribute upgrade_service_detail_info tags domain_endpoint ssl_domain_endpoint sasl_domain_endpoint allowed_list([#4494](https://github.com/aliyun/terraform-provider-alicloud/issues/4494)) +- datasource/alicloud_alikafka_consumer_groups: Adds new attribute id consumer_id instance_id remark tags([#4494](https://github.com/aliyun/terraform-provider-alicloud/issues/4494)) +- datasource/alicloud_cloud_storage_gateway_storage_bundles: Adds two internal parameters page_number and page_size to support paging([#4490](https://github.com/aliyun/terraform-provider-alicloud/issues/4490)) +- datasource/alicloud_cloud_storage_gateway_gateways: Adds two internal parameters page_number and page_size to support paging([#4493](https://github.com/aliyun/terraform-provider-alicloud/issues/4493)) +- datasource/alicloud_nas_zones: Add support for field file_system_type([#4483](https://github.com/aliyun/terraform-provider-alicloud/issues/4483)) +- testcase: Adds new unit test case for resource alicloud_ecs_dedicated_host_cluster alicloud_ecs_auto_snapshot_policy_attachment alicloud_ecs_command([#4482](https://github.com/aliyun/terraform-provider-alicloud/issues/4482)) +- testcase: Adds new unit test case for resource alicloud_route_table alicloud_forward_entry alicloud_vpc_flow_log([#4481](https://github.com/aliyun/terraform-provider-alicloud/issues/4481)) +- docs/d/kvstore_connections: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- docs/r/actiontrail_history_delivery_job: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- docs/r/actiontrail_trail: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- docs/r/db_backup_policy: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- docs/r/kvstore_account: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- docs/r/kvstore_instance: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- docs/r/slb_domain_extension: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- docs/r/slb_listener: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- docs/r/slb_load_balancer: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- docs/r/ssl_vpn_serverdocs/r/vpc_ipv6_egress_rule: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- docs/r/vpn_connection: document optimization([#4486](https://github.com/aliyun/terraform-provider-alicloud/issues/4486)) +- client: adds a compatibile endpoint for adb service([#4502](https://github.com/aliyun/terraform-provider-alicloud/issues/4502)) +- common: adds missing importing package and format the code([#4503](https://github.com/aliyun/terraform-provider-alicloud/issues/4503)) +- ci:checkout the ci account doc/resource_actiontrail_history_delivery_job: improve the document([#4473](https://github.com/aliyun/terraform-provider-alicloud/issues/4473)) + +BUG FIXES: + +- resource/alicloud_mhub_app: fixe the accessed issues in different regions([#4480](https://github.com/aliyun/terraform-provider-alicloud/issues/4480)) +- resource/alicloud_mhub_product: fixe the accessed issues in different regions([#4480](https://github.com/aliyun/terraform-provider-alicloud/issues/4480)) +- resource/alicloud_cs_kubernetes_node_pool: Fixed an issue where modifying node pool parameters would cause elastic scaling to be turned off([#4497](https://github.com/aliyun/terraform-provider-alicloud/issues/4497)) + +## 1.151.0 (January 09, 2022) + +- **New Resource:** `alicloud_alidns_custom_line`([#4456](https://github.com/aliyun/terraform-provider-alicloud/issues/4456)) +- **New Resource:** `alicloud_vpc_vbr_ha`([#4461](https://github.com/aliyun/terraform-provider-alicloud/issues/4461)) +- **New Resource:** `alicloud_ros_template_scratch`([#4421](https://github.com/aliyun/terraform-provider-alicloud/issues/4421)) +- **New Resource:** `alidns_gtm_instance`([#4464](https://github.com/aliyun/terraform-provider-alicloud/issues/4464)) +- **New Data Source:** `alidns_gtm_instances`([#4464](https://github.com/aliyun/terraform-provider-alicloud/issues/4464)) +- **New Data Source:** `alicloud_ros_template_scratches`([#4421](https://github.com/aliyun/terraform-provider-alicloud/issues/4421)) +- **New Data Source:** `alicloud_alidns_custom_lines`([#4456](https://github.com/aliyun/terraform-provider-alicloud/issues/4456)) + +ENHANCEMENTS: + +- alicloud_ess_scalingconfiguration: Adds new attributes spot_strategy and spot_price_limit([#4413](https://github.com/aliyun/terraform-provider-alicloud/issues/4413)) +- datasource/alicloud_cen_transit_routers: Modify the parameter transit_router_id to Optional doc/cen_transit_routers: Optimize documentation([#4459](https://github.com/aliyun/terraform-provider-alicloud/issues/4459)) +- datasource/alicloud_cloud_storage_gateway_gateways: Optimize payment_type output parameter conversion([#4469](https://github.com/aliyun/terraform-provider-alicloud/issues/4469)) +- testcase: Update the invalid test([#4419](https://github.com/aliyun/terraform-provider-alicloud/issues/4419)) +- testcase: Adds a new test case for resource alicloud_ecs_launch_template([#4313](https://github.com/aliyun/terraform-provider-alicloud/issues/4313)) +- testcase: Adds a new test case for resource alicloud_ecs_snapshot([#4324](https://github.com/aliyun/terraform-provider-alicloud/issues/4324)) +- testcase: Adds a new test case for resource alicloud_ecs_dedicated_host_cluster([#4334](https://github.com/aliyun/terraform-provider-alicloud/issues/4334)) +- testcase: Change vpc and vswitch creation to read([#4399](https://github.com/aliyun/terraform-provider-alicloud/issues/4399)) +- testcase: Change vpc and vswitch creation to read([#4387](https://github.com/aliyun/terraform-provider-alicloud/issues/4387)) +- testcase: Adds a new test case for resource alicloud_snat_entry([#4276](https://github.com/aliyun/terraform-provider-alicloud/issues/4276)) +- testcase: Adds a new test case for resource alicloud_ecs_dedicated_host([#4291](https://github.com/aliyun/terraform-provider-alicloud/issues/4291)) +- testcase: Adds a new test case for resource alicloud_ecs_disk([#4302](https://github.com/aliyun/terraform-provider-alicloud/issues/4302)) +- testcase: Adds a new test case for resource alicloud_image([#4331](https://github.com/aliyun/terraform-provider-alicloud/issues/4331)) +- testcase: Adds a new test case for resource alicloud_ecs_disk_attachment([#4333](https://github.com/aliyun/terraform-provider-alicloud/issues/4333)) +- testcase: Adds a new test case for resource alicloud_ecs_network_interface([#4336](https://github.com/aliyun/terraform-provider-alicloud/issues/4336)) +- testcase: Adds new unit test case for resource alicloud_vpc_traffic_mirror_filter_egress_rule alicloud_vpc_traffic_mirror_filter alicloud_vpc_traffic_mirror_filter_ingress_rule([#4458](https://github.com/aliyun/terraform-provider-alicloud/issues/4458)) +- testcase: Adds new unit test case for resource alicloud_vpc_nat_ip alicloud_vpc_nat_ip_cidr alicloud_havip([#4466](https://github.com/aliyun/terraform-provider-alicloud/issues/4466)) +- testcase: Adds a new test case for resource alicloud_nat_gateway([#4272](https://github.com/aliyun/terraform-provider-alicloud/issues/4272)) + +BUG FIXES: + +- resource/alicloud_rds_account: Fixes the OperationDenied.DBInstanceStatus when deleting rds account([#4471](https://github.com/aliyun/terraform-provider-alicloud/issues/4471)) +- resource/ga_bandwidth_package_attachment: fix the attachment while the bandwidth package type is cross domain([#4470](https://github.com/aliyun/terraform-provider-alicloud/issues/4470)) + +## 1.150.0 (January 02, 2022) + +- **New Resource:** `alicloud_ga_acl`([#4416](https://github.com/aliyun/terraform-provider-alicloud/issues/4416)) +- **New Resource:** `alicloud_ga_acl_attachment`([#4416](https://github.com/aliyun/terraform-provider-alicloud/issues/4416)) +- **New Resource:** `alicloud_ga_additional_certificate`([#4425](https://github.com/aliyun/terraform-provider-alicloud/issues/4425)) +- **New Resource:** `alicloud_cs_kubernetes_addon`([#4402](https://github.com/aliyun/terraform-provider-alicloud/issues/4402)) +- **New Data Source:** `alicloud_cs_kubernetes_addons`([#4402](https://github.com/aliyun/terraform-provider-alicloud/issues/4402)) +- **New Data Source:** `alicloud_ga_additional_certificates`([#4425](https://github.com/aliyun/terraform-provider-alicloud/issues/4425)) +- **New Data Source:** `alicloud_ga_acls`([#4416](https://github.com/aliyun/terraform-provider-alicloud/issues/4416)) + +ENHANCEMENTS: + +- resource/alicloud_ga_accelerator: Added the time limit of the field duration.([#4426](https://github.com/aliyun/terraform-provider-alicloud/issues/4426)) +- datasource/alicloud_instance_types: Removes the parameter system_disk_category default value cloud_efficiency([#4430](https://github.com/aliyun/terraform-provider-alicloud/issues/4430)) +- docs/alicloud_kms_key: Improves the resource attribute description([#4415](https://github.com/aliyun/terraform-provider-alicloud/issues/4415)) +- doc/alicloud_cen_transit_router: Optimize document([#4417](https://github.com/aliyun/terraform-provider-alicloud/issues/4417)) +- docs/cloud_sso_access_configuration: Optimize document([#4423](https://github.com/aliyun/terraform-provider-alicloud/issues/4423)) +- testcase: Adds a new test case for resource alicloud_common_bandwidth_package([#4262](https://github.com/aliyun/terraform-provider-alicloud/issues/4262)) +- testcase: Fixes the alicloud_cs_kubernetes_addon test case bug([#4451](https://github.com/aliyun/terraform-provider-alicloud/issues/4451)) + +BUG FIXES: + +- resource/alicloud_slb_acl: Fixed the limit on the number of IP entries; Updates its dependence SDK.([#4447](https://github.com/aliyun/terraform-provider-alicloud/issues/4447)) +- testcase: Fixes the alicloud_cs_kubernetes_addon test case bug([#4450](https://github.com/aliyun/terraform-provider-alicloud/issues/4450)) + +## 1.149.0 (December 26, 2021) + +- **New Resource:** `alicloud_rds_backup`([#4343](https://github.com/aliyun/terraform-provider-alicloud/issues/4343)) +- **New Resource:** `alicloud_rds_clone_db_instance`([#4361](https://github.com/aliyun/terraform-provider-alicloud/issues/4361)) +- **New Resource:** `alicloud_cr_chart_namespace`([#4391](https://github.com/aliyun/terraform-provider-alicloud/issues/4391)) +- **New Resource:** `alicloud_fnf_execution`([#4395](https://github.com/aliyun/terraform-provider-alicloud/issues/4395)) +- **New Resource:** `alicloud_mongodb_sharding_network_public_address`([#4397](https://github.com/aliyun/terraform-provider-alicloud/issues/4397)) +- **New Resource:** `alicloud_cr_chart_repository`([#4393](https://github.com/aliyun/terraform-provider-alicloud/issues/4393)) +- **New Data Source:** `alicloud_mongodb_sharding_network_addresses`([#4397](https://github.com/aliyun/terraform-provider-alicloud/issues/4397)) +- **New Data Source:** `alicloud_cr_chart_repositories`([#4393](https://github.com/aliyun/terraform-provider-alicloud/issues/4393)) +- **New Data Source:** `alicloud_fnf_executions`([#4395](https://github.com/aliyun/terraform-provider-alicloud/issues/4395)) +- **New Data Source:** `alicloud_cr_chart_namespaces`([#4391](https://github.com/aliyun/terraform-provider-alicloud/issues/4391)) +- **New Data Source:** `alicloud_rds_backups`([#4343](https://github.com/aliyun/terraform-provider-alicloud/issues/4343)) + +ENHANCEMENTS: + +- resource/alicloud_instance: Support updating the filed deployment_set_id and deployment_set_group_no([#4408](https://github.com/aliyun/terraform-provider-alicloud/issues/4408)) +- resource/alicloud_cs_kubernetes_node_pool: CS kubernetes nodepool support deploymentSet([#4371](https://github.com/aliyun/terraform-provider-alicloud/issues/4371)) +- resource/alicloud_cr_endpoint_acl_policy : Added error retry code SLB_SERVICE_ERROR([#4351](https://github.com/aliyun/terraform-provider-alicloud/issues/4351)) +- resource/alicloud_dts_synchronization_job: Change delete api; Improved test cases([#4401](https://github.com/aliyun/terraform-provider-alicloud/issues/4401)) +- docs/cloud_sso_access_configuration: Optimize document([#4412](https://github.com/aliyun/terraform-provider-alicloud/issues/4412)) +- docs/cloud_sso_group: Optimize document([#4412](https://github.com/aliyun/terraform-provider-alicloud/issues/4412)) +- docs/cloud_sso_user: Optimize document([#4412](https://github.com/aliyun/terraform-provider-alicloud/issues/4412)) +- testcase: Change vpc and vswitch creation to read([#4376](https://github.com/aliyun/terraform-provider-alicloud/issues/4376)) +- testcase: Change vpc and vswitch creation to read([#4382](https://github.com/aliyun/terraform-provider-alicloud/issues/4382)) +- testcase: Improves the resource sweeper testcases([#4386](https://github.com/aliyun/terraform-provider-alicloud/issues/4386)) +- testcase: Improves the ddos instance testcases([#4390](https://github.com/aliyun/terraform-provider-alicloud/issues/4390)) +- testcase: Change vpc and vswitch creation to read([#4394](https://github.com/aliyun/terraform-provider-alicloud/issues/4394)) +- GithubWorkFlow: 1. Add the consistency check between the schema and document 2. Add the incompatible check between the current pr and previous provder version([#4378](https://github.com/aliyun/terraform-provider-alicloud/issues/4378)) + +BUG FIXES: + +- resource/alicloud_amqp_instance: fix the product_type checkout between domestic account and international account([#4409](https://github.com/aliyun/terraform-provider-alicloud/issues/4409)) +- resource/alicloud_cs_kubernetes_node_pool unschedulable parameter bugfix([#4403](https://github.com/aliyun/terraform-provider-alicloud/issues/4403)) +- resource/cloud_sso_access_configuration: Fixed character length limit error for access_configuration_name attribute([#4412](https://github.com/aliyun/terraform-provider-alicloud/issues/4412)) +- GithubWorkFlow: fix the issue of the markdown parser([#4392](https://github.com/aliyun/terraform-provider-alicloud/issues/4392)) + ## 1.148.0 (December 19, 2021) -- **New Resource:** `alicloud_mongodb_audit_policy` ([#4368](https://github.com/aliyun/terraform-provider-alicloud/issues/4368)) -- **New Resource:** `cloud_sso_access_configuration_provisioning` ([#4369](https://github.com/aliyun/terraform-provider-alicloud/issues/4369)) -- **New Resource:** `alicloud_mongodb_account` ([#4375](https://github.com/aliyun/terraform-provider-alicloud/issues/4375)) -- **New Resource:** `alicloud_mongodb_serverless_instance` ([#4365](https://github.com/aliyun/terraform-provider-alicloud/issues/4365)) -- **New Resource:** `ecs_session_manager_status` ([#4337](https://github.com/aliyun/terraform-provider-alicloud/issues/4337)) -- **New Resource:** `cddc_dedicated_host_account` ([#4358](https://github.com/aliyun/terraform-provider-alicloud/issues/4358)) -- **New Data Source:** `cddc_dedicated_host_accounts` ([#4365](https://github.com/aliyun/terraform-provider-alicloud/issues/4365)) -- **New Data Source:** `alicloud_mongodb_serverless_instances` ([#4365](https://github.com/aliyun/terraform-provider-alicloud/issues/4365)) -- **New Data Source:** `alicloud_mongodb_accounts` ([#4375](https://github.com/aliyun/terraform-provider-alicloud/issues/4375)) -- **New Data Source:** `alicloud_mongodb_audit_policies` ([#4368](https://github.com/aliyun/terraform-provider-alicloud/issues/4368)) -- **New Data Source:** `cloud_sso_service` ([#4367](https://github.com/aliyun/terraform-provider-alicloud/issues/4367)) +- **New Resource:** `alicloud_mongodb_audit_policy`([#4368](https://github.com/aliyun/terraform-provider-alicloud/issues/4368)) +- **New Resource:** `cloud_sso_access_configuration_provisioning`([#4369](https://github.com/aliyun/terraform-provider-alicloud/issues/4369)) +- **New Resource:** `alicloud_mongodb_account`([#4375](https://github.com/aliyun/terraform-provider-alicloud/issues/4375)) +- **New Resource:** `alicloud_mongodb_serverless_instance`([#4365](https://github.com/aliyun/terraform-provider-alicloud/issues/4365)) +- **New Resource:** `ecs_session_manager_status`([#4337](https://github.com/aliyun/terraform-provider-alicloud/issues/4337)) +- **New Resource:** `cddc_dedicated_host_account`([#4358](https://github.com/aliyun/terraform-provider-alicloud/issues/4358)) +- **New Data Source:** `cddc_dedicated_host_accounts`([#4365](https://github.com/aliyun/terraform-provider-alicloud/issues/4365)) +- **New Data Source:** `alicloud_mongodb_serverless_instances`([#4365](https://github.com/aliyun/terraform-provider-alicloud/issues/4365)) +- **New Data Source:** `alicloud_mongodb_accounts`([#4375](https://github.com/aliyun/terraform-provider-alicloud/issues/4375)) +- **New Data Source:** `alicloud_mongodb_audit_policies`([#4368](https://github.com/aliyun/terraform-provider-alicloud/issues/4368)) +- **New Data Source:** `cloud_sso_service`([#4367](https://github.com/aliyun/terraform-provider-alicloud/issues/4367)) ENHANCEMENTS: -- resource/alicloud_pvtz_zone: Support update sync_status without user_info ([#4372](https://github.com/aliyun/terraform-provider-alicloud/issues/4372)) -- resource/alicloud_db_instance Add new attribute fresh_white_list_readins to support read-only instances to which you want to synchronize the IP address whitelist. ([#4379](https://github.com/aliyun/terraform-provider-alicloud/issues/4379)) -- resource/alicloud_cddc_dedicated_host_group: Added support for the field open_permission ([#4358](https://github.com/aliyun/terraform-provider-alicloud/issues/4358)) -- datasource/alicloud_alikafka_instances: Adds new attribute expired_time,msg_retain,ssl_end_point ([#4352](https://github.com/aliyun/terraform-provider-alicloud/issues/4352)) -- datasource/alicloud_cen_instances: Adds new attribute creation_time ([#4349](https://github.com/aliyun/terraform-provider-alicloud/issues/4349)) -- datasource/alicloud_ddoscoo_instances: Adds new attribute remark,ip_mode,debt_status,edition,ip_version,status,enabled,expire_time,create_time ([#4352](https://github.com/aliyun/terraform-provider-alicloud/issues/4352)) -- datasource/alicloud_adb_db_clusters: Adds new attribute mode ([#4354](https://github.com/aliyun/terraform-provider-alicloud/issues/4354)) -- datasource/alicloud_click_house_db_clusters: Adds new attribute control_version ([#4355](https://github.com/aliyun/terraform-provider-alicloud/issues/4355)) -- datasource/alicloud_cloud_storage_gateway_storage_bundles: Adds new attribute create_time ([#4359](https://github.com/aliyun/terraform-provider-alicloud/issues/4359)) -- datasource/alicloud_click_house_db_clusters: Adds new attribute status ([#4362](https://github.com/aliyun/terraform-provider-alicloud/issues/4362)) -- datasource/alicloud_sae_service: Add error code. datasource/alicloud_cen_instances: Adds new attribute create_time. ([#4364](https://github.com/aliyun/terraform-provider-alicloud/issues/4364)) -- doc/alicloud_cloud_firewall_control_policy: document optimization ([#4366](https://github.com/aliyun/terraform-provider-alicloud/issues/4366)) -- doc/alicloud_cloud_dts_subscription_job: document optimization ([#4373](https://github.com/aliyun/terraform-provider-alicloud/issues/4373)) -- doc/alicloud_ga_accelerator,alicloud_ga_bandwidth_package: Optimize the documentation ([#4377](https://github.com/aliyun/terraform-provider-alicloud/issues/4377)) -- doc/config: Optimize the config documentation resource/alicloud_config_aggregator: changed the field aggregator_accounts from Required into optional ([#4374](https://github.com/aliyun/terraform-provider-alicloud/issues/4374)) -- docs/alb_acl: Optimize document. ([#4380](https://github.com/aliyun/terraform-provider-alicloud/issues/4380)) - -BUG FIXES: - -- resource/alicloud_alb_acl: Fixed the limit on the number of IP entries. ([#4380](https://github.com/aliyun/terraform-provider-alicloud/issues/4380)) -- datasource/alicloud_alb_acls: Fix query bug for acl_entries. ([#4380](https://github.com/aliyun/terraform-provider-alicloud/issues/4380)) -- datasource/alicloud_adb_db_clusters: Fix the problem of test case failure. ([#4364](https://github.com/aliyun/terraform-provider-alicloud/issues/4364)) +- resource/alicloud_pvtz_zone: Support update sync_status without user_info([#4372](https://github.com/aliyun/terraform-provider-alicloud/issues/4372)) +- resource/alicloud_db_instance Add new attribute fresh_white_list_readins to support read-only instances to which you want to synchronize the IP address whitelist.([#4379](https://github.com/aliyun/terraform-provider-alicloud/issues/4379)) +- resource/alicloud_cddc_dedicated_host_group: Added support for the field open_permission([#4358](https://github.com/aliyun/terraform-provider-alicloud/issues/4358)) +- datasource/alicloud_alikafka_instances: Adds new attribute expired_time,msg_retain,ssl_end_point([#4352](https://github.com/aliyun/terraform-provider-alicloud/issues/4352)) +- datasource/alicloud_cen_instances: Adds new attribute creation_time([#4349](https://github.com/aliyun/terraform-provider-alicloud/issues/4349)) +- datasource/alicloud_ddoscoo_instances: Adds new attribute remark,ip_mode,debt_status,edition,ip_version,status,enabled,expire_time,create_time([#4352](https://github.com/aliyun/terraform-provider-alicloud/issues/4352)) +- datasource/alicloud_adb_db_clusters: Adds new attribute mode([#4354](https://github.com/aliyun/terraform-provider-alicloud/issues/4354)) +- datasource/alicloud_click_house_db_clusters: Adds new attribute control_version([#4355](https://github.com/aliyun/terraform-provider-alicloud/issues/4355)) +- datasource/alicloud_cloud_storage_gateway_storage_bundles: Adds new attribute create_time([#4359](https://github.com/aliyun/terraform-provider-alicloud/issues/4359)) +- datasource/alicloud_click_house_db_clusters: Adds new attribute status([#4362](https://github.com/aliyun/terraform-provider-alicloud/issues/4362)) +- datasource/alicloud_sae_service: Add error code. datasource/alicloud_cen_instances: Adds new attribute create_time.([#4364](https://github.com/aliyun/terraform-provider-alicloud/issues/4364)) +- doc/alicloud_cloud_firewall_control_policy: document optimization([#4366](https://github.com/aliyun/terraform-provider-alicloud/issues/4366)) +- doc/alicloud_cloud_dts_subscription_job: document optimization([#4373](https://github.com/aliyun/terraform-provider-alicloud/issues/4373)) +- doc/alicloud_ga_accelerator,alicloud_ga_bandwidth_package: Optimize the documentation([#4377](https://github.com/aliyun/terraform-provider-alicloud/issues/4377)) +- doc/config: Optimize the config documentation resource/alicloud_config_aggregator: changed the field aggregator_accounts from Required into optional([#4374](https://github.com/aliyun/terraform-provider-alicloud/issues/4374)) +- docs/alb_acl: Optimize document.([#4380](https://github.com/aliyun/terraform-provider-alicloud/issues/4380)) + +BUG FIXES: + +- resource/alicloud_alb_acl: Fixed the limit on the number of IP entries.([#4380](https://github.com/aliyun/terraform-provider-alicloud/issues/4380)) +- datasource/alicloud_alb_acls: Fix query bug for acl_entries.([#4380](https://github.com/aliyun/terraform-provider-alicloud/issues/4380)) +- datasource/alicloud_adb_db_clusters: Fix the problem of test case failure.([#4364](https://github.com/aliyun/terraform-provider-alicloud/issues/4364)) ## 1.147.0 (December 12, 2021) -- **New Resource:** `alicloud_cddc_dedicated_host` ([#4297](https://github.com/aliyun/terraform-provider-alicloud/issues/4297)) -- **New Resource:** `alicloud_oos_service_setting` ([#4321](https://github.com/aliyun/terraform-provider-alicloud/issues/4321)) -- **New Resource:** `alicloud_oos_parameter` ([#4327](https://github.com/aliyun/terraform-provider-alicloud/issues/4327)) -- **New Resource:** `alicloud_oos_state_configuration` ([#4323](https://github.com/aliyun/terraform-provider-alicloud/issues/4323)) -- **New Resource:** `alicloud_oos_secret_parameter` ([#4328](https://github.com/aliyun/terraform-provider-alicloud/issues/4328)) -- **New Resource:** `alicloud_click_house_backup_policy` ([#4341](https://github.com/aliyun/terraform-provider-alicloud/issues/4341)) -- **New Data Source:** `alicloud_click_house_backup_policies` ([#4341](https://github.com/aliyun/terraform-provider-alicloud/issues/4341)) -- **New Data Source:** `alicloud_oos_secret_parameters` ([#4328](https://github.com/aliyun/terraform-provider-alicloud/issues/4328)) -- **New Data Source:** `alicloud_oos_state_configurations` ([#4323](https://github.com/aliyun/terraform-provider-alicloud/issues/4323)) -- **New Data Source:** `alicloud_oos_parameters` ([#4327](https://github.com/aliyun/terraform-provider-alicloud/issues/4327)) -- **New Data Source:** `alicloud_cddc_dedicated_hosts` ([#4297](https://github.com/aliyun/terraform-provider-alicloud/issues/4297)) -- **New Data Source:** `alicloud_cddc_zones` ([#4297](https://github.com/aliyun/terraform-provider-alicloud/issues/4297)) -- **New Data Source:** `alicloud_cddc_host_ecs_level_infos` ([#4297](https://github.com/aliyun/terraform-provider-alicloud/issues/4297)) +- **New Resource:** `alicloud_cddc_dedicated_host`([#4297](https://github.com/aliyun/terraform-provider-alicloud/issues/4297)) +- **New Resource:** `alicloud_oos_service_setting`([#4321](https://github.com/aliyun/terraform-provider-alicloud/issues/4321)) +- **New Resource:** `alicloud_oos_parameter`([#4327](https://github.com/aliyun/terraform-provider-alicloud/issues/4327)) +- **New Resource:** `alicloud_oos_state_configuration`([#4323](https://github.com/aliyun/terraform-provider-alicloud/issues/4323)) +- **New Resource:** `alicloud_oos_secret_parameter`([#4328](https://github.com/aliyun/terraform-provider-alicloud/issues/4328)) +- **New Resource:** `alicloud_click_house_backup_policy`([#4341](https://github.com/aliyun/terraform-provider-alicloud/issues/4341)) +- **New Data Source:** `alicloud_click_house_backup_policies`([#4341](https://github.com/aliyun/terraform-provider-alicloud/issues/4341)) +- **New Data Source:** `alicloud_oos_secret_parameters`([#4328](https://github.com/aliyun/terraform-provider-alicloud/issues/4328)) +- **New Data Source:** `alicloud_oos_state_configurations`([#4323](https://github.com/aliyun/terraform-provider-alicloud/issues/4323)) +- **New Data Source:** `alicloud_oos_parameters`([#4327](https://github.com/aliyun/terraform-provider-alicloud/issues/4327)) +- **New Data Source:** `alicloud_cddc_dedicated_hosts`([#4297](https://github.com/aliyun/terraform-provider-alicloud/issues/4297)) +- **New Data Source:** `alicloud_cddc_zones`([#4297](https://github.com/aliyun/terraform-provider-alicloud/issues/4297)) +- **New Data Source:** `alicloud_cddc_host_ecs_level_infos`([#4297](https://github.com/aliyun/terraform-provider-alicloud/issues/4297)) ENHANCEMENTS: -- resource/alicloud_instance: add the condition of the filed auto_release_time during updating ([#4346](https://github.com/aliyun/terraform-provider-alicloud/issues/4346)) -- resource/alicloud_amqp_instance: Supports create instance using international account ([#4345](https://github.com/aliyun/terraform-provider-alicloud/issues/4345)) -- resource/alicloud_db_backup_policy,add new attribute released_keep_policy to support modify released_keep_policy. ([#4294](https://github.com/aliyun/terraform-provider-alicloud/issues/4294)) -- resource/alicloud_cs_kubernetes_node_pool: enhanced the consistency of node count ([#4330](https://github.com/aliyun/terraform-provider-alicloud/issues/4330)) -- testcase: Adds new unit test case for resource alicloud_vswitch ([#4347](https://github.com/aliyun/terraform-provider-alicloud/issues/4347)) -- docs/brain_industrial_service,datahub_service,edas_service,mns_service,sae_service,vs_service,alidns_instance,amqp_instance,cloud_firewall_instance,sddp_instance : Update the support situation at the international site ([#4332](https://github.com/aliyun/terraform-provider-alicloud/issues/4332)) -- doc/alicloud_log_audit: Add new parameter vpc_flow_enabled,vpc_flow_ttl,vpc_flow_collection_policy,vpc_sync_enabled,vpc_sync_ttl,ddos_bgp_access_enabled,ddos_bgp_access_ttl,ddos_dip_access_enabled,ddos_dip_access_ttl,ddos_dip_access_ti_enabled, Update the default value of oss_access_ttl,drds_audit_ttl,slb_access_ttl, Correct the parameter drds_audit_enabled ([#4322](https://github.com/aliyun/terraform-provider-alicloud/issues/4322)) -- Github WorkFlow: Add Some Basic Checks in PR ([#4319](https://github.com/aliyun/terraform-provider-alicloud/issues/4319)) -- Revert New Resource alicloud_rds_clone_db_instance ([#4326](https://github.com/aliyun/terraform-provider-alicloud/issues/4326)) +- resource/alicloud_instance: add the condition of the filed auto_release_time during updating([#4346](https://github.com/aliyun/terraform-provider-alicloud/issues/4346)) +- resource/alicloud_amqp_instance: Supports create instance using international account([#4345](https://github.com/aliyun/terraform-provider-alicloud/issues/4345)) +- resource/alicloud_db_backup_policy,add new attribute released_keep_policy to support modify released_keep_policy.([#4294](https://github.com/aliyun/terraform-provider-alicloud/issues/4294)) +- resource/alicloud_cs_kubernetes_node_pool: enhanced the consistency of node count([#4330](https://github.com/aliyun/terraform-provider-alicloud/issues/4330)) +- testcase: Adds new unit test case for resource alicloud_vswitch([#4347](https://github.com/aliyun/terraform-provider-alicloud/issues/4347)) +- docs/brain_industrial_service,datahub_service,edas_service,mns_service,sae_service,vs_service,alidns_instance,amqp_instance,cloud_firewall_instance,sddp_instance : Update the support situation at the international site([#4332](https://github.com/aliyun/terraform-provider-alicloud/issues/4332)) +- doc/alicloud_log_audit: Add new parameter vpc_flow_enabled,vpc_flow_ttl,vpc_flow_collection_policy,vpc_sync_enabled,vpc_sync_ttl,ddos_bgp_access_enabled,ddos_bgp_access_ttl,ddos_dip_access_enabled,ddos_dip_access_ttl,ddos_dip_access_ti_enabled, Update the default value of oss_access_ttl,drds_audit_ttl,slb_access_ttl, Correct the parameter drds_audit_enabled([#4322](https://github.com/aliyun/terraform-provider-alicloud/issues/4322)) +- Github WorkFlow: Add Some Basic Checks in PR([#4319](https://github.com/aliyun/terraform-provider-alicloud/issues/4319)) +- Revert New Resource alicloud_rds_clone_db_instance([#4326](https://github.com/aliyun/terraform-provider-alicloud/issues/4326)) BUG FIXES: -- datasource/alicloud_emr_clusters: Fix the issue that the enable_details query is invalid ([#4340](https://github.com/aliyun/terraform-provider-alicloud/issues/4340)) +- datasource/alicloud_emr_clusters: Fix the issue that the enable_details query is invalid([#4340](https://github.com/aliyun/terraform-provider-alicloud/issues/4340)) ## 1.146.0 (December 05, 2021) -- **New Resource:** `alicloud_ecs_dedicated_host_cluster` ([#4275](https://github.com/aliyun/terraform-provider-alicloud/issues/4275)) -- **New Resource:** `alicloud_oos_application_group` ([#4299](https://github.com/aliyun/terraform-provider-alicloud/issues/4299)) -- **New Resource:** `alicloud_dts_consumer_channel` ([#4290](https://github.com/aliyun/terraform-provider-alicloud/issues/4290)) -- **New Resource:** `alicloud_ecd_image` ([#4204](https://github.com/aliyun/terraform-provider-alicloud/issues/4204)) -- **New Resource:** `alicloud_oos_patch_baseline` ([#4305](https://github.com/aliyun/terraform-provider-alicloud/issues/4305)) -- **New Resource:** `alicloud_ecd_command` ([#4244](https://github.com/aliyun/terraform-provider-alicloud/issues/4244)) -- **New Data Source:** `alicloud_oos_patch_baselines` ([#4305](https://github.com/aliyun/terraform-provider-alicloud/issues/4305)) -- **New Data Source:** `alicloud_ecd_images` ([#4204](https://github.com/aliyun/terraform-provider-alicloud/issues/4204)) -- **New Data Source:** `alicloud_emr_clusters` ([#4301](https://github.com/aliyun/terraform-provider-alicloud/issues/4301)) -- **New Data Source:** `alicloud_dts_consumer_channels` ([#4290](https://github.com/aliyun/terraform-provider-alicloud/issues/4290)) -- **New Data Source:** `alicloud_oos_application_groups` ([#4299](https://github.com/aliyun/terraform-provider-alicloud/issues/4299)) -- **New Data Source:** `alicloud_ecs_dedicated_host_clusters` ([#4275](https://github.com/aliyun/terraform-provider-alicloud/issues/4275)) -- **New Data Source:** `alicloud_ecd_commands` ([#4244](https://github.com/aliyun/terraform-provider-alicloud/issues/4244)) +- **New Resource:** `alicloud_ecs_dedicated_host_cluster`([#4275](https://github.com/aliyun/terraform-provider-alicloud/issues/4275)) +- **New Resource:** `alicloud_oos_application_group`([#4299](https://github.com/aliyun/terraform-provider-alicloud/issues/4299)) +- **New Resource:** `alicloud_dts_consumer_channel`([#4290](https://github.com/aliyun/terraform-provider-alicloud/issues/4290)) +- **New Resource:** `alicloud_ecd_image`([#4204](https://github.com/aliyun/terraform-provider-alicloud/issues/4204)) +- **New Resource:** `alicloud_oos_patch_baseline`([#4305](https://github.com/aliyun/terraform-provider-alicloud/issues/4305)) +- **New Resource:** `alicloud_ecd_command`([#4244](https://github.com/aliyun/terraform-provider-alicloud/issues/4244)) +- **New Data Source:** `alicloud_oos_patch_baselines`([#4305](https://github.com/aliyun/terraform-provider-alicloud/issues/4305)) +- **New Data Source:** `alicloud_ecd_images`([#4204](https://github.com/aliyun/terraform-provider-alicloud/issues/4204)) +- **New Data Source:** `alicloud_emr_clusters`([#4301](https://github.com/aliyun/terraform-provider-alicloud/issues/4301)) +- **New Data Source:** `alicloud_dts_consumer_channels`([#4290](https://github.com/aliyun/terraform-provider-alicloud/issues/4290)) +- **New Data Source:** `alicloud_oos_application_groups`([#4299](https://github.com/aliyun/terraform-provider-alicloud/issues/4299)) +- **New Data Source:** `alicloud_ecs_dedicated_host_clusters`([#4275](https://github.com/aliyun/terraform-provider-alicloud/issues/4275)) +- **New Data Source:** `alicloud_ecd_commands`([#4244](https://github.com/aliyun/terraform-provider-alicloud/issues/4244)) ENHANCEMENTS: -- resource/alicloud_pvtz_zone: Support updating the filed user_info and sync_status ([#4300](https://github.com/aliyun/terraform-provider-alicloud/issues/4300)) -- resource/alicloud_config_compliance_pack: Support updating the filed compliance_pack_name ([#4295](https://github.com/aliyun/terraform-provider-alicloud/issues/4295)) -- resource/alicloud_ga_accelerator: Adds new attributes renewal_status and auto_renew_duration to supports auto renew ([#4306](https://github.com/aliyun/terraform-provider-alicloud/issues/4306)) -- resource/alicloud_dts_synchronization_instance: replace api DescribeSynchronizationJobs to new api DescribeDtsJobDetail ([#4298](https://github.com/aliyun/terraform-provider-alicloud/issues/4298)) -- resource/alicloud_ram_user: Update the error message ([#4075](https://github.com/aliyun/terraform-provider-alicloud/issues/4075)) -- datasource/alicloud_oos_application_groups: Adds output variable update_time. ([#4312](https://github.com/aliyun/terraform-provider-alicloud/issues/4312)) -- datasource/alicloud_config_aggregate_config_rules: add the Attributes aggregator_id, compliance ([#4304](https://github.com/aliyun/terraform-provider-alicloud/issues/4304)) -- datasource/alicloud_config_config_rules: removed the fields member_id, multi_account ([#4304](https://github.com/aliyun/terraform-provider-alicloud/issues/4304)) -- testcase: Adds new testcase for resource alicloud_vpc_dhcp_options_set ([#4251](https://github.com/aliyun/terraform-provider-alicloud/issues/4251)) -- testcase: Adds new testcase for resource alicloud_vpc_flow_log ([#4252](https://github.com/aliyun/terraform-provider-alicloud/issues/4252)) -- testcase: Add new testcase for resource alicloud_vpc_traffic_mirror_filter ([#4254](https://github.com/aliyun/terraform-provider-alicloud/issues/4254)) -- testcase: Add new testcase for resource alicloud_vpc_traffic_mirror_filter_egress_rule ([#4255](https://github.com/aliyun/terraform-provider-alicloud/issues/4255)) -- testcase: Adds new testcase for resource alicloud_vpc_traffic_mirror_filter_ingress_rule ([#4256](https://github.com/aliyun/terraform-provider-alicloud/issues/4256)) -- testcase: Add new testcases for resource alicloud_vpc ([#4257](https://github.com/aliyun/terraform-provider-alicloud/issues/4257)) -- testcase: Add new testcase for resource alicloud_vpc_nat_ip ([#4259](https://github.com/aliyun/terraform-provider-alicloud/issues/4259)) -- testcase: Adds new test case for resource alicloud_vpc_nat_ip_cidr ([#4261](https://github.com/aliyun/terraform-provider-alicloud/issues/4261)) -- testcase: Adds new test case for resource alicloud_havip ([#4269](https://github.com/aliyun/terraform-provider-alicloud/issues/4269)) -- testcase: Adds new test case for resource alicloud_network_acl ([#4273](https://github.com/aliyun/terraform-provider-alicloud/issues/4273)) -- testcase: Adds new test case for resource alicloud_route_table ([#4274](https://github.com/aliyun/terraform-provider-alicloud/issues/4274)) -- testcase: Adds new test case for resource alicloud_vswitch ([#4277](https://github.com/aliyun/terraform-provider-alicloud/issues/4277)) -- testcase: Adds new testcase for resource alicloud_vpc_traffic_mirror_session ([#4281](https://github.com/aliyun/terraform-provider-alicloud/issues/4281)) -- testcase: Adds new unit test case for resource alicloud_vpc ([#4314](https://github.com/aliyun/terraform-provider-alicloud/issues/4314)) -- testcase: Adds new test case for resource alicloud_ecs_key_pair ([#4303](https://github.com/aliyun/terraform-provider-alicloud/issues/4303)) -- testcase: Adds a new test case for resource alicloud_ecs_deployment_set ([#4292](https://github.com/aliyun/terraform-provider-alicloud/issues/4292)) -- testcase: Adds a new test case for resource alicloud_ecs_command ([#4289](https://github.com/aliyun/terraform-provider-alicloud/issues/4289)) -- testcase: Adds a new test case for resource alicloud_ecs_auto_snapshot_policy ([#4288](https://github.com/aliyun/terraform-provider-alicloud/issues/4288)) -- testcase: Adds a new test case for resource alicloud_eip_address ([#4265](https://github.com/aliyun/terraform-provider-alicloud/issues/4265)) -- testcase: Adds a new test case for resource alicloud_forward_entry ([#4268](https://github.com/aliyun/terraform-provider-alicloud/issues/4268)) -- testcase: Improves the log project sweeper test case ([#4317](https://github.com/aliyun/terraform-provider-alicloud/issues/4317)) -- testcase: Upgrades the gomonkey version to v2 ([#4318](https://github.com/aliyun/terraform-provider-alicloud/issues/4318)) -- docs/alicloud_dts_synchronization_job: Improves its docs on attribute dts_job_name ([#4311](https://github.com/aliyun/terraform-provider-alicloud/issues/4311)) -- doc/alicloud_cloud_sso_user: Document optimization doc/alicloud_cloud_sso_directory: Document optimization ([#4309](https://github.com/aliyun/terraform-provider-alicloud/issues/4309)) -- docs/alicloud_cs_managed_kubernetes: Corrects the misspelled words ([#4248](https://github.com/aliyun/terraform-provider-alicloud/issues/4248)) -- docs/alicloud_sae_application:Support updating the filed replicas ([#4316](https://github.com/aliyun/terraform-provider-alicloud/issues/4316)) - -BUG FIXES: - -- resource/alicloud_ga_accelerator: Fixes the InvalidRegionId error when getting the its endpoint ([#4310](https://github.com/aliyun/terraform-provider-alicloud/issues/4310)) -- resource/alicloud_polardb_db_instance: Fixes the setting security_ips bug without filtering hidden values ([#4233](https://github.com/aliyun/terraform-provider-alicloud/issues/4233)) -- resource/alicloud_ga_bandwidth_package,alicloud_ga_ip_set: Fix the GreaterThanGa.IpSetBandwidth error ([#4307](https://github.com/aliyun/terraform-provider-alicloud/issues/4307)) +- resource/alicloud_pvtz_zone: Support updating the filed user_info and sync_status([#4300](https://github.com/aliyun/terraform-provider-alicloud/issues/4300)) +- resource/alicloud_config_compliance_pack: Support updating the filed compliance_pack_name([#4295](https://github.com/aliyun/terraform-provider-alicloud/issues/4295)) +- resource/alicloud_ga_accelerator: Adds new attributes renewal_status and auto_renew_duration to supports auto renew([#4306](https://github.com/aliyun/terraform-provider-alicloud/issues/4306)) +- resource/alicloud_dts_synchronization_instance: replace api DescribeSynchronizationJobs to new api DescribeDtsJobDetail([#4298](https://github.com/aliyun/terraform-provider-alicloud/issues/4298)) +- resource/alicloud_ram_user: Update the error message([#4075](https://github.com/aliyun/terraform-provider-alicloud/issues/4075)) +- datasource/alicloud_oos_application_groups: Adds output variable update_time.([#4312](https://github.com/aliyun/terraform-provider-alicloud/issues/4312)) +- datasource/alicloud_config_aggregate_config_rules: add the Attributes aggregator_id, compliance([#4304](https://github.com/aliyun/terraform-provider-alicloud/issues/4304)) +- datasource/alicloud_config_config_rules: removed the fields member_id, multi_account([#4304](https://github.com/aliyun/terraform-provider-alicloud/issues/4304)) +- testcase: Adds new testcase for resource alicloud_vpc_dhcp_options_set([#4251](https://github.com/aliyun/terraform-provider-alicloud/issues/4251)) +- testcase: Adds new testcase for resource alicloud_vpc_flow_log([#4252](https://github.com/aliyun/terraform-provider-alicloud/issues/4252)) +- testcase: Add new testcase for resource alicloud_vpc_traffic_mirror_filter([#4254](https://github.com/aliyun/terraform-provider-alicloud/issues/4254)) +- testcase: Add new testcase for resource alicloud_vpc_traffic_mirror_filter_egress_rule([#4255](https://github.com/aliyun/terraform-provider-alicloud/issues/4255)) +- testcase: Adds new testcase for resource alicloud_vpc_traffic_mirror_filter_ingress_rule([#4256](https://github.com/aliyun/terraform-provider-alicloud/issues/4256)) +- testcase: Add new testcases for resource alicloud_vpc([#4257](https://github.com/aliyun/terraform-provider-alicloud/issues/4257)) +- testcase: Add new testcase for resource alicloud_vpc_nat_ip([#4259](https://github.com/aliyun/terraform-provider-alicloud/issues/4259)) +- testcase: Adds new test case for resource alicloud_vpc_nat_ip_cidr([#4261](https://github.com/aliyun/terraform-provider-alicloud/issues/4261)) +- testcase: Adds new test case for resource alicloud_havip([#4269](https://github.com/aliyun/terraform-provider-alicloud/issues/4269)) +- testcase: Adds new test case for resource alicloud_network_acl([#4273](https://github.com/aliyun/terraform-provider-alicloud/issues/4273)) +- testcase: Adds new test case for resource alicloud_route_table([#4274](https://github.com/aliyun/terraform-provider-alicloud/issues/4274)) +- testcase: Adds new test case for resource alicloud_vswitch([#4277](https://github.com/aliyun/terraform-provider-alicloud/issues/4277)) +- testcase: Adds new testcase for resource alicloud_vpc_traffic_mirror_session([#4281](https://github.com/aliyun/terraform-provider-alicloud/issues/4281)) +- testcase: Adds new unit test case for resource alicloud_vpc([#4314](https://github.com/aliyun/terraform-provider-alicloud/issues/4314)) +- testcase: Adds new test case for resource alicloud_ecs_key_pair([#4303](https://github.com/aliyun/terraform-provider-alicloud/issues/4303)) +- testcase: Adds a new test case for resource alicloud_ecs_deployment_set([#4292](https://github.com/aliyun/terraform-provider-alicloud/issues/4292)) +- testcase: Adds a new test case for resource alicloud_ecs_command([#4289](https://github.com/aliyun/terraform-provider-alicloud/issues/4289)) +- testcase: Adds a new test case for resource alicloud_ecs_auto_snapshot_policy([#4288](https://github.com/aliyun/terraform-provider-alicloud/issues/4288)) +- testcase: Adds a new test case for resource alicloud_eip_address([#4265](https://github.com/aliyun/terraform-provider-alicloud/issues/4265)) +- testcase: Adds a new test case for resource alicloud_forward_entry([#4268](https://github.com/aliyun/terraform-provider-alicloud/issues/4268)) +- testcase: Improves the log project sweeper test case([#4317](https://github.com/aliyun/terraform-provider-alicloud/issues/4317)) +- testcase: Upgrades the gomonkey version to v2([#4318](https://github.com/aliyun/terraform-provider-alicloud/issues/4318)) +- docs/alicloud_dts_synchronization_job: Improves its docs on attribute dts_job_name([#4311](https://github.com/aliyun/terraform-provider-alicloud/issues/4311)) +- doc/alicloud_cloud_sso_user: Document optimization doc/alicloud_cloud_sso_directory: Document optimization([#4309](https://github.com/aliyun/terraform-provider-alicloud/issues/4309)) +- docs/alicloud_cs_managed_kubernetes: Corrects the misspelled words([#4248](https://github.com/aliyun/terraform-provider-alicloud/issues/4248)) +- docs/alicloud_sae_application:Support updating the filed replicas([#4316](https://github.com/aliyun/terraform-provider-alicloud/issues/4316)) + +BUG FIXES: + +- resource/alicloud_ga_accelerator: Fixes the InvalidRegionId error when getting the its endpoint([#4310](https://github.com/aliyun/terraform-provider-alicloud/issues/4310)) +- resource/alicloud_polardb_db_instance: Fixes the setting security_ips bug without filtering hidden values([#4233](https://github.com/aliyun/terraform-provider-alicloud/issues/4233)) +- resource/alicloud_ga_bandwidth_package,alicloud_ga_ip_set: Fix the GreaterThanGa.IpSetBandwidth error([#4307](https://github.com/aliyun/terraform-provider-alicloud/issues/4307)) ## 1.145.0 (November 28, 2021) -- **New Resource:** `alicloud_ros_stack_instance` ([#4258](https://github.com/aliyun/terraform-provider-alicloud/issues/4258)) -- **New Resource:** `alicloud_eci_virtual_node` ([#4266](https://github.com/aliyun/terraform-provider-alicloud/issues/4266)) -- **New Resource:** `alicloud_oos_application` ([#4271](https://github.com/aliyun/terraform-provider-alicloud/issues/4271)) -- **New Data Source:** `alicloud_oos_applications` ([#4271](https://github.com/aliyun/terraform-provider-alicloud/issues/4271)) -- **New Data Source:** `alicloud_eci_virtual_nodes` ([#4266](https://github.com/aliyun/terraform-provider-alicloud/issues/4266)) -- **New Data Source:** `alicloud_ros_stack_instances` ([#4258](https://github.com/aliyun/terraform-provider-alicloud/issues/4258)) -- **New Data Source:** `alicloud_eci_zones` ([#4266](https://github.com/aliyun/terraform-provider-alicloud/issues/4266)) +- **New Resource:** `alicloud_ros_stack_instance`([#4258](https://github.com/aliyun/terraform-provider-alicloud/issues/4258)) +- **New Resource:** `alicloud_eci_virtual_node`([#4266](https://github.com/aliyun/terraform-provider-alicloud/issues/4266)) +- **New Resource:** `alicloud_oos_application`([#4271](https://github.com/aliyun/terraform-provider-alicloud/issues/4271)) +- **New Data Source:** `alicloud_oos_applications`([#4271](https://github.com/aliyun/terraform-provider-alicloud/issues/4271)) +- **New Data Source:** `alicloud_eci_virtual_nodes`([#4266](https://github.com/aliyun/terraform-provider-alicloud/issues/4266)) +- **New Data Source:** `alicloud_ros_stack_instances`([#4258](https://github.com/aliyun/terraform-provider-alicloud/issues/4258)) +- **New Data Source:** `alicloud_eci_zones`([#4266](https://github.com/aliyun/terraform-provider-alicloud/issues/4266)) ENHANCEMENTS: -- provider: Adds TF_APPEND_USER_AGENT environment variables to support setting custom user-agent ([#4287](https://github.com/aliyun/terraform-provider-alicloud/issues/4287)) -- resource/config_rule: Support configuring the specified field status ([#4242](https://github.com/aliyun/terraform-provider-alicloud/issues/4242)) -- resource/alicloud_click_house_db_cluster: Add db_cluster_access_white_list attribute. ([#4247](https://github.com/aliyun/terraform-provider-alicloud/issues/4247)) -- resource/config_aggregate_config_rule: Support updating the filed status ([#4250](https://github.com/aliyun/terraform-provider-alicloud/issues/4250)) -- resource/alicloud_cloud_sso_access_configuration: Modify the parametrs permission_policy_name and permission_policy_type as required parameters. ([#4263](https://github.com/aliyun/terraform-provider-alicloud/issues/4263)) -- resource/alicloud_cloud_sso_access_assignment: Optimize the logic of resource acquisition. ([#4263](https://github.com/aliyun/terraform-provider-alicloud/issues/4263)) -- resource/cloud_storage_gateway_gateway_file_share_test: Refine test cases. ([#4264](https://github.com/aliyun/terraform-provider-alicloud/issues/4264)) -- resource/alicloud_cs_kubernetes_node_pool: Support multi security groups. ([#4267](https://github.com/aliyun/terraform-provider-alicloud/issues/4267)) -- resource/alicloud_instance: Support configuring the filed secondary_private_ip_address_count ([#4270](https://github.com/aliyun/terraform-provider-alicloud/issues/4270)) -- resource/config_aggregate_compliance_pack: Support updating the filed aggregate_compliance_pack_name ([#4282](https://github.com/aliyun/terraform-provider-alicloud/issues/4282)) -- datasource/alicloud_images: Adds two attribute image_id and image_name ([#4285](https://github.com/aliyun/terraform-provider-alicloud/issues/4285)) +- provider: Adds TF_APPEND_USER_AGENT environment variables to support setting custom user-agent([#4287](https://github.com/aliyun/terraform-provider-alicloud/issues/4287)) +- resource/config_rule: Support configuring the specified field status([#4242](https://github.com/aliyun/terraform-provider-alicloud/issues/4242)) +- resource/alicloud_click_house_db_cluster: Add db_cluster_access_white_list attribute.([#4247](https://github.com/aliyun/terraform-provider-alicloud/issues/4247)) +- resource/config_aggregate_config_rule: Support updating the filed status([#4250](https://github.com/aliyun/terraform-provider-alicloud/issues/4250)) +- resource/alicloud_cloud_sso_access_configuration: Modify the parametrs permission_policy_name and permission_policy_type as required parameters.([#4263](https://github.com/aliyun/terraform-provider-alicloud/issues/4263)) +- resource/alicloud_cloud_sso_access_assignment: Optimize the logic of resource acquisition.([#4263](https://github.com/aliyun/terraform-provider-alicloud/issues/4263)) +- resource/cloud_storage_gateway_gateway_file_share_test: Refine test cases.([#4264](https://github.com/aliyun/terraform-provider-alicloud/issues/4264)) +- resource/alicloud_cs_kubernetes_node_pool: Support multi security groups.([#4267](https://github.com/aliyun/terraform-provider-alicloud/issues/4267)) +- resource/alicloud_instance: Support configuring the filed secondary_private_ip_address_count([#4270](https://github.com/aliyun/terraform-provider-alicloud/issues/4270)) +- resource/config_aggregate_compliance_pack: Support updating the filed aggregate_compliance_pack_name([#4282](https://github.com/aliyun/terraform-provider-alicloud/issues/4282)) +- datasource/alicloud_images: Adds two attribute image_id and image_name([#4285](https://github.com/aliyun/terraform-provider-alicloud/issues/4285)) BUG FIXES: -- resource/alicloud_ecs_disk: Fixes the InvalidParameter error when modifying the disk charge type ([#4284](https://github.com/aliyun/terraform-provider-alicloud/issues/4284)) -- resource/alicloud_cs_serverless_kubernetes: fix vswitch_ids returns null ([#4267](https://github.com/aliyun/terraform-provider-alicloud/issues/4267)) -- resource/alicloud_cs_managed_kubernetes: Fix the inconsistency of the number of cluster nodes ([#4279](https://github.com/aliyun/terraform-provider-alicloud/issues/4279)) -- data_source/alb_security_policies: Fixing query errors; Refine test cases. ([#4283](https://github.com/aliyun/terraform-provider-alicloud/issues/4283)) -- doc/cloud_storage_gateway_gateway_cache_disk: Fix formatting errors. ([#4264](https://github.com/aliyun/terraform-provider-alicloud/issues/4264)) +- resource/alicloud_ecs_disk: Fixes the InvalidParameter error when modifying the disk charge type([#4284](https://github.com/aliyun/terraform-provider-alicloud/issues/4284)) +- resource/alicloud_cs_serverless_kubernetes: fix vswitch_ids returns null([#4267](https://github.com/aliyun/terraform-provider-alicloud/issues/4267)) +- resource/alicloud_cs_managed_kubernetes: Fix the inconsistency of the number of cluster nodes([#4279](https://github.com/aliyun/terraform-provider-alicloud/issues/4279)) +- data_source/alb_security_policies: Fixing query errors; Refine test cases.([#4283](https://github.com/aliyun/terraform-provider-alicloud/issues/4283)) +- doc/cloud_storage_gateway_gateway_cache_disk: Fix formatting errors.([#4264](https://github.com/aliyun/terraform-provider-alicloud/issues/4264)) +- datasource/alicloud_log_service: fix logtail Unmarshal bug and update log service([#4236](https://github.com/aliyun/terraform-provider-alicloud/issues/4236)) ## 1.144.0 (November 21, 2021) -- **New Resource:** `alicloud_direct_mail_tag` ([#4178](https://github.com/aliyun/terraform-provider-alicloud/issues/4178)) -- **New Resource:** `alicloud_ecd_desktop` ([#4199](https://github.com/aliyun/terraform-provider-alicloud/issues/4199)) -- **New Resource:** `alicloud_cloud_storage_gateway_gateway_cache_disk` ([#4217](https://github.com/aliyun/terraform-provider-alicloud/issues/4217)) -- **New Resource:** `alicloud_cloud_storage_gateway_gateway_logging` ([#4227](https://github.com/aliyun/terraform-provider-alicloud/issues/4227)) -- **New Resource:** `alicloud_cloud_storage_gateway_gateway_file_share` ([#4231](https://github.com/aliyun/terraform-provider-alicloud/issues/4231)) -- **New Resource:** `alicloud_cloud_storage_gateway_gateway_block_volume` ([#4234](https://github.com/aliyun/terraform-provider-alicloud/issues/4234)) -- **New Resource:** `alicloud_cloud_storage_gateway_express_sync` ([#4239](https://github.com/aliyun/terraform-provider-alicloud/issues/4239)) -- **New Resource:** `alicloud_cloud_storage_gateway_express_sync_share_attachment` ([#4239](https://github.com/aliyun/terraform-provider-alicloud/issues/4239)) -- **New Data Source:** `alicloud_direct_mail_tags` ([#4178](https://github.com/aliyun/terraform-provider-alicloud/issues/4178)) -- **New Data Source:** `alicloud_ecd_desktops` ([#4199](https://github.com/aliyun/terraform-provider-alicloud/issues/4199)) -- **New Data Source:** `alicloud_cloud_storage_gateway_gateway_cache_disks` ([#4217](https://github.com/aliyun/terraform-provider-alicloud/issues/4217)) -- **New Data Source:** `data_source_alicloud_cloud_storage_gateway_stocks` ([#4224](https://github.com/aliyun/terraform-provider-alicloud/issues/4224)) -- **New Data Source:** `alicloud_cloud_storage_gateway_gateway_file_shares` ([#4231](https://github.com/aliyun/terraform-provider-alicloud/issues/4231)) -- **New Data Source:** `alicloud_cloud_storage_gateway_gateway_block_volumes` ([#4234](https://github.com/aliyun/terraform-provider-alicloud/issues/4234)) -- **New Data Source:** `alicloud_cloud_storage_gateway_express_syncs` ([#4239](https://github.com/aliyun/terraform-provider-alicloud/issues/4239)) +- **New Resource:** `alicloud_direct_mail_tag`([#4178](https://github.com/aliyun/terraform-provider-alicloud/issues/4178)) +- **New Resource:** `alicloud_ecd_desktop`([#4199](https://github.com/aliyun/terraform-provider-alicloud/issues/4199)) +- **New Resource:** `alicloud_cloud_storage_gateway_gateway_cache_disk`([#4217](https://github.com/aliyun/terraform-provider-alicloud/issues/4217)) +- **New Resource:** `alicloud_cloud_storage_gateway_gateway_logging`([#4227](https://github.com/aliyun/terraform-provider-alicloud/issues/4227)) +- **New Resource:** `alicloud_cloud_storage_gateway_gateway_file_share`([#4231](https://github.com/aliyun/terraform-provider-alicloud/issues/4231)) +- **New Resource:** `alicloud_cloud_storage_gateway_gateway_block_volume`([#4234](https://github.com/aliyun/terraform-provider-alicloud/issues/4234)) +- **New Resource:** `alicloud_cloud_storage_gateway_express_sync`([#4239](https://github.com/aliyun/terraform-provider-alicloud/issues/4239)) +- **New Resource:** `alicloud_cloud_storage_gateway_express_sync_share_attachment`([#4239](https://github.com/aliyun/terraform-provider-alicloud/issues/4239)) +- **New Data Source:** `alicloud_direct_mail_tags`([#4178](https://github.com/aliyun/terraform-provider-alicloud/issues/4178)) +- **New Data Source:** `alicloud_ecd_desktops`([#4199](https://github.com/aliyun/terraform-provider-alicloud/issues/4199)) +- **New Data Source:** `alicloud_cloud_storage_gateway_gateway_cache_disks`([#4217](https://github.com/aliyun/terraform-provider-alicloud/issues/4217)) +- **New Data Source:** `data_source_alicloud_cloud_storage_gateway_stocks`([#4224](https://github.com/aliyun/terraform-provider-alicloud/issues/4224)) +- **New Data Source:** `alicloud_cloud_storage_gateway_gateway_file_shares`([#4231](https://github.com/aliyun/terraform-provider-alicloud/issues/4231)) +- **New Data Source:** `alicloud_cloud_storage_gateway_gateway_block_volumes`([#4234](https://github.com/aliyun/terraform-provider-alicloud/issues/4234)) +- **New Data Source:** `alicloud_cloud_storage_gateway_express_syncs`([#4239](https://github.com/aliyun/terraform-provider-alicloud/issues/4239)) ENHANCEMENTS: -- resource/alicloud_ram_role: Support updating the filed description ([#4212](https://github.com/aliyun/terraform-provider-alicloud/issues/4212)) -- resource/alicloud_instance: Support configuring the filed hpc_cluster_id ([#4214](https://github.com/aliyun/terraform-provider-alicloud/issues/4214)) -- resource/alicloud_msc_sub_contact: Support setting Chinese contact name,Change position to take Others to Other ([#4221](https://github.com/aliyun/terraform-provider-alicloud/issues/4221)) -- resource/alicloud_instance: Supports configuring the secondary_private_ips for primary network interface ([#4223](https://github.com/aliyun/terraform-provider-alicloud/issues/4223)) -- resource/alicloud_instance: Support the secondary_private_ips 's retry process ([#4228](https://github.com/aliyun/terraform-provider-alicloud/issues/4228)) -- docs: Improves the Config's available region in the documentation ([#4238](https://github.com/aliyun/terraform-provider-alicloud/issues/4238)) +- resource/alicloud_ram_role: Support updating the filed description([#4212](https://github.com/aliyun/terraform-provider-alicloud/issues/4212)) +- resource/alicloud_instance: Support configuring the filed hpc_cluster_id([#4214](https://github.com/aliyun/terraform-provider-alicloud/issues/4214)) +- resource/alicloud_msc_sub_contact: Support setting Chinese contact name,Change position to take Others to Other([#4221](https://github.com/aliyun/terraform-provider-alicloud/issues/4221)) +- resource/alicloud_instance: Supports configuring the secondary_private_ips for primary network interface([#4223](https://github.com/aliyun/terraform-provider-alicloud/issues/4223)) +- resource/alicloud_instance: Support the secondary_private_ips 's retry process([#4228](https://github.com/aliyun/terraform-provider-alicloud/issues/4228)) +- docs: Improves the Config's available region in the documentation([#4238](https://github.com/aliyun/terraform-provider-alicloud/issues/4238)) BUG FIXES: -- resource/alicloud_slb_listener: Fixes the importing diff error caused by delete_protection_validation and health_check_http_code default value ([#4240](https://github.com/aliyun/terraform-provider-alicloud/issues/4240)) +- resource/alicloud_slb_listener: Fixes the importing diff error caused by delete_protection_validation and health_check_http_code default value([#4240](https://github.com/aliyun/terraform-provider-alicloud/issues/4240)) ## 1.143.0 (November 14, 2021) -- **New Resource:** `alicloud_vpc_ipv6_internet_bandwidth` ([#4176](https://github.com/aliyun/terraform-provider-alicloud/issues/4176)) -- **New Resource:** `alicloud_pvtz_endpoint` ([#4177](https://github.com/aliyun/terraform-provider-alicloud/issues/4177)) -- **New Resource:** `alicloud_simple_application_server_firewall_rule` ([#4183](https://github.com/aliyun/terraform-provider-alicloud/issues/4183)) -- **New Resource:** `alicloud_pvtz_rule_attachment` ([#4185](https://github.com/aliyun/terraform-provider-alicloud/issues/4185)) -- **New Resource:** `alicloud_pvtz_rules` ([#4185](https://github.com/aliyun/terraform-provider-alicloud/issues/4185)) -- **New Resource:** `alicloud_simple_application_server_snapshot` ([#4196](https://github.com/aliyun/terraform-provider-alicloud/issues/4196)) -- **New Resource:** `alicloud_simple_application_server_custom_image` ([#4205](https://github.com/aliyun/terraform-provider-alicloud/issues/4205)) -- **New Data Source:** `alicloud_vpc_ipv6_internet_bandwidths` ([#4176](https://github.com/aliyun/terraform-provider-alicloud/issues/4176)) -- **New Data Source:** `alicloud_pvtz_endpoints` ([#4177](https://github.com/aliyun/terraform-provider-alicloud/issues/4177)) -- **New Data Source:** `alicloud_pvtz_resolver_zones` ([#4177](https://github.com/aliyun/terraform-provider-alicloud/issues/4177)) -- **New Data Source:** `alicloud_simple_application_server_firewall_rules` ([#4183](https://github.com/aliyun/terraform-provider-alicloud/issues/4183)) -- **New Data Source:** `alicloud_pvtz_rules` ([#4185](https://github.com/aliyun/terraform-provider-alicloud/issues/4185)) -- **New Data Source:** `alicloud_simple_application_server_snapshots` ([#4196](https://github.com/aliyun/terraform-provider-alicloud/issues/4196)) -- **New Data Source:** `alicloud_simple_application_server_disks` ([#4196](https://github.com/aliyun/terraform-provider-alicloud/issues/4196)) -- **New Data Source:** `alicloud_ecd_bundles` ([#4202](https://github.com/aliyun/terraform-provider-alicloud/issues/4202)) -- **New Data Source:** `alicloud_simple_application_server_custom_images` ([#4205](https://github.com/aliyun/terraform-provider-alicloud/issues/4205)) +- **New Resource:** `alicloud_vpc_ipv6_internet_bandwidth`([#4176](https://github.com/aliyun/terraform-provider-alicloud/issues/4176)) +- **New Resource:** `alicloud_pvtz_endpoint`([#4177](https://github.com/aliyun/terraform-provider-alicloud/issues/4177)) +- **New Resource:** `alicloud_simple_application_server_firewall_rule`([#4183](https://github.com/aliyun/terraform-provider-alicloud/issues/4183)) +- **New Resource:** `alicloud_pvtz_rule_attachment`([#4185](https://github.com/aliyun/terraform-provider-alicloud/issues/4185)) +- **New Resource:** `alicloud_pvtz_rules`([#4185](https://github.com/aliyun/terraform-provider-alicloud/issues/4185)) +- **New Resource:** `alicloud_simple_application_server_snapshot`([#4196](https://github.com/aliyun/terraform-provider-alicloud/issues/4196)) +- **New Resource:** `alicloud_simple_application_server_custom_image`([#4205](https://github.com/aliyun/terraform-provider-alicloud/issues/4205)) +- **New Data Source:** `alicloud_vpc_ipv6_internet_bandwidths`([#4176](https://github.com/aliyun/terraform-provider-alicloud/issues/4176)) +- **New Data Source:** `alicloud_pvtz_endpoints`([#4177](https://github.com/aliyun/terraform-provider-alicloud/issues/4177)) +- **New Data Source:** `alicloud_pvtz_resolver_zones`([#4177](https://github.com/aliyun/terraform-provider-alicloud/issues/4177)) +- **New Data Source:** `alicloud_simple_application_server_firewall_rules`([#4183](https://github.com/aliyun/terraform-provider-alicloud/issues/4183)) +- **New Data Source:** `alicloud_pvtz_rules`([#4185](https://github.com/aliyun/terraform-provider-alicloud/issues/4185)) +- **New Data Source:** `alicloud_simple_application_server_snapshots`([#4196](https://github.com/aliyun/terraform-provider-alicloud/issues/4196)) +- **New Data Source:** `alicloud_simple_application_server_disks`([#4196](https://github.com/aliyun/terraform-provider-alicloud/issues/4196)) +- **New Data Source:** `alicloud_ecd_bundles`([#4202](https://github.com/aliyun/terraform-provider-alicloud/issues/4202)) +- **New Data Source:** `alicloud_simple_application_server_custom_images`([#4205](https://github.com/aliyun/terraform-provider-alicloud/issues/4205)) ENHANCEMENTS: -- resource/alicloud_ess_scalingconfiguration: Adds new attributes host_name ([#4180](https://github.com/aliyun/terraform-provider-alicloud/issues/4180)) -- resource/alicloud_cloud_sso_access_configuration: add regular check resource/alicloud_cloud_sso_directory : add regular check, Support separate update of saml_identity_provider_configuration property ([#4193](https://github.com/aliyun/terraform-provider-alicloud/issues/4193)) -- resource/alicloud_cloud_sso_group: add regular check resource/alicloud_cloud_sso_user: add regular chec ([#4193](https://github.com/aliyun/terraform-provider-alicloud/issues/4193)) -- resource/bastionhost_instance: Add new field enable_public_access ([#4206](https://github.com/aliyun/terraform-provider-alicloud/issues/4206)) -- resource/alicloud_simple_application_server_custom_image_test:Optimize test cases. ([#4208](https://github.com/aliyun/terraform-provider-alicloud/issues/4208)) -- resource/alicloud_simple_application_server_snapshot_test:Optimize test cases. ([#4208](https://github.com/aliyun/terraform-provider-alicloud/issues/4208)) -- Github WorkFlow: Add markdown-terraform-format && markdown-terraform-validate ([#4184](https://github.com/aliyun/terraform-provider-alicloud/issues/4184)) -- Github WorkFlow: Add markdown-terraform-format ([#4190](https://github.com/aliyun/terraform-provider-alicloud/issues/4190)) -- docs/alicloud_log_store: Improves its documentation ([#4186](https://github.com/aliyun/terraform-provider-alicloud/issues/4186)) +- resource/alicloud_ess_scalingconfiguration: Adds new attributes host_name([#4180](https://github.com/aliyun/terraform-provider-alicloud/issues/4180)) +- resource/alicloud_cloud_sso_access_configuration: add regular check resource/alicloud_cloud_sso_directory : add regular check, Support separate update of saml_identity_provider_configuration property([#4193](https://github.com/aliyun/terraform-provider-alicloud/issues/4193)) +- resource/alicloud_cloud_sso_group: add regular check resource/alicloud_cloud_sso_user: add regular chec([#4193](https://github.com/aliyun/terraform-provider-alicloud/issues/4193)) +- resource/bastionhost_instance: Add new field enable_public_access([#4206](https://github.com/aliyun/terraform-provider-alicloud/issues/4206)) +- resource/alicloud_simple_application_server_custom_image_test:Optimize test cases.([#4208](https://github.com/aliyun/terraform-provider-alicloud/issues/4208)) +- resource/alicloud_simple_application_server_snapshot_test:Optimize test cases.([#4208](https://github.com/aliyun/terraform-provider-alicloud/issues/4208)) +- Github WorkFlow: Add markdown-terraform-format && markdown-terraform-validate([#4184](https://github.com/aliyun/terraform-provider-alicloud/issues/4184)) +- Github WorkFlow: Add markdown-terraform-format([#4190](https://github.com/aliyun/terraform-provider-alicloud/issues/4190)) +- docs/alicloud_log_store: Improves its documentation([#4186](https://github.com/aliyun/terraform-provider-alicloud/issues/4186)) BUG FIXES: -- resource/alicloud_db_clone_instances:fix bug about not filter securityIps by DBInstanceIPArrayName ([#4182](https://github.com/aliyun/terraform-provider-alicloud/issues/4182)) -- datasource/alicloud_alb_server_groups: Fix the issue of enable_details export error ([#4181](https://github.com/aliyun/terraform-provider-alicloud/issues/4181)) -- doc/alicloud_cloud_storage_gateway_gateway_smb_user: Fixes the title error ([#4187](https://github.com/aliyun/terraform-provider-alicloud/issues/4187)) -- bug/alicloud_cms_monitor_group_instances: Fix the problem that cannot be imported when the number of instances exceeds 30 ([#4203](https://github.com/aliyun/terraform-provider-alicloud/issues/4203)) +- resource/alicloud_db_clone_instances:fix bug about not filter securityIps by DBInstanceIPArrayName([#4182](https://github.com/aliyun/terraform-provider-alicloud/issues/4182)) +- datasource/alicloud_alb_server_groups: Fix the issue of enable_details export error([#4181](https://github.com/aliyun/terraform-provider-alicloud/issues/4181)) +- doc/alicloud_cloud_storage_gateway_gateway_smb_user: Fixes the title error([#4187](https://github.com/aliyun/terraform-provider-alicloud/issues/4187)) +- bug/alicloud_cms_monitor_group_instances: Fix the problem that cannot be imported when the number of instances exceeds 30([#4203](https://github.com/aliyun/terraform-provider-alicloud/issues/4203)) ## 1.142.0 (November 7, 2021) -- **New Resource:** `alicloud_ecd_user` ([#4126](https://github.com/aliyun/terraform-provider-alicloud/issues/4126)) -- **New Resource:** `alicloud_vpc_traffic_mirror_session` ([#4156](https://github.com/aliyun/terraform-provider-alicloud/issues/4156)) -- **New Resource:** `alicloud_gpdb_account` ([#4158](https://github.com/aliyun/terraform-provider-alicloud/issues/4158)) -- **New Resource:** `alicloud_security_center_slr` ([#4159](https://github.com/aliyun/terraform-provider-alicloud/issues/4159)) -- **New Resource:** `alicloud_vpc_ipv6_gateway` ([#4161](https://github.com/aliyun/terraform-provider-alicloud/issues/4161)) -- **New Resource:** `alicloud_vpc_ipv6_egress_rule` ([#4167](https://github.com/aliyun/terraform-provider-alicloud/issues/4167)) -- **New Resource:** `alicloud_event_bridge_service_linked_role` ([#4159](https://github.com/aliyun/terraform-provider-alicloud/issues/4159)) -- **New Resource:** `alicloud_ecd_network_package` ([#4153](https://github.com/aliyun/terraform-provider-alicloud/issues/4153)) -- **New Resource:** `alicloud_cms_dynamic_tag_group` ([#4160](https://github.com/aliyun/terraform-provider-alicloud/issues/4160)) -- **New Resource:** `alicloud_cloud_storage_gateway_gateway_smb_user` ([#4163](https://github.com/aliyun/terraform-provider-alicloud/issues/4163)) -- **New Data Source:** `alicloud_ecd_users` ([#4126](https://github.com/aliyun/terraform-provider-alicloud/issues/4126)) -- **New Data Source:** `alicloud_vpc_traffic_mirror_sessions` ([#4156](https://github.com/aliyun/terraform-provider-alicloud/issues/4156)) -- **New Data Source:** `alicloud_gpdb_accounts` ([#4158](https://github.com/aliyun/terraform-provider-alicloud/issues/4158)) -- **New Data Source:** `alicloud_vpc_ipv6_gateways` ([#4161](https://github.com/aliyun/terraform-provider-alicloud/issues/4161)) -- **New Data Source:** `alicloud_vpc_ipv6_egress_rules` ([#4167](https://github.com/aliyun/terraform-provider-alicloud/issues/4167)) -- **New Data Source:** `alicloud_vpc_ipv6_addresses` ([#4167](https://github.com/aliyun/terraform-provider-alicloud/issues/4167)) -- **New Data Source:** `alicloud_ecd_network_packages` ([#4153](https://github.com/aliyun/terraform-provider-alicloud/issues/4153)) -- **New Data Source:** `alicloud_cms_dynamic_tag_groups` ([#4160](https://github.com/aliyun/terraform-provider-alicloud/issues/4160)) -- **New Data Source:** `alicloud_cloud_storage_gateway_gateway_smb_users` ([#4163](https://github.com/aliyun/terraform-provider-alicloud/issues/4163)) +- **New Resource:** `alicloud_ecd_user`([#4126](https://github.com/aliyun/terraform-provider-alicloud/issues/4126)) +- **New Resource:** `alicloud_vpc_traffic_mirror_session`([#4156](https://github.com/aliyun/terraform-provider-alicloud/issues/4156)) +- **New Resource:** `alicloud_gpdb_account`([#4158](https://github.com/aliyun/terraform-provider-alicloud/issues/4158)) +- **New Resource:** `alicloud_security_center_slr`([#4159](https://github.com/aliyun/terraform-provider-alicloud/issues/4159)) +- **New Resource:** `alicloud_vpc_ipv6_gateway`([#4161](https://github.com/aliyun/terraform-provider-alicloud/issues/4161)) +- **New Resource:** `alicloud_vpc_ipv6_egress_rule`([#4167](https://github.com/aliyun/terraform-provider-alicloud/issues/4167)) +- **New Resource:** `alicloud_event_bridge_service_linked_role`([#4159](https://github.com/aliyun/terraform-provider-alicloud/issues/4159)) +- **New Resource:** `alicloud_ecd_network_package`([#4153](https://github.com/aliyun/terraform-provider-alicloud/issues/4153)) +- **New Resource:** `alicloud_cms_dynamic_tag_group`([#4160](https://github.com/aliyun/terraform-provider-alicloud/issues/4160)) +- **New Resource:** `alicloud_cloud_storage_gateway_gateway_smb_user`([#4163](https://github.com/aliyun/terraform-provider-alicloud/issues/4163)) +- **New Data Source:** `alicloud_ecd_users`([#4126](https://github.com/aliyun/terraform-provider-alicloud/issues/4126)) +- **New Data Source:** `alicloud_vpc_traffic_mirror_sessions`([#4156](https://github.com/aliyun/terraform-provider-alicloud/issues/4156)) +- **New Data Source:** `alicloud_gpdb_accounts`([#4158](https://github.com/aliyun/terraform-provider-alicloud/issues/4158)) +- **New Data Source:** `alicloud_vpc_ipv6_gateways`([#4161](https://github.com/aliyun/terraform-provider-alicloud/issues/4161)) +- **New Data Source:** `alicloud_vpc_ipv6_egress_rules`([#4167](https://github.com/aliyun/terraform-provider-alicloud/issues/4167)) +- **New Data Source:** `alicloud_vpc_ipv6_addresses`([#4167](https://github.com/aliyun/terraform-provider-alicloud/issues/4167)) +- **New Data Source:** `alicloud_ecd_network_packages`([#4153](https://github.com/aliyun/terraform-provider-alicloud/issues/4153)) +- **New Data Source:** `alicloud_cms_dynamic_tag_groups`([#4160](https://github.com/aliyun/terraform-provider-alicloud/issues/4160)) +- **New Data Source:** `alicloud_cloud_storage_gateway_gateway_smb_users`([#4163](https://github.com/aliyun/terraform-provider-alicloud/issues/4163)) ENHANCEMENTS: -- resource/alicloud_cloud_storage_gateway_gateway_smb_user: Adds waiting codes to wait the task is completed ([#4175](https://github.com/aliyun/terraform-provider-alicloud/issues/4175)) -- resource/alicloud_ecd_user: redefine connectivity EcdUserSupportRegions; data_source/alicloud_ecd_users: redefine connectivity EcdUserSupportRegions ([#4162](https://github.com/aliyun/terraform-provider-alicloud/issues/4162)) -- resource/alicloud_event_bridge_service_sle: After the version 1.142.0, the resource is renamed as alicloud_event_bridge_service_linked_role. ([#4159](https://github.com/aliyun/terraform-provider-alicloud/issues/4159)) -- resource/alicloud_ecs_network_interface: Add delete error retry code InvalidOperation.Conflict ([#4173](https://github.com/aliyun/terraform-provider-alicloud/issues/4173)) -- datasource/alicloud_dataworks_service: Renames to alicloud_data_works_service; docs: Improves the docs subcategory ([#4157](https://github.com/aliyun/terraform-provider-alicloud/issues/4157)) -- Github WorkFlow: Add markdown-link-check && markdown-spell-check ([#4166](https://github.com/aliyun/terraform-provider-alicloud/issues/4166)) +- resource/alicloud_cloud_storage_gateway_gateway_smb_user: Adds waiting codes to wait the task is completed([#4175](https://github.com/aliyun/terraform-provider-alicloud/issues/4175)) +- resource/alicloud_ecd_user: redefine connectivity EcdUserSupportRegions; data_source/alicloud_ecd_users: redefine connectivity EcdUserSupportRegions([#4162](https://github.com/aliyun/terraform-provider-alicloud/issues/4162)) +- resource/alicloud_event_bridge_service_sle: After the version 1.142.0, the resource is renamed as alicloud_event_bridge_service_linked_role.([#4159](https://github.com/aliyun/terraform-provider-alicloud/issues/4159)) +- resource/alicloud_ecs_network_interface: Add delete error retry code InvalidOperation.Conflict([#4173](https://github.com/aliyun/terraform-provider-alicloud/issues/4173)) +- datasource/alicloud_dataworks_service: Renames to alicloud_data_works_service; docs: Improves the docs subcategory([#4157](https://github.com/aliyun/terraform-provider-alicloud/issues/4157)) +- Github WorkFlow: Add markdown-link-check && markdown-spell-check([#4166](https://github.com/aliyun/terraform-provider-alicloud/issues/4166)) BUG FIXES: -- datasource/alicloud_alb_load_balancers: fix load_balancer_business_status spelling error ([#4170](https://github.com/aliyun/terraform-provider-alicloud/issues/4170)) -- docs: Fixes the spelling error ([#4169](https://github.com/aliyun/terraform-provider-alicloud/issues/4169)) +- datasource/alicloud_alb_load_balancers: fix load_balancer_business_status spelling error([#4170](https://github.com/aliyun/terraform-provider-alicloud/issues/4170)) +- docs: Fixes the spelling error([#4169](https://github.com/aliyun/terraform-provider-alicloud/issues/4169)) ## 1.141.0 (October 31, 2021) -- **New Resource:** `alicloud_waf_protection_module` ([#4143](https://github.com/aliyun/terraform-provider-alicloud/issues/4143)) -- **New Resource:** `alicloud_vpc_traffic_mirror_service` ([#4134](https://github.com/aliyun/terraform-provider-alicloud/issues/4134)) -- **New Resource:** `alicloud_msc_sub_webhook` ([#4138](https://github.com/aliyun/terraform-provider-alicloud/issues/4138)) -- **New Resource:** `alicloud_ecd_nas_file_system` ([#4139](https://github.com/aliyun/terraform-provider-alicloud/issues/4139)) -- **New Resource:** `alicloud_cloud_sso_user_attachment` ([#4140](https://github.com/aliyun/terraform-provider-alicloud/issues/4140)) -- **New Resource:** `alicloud_cloud_sso_access_assignment` ([#4140](https://github.com/aliyun/terraform-provider-alicloud/issues/4140)) -- **New Data Source:** `alicloud_msc_sub_webhooks` ([#4138](https://github.com/aliyun/terraform-provider-alicloud/issues/4138)) -- **New Data Source:** `alicloud_ecd_nas_file_systems` ([#4139](https://github.com/aliyun/terraform-provider-alicloud/issues/4139)) +- **New Resource:** `alicloud_waf_protection_module`([#4143](https://github.com/aliyun/terraform-provider-alicloud/issues/4143)) +- **New Resource:** `alicloud_vpc_traffic_mirror_service`([#4134](https://github.com/aliyun/terraform-provider-alicloud/issues/4134)) +- **New Resource:** `alicloud_msc_sub_webhook`([#4138](https://github.com/aliyun/terraform-provider-alicloud/issues/4138)) +- **New Resource:** `alicloud_ecd_nas_file_system`([#4139](https://github.com/aliyun/terraform-provider-alicloud/issues/4139)) +- **New Resource:** `alicloud_cloud_sso_user_attachment`([#4140](https://github.com/aliyun/terraform-provider-alicloud/issues/4140)) +- **New Resource:** `alicloud_cloud_sso_access_assignment`([#4140](https://github.com/aliyun/terraform-provider-alicloud/issues/4140)) +- **New Data Source:** `alicloud_msc_sub_webhooks`([#4138](https://github.com/aliyun/terraform-provider-alicloud/issues/4138)) +- **New Data Source:** `alicloud_ecd_nas_file_systems`([#4139](https://github.com/aliyun/terraform-provider-alicloud/issues/4139)) ENHANCEMENTS: -- datasource/alicloud_dataworks_service: Renames to alicloud_data_works_service; docs: Improves the docs subcategory ([#4157](https://github.com/aliyun/terraform-provider-alicloud/issues/4157)) -- resource/alicloud_ess_scaling_group: supports configurating launch_template_id ([#4133](https://github.com/aliyun/terraform-provider-alicloud/issues/4133)) -- resource/alicloud_eci_container_group: supports configurating image_registry_credential ([#4137](https://github.com/aliyun/terraform-provider-alicloud/issues/4137)) -- resource/alicloud_mhub_app: redefine connectivity MHUBsupportregions ([#4139](https://github.com/aliyun/terraform-provider-alicloud/issues/4139)) -- resource/alicloud_config_aggregate_compliance_pack : Modify the parameter compliance_pack_template_id to optional, Field config_rules has been deprecated from provider version 1.141.0. New field config_rule_ids' instead. ([#4141](https://github.com/aliyun/terraform-provider-alicloud/issues/4141)) -- resource/alicloud_config_aggregate_config_rule: Add the output parameter config_rule_id ([#4141](https://github.com/aliyun/terraform-provider-alicloud/issues/4141)) -- resource/alicloud_config_compliance_pack : Modify the parameter compliance_pack_template_id to optional, Field config_rules has been deprecated from provider version 1.141.0. New field config_rule_ids' instead ([#4141](https://github.com/aliyun/terraform-provider-alicloud/issues/4141)) -- resource/alicloud_mongodb_instance: support auto_renew field resource/alicloud_mongodb_sharding_instance: support auto_renew field and transforming charge_type from Postpaid to Prepaid ([#4146](https://github.com/aliyun/terraform-provider-alicloud/issues/4146)) -- resource/alicloud_monitor_group: support creating MonitorGroup By resource_group_id ([#4147](https://github.com/aliyun/terraform-provider-alicloud/issues/4147)) -- resource/alicloud_cs_managed_kubernetes: supports control plane log collection and retain resources when destroy cluster ([#4154](https://github.com/aliyun/terraform-provider-alicloud/issues/4154)) -- data_source/alicloud_mhub_apps: redefine connectivity MHUBsupportregions ([#4139](https://github.com/aliyun/terraform-provider-alicloud/issues/4139)) -- provider: Adds new parameter credentials_uri to support sidecar credentials ([#4142](https://github.com/aliyun/terraform-provider-alicloud/issues/4142)) -- doc/alicloud_cloud_sso_directory : Optimize document format doc/alicloud_cloud_sso_access_configuration : Optimize document format resource/alicloud_cloud_sso_user : Modify the parameter user_name as required ([#4152](https://github.com/aliyun/terraform-provider-alicloud/issues/4152)) +- datasource/alicloud_dataworks_service: Renames to alicloud_data_works_service; docs: Improves the docs subcategory([#4157](https://github.com/aliyun/terraform-provider-alicloud/issues/4157)) +- resource/alicloud_ess_scaling_group: supports configurating launch_template_id([#4133](https://github.com/aliyun/terraform-provider-alicloud/issues/4133)) +- resource/alicloud_eci_container_group: supports configurating image_registry_credential([#4137](https://github.com/aliyun/terraform-provider-alicloud/issues/4137)) +- resource/alicloud_mhub_app: redefine connectivity MHUBsupportregions([#4139](https://github.com/aliyun/terraform-provider-alicloud/issues/4139)) +- resource/alicloud_config_aggregate_compliance_pack : Modify the parameter compliance_pack_template_id to optional, Field config_rules has been deprecated from provider version 1.141.0. New field config_rule_ids' instead.([#4141](https://github.com/aliyun/terraform-provider-alicloud/issues/4141)) +- resource/alicloud_config_aggregate_config_rule: Add the output parameter config_rule_id([#4141](https://github.com/aliyun/terraform-provider-alicloud/issues/4141)) +- resource/alicloud_config_compliance_pack : Modify the parameter compliance_pack_template_id to optional, Field config_rules has been deprecated from provider version 1.141.0. New field config_rule_ids' instead([#4141](https://github.com/aliyun/terraform-provider-alicloud/issues/4141)) +- resource/alicloud_mongodb_instance: support auto_renew field resource/alicloud_mongodb_sharding_instance: support auto_renew field and transforming charge_type from Postpaid to Prepaid([#4146](https://github.com/aliyun/terraform-provider-alicloud/issues/4146)) +- resource/alicloud_monitor_group: support creating MonitorGroup By resource_group_id([#4147](https://github.com/aliyun/terraform-provider-alicloud/issues/4147)) +- resource/alicloud_cs_managed_kubernetes: supports control plane log collection and retain resources when destroy cluster([#4154](https://github.com/aliyun/terraform-provider-alicloud/issues/4154)) +- data_source/alicloud_mhub_apps: redefine connectivity MHUBsupportregions([#4139](https://github.com/aliyun/terraform-provider-alicloud/issues/4139)) +- provider: Adds new parameter credentials_uri to support sidecar credentials([#4142](https://github.com/aliyun/terraform-provider-alicloud/issues/4142)) +- doc/alicloud_cloud_sso_directory : Optimize document format doc/alicloud_cloud_sso_access_configuration : Optimize document format resource/alicloud_cloud_sso_user : Modify the parameter user_name as required([#4152](https://github.com/aliyun/terraform-provider-alicloud/issues/4152)) BUG FIXES: -- provider: Fixes the undefined: io.ReadAll error ([#4145](https://github.com/aliyun/terraform-provider-alicloud/issues/4145)) +- provider: Fixes the undefined: io.ReadAll error([#4145](https://github.com/aliyun/terraform-provider-alicloud/issues/4145)) ## 1.140.0 (October 24, 2021) -- **New Resource:** `alicloud_ecd_simple_office_site` ([#4129](https://github.com/aliyun/terraform-provider-alicloud/issues/4129)) -- **New Resource:** `alicloud_cloud_sso_access_configuration` ([#4109](https://github.com/aliyun/terraform-provider-alicloud/issues/4109)) -- **New Resource:** `alicloud_dfs_file_system` ([#4112](https://github.com/aliyun/terraform-provider-alicloud/issues/4112)) -- **New Resource:** `alicloud_vpc_traffic_mirror_filter` ([#4113](https://github.com/aliyun/terraform-provider-alicloud/issues/4113)) -- **New Resource:** `alicloud_dfs_access_rule` ([#4116](https://github.com/aliyun/terraform-provider-alicloud/issues/4116)) -- **New Resource:** `alicloud_dfs_mount_point` ([#4118](https://github.com/aliyun/terraform-provider-alicloud/issues/4118)) -- **New Resource:** `alicloud_vpc_traffic_mirror_filter_egress_rule` ([#4119](https://github.com/aliyun/terraform-provider-alicloud/issues/4119)) -- **New Data Source:** `alicloud_ecd_simple_office_sites` ([#4129](https://github.com/aliyun/terraform-provider-alicloud/issues/4129)) -- **New Data Source:** `alicloud_cloud_sso_access_configurations` ([#4109](https://github.com/aliyun/terraform-provider-alicloud/issues/4109)) -- **New Data Source:** `alicloud_dfs_zones` ([#4112](https://github.com/aliyun/terraform-provider-alicloud/issues/4112)) -- **New Data Source:** `alicloud_dfs_file_systems` ([#4112](https://github.com/aliyun/terraform-provider-alicloud/issues/4112)) -- **New Data Source:** `alicloud_vpc_traffic_mirror_filters` ([#4113](https://github.com/aliyun/terraform-provider-alicloud/issues/4113)) -- **New Data Source:** `alicloud_dfs_access_rules` ([#4116](https://github.com/aliyun/terraform-provider-alicloud/issues/4116)) -- **New Data Source:** `alicloud_dfs_mount_points` ([#4118](https://github.com/aliyun/terraform-provider-alicloud/issues/4118)) -- **New Data Source:** `alicloud_nas_zones` ([#4120](https://github.com/aliyun/terraform-provider-alicloud/issues/4120)) -- **New Data Source:** `alicloud_vpc_traffic_mirror_filter_egress_rules` ([#4127](https://github.com/aliyun/terraform-provider-alicloud/issues/4127)) +- **New Resource:** `alicloud_ecd_simple_office_site`([#4129](https://github.com/aliyun/terraform-provider-alicloud/issues/4129)) +- **New Resource:** `alicloud_cloud_sso_access_configuration`([#4109](https://github.com/aliyun/terraform-provider-alicloud/issues/4109)) +- **New Resource:** `alicloud_dfs_file_system`([#4112](https://github.com/aliyun/terraform-provider-alicloud/issues/4112)) +- **New Resource:** `alicloud_vpc_traffic_mirror_filter`([#4113](https://github.com/aliyun/terraform-provider-alicloud/issues/4113)) +- **New Resource:** `alicloud_dfs_access_rule`([#4116](https://github.com/aliyun/terraform-provider-alicloud/issues/4116)) +- **New Resource:** `alicloud_dfs_mount_point`([#4118](https://github.com/aliyun/terraform-provider-alicloud/issues/4118)) +- **New Resource:** `alicloud_vpc_traffic_mirror_filter_egress_rule`([#4119](https://github.com/aliyun/terraform-provider-alicloud/issues/4119)) +- **New Data Source:** `alicloud_ecd_simple_office_sites`([#4129](https://github.com/aliyun/terraform-provider-alicloud/issues/4129)) +- **New Data Source:** `alicloud_cloud_sso_access_configurations`([#4109](https://github.com/aliyun/terraform-provider-alicloud/issues/4109)) +- **New Data Source:** `alicloud_dfs_zones`([#4112](https://github.com/aliyun/terraform-provider-alicloud/issues/4112)) +- **New Data Source:** `alicloud_dfs_file_systems`([#4112](https://github.com/aliyun/terraform-provider-alicloud/issues/4112)) +- **New Data Source:** `alicloud_vpc_traffic_mirror_filters`([#4113](https://github.com/aliyun/terraform-provider-alicloud/issues/4113)) +- **New Data Source:** `alicloud_dfs_access_rules`([#4116](https://github.com/aliyun/terraform-provider-alicloud/issues/4116)) +- **New Data Source:** `alicloud_dfs_mount_points`([#4118](https://github.com/aliyun/terraform-provider-alicloud/issues/4118)) +- **New Data Source:** `alicloud_nas_zones`([#4120](https://github.com/aliyun/terraform-provider-alicloud/issues/4120)) +- **New Data Source:** `alicloud_vpc_traffic_mirror_filter_egress_rules`([#4127](https://github.com/aliyun/terraform-provider-alicloud/issues/4127)) ENHANCEMENTS: -- resource/alicloud_ecd_simple_office_site: Optimize testcase parameter && doc/alicloud_vs_service: Optimize the page layout ([#4131](https://github.com/aliyun/terraform-provider-alicloud/issues/4131)) -- resource/alicloud_eip_address: Support prepaid instances to set the auto_pay field ([#4130](https://github.com/aliyun/terraform-provider-alicloud/issues/4130)) -- resource/alicloud_waf_instance: Adds new attribute region; resource/alicloud_waf_domain: Adds retry strategy to avoid ThrottlingUser error ([#4110](https://github.com/aliyun/terraform-provider-alicloud/issues/4110)) -- resource/alicloud_mongodb_instance support querying replica_sets ([#4114](https://github.com/aliyun/terraform-provider-alicloud/issues/4114)) -- resource/alicloud_mongodb_sharding_instance support querying config_server_list ([#4114](https://github.com/aliyun/terraform-provider-alicloud/issues/4114)) -- resource/alicloud_api_gateway_api: Support API replay attacks. ([#4115](https://github.com/aliyun/terraform-provider-alicloud/issues/4115)) -- resource/alicloud_nas_file_system: Adds new attribute zone_id ([#4120](https://github.com/aliyun/terraform-provider-alicloud/issues/4120)) -- resource/alicloud_eip_address: Support prepaid instances to set the auto_pay field ([#4122](https://github.com/aliyun/terraform-provider-alicloud/issues/4122)) -- datasource/vpc_traffic_mirror_filters: Remove egress_rules and ingress_rules in its outputs ([#4124](https://github.com/aliyun/terraform-provider-alicloud/issues/4124)) -- doc/actiontrail_history_delivery_job: Optimize document format doc/actiontrail_history_delivery_jobs: Optimize document format ([#4111](https://github.com/aliyun/terraform-provider-alicloud/issues/4111)) +- resource/alicloud_ecd_simple_office_site: Optimize testcase parameter && doc/alicloud_vs_service: Optimize the page layout([#4131](https://github.com/aliyun/terraform-provider-alicloud/issues/4131)) +- resource/alicloud_eip_address: Support prepaid instances to set the auto_pay field([#4130](https://github.com/aliyun/terraform-provider-alicloud/issues/4130)) +- resource/alicloud_waf_instance: Adds new attribute region; resource/alicloud_waf_domain: Adds retry strategy to avoid ThrottlingUser error([#4110](https://github.com/aliyun/terraform-provider-alicloud/issues/4110)) +- resource/alicloud_mongodb_instance support querying replica_sets([#4114](https://github.com/aliyun/terraform-provider-alicloud/issues/4114)) +- resource/alicloud_mongodb_sharding_instance support querying config_server_list([#4114](https://github.com/aliyun/terraform-provider-alicloud/issues/4114)) +- resource/alicloud_api_gateway_api: Support API replay attacks.([#4115](https://github.com/aliyun/terraform-provider-alicloud/issues/4115)) +- resource/alicloud_nas_file_system: Adds new attribute zone_id([#4120](https://github.com/aliyun/terraform-provider-alicloud/issues/4120)) +- resource/alicloud_eip_address: Support prepaid instances to set the auto_pay field([#4122](https://github.com/aliyun/terraform-provider-alicloud/issues/4122)) +- datasource/vpc_traffic_mirror_filters: Remove egress_rules and ingress_rules in its outputs([#4124](https://github.com/aliyun/terraform-provider-alicloud/issues/4124)) +- doc/actiontrail_history_delivery_job: Optimize document format doc/actiontrail_history_delivery_jobs: Optimize document format([#4111](https://github.com/aliyun/terraform-provider-alicloud/issues/4111)) BUG FIXES: -- resource/alicloud_cloud_sso_directory: Fix the problem of dependency property saml_identity_provider_configuration when deleting ([#4109](https://github.com/aliyun/terraform-provider-alicloud/issues/4109)) +- resource/alicloud_cloud_sso_directory: Fix the problem of dependency property saml_identity_provider_configuration when deleting([#4109](https://github.com/aliyun/terraform-provider-alicloud/issues/4109)) ## 1.139.0 (October 17, 2021) -- **New Resource:** `alicloud_cloud_firewall_instance` ([#4102](https://github.com/aliyun/terraform-provider-alicloud/issues/4102)) -- **New Resource:** `alicloud_actiontrail_history_delivery_job` ([#4101](https://github.com/aliyun/terraform-provider-alicloud/issues/4101)) -- **New Resource:** `alicloud_cr_instance_endpoint_acl_policy` ([#4087](https://github.com/aliyun/terraform-provider-alicloud/issues/4087)) -- **New Data Source:** `alicloud_sae_instance_specifications` ([#4103](https://github.com/aliyun/terraform-provider-alicloud/issues/4103)) -- **New Data Source:** `alicloud_cloud_firewall_instances` ([#4102](https://github.com/aliyun/terraform-provider-alicloud/issues/4102)) -- **New Data Source:** `alicloud_actiontrail_history_delivery_jobs` ([#4101](https://github.com/aliyun/terraform-provider-alicloud/issues/4101)) -- **New Data Source:** `alicloud_cen_transit_router_service` ([#4092](https://github.com/aliyun/terraform-provider-alicloud/issues/4092)) -- **New Data Source:** `alicloud_cr_instance_endpoint_acl_policies` ([#4087](https://github.com/aliyun/terraform-provider-alicloud/issues/4087)) -- **New Data Source:** `alicloud_cr_endpoint_acl_service` ([#4087](https://github.com/aliyun/terraform-provider-alicloud/issues/4087)) +- **New Resource:** `alicloud_cloud_firewall_instance`([#4102](https://github.com/aliyun/terraform-provider-alicloud/issues/4102)) +- **New Resource:** `alicloud_actiontrail_history_delivery_job`([#4101](https://github.com/aliyun/terraform-provider-alicloud/issues/4101)) +- **New Resource:** `alicloud_cr_instance_endpoint_acl_policy`([#4087](https://github.com/aliyun/terraform-provider-alicloud/issues/4087)) +- **New Data Source:** `alicloud_sae_instance_specifications`([#4103](https://github.com/aliyun/terraform-provider-alicloud/issues/4103)) +- **New Data Source:** `alicloud_cloud_firewall_instances`([#4102](https://github.com/aliyun/terraform-provider-alicloud/issues/4102)) +- **New Data Source:** `alicloud_actiontrail_history_delivery_jobs`([#4101](https://github.com/aliyun/terraform-provider-alicloud/issues/4101)) +- **New Data Source:** `alicloud_cen_transit_router_service`([#4092](https://github.com/aliyun/terraform-provider-alicloud/issues/4092)) +- **New Data Source:** `alicloud_cr_instance_endpoint_acl_policies`([#4087](https://github.com/aliyun/terraform-provider-alicloud/issues/4087)) +- **New Data Source:** `alicloud_cr_endpoint_acl_service`([#4087](https://github.com/aliyun/terraform-provider-alicloud/issues/4087)) ENHANCEMENTS: -- resource/alicloud_waf_instance: Adds new attribute region; resource/alicloud_waf_domain: Adds retry strategy to avoid ThrottlingUser error ([#4110](https://github.com/aliyun/terraform-provider-alicloud/issues/4110)) -- Github WorkFlow: Add precheck format && golang-ci-lint ([#4106](https://github.com/aliyun/terraform-provider-alicloud/issues/4106)) -- resource/alicloud_dts_synchronization_instance: modify additional input parameters for the createInstance API, make AutoPay to false ([#4081](https://github.com/aliyun/terraform-provider-alicloud/issues/4081)) -- resource/alicloud_hbr_backup_client, resource/alicloud_hbr_ecs_backup_plan, resource/alicloud_hbr_oss_backup_plan, resource/alicloud_hbr_nas_backup_plan, resource/alicloud_hbr_restore_job, resource/alicloud_hbr_vault and theirs datasource: Improves the attribute value, test case and documents ([#4080](https://github.com/aliyun/terraform-provider-alicloud/issues/4080)) -- doc/alicloud_common_bandwidth_package: Optimize document format resource/alicloud_eip_address: Support internet charge type PayByDominantTraffic ([#4082](https://github.com/aliyun/terraform-provider-alicloud/issues/4082)) -- testcase: Improves the testcase when changing region ([#4099](https://github.com/aliyun/terraform-provider-alicloud/issues/4099)) -- resource/alicloud_hbr_nas_backup_plan:Improvement DetachNasFileSystem ([#4096](https://github.com/aliyun/terraform-provider-alicloud/issues/4096)) -- docs/alicloud_route_entry: Supports two new nexthop type IPv6Gateway and Attachment ([#4091](https://github.com/aliyun/terraform-provider-alicloud/issues/4091)) -- doc/alicloud_cr_ee_instance: Optimize document format ([#4087](https://github.com/aliyun/terraform-provider-alicloud/issues/4087)) -- datasource/alicloud_alb_listeners: Fix the bug of parameter certifiates output doc/alicloud_alb_listener: Optimize document format doc/alicloud_alb_listeners: Optimize document format ([#4083](https://github.com/aliyun/terraform-provider-alicloud/issues/4083)) -- resource/alicloud_dts_synchronization_instance: modify additional input parameters for the createInstance API, make AutoPay to false; docs/alicloud_dts_synchronization_instance, alicloud_dts_synchronization_job: fix examples. ([#4081](https://github.com/aliyun/terraform-provider-alicloud/issues/4081)) -- resource/alicloud_hbr_backup_client, resource/alicloud_hbr_ecs_backup_plan, resource/alicloud_hbr_oss_backup_plan, resource/alicloud_hbr_nas_backup_plan, resource/alicloud_hbr_restore_job, resource/alicloud_hbr_vault and theirs datasource: Improves the attribute value, test case and documents. ([#4080](https://github.com/aliyun/terraform-provider-alicloud/issues/4080)) -- resource/alicloud_sae_application: supports updating Slb ([#4035](https://github.com/aliyun/terraform-provider-alicloud/issues/4035)) +- resource/alicloud_waf_instance: Adds new attribute region; resource/alicloud_waf_domain: Adds retry strategy to avoid ThrottlingUser error([#4110](https://github.com/aliyun/terraform-provider-alicloud/issues/4110)) +- Github WorkFlow: Add precheck format && golang-ci-lint([#4106](https://github.com/aliyun/terraform-provider-alicloud/issues/4106)) +- resource/alicloud_dts_synchronization_instance: modify additional input parameters for the createInstance API, make AutoPay to false([#4081](https://github.com/aliyun/terraform-provider-alicloud/issues/4081)) +- resource/alicloud_hbr_backup_client, resource/alicloud_hbr_ecs_backup_plan, resource/alicloud_hbr_oss_backup_plan, resource/alicloud_hbr_nas_backup_plan, resource/alicloud_hbr_restore_job, resource/alicloud_hbr_vault and theirs datasource: Improves the attribute value, test case and documents([#4080](https://github.com/aliyun/terraform-provider-alicloud/issues/4080)) +- doc/alicloud_common_bandwidth_package: Optimize document format resource/alicloud_eip_address: Support internet charge type PayByDominantTraffic([#4082](https://github.com/aliyun/terraform-provider-alicloud/issues/4082)) +- testcase: Improves the testcase when changing region([#4099](https://github.com/aliyun/terraform-provider-alicloud/issues/4099)) +- resource/alicloud_hbr_nas_backup_plan:Improvement DetachNasFileSystem([#4096](https://github.com/aliyun/terraform-provider-alicloud/issues/4096)) +- docs/alicloud_route_entry: Supports two new nexthop type IPv6Gateway and Attachment([#4091](https://github.com/aliyun/terraform-provider-alicloud/issues/4091)) +- doc/alicloud_cr_ee_instance: Optimize document format([#4087](https://github.com/aliyun/terraform-provider-alicloud/issues/4087)) +- datasource/alicloud_alb_listeners: Fix the bug of parameter certifiates output doc/alicloud_alb_listener: Optimize document format doc/alicloud_alb_listeners: Optimize document format([#4083](https://github.com/aliyun/terraform-provider-alicloud/issues/4083)) +- resource/alicloud_dts_synchronization_instance: modify additional input parameters for the createInstance API, make AutoPay to false; docs/alicloud_dts_synchronization_instance, alicloud_dts_synchronization_job: fix examples.([#4081](https://github.com/aliyun/terraform-provider-alicloud/issues/4081)) +- resource/alicloud_hbr_backup_client, resource/alicloud_hbr_ecs_backup_plan, resource/alicloud_hbr_oss_backup_plan, resource/alicloud_hbr_nas_backup_plan, resource/alicloud_hbr_restore_job, resource/alicloud_hbr_vault and theirs datasource: Improves the attribute value, test case and documents.([#4080](https://github.com/aliyun/terraform-provider-alicloud/issues/4080)) +- resource/alicloud_sae_application: supports updating Slb([#4035](https://github.com/aliyun/terraform-provider-alicloud/issues/4035)) BUG FIXES: -- datasource/alicloud_bastionhost_users: Fixes the status without output error ([#4084](https://github.com/aliyun/terraform-provider-alicloud/issues/4084)) -- datasource/alicloud_alb_listeners: Fix the bug of parameter certifiates output doc/alicloud_alb_listener: Optimize document format doc/alicloud_alb_listeners: Optimize document format ([#4083](https://github.com/aliyun/terraform-provider-alicloud/issues/4083)) -- docs/alicloud_dts_synchronization_instance, alicloud_dts_synchronization_job: fix examples. ([#4081](https://github.com/aliyun/terraform-provider-alicloud/issues/4081)) +- datasource/alicloud_bastionhost_users: Fixes the status without output error([#4084](https://github.com/aliyun/terraform-provider-alicloud/issues/4084)) +- datasource/alicloud_alb_listeners: Fix the bug of parameter certifiates output doc/alicloud_alb_listener: Optimize document format doc/alicloud_alb_listeners: Optimize document format([#4083](https://github.com/aliyun/terraform-provider-alicloud/issues/4083)) +- docs/alicloud_dts_synchronization_instance, alicloud_dts_synchronization_job: fix examples.([#4081](https://github.com/aliyun/terraform-provider-alicloud/issues/4081)) ## 1.138.0 (September 30, 2021) -- **New Resource:** `alicloud_dts_subscription_job` ([#4068](https://github.com/aliyun/terraform-provider-alicloud/issues/4068)) -- **New Resource:** `alicloud_dts_synchronization_instance` ([#4068](https://github.com/aliyun/terraform-provider-alicloud/issues/4068)) -- **New Resource:** `alicloud_pvtz_user_vpc_authorization` ([#4052](https://github.com/aliyun/terraform-provider-alicloud/issues/4052)) -- **New Resource:** `alicloud_mhub_product` ([#4047](https://github.com/aliyun/terraform-provider-alicloud/issues/4047)) -- **New Resource:** `alicloud_dts_subscription_job` ([#4017](https://github.com/aliyun/terraform-provider-alicloud/issues/4017)) -- **New Resource:** `alicloud_cloud_sso_scim_server_credential` ([#4064](https://github.com/aliyun/terraform-provider-alicloud/issues/4064)) -- **New Resource:** `alicloud_service_mesh_service_mesh` ([#4059](https://github.com/aliyun/terraform-provider-alicloud/issues/4059)) -- **New Resource:** `alicloud_mhub_app` ([#4062](https://github.com/aliyun/terraform-provider-alicloud/issues/4062)) -- **New Resource:** `alicloud_cloud_sso_group` ([#4063](https://github.com/aliyun/terraform-provider-alicloud/issues/4063)) -- **New Data Source:** `alicloud_dts_subscription_jobs` ([#4068](https://github.com/aliyun/terraform-provider-alicloud/issues/4068)) -- **New Data Source:** `alicloud_click_house_regions` ([#4065](https://github.com/aliyun/terraform-provider-alicloud/issues/4065)) -- **New Data Source:** `alicloud_mhub_products` ([#4047](https://github.com/aliyun/terraform-provider-alicloud/issues/4047)) -- **New Data Source:** `alicloud_dts_subscription_jobs` ([#4017](https://github.com/aliyun/terraform-provider-alicloud/issues/4017)) -- **New Data Source:** `alicloud_cloud_sso_scim_server_credentials` ([#4064](https://github.com/aliyun/terraform-provider-alicloud/issues/4064)) -- **New Data Source:** `alicloud_service_mesh_service_meshes` ([#4059](https://github.com/aliyun/terraform-provider-alicloud/issues/4059)) -- **New Data Source:** `alicloud_mhub_apps` ([#4062](https://github.com/aliyun/terraform-provider-alicloud/issues/4062)) -- **New Data Source:** `alicloud_cloud_sso_groups` ([#4063](https://github.com/aliyun/terraform-provider-alicloud/issues/4063)) -- **New Data Source:** `alicloud_hbr_backup_jobs` ([#3950](https://github.com/aliyun/terraform-provider-alicloud/issues/3950)) +- **New Resource:** `alicloud_dts_subscription_job`([#4068](https://github.com/aliyun/terraform-provider-alicloud/issues/4068)) +- **New Resource:** `alicloud_dts_synchronization_instance`([#4068](https://github.com/aliyun/terraform-provider-alicloud/issues/4068)) +- **New Resource:** `alicloud_pvtz_user_vpc_authorization`([#4052](https://github.com/aliyun/terraform-provider-alicloud/issues/4052)) +- **New Resource:** `alicloud_mhub_product`([#4047](https://github.com/aliyun/terraform-provider-alicloud/issues/4047)) +- **New Resource:** `alicloud_dts_subscription_job`([#4017](https://github.com/aliyun/terraform-provider-alicloud/issues/4017)) +- **New Resource:** `alicloud_cloud_sso_scim_server_credential`([#4064](https://github.com/aliyun/terraform-provider-alicloud/issues/4064)) +- **New Resource:** `alicloud_service_mesh_service_mesh`([#4059](https://github.com/aliyun/terraform-provider-alicloud/issues/4059)) +- **New Resource:** `alicloud_mhub_app`([#4062](https://github.com/aliyun/terraform-provider-alicloud/issues/4062)) +- **New Resource:** `alicloud_cloud_sso_group`([#4063](https://github.com/aliyun/terraform-provider-alicloud/issues/4063)) +- **New Data Source:** `alicloud_dts_subscription_jobs`([#4068](https://github.com/aliyun/terraform-provider-alicloud/issues/4068)) +- **New Data Source:** `alicloud_click_house_regions`([#4065](https://github.com/aliyun/terraform-provider-alicloud/issues/4065)) +- **New Data Source:** `alicloud_mhub_products`([#4047](https://github.com/aliyun/terraform-provider-alicloud/issues/4047)) +- **New Data Source:** `alicloud_dts_subscription_jobs`([#4017](https://github.com/aliyun/terraform-provider-alicloud/issues/4017)) +- **New Data Source:** `alicloud_cloud_sso_scim_server_credentials`([#4064](https://github.com/aliyun/terraform-provider-alicloud/issues/4064)) +- **New Data Source:** `alicloud_service_mesh_service_meshes`([#4059](https://github.com/aliyun/terraform-provider-alicloud/issues/4059)) +- **New Data Source:** `alicloud_mhub_apps`([#4062](https://github.com/aliyun/terraform-provider-alicloud/issues/4062)) +- **New Data Source:** `alicloud_cloud_sso_groups`([#4063](https://github.com/aliyun/terraform-provider-alicloud/issues/4063)) +- **New Data Source:** `alicloud_hbr_backup_jobs`([#3950](https://github.com/aliyun/terraform-provider-alicloud/issues/3950)) ENHANCEMENTS: -- resource/alicloud_mhub_app: Setting the PreCheck after getting the resource ([#4072](https://github.com/aliyun/terraform-provider-alicloud/issues/4072)) -- resource/alicloud_hbr_ecs_backup_plan,resource/alicloud_hbr_nas_backup_plan,resource/alicloud_hbr_oss_backup_plan: adjust the property backup_type and it's document. ([#3950](https://github.com/aliyun/terraform-provider-alicloud/issues/3950)) -- resource/alicloud_db_instance,alicloud_kvstore_instance: Improves the waiting time after modifying the security_ips ([#4070](https://github.com/aliyun/terraform-provider-alicloud/issues/4070)) -- resource/alicloud_cs_serverless_kubernetes: Setting the attribute vswitch_ids after getting the resource ([#4058](https://github.com/aliyun/terraform-provider-alicloud/issues/4058)) -- resource/alicloud_config_aggregator: Adjust the state judgment when the resource is created ([#4057](https://github.com/aliyun/terraform-provider-alicloud/issues/4057)) -- resource/alicloud_config_aggregate_compliance_pack : Adjust the state judgment when the resource is create or update ([#4057](https://github.com/aliyun/terraform-provider-alicloud/issues/4057)) -- resource/alicloud_config_compliance_pack : Adjust the state judgment when the resource is create or update ([#4057](https://github.com/aliyun/terraform-provider-alicloud/issues/4057)) -- resource/alicloud_image_copy: Removes the cancelCopyImage action ([#4061](https://github.com/aliyun/terraform-provider-alicloud/issues/4061)) -- resource/alicloud_hbr_ecs_backup_client: optimize creation timeout and it's test case; ([#3950](https://github.com/aliyun/terraform-provider-alicloud/issues/3950)) -- data_source/data_source_alicloud_hbr_snapshots: optimized property "status"and its docs; ([#3950](https://github.com/aliyun/terraform-provider-alicloud/issues/3950)) -- provider: Supports new region ap-southeast-6 ([#4071](https://github.com/aliyun/terraform-provider-alicloud/issues/4071)) -- sweeper test: Improves the cen sweeper testcases ([#4060](https://github.com/aliyun/terraform-provider-alicloud/issues/4060)) -- Adds a new resource alicloud_imp_app_template and datasource alicloud_imp_app_templates ([#4049](https://github.com/aliyun/terraform-provider-alicloud/issues/4049)) +- resource/alicloud_mhub_app: Setting the PreCheck after getting the resource([#4072](https://github.com/aliyun/terraform-provider-alicloud/issues/4072)) +- resource/alicloud_hbr_ecs_backup_plan,resource/alicloud_hbr_nas_backup_plan,resource/alicloud_hbr_oss_backup_plan: adjust the property backup_type and it's document.([#3950](https://github.com/aliyun/terraform-provider-alicloud/issues/3950)) +- resource/alicloud_db_instance,alicloud_kvstore_instance: Improves the waiting time after modifying the security_ips([#4070](https://github.com/aliyun/terraform-provider-alicloud/issues/4070)) +- resource/alicloud_cs_serverless_kubernetes: Setting the attribute vswitch_ids after getting the resource([#4058](https://github.com/aliyun/terraform-provider-alicloud/issues/4058)) +- resource/alicloud_config_aggregator: Adjust the state judgment when the resource is created([#4057](https://github.com/aliyun/terraform-provider-alicloud/issues/4057)) +- resource/alicloud_config_aggregate_compliance_pack : Adjust the state judgment when the resource is create or update([#4057](https://github.com/aliyun/terraform-provider-alicloud/issues/4057)) +- resource/alicloud_config_compliance_pack : Adjust the state judgment when the resource is create or update([#4057](https://github.com/aliyun/terraform-provider-alicloud/issues/4057)) +- resource/alicloud_image_copy: Removes the cancelCopyImage action([#4061](https://github.com/aliyun/terraform-provider-alicloud/issues/4061)) +- resource/alicloud_hbr_ecs_backup_client: optimize creation timeout and it's test case;([#3950](https://github.com/aliyun/terraform-provider-alicloud/issues/3950)) +- data_source/data_source_alicloud_hbr_snapshots: optimized property "status"and its docs; ([#3950](https://github.com/aliyun/terraform-provider-alicloud/issues/3950)) +- provider: Supports new region ap-southeast-6([#4071](https://github.com/aliyun/terraform-provider-alicloud/issues/4071)) +- sweeper test: Improves the cen sweeper testcases([#4060](https://github.com/aliyun/terraform-provider-alicloud/issues/4060)) +- Adds a new resource alicloud_imp_app_template and datasource alicloud_imp_app_templates([#4049](https://github.com/aliyun/terraform-provider-alicloud/issues/4049)) BUG FIXES: -- resource/alicloud_vpn_customer_gateway: Fixes the OperationConflict error while creating it ([#4056](https://github.com/aliyun/terraform-provider-alicloud/issues/4056)) -- resource/alicloud_bastionhost_user_attachment: Fixes the Commodity.BizError.InvalidStatus error while deleting the resource ([#4067](https://github.com/aliyun/terraform-provider-alicloud/issues/4067)) -- resource/alicloud_cs_edge_kubernetes: Fixes the diff error caused by attribute resource_group_id; Improves the some testcases ([#4055](https://github.com/aliyun/terraform-provider-alicloud/issues/4055)) -- Doc/cloud_firewall: fix typo in cloud firewall demo code ([#4030](https://github.com/aliyun/terraform-provider-alicloud/issues/4030)) +- resource/alicloud_vpn_customer_gateway: Fixes the OperationConflict error while creating it([#4056](https://github.com/aliyun/terraform-provider-alicloud/issues/4056)) +- resource/alicloud_bastionhost_user_attachment: Fixes the Commodity.BizError.InvalidStatus error while deleting the resource([#4067](https://github.com/aliyun/terraform-provider-alicloud/issues/4067)) +- resource/alicloud_cs_edge_kubernetes: Fixes the diff error caused by attribute resource_group_id; Improves the some testcases([#4055](https://github.com/aliyun/terraform-provider-alicloud/issues/4055)) +- Doc/cloud_firewall: fix typo in cloud firewall demo code([#4030](https://github.com/aliyun/terraform-provider-alicloud/issues/4030)) ## 1.137.0 (September 26, 2021) -- **New Resource:** `alicloud_imp_app_template` ([#4049](https://github.com/aliyun/terraform-provider-alicloud/issues/4049)) -- **New Resource:** `alicloud_rdc_organization` ([#4013](https://github.com/aliyun/terraform-provider-alicloud/issues/4013)) -- **New Resource:** `alicloud_eais_instance` ([#4032](https://github.com/aliyun/terraform-provider-alicloud/issues/4032)) -- **New Resource:** `alicloud_sae_ingress` ([#3911](https://github.com/aliyun/terraform-provider-alicloud/issues/3911)) -- **New Data Source:** `alicloud_imp_app_templates` ([#4049](https://github.com/aliyun/terraform-provider-alicloud/issues/4049)) -- **New Data Source:** `alicloud_rdc_organizations` ([#4013](https://github.com/aliyun/terraform-provider-alicloud/issues/4013)) -- **New Data Source:** `alicloud_eais_instances` ([#4032](https://github.com/aliyun/terraform-provider-alicloud/issues/4032)) -- **New Data Source:** `alicloud_sae_ingresses` ([#3911](https://github.com/aliyun/terraform-provider-alicloud/issues/3911)) +- **New Resource:** `alicloud_imp_app_template`([#4049](https://github.com/aliyun/terraform-provider-alicloud/issues/4049)) +- **New Resource:** `alicloud_rdc_organization`([#4013](https://github.com/aliyun/terraform-provider-alicloud/issues/4013)) +- **New Resource:** `alicloud_eais_instance`([#4032](https://github.com/aliyun/terraform-provider-alicloud/issues/4032)) +- **New Resource:** `alicloud_sae_ingress`([#3911](https://github.com/aliyun/terraform-provider-alicloud/issues/3911)) +- **New Data Source:** `alicloud_imp_app_templates`([#4049](https://github.com/aliyun/terraform-provider-alicloud/issues/4049)) +- **New Data Source:** `alicloud_rdc_organizations`([#4013](https://github.com/aliyun/terraform-provider-alicloud/issues/4013)) +- **New Data Source:** `alicloud_eais_instances`([#4032](https://github.com/aliyun/terraform-provider-alicloud/issues/4032)) +- **New Data Source:** `alicloud_sae_ingresses`([#3911](https://github.com/aliyun/terraform-provider-alicloud/issues/3911)) ENHANCEMENTS: -- resource/alicloud_vpc_dhcp_options_set: Optimize resource creation ([#4033](https://github.com/aliyun/terraform-provider-alicloud/issues/4033)) -- doc/common_bandwidth_package: Adjust document position doc/eipanycast_anycast_eip_address: Adjust document position ([#4029](https://github.com/aliyun/terraform-provider-alicloud/issues/4029)) -- testcase: Improves the rds testcases ([#4045](https://github.com/aliyun/terraform-provider-alicloud/issues/4045)) -- sdk: Upgrades the sdk tea-rpc to 1.2.0 and tea-roa to 1.3.0 to support parameters SourceIp and SecureTransport ([#4044](https://github.com/aliyun/terraform-provider-alicloud/issues/4044)) -- provider: Enlarges the read_timeout and connect_timeout to 60s ([#4043](https://github.com/aliyun/terraform-provider-alicloud/issues/4043)) -- resource/alicloud_db_instance: Sets the attribute zone_id_slave_a to computed to fix the diff error ([#4042](https://github.com/aliyun/terraform-provider-alicloud/issues/4042)) -- resource/alicloud_rds_account: Adds UnlockAccount action to fix the Lock error when deleting PostgreSQL database account ([#4040](https://github.com/aliyun/terraform-provider-alicloud/issues/4040)) -- testcase:Fix vpc,vswithc,fc sweepers ([#4038](https://github.com/aliyun/terraform-provider-alicloud/issues/4038)) +- resource/alicloud_vpc_dhcp_options_set: Optimize resource creation([#4033](https://github.com/aliyun/terraform-provider-alicloud/issues/4033)) +- doc/common_bandwidth_package: Adjust document position doc/eipanycast_anycast_eip_address: Adjust document position([#4029](https://github.com/aliyun/terraform-provider-alicloud/issues/4029)) +- testcase: Improves the rds testcases([#4045](https://github.com/aliyun/terraform-provider-alicloud/issues/4045)) +- sdk: Upgrades the sdk tea-rpc to 1.2.0 and tea-roa to 1.3.0 to support parameters SourceIp and SecureTransport([#4044](https://github.com/aliyun/terraform-provider-alicloud/issues/4044)) +- provider: Enlarges the read_timeout and connect_timeout to 60s([#4043](https://github.com/aliyun/terraform-provider-alicloud/issues/4043)) +- resource/alicloud_db_instance: Sets the attribute zone_id_slave_a to computed to fix the diff error([#4042](https://github.com/aliyun/terraform-provider-alicloud/issues/4042)) +- resource/alicloud_rds_account: Adds UnlockAccount action to fix the Lock error when deleting PostgreSQL database account([#4040](https://github.com/aliyun/terraform-provider-alicloud/issues/4040)) +- testcase:Fix vpc,vswithc,fc sweepers([#4038](https://github.com/aliyun/terraform-provider-alicloud/issues/4038)) BUG FIXES: -- resource/alicloud_log_oss_shipper: Fixes the ShipperNotExist error while deleting the resource ([#4048](https://github.com/aliyun/terraform-provider-alicloud/issues/4048)) -- resource/alicloud_cen_instance: Fixes the setting name bug; datasource/alicloud_ots_instance_attachments: Fixes the code bug while checking whether error is nil ([#4046](https://github.com/aliyun/terraform-provider-alicloud/issues/4046)) -- resource/alicloud_route_table: Fixes the OperationConflict error when creating a new table ([#4041](https://github.com/aliyun/terraform-provider-alicloud/issues/4041)) -- datasource/alicloud_db_instance_classes: Fixes the db_instance_storage_type bug; datasource/alicloud_db_zones: Fixes the multi bug ([#4039](https://github.com/aliyun/terraform-provider-alicloud/issues/4039)) +- resource/alicloud_log_oss_shipper: Fixes the ShipperNotExist error while deleting the resource([#4048](https://github.com/aliyun/terraform-provider-alicloud/issues/4048)) +- resource/alicloud_cen_instance: Fixes the setting name bug; datasource/alicloud_ots_instance_attachments: Fixes the code bug while checking whether error is nil([#4046](https://github.com/aliyun/terraform-provider-alicloud/issues/4046)) +- resource/alicloud_route_table: Fixes the OperationConflict error when creating a new table([#4041](https://github.com/aliyun/terraform-provider-alicloud/issues/4041)) +- datasource/alicloud_db_instance_classes: Fixes the db_instance_storage_type bug; datasource/alicloud_db_zones: Fixes the multi bug([#4039](https://github.com/aliyun/terraform-provider-alicloud/issues/4039)) ## 1.136.0 (September 13, 2021) -- **New Resource:** `alicloud_dbfs_instance` ([#4024](https://github.com/aliyun/terraform-provider-alicloud/issues/4024)) -- **New Resource:** `alicloud_sddp_instance` ([#3997](https://github.com/aliyun/terraform-provider-alicloud/issues/3997)) -- **New Resource:** `alicloud_vpc_nat_ip_cidr` ([#4005](https://github.com/aliyun/terraform-provider-alicloud/issues/4005)) -- **New Resource:** `alicloud_vpc_nat_ip` ([#4015](https://github.com/aliyun/terraform-provider-alicloud/issues/4015)) -- **New Resource:** `alicloud_quick_bi_user` ([#4007](https://github.com/aliyun/terraform-provider-alicloud/issues/4007)) -- **New Resource:** `alicloud_vod_domain` ([#4006](https://github.com/aliyun/terraform-provider-alicloud/issues/4006)) -- **New Resource:** `alicloud_arms_dispatch_rule` ([#4006](https://github.com/aliyun/terraform-provider-alicloud/issues/4006)) -- **New Resource:** `alicloud_open_search_app_group` ([#4021](https://github.com/aliyun/terraform-provider-alicloud/issues/4021)) -- **New Resource:** `alicloud_graph_database_db_instance` ([#4020](https://github.com/aliyun/terraform-provider-alicloud/issues/4020)) -- **New Resource:** `alicloud_arms_prometheus_alert_rule` ([#4022](https://github.com/aliyun/terraform-provider-alicloud/issues/4022)) -- **New Data Source:** `alicloud_dbfs_instances` ([#4024](https://github.com/aliyun/terraform-provider-alicloud/issues/4024)) -- **New Data Source:** `alicloud_sddp_instances` ([#3997](https://github.com/aliyun/terraform-provider-alicloud/issues/3997)) -- **New Data Source:** `alicloud_vpc_nat_ip_cidrs` ([#4005](https://github.com/aliyun/terraform-provider-alicloud/issues/4005)) -- **New Data Source:** `alicloud_vpc_nat_ips` ([#4015](https://github.com/aliyun/terraform-provider-alicloud/issues/4015)) -- **New Data Source:** `alicloud_quick_bi_users` ([#4007](https://github.com/aliyun/terraform-provider-alicloud/issues/4007)) -- **New Data Source:** `alicloud_vod_domains` ([#4006](https://github.com/aliyun/terraform-provider-alicloud/issues/4006)) -- **New Data Source:** `alicloud_arms_dispatch_rules` ([#4023](https://github.com/aliyun/terraform-provider-alicloud/issues/4023)) -- **New Data Source:** `alicloud_open_search_app_groups` ([#4021](https://github.com/aliyun/terraform-provider-alicloud/issues/4021)) -- **New Data Source:** `alicloud_graph_database_db_instances` ([#4020](https://github.com/aliyun/terraform-provider-alicloud/issues/4020)) -- **New Data Source:** `alicloud_arms_prometheus_alert_rules` ([#4022](https://github.com/aliyun/terraform-provider-alicloud/issues/4022)) +- **New Resource:** `alicloud_dbfs_instance`([#4024](https://github.com/aliyun/terraform-provider-alicloud/issues/4024)) +- **New Resource:** `alicloud_sddp_instance`([#3997](https://github.com/aliyun/terraform-provider-alicloud/issues/3997)) +- **New Resource:** `alicloud_vpc_nat_ip_cidr`([#4005](https://github.com/aliyun/terraform-provider-alicloud/issues/4005)) +- **New Resource:** `alicloud_vpc_nat_ip`([#4015](https://github.com/aliyun/terraform-provider-alicloud/issues/4015)) +- **New Resource:** `alicloud_quick_bi_user`([#4007](https://github.com/aliyun/terraform-provider-alicloud/issues/4007)) +- **New Resource:** `alicloud_vod_domain`([#4006](https://github.com/aliyun/terraform-provider-alicloud/issues/4006)) +- **New Resource:** `alicloud_arms_dispatch_rule`([#4006](https://github.com/aliyun/terraform-provider-alicloud/issues/4006)) +- **New Resource:** `alicloud_open_search_app_group`([#4021](https://github.com/aliyun/terraform-provider-alicloud/issues/4021)) +- **New Resource:** `alicloud_graph_database_db_instance`([#4020](https://github.com/aliyun/terraform-provider-alicloud/issues/4020)) +- **New Resource:** `alicloud_arms_prometheus_alert_rule`([#4022](https://github.com/aliyun/terraform-provider-alicloud/issues/4022)) +- **New Data Source:** `alicloud_dbfs_instances`([#4024](https://github.com/aliyun/terraform-provider-alicloud/issues/4024)) +- **New Data Source:** `alicloud_sddp_instances`([#3997](https://github.com/aliyun/terraform-provider-alicloud/issues/3997)) +- **New Data Source:** `alicloud_vpc_nat_ip_cidrs`([#4005](https://github.com/aliyun/terraform-provider-alicloud/issues/4005)) +- **New Data Source:** `alicloud_vpc_nat_ips`([#4015](https://github.com/aliyun/terraform-provider-alicloud/issues/4015)) +- **New Data Source:** `alicloud_quick_bi_users`([#4007](https://github.com/aliyun/terraform-provider-alicloud/issues/4007)) +- **New Data Source:** `alicloud_vod_domains`([#4006](https://github.com/aliyun/terraform-provider-alicloud/issues/4006)) +- **New Data Source:** `alicloud_arms_dispatch_rules`([#4023](https://github.com/aliyun/terraform-provider-alicloud/issues/4023)) +- **New Data Source:** `alicloud_open_search_app_groups`([#4021](https://github.com/aliyun/terraform-provider-alicloud/issues/4021)) +- **New Data Source:** `alicloud_graph_database_db_instances`([#4020](https://github.com/aliyun/terraform-provider-alicloud/issues/4020)) +- **New Data Source:** `alicloud_arms_prometheus_alert_rules`([#4022](https://github.com/aliyun/terraform-provider-alicloud/issues/4022)) ENHANCEMENTS: -- resource/alicloud_db_instances: Adds attribute db_time_zone to set time zone of the instance. ([#4003](https://github.com/aliyun/terraform-provider-alicloud/issues/4003)) -- resource/alicloud_db_instances: Adds attribute released_keep_policy to set the policy of the backup files after the instance is released. ([#4008](https://github.com/aliyun/terraform-provider-alicloud/issues/4008)) -- resource/alicloud_alb_listeners: Adds new attribute acl_config to set associate acls ([#3979](https://github.com/aliyun/terraform-provider-alicloud/issues/3979)) -- resource/alicloud_waf_certificate: Adds new attribute certificate_id to support uploading a certificate from ssl ([#4011](https://github.com/aliyun/terraform-provider-alicloud/issues/4011)) -- resource/alicloud_nat_gateway: Adds new attribute network_type to support create Vpc NatGateway ([#4012](https://github.com/aliyun/terraform-provider-alicloud/issues/4012)) -- resource/alicloud_image: Adds new attribute delete_auto_snapshot to automatically delete dependence snapshots while deleting image ([#4025](https://github.com/aliyun/terraform-provider-alicloud/issues/4025)) -- doc/alicloud_instance: Optimize system_disk_performance_level parameter ([#4009](https://github.com/aliyun/terraform-provider-alicloud/issues/4009)) -- sdk/alibaba-cloud-go-sdk: Upgrades the sdk to v1.61.1264 ([#4026](https://github.com/aliyun/terraform-provider-alicloud/issues/4026)) -- testcase/alicloud_db_instance: Improves the rds testcases ([#4028](https://github.com/aliyun/terraform-provider-alicloud/issues/4028)) +- resource/alicloud_db_instances: Adds attribute db_time_zone to set time zone of the instance.([#4003](https://github.com/aliyun/terraform-provider-alicloud/issues/4003)) +- resource/alicloud_db_instances: Adds attribute released_keep_policy to set the policy of the backup files after the instance is released.([#4008](https://github.com/aliyun/terraform-provider-alicloud/issues/4008)) +- resource/alicloud_alb_listeners: Adds new attribute acl_config to set associate acls([#3979](https://github.com/aliyun/terraform-provider-alicloud/issues/3979)) +- resource/alicloud_waf_certificate: Adds new attribute certificate_id to support uploading a certificate from ssl([#4011](https://github.com/aliyun/terraform-provider-alicloud/issues/4011)) +- resource/alicloud_nat_gateway: Adds new attribute network_type to support create Vpc NatGateway([#4012](https://github.com/aliyun/terraform-provider-alicloud/issues/4012)) +- resource/alicloud_image: Adds new attribute delete_auto_snapshot to automatically delete dependence snapshots while deleting image([#4025](https://github.com/aliyun/terraform-provider-alicloud/issues/4025)) +- doc/alicloud_instance: Optimize system_disk_performance_level parameter([#4009](https://github.com/aliyun/terraform-provider-alicloud/issues/4009)) +- sdk/alibaba-cloud-go-sdk: Upgrades the sdk to v1.61.1264([#4026](https://github.com/aliyun/terraform-provider-alicloud/issues/4026)) +- testcase/alicloud_db_instance: Improves the rds testcases([#4028](https://github.com/aliyun/terraform-provider-alicloud/issues/4028)) BUG FIXES: -- resource/alicloud_cr_ee_instance: Fix the problem of import failure in the international station ([#4014](https://github.com/aliyun/terraform-provider-alicloud/issues/4014)) +- resource/alicloud_cr_ee_instance: Fix the problem of import failure in the international station([#4014](https://github.com/aliyun/terraform-provider-alicloud/issues/4014)) ## 1.135.0 (September 13, 2021) -- **New Resource:** `alicloud_bastionhost_host_group_account_user_group_attachment` ([#4000](https://github.com/aliyun/terraform-provider-alicloud/issues/4000)) -- **New Resource:** `alicloud_bastionhost_host_group_account_user_attachment` ([#3999](https://github.com/aliyun/terraform-provider-alicloud/issues/3999)) -- **New Resource:** `alicloud_bastionhost_account_user_attachment` ([#3998](https://github.com/aliyun/terraform-provider-alicloud/issues/3998)) -- **New Resource:** `alicloud_bastionhost_account_user_group_attachment` ([#3996](https://github.com/aliyun/terraform-provider-alicloud/issues/3996)) -- **New Resource:** `alicloud_msc_sub_subscription` ([#3994](https://github.com/aliyun/terraform-provider-alicloud/issues/3994)) -- **New Resource:** `alicloud_video_surveillance_system_group` ([#3993](https://github.com/aliyun/terraform-provider-alicloud/issues/3993)) -- **New Resource:** `alicloud_bastionhost_host_attachment` ([#3991](https://github.com/aliyun/terraform-provider-alicloud/issues/3991)) -- **New Resource:** `alicloud_bastionhost_host_account` ([#3989](https://github.com/aliyun/terraform-provider-alicloud/issues/3989)) -- **New Resource:** `alicloud_bastionhost_host` ([#3984](https://github.com/aliyun/terraform-provider-alicloud/issues/3984)) -- **New Resource:** `alicloud_waf_certificate` ([#3982](https://github.com/aliyun/terraform-provider-alicloud/issues/3982)) -- **New Resource:** `alicloud_slb_tls_cipher_policy` ([#3981](https://github.com/aliyun/terraform-provider-alicloud/issues/3981)) -- **New Resource:** `simple_application_server_instance` ([#3978](https://github.com/aliyun/terraform-provider-alicloud/issues/3978)) -- **New Resource:** `alicloud_slb_tls_cipher_policy` ([#3981](https://github.com/aliyun/terraform-provider-alicloud/issues/3981)) -- **New Resource:** `alicloud_cloud_sso_directory` ([#3972](https://github.com/aliyun/terraform-provider-alicloud/issues/3972)) -- **New Resource:** `alicloud_database_gateway_gateway` ([#3970](https://github.com/aliyun/terraform-provider-alicloud/issues/3970)) -- **New Resource:** `alicloud_dts_jobmonitor_rule` ([#3965](https://github.com/aliyun/terraform-provider-alicloud/issues/3965)) -- **New Resource:** `alicloud_direct_mail_mail_address` ([#3961](https://github.com/aliyun/terraform-provider-alicloud/issues/3961)) -- **New Resource:** `alicloud_amqp_binding` ([#3799](https://github.com/aliyun/terraform-provider-alicloud/issues/3799)) -- **New Data Source:** `alicloud_msc_sub_subscriptions` ([#3994](https://github.com/aliyun/terraform-provider-alicloud/issues/3994)) -- **New Data Source:** `alicloud_video_surveillance_system_groups` ([#3993](https://github.com/aliyun/terraform-provider-alicloud/issues/3993)) -- **New Data Source:** `alicloud_bastionhost_host_accounts` ([#3989](https://github.com/aliyun/terraform-provider-alicloud/issues/3989)) -- **New Data Source:** `alicloud_bastionhost_hosts` ([#3984](https://github.com/aliyun/terraform-provider-alicloud/issues/3984)) -- **New Data Source:** `alicloud_waf_certificates` ([#3982](https://github.com/aliyun/terraform-provider-alicloud/issues/3982)) -- **New Data Source:** `alicloud_slb_tls_cipher_policies` ([#3984](https://github.com/aliyun/terraform-provider-alicloud/issues/3984)) -- **New Data Source:** `simple_application_server_instances` ([#3978](https://github.com/aliyun/terraform-provider-alicloud/issues/3978)) -- **New Data Source:** `alicloud_simple_application_server_images` ([#3978](https://github.com/aliyun/terraform-provider-alicloud/issues/3978)) -- **New Data Source:** `alicloud_simple_application_server_plans` ([#3978](https://github.com/aliyun/terraform-provider-alicloud/issues/3978)) -- **New Data Source:** `alicloud_cloud_sso_directories` ([#3972](https://github.com/aliyun/terraform-provider-alicloud/issues/3972)) -- **New Data Source:** `alicloud_database_gateway_gateways` ([#3970](https://github.com/aliyun/terraform-provider-alicloud/issues/3970)) -- **New Data Source:** `alicloud_direct_mail_mail_addresses` ([#3961](https://github.com/aliyun/terraform-provider-alicloud/issues/3961)) -- **New Data Source:** `alicloud_amqp_bindings` ([#3799](https://github.com/aliyun/terraform-provider-alicloud/issues/3799)) +- **New Resource:** `alicloud_bastionhost_host_group_account_user_group_attachment`([#4000](https://github.com/aliyun/terraform-provider-alicloud/issues/4000)) +- **New Resource:** `alicloud_bastionhost_host_group_account_user_attachment`([#3999](https://github.com/aliyun/terraform-provider-alicloud/issues/3999)) +- **New Resource:** `alicloud_bastionhost_account_user_attachment`([#3998](https://github.com/aliyun/terraform-provider-alicloud/issues/3998)) +- **New Resource:** `alicloud_bastionhost_account_user_group_attachment`([#3996](https://github.com/aliyun/terraform-provider-alicloud/issues/3996)) +- **New Resource:** `alicloud_msc_sub_subscription`([#3994](https://github.com/aliyun/terraform-provider-alicloud/issues/3994)) +- **New Resource:** `alicloud_video_surveillance_system_group`([#3993](https://github.com/aliyun/terraform-provider-alicloud/issues/3993)) +- **New Resource:** `alicloud_bastionhost_host_attachment`([#3991](https://github.com/aliyun/terraform-provider-alicloud/issues/3991)) +- **New Resource:** `alicloud_bastionhost_host_account`([#3989](https://github.com/aliyun/terraform-provider-alicloud/issues/3989)) +- **New Resource:** `alicloud_bastionhost_host`([#3984](https://github.com/aliyun/terraform-provider-alicloud/issues/3984)) +- **New Resource:** `alicloud_waf_certificate`([#3982](https://github.com/aliyun/terraform-provider-alicloud/issues/3982)) +- **New Resource:** `alicloud_slb_tls_cipher_policy`([#3981](https://github.com/aliyun/terraform-provider-alicloud/issues/3981)) +- **New Resource:** `simple_application_server_instance`([#3978](https://github.com/aliyun/terraform-provider-alicloud/issues/3978)) +- **New Resource:** `alicloud_slb_tls_cipher_policy`([#3981](https://github.com/aliyun/terraform-provider-alicloud/issues/3981)) +- **New Resource:** `alicloud_cloud_sso_directory`([#3972](https://github.com/aliyun/terraform-provider-alicloud/issues/3972)) +- **New Resource:** `alicloud_database_gateway_gateway`([#3970](https://github.com/aliyun/terraform-provider-alicloud/issues/3970)) +- **New Resource:** `alicloud_dts_jobmonitor_rule`([#3965](https://github.com/aliyun/terraform-provider-alicloud/issues/3965)) +- **New Resource:** `alicloud_direct_mail_mail_address`([#3961](https://github.com/aliyun/terraform-provider-alicloud/issues/3961)) +- **New Resource:** `alicloud_amqp_binding`([#3799](https://github.com/aliyun/terraform-provider-alicloud/issues/3799)) +- **New Data Source:** `alicloud_msc_sub_subscriptions`([#3994](https://github.com/aliyun/terraform-provider-alicloud/issues/3994)) +- **New Data Source:** `alicloud_video_surveillance_system_groups`([#3993](https://github.com/aliyun/terraform-provider-alicloud/issues/3993)) +- **New Data Source:** `alicloud_bastionhost_host_accounts`([#3989](https://github.com/aliyun/terraform-provider-alicloud/issues/3989)) +- **New Data Source:** `alicloud_bastionhost_hosts`([#3984](https://github.com/aliyun/terraform-provider-alicloud/issues/3984)) +- **New Data Source:** `alicloud_waf_certificates`([#3982](https://github.com/aliyun/terraform-provider-alicloud/issues/3982)) +- **New Data Source:** `alicloud_slb_tls_cipher_policies`([#3984](https://github.com/aliyun/terraform-provider-alicloud/issues/3984)) +- **New Data Source:** `simple_application_server_instances`([#3978](https://github.com/aliyun/terraform-provider-alicloud/issues/3978)) +- **New Data Source:** `alicloud_simple_application_server_images`([#3978](https://github.com/aliyun/terraform-provider-alicloud/issues/3978)) +- **New Data Source:** `alicloud_simple_application_server_plans`([#3978](https://github.com/aliyun/terraform-provider-alicloud/issues/3978)) +- **New Data Source:** `alicloud_cloud_sso_directories`([#3972](https://github.com/aliyun/terraform-provider-alicloud/issues/3972)) +- **New Data Source:** `alicloud_database_gateway_gateways`([#3970](https://github.com/aliyun/terraform-provider-alicloud/issues/3970)) +- **New Data Source:** `alicloud_direct_mail_mail_addresses`([#3961](https://github.com/aliyun/terraform-provider-alicloud/issues/3961)) +- **New Data Source:** `alicloud_amqp_bindings`([#3799](https://github.com/aliyun/terraform-provider-alicloud/issues/3799)) ENHANCEMENTS: - resource/alicloud_ess_scalingconfiguration: Support resource_group_id. -- resource/alicloud_image_copy: Supports to cancel image when copying image is timeout; Adds new attribute delete_auto_snapshot to delete snapshot automatically when deleting copied image ([#4001](https://github.com/aliyun/terraform-provider-alicloud/issues/4001)) -- doc/alicloud_cdn_doamin_config: Optimize document format ([#3995](https://github.com/aliyun/terraform-provider-alicloud/issues/3995)) -- reource/alicloud_msc_sub_contact: Modify the enumeration value of position and limit Locale to en ([#3994](https://github.com/aliyun/terraform-provider-alicloud/issues/3994)) -- datasource/alicloud_db_instances: Adds attribute enable_details to show extra parameter template ([#3988](https://github.com/aliyun/terraform-provider-alicloud/issues/3988)) -- resource/alicloud_bastionhost_instance: Improves the attribute value setting when invoking SetRenewal to update renewal attribute ([#3986](https://github.com/aliyun/terraform-provider-alicloud/issues/3986)) -- resource/alicloud_ess_scalingconfiguration: Adds new attribute resource_group_id to support set resource group ([#3985](https://github.com/aliyun/terraform-provider-alicloud/issues/3985)) -- resource/alicloud_log_audit: logservice audit support resource directory ([#3983](https://github.com/aliyun/terraform-provider-alicloud/issues/3983)) -- datasource/alicloud_db_instance_classes: Upgrades its dependence OpenAPI to DescribeAvailableClasses ([#3973](https://github.com/aliyun/terraform-provider-alicloud/issues/3973)) -- Upgrades the dependence sdk tea-rpc and tea-roa to fix the useless retry ([#3971](https://github.com/aliyun/terraform-provider-alicloud/issues/3971)) -- datasource/alicloud_db_instance_engines: Upgrades its dependence OpenAPI to DescribeAvailableZones ([#3970](https://github.com/aliyun/terraform-provider-alicloud/issues/3970)) -- datasource/alicloud_db_zones: Upgrades its dependence OpenAPI to DescribeAvailableZones ([#3968](https://github.com/aliyun/terraform-provider-alicloud/issues/3968)) -- testcase: Improves the bastionhost user attachment testcase ([#3967](https://github.com/aliyun/terraform-provider-alicloud/issues/3967)) +- resource/alicloud_image_copy: Supports to cancel image when copying image is timeout; Adds new attribute delete_auto_snapshot to delete snapshot automatically when deleting copied image([#4001](https://github.com/aliyun/terraform-provider-alicloud/issues/4001)) +- doc/alicloud_cdn_doamin_config: Optimize document format([#3995](https://github.com/aliyun/terraform-provider-alicloud/issues/3995)) +- reource/alicloud_msc_sub_contact: Modify the enumeration value of position and limit Locale to en([#3994](https://github.com/aliyun/terraform-provider-alicloud/issues/3994)) +- datasource/alicloud_db_instances: Adds attribute enable_details to show extra parameter template([#3988](https://github.com/aliyun/terraform-provider-alicloud/issues/3988)) +- resource/alicloud_bastionhost_instance: Improves the attribute value setting when invoking SetRenewal to update renewal attribute([#3986](https://github.com/aliyun/terraform-provider-alicloud/issues/3986)) +- resource/alicloud_ess_scalingconfiguration: Adds new attribute resource_group_id to support set resource group([#3985](https://github.com/aliyun/terraform-provider-alicloud/issues/3985)) +- resource/alicloud_log_audit: logservice audit support resource directory([#3983](https://github.com/aliyun/terraform-provider-alicloud/issues/3983)) +- datasource/alicloud_db_instance_classes: Upgrades its dependence OpenAPI to DescribeAvailableClasses([#3973](https://github.com/aliyun/terraform-provider-alicloud/issues/3973)) +- Upgrades the dependence sdk tea-rpc and tea-roa to fix the useless retry([#3971](https://github.com/aliyun/terraform-provider-alicloud/issues/3971)) +- datasource/alicloud_db_instance_engines: Upgrades its dependence OpenAPI to DescribeAvailableZones([#3970](https://github.com/aliyun/terraform-provider-alicloud/issues/3970)) +- datasource/alicloud_db_zones: Upgrades its dependence OpenAPI to DescribeAvailableZones([#3968](https://github.com/aliyun/terraform-provider-alicloud/issues/3968)) +- testcase: Improves the bastionhost user attachment testcase([#3967](https://github.com/aliyun/terraform-provider-alicloud/issues/3967)) BUG FIXES: -- resource/alicloud_fc_trigger: Fixes fc trigger white space change error ([#3980](https://github.com/aliyun/terraform-provider-alicloud/issues/3980)) +- resource/alicloud_fc_trigger: Fixes fc trigger white space change error([#3980](https://github.com/aliyun/terraform-provider-alicloud/issues/3980)) ## 1.134.0 (September 5, 2021) -- **New Resource:** `alicloud_dts_jobmonitor_rule` ([#3965](https://github.com/aliyun/terraform-provider-alicloud/issues/3965)) -- **New Resource:** `alicloud_bastionhost_user_attachment` ([#3964](https://github.com/aliyun/terraform-provider-alicloud/issues/3964)) -- **New Resource:** `alicloud_cdn_real_time_log_delivery` ([#3963](https://github.com/aliyun/terraform-provider-alicloud/issues/3963)) -- **New Resource:** `alicloud_direct_mail_mail_address` ([#3961](https://github.com/aliyun/terraform-provider-alicloud/issues/3961)) -- **New Resource:** `alicloud_bastionhost_host_group` ([#3955](https://github.com/aliyun/terraform-provider-alicloud/issues/3955)) -- **New Resource:** `alicloud_click_house_db_cluster` ([#3948](https://github.com/aliyun/terraform-provider-alicloud/issues/3948)) -- **New Resource:** `alicloud_vpc_dhcp_options_set` ([#3944](https://github.com/aliyun/terraform-provider-alicloud/issues/3944)) -- **New Resource:** `alicloud_express_connect_virtual_border_router` ([#3943](https://github.com/aliyun/terraform-provider-alicloud/issues/3943)) -- **New Resource:** `alicloud_clisck_house_account` ([#3940](https://github.com/aliyun/terraform-provider-alicloud/issues/3940)) -- **New Resource:** `alicloud_alb_health_check_template` ([#3938](https://github.com/aliyun/terraform-provider-alicloud/issues/3938)) -- **New Resource:** `alicloud_imm_project` ([#3936](https://github.com/aliyun/terraform-provider-alicloud/issues/3936)) -- **New Resource:** `alicloud_cms_metric_rule_template` ([#3931](https://github.com/aliyun/terraform-provider-alicloud/issues/3931)) -- **New Resource:** `alicloud_iot_device_group` ([#3929](https://github.com/aliyun/terraform-provider-alicloud/issues/3929)) -- **New Resource:** `alicloud_direct_mail_domain` ([#3837](https://github.com/aliyun/terraform-provider-alicloud/issues/3837)) -- **New Data Source:** `alicloud_cdn_real_time_log_deliveries` ([#3963](https://github.com/aliyun/terraform-provider-alicloud/issues/3963)) -- **New Data Source:** `alicloud_direct_mail_mail_addresses` ([#3961](https://github.com/aliyun/terraform-provider-alicloud/issues/3961)) -- **New Data Source:** `alicloud_bastionhost_host_groups` ([#3955](https://github.com/aliyun/terraform-provider-alicloud/issues/3955)) -- **New Data Source:** `alicloud_click_house_db_clusters` ([#3948](https://github.com/aliyun/terraform-provider-alicloud/issues/3948)) -- **New Data Source:** `alicloud_vpc_dhcp_options_sets` ([#3944](https://github.com/aliyun/terraform-provider-alicloud/issues/3944)) -- **New Data Source:** `alicloud_express_connect_virtual_border_routers` ([#3943](https://github.com/aliyun/terraform-provider-alicloud/issues/3943)) -- **New Data Source:** `alicloud_clisck_house_accounts` ([#3940](https://github.com/aliyun/terraform-provider-alicloud/issues/3940)) -- **New Data Source:** `alicloud_alb_health_check_templates` ([#3938](https://github.com/aliyun/terraform-provider-alicloud/issues/3938)) -- **New Data Source:** `alicloud_imm_project` ([#3936](https://github.com/aliyun/terraform-provider-alicloud/issues/3936)) -- **New Data Source:** `alicloud_cms_metric_rule_templates` ([#3931](https://github.com/aliyun/terraform-provider-alicloud/issues/3931)) -- **New Data Source:** `alicloud_iot_device_groups` ([#3929](https://github.com/aliyun/terraform-provider-alicloud/issues/3929)) -- **New Data Source:** `alicloud_direct_mail_domains` ([#3837](https://github.com/aliyun/terraform-provider-alicloud/issues/3837)) +- **New Resource:** `alicloud_dts_jobmonitor_rule`([#3965](https://github.com/aliyun/terraform-provider-alicloud/issues/3965)) +- **New Resource:** `alicloud_bastionhost_user_attachment`([#3964](https://github.com/aliyun/terraform-provider-alicloud/issues/3964)) +- **New Resource:** `alicloud_cdn_real_time_log_delivery`([#3963](https://github.com/aliyun/terraform-provider-alicloud/issues/3963)) +- **New Resource:** `alicloud_direct_mail_mail_address`([#3961](https://github.com/aliyun/terraform-provider-alicloud/issues/3961)) +- **New Resource:** `alicloud_bastionhost_host_group`([#3955](https://github.com/aliyun/terraform-provider-alicloud/issues/3955)) +- **New Resource:** `alicloud_click_house_db_cluster`([#3948](https://github.com/aliyun/terraform-provider-alicloud/issues/3948)) +- **New Resource:** `alicloud_vpc_dhcp_options_set`([#3944](https://github.com/aliyun/terraform-provider-alicloud/issues/3944)) +- **New Resource:** `alicloud_express_connect_virtual_border_router`([#3943](https://github.com/aliyun/terraform-provider-alicloud/issues/3943)) +- **New Resource:** `alicloud_clisck_house_account`([#3940](https://github.com/aliyun/terraform-provider-alicloud/issues/3940)) +- **New Resource:** `alicloud_alb_health_check_template`([#3938](https://github.com/aliyun/terraform-provider-alicloud/issues/3938)) +- **New Resource:** `alicloud_imm_project`([#3936](https://github.com/aliyun/terraform-provider-alicloud/issues/3936)) +- **New Resource:** `alicloud_cms_metric_rule_template`([#3931](https://github.com/aliyun/terraform-provider-alicloud/issues/3931)) +- **New Resource:** `alicloud_iot_device_group`([#3929](https://github.com/aliyun/terraform-provider-alicloud/issues/3929)) +- **New Resource:** `alicloud_direct_mail_domain`([#3837](https://github.com/aliyun/terraform-provider-alicloud/issues/3837)) +- **New Data Source:** `alicloud_cdn_real_time_log_deliveries`([#3963](https://github.com/aliyun/terraform-provider-alicloud/issues/3963)) +- **New Data Source:** `alicloud_direct_mail_mail_addresses`([#3961](https://github.com/aliyun/terraform-provider-alicloud/issues/3961)) +- **New Data Source:** `alicloud_bastionhost_host_groups`([#3955](https://github.com/aliyun/terraform-provider-alicloud/issues/3955)) +- **New Data Source:** `alicloud_click_house_db_clusters`([#3948](https://github.com/aliyun/terraform-provider-alicloud/issues/3948)) +- **New Data Source:** `alicloud_vpc_dhcp_options_sets`([#3944](https://github.com/aliyun/terraform-provider-alicloud/issues/3944)) +- **New Data Source:** `alicloud_express_connect_virtual_border_routers`([#3943](https://github.com/aliyun/terraform-provider-alicloud/issues/3943)) +- **New Data Source:** `alicloud_clisck_house_accounts`([#3940](https://github.com/aliyun/terraform-provider-alicloud/issues/3940)) +- **New Data Source:** `alicloud_alb_health_check_templates`([#3938](https://github.com/aliyun/terraform-provider-alicloud/issues/3938)) +- **New Data Source:** `alicloud_imm_project`([#3936](https://github.com/aliyun/terraform-provider-alicloud/issues/3936)) +- **New Data Source:** `alicloud_cms_metric_rule_templates`([#3931](https://github.com/aliyun/terraform-provider-alicloud/issues/3931)) +- **New Data Source:** `alicloud_iot_device_groups`([#3929](https://github.com/aliyun/terraform-provider-alicloud/issues/3929)) +- **New Data Source:** `alicloud_direct_mail_domains`([#3837](https://github.com/aliyun/terraform-provider-alicloud/issues/3837)) ENHANCEMENTS: -- datasource/alicloud_db_instance_engines: Upgrades its dependence OpenAPI to DescribeAvailableZones ([#3969](https://github.com/aliyun/terraform-provider-alicloud/issues/3969)) -- resource/resource_alicloud_cs_kubernetes_permissions: update doc ([#3962](https://github.com/aliyun/terraform-provider-alicloud/issues/3962)) -- datasource/alicloud_db_zones: Upgrades its dependence OpenAPI to DescribeAvailableZones ([#3968](https://github.com/aliyun/terraform-provider-alicloud/issues/3968)) -- testcase: Improves the bastionhost user attachment testcase ([#3967](https://github.com/aliyun/terraform-provider-alicloud/issues/3967)) -- testcase/alb: add sweeper test ([#3966](https://github.com/aliyun/terraform-provider-alicloud/issues/3966)) -- website: Fixed the sidebar ([#3960](https://github.com/aliyun/terraform-provider-alicloud/issues/3960)) -- testcase: Improves the provider test setting region id ([#3959](https://github.com/aliyun/terraform-provider-alicloud/issues/3959)) -- resource/alicloud_mongodb_instance,alicloud_mongodb_sharding_instance: Adds new attribute order_type to support updating instance spec ([#3958](https://github.com/aliyun/terraform-provider-alicloud/issues/3958)) -- improves the client config source_ip and security_transport ([#3956](https://github.com/aliyun/terraform-provider-alicloud/issues/3956)) -- resource/alicloud_iot_device_group: Increase the length limit of the groupname attribute ([#3954](https://github.com/aliyun/terraform-provider-alicloud/issues/3954)) -- docs: Improves the resource vbr and its datasource docs ([#3953](https://github.com/aliyun/terraform-provider-alicloud/issues/3953)) -- resource/alicloud_cen_transit_router: Fixes the ParameterInstanceId error when deleting the resource; Improves other testcases ([#3952](https://github.com/aliyun/terraform-provider-alicloud/issues/3952)) -- testcase: Improves the alicloud_cen_atachment testcases; Improves the sweep testcases ([#3951](https://github.com/aliyun/terraform-provider-alicloud/issues/3951)) -- testcase: Improves the alicloud_cen_tranit_router_xxx testcases by adding vbr resource ([#3946](https://github.com/aliyun/terraform-provider-alicloud/issues/3946)) -- resource/alicloud_ram_user_policy_attachment,alicloud_ram_role_policy_attachment,alicloud_ram_group_policy_attachment: Fixes the resource not found error when creating an attachment using system policy ([#3945](https://github.com/aliyun/terraform-provider-alicloud/issues/3945)) -- doc/alicloud_alb_server_group: Optimize document links doc/alicloud_msc_sub_contact: Optimize document links doc/alicloud_msc_sub_contac testcase/alicloud_direct_mail_receivers: Optimize Test case testcase/alicloud_direct_mail_receiverses: Optimize Test case testcase/alicloud_alb_listener: Remove invalid logts: Optimize document links ([#3941](https://github.com/aliyun/terraform-provider-alicloud/issues/3941)) -- datasource/alicloud_db_instances: Upgrades its dependence sdk; datasource/alicloud_db_zones: Supports more attributes, like engine, engine_version ([#3932](https://github.com/aliyun/terraform-provider-alicloud/issues/3932)) - -BUG FIXES: - -- resource/alicloud_ram_user: Fixes the EntityNotExist.User error when getting user ([#3957](https://github.com/aliyun/terraform-provider-alicloud/issues/3957)) -- resource/alicloud_alikafka_instance: Fixes the diff error caused by eip_max and security_group ([#3937](https://github.com/aliyun/terraform-provider-alicloud/issues/3937)) -- testcase:Fixed testcase's value for sae application ([#3934](https://github.com/aliyun/terraform-provider-alicloud/issues/3934)) -- datasource/alicloud_db_zones, alicloud_db_instance_classes, alicloud_db_instance_engines: Uses new api DescribeZones and DescribeInstanceClasses to improve them ([#3930](https://github.com/aliyun/terraform-provider-alicloud/issues/3930)) -- docs/alicloud_hbr_vault,alicloud_hbr_ecs_backup_client,alicloud_hbr_ecs_backup_plan,alicloud_nas_backup_plan,alicloud_oss_backup_plan,alicloud_snapshots,alicloud_restore_job: Corrects its docs and adds some note ([#3928](https://github.com/aliyun/terraform-provider-alicloud/issues/3928)) -- resource/alicloud_config_aggregate_compliance_pack: Change config_rule_parameters, parameter_name, parameter_value toOptional resource/alicloud_config_compliance_pack: Change config_rule_parameters, parameter_name, parameter_value to Optional ([#3927](https://github.com/aliyun/terraform-provider-alicloud/issues/3927)) -- doc/alicloud_alb_listeners: Optimize document links doc/alicloud_alb_load_balancers: Optimize document links testcase/alicloud_alb_rules: remove listener_id Field ([#3926](https://github.com/aliyun/terraform-provider-alicloud/issues/3926)) +- datasource/alicloud_db_instance_engines: Upgrades its dependence OpenAPI to DescribeAvailableZones([#3969](https://github.com/aliyun/terraform-provider-alicloud/issues/3969)) +- resource/resource_alicloud_cs_kubernetes_permissions: update doc([#3962](https://github.com/aliyun/terraform-provider-alicloud/issues/3962)) +- datasource/alicloud_db_zones: Upgrades its dependence OpenAPI to DescribeAvailableZones ([#3968](https://github.com/aliyun/terraform-provider-alicloud/issues/3968)) +- testcase: Improves the bastionhost user attachment testcase([#3967](https://github.com/aliyun/terraform-provider-alicloud/issues/3967)) +- testcase/alb: add sweeper test([#3966](https://github.com/aliyun/terraform-provider-alicloud/issues/3966)) +- website: Fixed the sidebar([#3960](https://github.com/aliyun/terraform-provider-alicloud/issues/3960)) +- testcase: Improves the provider test setting region id ([#3959](https://github.com/aliyun/terraform-provider-alicloud/issues/3959)) +- resource/alicloud_mongodb_instance,alicloud_mongodb_sharding_instance: Adds new attribute order_type to support updating instance spec([#3958](https://github.com/aliyun/terraform-provider-alicloud/issues/3958)) +- improves the client config source_ip and security_transport([#3956](https://github.com/aliyun/terraform-provider-alicloud/issues/3956)) +- resource/alicloud_iot_device_group: Increase the length limit of the groupname attribute([#3954](https://github.com/aliyun/terraform-provider-alicloud/issues/3954)) +- docs: Improves the resource vbr and its datasource docs([#3953](https://github.com/aliyun/terraform-provider-alicloud/issues/3953)) +- resource/alicloud_cen_transit_router: Fixes the ParameterInstanceId error when deleting the resource; Improves other testcases([#3952](https://github.com/aliyun/terraform-provider-alicloud/issues/3952)) +- testcase: Improves the alicloud_cen_atachment testcases; Improves the sweep testcases([#3951](https://github.com/aliyun/terraform-provider-alicloud/issues/3951)) +- testcase: Improves the alicloud_cen_tranit_router_xxx testcases by adding vbr resource([#3946](https://github.com/aliyun/terraform-provider-alicloud/issues/3946)) +- resource/alicloud_ram_user_policy_attachment,alicloud_ram_role_policy_attachment,alicloud_ram_group_policy_attachment: Fixes the resource not found error when creating an attachment using system policy([#3945](https://github.com/aliyun/terraform-provider-alicloud/issues/3945)) +- doc/alicloud_alb_server_group: Optimize document links doc/alicloud_msc_sub_contact: Optimize document links doc/alicloud_msc_sub_contac testcase/alicloud_direct_mail_receivers: Optimize Test case testcase/alicloud_direct_mail_receiverses: Optimize Test case testcase/alicloud_alb_listener: Remove invalid logts: Optimize document links([#3941](https://github.com/aliyun/terraform-provider-alicloud/issues/3941)) +- datasource/alicloud_db_instances: Upgrades its dependence sdk; datasource/alicloud_db_zones: Supports more attributes, like engine, engine_version([#3932](https://github.com/aliyun/terraform-provider-alicloud/issues/3932)) + +BUG FIXES: + +- resource/alicloud_ram_user: Fixes the EntityNotExist.User error when getting user ([#3957](https://github.com/aliyun/terraform-provider-alicloud/issues/3957)) +- resource/alicloud_alikafka_instance: Fixes the diff error caused by eip_max and security_group([#3937](https://github.com/aliyun/terraform-provider-alicloud/issues/3937)) +- testcase:Fixed testcase's value for sae application([#3934](https://github.com/aliyun/terraform-provider-alicloud/issues/3934)) +- datasource/alicloud_db_zones, alicloud_db_instance_classes, alicloud_db_instance_engines: Uses new api DescribeZones and DescribeInstanceClasses to improve them([#3930](https://github.com/aliyun/terraform-provider-alicloud/issues/3930)) +- docs/alicloud_hbr_vault,alicloud_hbr_ecs_backup_client,alicloud_hbr_ecs_backup_plan,alicloud_nas_backup_plan,alicloud_oss_backup_plan,alicloud_snapshots,alicloud_restore_job: Corrects its docs and adds some note([#3928](https://github.com/aliyun/terraform-provider-alicloud/issues/3928)) +- resource/alicloud_config_aggregate_compliance_pack: Change config_rule_parameters, parameter_name, parameter_value toOptional resource/alicloud_config_compliance_pack: Change config_rule_parameters, parameter_name, parameter_value to Optional([#3927](https://github.com/aliyun/terraform-provider-alicloud/issues/3927)) +- doc/alicloud_alb_listeners: Optimize document links doc/alicloud_alb_load_balancers: Optimize document links testcase/alicloud_alb_rules: remove listener_id Field([#3926](https://github.com/aliyun/terraform-provider-alicloud/issues/3926)) ## 1.133.0 (August 30, 2021) -- **New Resource:** `alicloud_ens_key_pair` ([#3917](https://github.com/aliyun/terraform-provider-alicloud/issues/3917)) -- **New Resource:** `alicloud_sae_application` ([#3916](https://github.com/aliyun/terraform-provider-alicloud/issues/3916)) -- **New Resource:** `alicloud_alb_rule` ([#3915](https://github.com/aliyun/terraform-provider-alicloud/issues/3915)) -- **New Resource:** `alicloud_security_center_group` ([#3867](https://github.com/aliyun/terraform-provider-alicloud/issues/3867)) -- **New Resource:** `alicloud_alb_acls` ([#3853](https://github.com/aliyun/terraform-provider-alicloud/issues/3853)) -- **New Resource:** `alicloud_bastionhost_user` ([#3893](https://github.com/aliyun/terraform-provider-alicloud/issues/3893)) -- **New Resource:** `alicloud_dfs_access_group` ([#3885](https://github.com/aliyun/terraform-provider-alicloud/issues/3885)) -- **New Resource:** `alicloud_ehpc_job_template` ([#3871](https://github.com/aliyun/terraform-provider-alicloud/issues/3871)) -- **New Resource:** `alicloud_sddp_config` ([#3889](https://github.com/aliyun/terraform-provider-alicloud/issues/3889)) -- **New Resource:** `alicloud_hbr_restore_job` ([#3890](https://github.com/aliyun/terraform-provider-alicloud/issues/3890)) -- **New Resource:** `alicloud_alb_listener` ([#3908](https://github.com/aliyun/terraform-provider-alicloud/issues/3908)) -- **New Data Source:** `alicloud_ens_key_pairs` ([#3917](https://github.com/aliyun/terraform-provider-alicloud/issues/3917)) -- **New Data Source:** `alicloud_sae_applications` ([#3916](https://github.com/aliyun/terraform-provider-alicloud/issues/3916)) -- **New Data Source:** `alicloud_alb_rules` ([#3915](https://github.com/aliyun/terraform-provider-alicloud/issues/3915)) -- **New Data Source:** `alicloud_security_center_groups` ([#3867](https://github.com/aliyun/terraform-provider-alicloud/issues/3867)) -- **New Data Source:** `alicloud_alb_acls` ([#3853](https://github.com/aliyun/terraform-provider-alicloud/issues/3853)) -- **New Data Source:** `alicloud_hbr_snapshots` ([#3883](https://github.com/aliyun/terraform-provider-alicloud/issues/3883)) -- **New Data Source:** `alicloud_bastionhost_users` ([#3893](https://github.com/aliyun/terraform-provider-alicloud/issues/3893)) -- **New Data Source:** `alicloud_dfs_access_groups` ([#3885](https://github.com/aliyun/terraform-provider-alicloud/issues/3885)) -- **New Data Source:** `alicloud_ehpc_job_templates` ([#3871](https://github.com/aliyun/terraform-provider-alicloud/issues/3871)) -- **New Data Source:** `alicloud_sddp_configs` ([#3889](https://github.com/aliyun/terraform-provider-alicloud/issues/3889)) -- **New Data Source:** `alicloud_hbr_restore_jobs` ([#3890](https://github.com/aliyun/terraform-provider-alicloud/issues/3890)) -- **New Data Source:** `alicloud_alb_listeners` ([#3908](https://github.com/aliyun/terraform-provider-alicloud/issues/3908)) +- **New Resource:** `alicloud_ens_key_pair`([#3917](https://github.com/aliyun/terraform-provider-alicloud/issues/3917)) +- **New Resource:** `alicloud_sae_application`([#3916](https://github.com/aliyun/terraform-provider-alicloud/issues/3916)) +- **New Resource:** `alicloud_alb_rule`([#3915](https://github.com/aliyun/terraform-provider-alicloud/issues/3915)) +- **New Resource:** `alicloud_security_center_group`([#3867](https://github.com/aliyun/terraform-provider-alicloud/issues/3867)) +- **New Resource:** `alicloud_alb_acls`([#3853](https://github.com/aliyun/terraform-provider-alicloud/issues/3853)) +- **New Resource:** `alicloud_bastionhost_user`([#3893](https://github.com/aliyun/terraform-provider-alicloud/issues/3893)) +- **New Resource:** `alicloud_dfs_access_group`([#3885](https://github.com/aliyun/terraform-provider-alicloud/issues/3885)) +- **New Resource:** `alicloud_ehpc_job_template`([#3871](https://github.com/aliyun/terraform-provider-alicloud/issues/3871)) +- **New Resource:** `alicloud_sddp_config`([#3889](https://github.com/aliyun/terraform-provider-alicloud/issues/3889)) +- **New Resource:** `alicloud_hbr_restore_job`([#3890](https://github.com/aliyun/terraform-provider-alicloud/issues/3890)) +- **New Resource:** `alicloud_alb_listener`([#3908](https://github.com/aliyun/terraform-provider-alicloud/issues/3908)) +- **New Data Source:** `alicloud_ens_key_pairs`([#3917](https://github.com/aliyun/terraform-provider-alicloud/issues/3917)) +- **New Data Source:** `alicloud_sae_applications`([#3916](https://github.com/aliyun/terraform-provider-alicloud/issues/3916)) +- **New Data Source:** `alicloud_alb_rules`([#3915](https://github.com/aliyun/terraform-provider-alicloud/issues/3915)) +- **New Data Source:** `alicloud_security_center_groups`([#3867](https://github.com/aliyun/terraform-provider-alicloud/issues/3867)) +- **New Data Source:** `alicloud_alb_acls`([#3853](https://github.com/aliyun/terraform-provider-alicloud/issues/3853)) +- **New Data Source:** `alicloud_hbr_snapshots`([#3883](https://github.com/aliyun/terraform-provider-alicloud/issues/3883)) +- **New Data Source:** `alicloud_bastionhost_users`([#3893](https://github.com/aliyun/terraform-provider-alicloud/issues/3893)) +- **New Data Source:** `alicloud_dfs_access_groups`([#3885](https://github.com/aliyun/terraform-provider-alicloud/issues/3885)) +- **New Data Source:** `alicloud_ehpc_job_templates`([#3871](https://github.com/aliyun/terraform-provider-alicloud/issues/3871)) +- **New Data Source:** `alicloud_sddp_configs`([#3889](https://github.com/aliyun/terraform-provider-alicloud/issues/3889)) +- **New Data Source:** `alicloud_hbr_restore_jobs`([#3890](https://github.com/aliyun/terraform-provider-alicloud/issues/3890)) +- **New Data Source:** `alicloud_alb_listeners`([#3908](https://github.com/aliyun/terraform-provider-alicloud/issues/3908)) ENHANCEMENTS: -- resource/alicloud_slb_listener: Attribute scheduler support more values tch and qch ([#3924](https://github.com/aliyun/terraform-provider-alicloud/issues/3924)) -- resource/alicloud_slb_listener: Supports to setting scheduler in the creating to fix it cannot modify ([#3923](https://github.com/aliyun/terraform-provider-alicloud/issues/3923)) -- resource/alicloud_bastionhost_instance: Enlarges the create timeout and improves its docs ([#3899](https://github.com/aliyun/terraform-provider-alicloud/issues/3899)) -- resource/alicloud_alb_security_policy: add formatInt(response["TotalCount"]) == 0 selection ([#3902](https://github.com/aliyun/terraform-provider-alicloud/issues/3902)) -- resource/alicloud_log_store: Adds retry in sls delete logstore and fix resource logtail config nil bug ([#3887](https://github.com/aliyun/terraform-provider-alicloud/issues/3887)) -- resource/alicloud_event_bridge_service: Optimize the way to activate the service ([#3902](https://github.com/aliyun/terraform-provider-alicloud/issues/3902)) -- resource/alicloud_hbr_restore_job: update property options and fix hbr snapshot datasource testcase ([#3914](https://github.com/aliyun/terraform-provider-alicloud/issues/3914)) -- datasource/alicloud_hbr_snapshots: update timechecker ([#3906](https://github.com/aliyun/terraform-provider-alicloud/issues/3906)) -- testcase/alicloud_alb_server_group: Optimize the creation of test-dependent ([#3902](https://github.com/aliyun/terraform-provider-alicloud/issues/3902)) -- ECS instances testcase: Limit ALB supported regions testcase: Limit Event Bridge ([#3902](https://github.com/aliyun/terraform-provider-alicloud/issues/3902)) -- supported regions testcase: Limit DFS supported regions docs/alb_server_group: Optimization Basic Usage Example ([#3902](https://github.com/aliyun/terraform-provider-alicloud/issues/3902)) -- provider: Adds two new attribute source_ip and security_transport ([#3900](https://github.com/aliyun/terraform-provider-alicloud/issues/3900)) -- testcase: Improves the sweeper testcases ([#3884](https://github.com/aliyun/terraform-provider-alicloud/issues/3884)) -- testcase: Improves the testcase for fetching default vpc and vswitch ([#3895](https://github.com/aliyun/terraform-provider-alicloud/issues/3895)) -- testcase: Renames the testcase name by classifing them with product code ([#3897](https://github.com/aliyun/terraform-provider-alicloud/issues/3897)) -- testcase: Improves the testcase resource name ([#3904](https://github.com/aliyun/terraform-provider-alicloud/issues/3904)) - -BUG FIXES: - -- resource/alicloud_polardb_cluster: Fixes the resource not found error ([#3896](https://github.com/aliyun/terraform-provider-alicloud/issues/3896)) -- resource/alicloud_arms_contact: Fixes the ParameterMissing error when invoking UpdateAlertContact ([#3898](https://github.com/aliyun/terraform-provider-alicloud/issues/3898)) -- resource/alicloud_elasticsearch_instance: Fixes the GetCustomerLabelFail error by adding retry ([#3901](https://github.com/aliyun/terraform-provider-alicloud/issues/3901)) -- resource/alicloud_bastihost_instance: Fixes the InvalidApi error ([#3903](https://github.com/aliyun/terraform-provider-alicloud/issues/3903)) -- resource/alicloud_sddp_rule: Fixes the Sddp's Endpoint ([#3907](https://github.com/aliyun/terraform-provider-alicloud/issues/3907)) -- Fixes the concurrent write bug when describing the endpoints ([#3894](https://github.com/aliyun/terraform-provider-alicloud/issues/3894)) -- testcase: Fixes hbr snapshot doc and test case ([#3905](https://github.com/aliyun/terraform-provider-alicloud/issues/3905)) -- testcase: Fixed lang's import bug for sddp config ([#3909](https://github.com/aliyun/terraform-provider-alicloud/issues/3909)) +- resource/alicloud_slb_listener: Attribute scheduler support more values tch and qch([#3924](https://github.com/aliyun/terraform-provider-alicloud/issues/3924)) +- resource/alicloud_slb_listener: Supports to setting scheduler in the creating to fix it cannot modify([#3923](https://github.com/aliyun/terraform-provider-alicloud/issues/3923)) +- resource/alicloud_bastionhost_instance: Enlarges the create timeout and improves its docs([#3899](https://github.com/aliyun/terraform-provider-alicloud/issues/3899)) +- resource/alicloud_alb_security_policy: add formatInt(response["TotalCount"]) == 0 selection([#3902](https://github.com/aliyun/terraform-provider-alicloud/issues/3902)) +- resource/alicloud_log_store: Adds retry in sls delete logstore and fix resource logtail config nil bug([#3887](https://github.com/aliyun/terraform-provider-alicloud/issues/3887)) +- resource/alicloud_event_bridge_service: Optimize the way to activate the service([#3902](https://github.com/aliyun/terraform-provider-alicloud/issues/3902)) +- resource/alicloud_hbr_restore_job: update property options and fix hbr snapshot datasource testcase([#3914](https://github.com/aliyun/terraform-provider-alicloud/issues/3914)) +- datasource/alicloud_hbr_snapshots: update timechecker([#3906](https://github.com/aliyun/terraform-provider-alicloud/issues/3906)) +- testcase/alicloud_alb_server_group: Optimize the creation of test-dependent([#3902](https://github.com/aliyun/terraform-provider-alicloud/issues/3902)) +- ECS instances testcase: Limit ALB supported regions testcase: Limit Event Bridge([#3902](https://github.com/aliyun/terraform-provider-alicloud/issues/3902)) +- supported regions testcase: Limit DFS supported regions docs/alb_server_group: Optimization Basic Usage Example([#3902](https://github.com/aliyun/terraform-provider-alicloud/issues/3902)) +- provider: Adds two new attribute source_ip and security_transport([#3900](https://github.com/aliyun/terraform-provider-alicloud/issues/3900)) +- testcase: Improves the sweeper testcases([#3884](https://github.com/aliyun/terraform-provider-alicloud/issues/3884)) +- testcase: Improves the testcase for fetching default vpc and vswitch([#3895](https://github.com/aliyun/terraform-provider-alicloud/issues/3895)) +- testcase: Renames the testcase name by classifing them with product code([#3897](https://github.com/aliyun/terraform-provider-alicloud/issues/3897)) +- testcase: Improves the testcase resource name([#3904](https://github.com/aliyun/terraform-provider-alicloud/issues/3904)) + +BUG FIXES: + +- resource/alicloud_polardb_cluster: Fixes the resource not found error([#3896](https://github.com/aliyun/terraform-provider-alicloud/issues/3896)) +- resource/alicloud_arms_contact: Fixes the ParameterMissing error when invoking UpdateAlertContact([#3898](https://github.com/aliyun/terraform-provider-alicloud/issues/3898)) +- resource/alicloud_elasticsearch_instance: Fixes the GetCustomerLabelFail error by adding retry([#3901](https://github.com/aliyun/terraform-provider-alicloud/issues/3901)) +- resource/alicloud_bastihost_instance: Fixes the InvalidApi error([#3903](https://github.com/aliyun/terraform-provider-alicloud/issues/3903)) +- resource/alicloud_sddp_rule: Fixes the Sddp's Endpoint([#3907](https://github.com/aliyun/terraform-provider-alicloud/issues/3907)) +- Fixes the concurrent write bug when describing the endpoints([#3894](https://github.com/aliyun/terraform-provider-alicloud/issues/3894)) +- testcase: Fixes hbr snapshot doc and test case([#3905](https://github.com/aliyun/terraform-provider-alicloud/issues/3905)) +- testcase: Fixed lang's import bug for sddp config([#3909](https://github.com/aliyun/terraform-provider-alicloud/issues/3909)) ## 1.132.0 (August 21, 2021) -- **New Resource:** `alicloud_hbr_nas_backup_plan` ([#3810](https://github.com/aliyun/terraform-provider-alicloud/issues/3810)) -- **New Resource:** `alicloud_hbr_ecs_backup_plan` ([#3810](https://github.com/aliyun/terraform-provider-alicloud/issues/3810)) -- **New Resource:** `alicloud_cloud_storage_gateway_gateway` ([#3843](https://github.com/aliyun/terraform-provider-alicloud/issues/3843)) -- **New Resource:** `alicloud_lindorm_instance` ([#3861](https://github.com/aliyun/terraform-provider-alicloud/issues/3861)) -- **New Resource:** `alicloud_cddc_dedicated_host_group` ([#3869](https://github.com/aliyun/terraform-provider-alicloud/issues/3869)) -- **New Resource:** `alicloud_hbr_ecs_backup_client` ([#3863](https://github.com/aliyun/terraform-provider-alicloud/issues/3863)) -- **New Resource:** `alicloud_alb_load_balancer` ([#3864](https://github.com/aliyun/terraform-provider-alicloud/issues/3864)) -- **New Resource:** `alicloud_msc_sub_contact` ([#3872](https://github.com/aliyun/terraform-provider-alicloud/issues/3872)) -- **New Resource:** `alicloud_sddp_rule` ([#3875](https://github.com/aliyun/terraform-provider-alicloud/issues/3875)) -- **New Resource:** `alicloud_express_connect_physical_connection` ([#3876](https://github.com/aliyun/terraform-provider-alicloud/issues/3876)) -- **New Resource:** `alicloud_bastionhost_user_group` ([#3879](https://github.com/aliyun/terraform-provider-alicloud/issues/3879)) -- **New Data Source:** `alicloud_cloud_storage_gateway_gateways` ([#3843](https://github.com/aliyun/terraform-provider-alicloud/issues/3843)) -- **New Data Source:** `alicloud_express_connect_access_points` ([#3852](https://github.com/aliyun/terraform-provider-alicloud/issues/3852)) -- **New Data Source:** `alicloud_hbr_ecs_backup_plans` ([#3810](https://github.com/aliyun/terraform-provider-alicloud/issues/3810)) -- **New Data Source:** `alicloud_lindorm_instances` ([#3861](https://github.com/aliyun/terraform-provider-alicloud/issues/3861)) -- **New Data Source:** `alicloud_alb_load_balancers` ([#3864](https://github.com/aliyun/terraform-provider-alicloud/issues/3864)) -- **New Data Source:** `alicloud_alb_zones` ([#3864](https://github.com/aliyun/terraform-provider-alicloud/issues/3864)) -- **New Data Source:** `alicloud_express_connect_physical_connection_service` ([#3865](https://github.com/aliyun/terraform-provider-alicloud/issues/3865)) -- **New Data Source:** `alicloud_cddc_dedicated_host_groups` ([#3869](https://github.com/aliyun/terraform-provider-alicloud/issues/3869)) -- **New Data Source:** `alicloud_hbr_ecs_backup_clients` ([#3863](https://github.com/aliyun/terraform-provider-alicloud/issues/3863)) -- **New Data Source:** `alicloud_msc_sub_contacts` ([#3872](https://github.com/aliyun/terraform-provider-alicloud/issues/3872)) -- **New Data Source:** `alicloud_express_connect_physical_connections` ([#3876](https://github.com/aliyun/terraform-provider-alicloud/issues/3876)) -- **New Data Source:**`alicloud_sddp_rules` ([#3875](https://github.com/aliyun/terraform-provider-alicloud/issues/3875)) -- **New Data Source:**`alicloud_bastionhost_user_groups` ([#3879](https://github.com/aliyun/terraform-provider-alicloud/issues/3879)) +- **New Resource:** `alicloud_hbr_nas_backup_plan`([#3810](https://github.com/aliyun/terraform-provider-alicloud/issues/3810)) +- **New Resource:** `alicloud_hbr_ecs_backup_plan`([#3810](https://github.com/aliyun/terraform-provider-alicloud/issues/3810)) +- **New Resource:** `alicloud_cloud_storage_gateway_gateway`([#3843](https://github.com/aliyun/terraform-provider-alicloud/issues/3843)) +- **New Resource:** `alicloud_lindorm_instance`([#3861](https://github.com/aliyun/terraform-provider-alicloud/issues/3861)) +- **New Resource:** `alicloud_cddc_dedicated_host_group`([#3869](https://github.com/aliyun/terraform-provider-alicloud/issues/3869)) +- **New Resource:** `alicloud_hbr_ecs_backup_client`([#3863](https://github.com/aliyun/terraform-provider-alicloud/issues/3863)) +- **New Resource:** `alicloud_alb_load_balancer`([#3864](https://github.com/aliyun/terraform-provider-alicloud/issues/3864)) +- **New Resource:** `alicloud_msc_sub_contact`([#3872](https://github.com/aliyun/terraform-provider-alicloud/issues/3872)) +- **New Resource:** `alicloud_sddp_rule`([#3875](https://github.com/aliyun/terraform-provider-alicloud/issues/3875)) +- **New Resource:** `alicloud_express_connect_physical_connection`([#3876](https://github.com/aliyun/terraform-provider-alicloud/issues/3876)) +- **New Resource:** `alicloud_bastionhost_user_group`([#3879](https://github.com/aliyun/terraform-provider-alicloud/issues/3879)) +- **New Data Source:** `alicloud_cloud_storage_gateway_gateways`([#3843](https://github.com/aliyun/terraform-provider-alicloud/issues/3843)) +- **New Data Source:** `alicloud_express_connect_access_points`([#3852](https://github.com/aliyun/terraform-provider-alicloud/issues/3852)) +- **New Data Source:** `alicloud_hbr_ecs_backup_plans`([#3810](https://github.com/aliyun/terraform-provider-alicloud/issues/3810)) +- **New Data Source:** `alicloud_lindorm_instances`([#3861](https://github.com/aliyun/terraform-provider-alicloud/issues/3861)) +- **New Data Source:** `alicloud_alb_load_balancers`([#3864](https://github.com/aliyun/terraform-provider-alicloud/issues/3864)) +- **New Data Source:** `alicloud_alb_zones`([#3864](https://github.com/aliyun/terraform-provider-alicloud/issues/3864)) +- **New Data Source:** `alicloud_express_connect_physical_connection_service`([#3865](https://github.com/aliyun/terraform-provider-alicloud/issues/3865)) +- **New Data Source:** `alicloud_cddc_dedicated_host_groups`([#3869](https://github.com/aliyun/terraform-provider-alicloud/issues/3869)) +- **New Data Source:** `alicloud_hbr_ecs_backup_clients`([#3863](https://github.com/aliyun/terraform-provider-alicloud/issues/3863)) +- **New Data Source:** `alicloud_msc_sub_contacts`([#3872](https://github.com/aliyun/terraform-provider-alicloud/issues/3872)) +- **New Data Source:** `alicloud_express_connect_physical_connections`([#3876](https://github.com/aliyun/terraform-provider-alicloud/issues/3876)) +- **New Data Source:**`alicloud_sddp_rules`([#3875](https://github.com/aliyun/terraform-provider-alicloud/issues/3875)) +- **New Data Source:**`alicloud_bastionhost_user_groups`([#3879](https://github.com/aliyun/terraform-provider-alicloud/issues/3879)) ENHANCEMENTS: -- resource/alicloud_cr_ee_instance: Adds new attribute password to support reset instance login password ([#3854](https://github.com/aliyun/terraform-provider-alicloud/issues/3854)) -- resource/alicloud_cs_kubernetes_autoscaler: upgrade client-go version ([#3839](https://github.com/aliyun/terraform-provider-alicloud/issues/3839)) -- resource/alicloud_cr_ee_instance: Supports to set create timeout; testcase: Improves the alicloud_cr_ee_sync_rule testcases ([#3856](https://github.com/aliyun/terraform-provider-alicloud/issues/3856)) -- resource/alicloud_cdn_domain_config: Removes the function_args forceNew and to support updating it in place ([#3835](https://github.com/aliyun/terraform-provider-alicloud/issues/3835)) -- resource/alicloud_event_bridge_slr: Adds role AliyunServiceRoleForEventBridgeSendToMNS for attribute product_name ([#3859](https://github.com/aliyun/terraform-provider-alicloud/issues/3859)) -- resource/alicloud_polardb_endpoint: Adds new attribute ssl_auto_rotate and ssl_certificate_url to set SSL certificate rotation ([#3868](https://github.com/aliyun/terraform-provider-alicloud/issues/3868)) -- datasource/alicloud_event_bridge_service: Adds new attribute code to support international site ([#3859](https://github.com/aliyun/terraform-provider-alicloud/issues/3859)) -- resource/alicloud_yundun_bastionhost_instance: Fixes the setting security_group_ids failed error;Rename this resource to alicloud_bastionhost_instance ([#3880](https://github.com/aliyun/terraform-provider-alicloud/issues/3880)) -- data/alicloud_cr_ee_instances: Outputs more attributes authorization_token and temp_username ([#3855](https://github.com/aliyun/terraform-provider-alicloud/issues/3855)) -- datasource: Fixes the NotApplicable when using the alicloud_pvtz_serivce, alicloud_fnf_service, and alicloud_edas_service ([#3877](https://github.com/aliyun/terraform-provider-alicloud/issues/3877)) -- ci: Update go version to 0.13.4 ([#3857](https://github.com/aliyun/terraform-provider-alicloud/issues/3857)) -- ci: Update go version to 0.13.4 ([#3858](https://github.com/aliyun/terraform-provider-alicloud/issues/3858)) -- testcase: Improves the running testcase strategy ([#3848](https://github.com/aliyun/terraform-provider-alicloud/issues/3848)) -- testcase: Improves the sweeper testcase ([#3860](https://github.com/aliyun/terraform-provider-alicloud/issues/3860)) -- testcase: Improves the sweeper testcase ([#3849](https://github.com/aliyun/terraform-provider-alicloud/issues/3849)) -- docs/alicloud_cs_kubernetes_node_pool: Updates documentation and adds notes for node pool ([#3870](https://github.com/aliyun/terraform-provider-alicloud/issues/3870)) - -BUG FIXES: - -- resource/alicloud_actiontrail_trail: Fixes the error when updating trail config oss_write_role_arn ([#3851](https://github.com/aliyun/terraform-provider-alicloud/issues/3851)) -- resource/alicloud_cs_kubernetes_node_pool: fix update nodepool error ([#3839](https://github.com/aliyun/terraform-provider-alicloud/issues/3839)) -- Fixes the empty pointer error when setting a list attribute value ([#3878](https://github.com/aliyun/terraform-provider-alicloud/issues/3878)) +- resource/alicloud_cr_ee_instance: Adds new attribute password to support reset instance login password([#3854](https://github.com/aliyun/terraform-provider-alicloud/issues/3854)) +- resource/alicloud_cs_kubernetes_autoscaler: upgrade client-go version([#3839](https://github.com/aliyun/terraform-provider-alicloud/issues/3839)) +- resource/alicloud_cr_ee_instance: Supports to set create timeout; testcase: Improves the alicloud_cr_ee_sync_rule testcases([#3856](https://github.com/aliyun/terraform-provider-alicloud/issues/3856)) +- resource/alicloud_cdn_domain_config: Removes the function_args forceNew and to support updating it in place([#3835](https://github.com/aliyun/terraform-provider-alicloud/issues/3835)) +- resource/alicloud_event_bridge_slr: Adds role AliyunServiceRoleForEventBridgeSendToMNS for attribute product_name([#3859](https://github.com/aliyun/terraform-provider-alicloud/issues/3859)) +- resource/alicloud_polardb_endpoint: Adds new attribute ssl_auto_rotate and ssl_certificate_url to set SSL certificate rotation([#3868](https://github.com/aliyun/terraform-provider-alicloud/issues/3868)) +- datasource/alicloud_event_bridge_service: Adds new attribute code to support international site([#3859](https://github.com/aliyun/terraform-provider-alicloud/issues/3859)) +- resource/alicloud_yundun_bastionhost_instance: Fixes the setting security_group_ids failed error;Rename this resource to alicloud_bastionhost_instance([#3880](https://github.com/aliyun/terraform-provider-alicloud/issues/3880)) +- data/alicloud_cr_ee_instances: Outputs more attributes authorization_token and temp_username([#3855](https://github.com/aliyun/terraform-provider-alicloud/issues/3855)) +- datasource: Fixes the NotApplicable when using the alicloud_pvtz_serivce, alicloud_fnf_service, and alicloud_edas_service([#3877](https://github.com/aliyun/terraform-provider-alicloud/issues/3877)) +- ci: Update go version to 0.13.4([#3857](https://github.com/aliyun/terraform-provider-alicloud/issues/3857)) +- ci: Update go version to 0.13.4([#3858](https://github.com/aliyun/terraform-provider-alicloud/issues/3858)) +- testcase: Improves the running testcase strategy([#3848](https://github.com/aliyun/terraform-provider-alicloud/issues/3848)) +- testcase: Improves the sweeper testcase([#3860](https://github.com/aliyun/terraform-provider-alicloud/issues/3860)) +- testcase: Improves the sweeper testcase([#3849](https://github.com/aliyun/terraform-provider-alicloud/issues/3849)) +- docs/alicloud_cs_kubernetes_node_pool: Updates documentation and adds notes for node pool([#3870](https://github.com/aliyun/terraform-provider-alicloud/issues/3870)) + +BUG FIXES: + +- resource/alicloud_actiontrail_trail: Fixes the error when updating trail config oss_write_role_arn([#3851](https://github.com/aliyun/terraform-provider-alicloud/issues/3851)) +- resource/alicloud_cs_kubernetes_node_pool: fix update nodepool error([#3839](https://github.com/aliyun/terraform-provider-alicloud/issues/3839)) +- Fixes the empty pointer error when setting a list attribute value([#3878](https://github.com/aliyun/terraform-provider-alicloud/issues/3878)) ## 1.131.0 (August 16, 2021) -- **New Resource:** `alicloud_scdn_domain_config` ([#3847](https://github.com/aliyun/terraform-provider-alicloud/issues/3847)) -- **New Resource:** `alicloud_dcdn_domain_config` ([#3846](https://github.com/aliyun/terraform-provider-alicloud/issues/3846)) -- **New Resource:** `alicloud_arms_alert_contact_group` ([#3845](https://github.com/aliyun/terraform-provider-alicloud/issues/3845)) -- **New Resource:** `alb_server_group` ([#3834](https://github.com/aliyun/terraform-provider-alicloud/issues/3834)) -- **New Resource:** `alicloud_data_work_folder` ([#3831](https://github.com/aliyun/terraform-provider-alicloud/issues/3831)) -- **New Resource:** `alicloud_hbr_oss_backup_plan` ([#3827](https://github.com/aliyun/terraform-provider-alicloud/issues/3827)) -- **New Resource:** `alicloud_scdn_domain` ([#3840](https://github.com/aliyun/terraform-provider-alicloud/issues/3840)) -- **New Data Source:** `alicloud_arms_alert_contact_groups` ([#3845](https://github.com/aliyun/terraform-provider-alicloud/issues/3845)) -- **New Data Source:** `alb_server_groups` ([#3834](https://github.com/aliyun/terraform-provider-alicloud/issues/3834)) -- **New Data Source:** `alicloud_data_work_folders` ([#3831](https://github.com/aliyun/terraform-provider-alicloud/issues/3831)) -- **New Data Source:** `alicloud_hbr_oss_backup_plans` ([#3827](https://github.com/aliyun/terraform-provider-alicloud/issues/3827)) -- **New Data Source:** `alicloud_scdn_domains` ([#3840](https://github.com/aliyun/terraform-provider-alicloud/issues/3840)) +- **New Resource:** `alicloud_scdn_domain_config`([#3847](https://github.com/aliyun/terraform-provider-alicloud/issues/3847)) +- **New Resource:** `alicloud_dcdn_domain_config`([#3846](https://github.com/aliyun/terraform-provider-alicloud/issues/3846)) +- **New Resource:** `alicloud_arms_alert_contact_group`([#3845](https://github.com/aliyun/terraform-provider-alicloud/issues/3845)) +- **New Resource:** `alb_server_group`([#3834](https://github.com/aliyun/terraform-provider-alicloud/issues/3834)) +- **New Resource:** `alicloud_data_work_folder`([#3831](https://github.com/aliyun/terraform-provider-alicloud/issues/3831)) +- **New Resource:** `alicloud_hbr_oss_backup_plan`([#3827](https://github.com/aliyun/terraform-provider-alicloud/issues/3827)) +- **New Resource:** `alicloud_scdn_domain`([#3840](https://github.com/aliyun/terraform-provider-alicloud/issues/3840)) +- **New Data Source:** `alicloud_arms_alert_contact_groups`([#3845](https://github.com/aliyun/terraform-provider-alicloud/issues/3845)) +- **New Data Source:** `alb_server_groups`([#3834](https://github.com/aliyun/terraform-provider-alicloud/issues/3834)) +- **New Data Source:** `alicloud_data_work_folders`([#3831](https://github.com/aliyun/terraform-provider-alicloud/issues/3831)) +- **New Data Source:** `alicloud_hbr_oss_backup_plans`([#3827](https://github.com/aliyun/terraform-provider-alicloud/issues/3827)) +- **New Data Source:** `alicloud_scdn_domains`([#3840](https://github.com/aliyun/terraform-provider-alicloud/issues/3840)) ENHANCEMENTS: -- Add Github WorkFlow(pull_request,tf_acctest) ([#3836](https://github.com/aliyun/terraform-provider-alicloud/issues/3836)) -- resource/alicloud_hbr_vault: Improves its update action ([#3816](https://github.com/aliyun/terraform-provider-alicloud/issues/3816)) -- resource/alicloud_instance: Adds new attribute instance_name ([#3830](https://github.com/aliyun/terraform-provider-alicloud/issues/3830)) -- testcase: Improves the sweep testcase for log_project ([#3817](https://github.com/aliyun/terraform-provider-alicloud/issues/3817)) -- docs/alicloud_eip_address: Corrects its docs and adds some note ([#3823](https://github.com/aliyun/terraform-provider-alicloud/issues/3823)) -- docs/alicloud_amqp_exchange: Adds the enum HEADERS for the exchange_type ([#3832](https://github.com/aliyun/terraform-provider-alicloud/issues/3832)) +- Add Github WorkFlow(pull_request,tf_acctest)([#3836](https://github.com/aliyun/terraform-provider-alicloud/issues/3836)) +- resource/alicloud_hbr_vault: Improves its update action([#3816](https://github.com/aliyun/terraform-provider-alicloud/issues/3816)) +- resource/alicloud_instance: Adds new attribute instance_name([#3830](https://github.com/aliyun/terraform-provider-alicloud/issues/3830)) +- testcase: Improves the sweep testcase for log_project([#3817](https://github.com/aliyun/terraform-provider-alicloud/issues/3817)) +- docs/alicloud_eip_address: Corrects its docs and adds some note([#3823](https://github.com/aliyun/terraform-provider-alicloud/issues/3823)) +- docs/alicloud_amqp_exchange: Adds the enum HEADERS for the exchange_type([#3832](https://github.com/aliyun/terraform-provider-alicloud/issues/3832)) BUG FIXES: -- resource/alicloud_event_bridge_rule: Fixes the targets parameters bug and update its testcase ([#3842](https://github.com/aliyun/terraform-provider-alicloud/issues/3842)) -- resource/alicloud_ess_attachment: Fixes the bug: call of reflect.Value.Set on zero Value ([#3828](https://github.com/aliyun/terraform-provider-alicloud/issues/3828)) -- data/alicloud_ess_scheduler_tasks: Fixes the converting type error ([#3826](https://github.com/aliyun/terraform-provider-alicloud/issues/3826)) +- resource/alicloud_event_bridge_rule: Fixes the targets parameters bug and update its testcase([#3842](https://github.com/aliyun/terraform-provider-alicloud/issues/3842)) +- resource/alicloud_ess_attachment: Fixes the bug: call of reflect.Value.Set on zero Value([#3828](https://github.com/aliyun/terraform-provider-alicloud/issues/3828)) +- data/alicloud_ess_scheduler_tasks: Fixes the converting type error([#3826](https://github.com/aliyun/terraform-provider-alicloud/issues/3826)) ## 1.130.0 (August 07, 2021) -- **New Resource:** `alicloud_ecp_key_pair` ([#3815](https://github.com/aliyun/terraform-provider-alicloud/issues/3815)) -- **New Resource:** `alicloud_kvstore_audit_log_config` ([#3812](https://github.com/aliyun/terraform-provider-alicloud/issues/3812)) +- **New Resource:** `alicloud_ecp_key_pair` ([#3815](https://github.com/aliyun/terraform-provider-alicloud/issues/3815)) +- **New Resource:** `alicloud_kvstore_audit_log_config`([#3812](https://github.com/aliyun/terraform-provider-alicloud/issues/3812)) +- **New Resource:** `alicloud_alb_security_policy`([#3809](https://github.com/aliyun/terraform-provider-alicloud/issues/3809)) +- **New Resource:** `alicloud_ecd_policy_group`([#3808](https://github.com/aliyun/terraform-provider-alicloud/issues/3808)) +- **New Resource:** `alicloud_event_bridge_event_source`([#3806](https://github.com/aliyun/terraform-provider-alicloud/issues/3806)) +- **New Resource:** `alicloud_cloud_firewall_control_policy_order`([#3804](https://github.com/aliyun/terraform-provider-alicloud/issues/3804)) +- **New Resource:** `alicloud_sae_config_map` ([#3801](https://github.com/aliyun/terraform-provider-alicloud/issues/3801)) - **New Resource:** `alicloud_alb_security_policy` ([#3809](https://github.com/aliyun/terraform-provider-alicloud/issues/3809)) -- **New Resource:** `alicloud_ecd_policy_group` ([#3808](https://github.com/aliyun/terraform-provider-alicloud/issues/3808)) -- **New Resource:** `alicloud_event_bridge_event_source` ([#3806](https://github.com/aliyun/terraform-provider-alicloud/issues/3806)) -- **New Resource:** `alicloud_cloud_firewall_control_policy_order` ([#3804](https://github.com/aliyun/terraform-provider-alicloud/issues/3804)) -- **New Resource:** `alicloud_sae_config_map` ([#3801](https://github.com/aliyun/terraform-provider-alicloud/issues/3801)) -- **New Resource:** `alicloud_alb_security_policy` ([#3809](https://github.com/aliyun/terraform-provider-alicloud/issues/3809)) -- **New Data Source:** `alicloud_ecp_key_pairs` ([#3815](https://github.com/aliyun/terraform-provider-alicloud/issues/3815)) -- **New Data Source:** `alicloud_alb_security_policies` ([#3809](https://github.com/aliyun/terraform-provider-alicloud/issues/3809)) -- **New Data Source:** `alicloud_ecd_policy_groups` ([#3808](https://github.com/aliyun/terraform-provider-alicloud/issues/3808)) -- **New Data Source:** `alicloud_event_bridge_event_sources` ([#3806](https://github.com/aliyun/terraform-provider-alicloud/issues/3806)) -- **New Data Source:** `alicloud_sae_config_maps` ([#3801](https://github.com/aliyun/terraform-provider-alicloud/issues/3801)) +- **New Data Source:** `alicloud_ecp_key_pairs`([#3815](https://github.com/aliyun/terraform-provider-alicloud/issues/3815)) +- **New Data Source:** `alicloud_alb_security_policies`([#3809](https://github.com/aliyun/terraform-provider-alicloud/issues/3809)) +- **New Data Source:** `alicloud_ecd_policy_groups`([#3808](https://github.com/aliyun/terraform-provider-alicloud/issues/3808)) +- **New Data Source:** `alicloud_event_bridge_event_sources`([#3806](https://github.com/aliyun/terraform-provider-alicloud/issues/3806)) +- **New Data Source:** `alicloud_sae_config_maps`([#3801](https://github.com/aliyun/terraform-provider-alicloud/issues/3801)) ENHANCEMENTS: -- testcase: Modify getting default vpc filter in the testcase ([#3814](https://github.com/aliyun/terraform-provider-alicloud/issues/3814)) -- resource/alicloud_alidns_record: Fixes the LastOperationNotFinished when creating several records one time ([#3813](https://github.com/aliyun/terraform-provider-alicloud/issues/3813)) -- resource/alicloud_polardb_cluster: Adds new attribute db_cluster_ip_array to modify security ips array name ([#3798](https://github.com/aliyun/terraform-provider-alicloud/issues/3798)) -- resource/resource_alicloud_cs_kubernetes_permissions: User authorization may be cleared when updating user permissions ([#3807](https://github.com/aliyun/terraform-provider-alicloud/issues/3807)) -- testcase/alicloud_sae_namespace: Improves its supported regions ([#3793](https://github.com/aliyun/terraform-provider-alicloud/issues/3793)) -- data/alicloud_nat_gateways: Removes the nat_type default value; improves the other testcases ([#3762](https://github.com/aliyun/terraform-provider-alicloud/issues/3762)) +- testcase: Modify getting default vpc filter in the testcase([#3814](https://github.com/aliyun/terraform-provider-alicloud/issues/3814)) +- resource/alicloud_alidns_record: Fixes the LastOperationNotFinished when creating several records one time([#3813](https://github.com/aliyun/terraform-provider-alicloud/issues/3813)) +- resource/alicloud_polardb_cluster: Adds new attribute db_cluster_ip_array to modify security ips array name([#3798](https://github.com/aliyun/terraform-provider-alicloud/issues/3798)) +- resource/resource_alicloud_cs_kubernetes_permissions: User authorization may be cleared when updating user permissions([#3807](https://github.com/aliyun/terraform-provider-alicloud/issues/3807)) +- testcase/alicloud_sae_namespace: Improves its supported regions([#3793](https://github.com/aliyun/terraform-provider-alicloud/issues/3793)) +- data/alicloud_nat_gateways: Removes the nat_type default value; improves the other testcases([#3762](https://github.com/aliyun/terraform-provider-alicloud/issues/3762)) BUG FIXES: -- resource/alicloud_event_bridge_event_bus: Fixes Count Exceed Limit Bug ([#3806](https://github.com/aliyun/terraform-provider-alicloud/issues/3806)) -- resource/alicloud_db_instance: Fixes bug result of attribute ha_config not set Computed:true. ([#3797](https://github.com/aliyun/terraform-provider-alicloud/issues/3797)) +- resource/alicloud_event_bridge_event_bus: Fixes Count Exceed Limit Bug([#3806](https://github.com/aliyun/terraform-provider-alicloud/issues/3806)) +- resource/alicloud_db_instance: Fixes bug result of attribute ha_config not set Computed:true.([#3797](https://github.com/aliyun/terraform-provider-alicloud/issues/3797)) ## 1.129.0 (July 30, 2021) -- **New Resource:** `alicloud_hbr_vault` ([#3770](https://github.com/aliyun/terraform-provider-alicloud/issues/3770)) -- **New Resource:** `alicloud_event_bridge_event_bus` ([#3783](https://github.com/aliyun/terraform-provider-alicloud/issues/3783)) -- **New Resource:** `alicloud_ssl_certificates_service_certificate` ([#3781](https://github.com/aliyun/terraform-provider-alicloud/issues/3781)) -- **New Resource:** `alicloud_arms_alert_contact` ([#3785](https://github.com/aliyun/terraform-provider-alicloud/issues/3785)) -- **New Resource:** `alicloud_event_bridge_rule` ([#3788](https://github.com/aliyun/terraform-provider-alicloud/issues/3788)) -- **New Resource:** `alicloud_cloud_firewall_control_policy` ([#3787](https://github.com/aliyun/terraform-provider-alicloud/issues/3787)) -- **New Resource:** `alicloud_event_bridge_slr` ([#3775](https://github.com/aliyun/terraform-provider-alicloud/issues/3775)) -- **New Resource:** `alicloud_sae_namespace` ([#3786](https://github.com/aliyun/terraform-provider-alicloud/issues/3786)) -- **New Data Source:** `alicloud_hbr_vaults` ([#3770](https://github.com/aliyun/terraform-provider-alicloud/issues/3770)) -- **New Data Source:** `alicloud_event_bridge_event_buses` ([#3783](https://github.com/aliyun/terraform-provider-alicloud/issues/3783)) -- **New Data Source:** `alicloud_ssl_certificates_service_certificates` ([#3781](https://github.com/aliyun/terraform-provider-alicloud/issues/3781)) -- **New Data Source:** `alicloud_ssl_certificates_service_certificatess` ([#3785](https://github.com/aliyun/terraform-provider-alicloud/issues/3785)) -- **New Data Source:** `alicloud_event_bridge_rules` ([#3788](https://github.com/aliyun/terraform-provider-alicloud/issues/3788)) -- **New Data Source:** `alicloud_cloud_firewall_control_policies` ([#3787](https://github.com/aliyun/terraform-provider-alicloud/issues/3787)) -- **New Data Source:** `alicloud_sae_namespaces` ([#3786](https://github.com/aliyun/terraform-provider-alicloud/issues/3786)) +- **New Resource:** `alicloud_hbr_vault`([#3770](https://github.com/aliyun/terraform-provider-alicloud/issues/3770)) +- **New Resource:** `alicloud_event_bridge_event_bus`([#3783](https://github.com/aliyun/terraform-provider-alicloud/issues/3783)) +- **New Resource:** `alicloud_ssl_certificates_service_certificate`([#3781](https://github.com/aliyun/terraform-provider-alicloud/issues/3781)) +- **New Resource:** `alicloud_arms_alert_contact`([#3785](https://github.com/aliyun/terraform-provider-alicloud/issues/3785)) +- **New Resource:** `alicloud_event_bridge_rule`([#3788](https://github.com/aliyun/terraform-provider-alicloud/issues/3788)) +- **New Resource:** `alicloud_cloud_firewall_control_policy`([#3787](https://github.com/aliyun/terraform-provider-alicloud/issues/3787)) +- **New Resource:** `alicloud_event_bridge_slr`([#3775](https://github.com/aliyun/terraform-provider-alicloud/issues/3775)) +- **New Resource:** `alicloud_sae_namespace`([#3786](https://github.com/aliyun/terraform-provider-alicloud/issues/3786)) +- **New Data Source:** `alicloud_hbr_vaults`([#3770](https://github.com/aliyun/terraform-provider-alicloud/issues/3770)) +- **New Data Source:** `alicloud_event_bridge_event_buses`([#3783](https://github.com/aliyun/terraform-provider-alicloud/issues/3783)) +- **New Data Source:** `alicloud_ssl_certificates_service_certificates`([#3781](https://github.com/aliyun/terraform-provider-alicloud/issues/3781)) +- **New Data Source:** `alicloud_ssl_certificates_service_certificatess`([#3785](https://github.com/aliyun/terraform-provider-alicloud/issues/3785)) +- **New Data Source:** `alicloud_event_bridge_rules`([#3788](https://github.com/aliyun/terraform-provider-alicloud/issues/3788)) +- **New Data Source:** `alicloud_cloud_firewall_control_policies`([#3787](https://github.com/aliyun/terraform-provider-alicloud/issues/3787)) +- **New Data Source:** `alicloud_sae_namespaces`([#3786](https://github.com/aliyun/terraform-provider-alicloud/issues/3786)) ENHANCEMENTS: -- resource/alicloud_cs_kuberneters: Removes the useless diffFunc ([#3772](https://github.com/aliyun/terraform-provider-alicloud/issues/3772)) -- resource/alicloud_db_instance:Adds new attribute storage_auto_scale,storge_thireshold and storage_upper_bound to support storage auto-scaling ([#3774](https://github.com/aliyun/terraform-provider-alicloud/issues/3774)) -- resource/alicloud_amqp_instance: Supports to modify the attribute storage_size ([#3778](https://github.com/aliyun/terraform-provider-alicloud/issues/3778)) -- resource/alicloud_event_bridge_slr: Add resource not exist code. ([#3790](https://github.com/aliyun/terraform-provider-alicloud/issues/3790)) -- datasource/alicloud_amqp_queues: Improves the setting attribute 'attributes' ([#3779](https://github.com/aliyun/terraform-provider-alicloud/issues/3779)) +- resource/alicloud_cs_kuberneters: Removes the useless diffFunc([#3772](https://github.com/aliyun/terraform-provider-alicloud/issues/3772)) +- resource/alicloud_db_instance:Adds new attribute storage_auto_scale,storge_thireshold and storage_upper_bound to support storage auto-scaling([#3774](https://github.com/aliyun/terraform-provider-alicloud/issues/3774)) +- resource/alicloud_amqp_instance: Supports to modify the attribute storage_size([#3778](https://github.com/aliyun/terraform-provider-alicloud/issues/3778)) +- resource/alicloud_event_bridge_slr: Add resource not exist code.([#3790](https://github.com/aliyun/terraform-provider-alicloud/issues/3790)) +- datasource/alicloud_amqp_queues: Improves the setting attribute 'attributes'([#3779](https://github.com/aliyun/terraform-provider-alicloud/issues/3779)) BUG FIXES: -- resource/alicloud_cs_kubernetes_permissions: Fixes grant permission error ([#3782](https://github.com/aliyun/terraform-provider-alicloud/issues/3782)) -- datasource/alicloud_log_service: Fixes endpoint connection timeout bug in log service ([#3768](https://github.com/aliyun/terraform-provider-alicloud/issues/3768)) -- resource/alicloud_ddoscoo_instance: Fixes the NotApplicable error when creating the instance ([#3789](https://github.com/aliyun/terraform-provider-alicloud/issues/3789)) +- resource/alicloud_cs_kubernetes_permissions: Fixes grant permission error([#3782](https://github.com/aliyun/terraform-provider-alicloud/issues/3782)) +- datasource/alicloud_log_service: Fixes endpoint connection timeout bug in log service([#3768](https://github.com/aliyun/terraform-provider-alicloud/issues/3768)) +- resource/alicloud_ddoscoo_instance: Fixes the NotApplicable error when creating the instance([#3789](https://github.com/aliyun/terraform-provider-alicloud/issues/3789)) ## 1.128.0 (July 24, 2021) -- **New Resource:** `alicloud_amqp_instance` ([#3764](https://github.com/aliyun/terraform-provider-alicloud/issues/3764)) -- **New Resource:** `alicloud_amqp_exchange` ([#3737](https://github.com/aliyun/terraform-provider-alicloud/issues/3737)) -- **New Resource:** `alicloud_cassandra_backup_plan` ([#3733](https://github.com/aliyun/terraform-provider-alicloud/issues/3733)) -- **New Resource:** `alicloud_cen_transit_router_peer_attachment` ([#3753](https://github.com/aliyun/terraform-provider-alicloud/issues/3753)) -- **New Data Source:** `alicloud_amqp_instances` ([#3764](https://github.com/aliyun/terraform-provider-alicloud/issues/3764)) -- **New Data Source:** `alicloud_amqp_exchanges` ([#3737](https://github.com/aliyun/terraform-provider-alicloud/issues/3737)) -- **New Data Source:** `alicloud_cassandra_backup_plans` ([#3733](https://github.com/aliyun/terraform-provider-alicloud/issues/3733)) -- **New Data Source:** `alicloud_cen_transit_router_peer_attachments` ([#3753](https://github.com/aliyun/terraform-provider-alicloud/issues/3753)) -- **New Data Source:** `alicloud_kvstore_permission` ([#3759](https://github.com/aliyun/terraform-provider-alicloud/issues/3759)) +- **New Resource:** `alicloud_amqp_instance`([#3764](https://github.com/aliyun/terraform-provider-alicloud/issues/3764)) +- **New Resource:** `alicloud_amqp_exchange`([#3737](https://github.com/aliyun/terraform-provider-alicloud/issues/3737)) +- **New Resource:** `alicloud_cassandra_backup_plan`([#3733](https://github.com/aliyun/terraform-provider-alicloud/issues/3733)) +- **New Resource:** `alicloud_cen_transit_router_peer_attachment`([#3753](https://github.com/aliyun/terraform-provider-alicloud/issues/3753)) +- **New Data Source:** `alicloud_amqp_instances`([#3764](https://github.com/aliyun/terraform-provider-alicloud/issues/3764)) +- **New Data Source:** `alicloud_amqp_exchanges`([#3737](https://github.com/aliyun/terraform-provider-alicloud/issues/3737)) +- **New Data Source:** `alicloud_cassandra_backup_plans`([#3733](https://github.com/aliyun/terraform-provider-alicloud/issues/3733)) +- **New Data Source:** `alicloud_cen_transit_router_peer_attachments`([#3753](https://github.com/aliyun/terraform-provider-alicloud/issues/3753)) +- **New Data Source:** `alicloud_kvstore_permission`([#3759](https://github.com/aliyun/terraform-provider-alicloud/issues/3759)) ENHANCEMENTS: -- resource/alicloud_db_readonly_instance:Adds new attributes such as upgrade_kernel_version_enabled, upgrade_time, switch_time and target_minor_version to support Update minor engine version. ([#3729](https://github.com/aliyun/terraform-provider-alicloud/issues/3729)) -- resource/alicloud_serverless_kubernetes: Removes the deprecated attribute private_zone default value to fix an issue where the ASK cluster service discovery was not working ([#3738](https://github.com/aliyun/terraform-provider-alicloud/issues/3738)) -- resource/alicloud_disk: delete and recreate disk if snapshot_id changed ([#3361](https://github.com/aliyun/terraform-provider-alicloud/issues/3361)) -- resource/alicloud_cen_instance: Upgrades its dependence sdk ([#3742](https://github.com/aliyun/terraform-provider-alicloud/issues/3742)) -- resource/alicloud_route_table: Removes the specified expectedError into Retry Process with Delete Method ([#3746](https://github.com/aliyun/terraform-provider-alicloud/issues/3746)) -- resource/alicloud_db_instance: Adds engine limitation before invoking ModifySQLCollectorRetention ([#3754](https://github.com/aliyun/terraform-provider-alicloud/issues/3754)) -- resource/alicloud_db_instance: Adds attributes ha_config and manual_ha_time to support ModifyHASwitchConfig(enable or disable automatic primary/secondary switchover). ([#3755](https://github.com/aliyun/terraform-provider-alicloud/issues/3755)) -- resource/alicloud_kvstore_instance: Adds parameter dry_run ([#3761](https://github.com/aliyun/terraform-provider-alicloud/issues/3761)) -- resource/alicloud_db_instance: Checks db_instance's status before updating sql_collector_status attribute ([#3760](https://github.com/aliyun/terraform-provider-alicloud/issues/3760)) -- resource/alicloud_kvstore_instance: Adds new attribute secondary_zone_id to support secondary zone ([#3757](https://github.com/aliyun/terraform-provider-alicloud/issues/3757)) -- resource/alicloud_polardb_cluster: Adds new attribute security_group_ids to support setting security group ([#3752](https://github.com/aliyun/terraform-provider-alicloud/issues/3752)) -- provider: Sets old sdk config EnableAsync to false; Close the location client after it invoked ([#3756](https://github.com/aliyun/terraform-provider-alicloud/issues/3756)) -- vendor: Improves the vendor dependence github.com/sirupsen/logrus ([#3747](https://github.com/aliyun/terraform-provider-alicloud/issues/3747)) -- testcase: Improves the amqp resources testcase ([#3765](https://github.com/aliyun/terraform-provider-alicloud/issues/3765)) +- resource/alicloud_db_readonly_instance:Adds new attributes such as upgrade_kernel_version_enabled, upgrade_time, switch_time and target_minor_version to support Update minor engine version.([#3729](https://github.com/aliyun/terraform-provider-alicloud/issues/3729)) +- resource/alicloud_serverless_kubernetes: Removes the deprecated attribute private_zone default value to fix an issue where the ASK cluster service discovery was not working([#3738](https://github.com/aliyun/terraform-provider-alicloud/issues/3738)) +- resource/alicloud_disk: delete and recreate disk if snapshot_id changed([#3361](https://github.com/aliyun/terraform-provider-alicloud/issues/3361)) +- resource/alicloud_cen_instance: Upgrades its dependence sdk([#3742](https://github.com/aliyun/terraform-provider-alicloud/issues/3742)) +- resource/alicloud_route_table: Removes the specified expectedError into Retry Process with Delete Method([#3746](https://github.com/aliyun/terraform-provider-alicloud/issues/3746)) +- resource/alicloud_db_instance: Adds engine limitation before invoking ModifySQLCollectorRetention([#3754](https://github.com/aliyun/terraform-provider-alicloud/issues/3754)) +- resource/alicloud_db_instance: Adds attributes ha_config and manual_ha_time to support ModifyHASwitchConfig(enable or disable automatic primary/secondary switchover).([#3755](https://github.com/aliyun/terraform-provider-alicloud/issues/3755)) +- resource/alicloud_kvstore_instance: Adds parameter dry_run([#3761](https://github.com/aliyun/terraform-provider-alicloud/issues/3761)) +- resource/alicloud_db_instance: Checks db_instance's status before updating sql_collector_status attribute([#3760](https://github.com/aliyun/terraform-provider-alicloud/issues/3760)) +- resource/alicloud_kvstore_instance: Adds new attribute secondary_zone_id to support secondary zone([#3757](https://github.com/aliyun/terraform-provider-alicloud/issues/3757)) +- resource/alicloud_polardb_cluster: Adds new attribute security_group_ids to support setting security group([#3752](https://github.com/aliyun/terraform-provider-alicloud/issues/3752)) +- provider: Sets old sdk config EnableAsync to false; Close the location client after it invoked([#3756](https://github.com/aliyun/terraform-provider-alicloud/issues/3756)) +- vendor: Improves the vendor dependence github.com/sirupsen/logrus([#3747](https://github.com/aliyun/terraform-provider-alicloud/issues/3747)) +- testcase: Improves the amqp resources testcase([#3765](https://github.com/aliyun/terraform-provider-alicloud/issues/3765)) BUG FIXES: -- resource/alicloud_fc_service: Fixes the bug when there is no need to retry ([#3741](https://github.com/aliyun/terraform-provider-alicloud/issues/3741)) -- doc/alicloud_gpdb_elastic_instance: Fixes some Example Usage Parameter ([#3749](https://github.com/aliyun/terraform-provider-alicloud/issues/3749)) +- resource/alicloud_fc_service: Fixes the bug when there is no need to retry([#3741](https://github.com/aliyun/terraform-provider-alicloud/issues/3741)) +- doc/alicloud_gpdb_elastic_instance: Fixes some Example Usage Parameter([#3749](https://github.com/aliyun/terraform-provider-alicloud/issues/3749)) ## 1.127.0 (July 16, 2021) -- **New Resource:** `alicloud_cs_autoscaling_config` ([#3734](https://github.com/aliyun/terraform-provider-alicloud/issues/3734)) -- **New Resource:** `alicloud_gpdb_elastic_instance` ([#3727](https://github.com/aliyun/terraform-provider-alicloud/issues/3727)) -- **New Resource:** `alicloud_amqp_queue` ([#3720](https://github.com/aliyun/terraform-provider-alicloud/issues/3720)) -- **New Data Source:** `alicloud_amqp_queues` ([#3720](https://github.com/aliyun/terraform-provider-alicloud/issues/3720)) +- **New Resource:** `alicloud_cs_autoscaling_config`([#3734](https://github.com/aliyun/terraform-provider-alicloud/issues/3734)) +- **New Resource:** `alicloud_gpdb_elastic_instance`([#3727](https://github.com/aliyun/terraform-provider-alicloud/issues/3727)) +- **New Resource:** `alicloud_amqp_queue`([#3720](https://github.com/aliyun/terraform-provider-alicloud/issues/3720)) +- **New Data Source:** `alicloud_amqp_queues`([#3720](https://github.com/aliyun/terraform-provider-alicloud/issues/3720)) ENHANCEMENTS: -- resource/alicloud_cs_kubernetes_node_pool: Adds new attributes platform, scaling_policy, instances, keep_instance_name and format_disk ([#3734](https://github.com/aliyun/terraform-provider-alicloud/issues/3734)) -- client/bssopenapiClient: Improves the bss openapi endpoint to avoid the NotApplicable error; Fixes the alidns_instance setting domain_numbers failed issue ([#3713](https://github.com/aliyun/terraform-provider-alicloud/issues/3713)) -- resource/alicloud_datahub_project: Upgrades it dependence sdk ([#3723](https://github.com/aliyun/terraform-provider-alicloud/issues/3723)) -- resource/alicloud_datahub_project: Improves its dependece ([#3725](https://github.com/aliyun/terraform-provider-alicloud/issues/3725)) -- Reset the resource event_bus and schema_group and its datasource ([#3721](https://github.com/aliyun/terraform-provider-alicloud/issues/3721)) -- provider: Sets the max idle conns to 500 in the client; Adds docs unit statement for the provider attribute client_read_timeout and client_connect_timeout ([#3728](https://github.com/aliyun/terraform-provider-alicloud/issues/3728)) -- ci: Upgrades the ci go version to 1.15.10 ([#3732](https://github.com/aliyun/terraform-provider-alicloud/issues/3732)) -- docs: Improves the docs parsing subcategory faild error ([#3722](https://github.com/aliyun/terraform-provider-alicloud/issues/3722)) -- docs/alicloud_db_instance: Improves its docs by adding a blank line to fix it error formate ([#3730](https://github.com/aliyun/terraform-provider-alicloud/issues/3730)) +- resource/alicloud_cs_kubernetes_node_pool: Adds new attributes platform, scaling_policy, instances, keep_instance_name and format_disk([#3734](https://github.com/aliyun/terraform-provider-alicloud/issues/3734)) +- client/bssopenapiClient: Improves the bss openapi endpoint to avoid the NotApplicable error; Fixes the alidns_instance setting domain_numbers failed issue([#3713](https://github.com/aliyun/terraform-provider-alicloud/issues/3713)) +- resource/alicloud_datahub_project: Upgrades it dependence sdk([#3723](https://github.com/aliyun/terraform-provider-alicloud/issues/3723)) +- resource/alicloud_datahub_project: Improves its dependece([#3725](https://github.com/aliyun/terraform-provider-alicloud/issues/3725)) +- Reset the resource event_bus and schema_group and its datasource([#3721](https://github.com/aliyun/terraform-provider-alicloud/issues/3721)) +- provider: Sets the max idle conns to 500 in the client; Adds docs unit statement for the provider attribute client_read_timeout and client_connect_timeout([#3728](https://github.com/aliyun/terraform-provider-alicloud/issues/3728)) +- ci: Upgrades the ci go version to 1.15.10([#3732](https://github.com/aliyun/terraform-provider-alicloud/issues/3732)) +- docs: Improves the docs parsing subcategory faild error([#3722](https://github.com/aliyun/terraform-provider-alicloud/issues/3722)) +- docs/alicloud_db_instance: Improves its docs by adding a blank line to fix it error formate([#3730](https://github.com/aliyun/terraform-provider-alicloud/issues/3730)) BUG FIXES: -- resource/alicloud_slb_listener: Fixes the default parameter when updating the specified parameter with SetLoadBalancerHTTPSListenerAttribute Method ([#3735](https://github.com/aliyun/terraform-provider-alicloud/issues/3735)) -- resource/alicloud_db_readonly_instance and alicloud_db_instance: Fixes the diff error caused by ca_type, acl, and replication_acl ([#3731](https://github.com/aliyun/terraform-provider-alicloud/issues/3731)) -- testcase: Fixed cen ci test. ([#3719](https://github.com/aliyun/terraform-provider-alicloud/issues/3719)) +- resource/alicloud_slb_listener: Fixes the default parameter when updating the specified parameter with SetLoadBalancerHTTPSListenerAttribute Method([#3735](https://github.com/aliyun/terraform-provider-alicloud/issues/3735)) +- resource/alicloud_db_readonly_instance and alicloud_db_instance: Fixes the diff error caused by ca_type, acl, and replication_acl([#3731](https://github.com/aliyun/terraform-provider-alicloud/issues/3731)) +- testcase: Fixed cen ci test.([#3719](https://github.com/aliyun/terraform-provider-alicloud/issues/3719)) ## 1.126.0 (July 12, 2021) -- **New Resource:** `alicloud_amqp_virtual_host` ([#3714](https://github.com/aliyun/terraform-provider-alicloud/issues/3714)) -- **New Resource:** `alicloud_eip_address` ([#3682](https://github.com/aliyun/terraform-provider-alicloud/issues/3682)) -- **New Resource:** `alicloud_cen_transit_router` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Resource:** `alicloud_cen_transit_router_route_table` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Resource:** `alicloud_cen_transit_router_route_table_association` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Resource:** `alicloud_cen_transit_router_route_table_propagation` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Resource:** `alicloud_cen_transit_router_route_entry` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Resource:** `alicloud_cen_transit_router_vbr_attachment` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Resource:** `alicloud_cen_transit_router_vpc_attachment` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Data Source:** `alicloud_amqp_virtual_hosts` ([#3714](https://github.com/aliyun/terraform-provider-alicloud/issues/3714)) -- **New Data Source:** `alicloud_cen_transit_routers` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Data Source:** `alicloud_cen_transit_router_route_tables` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Data Source:** `alicloud_cen_transit_router_route_table_associations` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Data Source:** `alicloud_cen_transit_router_route_table_propagations` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Data Source:** `alicloud_cen_transit_router_route_entries` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Data Source:** `alicloud_cen_transit_router_vbr_attachments` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Data Source:** `alicloud_cen_transit_router_vpc_attachments` ([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) -- **New Data Source:** `alicloud_log_projects` ([#3691](https://github.com/aliyun/terraform-provider-alicloud/issues/3691)) -- **New Data Source:** `alicloud_log_stores` ([#3691](https://github.com/aliyun/terraform-provider-alicloud/issues/3691)) -- **New Data Source:** `alicloud_event_bridge_service` ([#3691](https://github.com/aliyun/terraform-provider-alicloud/issues/3691)) -- **New Data Source:** `alicloud_eip_addresses` ([#3682](https://github.com/aliyun/terraform-provider-alicloud/issues/3682)) +- **New Resource:** `alicloud_amqp_virtual_host`([#3714](https://github.com/aliyun/terraform-provider-alicloud/issues/3714)) +- **New Resource:** `alicloud_eip_address`([#3682](https://github.com/aliyun/terraform-provider-alicloud/issues/3682)) +- **New Resource:** `alicloud_cen_transit_router`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Resource:** `alicloud_cen_transit_router_route_table`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Resource:** `alicloud_cen_transit_router_route_table_association`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Resource:** `alicloud_cen_transit_router_route_table_propagation`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Resource:** `alicloud_cen_transit_router_route_entry`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Resource:** `alicloud_cen_transit_router_vbr_attachment`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Resource:** `alicloud_cen_transit_router_vpc_attachment`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Data Source:** `alicloud_amqp_virtual_hosts`([#3714](https://github.com/aliyun/terraform-provider-alicloud/issues/3714)) +- **New Data Source:** `alicloud_cen_transit_routers`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Data Source:** `alicloud_cen_transit_router_route_tables`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Data Source:** `alicloud_cen_transit_router_route_table_associations`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Data Source:** `alicloud_cen_transit_router_route_table_propagations`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Data Source:** `alicloud_cen_transit_router_route_entries`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Data Source:** `alicloud_cen_transit_router_vbr_attachments`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Data Source:** `alicloud_cen_transit_router_vpc_attachments`([#3706](https://github.com/aliyun/terraform-provider-alicloud/issues/3706)) +- **New Data Source:** `alicloud_log_projects`([#3691](https://github.com/aliyun/terraform-provider-alicloud/issues/3691)) +- **New Data Source:** `alicloud_log_stores`([#3691](https://github.com/aliyun/terraform-provider-alicloud/issues/3691)) +- **New Data Source:** `alicloud_event_bridge_service`([#3691](https://github.com/aliyun/terraform-provider-alicloud/issues/3691)) +- **New Data Source:** `alicloud_eip_addresses`([#3682](https://github.com/aliyun/terraform-provider-alicloud/issues/3682)) ENHANCEMENTS: -- resource/alicloud_mongodb_sharding_instance: The attribute shard_list supports to set readonly_replicas; Supports setting self-timeout ([#3718](https://github.com/aliyun/terraform-provider-alicloud/issues/3718)) -- resource/alicloud_db_instance:Adds new attributes such as upgrade_kernel_version_enabled, upgrade_time, switch_time and target_minor_version to support Update minor engine version. ([#3692](https://github.com/aliyun/terraform-provider-alicloud/issues/3692)) -- resource/alicloud_polardb_cluster: Enlarges the timeout after modifying the tde_status ([#3699](https://github.com/aliyun/terraform-provider-alicloud/issues/3699)) -- resource/alicloud_db_instance: Adds new attributes connection_string_prefix and port to support Modify db instance connection_string_prefix or port. ([#3703](https://github.com/aliyun/terraform-provider-alicloud/issues/3703)) -- resource/alicloud_db_account: Modify attribute account_name limited length to 2-63 for PostgreSQL. ([#3707](https://github.com/aliyun/terraform-provider-alicloud/issues/3707)) -- resource/alicloud_db_backup_policy: Adds instance status judgement, and call API ModifyBackupPolicy if the status is Running. ([#3708](https://github.com/aliyun/terraform-provider-alicloud/issues/3708)) -- resource/alicloud_gpdb_instance: Fixes the InvalidPayType error ([#3709](https://github.com/aliyun/terraform-provider-alicloud/issues/3709)) -- testcase: Improves the direct mail receivers testcase ([#3687](https://github.com/aliyun/terraform-provider-alicloud/issues/3687)) -- testcase: Improves the sweeper test to avoid unsupported region ([#3688](https://github.com/aliyun/terraform-provider-alicloud/issues/3688)) -- testcase: Limit test region with event bridge service. ([#3697](https://github.com/aliyun/terraform-provider-alicloud/issues/3697)) -- docs/alicloud_actiontrail_trail: Adds 'is_organization_trail' attribute description in the docs ([#3695](https://github.com/aliyun/terraform-provider-alicloud/issues/3695)) -- docs: Adds note for alicloud_polardb_cluster docs for ‘encrypt_new_tables’ ([#3702](https://github.com/aliyun/terraform-provider-alicloud/issues/3702)) -- client/bssopenapiClient: Improves the bss openapi endpoint to avoid the NotApplicable error; Fixes the alidns_instance setting domain_numbers failed issue ([#3713](https://github.com/aliyun/terraform-provider-alicloud/issues/3713)) +- resource/alicloud_mongodb_sharding_instance: The attribute shard_list supports to set readonly_replicas; Supports setting self-timeout([#3718](https://github.com/aliyun/terraform-provider-alicloud/issues/3718)) +- resource/alicloud_db_instance:Adds new attributes such as upgrade_kernel_version_enabled, upgrade_time, switch_time and target_minor_version to support Update minor engine version.([#3692](https://github.com/aliyun/terraform-provider-alicloud/issues/3692)) +- resource/alicloud_polardb_cluster: Enlarges the timeout after modifying the tde_status([#3699](https://github.com/aliyun/terraform-provider-alicloud/issues/3699)) +- resource/alicloud_db_instance: Adds new attributes connection_string_prefix and port to support Modify db instance connection_string_prefix or port.([#3703](https://github.com/aliyun/terraform-provider-alicloud/issues/3703)) +- resource/alicloud_db_account: Modify attribute account_name limited length to 2-63 for PostgreSQL.([#3707](https://github.com/aliyun/terraform-provider-alicloud/issues/3707)) +- resource/alicloud_db_backup_policy: Adds instance status judgement, and call API ModifyBackupPolicy if the status is Running.([#3708](https://github.com/aliyun/terraform-provider-alicloud/issues/3708)) +- resource/alicloud_gpdb_instance: Fixes the InvalidPayType error([#3709](https://github.com/aliyun/terraform-provider-alicloud/issues/3709)) +- testcase: Improves the direct mail receivers testcase([#3687](https://github.com/aliyun/terraform-provider-alicloud/issues/3687)) +- testcase: Improves the sweeper test to avoid unsupported region([#3688](https://github.com/aliyun/terraform-provider-alicloud/issues/3688)) +- testcase: Limit test region with event bridge service.([#3697](https://github.com/aliyun/terraform-provider-alicloud/issues/3697)) +- docs/alicloud_actiontrail_trail: Adds 'is_organization_trail' attribute description in the docs([#3695](https://github.com/aliyun/terraform-provider-alicloud/issues/3695)) +- docs: Adds note for alicloud_polardb_cluster docs for ‘encrypt_new_tables’([#3702](https://github.com/aliyun/terraform-provider-alicloud/issues/3702)) +- client/bssopenapiClient: Improves the bss openapi endpoint to avoid the NotApplicable error; Fixes the alidns_instance setting domain_numbers failed issue([#3713](https://github.com/aliyun/terraform-provider-alicloud/issues/3713)) BUG FIXES: -- resource/alicloud_mongodb_instance: Fixes the setting replication_factor failed error ([#3717](https://github.com/aliyun/terraform-provider-alicloud/issues/3717)) -- resource/alicloud_mongodb_instance: Fixes the ProxyError issue when invoking the DescribeMongoDBTDEInfo API ([#3716](https://github.com/aliyun/terraform-provider-alicloud/issues/3716)) -- testcase: Fixed the 'isp' filter bug for Eip Address. ([#3710](https://github.com/aliyun/terraform-provider-alicloud/issues/3710)) +- resource/alicloud_mongodb_instance: Fixes the setting replication_factor failed error([#3717](https://github.com/aliyun/terraform-provider-alicloud/issues/3717)) +- resource/alicloud_mongodb_instance: Fixes the ProxyError issue when invoking the DescribeMongoDBTDEInfo API([#3716](https://github.com/aliyun/terraform-provider-alicloud/issues/3716)) +- testcase: Fixed the 'isp' filter bug for Eip Address.([#3710](https://github.com/aliyun/terraform-provider-alicloud/issues/3710)) ## 1.125.0 (July 03, 2021) -- **New Resource:** `alicloud_direct_mail_receivers` ([#3684](https://github.com/aliyun/terraform-provider-alicloud/issues/3684)) -- **New Data Source:** `alicloud_direct_mail_receiverses` ([#3684](https://github.com/aliyun/terraform-provider-alicloud/issues/3684)) +- **New Resource:** `alicloud_direct_mail_receivers`([#3684](https://github.com/aliyun/terraform-provider-alicloud/issues/3684)) +- **New Data Source:** `alicloud_direct_mail_receiverses`([#3684](https://github.com/aliyun/terraform-provider-alicloud/issues/3684)) ENHANCEMENTS: -- resource/alicloud_log_audit: Adds a limitation that there does not allow the variable_map setting the key with suffix _policy_setting ([#3685](https://github.com/aliyun/terraform-provider-alicloud/issues/3685)) -- resource/alicloud_db_instance: Adds more attribute to support security_ips, including db_instance_ip_array_name, db_instance_ip_array_attribute , security_ip_type, whitelist_network_type, modify_mode ([#3662](https://github.com/aliyun/terraform-provider-alicloud/issues/3662)) -- resource/alicloud_db_instance: Adds new attribute private_ip_address and supports to change VPC or vSwitch ([#3676](https://github.com/aliyun/terraform-provider-alicloud/issues/3676)) -- resource/alicloud_ddoscoo_instance: Adds product_type to differ international and domestic accounts when managing instances ([#3679](https://github.com/aliyun/terraform-provider-alicloud/issues/3679)) -- provider: Adds new attribute client_read_timeout and client_connect_timeout to support setting self-define timeout ([#3677](https://github.com/aliyun/terraform-provider-alicloud/issues/3677)) -- resource/alicloud_elasticsearch_instance: Adds new attribute setting_config ([#3675](https://github.com/aliyun/terraform-provider-alicloud/issues/3675)) -- datasource/alicloud_resource_manager_accounts: Exports new attributes 'account_name'. ([#3681](https://github.com/aliyun/terraform-provider-alicloud/issues/3681)) -- testcase: Improves the direct mail receivers testcase ([#3687](https://github.com/aliyun/terraform-provider-alicloud/issues/3687)) +- resource/alicloud_log_audit: Adds a limitation that there does not allow the variable_map setting the key with suffix _policy_setting([#3685](https://github.com/aliyun/terraform-provider-alicloud/issues/3685)) +- resource/alicloud_db_instance: Adds more attribute to support security_ips, including db_instance_ip_array_name, db_instance_ip_array_attribute , security_ip_type, whitelist_network_type, modify_mode([#3662](https://github.com/aliyun/terraform-provider-alicloud/issues/3662)) +- resource/alicloud_db_instance: Adds new attribute private_ip_address and supports to change VPC or vSwitch([#3676](https://github.com/aliyun/terraform-provider-alicloud/issues/3676)) +- resource/alicloud_ddoscoo_instance: Adds product_type to differ international and domestic accounts when managing instances([#3679](https://github.com/aliyun/terraform-provider-alicloud/issues/3679)) +- provider: Adds new attribute client_read_timeout and client_connect_timeout to support setting self-define timeout([#3677](https://github.com/aliyun/terraform-provider-alicloud/issues/3677)) +- resource/alicloud_elasticsearch_instance: Adds new attribute setting_config([#3675](https://github.com/aliyun/terraform-provider-alicloud/issues/3675)) +- datasource/alicloud_resource_manager_accounts: Exports new attributes 'account_name'.([#3681](https://github.com/aliyun/terraform-provider-alicloud/issues/3681)) +- testcase: Improves the direct mail receivers testcase([#3687](https://github.com/aliyun/terraform-provider-alicloud/issues/3687)) BUG FIXES: -- resource/alicloud_log_audit: Fixes sls audit bug when setting the attribute multi_account ([#3678](https://github.com/aliyun/terraform-provider-alicloud/issues/3678)) -- resource/alicloud_cr_ee_instance: Fixes the error NotApplicable when creating and reading the resource ([#3680](https://github.com/aliyun/terraform-provider-alicloud/issues/3680)) -- resoure/alicloud_hbase_instance: Fixes the error "rpc error: code = Internal desc = grpc: error while marshaling: string field contains invalid UTF-8" when getting hbase instance ([#3683](https://github.com/aliyun/terraform-provider-alicloud/issues/3683)) +- resource/alicloud_log_audit: Fixes sls audit bug when setting the attribute multi_account([#3678](https://github.com/aliyun/terraform-provider-alicloud/issues/3678)) +- resource/alicloud_cr_ee_instance: Fixes the error NotApplicable when creating and reading the resource([#3680](https://github.com/aliyun/terraform-provider-alicloud/issues/3680)) +- resoure/alicloud_hbase_instance: Fixes the error "rpc error: code = Internal desc = grpc: error while marshaling: string field contains invalid UTF-8" when getting hbase instance([#3683](https://github.com/aliyun/terraform-provider-alicloud/issues/3683)) ## 1.124.4 (June 25, 2021) ENHANCEMENTS: -- docs: Modify the docs attribute available version ([#3670](https://github.com/aliyun/terraform-provider-alicloud/issues/3670)) -- resource/alicloud_kms_alias: Upgrades its dependence SDK ([#3647](https://github.com/aliyun/terraform-provider-alicloud/issues/3647)) -- resource/alicloud_kms_key_version: Upgrades its dependence SDK; Removes the computed attribute creation_date ([#3648](https://github.com/aliyun/terraform-provider-alicloud/issues/3648)) -- resource/alicloud_kms_ciphertext: Upgrades its dependence sdk; Improves the kms key testcases ([#3649](https://github.com/aliyun/terraform-provider-alicloud/issues/3649)) -- datasource/alicloud_kms_plaintext: Upgrades its dependence sdk ([#3650](https://github.com/aliyun/terraform-provider-alicloud/issues/3650)) -- datasource/alicloud_kms_secret_versions: Upgredes its dependence sdk ([#3653](https://github.com/aliyun/terraform-provider-alicloud/issues/3653)) -- resource/alicloud_kms_ciphertext: Upgrades its dependence sdk ([#3655](https://github.com/aliyun/terraform-provider-alicloud/issues/3655)) -- service_kms/Decrypt: Upgrades its dependence sdk; kms_service/SetResourceTags: Upgrades its dependence sdk; Removes the KMS go sdk ([#3656](https://github.com/aliyun/terraform-provider-alicloud/issues/3656)) -- resource/alicloud_db_instance: Adds several attributes to enable ssl, like ssl_enabled, ca_type , server_cert, client_ca_cert and so on ([#3615](https://github.com/aliyun/terraform-provider-alicloud/issues/3615)) -- resource/alicloud_eip: Adds new attribute deletion_protection to support deletion protection feature ([#3664](https://github.com/aliyun/terraform-provider-alicloud/issues/3664)) -- resource/alicloud_nat_gateway: Adds new attribute deletion_protection to support deletion protection feature ([#3665](https://github.com/aliyun/terraform-provider-alicloud/issues/3665)) -- resource/alicloud_common_bandwidth_package: Adds new attribute deletion_protection to support deletion protection feature ([#3666](https://github.com/aliyun/terraform-provider-alicloud/issues/3666)) +- docs: Modify the docs attribute available version([#3670](https://github.com/aliyun/terraform-provider-alicloud/issues/3670)) +- resource/alicloud_kms_alias: Upgrades its dependence SDK([#3647](https://github.com/aliyun/terraform-provider-alicloud/issues/3647)) +- resource/alicloud_kms_key_version: Upgrades its dependence SDK; Removes the computed attribute creation_date([#3648](https://github.com/aliyun/terraform-provider-alicloud/issues/3648)) +- resource/alicloud_kms_ciphertext: Upgrades its dependence sdk; Improves the kms key testcases([#3649](https://github.com/aliyun/terraform-provider-alicloud/issues/3649)) +- datasource/alicloud_kms_plaintext: Upgrades its dependence sdk([#3650](https://github.com/aliyun/terraform-provider-alicloud/issues/3650)) +- datasource/alicloud_kms_secret_versions: Upgredes its dependence sdk([#3653](https://github.com/aliyun/terraform-provider-alicloud/issues/3653)) +- resource/alicloud_kms_ciphertext: Upgrades its dependence sdk([#3655](https://github.com/aliyun/terraform-provider-alicloud/issues/3655)) +- service_kms/Decrypt: Upgrades its dependence sdk; kms_service/SetResourceTags: Upgrades its dependence sdk; Removes the KMS go sdk([#3656](https://github.com/aliyun/terraform-provider-alicloud/issues/3656)) +- resource/alicloud_db_instance: Adds several attributes to enable ssl, like ssl_enabled, ca_type , server_cert, client_ca_cert and so on([#3615](https://github.com/aliyun/terraform-provider-alicloud/issues/3615)) +- resource/alicloud_eip: Adds new attribute deletion_protection to support deletion protection feature([#3664](https://github.com/aliyun/terraform-provider-alicloud/issues/3664)) +- resource/alicloud_nat_gateway: Adds new attribute deletion_protection to support deletion protection feature([#3665](https://github.com/aliyun/terraform-provider-alicloud/issues/3665)) +- resource/alicloud_common_bandwidth_package: Adds new attribute deletion_protection to support deletion protection feature([#3666](https://github.com/aliyun/terraform-provider-alicloud/issues/3666)) BUG FIXES: -- testcase: Fixes the incorrect data type ([#3669](https://github.com/aliyun/terraform-provider-alicloud/issues/3669)) -- resource/alicloud_snat_entry: Fixes the concurrence issue which throwing the error OperationFailed.Throttling ([#3657](https://github.com/aliyun/terraform-provider-alicloud/issues/3657)) -- resource/alicloud_cr_ee_instance: Fixes the NotApplicable error for international site account ([#3651](https://github.com/aliyun/terraform-provider-alicloud/issues/3651)) -- resource/alicloud_emr_cluster: Fix emr cluster task scale up ([#3658](https://github.com/aliyun/terraform-provider-alicloud/issues/3658)) -- docs: Corrects the spelling error ([#3659](https://github.com/aliyun/terraform-provider-alicloud/issues/3659)) +- testcase: Fixes the incorrect data type([#3669](https://github.com/aliyun/terraform-provider-alicloud/issues/3669)) +- resource/alicloud_snat_entry: Fixes the concurrence issue which throwing the error OperationFailed.Throttling([#3657](https://github.com/aliyun/terraform-provider-alicloud/issues/3657)) +- resource/alicloud_cr_ee_instance: Fixes the NotApplicable error for international site account([#3651](https://github.com/aliyun/terraform-provider-alicloud/issues/3651)) +- resource/alicloud_emr_cluster: Fix emr cluster task scale up([#3658](https://github.com/aliyun/terraform-provider-alicloud/issues/3658)) +- docs: Corrects the spelling error([#3659](https://github.com/aliyun/terraform-provider-alicloud/issues/3659)) ## 1.124.3 (June 18, 2021) ENHANCEMENTS: -- resource/alicloud_log_audit: Returns the multi accounts while setting it into state ([#3637](https://github.com/aliyun/terraform-provider-alicloud/issues/3637)) -- resource/alicloud_ess_scalingconfiguration: Adds new attributes performance_level and system_disk_performance_level to support performance level ([#3632](https://github.com/aliyun/terraform-provider-alicloud/issues/3632)) -- resource/alicloud_polardb_cluster: Adds new attribute encrypt_new_tables ([#3630](https://github.com/aliyun/terraform-provider-alicloud/issues/3630)) -- datasource/alicloiud_db_instances: Outputs more attributes, like creator, delete_date, description, encryption_key, encryption_key_status and so on ([#3623](https://github.com/aliyun/terraform-provider-alicloud/issues/3623)) +- resource/alicloud_log_audit: Returns the multi accounts while setting it into state([#3637](https://github.com/aliyun/terraform-provider-alicloud/issues/3637)) +- resource/alicloud_ess_scalingconfiguration: Adds new attributes performance_level and system_disk_performance_level to support performance level([#3632](https://github.com/aliyun/terraform-provider-alicloud/issues/3632)) +- resource/alicloud_polardb_cluster: Adds new attribute encrypt_new_tables([#3630](https://github.com/aliyun/terraform-provider-alicloud/issues/3630)) +- datasource/alicloiud_db_instances: Outputs more attributes, like creator, delete_date, description, encryption_key, encryption_key_status and so on([#3623](https://github.com/aliyun/terraform-provider-alicloud/issues/3623)) BUG FIXES: -- resource/alicloud_mse_cluster: Corrects the attribute cluster_specification valid values ([#3644](https://github.com/aliyun/terraform-provider-alicloud/issues/3644)) -- resource/alicloud_resource_manager_account: Fixes import resoruce failed cause by 'payer_account_id' ([#3643](https://github.com/aliyun/terraform-provider-alicloud/issues/3643)) -- resource/alicloud_snat_entry: Fixes the UnknownError when creating a new snat entry by adding Idempotent and retry strategy ([#3639](https://github.com/aliyun/terraform-provider-alicloud/issues/3639)) -- resource/alicloud_db_instance: Fixes the OperationDenied.DBInstanceStatus error after modifying parameters; Improves some testcases ([#3638](https://github.com/aliyun/terraform-provider-alicloud/issues/3638)) -- resource/alicloud_db_readonly_instance: Fixes the OperationDenied.PrimaryDBInstanceStatus by adding retry when it happened ([#3635](https://github.com/aliyun/terraform-provider-alicloud/issues/3635)) -- resource/alicloud_oos_template: Fixes the tags diff bug caused by without ingore system tags ([#3634](https://github.com/aliyun/terraform-provider-alicloud/issues/3634)) -- docs: Corrects the mse_cluster docs error ([#3636](https://github.com/aliyun/terraform-provider-alicloud/issues/3636)) +- resource/alicloud_mse_cluster: Corrects the attribute cluster_specification valid values([#3644](https://github.com/aliyun/terraform-provider-alicloud/issues/3644)) +- resource/alicloud_resource_manager_account: Fixes import resoruce failed cause by 'payer_account_id'([#3643](https://github.com/aliyun/terraform-provider-alicloud/issues/3643)) +- resource/alicloud_snat_entry: Fixes the UnknownError when creating a new snat entry by adding Idempotent and retry strategy([#3639](https://github.com/aliyun/terraform-provider-alicloud/issues/3639)) +- resource/alicloud_db_instance: Fixes the OperationDenied.DBInstanceStatus error after modifying parameters; Improves some testcases([#3638](https://github.com/aliyun/terraform-provider-alicloud/issues/3638)) +- resource/alicloud_db_readonly_instance: Fixes the OperationDenied.PrimaryDBInstanceStatus by adding retry when it happened([#3635](https://github.com/aliyun/terraform-provider-alicloud/issues/3635)) +- resource/alicloud_oos_template: Fixes the tags diff bug caused by without ingore system tags([#3634](https://github.com/aliyun/terraform-provider-alicloud/issues/3634)) +- docs: Corrects the mse_cluster docs error([#3636](https://github.com/aliyun/terraform-provider-alicloud/issues/3636)) ## 1.124.2 (June 12, 2021) ENHANCEMENTS: -- docs: add note for alicloud_kvstore_instance ssl_enable and correct the alicloud_mse_cluster net_type valid values ([#3619](https://github.com/aliyun/terraform-provider-alicloud/issues/3619)) +- docs: add note for alicloud_kvstore_instance ssl_enable and correct the alicloud_mse_cluster net_type valid values([#3619](https://github.com/aliyun/terraform-provider-alicloud/issues/3619)) BUG FIXES: -- resource/alicloud_network_acl: Fixes the entries sort error because of the sort means priority ([#3627](https://github.com/aliyun/terraform-provider-alicloud/issues/3627)) -- resource/alicloud_kms_secret: Fixes the Forbidden.ResourceNotFound error when deleting ([#3626](https://github.com/aliyun/terraform-provider-alicloud/issues/3626)) -- resource/alicloud_ecs_disk: Fixes the creating disk error cause by ModifyDiskChargeType; Fixes the diff bug when category is cloud_essd ([#3625](https://github.com/aliyun/terraform-provider-alicloud/issues/3625)) -- resource/alicloud_elasitcsearch_instance: Fixes the enable_kibana_private_network is not effect error when the first creation. ([#3622](https://github.com/aliyun/terraform-provider-alicloud/issues/3622)) -- resource/alicloud_network_acl: Fixes deleting the acl failed cause by there exists bound resources. ([#3620](https://github.com/aliyun/terraform-provider-alicloud/issues/3620)) -- resource/alicloud_instance: Fixes setting tags failed bug when the tag count is more than 10 ([#3618](https://github.com/aliyun/terraform-provider-alicloud/issues/3618)) +- resource/alicloud_network_acl: Fixes the entries sort error because of the sort means priority([#3627](https://github.com/aliyun/terraform-provider-alicloud/issues/3627)) +- resource/alicloud_kms_secret: Fixes the Forbidden.ResourceNotFound error when deleting([#3626](https://github.com/aliyun/terraform-provider-alicloud/issues/3626)) +- resource/alicloud_ecs_disk: Fixes the creating disk error cause by ModifyDiskChargeType; Fixes the diff bug when category is cloud_essd([#3625](https://github.com/aliyun/terraform-provider-alicloud/issues/3625)) +- resource/alicloud_elasitcsearch_instance: Fixes the enable_kibana_private_network is not effect error when the first creation.([#3622](https://github.com/aliyun/terraform-provider-alicloud/issues/3622)) +- resource/alicloud_network_acl: Fixes deleting the acl failed cause by there exists bound resources.([#3620](https://github.com/aliyun/terraform-provider-alicloud/issues/3620)) +- resource/alicloud_instance: Fixes setting tags failed bug when the tag count is more than 10([#3618](https://github.com/aliyun/terraform-provider-alicloud/issues/3618)) ## 1.124.1 (June 5, 2021) ENHANCEMENTS: -- ci: Adds ci test for OOS and Eci resources and data sources ([#3611](https://github.com/aliyun/terraform-provider-alicloud/issues/3611)) -- resource/alicloud_pvtz_zone_record: Fixes the 'record_id' diff error caused by using the incorrect type ([#3610](https://github.com/aliyun/terraform-provider-alicloud/issues/3610)) -- docs: Improve the docs ([#3609](https://github.com/aliyun/terraform-provider-alicloud/issues/3609)) -- resource/alicloud_slb_server_group: Adds Computed for the attribute servers to meet scenario when using resource alicloud_ess_scalinggroup_vserver_groups ([#3607](https://github.com/aliyun/terraform-provider-alicloud/issues/3607)) -- resource/alicloud_kms_key: Adds limitation for pending_window_in_days when deprecating the deletion_window_in_days ([#3594](https://github.com/aliyun/terraform-provider-alicloud/issues/3594)) -- resource/alicloud_config_aggregate_config_rule: Adds DiffSuppressFunc for 'maximum_execution_frequency' ([#3592](https://github.com/aliyun/terraform-provider-alicloud/issues/3592)) -- resource/alicloud_cms_alarm: Adds statistics more valid values: Value, Sum, Count ([#3274](https://github.com/aliyun/terraform-provider-alicloud/issues/3274)) -- resource/alicloud_db_instance: Adds ssl related attributes, like ca_type, server_cert, server_key, client_ca_cert, client_crl_enabled, client_cert_revocation_list, acl, replication_acl ([#3573](https://github.com/aliyun/terraform-provider-alicloud/issues/3573)) +- ci: Adds ci test for OOS and Eci resources and data sources([#3611](https://github.com/aliyun/terraform-provider-alicloud/issues/3611)) +- resource/alicloud_pvtz_zone_record: Fixes the 'record_id' diff error caused by using the incorrect type([#3610](https://github.com/aliyun/terraform-provider-alicloud/issues/3610)) +- docs: Improve the docs([#3609](https://github.com/aliyun/terraform-provider-alicloud/issues/3609)) +- resource/alicloud_slb_server_group: Adds Computed for the attribute servers to meet scenario when using resource alicloud_ess_scalinggroup_vserver_groups([#3607](https://github.com/aliyun/terraform-provider-alicloud/issues/3607)) +- resource/alicloud_kms_key: Adds limitation for pending_window_in_days when deprecating the deletion_window_in_days([#3594](https://github.com/aliyun/terraform-provider-alicloud/issues/3594)) +- resource/alicloud_config_aggregate_config_rule: Adds DiffSuppressFunc for 'maximum_execution_frequency'([#3592](https://github.com/aliyun/terraform-provider-alicloud/issues/3592)) +- resource/alicloud_cms_alarm: Adds statistics more valid values: Value, Sum, Count([#3274](https://github.com/aliyun/terraform-provider-alicloud/issues/3274)) +- resource/alicloud_db_instance: Adds ssl related attributes, like ca_type, server_cert, server_key, client_ca_cert, client_crl_enabled, client_cert_revocation_list, acl, replication_acl([#3573](https://github.com/aliyun/terraform-provider-alicloud/issues/3573)) BUG FIXES: -- resource/alicloud_network_acl: Fixes attributes diff caused by 'resources' ([#3597](https://github.com/aliyun/terraform-provider-alicloud/issues/3597)) -- resource/alicloud_api_gateway_api: Fixes the bug (issues #2276) when setting the attribute constant_parameters ([#3605](https://github.com/aliyun/terraform-provider-alicloud/issues/3605)) -- resource/alicloud_network_acl: Fixes destroy resource failed caused by 'resources' ([#3601](https://github.com/aliyun/terraform-provider-alicloud/issues/3601)) -- resource/alicloud_log_audit:Fixes log audit bug when setting multi_account; Adds missing domain when invoking the request ([#3595](https://github.com/aliyun/terraform-provider-alicloud/issues/3595)) -- resource/alicloud_slb_load_balancer: Fixes create the payasyougo instance failed caused by 'instance_charge_type' ([#3598](https://github.com/aliyun/terraform-provider-alicloud/issues/3598)) -- resource/alicloud_alidns_instance: Sets renew_period renew_status to state; Fixes force replacement bug because there is no API can return; Upgrades its dependence SDK ([#3599](https://github.com/aliyun/terraform-provider-alicloud/issues/3599)) -- resource/alicloud_kvstore_instance: Converts auto_renew attribute to bool before saving ([#3065](https://github.com/aliyun/terraform-provider-alicloud/issues/3065)) +- resource/alicloud_network_acl: Fixes attributes diff caused by 'resources'([#3597](https://github.com/aliyun/terraform-provider-alicloud/issues/3597)) +- resource/alicloud_api_gateway_api: Fixes the bug (issues #2276) when setting the attribute constant_parameters([#3605](https://github.com/aliyun/terraform-provider-alicloud/issues/3605)) +- resource/alicloud_network_acl: Fixes destroy resource failed caused by 'resources'([#3601](https://github.com/aliyun/terraform-provider-alicloud/issues/3601)) +- resource/alicloud_log_audit:Fixes log audit bug when setting multi_account; Adds missing domain when invoking the request([#3595](https://github.com/aliyun/terraform-provider-alicloud/issues/3595)) +- resource/alicloud_slb_load_balancer: Fixes create the payasyougo instance failed caused by 'instance_charge_type'([#3598](https://github.com/aliyun/terraform-provider-alicloud/issues/3598)) +- resource/alicloud_alidns_instance: Sets renew_period renew_status to state; Fixes force replacement bug because there is no API can return; Upgrades its dependence SDK([#3599](https://github.com/aliyun/terraform-provider-alicloud/issues/3599)) +- resource/alicloud_kvstore_instance: Converts auto_renew attribute to bool before saving([#3065](https://github.com/aliyun/terraform-provider-alicloud/issues/3065)) ## 1.124.0 (May 29, 2021) -- **New Resource:** `alicloud_config_aggregate_config_rule` ([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) -- **New Resource:** `alicloud_config_aggregate_compliance_pack` ([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) -- **New Resource:** `alicloud_config_compliance_pack` ([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) -- **New Resource:** `alicloud_config_aggregator` ([#3567](https://github.com/aliyun/terraform-provider-alicloud/issues/3567)) -- **New Resource:** `alicloud_cr_ee_instance` ([#3560](https://github.com/aliyun/terraform-provider-alicloud/issues/3560)) -- **New Data Source:** `alicloud_config_aggregate_config_rules` ([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) -- **New Data Source:** `alicloud_config_aggregate_compliance_packs` ([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) -- **New Data Source:** `alicloud_config_compliance_packs` ([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) -- **New Data Source:** `alicloud_config_aggregators` ([#3567](https://github.com/aliyun/terraform-provider-alicloud/issues/3567)) +- **New Resource:** `alicloud_config_aggregate_config_rule`([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) +- **New Resource:** `alicloud_config_aggregate_compliance_pack`([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) +- **New Resource:** `alicloud_config_compliance_pack`([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) +- **New Resource:** `alicloud_config_aggregator`([#3567](https://github.com/aliyun/terraform-provider-alicloud/issues/3567)) +- **New Resource:** `alicloud_cr_ee_instance`([#3560](https://github.com/aliyun/terraform-provider-alicloud/issues/3560)) +- **New Data Source:** `alicloud_config_aggregate_config_rules`([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) +- **New Data Source:** `alicloud_config_aggregate_compliance_packs`([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) +- **New Data Source:** `alicloud_config_compliance_packs`([#3561](https://github.com/aliyun/terraform-provider-alicloud/issues/3561)) +- **New Data Source:** `alicloud_config_aggregators`([#3567](https://github.com/aliyun/terraform-provider-alicloud/issues/3567)) ENHANCEMENTS: -- resource/alicloud_kms_key: Adds limitation for pending_window_in_days when deprecating the deletion_window_in_days ([#3594](https://github.com/aliyun/terraform-provider-alicloud/issues/3594)) +- resource/alicloud_kms_key: Adds limitation for pending_window_in_days when deprecating the deletion_window_in_days([#3594](https://github.com/aliyun/terraform-provider-alicloud/issues/3594)) - resource/alicloud_config_aggregate_config_rule: Adds DiffSuppressFunc for 'maximum_execution_frequency' for 'maximum_execution_frequency' (([#3592](https://github.com/aliyun/terraform-provider-alicloud/issues/3592))) -- resource/aliclous_kvstore_instance: support change private connection port ([#3587](https://github.com/aliyun/terraform-provider-alicloud/issues/3587)) -- resource/alicloud_polardb_cluster: supports transform pay_type; add modify db_node_class and renewal_status asynchronous waiting; add PrePaid cluster can not be release. ([#3586](https://github.com/aliyun/terraform-provider-alicloud/issues/3586)) -- resource/alicloud_fc_function: Enlarges the attribute memory_size max value to 32768 ([#3589](https://github.com/aliyun/terraform-provider-alicloud/issues/3589)) -- resource/alicloud_elasticsearch_instance: Upgrades its dependence sdk ([#3568](https://github.com/aliyun/terraform-provider-alicloud/issues/3568)) -- resource/alicloud_network_acl: Support attributes 'resources' for network ACL. ([#3575](https://github.com/aliyun/terraform-provider-alicloud/issues/3575)) -- resource/alicloud_network_acl_attachment: Deprecated from version 1.124.0. ([#3575](https://github.com/aliyun/terraform-provider-alicloud/issues/3575)) -- resource/alicloud_kms_secret: Adds new attributes enable_automatic_rotation and rotation_interval; Upgrades its dependence sdk ([#3574](https://github.com/aliyun/terraform-provider-alicloud/issues/3574)) -- resource/alicloud_log_store: Adds new attribute encrypt_conf to support encrypt logstore ([#3576](https://github.com/aliyun/terraform-provider-alicloud/issues/3576)) -- datasource/alicloud_ots_service: Adds support for auto-retry when happened the timeout; docs: Update the next version to 1.123.1 ([#3569](https://github.com/aliyun/terraform-provider-alicloud/issues/3569)) -- docs: Updates alicloud_fc_function max memory_size to 32768 ([#3590](https://github.com/aliyun/terraform-provider-alicloud/issues/3590)) -- docs: Update ACK resources and datasources subcategory ([#3577](https://github.com/aliyun/terraform-provider-alicloud/issues/3577)) -- testcase: Add param pending_window_in_days to fix alicloud_kms_secret test error. ([#3585](https://github.com/aliyun/terraform-provider-alicloud/issues/3585)) -- testcase: Improves the elasitcsearch instance testcase ([#3572](https://github.com/aliyun/terraform-provider-alicloud/issues/3572)) -- ci: Removes the usless jobs and change job task go verion to 12 to avoid download dependence always ([#3571](https://github.com/aliyun/terraform-provider-alicloud/issues/3571)) - -BUG FIXES: - -- resource/alicloud_vpc: Fixes force replacement bug caused by 'enable_ipv6' ([#3581](https://github.com/aliyun/terraform-provider-alicloud/issues/3581)) -- resource/alicloud_mongodb_instance: Fixes the parsing replication_factor error when it is empty ([#3570](https://github.com/aliyun/terraform-provider-alicloud/issues/3570)) -- testcase: Fixes the sweeper test error caused by new resource ecs_network_interface ([#3578](https://github.com/aliyun/terraform-provider-alicloud/issues/3578)) -- testcase: Fixes the ecs_network_interface sweeper testcase bug ([#3583](https://github.com/aliyun/terraform-provider-alicloud/issues/3583)) +- resource/aliclous_kvstore_instance: support change private connection port([#3587](https://github.com/aliyun/terraform-provider-alicloud/issues/3587)) +- resource/alicloud_polardb_cluster: supports transform pay_type; add modify db_node_class and renewal_status asynchronous waiting; add PrePaid cluster can not be release.([#3586](https://github.com/aliyun/terraform-provider-alicloud/issues/3586)) +- resource/alicloud_fc_function: Enlarges the attribute memory_size max value to 32768([#3589](https://github.com/aliyun/terraform-provider-alicloud/issues/3589)) +- resource/alicloud_elasticsearch_instance: Upgrades its dependence sdk([#3568](https://github.com/aliyun/terraform-provider-alicloud/issues/3568)) +- resource/alicloud_network_acl: Support attributes 'resources' for network ACL.([#3575](https://github.com/aliyun/terraform-provider-alicloud/issues/3575)) +- resource/alicloud_network_acl_attachment: Deprecated from version 1.124.0.([#3575](https://github.com/aliyun/terraform-provider-alicloud/issues/3575)) +- resource/alicloud_kms_secret: Adds new attributes enable_automatic_rotation and rotation_interval; Upgrades its dependence sdk([#3574](https://github.com/aliyun/terraform-provider-alicloud/issues/3574)) +- resource/alicloud_log_store: Adds new attribute encrypt_conf to support encrypt logstore([#3576](https://github.com/aliyun/terraform-provider-alicloud/issues/3576)) +- datasource/alicloud_ots_service: Adds support for auto-retry when happened the timeout; docs: Update the next version to 1.123.1([#3569](https://github.com/aliyun/terraform-provider-alicloud/issues/3569)) +- docs: Updates alicloud_fc_function max memory_size to 32768([#3590](https://github.com/aliyun/terraform-provider-alicloud/issues/3590)) +- docs: Update ACK resources and datasources subcategory([#3577](https://github.com/aliyun/terraform-provider-alicloud/issues/3577)) +- testcase: Add param pending_window_in_days to fix alicloud_kms_secret test error.([#3585](https://github.com/aliyun/terraform-provider-alicloud/issues/3585)) +- testcase: Improves the elasitcsearch instance testcase([#3572](https://github.com/aliyun/terraform-provider-alicloud/issues/3572)) +- ci: Removes the usless jobs and change job task go verion to 12 to avoid download dependence always([#3571](https://github.com/aliyun/terraform-provider-alicloud/issues/3571)) + +BUG FIXES: + +- resource/alicloud_vpc: Fixes force replacement bug caused by 'enable_ipv6'([#3581](https://github.com/aliyun/terraform-provider-alicloud/issues/3581)) +- resource/alicloud_mongodb_instance: Fixes the parsing replication_factor error when it is empty([#3570](https://github.com/aliyun/terraform-provider-alicloud/issues/3570)) +- testcase: Fixes the sweeper test error caused by new resource ecs_network_interface([#3578](https://github.com/aliyun/terraform-provider-alicloud/issues/3578)) +- testcase: Fixes the ecs_network_interface sweeper testcase bug([#3583](https://github.com/aliyun/terraform-provider-alicloud/issues/3583)) ## 1.123.1 (May 22, 2021) ENHANCEMENTS: -- resource/alicloud_mongodb_instance: Fixes the parsing replication_factor error when it is empty ([#3570](https://github.com/aliyun/terraform-provider-alicloud/issues/3570)) -- resource/alicloud_cs_kubernetes_nood_pool: Adds supports to create spot instance, set public IP and resource_group_id; resource/alicloud_cs_serverless_kubernetes: Support to set coredns as service discovery, time zone and sls log config; resource/alicloud_cs_managed_kubernetes: Fixes the bug that upgrades the cluster after creating it. ([#3558](https://github.com/aliyun/terraform-provider-alicloud/issues/3558)) -- resource/alicloud_ecs_dedicated_host: Adds new attributes cpu_over_commit_ratio, dedicated_host_cluster_id and min_quantity; Its datasource adds new attributes operation_locks; Updates its dependence SDK ([#3548](https://github.com/aliyun/terraform-provider-alicloud/issues/3548)) -- resource/alicloud_kms_key: Deprecates the key_state and use status instead; Its datasource supports filters and more output attributes; Upgrades its dependence sdk ([#3555](https://github.com/aliyun/terraform-provider-alicloud/issues/3555)) -- docs: Updates the ACK code in the docs ([#3547](https://github.com/aliyun/terraform-provider-alicloud/issues/3547)) -- docs: Rename Server Load Balancer(SLB) to Classic Load Balancer(CLB) ([#3556](https://github.com/aliyun/terraform-provider-alicloud/issues/3556)) -- ci: Adds the color output when running the test ([#3544](https://github.com/aliyun/terraform-provider-alicloud/issues/3544)) +- resource/alicloud_mongodb_instance: Fixes the parsing replication_factor error when it is empty([#3570](https://github.com/aliyun/terraform-provider-alicloud/issues/3570)) +- resource/alicloud_cs_kubernetes_nood_pool: Adds supports to create spot instance, set public IP and resource_group_id; resource/alicloud_cs_serverless_kubernetes: Support to set coredns as service discovery, time zone and sls log config; resource/alicloud_cs_managed_kubernetes: Fixes the bug that upgrades the cluster after creating it.([#3558](https://github.com/aliyun/terraform-provider-alicloud/issues/3558)) +- resource/alicloud_ecs_dedicated_host: Adds new attributes cpu_over_commit_ratio, dedicated_host_cluster_id and min_quantity; Its datasource adds new attributes operation_locks; Updates its dependence SDK([#3548](https://github.com/aliyun/terraform-provider-alicloud/issues/3548)) +- resource/alicloud_kms_key: Deprecates the key_state and use status instead; Its datasource supports filters and more output attributes; Upgrades its dependence sdk([#3555](https://github.com/aliyun/terraform-provider-alicloud/issues/3555)) +- docs: Updates the ACK code in the docs([#3547](https://github.com/aliyun/terraform-provider-alicloud/issues/3547)) +- docs: Rename Server Load Balancer(SLB) to Classic Load Balancer(CLB)([#3556](https://github.com/aliyun/terraform-provider-alicloud/issues/3556)) +- ci: Adds the color output when running the test([#3544](https://github.com/aliyun/terraform-provider-alicloud/issues/3544)) BUG FIXES: -- datasource/alicloud_ram_groups: Fixes the crash bug that parsing failed; datasource/alicloud_ram_roles: Fixes the fetching failed when the role is too many; resource/alicloud_ram_login_profile: Fixes the deleting error EntityNotExist.User ([#3543](https://github.com/aliyun/terraform-provider-alicloud/issues/3543)) -- datasource/alicloud_ecs_disks: Add judgment to assertion ([#3553](https://github.com/aliyun/terraform-provider-alicloud/issues/3553)) -- testcase: remove import check from alicloud_ecs_network_interface multi testcase and sweep skip resource not has name ([#3545](https://github.com/aliyun/terraform-provider-alicloud/issues/3545)) -- testcase: skip unsupport region for alicloud_kms_key ([#3564](https://github.com/aliyun/terraform-provider-alicloud/issues/3564)) -- testcase: Fix deprecated field for slb listener testcase ([#3562](https://github.com/aliyun/terraform-provider-alicloud/issues/3562)) +- datasource/alicloud_ram_groups: Fixes the crash bug that parsing failed; datasource/alicloud_ram_roles: Fixes the fetching failed when the role is too many; resource/alicloud_ram_login_profile: Fixes the deleting error EntityNotExist.User([#3543](https://github.com/aliyun/terraform-provider-alicloud/issues/3543)) +- datasource/alicloud_ecs_disks: Add judgment to assertion([#3553](https://github.com/aliyun/terraform-provider-alicloud/issues/3553)) +- testcase: remove import check from alicloud_ecs_network_interface multi testcase and sweep skip resource not has name([#3545](https://github.com/aliyun/terraform-provider-alicloud/issues/3545)) +- testcase: skip unsupport region for alicloud_kms_key([#3564](https://github.com/aliyun/terraform-provider-alicloud/issues/3564)) +- testcase: Fix deprecated field for slb listener testcase([#3562](https://github.com/aliyun/terraform-provider-alicloud/issues/3562)) ## 1.123.0 (May 14, 2021) -- **New Resource:** `alicloud_ddoscoo_domain_resource` ([#3530](https://github.com/aliyun/terraform-provider-alicloud/issues/3530)) -- **New Resource:** `alicloud_ddoscoo_port` ([#3530](https://github.com/aliyun/terraform-provider-alicloud/issues/3530)) -- **New Data Source:** `alicloud_ddoscoo_domain_resources` ([#3530](https://github.com/aliyun/terraform-provider-alicloud/issues/3530)) -- **New Data Source:** `alicloud_ddoscoo_ports` ([#3530](https://github.com/aliyun/terraform-provider-alicloud/issues/3530)) +- **New Resource:** `alicloud_ddoscoo_domain_resource`([#3530](https://github.com/aliyun/terraform-provider-alicloud/issues/3530)) +- **New Resource:** `alicloud_ddoscoo_port`([#3530](https://github.com/aliyun/terraform-provider-alicloud/issues/3530)) +- **New Data Source:** `alicloud_ddoscoo_domain_resources`([#3530](https://github.com/aliyun/terraform-provider-alicloud/issues/3530)) +- **New Data Source:** `alicloud_ddoscoo_ports`([#3530](https://github.com/aliyun/terraform-provider-alicloud/issues/3530)) ENHANCEMENTS: -- resource/alicloud_vpc: Improves the vpc attribute limitation by adding ConflictWith for enable_ipv6 and cidr_block ([#3535](https://github.com/aliyun/terraform-provider-alicloud/issues/3535)) -- resource/alicloud_mongodb_instance: Reset replicationFactor to replication_factor when setting iinto state ([#3537](https://github.com/aliyun/terraform-provider-alicloud/issues/3537)) -- resource/alicloud_db_instance: encryption_key supports SqlServer ([#3538](https://github.com/aliyun/terraform-provider-alicloud/issues/3538)) -- resource/alicloud_alikafka_topic: Enlarges the partition_num limitation to 360 and adds more supported regions statement in docs ([#3539](https://github.com/aliyun/terraform-provider-alicloud/issues/3539)) -- testcast: Adds ddoscoo support region ([#3536](https://github.com/aliyun/terraform-provider-alicloud/issues/3536)) -- ci: Improves the ci task to output test result coverage ([#3541](https://github.com/aliyun/terraform-provider-alicloud/issues/3541)) +- resource/alicloud_vpc: Improves the vpc attribute limitation by adding ConflictWith for enable_ipv6 and cidr_block([#3535](https://github.com/aliyun/terraform-provider-alicloud/issues/3535)) +- resource/alicloud_mongodb_instance: Reset replicationFactor to replication_factor when setting iinto state([#3537](https://github.com/aliyun/terraform-provider-alicloud/issues/3537)) +- resource/alicloud_db_instance: encryption_key supports SqlServer([#3538](https://github.com/aliyun/terraform-provider-alicloud/issues/3538)) +- resource/alicloud_alikafka_topic: Enlarges the partition_num limitation to 360 and adds more supported regions statement in docs([#3539](https://github.com/aliyun/terraform-provider-alicloud/issues/3539)) +- testcast: Adds ddoscoo support region([#3536](https://github.com/aliyun/terraform-provider-alicloud/issues/3536)) +- ci: Improves the ci task to output test result coverage([#3541](https://github.com/aliyun/terraform-provider-alicloud/issues/3541)) BUG FIXES: -- resource/alicloud_log_oss_shipper: Fixes the AK not exist error when using sts ([#3528](https://github.com/aliyun/terraform-provider-alicloud/issues/3528)) -- resource/alicloud_fc_trigger: Removes the empty payload to fix the diff error ([#3531](https://github.com/aliyun/terraform-provider-alicloud/issues/3531)) -- resource/alicloud_mongodb_instance: Fixes describeing tde status bug when db instance type is single ([#3533](https://github.com/aliyun/terraform-provider-alicloud/issues/3533)) -- resource/alicloud_slb_server_group: Removes the attribute servers Computed to fix the diff bug when there is no any server ids ([#3540](https://github.com/aliyun/terraform-provider-alicloud/issues/3540)) -- datasource/alicloud_vpcs: Fixes the vpc datasource bug while invoking the DescribeRouteTableList ([#3529](https://github.com/aliyun/terraform-provider-alicloud/issues/3529)) +- resource/alicloud_log_oss_shipper: Fixes the AK not exist error when using sts([#3528](https://github.com/aliyun/terraform-provider-alicloud/issues/3528)) +- resource/alicloud_fc_trigger: Removes the empty payload to fix the diff error([#3531](https://github.com/aliyun/terraform-provider-alicloud/issues/3531)) +- resource/alicloud_mongodb_instance: Fixes describeing tde status bug when db instance type is single([#3533](https://github.com/aliyun/terraform-provider-alicloud/issues/3533)) +- resource/alicloud_slb_server_group: Removes the attribute servers Computed to fix the diff bug when there is no any server ids([#3540](https://github.com/aliyun/terraform-provider-alicloud/issues/3540)) +- datasource/alicloud_vpcs: Fixes the vpc datasource bug while invoking the DescribeRouteTableList([#3529](https://github.com/aliyun/terraform-provider-alicloud/issues/3529)) ## 1.122.1 (May 8, 2021) ENHANCEMENTS: -- resource/alicloud_kvstore_instance: Fixes the attribute config does not affect bug when creating a new resource ([#3523](https://github.com/aliyun/terraform-provider-alicloud/issues/3523)) -- resource/alicloud_ecs_disk: delete param type default ​​and enumerated values ([#3522](https://github.com/aliyun/terraform-provider-alicloud/issues/3522)) -- resource/alicloud_rds_account: add validFunc for param account name ([#3527](https://github.com/aliyun/terraform-provider-alicloud/issues/3527)) -- datasource: use Compile replace MustComplile, Catch the error ([#3524](https://github.com/aliyun/terraform-provider-alicloud/issues/3524)) -- testcase: Fixes the polardb cluster resource and datasource testcase ([#3526](https://github.com/aliyun/terraform-provider-alicloud/issues/3526)) -- docs: Improves the cs_kubernetes docs ([#3512](https://github.com/aliyun/terraform-provider-alicloud/issues/3512)) -- docs: update alidns_domain ([#3519](https://github.com/aliyun/terraform-provider-alicloud/issues/3519)) -- readme: Adds supported version statement ([#3513](https://github.com/aliyun/terraform-provider-alicloud/issues/3513)) -- ci: Adds compatible test for the provider ([#3514](https://github.com/aliyun/terraform-provider-alicloud/issues/3514)) -- examples: Removes the useless examples and replaces the deprecated attributes ([#3515](https://github.com/aliyun/terraform-provider-alicloud/issues/3515)) +- resource/alicloud_kvstore_instance: Fixes the attribute config does not affect bug when creating a new resource([#3523](https://github.com/aliyun/terraform-provider-alicloud/issues/3523)) +- resource/alicloud_ecs_disk: delete param type default ​​and enumerated values([#3522](https://github.com/aliyun/terraform-provider-alicloud/issues/3522)) +- resource/alicloud_rds_account: add validFunc for param account name([#3527](https://github.com/aliyun/terraform-provider-alicloud/issues/3527)) +- datasource: use Compile replace MustComplile, Catch the error([#3524](https://github.com/aliyun/terraform-provider-alicloud/issues/3524)) +- testcase: Fixes the polardb cluster resource and datasource testcase([#3526](https://github.com/aliyun/terraform-provider-alicloud/issues/3526)) +- docs: Improves the cs_kubernetes docs([#3512](https://github.com/aliyun/terraform-provider-alicloud/issues/3512)) +- docs: update alidns_domain([#3519](https://github.com/aliyun/terraform-provider-alicloud/issues/3519)) +- readme: Adds supported version statement([#3513](https://github.com/aliyun/terraform-provider-alicloud/issues/3513)) +- ci: Adds compatible test for the provider([#3514](https://github.com/aliyun/terraform-provider-alicloud/issues/3514)) +- examples: Removes the useless examples and replaces the deprecated attributes([#3515](https://github.com/aliyun/terraform-provider-alicloud/issues/3515)) ## 1.122.0 (April 30, 2021) -- **New Resource:** `alicloud_auto_snapshot_policy_attachment` ([#3503](https://github.com/aliyun/terraform-provider-alicloud/issues/3503)) -- **New Resource:** `alicloud_cs_kubernetes_permission` ([#3495](https://github.com/aliyun/terraform-provider-alicloud/issues/3495)) -- **New Resource:** `alicloud_ecs_disk` ([#3443](https://github.com/aliyun/terraform-provider-alicloud/issues/3443)) -- **New Data Source:** `alicloud_cs_kubernetes_permissions` ([#3495](https://github.com/aliyun/terraform-provider-alicloud/issues/3495)) -- **New Data Source:** `alicloud_vpc_flow_log` ([#3477](https://github.com/aliyun/terraform-provider-alicloud/issues/3477)) +- **New Resource:** `alicloud_auto_snapshot_policy_attachment`([#3503](https://github.com/aliyun/terraform-provider-alicloud/issues/3503)) +- **New Resource:** `alicloud_cs_kubernetes_permission`([#3495](https://github.com/aliyun/terraform-provider-alicloud/issues/3495)) +- **New Resource:** `alicloud_ecs_disk`([#3443](https://github.com/aliyun/terraform-provider-alicloud/issues/3443)) +- **New Data Source:** `alicloud_cs_kubernetes_permissions`([#3495](https://github.com/aliyun/terraform-provider-alicloud/issues/3495)) +- **New Data Source:** `alicloud_vpc_flow_log`([#3477](https://github.com/aliyun/terraform-provider-alicloud/issues/3477)) ENHANCEMENTS: -- resource/alicloud_network_acl: Supports setting timeout; Adds new attributes status, ingress acl entries and egress acl entries; Upgrades its dependence SDK; Adds its datasource ([#3444](https://github.com/aliyun/terraform-provider-alicloud/issues/3444)) -- resource/alicloud_disk: Renames alicloud_disk to alicloud_ecs_disk; Deprecates the name and use disk_name instead; Adds more attribute, like payment_type, encrypt_algorithm, auto_snapshot and so on; Upgrades the its dependence sdk ([#3443](https://github.com/aliyun/terraform-provider-alicloud/issues/3443)) -- testcase: Improves the image and instance testcases ([#3510](https://github.com/aliyun/terraform-provider-alicloud/issues/3510)) -- testcase: Improves the instance testcases ([#3504](https://github.com/aliyun/terraform-provider-alicloud/issues/3504)) -- testcase: Improves the ess scaling testcase and trigger job ([#3502](https://github.com/aliyun/terraform-provider-alicloud/issues/3502)) -- testcase: Improves the sweeper testcase ([#3498](https://github.com/aliyun/terraform-provider-alicloud/issues/3498)) -- testcase: Improves resource alicloud_instance testcase for attribute data_disks ([#3497](https://github.com/aliyun/terraform-provider-alicloud/issues/3497)) -- testcase: Fixes the has deprecated attribute ([#3496](https://github.com/aliyun/terraform-provider-alicloud/issues/3496)) -- testcase: Improves the testcase of scaling configurations and manager policy ([#3494](https://github.com/aliyun/terraform-provider-alicloud/issues/3494)) -- docs: Fixes TSDB instance document error ([#3500](https://github.com/aliyun/terraform-provider-alicloud/issues/3500)) -- ci: Improves the ci test in parsing func methods ([#3492](https://github.com/aliyun/terraform-provider-alicloud/issues/3492)) +- resource/alicloud_network_acl: Supports setting timeout; Adds new attributes status, ingress acl entries and egress acl entries; Upgrades its dependence SDK; Adds its datasource([#3444](https://github.com/aliyun/terraform-provider-alicloud/issues/3444)) +- resource/alicloud_disk: Renames alicloud_disk to alicloud_ecs_disk; Deprecates the name and use disk_name instead; Adds more attribute, like payment_type, encrypt_algorithm, auto_snapshot and so on; Upgrades the its dependence sdk([#3443](https://github.com/aliyun/terraform-provider-alicloud/issues/3443)) +- testcase: Improves the image and instance testcases([#3510](https://github.com/aliyun/terraform-provider-alicloud/issues/3510)) +- testcase: Improves the instance testcases([#3504](https://github.com/aliyun/terraform-provider-alicloud/issues/3504)) +- testcase: Improves the ess scaling testcase and trigger job([#3502](https://github.com/aliyun/terraform-provider-alicloud/issues/3502)) +- testcase: Improves the sweeper testcase([#3498](https://github.com/aliyun/terraform-provider-alicloud/issues/3498)) +- testcase: Improves resource alicloud_instance testcase for attribute data_disks([#3497](https://github.com/aliyun/terraform-provider-alicloud/issues/3497)) +- testcase: Fixes the has deprecated attribute([#3496](https://github.com/aliyun/terraform-provider-alicloud/issues/3496)) +- testcase: Improves the testcase of scaling configurations and manager policy ([#3494](https://github.com/aliyun/terraform-provider-alicloud/issues/3494)) +- docs: Fixes TSDB instance document error([#3500](https://github.com/aliyun/terraform-provider-alicloud/issues/3500)) +- ci: Improves the ci test in parsing func methods([#3492](https://github.com/aliyun/terraform-provider-alicloud/issues/3492)) BUG FIXES: -- resource/alicloud_log_oss_shipper: Fixes sls oss shipper token bug which unsupporting security token ([#3508](https://github.com/aliyun/terraform-provider-alicloud/issues/3508)) +- resource/alicloud_log_oss_shipper: Fixes sls oss shipper token bug which unsupporting security token([#3508](https://github.com/aliyun/terraform-provider-alicloud/issues/3508)) ## 1.121.3 (April 24, 2021) ENHANCEMENTS: -- resource/alicloud_polardb_cluster: Improves the attribute tde_status using standard values ([#3490](https://github.com/aliyun/terraform-provider-alicloud/issues/3490)) -- resource/alicloud_db_instance: Supports to encrypt the disk for MSSQL ([#3486](https://github.com/aliyun/terraform-provider-alicloud/issues/3486)) -- resource/alicloud_polardb_cluster: Supports new attribute tde_status for PolarDB Mysql ([#3485](https://github.com/aliyun/terraform-provider-alicloud/issues/3485)) -- testcase: Skipes ResourceManager testcase while the resource directory is not enabled ([#3475](https://github.com/aliyun/terraform-provider-alicloud/issues/3475)) -- docs/alicloud_vswitch: Replaces deprecated availability_zone with zone _id in the all of docs examples ([#3481](https://github.com/aliyun/terraform-provider-alicloud/issues/3481)) -- docs: Improves the docs for the attribute period note ([#3489](https://github.com/aliyun/terraform-provider-alicloud/issues/3489)) -- ci: Improves the running ci testcase and got failed count ([#3478](https://github.com/aliyun/terraform-provider-alicloud/issues/3478)) -- ci: improve ci testcase by adding point-to-point test when there is a merg ([#3472](https://github.com/aliyun/terraform-provider-alicloud/issues/3472)) -- ci: Improves the ci-test to get the precise test case ([#3483](https://github.com/aliyun/terraform-provider-alicloud/issues/3483)) +- resource/alicloud_polardb_cluster: Improves the attribute tde_status using standard values([#3490](https://github.com/aliyun/terraform-provider-alicloud/issues/3490)) +- resource/alicloud_db_instance: Supports to encrypt the disk for MSSQL([#3486](https://github.com/aliyun/terraform-provider-alicloud/issues/3486)) +- resource/alicloud_polardb_cluster: Supports new attribute tde_status for PolarDB Mysql([#3485](https://github.com/aliyun/terraform-provider-alicloud/issues/3485)) +- testcase: Skipes ResourceManager testcase while the resource directory is not enabled([#3475](https://github.com/aliyun/terraform-provider-alicloud/issues/3475)) +- docs/alicloud_vswitch: Replaces deprecated availability_zone with zone _id in the all of docs examples([#3481](https://github.com/aliyun/terraform-provider-alicloud/issues/3481)) +- docs: Improves the docs for the attribute period note([#3489](https://github.com/aliyun/terraform-provider-alicloud/issues/3489)) +- ci: Improves the running ci testcase and got failed count([#3478](https://github.com/aliyun/terraform-provider-alicloud/issues/3478)) +- ci: improve ci testcase by adding point-to-point test when there is a merg([#3472](https://github.com/aliyun/terraform-provider-alicloud/issues/3472)) +- ci: Improves the ci-test to get the precise test case([#3483](https://github.com/aliyun/terraform-provider-alicloud/issues/3483)) BUG FIXES: -- resource/alicloud_adb_db_connection: Adds retry error code IncorrectDBInstanceState to fix deleting adb connection failed error ([#3491](https://github.com/aliyun/terraform-provider-alicloud/issues/3491)) -- datasource/alicloud_nat_gateways: Recovers the ip_lists type to fix the missing expected error ([#3480](https://github.com/aliyun/terraform-provider-alicloud/issues/3480)) -- ci: Fixes the ci test bug when running the aliyun oss ls command ([#3482](https://github.com/aliyun/terraform-provider-alicloud/issues/3482)) -- ci: Fixes the CI bug and update changelog ([#3469](https://github.com/aliyun/terraform-provider-alicloud/issues/3469)) -- ci: improves the test scripts to fix missing parameter bug ([#3474](https://github.com/aliyun/terraform-provider-alicloud/issues/3474)) +- resource/alicloud_adb_db_connection: Adds retry error code IncorrectDBInstanceState to fix deleting adb connection failed error([#3491](https://github.com/aliyun/terraform-provider-alicloud/issues/3491)) +- datasource/alicloud_nat_gateways: Recovers the ip_lists type to fix the missing expected error([#3480](https://github.com/aliyun/terraform-provider-alicloud/issues/3480)) +- ci: Fixes the ci test bug when running the aliyun oss ls command([#3482](https://github.com/aliyun/terraform-provider-alicloud/issues/3482)) +- ci: Fixes the CI bug and update changelog([#3469](https://github.com/aliyun/terraform-provider-alicloud/issues/3469)) +- ci: improves the test scripts to fix missing parameter bug([#3474](https://github.com/aliyun/terraform-provider-alicloud/issues/3474)) ## 1.121.2 (April 18, 2021) ENHANCEMENTS: -- resource/alicloud_nas_file_system: Removes the attribute kms_key_id because of it does not support all of users ([#3464](https://github.com/aliyun/terraform-provider-alicloud/issues/3464)) -- resource/alicloud_nas_file_system: Adds new attribute encrypt_type and kms_key_id to support encrypt the resource data ([#3431](https://github.com/aliyun/terraform-provider-alicloud/issues/3431)) -- resource/alicloud_oss_bucket: Adds attributes created_before_date , expired_object_delete_marker , abort_multipart_upload , noncurrent_version_expiration and noncurrent_version_transition ([#3441](https://github.com/aliyun/terraform-provider-alicloud/issues/3441)) -- resource/alicloud_instance: Deprecates the useless attribute internet_max_bandwidth_in ([#3445](https://github.com/aliyun/terraform-provider-alicloud/issues/3445)) -- resource/alicloud_polardb_cluster: Sets attribute vswitch_id to Computed and improve its testcase ([#3456](https://github.com/aliyun/terraform-provider-alicloud/issues/3456)) -- testcase: Adds the sag qos sweeper test ([#3435](https://github.com/aliyun/terraform-provider-alicloud/issues/3435)) -- testcase: Improves the hbase and market testcases ([#3453](https://github.com/aliyun/terraform-provider-alicloud/issues/3453)) -- testcase: Improve hbase instance testcase ([#3454](https://github.com/aliyun/terraform-provider-alicloud/issues/3454)) -- errors.go: Improves the retry strategy by supporting error code Throttling and ServiceUnavailable ([#3437](https://github.com/aliyun/terraform-provider-alicloud/issues/3437)) -- errors.go: Improves the connection faild error by adding another error ([#3452](https://github.com/aliyun/terraform-provider-alicloud/issues/3452)) -- errors: Adds retry error code for throttling error ([#3462](https://github.com/aliyun/terraform-provider-alicloud/issues/3462)) -- ci: Sync the provider repo to oss to avoid network faild when running in China ([#3468](https://github.com/aliyun/terraform-provider-alicloud/issues/3468)) - -BUG FIXES: - -- resource/alicloud_adb_db_cluster: Fixes the diff bug caused by attribute payment_type and db_cluster_category ([#3466](https://github.com/aliyun/terraform-provider-alicloud/issues/3466)) -- resource/nat_gateway: Recovers the snat_table_ids and forward_table_ids data type to fix the format error ([#3432](https://github.com/aliyun/terraform-provider-alicloud/issues/3432)) -- resource/alicloud_cen_bandwidth_package: Fixes the parsing expire time failed error which only work in PrePaid ([#3436](https://github.com/aliyun/terraform-provider-alicloud/issues/3436)) -- resource/alicloud_cen_bandwidth_package: Fixes the InvalidStatus.Resource error when updating this resource ([#3440](https://github.com/aliyun/terraform-provider-alicloud/issues/3440)) -- resource/alicloud_sag_qos_car & alicloud_sag_qos_policy: Fixes the error ResourceInOperating in concurrent scenario ([#3446](https://github.com/aliyun/terraform-provider-alicloud/issues/3446)) -- resource/alicloud_network_acl: Fixes the Throttling error when describing the resources ([#3447](https://github.com/aliyun/terraform-provider-alicloud/issues/3447)) -- resource/alicloud_mongodb_instance: Fixes the InstanceStatusInvalid error when ModifySecurityGroupConfiguration ([#3449](https://github.com/aliyun/terraform-provider-alicloud/issues/3449)) -- resource/alicloud_cen_xxx: Adds the retry strategy to fix the connection error when fetching the resources ([#3450](https://github.com/aliyun/terraform-provider-alicloud/issues/3450)) -- resource/alicloud_polardb_account: Adds the retry strategy to fix the ConcurrentTaskExceeded error when update the resources ([#3456](https://github.com/aliyun/terraform-provider-alicloud/issues/3456)) -- resource/alicloud_nat_gateway: Fixes the specification diff bug; Fixes the period diff bug ([#3458](https://github.com/aliyun/terraform-provider-alicloud/issues/3458)) -- datasource/alicloud_cms_service: Adds error code Has.effect.suit to avoid needless error when repeated opening ([#3463](https://github.com/aliyun/terraform-provider-alicloud/issues/3463)) -- testcase/alicloud_cms_alarm_contact: Improves the docs and adds limitation descriptions for attribute name; Fixes the its testcase ([#3439](https://github.com/aliyun/terraform-provider-alicloud/issues/3439)) -- testcase/alicloud_adb_connection: Fixes its testcase caused by missing mode ([#3467](https://github.com/aliyun/terraform-provider-alicloud/issues/3467)) -- docs/alicloud_alidns_domain: Corrects the dns_servers spelling error ([#3434](https://github.com/aliyun/terraform-provider-alicloud/issues/3434)) -- locations: Fixes fetching endpoint failed error because of network connection failed ([#3459](https://github.com/aliyun/terraform-provider-alicloud/issues/3459)) +- resource/alicloud_nas_file_system: Removes the attribute kms_key_id because of it does not support all of users([#3464](https://github.com/aliyun/terraform-provider-alicloud/issues/3464)) +- resource/alicloud_nas_file_system: Adds new attribute encrypt_type and kms_key_id to support encrypt the resource data([#3431](https://github.com/aliyun/terraform-provider-alicloud/issues/3431)) +- resource/alicloud_oss_bucket: Adds attributes created_before_date , expired_object_delete_marker , abort_multipart_upload , noncurrent_version_expiration and noncurrent_version_transition([#3441](https://github.com/aliyun/terraform-provider-alicloud/issues/3441)) +- resource/alicloud_instance: Deprecates the useless attribute internet_max_bandwidth_in([#3445](https://github.com/aliyun/terraform-provider-alicloud/issues/3445)) +- resource/alicloud_polardb_cluster: Sets attribute vswitch_id to Computed and improve its testcase([#3456](https://github.com/aliyun/terraform-provider-alicloud/issues/3456)) +- testcase: Adds the sag qos sweeper test([#3435](https://github.com/aliyun/terraform-provider-alicloud/issues/3435)) +- testcase: Improves the hbase and market testcases([#3453](https://github.com/aliyun/terraform-provider-alicloud/issues/3453)) +- testcase: Improve hbase instance testcase([#3454](https://github.com/aliyun/terraform-provider-alicloud/issues/3454)) +- errors.go: Improves the retry strategy by supporting error code Throttling and ServiceUnavailable([#3437](https://github.com/aliyun/terraform-provider-alicloud/issues/3437)) +- errors.go: Improves the connection faild error by adding another error([#3452](https://github.com/aliyun/terraform-provider-alicloud/issues/3452)) +- errors: Adds retry error code for throttling error([#3462](https://github.com/aliyun/terraform-provider-alicloud/issues/3462)) +- ci: Sync the provider repo to oss to avoid network faild when running in China([#3468](https://github.com/aliyun/terraform-provider-alicloud/issues/3468)) + +BUG FIXES: + +- resource/alicloud_adb_db_cluster: Fixes the diff bug caused by attribute payment_type and db_cluster_category([#3466](https://github.com/aliyun/terraform-provider-alicloud/issues/3466)) +- resource/nat_gateway: Recovers the snat_table_ids and forward_table_ids data type to fix the format error([#3432](https://github.com/aliyun/terraform-provider-alicloud/issues/3432)) +- resource/alicloud_cen_bandwidth_package: Fixes the parsing expire time failed error which only work in PrePaid([#3436](https://github.com/aliyun/terraform-provider-alicloud/issues/3436)) +- resource/alicloud_cen_bandwidth_package: Fixes the InvalidStatus.Resource error when updating this resource([#3440](https://github.com/aliyun/terraform-provider-alicloud/issues/3440)) +- resource/alicloud_sag_qos_car & alicloud_sag_qos_policy: Fixes the error ResourceInOperating in concurrent scenario([#3446](https://github.com/aliyun/terraform-provider-alicloud/issues/3446)) +- resource/alicloud_network_acl: Fixes the Throttling error when describing the resources([#3447](https://github.com/aliyun/terraform-provider-alicloud/issues/3447)) +- resource/alicloud_mongodb_instance: Fixes the InstanceStatusInvalid error when ModifySecurityGroupConfiguration([#3449](https://github.com/aliyun/terraform-provider-alicloud/issues/3449)) +- resource/alicloud_cen_xxx: Adds the retry strategy to fix the connection error when fetching the resources([#3450](https://github.com/aliyun/terraform-provider-alicloud/issues/3450)) +- resource/alicloud_polardb_account: Adds the retry strategy to fix the ConcurrentTaskExceeded error when update the resources([#3456](https://github.com/aliyun/terraform-provider-alicloud/issues/3456)) +- resource/alicloud_nat_gateway: Fixes the specification diff bug; Fixes the period diff bug([#3458](https://github.com/aliyun/terraform-provider-alicloud/issues/3458)) +- datasource/alicloud_cms_service: Adds error code Has.effect.suit to avoid needless error when repeated opening([#3463](https://github.com/aliyun/terraform-provider-alicloud/issues/3463)) +- testcase/alicloud_cms_alarm_contact: Improves the docs and adds limitation descriptions for attribute name; Fixes the its testcase([#3439](https://github.com/aliyun/terraform-provider-alicloud/issues/3439)) +- testcase/alicloud_adb_connection: Fixes its testcase caused by missing mode([#3467](https://github.com/aliyun/terraform-provider-alicloud/issues/3467)) +- docs/alicloud_alidns_domain: Corrects the dns_servers spelling error([#3434](https://github.com/aliyun/terraform-provider-alicloud/issues/3434)) +- locations: Fixes fetching endpoint failed error because of network connection failed([#3459](https://github.com/aliyun/terraform-provider-alicloud/issues/3459)) ## 1.121.1 (April 13, 2021) ENHANCEMENTS: -- resource/alicloud_ecs_key_pair: Supports retry strategy when deleting to fix the error InvalidParameter.KeypairAlreadyAttachedInstance ([#3423](https://github.com/aliyun/terraform-provider-alicloud/issues/3423)) -- testcase: Improves the mongodb and ess scaling configuration testcase ([#3422](https://github.com/aliyun/terraform-provider-alicloud/issues/3422)) -- testcase: Improves the snat entry testcase results from using the new data type ([#3424](https://github.com/aliyun/terraform-provider-alicloud/issues/3424)) +- resource/alicloud_ecs_key_pair: Supports retry strategy when deleting to fix the error InvalidParameter.KeypairAlreadyAttachedInstance([#3423](https://github.com/aliyun/terraform-provider-alicloud/issues/3423)) +- testcase: Improves the mongodb and ess scaling configuration testcase([#3422](https://github.com/aliyun/terraform-provider-alicloud/issues/3422)) +- testcase: Improves the snat entry testcase results from using the new data type([#3424](https://github.com/aliyun/terraform-provider-alicloud/issues/3424)) BUG FIXES: -- docs/alicloud_alidns_domain: Corrects the dns_servers spelling error ([#3434](https://github.com/aliyun/terraform-provider-alicloud/issues/3434)) -- resource/nat_gateway: Recovers the snat_table_ids and forward_table_ids data type to fix the format error ([#3432](https://github.com/aliyun/terraform-provider-alicloud/issues/3432)) -- resource/alicloud_adb_db_cluster: Fixes the crash error ([#3429](https://github.com/aliyun/terraform-provider-alicloud/issues/3429)) -- testcase: Fixes the mongodb and ess testcases ([#3421](https://github.com/aliyun/terraform-provider-alicloud/issues/3421)) -- docs/zones: Fixes the docs spelling error in the datasource alicloud_xxx_zones ([#3425](https://github.com/aliyun/terraform-provider-alicloud/issues/3425)) +- docs/alicloud_alidns_domain: Corrects the dns_servers spelling error([#3434](https://github.com/aliyun/terraform-provider-alicloud/issues/3434)) +- resource/nat_gateway: Recovers the snat_table_ids and forward_table_ids data type to fix the format error([#3432](https://github.com/aliyun/terraform-provider-alicloud/issues/3432)) +- resource/alicloud_adb_db_cluster: Fixes the crash error([#3429](https://github.com/aliyun/terraform-provider-alicloud/issues/3429)) +- testcase: Fixes the mongodb and ess testcases([#3421](https://github.com/aliyun/terraform-provider-alicloud/issues/3421)) +- docs/zones: Fixes the docs spelling error in the datasource alicloud_xxx_zones([#3425](https://github.com/aliyun/terraform-provider-alicloud/issues/3425)) ## 1.121.0 (April 10, 2021) -- **New Resource:** `alicloud_log_oss_shipper` ([#3414](https://github.com/aliyun/terraform-provider-alicloud/issues/3414)) +- **New Resource:** `alicloud_log_oss_shipper`([#3414](https://github.com/aliyun/terraform-provider-alicloud/issues/3414)) ENHANCEMENTS: -- resource/alicloud_db_readonly_instance: Adds force_restart to fix the crash error when modifying the parameters ([#3419](https://github.com/aliyun/terraform-provider-alicloud/issues/3419)) -- resource/alicloud_polardb_endpoint: Supports new attributes ssl_enabled and net_type ([#3408](https://github.com/aliyun/terraform-provider-alicloud/issues/3408)) -- resource/alicloud_disk: Sets the attribute kms_key_id to forceNew results from there is no API can update it in local place ([#3409](https://github.com/aliyun/terraform-provider-alicloud/issues/3409)) -- resource/alicloud_kvstore_instance: Deprecates attributes node_type and it is useless for this resource ([#3411](https://github.com/aliyun/terraform-provider-alicloud/issues/3411)) -- resource/alicloud_ecs_key_pair: Deprecates the key_name and use key_pair_name instead; Upgrades the its dependence sdk ([#3413](https://github.com/aliyun/terraform-provider-alicloud/issues/3413)) -- resource/alicloud_nat_gateway: Deprecates name, instance_charge_type and using standard nat_gateway_name and payment_type instead; Supports new attributes 'tags' and 'internet_charge_type'; Upgrade its depend sdk ([#3415](https://github.com/aliyun/terraform-provider-alicloud/issues/3415)) -- resource/alicloud_fc_function: Attribute code_checksum supports undating in place ([#3416](https://github.com/aliyun/terraform-provider-alicloud/issues/3416)) -- resource/alicloud_adb_cluster: Upgrades to alicloud_adb_db_cluster; Adds new attributes 'compute_resource', 'db_cluster_class', 'elastic_io_resource', 'mode', 'modify_type', 'payment_type', 'resource_group_id', 'status' attributes; Upgrades its dependence SDK ([#3295](https://github.com/aliyun/terraform-provider-alicloud/issues/3295)) +- resource/alicloud_db_readonly_instance: Adds force_restart to fix the crash error when modifying the parameters([#3419](https://github.com/aliyun/terraform-provider-alicloud/issues/3419)) +- resource/alicloud_polardb_endpoint: Supports new attributes ssl_enabled and net_type([#3408](https://github.com/aliyun/terraform-provider-alicloud/issues/3408)) +- resource/alicloud_disk: Sets the attribute kms_key_id to forceNew results from there is no API can update it in local place([#3409](https://github.com/aliyun/terraform-provider-alicloud/issues/3409)) +- resource/alicloud_kvstore_instance: Deprecates attributes node_type and it is useless for this resource([#3411](https://github.com/aliyun/terraform-provider-alicloud/issues/3411)) +- resource/alicloud_ecs_key_pair: Deprecates the key_name and use key_pair_name instead; Upgrades the its dependence sdk([#3413](https://github.com/aliyun/terraform-provider-alicloud/issues/3413)) +- resource/alicloud_nat_gateway: Deprecates name, instance_charge_type and using standard nat_gateway_name and payment_type instead; Supports new attributes 'tags' and 'internet_charge_type'; Upgrade its depend sdk([#3415](https://github.com/aliyun/terraform-provider-alicloud/issues/3415)) +- resource/alicloud_fc_function: Attribute code_checksum supports undating in place([#3416](https://github.com/aliyun/terraform-provider-alicloud/issues/3416)) +- resource/alicloud_adb_cluster: Upgrades to alicloud_adb_db_cluster; Adds new attributes 'compute_resource', 'db_cluster_class', 'elastic_io_resource', 'mode', 'modify_type', 'payment_type', 'resource_group_id', 'status' attributes; Upgrades its dependence SDK([#3295](https://github.com/aliyun/terraform-provider-alicloud/issues/3295)) ## 1.120.0 (April 02, 2021) -- **New Resource:** `alicloud_resource_manager_control_policy` ([#3383](https://github.com/aliyun/terraform-provider-alicloud/issues/3383)) -- **New Resource:** `alicloud_ga_forwarding_rule` ([#3384](https://github.com/aliyun/terraform-provider-alicloud/issues/3384)) -- **New Resource:** `alicloud_ecs_snapshot` ([#3403](https://github.com/aliyun/terraform-provider-alicloud/issues/3403)) -- **Data Source:** `alicloud_resource_manager_control_policies` ([#3383](https://github.com/aliyun/terraform-provider-alicloud/issues/3383)) -- **Data Source:** `alicloud_ga_forwarding_rules` ([#3384](https://github.com/aliyun/terraform-provider-alicloud/issues/3384)) -- **Data Source:** `alicloud_sae_service` ([#3390](https://github.com/aliyun/terraform-provider-alicloud/issues/3390)) -- **Data Source:** `alicloud_rds_accounts` ([#3399](https://github.com/aliyun/terraform-provider-alicloud/issues/3399)) -- **Data Source:** `alicloud_ecs_snapshots` ([#3403](https://github.com/aliyun/terraform-provider-alicloud/issues/3403)) +- **New Resource:** `alicloud_resource_manager_control_policy`([#3383](https://github.com/aliyun/terraform-provider-alicloud/issues/3383)) +- **New Resource:** `alicloud_ga_forwarding_rule`([#3384](https://github.com/aliyun/terraform-provider-alicloud/issues/3384)) +- **New Resource:** `alicloud_ecs_snapshot`([#3403](https://github.com/aliyun/terraform-provider-alicloud/issues/3403)) +- **Data Source:** `alicloud_resource_manager_control_policies`([#3383](https://github.com/aliyun/terraform-provider-alicloud/issues/3383)) +- **Data Source:** `alicloud_ga_forwarding_rules`([#3384](https://github.com/aliyun/terraform-provider-alicloud/issues/3384)) +- **Data Source:** `alicloud_sae_service`([#3390](https://github.com/aliyun/terraform-provider-alicloud/issues/3390)) +- **Data Source:** `alicloud_rds_accounts`([#3399](https://github.com/aliyun/terraform-provider-alicloud/issues/3399)) +- **Data Source:** `alicloud_ecs_snapshots`([#3403](https://github.com/aliyun/terraform-provider-alicloud/issues/3403)) ENHANCEMENTS: - resource/alicloud_common_bandwidth_package: Renames the name to bandwidth_package_name; Adds new field status; Upgrades its dependence sdk [([#3376](https://github.com/aliyun/terraform-provider-alicloud/issues/3376))) -- resource/alicloud_route_table: Adds retry code to avoid concurrency issues when deleting ([#3377](https://github.com/aliyun/terraform-provider-alicloud/issues/3377)) -- resource/alicloud_quotas_xxx: Supports setting SourceIp to avoid useless error when using sts to operate ([#3388](https://github.com/aliyun/terraform-provider-alicloud/issues/3388)) -- resource/alicloud_resource_resource_manager_resource_directory: Supports enable or disable control policy by attribute status ([#3391](https://github.com/aliyun/terraform-provider-alicloud/issues/3391)) -- resource/alicloud_cs_kunernetes: Supports disk performance level selection, managed cluster migration and cluster tag update ([#3397](https://github.com/aliyun/terraform-provider-alicloud/issues/3397)) -- resource/alicloud_ecs_snapshot: Deprecates the name and use snapshot_name instead; Adds more attributes; Upgrades the its dependence sdk ([#3403](https://github.com/aliyun/terraform-provider-alicloud/issues/3403)) -- datasource/alicloud_instance_types: Adds new attribute system_disk_category to filter instance types ([#3404](https://github.com/aliyun/terraform-provider-alicloud/issues/3404)) -- testcase: Improves the polardb and the related resource testcases ([#3379](https://github.com/aliyun/terraform-provider-alicloud/issues/3379)) -- testcase: upgrade kvstore instance test case ([#3386](https://github.com/aliyun/terraform-provider-alicloud/issues/3386)) -- testcase: Skip alidns_domain_attachment test case because of PrePaid and international region ([#3387](https://github.com/aliyun/terraform-provider-alicloud/issues/3387)) -- testcase: Adds sweeper test for the resource alicloud_cs_kubernetes ([#3389](https://github.com/aliyun/terraform-provider-alicloud/issues/3389)) -- errors.go: Improves parsing error efficience ([#3378](https://github.com/aliyun/terraform-provider-alicloud/issues/3378)) +- resource/alicloud_route_table: Adds retry code to avoid concurrency issues when deleting([#3377](https://github.com/aliyun/terraform-provider-alicloud/issues/3377)) +- resource/alicloud_quotas_xxx: Supports setting SourceIp to avoid useless error when using sts to operate([#3388](https://github.com/aliyun/terraform-provider-alicloud/issues/3388)) +- resource/alicloud_resource_resource_manager_resource_directory: Supports enable or disable control policy by attribute status([#3391](https://github.com/aliyun/terraform-provider-alicloud/issues/3391)) +- resource/alicloud_cs_kunernetes: Supports disk performance level selection, managed cluster migration and cluster tag update([#3397](https://github.com/aliyun/terraform-provider-alicloud/issues/3397)) +- resource/alicloud_ecs_snapshot: Deprecates the name and use snapshot_name instead; Adds more attributes; Upgrades the its dependence sdk([#3403](https://github.com/aliyun/terraform-provider-alicloud/issues/3403)) +- datasource/alicloud_instance_types: Adds new attribute system_disk_category to filter instance types([#3404](https://github.com/aliyun/terraform-provider-alicloud/issues/3404)) +- testcase: Improves the polardb and the related resource testcases([#3379](https://github.com/aliyun/terraform-provider-alicloud/issues/3379)) +- testcase: upgrade kvstore instance test case([#3386](https://github.com/aliyun/terraform-provider-alicloud/issues/3386)) +- testcase: Skip alidns_domain_attachment test case because of PrePaid and international region([#3387](https://github.com/aliyun/terraform-provider-alicloud/issues/3387)) +- testcase: Adds sweeper test for the resource alicloud_cs_kubernetes([#3389](https://github.com/aliyun/terraform-provider-alicloud/issues/3389)) +- errors.go: Improves parsing error efficience([#3378](https://github.com/aliyun/terraform-provider-alicloud/issues/3378)) - errors.go: Improves the error matching function to avoid some useless error [3406] BUG FIXES: -- resource/alicloud_emr_cluster: Fixes the attribute use_local_metadb diff bug ([#3401](https://github.com/aliyun/terraform-provider-alicloud/issues/3401)) -- resource/alicloud_alikafka_instance: Fixes creating error ONS_SYSTEM_ERROR and deleting timeout error ([#3380](https://github.com/aliyun/terraform-provider-alicloud/issues/3380)) -- resource/alicloud_snat_entry: Adds retry code to fix the creating error InternalError ([#3382](https://github.com/aliyun/terraform-provider-alicloud/issues/3382)) -- resource/alicloud_ga_forwarding_rule: improve ga_forwarding_rule ([#3392](https://github.com/aliyun/terraform-provider-alicloud/issues/3392)) -- resource/ga_bandwidth_package_id: Upgrades the resource id using both bandwidth package id and accelerator id ([#3393](https://github.com/aliyun/terraform-provider-alicloud/issues/3393)) -- resource/alicloud_havip: Adds its datasource; adds new attributes havip_name and status; upgrades its dependence sdk ([#3394](https://github.com/aliyun/terraform-provider-alicloud/issues/3394)) -- resource/alicloud_keypair_attachment: Fix KeyPairAttachment bug when the key pair name contains colon ([#3395](https://github.com/aliyun/terraform-provider-alicloud/issues/3395)) +- resource/alicloud_emr_cluster: Fixes the attribute use_local_metadb diff bug([#3401](https://github.com/aliyun/terraform-provider-alicloud/issues/3401)) +- resource/alicloud_alikafka_instance: Fixes creating error ONS_SYSTEM_ERROR and deleting timeout error([#3380](https://github.com/aliyun/terraform-provider-alicloud/issues/3380)) +- resource/alicloud_snat_entry: Adds retry code to fix the creating error InternalError([#3382](https://github.com/aliyun/terraform-provider-alicloud/issues/3382)) +- resource/alicloud_ga_forwarding_rule: improve ga_forwarding_rule([#3392](https://github.com/aliyun/terraform-provider-alicloud/issues/3392)) +- resource/ga_bandwidth_package_id: Upgrades the resource id using both bandwidth package id and accelerator id([#3393](https://github.com/aliyun/terraform-provider-alicloud/issues/3393)) +- resource/alicloud_havip: Adds its datasource; adds new attributes havip_name and status; upgrades its dependence sdk([#3394](https://github.com/aliyun/terraform-provider-alicloud/issues/3394)) +- resource/alicloud_keypair_attachment: Fix KeyPairAttachment bug when the key pair name contains colon([#3395](https://github.com/aliyun/terraform-provider-alicloud/issues/3395)) ## 1.119.1 (March 26, 2021) ENHANCEMENTS: -- resource/alicloud_route_table: Adds retry code to avoid concurrency issues when deleting ([#3377](https://github.com/aliyun/terraform-provider-alicloud/issues/3377)) -- resource/alicloud_cs_managed_kubernetes: Supports setting essd disk performance and automatic disk snapshot policies for cluster and node pool nodes. ([#3371](https://github.com/aliyun/terraform-provider-alicloud/issues/3371)) -- resource/alicloud_forward_entry: Renames the name to forward_entry_name; Supports new attribute protocol; Upgrades the resource SDK ([#3368](https://github.com/aliyun/terraform-provider-alicloud/issues/3368)) -- resource/alicloud_eip_association: Enlarges the deletion timeout to avoid deleting it failed ([#3366](https://github.com/aliyun/terraform-provider-alicloud/issues/3366)) -- resource/alicloud_eip_assocition: Enlarges the client connection timeout to avoid connecting failed ([#3365](https://github.com/aliyun/terraform-provider-alicloud/issues/3365)) -- resource/alicloud_mongodb_instance: Removes the field tde_status forceNew and supports modifying it online ([#3360](https://github.com/aliyun/terraform-provider-alicloud/issues/3360)) -- resource/alicloud_ga_listener: Supports protocol HTTP and HTTPS ([#3358](https://github.com/aliyun/terraform-provider-alicloud/issues/3358)) -- resource/alicloud_snat_entry: Adds new attribute status and supports self-define timeout; Upgrades the resource dependent sdk ([#3357](https://github.com/aliyun/terraform-provider-alicloud/issues/3357)) -- resource/alicloud_vswitch: Leverages the specified error code to add retry strategy when creating or deleting vswitch ([#3356](https://github.com/aliyun/terraform-provider-alicloud/issues/3356)) -- testcase: Modify the image name_regex to ^ubuntu to avoid the needless test failed ([#3367](https://github.com/aliyun/terraform-provider-alicloud/issues/3367)) +- resource/alicloud_route_table: Adds retry code to avoid concurrency issues when deleting([#3377](https://github.com/aliyun/terraform-provider-alicloud/issues/3377)) +- resource/alicloud_cs_managed_kubernetes: Supports setting essd disk performance and automatic disk snapshot policies for cluster and node pool nodes.([#3371](https://github.com/aliyun/terraform-provider-alicloud/issues/3371)) +- resource/alicloud_forward_entry: Renames the name to forward_entry_name; Supports new attribute protocol; Upgrades the resource SDK([#3368](https://github.com/aliyun/terraform-provider-alicloud/issues/3368)) +- resource/alicloud_eip_association: Enlarges the deletion timeout to avoid deleting it failed([#3366](https://github.com/aliyun/terraform-provider-alicloud/issues/3366)) +- resource/alicloud_eip_assocition: Enlarges the client connection timeout to avoid connecting failed([#3365](https://github.com/aliyun/terraform-provider-alicloud/issues/3365)) +- resource/alicloud_mongodb_instance: Removes the field tde_status forceNew and supports modifying it online([#3360](https://github.com/aliyun/terraform-provider-alicloud/issues/3360)) +- resource/alicloud_ga_listener: Supports protocol HTTP and HTTPS([#3358](https://github.com/aliyun/terraform-provider-alicloud/issues/3358)) +- resource/alicloud_snat_entry: Adds new attribute status and supports self-define timeout; Upgrades the resource dependent sdk([#3357](https://github.com/aliyun/terraform-provider-alicloud/issues/3357)) +- resource/alicloud_vswitch: Leverages the specified error code to add retry strategy when creating or deleting vswitch([#3356](https://github.com/aliyun/terraform-provider-alicloud/issues/3356)) +- testcase: Modify the image name_regex to ^ubuntu to avoid the needless test failed([#3367](https://github.com/aliyun/terraform-provider-alicloud/issues/3367)) BUG FIXES: -- resource/alicloud_vpc,alicloud_vswitch: Fixes DependencyViolation error when deleting vpc and vswitch ([#3370](https://github.com/aliyun/terraform-provider-alicloud/issues/3370)) -- resource/alicloud_eip_association: Fixes the connection timeout when getting Eip resource ([#3369](https://github.com/aliyun/terraform-provider-alicloud/issues/3369)) +- resource/alicloud_vpc,alicloud_vswitch: Fixes DependencyViolation error when deleting vpc and vswitch([#3370](https://github.com/aliyun/terraform-provider-alicloud/issues/3370)) +- resource/alicloud_eip_association: Fixes the connection timeout when getting Eip resource([#3369](https://github.com/aliyun/terraform-provider-alicloud/issues/3369)) ## 1.119.0 (March 19, 2021) -- **New Resource:** `alicloud_rds_parameter_group` ([#3343](https://github.com/aliyun/terraform-provider-alicloud/issues/3343)) -- **Data Source:** `alicloud_rds_parameter_groups` ([#3343](https://github.com/aliyun/terraform-provider-alicloud/issues/3343)) +- **New Resource:** `alicloud_rds_parameter_group`([#3343](https://github.com/aliyun/terraform-provider-alicloud/issues/3343)) +- **Data Source:** `alicloud_rds_parameter_groups`([#3343](https://github.com/aliyun/terraform-provider-alicloud/issues/3343)) ENHANCEMENTS: -- resource/alicloud_cs_kubernetes_node_pool: Supports new feature including subscription charge type, installing cloud momitor, setting node unschedulable ([#3351](https://github.com/aliyun/terraform-provider-alicloud/issues/3351)) -- resource/alicloud_ga_bandwidth_package: Supports updating attributebandwidth ([#3346](https://github.com/aliyun/terraform-provider-alicloud/issues/3346)) -- resource/alicloud_alikafka_topic: Supports setting self-define create timeout ([#3345](https://github.com/aliyun/terraform-provider-alicloud/issues/3345)) -- resource/alicloud_vswitch: Upgrades vswitch including deprecating name and availability_zone, adding vswitch_name and zone_id, using new sdk ([#3342](https://github.com/aliyun/terraform-provider-alicloud/issues/3342)) -- resource/alicloud_alicloud_tsdb_instance: Improves codes by modifying its conversion function name ([#3337](https://github.com/aliyun/terraform-provider-alicloud/issues/3337)) -- resource/alicloud_vpc: Adds new features including renaming name to vpc_name, enabling ipv6, setting user_cidrs and upgrading sdk ([#3328](https://github.com/aliyun/terraform-provider-alicloud/issues/3328)) -- datasource/alicloud_cms_monitor_group_instances: Rename instanceses to instances ([#3349](https://github.com/aliyun/terraform-provider-alicloud/issues/3349)) -- testcase: Improves the fc sweeper test with adding deleting fc-eni ([#3354](https://github.com/aliyun/terraform-provider-alicloud/issues/3354)) -- testcase: Adds supported regions for vpc testcase ([#3353](https://github.com/aliyun/terraform-provider-alicloud/issues/3353)) -- testcase: Upgrades alicloud_vpc and alicloud_vswitch testcases including change field name to vpc_name and vswitch_name ([#3344](https://github.com/aliyun/terraform-provider-alicloud/issues/3344)) -- testcase: Improves the mns and nas filesystem testcase by skipping needless cases ([#3339](https://github.com/aliyun/terraform-provider-alicloud/issues/3339)) +- resource/alicloud_cs_kubernetes_node_pool: Supports new feature including subscription charge type, installing cloud momitor, setting node unschedulable([#3351](https://github.com/aliyun/terraform-provider-alicloud/issues/3351)) +- resource/alicloud_ga_bandwidth_package: Supports updating attributebandwidth([#3346](https://github.com/aliyun/terraform-provider-alicloud/issues/3346)) +- resource/alicloud_alikafka_topic: Supports setting self-define create timeout([#3345](https://github.com/aliyun/terraform-provider-alicloud/issues/3345)) +- resource/alicloud_vswitch: Upgrades vswitch including deprecating name and availability_zone, adding vswitch_name and zone_id, using new sdk([#3342](https://github.com/aliyun/terraform-provider-alicloud/issues/3342)) +- resource/alicloud_alicloud_tsdb_instance: Improves codes by modifying its conversion function name([#3337](https://github.com/aliyun/terraform-provider-alicloud/issues/3337)) +- resource/alicloud_vpc: Adds new features including renaming name to vpc_name, enabling ipv6, setting user_cidrs and upgrading sdk([#3328](https://github.com/aliyun/terraform-provider-alicloud/issues/3328)) +- datasource/alicloud_cms_monitor_group_instances: Rename instanceses to instances([#3349](https://github.com/aliyun/terraform-provider-alicloud/issues/3349)) +- testcase: Improves the fc sweeper test with adding deleting fc-eni([#3354](https://github.com/aliyun/terraform-provider-alicloud/issues/3354)) +- testcase: Adds supported regions for vpc testcase([#3353](https://github.com/aliyun/terraform-provider-alicloud/issues/3353)) +- testcase: Upgrades alicloud_vpc and alicloud_vswitch testcases including change field name to vpc_name and vswitch_name([#3344](https://github.com/aliyun/terraform-provider-alicloud/issues/3344)) +- testcase: Improves the mns and nas filesystem testcase by skipping needless cases([#3339](https://github.com/aliyun/terraform-provider-alicloud/issues/3339)) BUG FIXES: -- resource/alicloud_keypair_attachment: Fix DescribeKeyPairAttachment bug(#3338) when the key pair name contains colon ([#3341](https://github.com/aliyun/terraform-provider-alicloud/issues/3341)) -- resource/alicloud_cs_kubernetes: Fixes GetClusterConfig failed error when the cluster state is failed ([#3340](https://github.com/aliyun/terraform-provider-alicloud/issues/3340)) -- datasource/alicloud_fc_service: Fixes enable fc service twice error and supports idempotent ([#3348](https://github.com/aliyun/terraform-provider-alicloud/issues/3348)) +- resource/alicloud_keypair_attachment: Fix DescribeKeyPairAttachment bug(#3338) when the key pair name contains colon([#3341](https://github.com/aliyun/terraform-provider-alicloud/issues/3341)) +- resource/alicloud_cs_kubernetes: Fixes GetClusterConfig failed error when the cluster state is failed([#3340](https://github.com/aliyun/terraform-provider-alicloud/issues/3340)) +- datasource/alicloud_fc_service: Fixes enable fc service twice error and supports idempotent([#3348](https://github.com/aliyun/terraform-provider-alicloud/issues/3348)) ## 1.118.0 (March 12, 2021) FEATURES: -- **Data Source:** `alicloud_mns_service` ([#3325](https://github.com/aliyun/terraform-provider-alicloud/issues/3325)) -- **Data Source:** `alicloud_dataworks_service` ([#3333](https://github.com/aliyun/terraform-provider-alicloud/issues/3333)) +- **Data Source:** `alicloud_mns_service`([#3325](https://github.com/aliyun/terraform-provider-alicloud/issues/3325)) +- **Data Source:** `alicloud_dataworks_service`([#3333](https://github.com/aliyun/terraform-provider-alicloud/issues/3333)) ENHANCEMENTS: -- resource/alicloud_cms_group_metric_rule: Adds NotFount error code to avoid needless error after deleting the resource ([#3317](https://github.com/aliyun/terraform-provider-alicloud/issues/3317)) -- testcase: Improves the ResourceManager sweep testcase ([#3320](https://github.com/aliyun/terraform-provider-alicloud/issues/3320)) -- testcase: Improves ess test case ([#3321](https://github.com/aliyun/terraform-provider-alicloud/issues/3321)) -- resource/alicloud_cdn_domain_new: Removes the maxitems limit for it attributes `sources` and can support setting multiple values ([#3323](https://github.com/aliyun/terraform-provider-alicloud/issues/3323)) -- testcase: Adds regionId for ecs auto snap policy sweeper testcase. ([#3326](https://github.com/aliyun/terraform-provider-alicloud/issues/3326)) -- docs: Corrects the resource alicloud_alidns_instance website sidebar names ([#3329](https://github.com/aliyun/terraform-provider-alicloud/issues/3329)) -- testcase: Improve the resource fc_domain ci test case ([#3331](https://github.com/aliyun/terraform-provider-alicloud/issues/3331)) -- resource/alicloud_actiontrail_trail: Upgrades the api version of actiontrail to deprecate the attribute `mns_topic_arn` and `role_name` and add new attribute `oss_write_role_arn` ([#3334](https://github.com/aliyun/terraform-provider-alicloud/issues/3334)) -- resource/alicloud_ram_policy: Deletes all of policy versions when deleting one ram policy ([#3332](https://github.com/aliyun/terraform-provider-alicloud/issues/3332)) +- resource/alicloud_cms_group_metric_rule: Adds NotFount error code to avoid needless error after deleting the resource([#3317](https://github.com/aliyun/terraform-provider-alicloud/issues/3317)) +- testcase: Improves the ResourceManager sweep testcase([#3320](https://github.com/aliyun/terraform-provider-alicloud/issues/3320)) +- testcase: Improves ess test case([#3321](https://github.com/aliyun/terraform-provider-alicloud/issues/3321)) +- resource/alicloud_cdn_domain_new: Removes the maxitems limit for it attributes `sources` and can support setting multiple values([#3323](https://github.com/aliyun/terraform-provider-alicloud/issues/3323)) +- testcase: Adds regionId for ecs auto snap policy sweeper testcase.([#3326](https://github.com/aliyun/terraform-provider-alicloud/issues/3326)) +- docs: Corrects the resource alicloud_alidns_instance website sidebar names([#3329](https://github.com/aliyun/terraform-provider-alicloud/issues/3329)) +- testcase: Improve the resource fc_domain ci test case([#3331](https://github.com/aliyun/terraform-provider-alicloud/issues/3331)) +- resource/alicloud_actiontrail_trail: Upgrades the api version of actiontrail to deprecate the attribute `mns_topic_arn` and `role_name` and add new attribute `oss_write_role_arn`([#3334](https://github.com/aliyun/terraform-provider-alicloud/issues/3334)) +- resource/alicloud_ram_policy: Deletes all of policy versions when deleting one ram policy([#3332](https://github.com/aliyun/terraform-provider-alicloud/issues/3332)) BUG FIXES: -- testcase: Fix dms user datasource test bug. ([#3324](https://github.com/aliyun/terraform-provider-alicloud/issues/3324)) -- testcase: Fix resource alicloud_resource_cdn_domain_new test case. ([#3327](https://github.com/aliyun/terraform-provider-alicloud/issues/3327)) -- testcase: Fix resource manager sweeper test case ([#3330](https://github.com/aliyun/terraform-provider-alicloud/issues/3330)) -- resource/alicloud_cs_kubernetes: Fix the resource crash error when creating dedicated cluster in v1.117.0 ([#3335](https://github.com/aliyun/terraform-provider-alicloud/issues/3335)) +- testcase: Fix dms user datasource test bug.([#3324](https://github.com/aliyun/terraform-provider-alicloud/issues/3324)) +- testcase: Fix resource alicloud_resource_cdn_domain_new test case.([#3327](https://github.com/aliyun/terraform-provider-alicloud/issues/3327)) +- testcase: Fix resource manager sweeper test case([#3330](https://github.com/aliyun/terraform-provider-alicloud/issues/3330)) +- resource/alicloud_cs_kubernetes: Fix the resource crash error when creating dedicated cluster in v1.117.0([#3335](https://github.com/aliyun/terraform-provider-alicloud/issues/3335)) ## 1.117.0 (March 05, 2021) -- **New Resource:** `alicloud_vpc_flow_log` ([#3290](https://github.com/aliyun/terraform-provider-alicloud/issues/3290)) -- **New Resource:** `alicloud_brain_industrial_pid_loop` ([#3252](https://github.com/aliyun/terraform-provider-alicloud/issues/3252)) -- **Data Source:** `alicloud_brain_industrial_pid_loops` ([#3252](https://github.com/aliyun/terraform-provider-alicloud/issues/3252)) -- **Data Source:** `alicloud_maxcompute_service` ([#3304](https://github.com/aliyun/terraform-provider-alicloud/issues/3304)) -- **Data Source:** `alicloud_cloud_storage_gateway_service` ([#3308](https://github.com/aliyun/terraform-provider-alicloud/issues/3308)) -- **Data Source:** `alicloud_ecs_auoto_snapshot_policies` ([#3309](https://github.com/aliyun/terraform-provider-alicloud/issues/3309)) +- **New Resource:** `alicloud_vpc_flow_log`([#3290](https://github.com/aliyun/terraform-provider-alicloud/issues/3290)) +- **New Resource:** `alicloud_brain_industrial_pid_loop`([#3252](https://github.com/aliyun/terraform-provider-alicloud/issues/3252)) +- **Data Source:** `alicloud_brain_industrial_pid_loops`([#3252](https://github.com/aliyun/terraform-provider-alicloud/issues/3252)) +- **Data Source:** `alicloud_maxcompute_service`([#3304](https://github.com/aliyun/terraform-provider-alicloud/issues/3304)) +- **Data Source:** `alicloud_cloud_storage_gateway_service`([#3308](https://github.com/aliyun/terraform-provider-alicloud/issues/3308)) +- **Data Source:** `alicloud_ecs_auoto_snapshot_policies`([#3309](https://github.com/aliyun/terraform-provider-alicloud/issues/3309)) IMPROVEMENTS: -- support load balancer spec ([#3305](https://github.com/aliyun/terraform-provider-alicloud/issues/3305)) -- resource/alicloud_brain_industrial_pid_project: fix name spelling mistake ([#3310](https://github.com/aliyun/terraform-provider-alicloud/issues/3310)) -- resource/alicloud_eip_association: supports importing feature ([#3312](https://github.com/aliyun/terraform-provider-alicloud/issues/3312)) -- product/quotas: rename ApplicationInfo to QuotaApplication. ([#3311](https://github.com/aliyun/terraform-provider-alicloud/issues/3311)) -- resource/image_copy: adding missing status when waiting for available ([#3314](https://github.com/aliyun/terraform-provider-alicloud/issues/3314)) -- resource alicloud_snapshot_policy renamed to alicloud_ecs_auto_snapshot_policy ([#3309](https://github.com/aliyun/terraform-provider-alicloud/issues/3309)) +- support load balancer spec([#3305](https://github.com/aliyun/terraform-provider-alicloud/issues/3305)) +- resource/alicloud_brain_industrial_pid_project: fix name spelling mistake([#3310](https://github.com/aliyun/terraform-provider-alicloud/issues/3310)) +- resource/alicloud_eip_association: supports importing feature([#3312](https://github.com/aliyun/terraform-provider-alicloud/issues/3312)) +- product/quotas: rename ApplicationInfo to QuotaApplication.([#3311](https://github.com/aliyun/terraform-provider-alicloud/issues/3311)) +- resource/image_copy: adding missing status when waiting for available([#3314](https://github.com/aliyun/terraform-provider-alicloud/issues/3314)) +- resource alicloud_snapshot_policy renamed to alicloud_ecs_auto_snapshot_policy([#3309](https://github.com/aliyun/terraform-provider-alicloud/issues/3309)) BUG FIXES: -- fix ack_service type parameter ([#3307](https://github.com/aliyun/terraform-provider-alicloud/issues/3307)) +- fix ack_service type parameter([#3307](https://github.com/aliyun/terraform-provider-alicloud/issues/3307)) ## 1.116.0 (February 27, 2021) -- **New Resource:** `alicloud_ecs_hpc_cluster` ([#3303](https://github.com/aliyun/terraform-provider-alicloud/issues/3303)) -- **New Resource:** `alicloud_cloud_storage_gateway_storage_bundle` ([#3297](https://github.com/aliyun/terraform-provider-alicloud/issues/3297)) -- **New Resource:** `alicloud_ecs_command` ([#3296](https://github.com/aliyun/terraform-provider-alicloud/issues/3296)) -- **New Resource:** `alicloud_quotas_quota_alarm` ([#3293](https://github.com/aliyun/terraform-provider-alicloud/issues/3293)) -- **Data Source:** `alicloud_ecs_hpc_clusters` ([#3303](https://github.com/aliyun/terraform-provider-alicloud/issues/3303)) -- **Data Source:** `alicloud_cloud_storage_gateway_storage_bundles` ([#3297](https://github.com/aliyun/terraform-provider-alicloud/issues/3297)) -- **Data Source:** `alicloud_ecs_commands` ([#3296](https://github.com/aliyun/terraform-provider-alicloud/issues/3296)) -- **Data Source:** `alicloud_cr_service` ([#3294](https://github.com/aliyun/terraform-provider-alicloud/issues/3294)) -- **Data Source:** `alicloud_quotas_quota_alarms` ([#3293](https://github.com/aliyun/terraform-provider-alicloud/issues/3293)) -- **Data Source:** `alicloud_vs_service` ([#3292](https://github.com/aliyun/terraform-provider-alicloud/issues/3292)) +- **New Resource:** `alicloud_ecs_hpc_cluster`([#3303](https://github.com/aliyun/terraform-provider-alicloud/issues/3303)) +- **New Resource:** `alicloud_cloud_storage_gateway_storage_bundle`([#3297](https://github.com/aliyun/terraform-provider-alicloud/issues/3297)) +- **New Resource:** `alicloud_ecs_command`([#3296](https://github.com/aliyun/terraform-provider-alicloud/issues/3296)) +- **New Resource:** `alicloud_quotas_quota_alarm`([#3293](https://github.com/aliyun/terraform-provider-alicloud/issues/3293)) +- **Data Source:** `alicloud_ecs_hpc_clusters`([#3303](https://github.com/aliyun/terraform-provider-alicloud/issues/3303)) +- **Data Source:** `alicloud_cloud_storage_gateway_storage_bundles`([#3297](https://github.com/aliyun/terraform-provider-alicloud/issues/3297)) +- **Data Source:** `alicloud_ecs_commands`([#3296](https://github.com/aliyun/terraform-provider-alicloud/issues/3296)) +- **Data Source:** `alicloud_cr_service`([#3294](https://github.com/aliyun/terraform-provider-alicloud/issues/3294)) +- **Data Source:** `alicloud_quotas_quota_alarms`([#3293](https://github.com/aliyun/terraform-provider-alicloud/issues/3293)) +- **Data Source:** `alicloud_vs_service`([#3292](https://github.com/aliyun/terraform-provider-alicloud/issues/3292)) IMPROVEMENTS: -- change ecs endpoint ([#3299](https://github.com/aliyun/terraform-provider-alicloud/issues/3299)) -- resource/alicloud_privatelink: Add compute for bandwidth ([#3291](https://github.com/aliyun/terraform-provider-alicloud/issues/3291)) -- Add auto retry for cms_group_metric_rule, fix ons_instance datasource crash error and modify jsonpath get response deal ([#3288](https://github.com/aliyun/terraform-provider-alicloud/issues/3288)) -- add support 'Australia' of 'alicloud_cen_bandwidth_package' ([#3287](https://github.com/aliyun/terraform-provider-alicloud/issues/3287)) -- Modify security_group_rule describe method retry timeout ([#3282](https://github.com/aliyun/terraform-provider-alicloud/issues/3282)) -- change dms to common ([#3280](https://github.com/aliyun/terraform-provider-alicloud/issues/3280)) -- update changelog ([#3279](https://github.com/aliyun/terraform-provider-alicloud/issues/3279)) +- change ecs endpoint([#3299](https://github.com/aliyun/terraform-provider-alicloud/issues/3299)) +- resource/alicloud_privatelink: Add compute for bandwidth([#3291](https://github.com/aliyun/terraform-provider-alicloud/issues/3291)) +- Add auto retry for cms_group_metric_rule, fix ons_instance datasource crash error and modify jsonpath get response deal([#3288](https://github.com/aliyun/terraform-provider-alicloud/issues/3288)) +- add support 'Australia' of 'alicloud_cen_bandwidth_package'([#3287](https://github.com/aliyun/terraform-provider-alicloud/issues/3287)) +- Modify security_group_rule describe method retry timeout([#3282](https://github.com/aliyun/terraform-provider-alicloud/issues/3282)) +- change dms to common([#3280](https://github.com/aliyun/terraform-provider-alicloud/issues/3280)) +- update changelog([#3279](https://github.com/aliyun/terraform-provider-alicloud/issues/3279)) ## 1.115.1 (February 07, 2021) IMPROVEMENTS: -- update go vendors ([#3281](https://github.com/aliyun/terraform-provider-alicloud/issues/3281)) -- datasource/ram_policies: support system policy type to filter policies ([#3276](https://github.com/aliyun/terraform-provider-alicloud/issues/3276)) -- fix the error of parameters description in alicloud_polardb_cluster's doc ([#3272](https://github.com/aliyun/terraform-provider-alicloud/issues/3272)) -- resource/alicloud_hbase_cluster: add some value check; remove classic ([#3174](https://github.com/aliyun/terraform-provider-alicloud/issues/3174)) +- update go vendors([#3281](https://github.com/aliyun/terraform-provider-alicloud/issues/3281)) +- datasource/ram_policies: support system policy type to filter policies([#3276](https://github.com/aliyun/terraform-provider-alicloud/issues/3276)) +- fix the error of parameters description in alicloud_polardb_cluster's doc([#3272](https://github.com/aliyun/terraform-provider-alicloud/issues/3272)) +- resource/alicloud_hbase_cluster: add some value check; remove classic([#3174](https://github.com/aliyun/terraform-provider-alicloud/issues/3174)) ## 1.115.0 (February 07, 2021) -- **New Resource:** `alicloud_cms_monitor_group_instances` ([#3267](https://github.com/aliyun/terraform-provider-alicloud/issues/3267)) -- **New Resource:** `alicloud_quotas_application_info` ([#3261](https://github.com/aliyun/terraform-provider-alicloud/issues/3261)) -- **Data Source:** `alicloud_iot_service` ([#3270](https://github.com/aliyun/terraform-provider-alicloud/issues/3270)) -- **Data Source:** `alicloud_cms_monitor_group_instanceses` ([#3267](https://github.com/aliyun/terraform-provider-alicloud/issues/3267)) -- **Data Source:** `alicloud_brain_industrial_service` ([#3266](https://github.com/aliyun/terraform-provider-alicloud/issues/3266)) -- **Data Source:** `alicloud_quotas_quotas` ([#3265](https://github.com/aliyun/terraform-provider-alicloud/issues/3265)) -- **Data Source:** `alicloud_quotas_application_infos` ([#3261](https://github.com/aliyun/terraform-provider-alicloud/issues/3261)) +- **New Resource:** `alicloud_cms_monitor_group_instances`([#3267](https://github.com/aliyun/terraform-provider-alicloud/issues/3267)) +- **New Resource:** `alicloud_quotas_application_info`([#3261](https://github.com/aliyun/terraform-provider-alicloud/issues/3261)) +- **Data Source:** `alicloud_iot_service`([#3270](https://github.com/aliyun/terraform-provider-alicloud/issues/3270)) +- **Data Source:** `alicloud_cms_monitor_group_instanceses`([#3267](https://github.com/aliyun/terraform-provider-alicloud/issues/3267)) +- **Data Source:** `alicloud_brain_industrial_service`([#3266](https://github.com/aliyun/terraform-provider-alicloud/issues/3266)) +- **Data Source:** `alicloud_quotas_quotas`([#3265](https://github.com/aliyun/terraform-provider-alicloud/issues/3265)) +- **Data Source:** `alicloud_quotas_application_infos`([#3261](https://github.com/aliyun/terraform-provider-alicloud/issues/3261)) IMPROVEMENTS: -- resource/privatelink_vpc_endpoint_zone: Add wait state for create ([#3278](https://github.com/aliyun/terraform-provider-alicloud/issues/3278)) -- resource support update resource_group_id ([#3277](https://github.com/aliyun/terraform-provider-alicloud/issues/3277)) -- change pvtz to common sdk ([#3275](https://github.com/aliyun/terraform-provider-alicloud/issues/3275)) -- Change NAS to common SDK ([#3273](https://github.com/aliyun/terraform-provider-alicloud/issues/3273)) -- changelog ([#3268](https://github.com/aliyun/terraform-provider-alicloud/issues/3268)) +- resource/privatelink_vpc_endpoint_zone: Add wait state for create([#3278](https://github.com/aliyun/terraform-provider-alicloud/issues/3278)) +- resource support update resource_group_id([#3277](https://github.com/aliyun/terraform-provider-alicloud/issues/3277)) +- change pvtz to common sdk([#3275](https://github.com/aliyun/terraform-provider-alicloud/issues/3275)) +- Change NAS to common SDK([#3273](https://github.com/aliyun/terraform-provider-alicloud/issues/3273)) +- changelog([#3268](https://github.com/aliyun/terraform-provider-alicloud/issues/3268)) ## 1.114.1 (February 01, 2021) IMPROVEMENTS: -- remove useless docs ([#3269](https://github.com/aliyun/terraform-provider-alicloud/issues/3269)) +- remove useless docs([#3269](https://github.com/aliyun/terraform-provider-alicloud/issues/3269)) BUG FIXES: -- Fix the client bug for central resource ([#3264](https://github.com/aliyun/terraform-provider-alicloud/issues/3264)) +- Fix the client bug for central resource ([#3264](https://github.com/aliyun/terraform-provider-alicloud/issues/3264)) ## 1.114.0 (January 29, 2021) -- **New Resource:** `alicloud_ram_saml_provider` ([#3235](https://github.com/aliyun/terraform-provider-alicloud/issues/3235)) -- **Data Source:** `alicloud_fnf_service` ([#3258](https://github.com/aliyun/terraform-provider-alicloud/issues/3258)) -- **Data Source:** `alicloud_pvtz_service` ([#3237](https://github.com/aliyun/terraform-provider-alicloud/issues/3237)) -- **Data Source:** `alicloud_ram_saml_providers` ([#3235](https://github.com/aliyun/terraform-provider-alicloud/issues/3235)) +- **New Resource:** `alicloud_ram_saml_provider`([#3235](https://github.com/aliyun/terraform-provider-alicloud/issues/3235)) +- **Data Source:** `alicloud_fnf_service`([#3258](https://github.com/aliyun/terraform-provider-alicloud/issues/3258)) +- **Data Source:** `alicloud_pvtz_service`([#3237](https://github.com/aliyun/terraform-provider-alicloud/issues/3237)) +- **Data Source:** `alicloud_ram_saml_providers`([#3235](https://github.com/aliyun/terraform-provider-alicloud/issues/3235)) IMPROVEMENTS: -- resource/alicloud_ga_xxx: adding retry error code ([#3260](https://github.com/aliyun/terraform-provider-alicloud/issues/3260)) -- Update SDK to v1.61.877 ([#3251](https://github.com/aliyun/terraform-provider-alicloud/issues/3251)) -- generate ram policy from amp ([#3249](https://github.com/aliyun/terraform-provider-alicloud/issues/3249)) -- update changelog ([#3248](https://github.com/aliyun/terraform-provider-alicloud/issues/3248)) -- Change ResourceManager to common SDK ([#3247](https://github.com/aliyun/terraform-provider-alicloud/issues/3247)) -- resource/alicloud_polardb_cluster: support enable audit log collector ([#3246](https://github.com/aliyun/terraform-provider-alicloud/issues/3246)) -- add type attribute for ack_service ([#3244](https://github.com/aliyun/terraform-provider-alicloud/issues/3244)) -- improve datasource alicloud_db_instance_classes and engines ([#3236](https://github.com/aliyun/terraform-provider-alicloud/issues/3236)) -- improve docs subcategory ([#3233](https://github.com/aliyun/terraform-provider-alicloud/issues/3233)) -- support emr importer feature and optimized test case ([#3232](https://github.com/aliyun/terraform-provider-alicloud/issues/3232)) -- resource/alicloud_kvstore_instance: Modify code of private_connection_prefix ([#3231](https://github.com/aliyun/terraform-provider-alicloud/issues/3231)) -- update: add support for nat from normal to enhanced ([#3230](https://github.com/aliyun/terraform-provider-alicloud/issues/3230)) -- change oos to common ([#3227](https://github.com/aliyun/terraform-provider-alicloud/issues/3227)) -- datasource/alicloud_oss_service: supporting more opened error codes ([#3226](https://github.com/aliyun/terraform-provider-alicloud/issues/3226)) -- update changelog ([#3225](https://github.com/aliyun/terraform-provider-alicloud/issues/3225)) -- Modify Ons product to common type ([#3218](https://github.com/aliyun/terraform-provider-alicloud/issues/3218)) -- Remove duplicate `tags` ([#3200](https://github.com/aliyun/terraform-provider-alicloud/issues/3200)) -- Remove Japan site ([#2999](https://github.com/aliyun/terraform-provider-alicloud/issues/2999)) +- resource/alicloud_ga_xxx: adding retry error code([#3260](https://github.com/aliyun/terraform-provider-alicloud/issues/3260)) +- Update SDK to v1.61.877([#3251](https://github.com/aliyun/terraform-provider-alicloud/issues/3251)) +- generate ram policy from amp([#3249](https://github.com/aliyun/terraform-provider-alicloud/issues/3249)) +- update changelog([#3248](https://github.com/aliyun/terraform-provider-alicloud/issues/3248)) +- Change ResourceManager to common SDK([#3247](https://github.com/aliyun/terraform-provider-alicloud/issues/3247)) +- resource/alicloud_polardb_cluster: support enable audit log collector([#3246](https://github.com/aliyun/terraform-provider-alicloud/issues/3246)) +- add type attribute for ack_service([#3244](https://github.com/aliyun/terraform-provider-alicloud/issues/3244)) +- improve datasource alicloud_db_instance_classes and engines([#3236](https://github.com/aliyun/terraform-provider-alicloud/issues/3236)) +- improve docs subcategory([#3233](https://github.com/aliyun/terraform-provider-alicloud/issues/3233)) +- support emr importer feature and optimized test case([#3232](https://github.com/aliyun/terraform-provider-alicloud/issues/3232)) +- resource/alicloud_kvstore_instance: Modify code of private_connection_prefix([#3231](https://github.com/aliyun/terraform-provider-alicloud/issues/3231)) +- update: add support for nat from normal to enhanced([#3230](https://github.com/aliyun/terraform-provider-alicloud/issues/3230)) +- change oos to common([#3227](https://github.com/aliyun/terraform-provider-alicloud/issues/3227)) +- datasource/alicloud_oss_service: supporting more opened error codes([#3226](https://github.com/aliyun/terraform-provider-alicloud/issues/3226)) +- update changelog([#3225](https://github.com/aliyun/terraform-provider-alicloud/issues/3225)) +- Modify Ons product to common type([#3218](https://github.com/aliyun/terraform-provider-alicloud/issues/3218)) +- Remove duplicate `tags`([#3200](https://github.com/aliyun/terraform-provider-alicloud/issues/3200)) +- Remove Japan site([#2999](https://github.com/aliyun/terraform-provider-alicloud/issues/2999)) BUG FIXES: -- fix ga doc resource create error ([#3257](https://github.com/aliyun/terraform-provider-alicloud/issues/3257)) -- fix err when delete adb cluster ([#3234](https://github.com/aliyun/terraform-provider-alicloud/issues/3234)) +- fix ga doc resource create error([#3257](https://github.com/aliyun/terraform-provider-alicloud/issues/3257)) +- fix err when delete adb cluster([#3234](https://github.com/aliyun/terraform-provider-alicloud/issues/3234)) ## 1.113.0 (January 15, 2021) -- **New Resource:** `alicloud_eipanycast_anycast_eip_address_attachment` ([#3215](https://github.com/aliyun/terraform-provider-alicloud/issues/3215)) -- **New Resource:** `alicloud_brain_industrial_pid_project` ([#3212](https://github.com/aliyun/terraform-provider-alicloud/issues/3212)) -- **New Resource:** `alicloud_ga_ip_set` ([#3211](https://github.com/aliyun/terraform-provider-alicloud/issues/3211)) -- **New Resource:** `alicloud_brain_industrial_pid_organization` ([#3209](https://github.com/aliyun/terraform-provider-alicloud/issues/3209)) -- **New Resource:** `alicloud_ga_bandwidth_package_attachment` ([#3207](https://github.com/aliyun/terraform-provider-alicloud/issues/3207)) -- **New Resource:** `alicloud_cms_monitor_group` ([#3204](https://github.com/aliyun/terraform-provider-alicloud/issues/3204)) -- **New Resource:** `alicloud_ga_endpoint_group` ([#3202](https://github.com/aliyun/terraform-provider-alicloud/issues/3202)) -- **New Resource:** `alicloud_eipanycast_anycast_eip_address` ([#3198](https://github.com/aliyun/terraform-provider-alicloud/issues/3198)) -- **Data Source:** `alicloud_privatelink_service` ([#3224](https://github.com/aliyun/terraform-provider-alicloud/issues/3224)) -- **Data Source:** `alicloud_ack_service` ([#3221](https://github.com/aliyun/terraform-provider-alicloud/issues/3221)) -- **Data Source:** `alicloud_brain_industrial_pid_projects` ([#3212](https://github.com/aliyun/terraform-provider-alicloud/issues/3212)) -- **Data Source:** `alicloud_ga_ip_sets` ([#3211](https://github.com/aliyun/terraform-provider-alicloud/issues/3211)) -- **Data Source:** `alicloud_brain_industrial_pid_organizations` ([#3209](https://github.com/aliyun/terraform-provider-alicloud/issues/3209)) -- **Data Source:** `alicloud_cms_monitor_groups` ([#3204](https://github.com/aliyun/terraform-provider-alicloud/issues/3204)) -- **Data Source:** `alicloud_ga_endpoint_groups` ([#3202](https://github.com/aliyun/terraform-provider-alicloud/issues/3202)) -- **Data Source:** `alicloud_eipanycast_anycast_eip_addresses` ([#3198](https://github.com/aliyun/terraform-provider-alicloud/issues/3198)) +- **New Resource:** `alicloud_eipanycast_anycast_eip_address_attachment`([#3215](https://github.com/aliyun/terraform-provider-alicloud/issues/3215)) +- **New Resource:** `alicloud_brain_industrial_pid_project`([#3212](https://github.com/aliyun/terraform-provider-alicloud/issues/3212)) +- **New Resource:** `alicloud_ga_ip_set`([#3211](https://github.com/aliyun/terraform-provider-alicloud/issues/3211)) +- **New Resource:** `alicloud_brain_industrial_pid_organization`([#3209](https://github.com/aliyun/terraform-provider-alicloud/issues/3209)) +- **New Resource:** `alicloud_ga_bandwidth_package_attachment`([#3207](https://github.com/aliyun/terraform-provider-alicloud/issues/3207)) +- **New Resource:** `alicloud_cms_monitor_group`([#3204](https://github.com/aliyun/terraform-provider-alicloud/issues/3204)) +- **New Resource:** `alicloud_ga_endpoint_group`([#3202](https://github.com/aliyun/terraform-provider-alicloud/issues/3202)) +- **New Resource:** `alicloud_eipanycast_anycast_eip_address`([#3198](https://github.com/aliyun/terraform-provider-alicloud/issues/3198)) +- **Data Source:** `alicloud_privatelink_service`([#3224](https://github.com/aliyun/terraform-provider-alicloud/issues/3224)) +- **Data Source:** `alicloud_ack_service`([#3221](https://github.com/aliyun/terraform-provider-alicloud/issues/3221)) +- **Data Source:** `alicloud_brain_industrial_pid_projects`([#3212](https://github.com/aliyun/terraform-provider-alicloud/issues/3212)) +- **Data Source:** `alicloud_ga_ip_sets`([#3211](https://github.com/aliyun/terraform-provider-alicloud/issues/3211)) +- **Data Source:** `alicloud_brain_industrial_pid_organizations`([#3209](https://github.com/aliyun/terraform-provider-alicloud/issues/3209)) +- **Data Source:** `alicloud_cms_monitor_groups`([#3204](https://github.com/aliyun/terraform-provider-alicloud/issues/3204)) +- **Data Source:** `alicloud_ga_endpoint_groups`([#3202](https://github.com/aliyun/terraform-provider-alicloud/issues/3202)) +- **Data Source:** `alicloud_eipanycast_anycast_eip_addresses`([#3198](https://github.com/aliyun/terraform-provider-alicloud/issues/3198)) IMPROVEMENTS: -- resource/alicloud_nat_gateway: offline Normal NatGateway ([#3219](https://github.com/aliyun/terraform-provider-alicloud/issues/3219)) -- resource/tsdb_instance: Add resource no found error code ([#3217](https://github.com/aliyun/terraform-provider-alicloud/issues/3217)) -- update pipeline ([#3216](https://github.com/aliyun/terraform-provider-alicloud/issues/3216)) -- Add sweeper for privatelink and ros ([#3214](https://github.com/aliyun/terraform-provider-alicloud/issues/3214)) -- Modify asynchronous to synchronous when delete adb cluster ([#3190](https://github.com/aliyun/terraform-provider-alicloud/issues/3190)) +- resource/alicloud_nat_gateway: offline Normal NatGateway([#3219](https://github.com/aliyun/terraform-provider-alicloud/issues/3219)) +- resource/tsdb_instance: Add resource no found error code([#3217](https://github.com/aliyun/terraform-provider-alicloud/issues/3217)) +- update pipeline([#3216](https://github.com/aliyun/terraform-provider-alicloud/issues/3216)) +- Add sweeper for privatelink and ros([#3214](https://github.com/aliyun/terraform-provider-alicloud/issues/3214)) +- Modify asynchronous to synchronous when delete adb cluster([#3190](https://github.com/aliyun/terraform-provider-alicloud/issues/3190)) BUG FIXES: -- fix some test case ([#3222](https://github.com/aliyun/terraform-provider-alicloud/issues/3222)) -- fix cs_edge_kubernetes missing force_update parameter ([#3220](https://github.com/aliyun/terraform-provider-alicloud/issues/3220)) -- testcast/tsdb_instance: fix valid zones ([#3213](https://github.com/aliyun/terraform-provider-alicloud/issues/3213)) -- datasource/alicloud_api_gateway_apis: fix testcaas error ([#3210](https://github.com/aliyun/terraform-provider-alicloud/issues/3210)) +- fix some test case([#3222](https://github.com/aliyun/terraform-provider-alicloud/issues/3222)) +- fix cs_edge_kubernetes missing force_update parameter([#3220](https://github.com/aliyun/terraform-provider-alicloud/issues/3220)) +- testcast/tsdb_instance: fix valid zones([#3213](https://github.com/aliyun/terraform-provider-alicloud/issues/3213)) +- datasource/alicloud_api_gateway_apis: fix testcaas error([#3210](https://github.com/aliyun/terraform-provider-alicloud/issues/3210)) ## 1.112.0 (January 12, 2021) -- **New Resource:** `alicloud_ga_bandwidth_package` ([#3194](https://github.com/aliyun/terraform-provider-alicloud/issues/3194)) -- **New Resource:** `alicloud_tsdb_instance` ([#3192](https://github.com/aliyun/terraform-provider-alicloud/issues/3192)) -- **Data Source:** `alicloud_ga_bandwidth_packages` ([#3194](https://github.com/aliyun/terraform-provider-alicloud/issues/3194)) -- **Data Source:** `alicloud_tsdb_instances` ([#3192](https://github.com/aliyun/terraform-provider-alicloud/issues/3192)) -- **Data Source:** `alicloud_tsdb_zones` ([#3192](https://github.com/aliyun/terraform-provider-alicloud/issues/3192)) -- **Data Source:** `alicloud_fc_service` ([#3191](https://github.com/aliyun/terraform-provider-alicloud/issues/3191)) +- **New Resource:** `alicloud_ga_bandwidth_package`([#3194](https://github.com/aliyun/terraform-provider-alicloud/issues/3194)) +- **New Resource:** `alicloud_tsdb_instance`([#3192](https://github.com/aliyun/terraform-provider-alicloud/issues/3192)) +- **Data Source:** `alicloud_ga_bandwidth_packages`([#3194](https://github.com/aliyun/terraform-provider-alicloud/issues/3194)) +- **Data Source:** `alicloud_tsdb_instances`([#3192](https://github.com/aliyun/terraform-provider-alicloud/issues/3192)) +- **Data Source:** `alicloud_tsdb_zones`([#3192](https://github.com/aliyun/terraform-provider-alicloud/issues/3192)) +- **Data Source:** `alicloud_fc_service`([#3191](https://github.com/aliyun/terraform-provider-alicloud/issues/3191)) IMPROVEMENTS: -- Feature/modify tde with custom key for mysql ([#3208](https://github.com/aliyun/terraform-provider-alicloud/issues/3208)) -- sync the alikafka sdk vendor ([#3206](https://github.com/aliyun/terraform-provider-alicloud/issues/3206)) -- change actiontrail to common ([#3193](https://github.com/aliyun/terraform-provider-alicloud/issues/3193)) -- improve slb test cases ([#3188](https://github.com/aliyun/terraform-provider-alicloud/issues/3188)) -- mysql ModifyDBInstanceTDE support custom EncryptionKey ([#3186](https://github.com/aliyun/terraform-provider-alicloud/issues/3186)) -- change mse cluster to common ([#3184](https://github.com/aliyun/terraform-provider-alicloud/issues/3184)) -- alikafka support new params when create instance ([#3183](https://github.com/aliyun/terraform-provider-alicloud/issues/3183)) -- update changelog ([#3180](https://github.com/aliyun/terraform-provider-alicloud/issues/3180)) -- resource/alicloud_vpc: supports new attribute secondary_cidr_blocks ([#3152](https://github.com/aliyun/terraform-provider-alicloud/issues/3152)) +- Feature/modify tde with custom key for mysql([#3208](https://github.com/aliyun/terraform-provider-alicloud/issues/3208)) +- sync the alikafka sdk vendor([#3206](https://github.com/aliyun/terraform-provider-alicloud/issues/3206)) +- change actiontrail to common([#3193](https://github.com/aliyun/terraform-provider-alicloud/issues/3193)) +- improve slb test cases([#3188](https://github.com/aliyun/terraform-provider-alicloud/issues/3188)) +- mysql ModifyDBInstanceTDE support custom EncryptionKey([#3186](https://github.com/aliyun/terraform-provider-alicloud/issues/3186)) +- change mse cluster to common([#3184](https://github.com/aliyun/terraform-provider-alicloud/issues/3184)) +- alikafka support new params when create instance([#3183](https://github.com/aliyun/terraform-provider-alicloud/issues/3183)) +- update changelog([#3180](https://github.com/aliyun/terraform-provider-alicloud/issues/3180)) +- resource/alicloud_vpc: supports new attribute secondary_cidr_blocks([#3152](https://github.com/aliyun/terraform-provider-alicloud/issues/3152)) BUG FIXES: -- resource/alicloud_alikafka_instance: fix test case param error ([#3203](https://github.com/aliyun/terraform-provider-alicloud/issues/3203)) -- fix/alicloud_slb: fix the diff bug when setting ipv6 ([#3187](https://github.com/aliyun/terraform-provider-alicloud/issues/3187)) -- fix/provider: improve endpoint when building a new client ([#3185](https://github.com/aliyun/terraform-provider-alicloud/issues/3185)) +- resource/alicloud_alikafka_instance: fix test case param error([#3203](https://github.com/aliyun/terraform-provider-alicloud/issues/3203)) +- fix/alicloud_slb: fix the diff bug when setting ipv6([#3187](https://github.com/aliyun/terraform-provider-alicloud/issues/3187)) +- fix/provider: improve endpoint when building a new client([#3185](https://github.com/aliyun/terraform-provider-alicloud/issues/3185)) ## 1.111.0 (December 31, 2020) -- **New Resource:** `alicloud_ga_listener` ([#3173](https://github.com/aliyun/terraform-provider-alicloud/issues/3173)) -- **New Resource:** `alicloud_resource_manager_shared_resource` ([#3168](https://github.com/aliyun/terraform-provider-alicloud/issues/3168)) -- **New Resource:** `alicloud_resource_manager_shared_target` ([#3168](https://github.com/aliyun/terraform-provider-alicloud/issues/3168)) -- **New Resource:** `alicloud_eci_container_group` ([#3166](https://github.com/aliyun/terraform-provider-alicloud/issues/3166)) -- **New Resource:** `alicloud_privatelink_vpc_endpoint_zone` ([#3163](https://github.com/aliyun/terraform-provider-alicloud/issues/3163)) -- **New Resource:** `alicloud_ga_accelerator` ([#3162](https://github.com/aliyun/terraform-provider-alicloud/issues/3162)) -- **New Resource:** `alicloud_resource_manager_resource_share` ([#3158](https://github.com/aliyun/terraform-provider-alicloud/issues/3158)) -- **Data Source:** `alicloud_dcdn_service` ([#3177](https://github.com/aliyun/terraform-provider-alicloud/issues/3177)) -- **Data Source:** `alicloud_ga_listeners` ([#3173](https://github.com/aliyun/terraform-provider-alicloud/issues/3173)) -- **Data Source:** `alicloud_resource_manager_shared_resources` ([#3168](https://github.com/aliyun/terraform-provider-alicloud/issues/3168)) -- **Data Source:** `alicloud_resource_manager_shared_targets` ([#3168](https://github.com/aliyun/terraform-provider-alicloud/issues/3168)) -- **Data Source:** `alicloud_datahub_service` ([#3167](https://github.com/aliyun/terraform-provider-alicloud/issues/3167)) -- **Data Source:** `alicloud_eci_container_groups` ([#3166](https://github.com/aliyun/terraform-provider-alicloud/issues/3166)) -- **Data Source:** `alicloud_ons_service` ([#3164](https://github.com/aliyun/terraform-provider-alicloud/issues/3164)) -- **Data Source:** `alicloud_privatelink_vpc_endpoint_zones` ([#3163](https://github.com/aliyun/terraform-provider-alicloud/issues/3163)) -- **Data Source:** `alicloud_ga_accelerators` ([#3162](https://github.com/aliyun/terraform-provider-alicloud/issues/3162)) -- **Data Source:** `alicloud_cms_service` ([#3161](https://github.com/aliyun/terraform-provider-alicloud/issues/3161)) -- **Data Source:** `alicloud_resource_manager_resource_shares` ([#3158](https://github.com/aliyun/terraform-provider-alicloud/issues/3158)) - -IMPROVEMENTS: - -- resource/alicloud_db_account_privilege: add retry for error InvalidDBNotFound ([#3176](https://github.com/aliyun/terraform-provider-alicloud/issues/3176)) -- data/alicloud_kms_service: adding note for terms of service ([#3175](https://github.com/aliyun/terraform-provider-alicloud/issues/3175)) -- resource/alicloud_privatelink_xxx: update security_group_id to security_group_ids ([#3172](https://github.com/aliyun/terraform-provider-alicloud/issues/3172)) -- Feature: alicloud_cs_kubernetes_node_pool support autoscaling nodepool ([#3171](https://github.com/aliyun/terraform-provider-alicloud/issues/3171)) -- Modify the method of setting id for cms_site_monitor resource ([#3170](https://github.com/aliyun/terraform-provider-alicloud/issues/3170)) -- resource/alicloud_log_project: supports Tags ([#3169](https://github.com/aliyun/terraform-provider-alicloud/issues/3169)) -- Add Not Found error for DescribeMetricRuleList Api ([#3160](https://github.com/aliyun/terraform-provider-alicloud/issues/3160)) -- update changelog ([#3159](https://github.com/aliyun/terraform-provider-alicloud/issues/3159)) - -BUG FIXES: - -- resource/alicloud_db_account_privilege: fix deleting other privileges bug ([#3178](https://github.com/aliyun/terraform-provider-alicloud/issues/3178)) -- fix pvtz_zone_record paging error ([#3165](https://github.com/aliyun/terraform-provider-alicloud/issues/3165)) +- **New Resource:** `alicloud_ga_listener`([#3173](https://github.com/aliyun/terraform-provider-alicloud/issues/3173)) +- **New Resource:** `alicloud_resource_manager_shared_resource`([#3168](https://github.com/aliyun/terraform-provider-alicloud/issues/3168)) +- **New Resource:** `alicloud_resource_manager_shared_target`([#3168](https://github.com/aliyun/terraform-provider-alicloud/issues/3168)) +- **New Resource:** `alicloud_eci_container_group`([#3166](https://github.com/aliyun/terraform-provider-alicloud/issues/3166)) +- **New Resource:** `alicloud_privatelink_vpc_endpoint_zone`([#3163](https://github.com/aliyun/terraform-provider-alicloud/issues/3163)) +- **New Resource:** `alicloud_ga_accelerator`([#3162](https://github.com/aliyun/terraform-provider-alicloud/issues/3162)) +- **New Resource:** `alicloud_resource_manager_resource_share`([#3158](https://github.com/aliyun/terraform-provider-alicloud/issues/3158)) +- **Data Source:** `alicloud_dcdn_service`([#3177](https://github.com/aliyun/terraform-provider-alicloud/issues/3177)) +- **Data Source:** `alicloud_ga_listeners`([#3173](https://github.com/aliyun/terraform-provider-alicloud/issues/3173)) +- **Data Source:** `alicloud_resource_manager_shared_resources`([#3168](https://github.com/aliyun/terraform-provider-alicloud/issues/3168)) +- **Data Source:** `alicloud_resource_manager_shared_targets`([#3168](https://github.com/aliyun/terraform-provider-alicloud/issues/3168)) +- **Data Source:** `alicloud_datahub_service`([#3167](https://github.com/aliyun/terraform-provider-alicloud/issues/3167)) +- **Data Source:** `alicloud_eci_container_groups`([#3166](https://github.com/aliyun/terraform-provider-alicloud/issues/3166)) +- **Data Source:** `alicloud_ons_service`([#3164](https://github.com/aliyun/terraform-provider-alicloud/issues/3164)) +- **Data Source:** `alicloud_privatelink_vpc_endpoint_zones`([#3163](https://github.com/aliyun/terraform-provider-alicloud/issues/3163)) +- **Data Source:** `alicloud_ga_accelerators`([#3162](https://github.com/aliyun/terraform-provider-alicloud/issues/3162)) +- **Data Source:** `alicloud_cms_service`([#3161](https://github.com/aliyun/terraform-provider-alicloud/issues/3161)) +- **Data Source:** `alicloud_resource_manager_resource_shares`([#3158](https://github.com/aliyun/terraform-provider-alicloud/issues/3158)) + +IMPROVEMENTS: + +- resource/alicloud_db_account_privilege: add retry for error InvalidDBNotFound([#3176](https://github.com/aliyun/terraform-provider-alicloud/issues/3176)) +- data/alicloud_kms_service: adding note for terms of service([#3175](https://github.com/aliyun/terraform-provider-alicloud/issues/3175)) +- resource/alicloud_privatelink_xxx: update security_group_id to security_group_ids([#3172](https://github.com/aliyun/terraform-provider-alicloud/issues/3172)) +- Feature: alicloud_cs_kubernetes_node_pool support autoscaling nodepool([#3171](https://github.com/aliyun/terraform-provider-alicloud/issues/3171)) +- Modify the method of setting id for cms_site_monitor resource([#3170](https://github.com/aliyun/terraform-provider-alicloud/issues/3170)) +- resource/alicloud_log_project: supports Tags([#3169](https://github.com/aliyun/terraform-provider-alicloud/issues/3169)) +- Add Not Found error for DescribeMetricRuleList Api([#3160](https://github.com/aliyun/terraform-provider-alicloud/issues/3160)) +- update changelog([#3159](https://github.com/aliyun/terraform-provider-alicloud/issues/3159)) + +BUG FIXES: + +- resource/alicloud_db_account_privilege: fix deleting other privileges bug([#3178](https://github.com/aliyun/terraform-provider-alicloud/issues/3178)) +- fix pvtz_zone_record paging error([#3165](https://github.com/aliyun/terraform-provider-alicloud/issues/3165)) ## 1.110.0 (December 26, 2020) -- **New Resource:** `alicloud_privatelink_vpc_endpoint_service_resource` ([#3154](https://github.com/aliyun/terraform-provider-alicloud/issues/3154)) -- **New Resource:** `alicloud_privatelink_vpc_endpoint_service_user` ([#3153](https://github.com/aliyun/terraform-provider-alicloud/issues/3153)) -- **New Resource:** `alicloud_privatelink_vpc_endpoint_connection` ([#3145](https://github.com/aliyun/terraform-provider-alicloud/issues/3145)) -- **Data Source:** `alicloud_privatelink_vpc_endpoint_service_resources` ([#3154](https://github.com/aliyun/terraform-provider-alicloud/issues/3154)) -- **Data Source:** `alicloud_privatelink_vpc_endpoint_service_users` ([#3153](https://github.com/aliyun/terraform-provider-alicloud/issues/3153)) -- **Data Source:** `alicloud_privatelink_vpc_endpoint_connections` ([#3145](https://github.com/aliyun/terraform-provider-alicloud/issues/3145)) +- **New Resource:** `alicloud_privatelink_vpc_endpoint_service_resource`([#3154](https://github.com/aliyun/terraform-provider-alicloud/issues/3154)) +- **New Resource:** `alicloud_privatelink_vpc_endpoint_service_user`([#3153](https://github.com/aliyun/terraform-provider-alicloud/issues/3153)) +- **New Resource:** `alicloud_privatelink_vpc_endpoint_connection`([#3145](https://github.com/aliyun/terraform-provider-alicloud/issues/3145)) +- **Data Source:** `alicloud_privatelink_vpc_endpoint_service_resources`([#3154](https://github.com/aliyun/terraform-provider-alicloud/issues/3154)) +- **Data Source:** `alicloud_privatelink_vpc_endpoint_service_users`([#3153](https://github.com/aliyun/terraform-provider-alicloud/issues/3153)) +- **Data Source:** `alicloud_privatelink_vpc_endpoint_connections`([#3145](https://github.com/aliyun/terraform-provider-alicloud/issues/3145)) IMPROVEMENTS: -- Feature/rds disk encryption for mysql ([#3156](https://github.com/aliyun/terraform-provider-alicloud/issues/3156)) -- resource disk_attachment support import ([#3151](https://github.com/aliyun/terraform-provider-alicloud/issues/3151)) -- Add NotFound Message for cms_alarm resource ([#3148](https://github.com/aliyun/terraform-provider-alicloud/issues/3148)) -- resource/alicloud_fnf_flow: Add enumerate value for 'type' ([#3146](https://github.com/aliyun/terraform-provider-alicloud/issues/3146)) -- update changelog ([#3142](https://github.com/aliyun/terraform-provider-alicloud/issues/3142)) -- resource/zone_attachment:upgrade zone_attachment to teadsl sdk ([#3125](https://github.com/aliyun/terraform-provider-alicloud/issues/3125)) -- rsource/alicloud_maxcompute_project: Generated by apispec ([#3087](https://github.com/aliyun/terraform-provider-alicloud/issues/3087)) +- Feature/rds disk encryption for mysql([#3156](https://github.com/aliyun/terraform-provider-alicloud/issues/3156)) +- resource disk_attachment support import([#3151](https://github.com/aliyun/terraform-provider-alicloud/issues/3151)) +- Add NotFound Message for cms_alarm resource([#3148](https://github.com/aliyun/terraform-provider-alicloud/issues/3148)) +- resource/alicloud_fnf_flow: Add enumerate value for 'type'([#3146](https://github.com/aliyun/terraform-provider-alicloud/issues/3146)) +- update changelog([#3142](https://github.com/aliyun/terraform-provider-alicloud/issues/3142)) +- resource/zone_attachment:upgrade zone_attachment to teadsl sdk([#3125](https://github.com/aliyun/terraform-provider-alicloud/issues/3125)) +- rsource/alicloud_maxcompute_project: Generated by apispec([#3087](https://github.com/aliyun/terraform-provider-alicloud/issues/3087)) BUG FIXES: -- datasource/fnf_flows,fnf_schedules: fix datasource ([#3157](https://github.com/aliyun/terraform-provider-alicloud/issues/3157)) -- resource/alicloud_security_group_rule: Fix batch creation bug ([#3149](https://github.com/aliyun/terraform-provider-alicloud/issues/3149)) +- datasource/fnf_flows,fnf_schedules: fix datasource([#3157](https://github.com/aliyun/terraform-provider-alicloud/issues/3157)) +- resource/alicloud_security_group_rule: Fix batch creation bug([#3149](https://github.com/aliyun/terraform-provider-alicloud/issues/3149)) ## 1.109.1 (December 21, 2020) IMPROVEMENTS: -- Feature: managedk8s support zero node, management nodepool and remove nodepool nodes ([#3140](https://github.com/aliyun/terraform-provider-alicloud/issues/3140)) +- Feature: managedk8s support zero node, management nodepool and remove nodepool nodes([#3140](https://github.com/aliyun/terraform-provider-alicloud/issues/3140)) BUG FIXES: -- resource/ecs_instance: fix the period bug ([#3130](https://github.com/aliyun/terraform-provider-alicloud/issues/3130)) +- resource/ecs_instance: fix the period bug([#3130](https://github.com/aliyun/terraform-provider-alicloud/issues/3130)) ## 1.109.0 (December 19, 2020) -- **New Resource:** `alicloud_privatelink_vpc_endpoint` ([#3134](https://github.com/aliyun/terraform-provider-alicloud/issues/3134)) -- **New Resource:** `alicloud_privatelink_vpc_endpoint_service` ([#3126](https://github.com/aliyun/terraform-provider-alicloud/issues/3126)) -- **Data Source:** `alicloud_privatelink_vpc_endpoints` ([#3134](https://github.com/aliyun/terraform-provider-alicloud/issues/3134)) -- **Data Source:** `alicloud_privatelink_vpc_endpoint_services` ([#3126](https://github.com/aliyun/terraform-provider-alicloud/issues/3126)) +- **New Resource:** `alicloud_privatelink_vpc_endpoint`([#3134](https://github.com/aliyun/terraform-provider-alicloud/issues/3134)) +- **New Resource:** `alicloud_privatelink_vpc_endpoint_service`([#3126](https://github.com/aliyun/terraform-provider-alicloud/issues/3126)) +- **Data Source:** `alicloud_privatelink_vpc_endpoints`([#3134](https://github.com/aliyun/terraform-provider-alicloud/issues/3134)) +- **Data Source:** `alicloud_privatelink_vpc_endpoint_services`([#3126](https://github.com/aliyun/terraform-provider-alicloud/issues/3126)) IMPROVEMENTS: -- Modify the Supported value of the attribute in the alicloud_elasticsearch_instance ([#3136](https://github.com/aliyun/terraform-provider-alicloud/issues/3136)) -- resource/alicloud_hbase_cluster: support new field immediate_delete_flag and cloud_essd ([#3133](https://github.com/aliyun/terraform-provider-alicloud/issues/3133)) -- resource/alicloud_db_backup_policy: remove the uncertain valid values ([#3132](https://github.com/aliyun/terraform-provider-alicloud/issues/3132)) -- UPDATE CHANGELOG ([#3124](https://github.com/aliyun/terraform-provider-alicloud/issues/3124)) -- Generator dcdn_domain resource and datasource by common api ([#3123](https://github.com/aliyun/terraform-provider-alicloud/issues/3123)) -- resource/alicloud_db_instance: support encryption_key for PG ([#3121](https://github.com/aliyun/terraform-provider-alicloud/issues/3121)) -- adapter zone record datasource and resource ([#3117](https://github.com/aliyun/terraform-provider-alicloud/issues/3117)) +- Modify the Supported value of the attribute in the alicloud_elasticsearch_instance([#3136](https://github.com/aliyun/terraform-provider-alicloud/issues/3136)) +- resource/alicloud_hbase_cluster: support new field immediate_delete_flag and cloud_essd([#3133](https://github.com/aliyun/terraform-provider-alicloud/issues/3133)) +- resource/alicloud_db_backup_policy: remove the uncertain valid values([#3132](https://github.com/aliyun/terraform-provider-alicloud/issues/3132)) +- UPDATE CHANGELOG([#3124](https://github.com/aliyun/terraform-provider-alicloud/issues/3124)) +- Generator dcdn_domain resource and datasource by common api([#3123](https://github.com/aliyun/terraform-provider-alicloud/issues/3123)) +- resource/alicloud_db_instance: support encryption_key for PG([#3121](https://github.com/aliyun/terraform-provider-alicloud/issues/3121)) +- adapter zone record datasource and resource([#3117](https://github.com/aliyun/terraform-provider-alicloud/issues/3117)) BUG FIXES: -- resource/alicloud_instance: fix ecs disk performance tf plan bug ([#3139](https://github.com/aliyun/terraform-provider-alicloud/issues/3139)) -- fix privatelink client code error ([#3129](https://github.com/aliyun/terraform-provider-alicloud/issues/3129)) +- resource/alicloud_instance: fix ecs disk performance tf plan bug([#3139](https://github.com/aliyun/terraform-provider-alicloud/issues/3139)) +- fix privatelink client code error([#3129](https://github.com/aliyun/terraform-provider-alicloud/issues/3129)) ## 1.108.0 (December 11, 2020) -- **New Resource:** `alicloud_ros_template` ([#3113](https://github.com/aliyun/terraform-provider-alicloud/issues/3113)) -- **Data Source:** `alicloud_kms_service` ([#3116](https://github.com/aliyun/terraform-provider-alicloud/issues/3116)) -- **Data Source:** `alicloud_ros_templates` ([#3113](https://github.com/aliyun/terraform-provider-alicloud/issues/3113)) +- **New Resource:** `alicloud_ros_template`([#3113](https://github.com/aliyun/terraform-provider-alicloud/issues/3113)) +- **Data Source:** `alicloud_kms_service`([#3116](https://github.com/aliyun/terraform-provider-alicloud/issues/3116)) +- **Data Source:** `alicloud_ros_templates`([#3113](https://github.com/aliyun/terraform-provider-alicloud/issues/3113)) IMPROVEMENTS: -- add ecs instance system_disk_performance_level and datadisk performamce_level params ([#3120](https://github.com/aliyun/terraform-provider-alicloud/issues/3120)) -- resource/alicloud_pvtz_zone: change to tea dsl sdk ([#3094](https://github.com/aliyun/terraform-provider-alicloud/issues/3094)) +- add ecs instance system_disk_performance_level and datadisk performamce_level params([#3120](https://github.com/aliyun/terraform-provider-alicloud/issues/3120)) +- resource/alicloud_pvtz_zone: change to tea dsl sdk([#3094](https://github.com/aliyun/terraform-provider-alicloud/issues/3094)) BUG FIXES: -- fix product pvtz gettting endpoint bug ([#3122](https://github.com/aliyun/terraform-provider-alicloud/issues/3122)) -- BugFix: v1.103.2 upgrade error, connections return error ([#3118](https://github.com/aliyun/terraform-provider-alicloud/issues/3118)) +- fix product pvtz gettting endpoint bug([#3122](https://github.com/aliyun/terraform-provider-alicloud/issues/3122)) +- BugFix: v1.103.2 upgrade error, connections return error([#3118](https://github.com/aliyun/terraform-provider-alicloud/issues/3118)) ## 1.107.0 (December 8, 2020) @@ -1616,7 +1941,7 @@ BUG FIXES: IMPROVEMENTS: -- resource/alicloud_instance: fix period does not work bug ([#3114](https://github.com/aliyun/terraform-provider-alicloud/issues/3114)) +- resource/alicloud_instance: fix period does not work bug([#3114](https://github.com/aliyun/terraform-provider-alicloud/issues/3114)) - Resource/pvtz_zone: Change IsEOFError to NeedRetry (([#3108](https://github.com/aliyun/terraform-provider-alicloud/issues/3108))) - resource/alicloud_kvstore_instance: Add a restriction !d.IsNewResource for the update of param private_connection_prefix. (([#3107](https://github.com/aliyun/terraform-provider-alicloud/issues/3107))) - Error: Change IsEOFError to NeedRerty (([#3106](https://github.com/aliyun/terraform-provider-alicloud/issues/3106))) @@ -1626,2131 +1951,2131 @@ IMPROVEMENTS: ## 1.106.0 (December 4, 2020) -- **New Resource:** `alicloud_ros_change_set` ([#3083](https://github.com/aliyun/terraform-provider-alicloud/issues/3083)) -- **Data Source:** `alicloud_hbase_instance_types` ([#3091](https://github.com/aliyun/terraform-provider-alicloud/issues/3091)) -- **Data Source:** `alicloud_ros_change_sets` ([#3083](https://github.com/aliyun/terraform-provider-alicloud/issues/3083)) +- **New Resource:** `alicloud_ros_change_set`([#3083](https://github.com/aliyun/terraform-provider-alicloud/issues/3083)) +- **Data Source:** `alicloud_hbase_instance_types`([#3091](https://github.com/aliyun/terraform-provider-alicloud/issues/3091)) +- **Data Source:** `alicloud_ros_change_sets`([#3083](https://github.com/aliyun/terraform-provider-alicloud/issues/3083)) IMPROVEMENTS: -- Add flow contral retry for alicloud_cms_site_monitor ([#3099](https://github.com/aliyun/terraform-provider-alicloud/issues/3099)) -- update ci pipeline ([#3098](https://github.com/aliyun/terraform-provider-alicloud/issues/3098)) -- datasource/ros: update datasource testcase name. ([#3097](https://github.com/aliyun/terraform-provider-alicloud/issues/3097)) +- Add flow contral retry for alicloud_cms_site_monitor([#3099](https://github.com/aliyun/terraform-provider-alicloud/issues/3099)) +- update ci pipeline([#3098](https://github.com/aliyun/terraform-provider-alicloud/issues/3098)) +- datasource/ros: update datasource testcase name.([#3097](https://github.com/aliyun/terraform-provider-alicloud/issues/3097)) BUG FIXES: -- fix create dbinstance type conversion error ([#3089](https://github.com/aliyun/terraform-provider-alicloud/issues/3089)) +- fix create dbinstance type conversion error([#3089](https://github.com/aliyun/terraform-provider-alicloud/issues/3089)) ## 1.105.0 (November 28, 2020) -- **New Resource:** `alicloud_fnf_schedule` ([#3078](https://github.com/aliyun/terraform-provider-alicloud/issues/3078)) -- **New Resource:** `alicloud_fnf_flow` ([#3057](https://github.com/aliyun/terraform-provider-alicloud/issues/3057)) -- **New Resource:** `alicloud_edas_k8s_application` ([#3039](https://github.com/aliyun/terraform-provider-alicloud/issues/3039)) -- **Data Source:** `alicloud_fnf_schedules` ([#3078](https://github.com/aliyun/terraform-provider-alicloud/issues/3078)) -- **Data Source:** `alicloud_fnf_flows` ([#3057](https://github.com/aliyun/terraform-provider-alicloud/issues/3057)) - -IMPROVEMENTS: - -- resource/alicloud_cs_kubernetes_node_pool:supports outputing asg id ([#3082](https://github.com/aliyun/terraform-provider-alicloud/issues/3082)) -- test/alicloud_kvstore_instance_test: Not test upgrade 2.0 to 4.0 for memcache ([#3077](https://github.com/aliyun/terraform-provider-alicloud/issues/3077)) -- resource/alicloud_ram_role: add attribute max_session_duration ([#3074](https://github.com/aliyun/terraform-provider-alicloud/issues/3074)) -- Add support to create fnf_flow region for test case and adjust the samplevalue of name in testcase ([#3073](https://github.com/aliyun/terraform-provider-alicloud/issues/3073)) -- add fnf_flow ci test ([#3071](https://github.com/aliyun/terraform-provider-alicloud/issues/3071)) -- resource/alicloud_kvstore_instance: Skip test for classic network instance ([#3069](https://github.com/aliyun/terraform-provider-alicloud/issues/3069)) -- resource/alicloud_kms_secret: Add retry strategy for update and delete ([#3068](https://github.com/aliyun/terraform-provider-alicloud/issues/3068)) -- resource/mongodb_sharding_instance: add tags argument ([#3061](https://github.com/aliyun/terraform-provider-alicloud/issues/3061)) -- resource/waf_instance,waf_domain: upgrade to teadsl sdk ([#3059](https://github.com/aliyun/terraform-provider-alicloud/issues/3059)) -- resource/alicloud_kvstore_instance: Support modify private connection string ([#3058](https://github.com/aliyun/terraform-provider-alicloud/issues/3058)) -- Update sdk to 1.61.684 and compatible with cms_alarm attribute type ([#3055](https://github.com/aliyun/terraform-provider-alicloud/issues/3055)) -- add a method to check whether an error is EOF ([#3054](https://github.com/aliyun/terraform-provider-alicloud/issues/3054)) -- enlarge sdk connect timeout to avoid network error ([#3052](https://github.com/aliyun/terraform-provider-alicloud/issues/3052)) -- resource/alicloud_db_readwrite_splitting_connection:upgrade resource teadsl sdk ([#3051](https://github.com/aliyun/terraform-provider-alicloud/issues/3051)) -- update changelog ([#3050](https://github.com/aliyun/terraform-provider-alicloud/issues/3050)) -- resource/alicloud_hbase_instance: supports more resource attributes ([#3035](https://github.com/aliyun/terraform-provider-alicloud/issues/3035)) -- make sure LB is active before creating vgroups ([#2700](https://github.com/aliyun/terraform-provider-alicloud/issues/2700)) - -BUG FIXES: - -- resource/alicloud_db_instance: fix db eof error ([#3081](https://github.com/aliyun/terraform-provider-alicloud/issues/3081)) -- fix var name for account type in alicloud_db_account ([#3076](https://github.com/aliyun/terraform-provider-alicloud/issues/3076)) -- resource/alicloud_instance: fix the period diff error when auto_renew is true ([#3072](https://github.com/aliyun/terraform-provider-alicloud/issues/3072)) -- fix managedK8s connections return null, Detach the default node pool node and support: certificate_authority ([#3070](https://github.com/aliyun/terraform-provider-alicloud/issues/3070)) -- resource/alicloud_db_backup_policy: fix InvalidParameters error ([#3067](https://github.com/aliyun/terraform-provider-alicloud/issues/3067)) -- fix acl update only ingress or egress error ([#3064](https://github.com/aliyun/terraform-provider-alicloud/issues/3064)) -- fix rds teadsl setting autoretry and add `Post https` error retry ([#3053](https://github.com/aliyun/terraform-provider-alicloud/issues/3053)) +- **New Resource:** `alicloud_fnf_schedule`([#3078](https://github.com/aliyun/terraform-provider-alicloud/issues/3078)) +- **New Resource:** `alicloud_fnf_flow`([#3057](https://github.com/aliyun/terraform-provider-alicloud/issues/3057)) +- **New Resource:** `alicloud_edas_k8s_application`([#3039](https://github.com/aliyun/terraform-provider-alicloud/issues/3039)) +- **Data Source:** `alicloud_fnf_schedules`([#3078](https://github.com/aliyun/terraform-provider-alicloud/issues/3078)) +- **Data Source:** `alicloud_fnf_flows`([#3057](https://github.com/aliyun/terraform-provider-alicloud/issues/3057)) + +IMPROVEMENTS: + +- resource/alicloud_cs_kubernetes_node_pool:supports outputing asg id([#3082](https://github.com/aliyun/terraform-provider-alicloud/issues/3082)) +- test/alicloud_kvstore_instance_test: Not test upgrade 2.0 to 4.0 for memcache([#3077](https://github.com/aliyun/terraform-provider-alicloud/issues/3077)) +- resource/alicloud_ram_role: add attribute max_session_duration([#3074](https://github.com/aliyun/terraform-provider-alicloud/issues/3074)) +- Add support to create fnf_flow region for test case and adjust the samplevalue of name in testcase([#3073](https://github.com/aliyun/terraform-provider-alicloud/issues/3073)) +- add fnf_flow ci test([#3071](https://github.com/aliyun/terraform-provider-alicloud/issues/3071)) +- resource/alicloud_kvstore_instance: Skip test for classic network instance([#3069](https://github.com/aliyun/terraform-provider-alicloud/issues/3069)) +- resource/alicloud_kms_secret: Add retry strategy for update and delete([#3068](https://github.com/aliyun/terraform-provider-alicloud/issues/3068)) +- resource/mongodb_sharding_instance: add tags argument([#3061](https://github.com/aliyun/terraform-provider-alicloud/issues/3061)) +- resource/waf_instance,waf_domain: upgrade to teadsl sdk([#3059](https://github.com/aliyun/terraform-provider-alicloud/issues/3059)) +- resource/alicloud_kvstore_instance: Support modify private connection string([#3058](https://github.com/aliyun/terraform-provider-alicloud/issues/3058)) +- Update sdk to 1.61.684 and compatible with cms_alarm attribute type([#3055](https://github.com/aliyun/terraform-provider-alicloud/issues/3055)) +- add a method to check whether an error is EOF([#3054](https://github.com/aliyun/terraform-provider-alicloud/issues/3054)) +- enlarge sdk connect timeout to avoid network error([#3052](https://github.com/aliyun/terraform-provider-alicloud/issues/3052)) +- resource/alicloud_db_readwrite_splitting_connection:upgrade resource teadsl sdk([#3051](https://github.com/aliyun/terraform-provider-alicloud/issues/3051)) +- update changelog([#3050](https://github.com/aliyun/terraform-provider-alicloud/issues/3050)) +- resource/alicloud_hbase_instance: supports more resource attributes([#3035](https://github.com/aliyun/terraform-provider-alicloud/issues/3035)) +- make sure LB is active before creating vgroups([#2700](https://github.com/aliyun/terraform-provider-alicloud/issues/2700)) + +BUG FIXES: + +- resource/alicloud_db_instance: fix db eof error([#3081](https://github.com/aliyun/terraform-provider-alicloud/issues/3081)) +- fix var name for account type in alicloud_db_account([#3076](https://github.com/aliyun/terraform-provider-alicloud/issues/3076)) +- resource/alicloud_instance: fix the period diff error when auto_renew is true([#3072](https://github.com/aliyun/terraform-provider-alicloud/issues/3072)) +- fix managedK8s connections return null, Detach the default node pool node and support: certificate_authority([#3070](https://github.com/aliyun/terraform-provider-alicloud/issues/3070)) +- resource/alicloud_db_backup_policy: fix InvalidParameters error([#3067](https://github.com/aliyun/terraform-provider-alicloud/issues/3067)) +- fix acl update only ingress or egress error([#3064](https://github.com/aliyun/terraform-provider-alicloud/issues/3064)) +- fix rds teadsl setting autoretry and add `Post https` error retry([#3053](https://github.com/aliyun/terraform-provider-alicloud/issues/3053)) ## 1.104.0 (November 20, 2020) -- **New Resource:** `alicloud_cms_group_metric_rule` ([#3044](https://github.com/aliyun/terraform-provider-alicloud/issues/3044)) -- **New Resource:** `alicloud_fc_alias` ([#3038](https://github.com/aliyun/terraform-provider-alicloud/issues/3038)) -- **Data Source:** `alicloud_cms_group_metric_rules` ([#3044](https://github.com/aliyun/terraform-provider-alicloud/issues/3044)) +- **New Resource:** `alicloud_cms_group_metric_rule`([#3044](https://github.com/aliyun/terraform-provider-alicloud/issues/3044)) +- **New Resource:** `alicloud_fc_alias`([#3038](https://github.com/aliyun/terraform-provider-alicloud/issues/3038)) +- **Data Source:** `alicloud_cms_group_metric_rules`([#3044](https://github.com/aliyun/terraform-provider-alicloud/issues/3044)) IMPROVEMENTS: -- resource/alicloud_kvstore_instance: Add ModifyBackupPolicy for resource and Deprecated alicloud_kvstore_backup_policy ([#3049](https://github.com/aliyun/terraform-provider-alicloud/issues/3049)) -- Modify NewCommonRequest endpoint loading method ([#3047](https://github.com/aliyun/terraform-provider-alicloud/issues/3047)) -- supports Finance and Gov region ([#3046](https://github.com/aliyun/terraform-provider-alicloud/issues/3046)) -- resource/alicloud_db_connection:upgrade teadsl sdk ([#3045](https://github.com/aliyun/terraform-provider-alicloud/issues/3045)) -- resource/alicloud_db_readonly_instance:upgrade teadsl sdk ([#3043](https://github.com/aliyun/terraform-provider-alicloud/issues/3043)) -- config/rule: Update config rule attribute and add sweep function for config rule ([#3042](https://github.com/aliyun/terraform-provider-alicloud/issues/3042)) -- resource/alicloud_db_database:upgrade teadsl sdk ([#3040](https://github.com/aliyun/terraform-provider-alicloud/issues/3040)) -- resource/alicloud_db_instance:upgrade teadsl sdk ([#3036](https://github.com/aliyun/terraform-provider-alicloud/issues/3036)) -- resource/alicloud_slb_listener: Supporting new field ca_certificate_id ([#3033](https://github.com/aliyun/terraform-provider-alicloud/issues/3033)) -- resource/alicloud_db_backup_policy:upgrade teadsl sdk ([#3031](https://github.com/aliyun/terraform-provider-alicloud/issues/3031)) -- Convert ons_instance to common Api ([#3029](https://github.com/aliyun/terraform-provider-alicloud/issues/3029)) -- resource/alicloud_db_account_privilege:upgrade to teadsl sdk ([#3027](https://github.com/aliyun/terraform-provider-alicloud/issues/3027)) -- correct docs provider version from 1.104.0 to 1.103.2 ([#3026](https://github.com/aliyun/terraform-provider-alicloud/issues/3026)) -- resource/alicloud_db_account:adapt to teadsl sdk and support temporary ak ([#3025](https://github.com/aliyun/terraform-provider-alicloud/issues/3025)) -- update changelog ([#3024](https://github.com/aliyun/terraform-provider-alicloud/issues/3024)) +- resource/alicloud_kvstore_instance: Add ModifyBackupPolicy for resource and Deprecated alicloud_kvstore_backup_policy([#3049](https://github.com/aliyun/terraform-provider-alicloud/issues/3049)) +- Modify NewCommonRequest endpoint loading method([#3047](https://github.com/aliyun/terraform-provider-alicloud/issues/3047)) +- supports Finance and Gov region([#3046](https://github.com/aliyun/terraform-provider-alicloud/issues/3046)) +- resource/alicloud_db_connection:upgrade teadsl sdk([#3045](https://github.com/aliyun/terraform-provider-alicloud/issues/3045)) +- resource/alicloud_db_readonly_instance:upgrade teadsl sdk([#3043](https://github.com/aliyun/terraform-provider-alicloud/issues/3043)) +- config/rule: Update config rule attribute and add sweep function for config rule([#3042](https://github.com/aliyun/terraform-provider-alicloud/issues/3042)) +- resource/alicloud_db_database:upgrade teadsl sdk([#3040](https://github.com/aliyun/terraform-provider-alicloud/issues/3040)) +- resource/alicloud_db_instance:upgrade teadsl sdk([#3036](https://github.com/aliyun/terraform-provider-alicloud/issues/3036)) +- resource/alicloud_slb_listener: Supporting new field ca_certificate_id([#3033](https://github.com/aliyun/terraform-provider-alicloud/issues/3033)) +- resource/alicloud_db_backup_policy:upgrade teadsl sdk([#3031](https://github.com/aliyun/terraform-provider-alicloud/issues/3031)) +- Convert ons_instance to common Api([#3029](https://github.com/aliyun/terraform-provider-alicloud/issues/3029)) +- resource/alicloud_db_account_privilege:upgrade to teadsl sdk([#3027](https://github.com/aliyun/terraform-provider-alicloud/issues/3027)) +- correct docs provider version from 1.104.0 to 1.103.2([#3026](https://github.com/aliyun/terraform-provider-alicloud/issues/3026)) +- resource/alicloud_db_account:adapt to teadsl sdk and support temporary ak([#3025](https://github.com/aliyun/terraform-provider-alicloud/issues/3025)) +- update changelog([#3024](https://github.com/aliyun/terraform-provider-alicloud/issues/3024)) BUG FIXES: -- fix:get db readwrite splitting connection ([#3032](https://github.com/aliyun/terraform-provider-alicloud/issues/3032)) -- Fixed bug of converting charge_tyep to Prepaid ([#3028](https://github.com/aliyun/terraform-provider-alicloud/issues/3028)) +- fix:get db readwrite splitting connection([#3032](https://github.com/aliyun/terraform-provider-alicloud/issues/3032)) +- Fixed bug of converting charge_tyep to Prepaid([#3028](https://github.com/aliyun/terraform-provider-alicloud/issues/3028)) ## 1.103.2 (November 14, 2020) IMPROVEMENTS: -- resource/alicloud_readonly_instance: Enlarging the createing timeout to 60min ([#3023](https://github.com/aliyun/terraform-provider-alicloud/issues/3023)) -- TestCase/Cen: Add sweep function for cen_instance_attachemt and cen_route_service ([#3022](https://github.com/aliyun/terraform-provider-alicloud/issues/3022)) -- resource/alicloud_db_instance: Improve its testcase by adding timeouts for vswitch ([#3020](https://github.com/aliyun/terraform-provider-alicloud/issues/3020)) -- Updata alibaba-cloud-sdk-go to v1.61.623 and make the drds_instance struct compatible ([#3017](https://github.com/aliyun/terraform-provider-alicloud/issues/3017)) -- Add asynchronous for kms secret ([#3007](https://github.com/aliyun/terraform-provider-alicloud/issues/3007)) -- resource/alicloud_pvtz_zone_record: Support setting new attribute remark ([#3006](https://github.com/aliyun/terraform-provider-alicloud/issues/3006)) -- resource/alicloud_kvstore_instance: Add constant auto_pay for kvstore api ModifyInstanceSpec ([#3003](https://github.com/aliyun/terraform-provider-alicloud/issues/3003)) -- Cleanup after release 1.103.1 ([#2997](https://github.com/aliyun/terraform-provider-alicloud/issues/2997)) -- update changelog ([#2993](https://github.com/aliyun/terraform-provider-alicloud/issues/2993)) -- Create cluster parameters aligned with the ACK ([#2990](https://github.com/aliyun/terraform-provider-alicloud/issues/2990)) +- resource/alicloud_readonly_instance: Enlarging the createing timeout to 60min([#3023](https://github.com/aliyun/terraform-provider-alicloud/issues/3023)) +- TestCase/Cen: Add sweep function for cen_instance_attachemt and cen_route_service([#3022](https://github.com/aliyun/terraform-provider-alicloud/issues/3022)) +- resource/alicloud_db_instance: Improve its testcase by adding timeouts for vswitch([#3020](https://github.com/aliyun/terraform-provider-alicloud/issues/3020)) +- Updata alibaba-cloud-sdk-go to v1.61.623 and make the drds_instance struct compatible([#3017](https://github.com/aliyun/terraform-provider-alicloud/issues/3017)) +- Add asynchronous for kms secret([#3007](https://github.com/aliyun/terraform-provider-alicloud/issues/3007)) +- resource/alicloud_pvtz_zone_record: Support setting new attribute remark([#3006](https://github.com/aliyun/terraform-provider-alicloud/issues/3006)) +- resource/alicloud_kvstore_instance: Add constant auto_pay for kvstore api ModifyInstanceSpec([#3003](https://github.com/aliyun/terraform-provider-alicloud/issues/3003)) +- Cleanup after release 1.103.1([#2997](https://github.com/aliyun/terraform-provider-alicloud/issues/2997)) +- update changelog([#2993](https://github.com/aliyun/terraform-provider-alicloud/issues/2993)) +- Create cluster parameters aligned with the ACK([#2990](https://github.com/aliyun/terraform-provider-alicloud/issues/2990)) BUG FIXES: -- resource/alicloud_elasticsearch_instance: fix schema details for 'description' and 'zone_count' ([#3018](https://github.com/aliyun/terraform-provider-alicloud/issues/3018)) +- resource/alicloud_elasticsearch_instance: fix schema details for 'description' and 'zone_count'([#3018](https://github.com/aliyun/terraform-provider-alicloud/issues/3018)) ## 1.103.1 (November 06, 2020) IMPROVEMENTS: -- ci test supports network acl ([#2995](https://github.com/aliyun/terraform-provider-alicloud/issues/2995)) -- Increase sls retry type ([#2992](https://github.com/aliyun/terraform-provider-alicloud/issues/2992)) -- Modify the order of updating the interface ([#2983](https://github.com/aliyun/terraform-provider-alicloud/issues/2983)) -- Modify the way of obtaining Drds instance vpc id ([#2981](https://github.com/aliyun/terraform-provider-alicloud/issues/2981)) -- update changelog ([#2978](https://github.com/aliyun/terraform-provider-alicloud/issues/2978)) +- ci test supports network acl([#2995](https://github.com/aliyun/terraform-provider-alicloud/issues/2995)) +- Increase sls retry type([#2992](https://github.com/aliyun/terraform-provider-alicloud/issues/2992)) +- Modify the order of updating the interface([#2983](https://github.com/aliyun/terraform-provider-alicloud/issues/2983)) +- Modify the way of obtaining Drds instance vpc id([#2981](https://github.com/aliyun/terraform-provider-alicloud/issues/2981)) +- update changelog([#2978](https://github.com/aliyun/terraform-provider-alicloud/issues/2978)) BUG FIXES: -- fix(alicloud_eip): delete it failed error ([#2996](https://github.com/aliyun/terraform-provider-alicloud/issues/2996)) -- fix client bug when loading endpoint ([#2994](https://github.com/aliyun/terraform-provider-alicloud/issues/2994)) -- fix network acl error ([#2986](https://github.com/aliyun/terraform-provider-alicloud/issues/2986)) -- fix auto_provisioning_group and reserved_instance set attribute failed bug ([#2972](https://github.com/aliyun/terraform-provider-alicloud/issues/2972)) +- fix(alicloud_eip): delete it failed error([#2996](https://github.com/aliyun/terraform-provider-alicloud/issues/2996)) +- fix client bug when loading endpoint([#2994](https://github.com/aliyun/terraform-provider-alicloud/issues/2994)) +- fix network acl error([#2986](https://github.com/aliyun/terraform-provider-alicloud/issues/2986)) +- fix auto_provisioning_group and reserved_instance set attribute failed bug([#2972](https://github.com/aliyun/terraform-provider-alicloud/issues/2972)) ## 1.103.0 (October 30, 2020) -- **New Resource:** `alicloud_cs_edge_kubernetes` ([#2871](https://github.com/aliyun/terraform-provider-alicloud/issues/2871)) -- **Data Source:** `alicloud_cs_edge_kubernetes_clusters` ([#2871](https://github.com/aliyun/terraform-provider-alicloud/issues/2871)) +- **New Resource:** `alicloud_cs_edge_kubernetes`([#2871](https://github.com/aliyun/terraform-provider-alicloud/issues/2871)) +- **Data Source:** `alicloud_cs_edge_kubernetes_clusters`([#2871](https://github.com/aliyun/terraform-provider-alicloud/issues/2871)) IMPROVEMENTS: -- improve fc service docs ([#2975](https://github.com/aliyun/terraform-provider-alicloud/issues/2975)) -- improve memcache test case ([#2974](https://github.com/aliyun/terraform-provider-alicloud/issues/2974)) -- change nat bandwidth pachage to use commonApi instead of sdk ([#2971](https://github.com/aliyun/terraform-provider-alicloud/issues/2971)) -- Support modify maintain time for kvstore instance and Supplementary documentation for kvstore connection ([#2962](https://github.com/aliyun/terraform-provider-alicloud/issues/2962)) -- improve(slb) update slb listener scheduler ([#2960](https://github.com/aliyun/terraform-provider-alicloud/issues/2960)) -- update changelog ([#2959](https://github.com/aliyun/terraform-provider-alicloud/issues/2959)) -- change sdk to common api ([#2958](https://github.com/aliyun/terraform-provider-alicloud/issues/2958)) -- add sweep for Resource Manager testcase ([#2955](https://github.com/aliyun/terraform-provider-alicloud/issues/2955)) +- improve fc service docs([#2975](https://github.com/aliyun/terraform-provider-alicloud/issues/2975)) +- improve memcache test case([#2974](https://github.com/aliyun/terraform-provider-alicloud/issues/2974)) +- change nat bandwidth pachage to use commonApi instead of sdk([#2971](https://github.com/aliyun/terraform-provider-alicloud/issues/2971)) +- Support modify maintain time for kvstore instance and Supplementary documentation for kvstore connection([#2962](https://github.com/aliyun/terraform-provider-alicloud/issues/2962)) +- improve(slb) update slb listener scheduler([#2960](https://github.com/aliyun/terraform-provider-alicloud/issues/2960)) +- update changelog([#2959](https://github.com/aliyun/terraform-provider-alicloud/issues/2959)) +- change sdk to common api([#2958](https://github.com/aliyun/terraform-provider-alicloud/issues/2958)) +- add sweep for Resource Manager testcase([#2955](https://github.com/aliyun/terraform-provider-alicloud/issues/2955)) BUG FIXES: -- fix API Gateway App list tags failed ([#2973](https://github.com/aliyun/terraform-provider-alicloud/issues/2973)) -- fix the managed k8s does not display connections information ([#2970](https://github.com/aliyun/terraform-provider-alicloud/issues/2970)) -- Fix cdn_domain_config import bug ([#2967](https://github.com/aliyun/terraform-provider-alicloud/issues/2967)) -- fix(alicloud_kvstore_instance): security_group_id diff error and SSLDisableStateExistsFault error ([#2963](https://github.com/aliyun/terraform-provider-alicloud/issues/2963)) +- fix API Gateway App list tags failed([#2973](https://github.com/aliyun/terraform-provider-alicloud/issues/2973)) +- fix the managed k8s does not display connections information([#2970](https://github.com/aliyun/terraform-provider-alicloud/issues/2970)) +- Fix cdn_domain_config import bug([#2967](https://github.com/aliyun/terraform-provider-alicloud/issues/2967)) +- fix(alicloud_kvstore_instance): security_group_id diff error and SSLDisableStateExistsFault error([#2963](https://github.com/aliyun/terraform-provider-alicloud/issues/2963)) ## 1.102.0 (October 23, 2020) -- **Data Source:** `alicloud_kvstore_accounts` ([#2952](https://github.com/aliyun/terraform-provider-alicloud/issues/2952)) -- **Data Source:** `alicloud_enhanced_nat_available_zones` ([#2907](https://github.com/aliyun/terraform-provider-alicloud/issues/2907)) +- **Data Source:** `alicloud_kvstore_accounts`([#2952](https://github.com/aliyun/terraform-provider-alicloud/issues/2952)) +- **Data Source:** `alicloud_enhanced_nat_available_zones`([#2907](https://github.com/aliyun/terraform-provider-alicloud/issues/2907)) IMPROVEMENTS: -- improve ci test by removing debug print ([#2954](https://github.com/aliyun/terraform-provider-alicloud/issues/2954)) -- improve validation of resource alicloud_polardb_endpoint_address's parameter connection_prefix ([#2953](https://github.com/aliyun/terraform-provider-alicloud/issues/2953)) -- Resource alicloud_adb_clusters add optional parameter: status and improve validation of resource alicloud_adb_connection's parameter connection_prefix ([#2949](https://github.com/aliyun/terraform-provider-alicloud/issues/2949)) -- add example usage for RDS Instance ([#2945](https://github.com/aliyun/terraform-provider-alicloud/issues/2945)) -- Support multiple security_group_id and Set connection_domain as output param ([#2943](https://github.com/aliyun/terraform-provider-alicloud/issues/2943)) -- support new region cn-guangzhou ([#2941](https://github.com/aliyun/terraform-provider-alicloud/issues/2941)) -- support datasource for CEN Route Service ([#2939](https://github.com/aliyun/terraform-provider-alicloud/issues/2939)) -- improve cas certificate testcase ([#2936](https://github.com/aliyun/terraform-provider-alicloud/issues/2936)) -- applying tea dsl sdk to vpc resource ([#2935](https://github.com/aliyun/terraform-provider-alicloud/issues/2935)) -- using tea dsl sdk to init client ([#2934](https://github.com/aliyun/terraform-provider-alicloud/issues/2934)) -- update changelog ([#2928](https://github.com/aliyun/terraform-provider-alicloud/issues/2928)) -- feat: resource ess_scaling_group suppors new field group_deletion_protection ([#2927](https://github.com/aliyun/terraform-provider-alicloud/issues/2927)) +- improve ci test by removing debug print([#2954](https://github.com/aliyun/terraform-provider-alicloud/issues/2954)) +- improve validation of resource alicloud_polardb_endpoint_address's parameter connection_prefix([#2953](https://github.com/aliyun/terraform-provider-alicloud/issues/2953)) +- Resource alicloud_adb_clusters add optional parameter: status and improve validation of resource alicloud_adb_connection's parameter connection_prefix([#2949](https://github.com/aliyun/terraform-provider-alicloud/issues/2949)) +- add example usage for RDS Instance([#2945](https://github.com/aliyun/terraform-provider-alicloud/issues/2945)) +- Support multiple security_group_id and Set connection_domain as output param([#2943](https://github.com/aliyun/terraform-provider-alicloud/issues/2943)) +- support new region cn-guangzhou([#2941](https://github.com/aliyun/terraform-provider-alicloud/issues/2941)) +- support datasource for CEN Route Service([#2939](https://github.com/aliyun/terraform-provider-alicloud/issues/2939)) +- improve cas certificate testcase([#2936](https://github.com/aliyun/terraform-provider-alicloud/issues/2936)) +- applying tea dsl sdk to vpc resource([#2935](https://github.com/aliyun/terraform-provider-alicloud/issues/2935)) +- using tea dsl sdk to init client([#2934](https://github.com/aliyun/terraform-provider-alicloud/issues/2934)) +- update changelog([#2928](https://github.com/aliyun/terraform-provider-alicloud/issues/2928)) +- feat: resource ess_scaling_group suppors new field group_deletion_protection([#2927](https://github.com/aliyun/terraform-provider-alicloud/issues/2927)) BUG FIXES: -- fix(eip_association): TaskConflict error caused by clientToken ([#2951](https://github.com/aliyun/terraform-provider-alicloud/issues/2951)) -- fix (db_instance): vswitch_id suppress diff error when creating a new one ([#2950](https://github.com/aliyun/terraform-provider-alicloud/issues/2950)) -- fix config bug when running sweeper test ([#2946](https://github.com/aliyun/terraform-provider-alicloud/issues/2946)) -- fix maxcompute doc subcategory ([#2942](https://github.com/aliyun/terraform-provider-alicloud/issues/2942)) -- fix disk, keypair and image random diff bug ([#2938](https://github.com/aliyun/terraform-provider-alicloud/issues/2938)) -- fix alicloud_security_group tags random diff bug ([#2937](https://github.com/aliyun/terraform-provider-alicloud/issues/2937)) -- fix the test case of cms_alarm and add errorCode for cms_contact ([#2932](https://github.com/aliyun/terraform-provider-alicloud/issues/2932)) -- fix document for RDS instance ([#2931](https://github.com/aliyun/terraform-provider-alicloud/issues/2931)) -- fix oss_bucket document format is not correct ([#2930](https://github.com/aliyun/terraform-provider-alicloud/issues/2930)) -- fix testcase: replace alicloud_zones with alicloud_kvstore_zones ([#2926](https://github.com/aliyun/terraform-provider-alicloud/issues/2926)) -- feat: supported to specify slave zones ([#2924](https://github.com/aliyun/terraform-provider-alicloud/issues/2924)) +- fix(eip_association): TaskConflict error caused by clientToken([#2951](https://github.com/aliyun/terraform-provider-alicloud/issues/2951)) +- fix (db_instance): vswitch_id suppress diff error when creating a new one([#2950](https://github.com/aliyun/terraform-provider-alicloud/issues/2950)) +- fix config bug when running sweeper test([#2946](https://github.com/aliyun/terraform-provider-alicloud/issues/2946)) +- fix maxcompute doc subcategory([#2942](https://github.com/aliyun/terraform-provider-alicloud/issues/2942)) +- fix disk, keypair and image random diff bug([#2938](https://github.com/aliyun/terraform-provider-alicloud/issues/2938)) +- fix alicloud_security_group tags random diff bug([#2937](https://github.com/aliyun/terraform-provider-alicloud/issues/2937)) +- fix the test case of cms_alarm and add errorCode for cms_contact([#2932](https://github.com/aliyun/terraform-provider-alicloud/issues/2932)) +- fix document for RDS instance([#2931](https://github.com/aliyun/terraform-provider-alicloud/issues/2931)) +- fix oss_bucket document format is not correct([#2930](https://github.com/aliyun/terraform-provider-alicloud/issues/2930)) +- fix testcase: replace alicloud_zones with alicloud_kvstore_zones([#2926](https://github.com/aliyun/terraform-provider-alicloud/issues/2926)) +- feat: supported to specify slave zones([#2924](https://github.com/aliyun/terraform-provider-alicloud/issues/2924)) ## 1.101.0 (October 16, 2020) -- **New Resource:** `alicloud_cms_alarm_contact_group` ([#2885](https://github.com/aliyun/terraform-provider-alicloud/issues/2885)) -- **New Resource:** `alicloud_kvstore_connection` ([#2867](https://github.com/aliyun/terraform-provider-alicloud/issues/2867)) -- **Data Source:** `alicloud_cms_alarm_contact_groups` ([#2885](https://github.com/aliyun/terraform-provider-alicloud/issues/2885)) -- **Data Source:** `alicloud_kvstore_connections` ([#2867](https://github.com/aliyun/terraform-provider-alicloud/issues/2867)) +- **New Resource:** `alicloud_cms_alarm_contact_group`([#2885](https://github.com/aliyun/terraform-provider-alicloud/issues/2885)) +- **New Resource:** `alicloud_kvstore_connection`([#2867](https://github.com/aliyun/terraform-provider-alicloud/issues/2867)) +- **Data Source:** `alicloud_cms_alarm_contact_groups`([#2885](https://github.com/aliyun/terraform-provider-alicloud/issues/2885)) +- **Data Source:** `alicloud_kvstore_connections`([#2867](https://github.com/aliyun/terraform-provider-alicloud/issues/2867)) IMPROVEMENTS: -- resource_alicloud_instance add system_disk_name and system_disk_description params ([#2920](https://github.com/aliyun/terraform-provider-alicloud/issues/2920)) -- remove unsupported field resource_group_id from resource cs_kubernetes_node_pool ([#2919](https://github.com/aliyun/terraform-provider-alicloud/issues/2919)) -- Skip testcase with invalid region for Cloud Config ([#2918](https://github.com/aliyun/terraform-provider-alicloud/issues/2918)) -- Support service version in FC ([#2917](https://github.com/aliyun/terraform-provider-alicloud/issues/2917)) -- Correct the alicloud_polardb_cluster and alicloud_polardb_account_privilege's example usage ([#2916](https://github.com/aliyun/terraform-provider-alicloud/issues/2916)) -- sync vendor using go mod ([#2915](https://github.com/aliyun/terraform-provider-alicloud/issues/2915)) -- resource alicloud_alikafka_instance supports end_point ([#2912](https://github.com/aliyun/terraform-provider-alicloud/issues/2912)) -- elasticsearch instance support configuration 'client node' and 'protocol' ([#2910](https://github.com/aliyun/terraform-provider-alicloud/issues/2910)) -- resource alicloud_polardb_account_privilege supports DMLOnly and DMLOnly and then improve its docs ([#2906](https://github.com/aliyun/terraform-provider-alicloud/issues/2906)) -- Exclude unsupported regions for dms enterprise ([#2903](https://github.com/aliyun/terraform-provider-alicloud/issues/2903)) -- update changelog ([#2902](https://github.com/aliyun/terraform-provider-alicloud/issues/2902)) -- Creating a cluster response increases: cluster_spec ([#2898](https://github.com/aliyun/terraform-provider-alicloud/issues/2898)) -- alicloud_log_alert: support message center type ([#2897](https://github.com/aliyun/terraform-provider-alicloud/issues/2897)) -- disable validate disk category on ack cluster ([#2886](https://github.com/aliyun/terraform-provider-alicloud/issues/2886)) -- added create emr cluster request params validation ([#2786](https://github.com/aliyun/terraform-provider-alicloud/issues/2786)) +- resource_alicloud_instance add system_disk_name and system_disk_description params([#2920](https://github.com/aliyun/terraform-provider-alicloud/issues/2920)) +- remove unsupported field resource_group_id from resource cs_kubernetes_node_pool([#2919](https://github.com/aliyun/terraform-provider-alicloud/issues/2919)) +- Skip testcase with invalid region for Cloud Config([#2918](https://github.com/aliyun/terraform-provider-alicloud/issues/2918)) +- Support service version in FC([#2917](https://github.com/aliyun/terraform-provider-alicloud/issues/2917)) +- Correct the alicloud_polardb_cluster and alicloud_polardb_account_privilege's example usage([#2916](https://github.com/aliyun/terraform-provider-alicloud/issues/2916)) +- sync vendor using go mod([#2915](https://github.com/aliyun/terraform-provider-alicloud/issues/2915)) +- resource alicloud_alikafka_instance supports end_point([#2912](https://github.com/aliyun/terraform-provider-alicloud/issues/2912)) +- elasticsearch instance support configuration 'client node' and 'protocol'([#2910](https://github.com/aliyun/terraform-provider-alicloud/issues/2910)) +- resource alicloud_polardb_account_privilege supports DMLOnly and DMLOnly and then improve its docs([#2906](https://github.com/aliyun/terraform-provider-alicloud/issues/2906)) +- Exclude unsupported regions for dms enterprise([#2903](https://github.com/aliyun/terraform-provider-alicloud/issues/2903)) +- update changelog([#2902](https://github.com/aliyun/terraform-provider-alicloud/issues/2902)) +- Creating a cluster response increases: cluster_spec([#2898](https://github.com/aliyun/terraform-provider-alicloud/issues/2898)) +- alicloud_log_alert: support message center type([#2897](https://github.com/aliyun/terraform-provider-alicloud/issues/2897)) +- disable validate disk category on ack cluster([#2886](https://github.com/aliyun/terraform-provider-alicloud/issues/2886)) +- added create emr cluster request params validation([#2786](https://github.com/aliyun/terraform-provider-alicloud/issues/2786)) BUG FIXES: -- fix testcase: replace alicloud_zones with alicloud_kvstore_zones ([#2925](https://github.com/aliyun/terraform-provider-alicloud/issues/2925)) -- fix datasource ids bug ([#2911](https://github.com/aliyun/terraform-provider-alicloud/issues/2911)) -- bugfix: implement DiffSuppressFunc for chart list of log dashboard and pass required fields on update ([#2891](https://github.com/aliyun/terraform-provider-alicloud/issues/2891)) +- fix testcase: replace alicloud_zones with alicloud_kvstore_zones([#2925](https://github.com/aliyun/terraform-provider-alicloud/issues/2925)) +- fix datasource ids bug([#2911](https://github.com/aliyun/terraform-provider-alicloud/issues/2911)) +- bugfix: implement DiffSuppressFunc for chart list of log dashboard and pass required fields on update([#2891](https://github.com/aliyun/terraform-provider-alicloud/issues/2891)) ## 1.100.1 (October 13, 2020) IMPROVEMENTS: -- update go vendors ([#2904](https://github.com/aliyun/terraform-provider-alicloud/issues/2904)) -- improve cs test cases ([#2901](https://github.com/aliyun/terraform-provider-alicloud/issues/2901)) -- update sdk v1.61.557 ([#2900](https://github.com/aliyun/terraform-provider-alicloud/issues/2900)) -- improve invoking api by tea dsl conn ([#2899](https://github.com/aliyun/terraform-provider-alicloud/issues/2899)) -- add valid value Australia for resource cen_bandwidth_package and update vendor ([#2896](https://github.com/aliyun/terraform-provider-alicloud/issues/2896)) +- update go vendors([#2904](https://github.com/aliyun/terraform-provider-alicloud/issues/2904)) +- improve cs test cases([#2901](https://github.com/aliyun/terraform-provider-alicloud/issues/2901)) +- update sdk v1.61.557([#2900](https://github.com/aliyun/terraform-provider-alicloud/issues/2900)) +- improve invoking api by tea dsl conn([#2899](https://github.com/aliyun/terraform-provider-alicloud/issues/2899)) +- add valid value Australia for resource cen_bandwidth_package and update vendor([#2896](https://github.com/aliyun/terraform-provider-alicloud/issues/2896)) BUG FIXES: -- Fix edas bug ([#2676](https://github.com/aliyun/terraform-provider-alicloud/issues/2676)) +- Fix edas bug([#2676](https://github.com/aliyun/terraform-provider-alicloud/issues/2676)) ## 1.100.0 (October 12, 2020) -- **New Resource:** `alicloud_fc_function_async_invoke_config` ([#2873](https://github.com/aliyun/terraform-provider-alicloud/issues/2873)) +- **New Resource:** `alicloud_fc_function_async_invoke_config`([#2873](https://github.com/aliyun/terraform-provider-alicloud/issues/2873)) IMPROVEMENTS: -- add valid value Australia for resource cen_bandwidth_package and update vendor ([#2895](https://github.com/aliyun/terraform-provider-alicloud/issues/2895)) -- update ci test by adding config ([#2894](https://github.com/aliyun/terraform-provider-alicloud/issues/2894)) -- Create cluster support ResourceGroup and ACK-Pro ([#2889](https://github.com/aliyun/terraform-provider-alicloud/issues/2889)) -- update vendor for alikafka ([#2883](https://github.com/aliyun/terraform-provider-alicloud/issues/2883)) -- resource_manager_policy add validateJsonString and resource_manager_attachment support level 5 id ([#2880](https://github.com/aliyun/terraform-provider-alicloud/issues/2880)) -- dms user: replace some parameters for compatibility ([#2875](https://github.com/aliyun/terraform-provider-alicloud/issues/2875)) -- feature: resource dms_enterprise_instance supports skip_test and deprecated instance_alias ([#2874](https://github.com/aliyun/terraform-provider-alicloud/issues/2874)) -- UPDATE CHANGELOG ([#2869](https://github.com/aliyun/terraform-provider-alicloud/issues/2869)) +- add valid value Australia for resource cen_bandwidth_package and update vendor([#2895](https://github.com/aliyun/terraform-provider-alicloud/issues/2895)) +- update ci test by adding config([#2894](https://github.com/aliyun/terraform-provider-alicloud/issues/2894)) +- Create cluster support ResourceGroup and ACK-Pro([#2889](https://github.com/aliyun/terraform-provider-alicloud/issues/2889)) +- update vendor for alikafka([#2883](https://github.com/aliyun/terraform-provider-alicloud/issues/2883)) +- resource_manager_policy add validateJsonString and resource_manager_attachment support level 5 id([#2880](https://github.com/aliyun/terraform-provider-alicloud/issues/2880)) +- dms user: replace some parameters for compatibility ([#2875](https://github.com/aliyun/terraform-provider-alicloud/issues/2875)) +- feature: resource dms_enterprise_instance supports skip_test and deprecated instance_alias ([#2874](https://github.com/aliyun/terraform-provider-alicloud/issues/2874)) +- UPDATE CHANGELOG ([#2869](https://github.com/aliyun/terraform-provider-alicloud/issues/2869)) BUG FIXES: -- Revert "Create cluster support ResourceGroup and ACK-Pro" ([#2895](https://github.com/aliyun/terraform-provider-alicloud/issues/2895)) -- Work around the SLS log project does not exist error ([#2893](https://github.com/aliyun/terraform-provider-alicloud/issues/2893)) -- bugfix: Upgrade github.com/aliyun/aliyun-log-go-sdk to v0.1.13 ([#2888](https://github.com/aliyun/terraform-provider-alicloud/issues/2888)) +- Revert "Create cluster support ResourceGroup and ACK-Pro"([#2895](https://github.com/aliyun/terraform-provider-alicloud/issues/2895)) +- Work around the SLS log project does not exist error([#2893](https://github.com/aliyun/terraform-provider-alicloud/issues/2893)) +- bugfix: Upgrade github.com/aliyun/aliyun-log-go-sdk to v0.1.13([#2888](https://github.com/aliyun/terraform-provider-alicloud/issues/2888)) ## 1.99.0 (September 28, 2020) -- **New Resource:** `alicloud_cms_alarm_contact` ([#2870](https://github.com/aliyun/terraform-provider-alicloud/issues/2870)) -- **New Resource:** `alicloud_cen_route_service` ([#2868](https://github.com/aliyun/terraform-provider-alicloud/issues/2868)) -- **New Resource:** `alicloud_config_delivery_channel` ([#2865](https://github.com/aliyun/terraform-provider-alicloud/issues/2865)) -- **New Resource:** `alicloud_config_configuration_recorder` ([#2863](https://github.com/aliyun/terraform-provider-alicloud/issues/2863)) -- **New Resource:** `alicloud_config_rule` ([#2858](https://github.com/aliyun/terraform-provider-alicloud/issues/2858)) -- **Data Source:** `alicloud_cms_alarm_contacts` ([#2870](https://github.com/aliyun/terraform-provider-alicloud/issues/2870)) -- **Data Source:** `alicloud_cen_route_services` ([#2868](https://github.com/aliyun/terraform-provider-alicloud/issues/2868)) -- **Data Source:** `alicloud_config_delivery_channels` ([#2865](https://github.com/aliyun/terraform-provider-alicloud/issues/2865)) -- **Data Source:** `alicloud_config_configuration_recorders` ([#2863](https://github.com/aliyun/terraform-provider-alicloud/issues/2863)) -- **Data Source:** `alicloud_config_rules` ([#2858](https://github.com/aliyun/terraform-provider-alicloud/issues/2858)) +- **New Resource:** `alicloud_cms_alarm_contact`([#2870](https://github.com/aliyun/terraform-provider-alicloud/issues/2870)) +- **New Resource:** `alicloud_cen_route_service`([#2868](https://github.com/aliyun/terraform-provider-alicloud/issues/2868)) +- **New Resource:** `alicloud_config_delivery_channel`([#2865](https://github.com/aliyun/terraform-provider-alicloud/issues/2865)) +- **New Resource:** `alicloud_config_configuration_recorder`([#2863](https://github.com/aliyun/terraform-provider-alicloud/issues/2863)) +- **New Resource:** `alicloud_config_rule`([#2858](https://github.com/aliyun/terraform-provider-alicloud/issues/2858)) +- **Data Source:** `alicloud_cms_alarm_contacts`([#2870](https://github.com/aliyun/terraform-provider-alicloud/issues/2870)) +- **Data Source:** `alicloud_cen_route_services`([#2868](https://github.com/aliyun/terraform-provider-alicloud/issues/2868)) +- **Data Source:** `alicloud_config_delivery_channels`([#2865](https://github.com/aliyun/terraform-provider-alicloud/issues/2865)) +- **Data Source:** `alicloud_config_configuration_recorders`([#2863](https://github.com/aliyun/terraform-provider-alicloud/issues/2863)) +- **Data Source:** `alicloud_config_rules`([#2858](https://github.com/aliyun/terraform-provider-alicloud/issues/2858)) IMPROVEMENTS: -- Use Alidns_domain_attachment instead dns_domain_attachment resource ([#2878](https://github.com/aliyun/terraform-provider-alicloud/issues/2878)) -- Add enum for 'Lang' attribute of cms_alarm_contact ([#2877](https://github.com/aliyun/terraform-provider-alicloud/issues/2877)) -- Remove the enum of 'line' attribute in alidns_record ([#2872](https://github.com/aliyun/terraform-provider-alicloud/issues/2872)) -- update vendor ([#2866](https://github.com/aliyun/terraform-provider-alicloud/issues/2866)) -- support more regions for alikafka ([#2864](https://github.com/aliyun/terraform-provider-alicloud/issues/2864)) -- Remove mutli filter conditions from alicloud_hbase_zones and alicloud… ([#2862](https://github.com/aliyun/terraform-provider-alicloud/issues/2862)) -- update go.sum ([#2860](https://github.com/aliyun/terraform-provider-alicloud/issues/2860)) -- UPDATE CHANGELOG ([#2857](https://github.com/aliyun/terraform-provider-alicloud/issues/2857)) +- Use Alidns_domain_attachment instead dns_domain_attachment resource([#2878](https://github.com/aliyun/terraform-provider-alicloud/issues/2878)) +- Add enum for 'Lang' attribute of cms_alarm_contact([#2877](https://github.com/aliyun/terraform-provider-alicloud/issues/2877)) +- Remove the enum of 'line' attribute in alidns_record([#2872](https://github.com/aliyun/terraform-provider-alicloud/issues/2872)) +- update vendor([#2866](https://github.com/aliyun/terraform-provider-alicloud/issues/2866)) +- support more regions for alikafka([#2864](https://github.com/aliyun/terraform-provider-alicloud/issues/2864)) +- Remove mutli filter conditions from alicloud_hbase_zones and alicloud…([#2862](https://github.com/aliyun/terraform-provider-alicloud/issues/2862)) +- update go.sum([#2860](https://github.com/aliyun/terraform-provider-alicloud/issues/2860)) +- UPDATE CHANGELOG([#2857](https://github.com/aliyun/terraform-provider-alicloud/issues/2857)) BUG FIXES: -- Fix elasticsearch untagResources failed error ([#2876](https://github.com/aliyun/terraform-provider-alicloud/issues/2876)) +- Fix elasticsearch untagResources failed error([#2876](https://github.com/aliyun/terraform-provider-alicloud/issues/2876)) ## 1.98.0 (September 22, 2020) -- **New Resource:** `alicloud_fc_custom_domain` ([#2828](https://github.com/aliyun/terraform-provider-alicloud/issues/2828)) -- **Data Source:** `alicloud_cen_vbr_health_checks` ([#2854](https://github.com/aliyun/terraform-provider-alicloud/issues/2854)) -- **Data Source:** `alicloud_edas_services` ([#2852](https://github.com/aliyun/terraform-provider-alicloud/issues/2852)) -- **Data Source:** `alicloud_cdn_services` ([#2850](https://github.com/aliyun/terraform-provider-alicloud/issues/2850)) -- **Data Source:** `alicloud_fc_custom_domains` ([#2828](https://github.com/aliyun/terraform-provider-alicloud/issues/2828)) +- **New Resource:** `alicloud_fc_custom_domain`([#2828](https://github.com/aliyun/terraform-provider-alicloud/issues/2828)) +- **Data Source:** `alicloud_cen_vbr_health_checks`([#2854](https://github.com/aliyun/terraform-provider-alicloud/issues/2854)) +- **Data Source:** `alicloud_edas_services`([#2852](https://github.com/aliyun/terraform-provider-alicloud/issues/2852)) +- **Data Source:** `alicloud_cdn_services`([#2850](https://github.com/aliyun/terraform-provider-alicloud/issues/2850)) +- **Data Source:** `alicloud_fc_custom_domains`([#2828](https://github.com/aliyun/terraform-provider-alicloud/issues/2828)) IMPROVEMENTS: -- update go.sum ([#2850](https://github.com/aliyun/terraform-provider-alicloud/issues/2850)) -- feature(alicloud_ram_access_key): support outputting secret when pgp_key is not set ([#2856](https://github.com/aliyun/terraform-provider-alicloud/issues/2856)) -- feat(alicloud_dcdn_domain): support waiting timeout when updating it ([#2855](https://github.com/aliyun/terraform-provider-alicloud/issues/2855)) -- Add computed to the resource_group_id attribute of the alidns_domain ([#2853](https://github.com/aliyun/terraform-provider-alicloud/issues/2853)) -- add DiffSuppressFunc for resource_manager_policy field policy_document to match jsonstring diff ([#2851](https://github.com/aliyun/terraform-provider-alicloud/issues/2851)) -- improve cen resources' testcase ([#2842](https://github.com/aliyun/terraform-provider-alicloud/issues/2842)) -- upgrade resource and datasource for CEN Instance ([#2840](https://github.com/aliyun/terraform-provider-alicloud/issues/2840)) -- Improve resource ons_group and its datasource ([#2838](https://github.com/aliyun/terraform-provider-alicloud/issues/2838)) -- ram_user_policy_attachment support throttling.user error retry ([#2837](https://github.com/aliyun/terraform-provider-alicloud/issues/2837)) -- ram_role_policy_attachment support throttling.user error retry ([#2835](https://github.com/aliyun/terraform-provider-alicloud/issues/2835)) -- Add credit_specification parameter to ess scaling configuration ([#2834](https://github.com/aliyun/terraform-provider-alicloud/issues/2834)) -- remove the useless package in the go.sum ([#2833](https://github.com/aliyun/terraform-provider-alicloud/issues/2833)) -- upgrade resource alicloud_cen_bandwidth_package and its datasource ([#2832](https://github.com/aliyun/terraform-provider-alicloud/issues/2832)) -- UPDATECHANGELOG ([#2831](https://github.com/aliyun/terraform-provider-alicloud/issues/2831)) +- update go.sum([#2850](https://github.com/aliyun/terraform-provider-alicloud/issues/2850)) +- feature(alicloud_ram_access_key): support outputting secret when pgp_key is not set([#2856](https://github.com/aliyun/terraform-provider-alicloud/issues/2856)) +- feat(alicloud_dcdn_domain): support waiting timeout when updating it([#2855](https://github.com/aliyun/terraform-provider-alicloud/issues/2855)) +- Add computed to the resource_group_id attribute of the alidns_domain([#2853](https://github.com/aliyun/terraform-provider-alicloud/issues/2853)) +- add DiffSuppressFunc for resource_manager_policy field policy_document to match jsonstring diff([#2851](https://github.com/aliyun/terraform-provider-alicloud/issues/2851)) +- improve cen resources' testcase([#2842](https://github.com/aliyun/terraform-provider-alicloud/issues/2842)) +- upgrade resource and datasource for CEN Instance([#2840](https://github.com/aliyun/terraform-provider-alicloud/issues/2840)) +- Improve resource ons_group and its datasource([#2838](https://github.com/aliyun/terraform-provider-alicloud/issues/2838)) +- ram_user_policy_attachment support throttling.user error retry([#2837](https://github.com/aliyun/terraform-provider-alicloud/issues/2837)) +- ram_role_policy_attachment support throttling.user error retry([#2835](https://github.com/aliyun/terraform-provider-alicloud/issues/2835)) +- Add credit_specification parameter to ess scaling configuration([#2834](https://github.com/aliyun/terraform-provider-alicloud/issues/2834)) +- remove the useless package in the go.sum([#2833](https://github.com/aliyun/terraform-provider-alicloud/issues/2833)) +- upgrade resource alicloud_cen_bandwidth_package and its datasource([#2832](https://github.com/aliyun/terraform-provider-alicloud/issues/2832)) +- UPDATECHANGELOG([#2831](https://github.com/aliyun/terraform-provider-alicloud/issues/2831)) BUG FIXES: -- fix oss endpoint in eu-central-1 issue ([#2836](https://github.com/aliyun/terraform-provider-alicloud/issues/2836)) +- fix oss endpoint in eu-central-1 issue([#2836](https://github.com/aliyun/terraform-provider-alicloud/issues/2836)) ## 1.97.0 (September 18, 2020) -- **New Resource:** `alicloud_cen_instance_attachment` ([#2822](https://github.com/aliyun/terraform-provider-alicloud/issues/2822)) -- **New Resource:** `alicloud_ons_instance` ([#2820](https://github.com/aliyun/terraform-provider-alicloud/issues/2820)) -- **New Resource:** `alicloud_cs_node_pool` ([#2787](https://github.com/aliyun/terraform-provider-alicloud/issues/2787)) -- **Data Source:** `alicloud_cen_instance_attachments` ([#2822](https://github.com/aliyun/terraform-provider-alicloud/issues/2822)) -- **Data Source:** `alicloud_ons_instances` ([#2820](https://github.com/aliyun/terraform-provider-alicloud/issues/2820)) -- **Data Source:** `alicloud_nas_services` ([#2813](https://github.com/aliyun/terraform-provider-alicloud/issues/2813)) -- **Data Source:** `alicloud_oss_services` ([#2812](https://github.com/aliyun/terraform-provider-alicloud/issues/2812)) -- **Data Source:** `alicloud_ots_services` ([#2807](https://github.com/aliyun/terraform-provider-alicloud/issues/2807)) - -IMPROVEMENTS: - -- Compatible domain_group_name for alidns_domain_group ([#2830](https://github.com/aliyun/terraform-provider-alicloud/issues/2830)) -- Add errorcode for DeleteDomain api ([#2829](https://github.com/aliyun/terraform-provider-alicloud/issues/2829)) -- remove datasource alicloud_edas_application useless output ([#2826](https://github.com/aliyun/terraform-provider-alicloud/issues/2826)) -- add missing pull request ([#2825](https://github.com/aliyun/terraform-provider-alicloud/issues/2825)) -- improve resource ons_topic and its datasource ([#2823](https://github.com/aliyun/terraform-provider-alicloud/issues/2823)) -- update sdk v1.61.497 ([#2818](https://github.com/aliyun/terraform-provider-alicloud/issues/2818)) -- resource alicloud_cen_instance_attachment docs and testcase support child_instance_type ([#2817](https://github.com/aliyun/terraform-provider-alicloud/issues/2817)) -- Adjust the document for Alidns ([#2808](https://github.com/aliyun/terraform-provider-alicloud/issues/2808)) -- Add waiting method for update scope ([#2802](https://github.com/aliyun/terraform-provider-alicloud/issues/2802)) -- UPDATE CHANGELOG ([#2800](https://github.com/aliyun/terraform-provider-alicloud/issues/2800)) -- improve(slb) update slb docs rules server_groups slbs ([#2728](https://github.com/aliyun/terraform-provider-alicloud/issues/2728)) -- Rewrote resource page to correct name ([#2580](https://github.com/aliyun/terraform-provider-alicloud/issues/2580)) -- datasource snapshots supports outputting tags ([#2545](https://github.com/aliyun/terraform-provider-alicloud/issues/2545)) - -BUG FIXES: - -- fix resource alicloud_api_gateway_api ConcurrencyLockTimeout error ([#2827](https://github.com/aliyun/terraform-provider-alicloud/issues/2827)) -- fix elasticsearch_instance return redundant tags issue ([#2821](https://github.com/aliyun/terraform-provider-alicloud/issues/2821)) -- fix cms testcase ([#2819](https://github.com/aliyun/terraform-provider-alicloud/issues/2819)) -- fix adb cluster testcase ([#2816](https://github.com/aliyun/terraform-provider-alicloud/issues/2816)) -- fix log.Fatal bug when using tea client ([#2814](https://github.com/aliyun/terraform-provider-alicloud/issues/2814)) -- fix getting oss endpoint bug ([#2811](https://github.com/aliyun/terraform-provider-alicloud/issues/2811)) -- fix elasticsearch_instance return redundant tags issue ([#2810](https://github.com/aliyun/terraform-provider-alicloud/issues/2810)) -- fix: db instance delay set is 30s ([#2780](https://github.com/aliyun/terraform-provider-alicloud/issues/2780)) -- fix_auto_provisioning_group ([#2552](https://github.com/aliyun/terraform-provider-alicloud/issues/2552)) +- **New Resource:** `alicloud_cen_instance_attachment`([#2822](https://github.com/aliyun/terraform-provider-alicloud/issues/2822)) +- **New Resource:** `alicloud_ons_instance`([#2820](https://github.com/aliyun/terraform-provider-alicloud/issues/2820)) +- **New Resource:** `alicloud_cs_node_pool`([#2787](https://github.com/aliyun/terraform-provider-alicloud/issues/2787)) +- **Data Source:** `alicloud_cen_instance_attachments`([#2822](https://github.com/aliyun/terraform-provider-alicloud/issues/2822)) +- **Data Source:** `alicloud_ons_instances`([#2820](https://github.com/aliyun/terraform-provider-alicloud/issues/2820)) +- **Data Source:** `alicloud_nas_services`([#2813](https://github.com/aliyun/terraform-provider-alicloud/issues/2813)) +- **Data Source:** `alicloud_oss_services`([#2812](https://github.com/aliyun/terraform-provider-alicloud/issues/2812)) +- **Data Source:** `alicloud_ots_services`([#2807](https://github.com/aliyun/terraform-provider-alicloud/issues/2807)) + +IMPROVEMENTS: + +- Compatible domain_group_name for alidns_domain_group([#2830](https://github.com/aliyun/terraform-provider-alicloud/issues/2830)) +- Add errorcode for DeleteDomain api([#2829](https://github.com/aliyun/terraform-provider-alicloud/issues/2829)) +- remove datasource alicloud_edas_application useless output([#2826](https://github.com/aliyun/terraform-provider-alicloud/issues/2826)) +- add missing pull request([#2825](https://github.com/aliyun/terraform-provider-alicloud/issues/2825)) +- improve resource ons_topic and its datasource([#2823](https://github.com/aliyun/terraform-provider-alicloud/issues/2823)) +- update sdk v1.61.497([#2818](https://github.com/aliyun/terraform-provider-alicloud/issues/2818)) +- resource alicloud_cen_instance_attachment docs and testcase support child_instance_type([#2817](https://github.com/aliyun/terraform-provider-alicloud/issues/2817)) +- Adjust the document for Alidns([#2808](https://github.com/aliyun/terraform-provider-alicloud/issues/2808)) +- Add waiting method for update scope([#2802](https://github.com/aliyun/terraform-provider-alicloud/issues/2802)) +- UPDATE CHANGELOG([#2800](https://github.com/aliyun/terraform-provider-alicloud/issues/2800)) +- improve(slb) update slb docs rules server_groups slbs([#2728](https://github.com/aliyun/terraform-provider-alicloud/issues/2728)) +- Rewrote resource page to correct name([#2580](https://github.com/aliyun/terraform-provider-alicloud/issues/2580)) +- datasource snapshots supports outputting tags([#2545](https://github.com/aliyun/terraform-provider-alicloud/issues/2545)) + +BUG FIXES: + +- fix resource alicloud_api_gateway_api ConcurrencyLockTimeout error([#2827](https://github.com/aliyun/terraform-provider-alicloud/issues/2827)) +- fix elasticsearch_instance return redundant tags issue([#2821](https://github.com/aliyun/terraform-provider-alicloud/issues/2821)) +- fix cms testcase([#2819](https://github.com/aliyun/terraform-provider-alicloud/issues/2819)) +- fix adb cluster testcase([#2816](https://github.com/aliyun/terraform-provider-alicloud/issues/2816)) +- fix log.Fatal bug when using tea client([#2814](https://github.com/aliyun/terraform-provider-alicloud/issues/2814)) +- fix getting oss endpoint bug([#2811](https://github.com/aliyun/terraform-provider-alicloud/issues/2811)) +- fix elasticsearch_instance return redundant tags issue([#2810](https://github.com/aliyun/terraform-provider-alicloud/issues/2810)) +- fix: db instance delay set is 30s([#2780](https://github.com/aliyun/terraform-provider-alicloud/issues/2780)) +- fix_auto_provisioning_group([#2552](https://github.com/aliyun/terraform-provider-alicloud/issues/2552)) ## 1.96.0 (September 13, 2020) -- **Data Source:** `alicloud_log_service` ([#2804](https://github.com/aliyun/terraform-provider-alicloud/issues/2804)) -- **Data Source:** `alicloud_api_gateway_service` ([#2801](https://github.com/aliyun/terraform-provider-alicloud/issues/2801)) +- **Data Source:** `alicloud_log_service`([#2804](https://github.com/aliyun/terraform-provider-alicloud/issues/2804)) +- **Data Source:** `alicloud_api_gateway_service`([#2801](https://github.com/aliyun/terraform-provider-alicloud/issues/2801)) IMPROVEMENTS: -- improve resource alicloud_ess_scaling_rule docs ([#2795](https://github.com/aliyun/terraform-provider-alicloud/issues/2795)) -- Add retry and wait for cms api EnableMetricRules DisableMetricRules ([#2794](https://github.com/aliyun/terraform-provider-alicloud/issues/2794)) -- Add wait and retry for flow control ([#2793](https://github.com/aliyun/terraform-provider-alicloud/issues/2793)) -- PolarDB cluster support setting resource_group_id ([#2792](https://github.com/aliyun/terraform-provider-alicloud/issues/2792)) -- Support FC new features: custom container, new instance type and NAS integration ([#2791](https://github.com/aliyun/terraform-provider-alicloud/issues/2791)) -- update action trail docs subcategory ([#2788](https://github.com/aliyun/terraform-provider-alicloud/issues/2788)) -- UPDATE CHANGELOG ([#2774](https://github.com/aliyun/terraform-provider-alicloud/issues/2774)) +- improve resource alicloud_ess_scaling_rule docs([#2795](https://github.com/aliyun/terraform-provider-alicloud/issues/2795)) +- Add retry and wait for cms api EnableMetricRules DisableMetricRules([#2794](https://github.com/aliyun/terraform-provider-alicloud/issues/2794)) +- Add wait and retry for flow control([#2793](https://github.com/aliyun/terraform-provider-alicloud/issues/2793)) +- PolarDB cluster support setting resource_group_id([#2792](https://github.com/aliyun/terraform-provider-alicloud/issues/2792)) +- Support FC new features: custom container, new instance type and NAS integration([#2791](https://github.com/aliyun/terraform-provider-alicloud/issues/2791)) +- update action trail docs subcategory([#2788](https://github.com/aliyun/terraform-provider-alicloud/issues/2788)) +- UPDATE CHANGELOG([#2774](https://github.com/aliyun/terraform-provider-alicloud/issues/2774)) BUG FIXES: -- cms resource suppots assume role ([#2803](https://github.com/aliyun/terraform-provider-alicloud/issues/2803)) -- fix dcdn_domain the input parameter form of the scope attribute ([#2797](https://github.com/aliyun/terraform-provider-alicloud/issues/2797)) -- fix redis allocate public network ([#2796](https://github.com/aliyun/terraform-provider-alicloud/issues/2796)) +- cms resource suppots assume role([#2803](https://github.com/aliyun/terraform-provider-alicloud/issues/2803)) +- fix dcdn_domain the input parameter form of the scope attribute([#2797](https://github.com/aliyun/terraform-provider-alicloud/issues/2797)) +- fix redis allocate public network([#2796](https://github.com/aliyun/terraform-provider-alicloud/issues/2796)) ## 1.95.0 (September 03, 2020) -- **New Resource:** `alicloud_actiontrail_trail` ([#2758](https://github.com/aliyun/terraform-provider-alicloud/issues/2758)) -- **Data Source:** `alicloud_actiontrail_trails` ([#2758](https://github.com/aliyun/terraform-provider-alicloud/issues/2758)) +- **New Resource:** `alicloud_actiontrail_trail`([#2758](https://github.com/aliyun/terraform-provider-alicloud/issues/2758)) +- **Data Source:** `alicloud_actiontrail_trails`([#2758](https://github.com/aliyun/terraform-provider-alicloud/issues/2758)) IMPROVEMENTS: -- remove the useless files in archives ([#2784](https://github.com/aliyun/terraform-provider-alicloud/issues/2784)) -- resource alicloud_disk supports setting performance_level ([#2783](https://github.com/aliyun/terraform-provider-alicloud/issues/2783)) -- add more ci test flag ([#2782](https://github.com/aliyun/terraform-provider-alicloud/issues/2782)) -- dns_instance and dns_domain renamed to alidns_instance, alidns_domain ([#2776](https://github.com/aliyun/terraform-provider-alicloud/issues/2776)) -- add force Unassociate for eip ([#2772](https://github.com/aliyun/terraform-provider-alicloud/issues/2772)) -- improve(alicloud_images): supports more filters ([#2771](https://github.com/aliyun/terraform-provider-alicloud/issues/2771)) -- Adjust the datasource testcase name ([#2762](https://github.com/aliyun/terraform-provider-alicloud/issues/2762)) -- upgrade resource and datasource for NAS MountTarget ([#2759](https://github.com/aliyun/terraform-provider-alicloud/issues/2759)) -- update resource markdown grammar ([#2757](https://github.com/aliyun/terraform-provider-alicloud/issues/2757)) -- upgrade datasource for NAS AccessGroup ([#2746](https://github.com/aliyun/terraform-provider-alicloud/issues/2746)) -- PolarDB support add or remove read-only nodes ([#2745](https://github.com/aliyun/terraform-provider-alicloud/issues/2745)) -- UPDATE CHANGELOG ([#2731](https://github.com/aliyun/terraform-provider-alicloud/issues/2731)) -- improve(slb) update docs ([#2719](https://github.com/aliyun/terraform-provider-alicloud/issues/2719)) +- remove the useless files in archives([#2784](https://github.com/aliyun/terraform-provider-alicloud/issues/2784)) +- resource alicloud_disk supports setting performance_level([#2783](https://github.com/aliyun/terraform-provider-alicloud/issues/2783)) +- add more ci test flag([#2782](https://github.com/aliyun/terraform-provider-alicloud/issues/2782)) +- dns_instance and dns_domain renamed to alidns_instance, alidns_domain([#2776](https://github.com/aliyun/terraform-provider-alicloud/issues/2776)) +- add force Unassociate for eip([#2772](https://github.com/aliyun/terraform-provider-alicloud/issues/2772)) +- improve(alicloud_images): supports more filters([#2771](https://github.com/aliyun/terraform-provider-alicloud/issues/2771)) +- Adjust the datasource testcase name([#2762](https://github.com/aliyun/terraform-provider-alicloud/issues/2762)) +- upgrade resource and datasource for NAS MountTarget([#2759](https://github.com/aliyun/terraform-provider-alicloud/issues/2759)) +- update resource markdown grammar([#2757](https://github.com/aliyun/terraform-provider-alicloud/issues/2757)) +- upgrade datasource for NAS AccessGroup([#2746](https://github.com/aliyun/terraform-provider-alicloud/issues/2746)) +- PolarDB support add or remove read-only nodes([#2745](https://github.com/aliyun/terraform-provider-alicloud/issues/2745)) +- UPDATE CHANGELOG([#2731](https://github.com/aliyun/terraform-provider-alicloud/issues/2731)) +- improve(slb) update docs([#2719](https://github.com/aliyun/terraform-provider-alicloud/issues/2719)) BUG FIXES: -- Fix the managed_kubernetes docs ([#2785](https://github.com/aliyun/terraform-provider-alicloud/issues/2785)) -- fix document of Hbase and Bastionhost ([#2777](https://github.com/aliyun/terraform-provider-alicloud/issues/2777)) -- fix dcdn_domain sources parameter for update method ([#2773](https://github.com/aliyun/terraform-provider-alicloud/issues/2773)) -- Fix cdn test case ([#2760](https://github.com/aliyun/terraform-provider-alicloud/issues/2760)) +- Fix the managed_kubernetes docs([#2785](https://github.com/aliyun/terraform-provider-alicloud/issues/2785)) +- fix document of Hbase and Bastionhost([#2777](https://github.com/aliyun/terraform-provider-alicloud/issues/2777)) +- fix dcdn_domain sources parameter for update method([#2773](https://github.com/aliyun/terraform-provider-alicloud/issues/2773)) +- Fix cdn test case([#2760](https://github.com/aliyun/terraform-provider-alicloud/issues/2760)) ## 1.94.0 (August 24, 2020) -- **New Resource:** `alicloud_dcdn_domain` ([#2744](https://github.com/aliyun/terraform-provider-alicloud/issues/2744)) -- **New Resource:** `alicloud_mse_cluster` ([#2733](https://github.com/aliyun/terraform-provider-alicloud/issues/2733)) -- **New Resource:** `alicloud_resource_manager_policy_attachment` ([#2696](https://github.com/aliyun/terraform-provider-alicloud/issues/2696)) -- **Data Source:** `alicloud_dcdn_domains` ([#2744](https://github.com/aliyun/terraform-provider-alicloud/issues/2744)) -- **Data Source:** `alicloud_mse_clusters` ([#2733](https://github.com/aliyun/terraform-provider-alicloud/issues/2733)) -- **Data Source:** `alicloud_resource_manager_policy_attachments` ([#2696](https://github.com/aliyun/terraform-provider-alicloud/issues/2696)) +- **New Resource:** `alicloud_dcdn_domain`([#2744](https://github.com/aliyun/terraform-provider-alicloud/issues/2744)) +- **New Resource:** `alicloud_mse_cluster`([#2733](https://github.com/aliyun/terraform-provider-alicloud/issues/2733)) +- **New Resource:** `alicloud_resource_manager_policy_attachment`([#2696](https://github.com/aliyun/terraform-provider-alicloud/issues/2696)) +- **Data Source:** `alicloud_dcdn_domains`([#2744](https://github.com/aliyun/terraform-provider-alicloud/issues/2744)) +- **Data Source:** `alicloud_mse_clusters`([#2733](https://github.com/aliyun/terraform-provider-alicloud/issues/2733)) +- **Data Source:** `alicloud_resource_manager_policy_attachments`([#2696](https://github.com/aliyun/terraform-provider-alicloud/issues/2696)) IMPROVEMENTS: -- Support allocate and release public connection for redis ([#2748](https://github.com/aliyun/terraform-provider-alicloud/issues/2748)) -- Support to set warn and info level alarm ([#2743](https://github.com/aliyun/terraform-provider-alicloud/issues/2743)) -- waf domain support setting resource_group_id and more attributes ([#2740](https://github.com/aliyun/terraform-provider-alicloud/issues/2740)) -- resource dnat supports "import" feature ([#2735](https://github.com/aliyun/terraform-provider-alicloud/issues/2735)) -- Add func sweep and Change testcase frequency ([#2726](https://github.com/aliyun/terraform-provider-alicloud/issues/2726)) -- Correct provider docs order ([#2723](https://github.com/aliyun/terraform-provider-alicloud/issues/2723)) -- Remove github.com/hashicorp/terraform import and use terraform-plugin-sdk instead ([#2722](https://github.com/aliyun/terraform-provider-alicloud/issues/2722)) -- Add test sweep for eci_image_cache ([#2720](https://github.com/aliyun/terraform-provider-alicloud/issues/2720)) -- modify alicloud_cen_instance_attachment ([#2714](https://github.com/aliyun/terraform-provider-alicloud/issues/2714)) +- Support allocate and release public connection for redis([#2748](https://github.com/aliyun/terraform-provider-alicloud/issues/2748)) +- Support to set warn and info level alarm([#2743](https://github.com/aliyun/terraform-provider-alicloud/issues/2743)) +- waf domain support setting resource_group_id and more attributes([#2740](https://github.com/aliyun/terraform-provider-alicloud/issues/2740)) +- resource dnat supports "import" feature([#2735](https://github.com/aliyun/terraform-provider-alicloud/issues/2735)) +- Add func sweep and Change testcase frequency([#2726](https://github.com/aliyun/terraform-provider-alicloud/issues/2726)) +- Correct provider docs order([#2723](https://github.com/aliyun/terraform-provider-alicloud/issues/2723)) +- Remove github.com/hashicorp/terraform import and use terraform-plugin-sdk instead([#2722](https://github.com/aliyun/terraform-provider-alicloud/issues/2722)) +- Add test sweep for eci_image_cache([#2720](https://github.com/aliyun/terraform-provider-alicloud/issues/2720)) +- modify alicloud_cen_instance_attachment([#2714](https://github.com/aliyun/terraform-provider-alicloud/issues/2714)) BUG FIXES: -- fix the bug of create emr kafka cluster error ([#2754](https://github.com/aliyun/terraform-provider-alicloud/issues/2754)) -- fix common bandwidth package idempotent issue when Adding and Removeing instance ([#2750](https://github.com/aliyun/terraform-provider-alicloud/issues/2750)) -- fix website document error using `terraform` tag ([#2749](https://github.com/aliyun/terraform-provider-alicloud/issues/2749)) -- Fix registry rendering of page ([#2747](https://github.com/aliyun/terraform-provider-alicloud/issues/2747)) -- fix ci test website-test error ([#2742](https://github.com/aliyun/terraform-provider-alicloud/issues/2742)) -- fix datasource for ResourceManager for Policy Attachment ([#2730](https://github.com/aliyun/terraform-provider-alicloud/issues/2730)) -- fix_ecs_snapshot ([#2709](https://github.com/aliyun/terraform-provider-alicloud/issues/2709)) +- fix the bug of create emr kafka cluster error([#2754](https://github.com/aliyun/terraform-provider-alicloud/issues/2754)) +- fix common bandwidth package idempotent issue when Adding and Removeing instance([#2750](https://github.com/aliyun/terraform-provider-alicloud/issues/2750)) +- fix website document error using `terraform` tag([#2749](https://github.com/aliyun/terraform-provider-alicloud/issues/2749)) +- Fix registry rendering of page([#2747](https://github.com/aliyun/terraform-provider-alicloud/issues/2747)) +- fix ci test website-test error([#2742](https://github.com/aliyun/terraform-provider-alicloud/issues/2742)) +- fix datasource for ResourceManager for Policy Attachment([#2730](https://github.com/aliyun/terraform-provider-alicloud/issues/2730)) +- fix_ecs_snapshot([#2709](https://github.com/aliyun/terraform-provider-alicloud/issues/2709)) ## 1.93.0 (August 12, 2020) -- **New Resource:** `alicloud_oos_execution` ([#2679](https://github.com/aliyun/terraform-provider-alicloud/issues/2679)) -- **New Resource:** `alicloud_edas_k8s_cluster` ([#2678](https://github.com/aliyun/terraform-provider-alicloud/issues/2678)) -- **Data Source:** `alicloud_oos_execution` ([#2679](https://github.com/aliyun/terraform-provider-alicloud/issues/2679)) +- **New Resource:** `alicloud_oos_execution`([#2679](https://github.com/aliyun/terraform-provider-alicloud/issues/2679)) +- **New Resource:** `alicloud_edas_k8s_cluster`([#2678](https://github.com/aliyun/terraform-provider-alicloud/issues/2678)) +- **Data Source:** `alicloud_oos_execution`([#2679](https://github.com/aliyun/terraform-provider-alicloud/issues/2679)) IMPROVEMENTS: -- Add sweep func for adb cluster test ([#2716](https://github.com/aliyun/terraform-provider-alicloud/issues/2716)) -- Add default vpc for drds ([#2713](https://github.com/aliyun/terraform-provider-alicloud/issues/2713)) -- ADB MySQL output output connection string after creation ([#2699](https://github.com/aliyun/terraform-provider-alicloud/issues/2699)) -- add .goreleaser.yml ([#2698](https://github.com/aliyun/terraform-provider-alicloud/issues/2698)) -- transfer terraform-provider-alicloud to aliyun from terraform-providers ([#2697](https://github.com/aliyun/terraform-provider-alicloud/issues/2697)) -- Add purge cluster api for cassandra sweeper ([#2693](https://github.com/aliyun/terraform-provider-alicloud/issues/2693)) -- Add default vpc for mongodb ([#2689](https://github.com/aliyun/terraform-provider-alicloud/issues/2689)) -- Add default vpc for kvstore ([#2688](https://github.com/aliyun/terraform-provider-alicloud/issues/2688)) -- Add sweeper for cassandra cluster ([#2687](https://github.com/aliyun/terraform-provider-alicloud/issues/2687)) -- Support 'resoruce_group_id' attribute for ImportKeyPair ([#2683](https://github.com/aliyun/terraform-provider-alicloud/issues/2683)) -- Support to get NotFound error in read method ([#2682](https://github.com/aliyun/terraform-provider-alicloud/issues/2682)) -- UPDATE CHANGELOG ([#2681](https://github.com/aliyun/terraform-provider-alicloud/issues/2681)) -- Support specify security group when create instance ([#2680](https://github.com/aliyun/terraform-provider-alicloud/issues/2680)) -- improve(slb) update slb_backend_server add parameter server_ip ([#2651](https://github.com/aliyun/terraform-provider-alicloud/issues/2651)) +- Add sweep func for adb cluster test([#2716](https://github.com/aliyun/terraform-provider-alicloud/issues/2716)) +- Add default vpc for drds([#2713](https://github.com/aliyun/terraform-provider-alicloud/issues/2713)) +- ADB MySQL output output connection string after creation([#2699](https://github.com/aliyun/terraform-provider-alicloud/issues/2699)) +- add .goreleaser.yml([#2698](https://github.com/aliyun/terraform-provider-alicloud/issues/2698)) +- transfer terraform-provider-alicloud to aliyun from terraform-providers([#2697](https://github.com/aliyun/terraform-provider-alicloud/issues/2697)) +- Add purge cluster api for cassandra sweeper([#2693](https://github.com/aliyun/terraform-provider-alicloud/issues/2693)) +- Add default vpc for mongodb([#2689](https://github.com/aliyun/terraform-provider-alicloud/issues/2689)) +- Add default vpc for kvstore([#2688](https://github.com/aliyun/terraform-provider-alicloud/issues/2688)) +- Add sweeper for cassandra cluster([#2687](https://github.com/aliyun/terraform-provider-alicloud/issues/2687)) +- Support 'resoruce_group_id' attribute for ImportKeyPair([#2683](https://github.com/aliyun/terraform-provider-alicloud/issues/2683)) +- Support to get NotFound error in read method([#2682](https://github.com/aliyun/terraform-provider-alicloud/issues/2682)) +- UPDATE CHANGELOG([#2681](https://github.com/aliyun/terraform-provider-alicloud/issues/2681)) +- Support specify security group when create instance([#2680](https://github.com/aliyun/terraform-provider-alicloud/issues/2680)) +- improve(slb) update slb_backend_server add parameter server_ip([#2651](https://github.com/aliyun/terraform-provider-alicloud/issues/2651)) BUG FIXES: -- update: fix dnat query errror by only use forwardTableId ([#2712](https://github.com/aliyun/terraform-provider-alicloud/issues/2712)) -- fix: create rds sql_collector_status bug ([#2690](https://github.com/aliyun/terraform-provider-alicloud/issues/2690)) -- fix(edas): improve sweeper test ([#2686](https://github.com/aliyun/terraform-provider-alicloud/issues/2686)) -- fix cassandra doc and add describe not found error ([#2685](https://github.com/aliyun/terraform-provider-alicloud/issues/2685)) -- fix doc: attach AliyunMNSNotificationRolePolicy to role ([#2572](https://github.com/aliyun/terraform-provider-alicloud/issues/2572)) -- docs: fix typos and grammar in Alicloud Provider ([#2559](https://github.com/aliyun/terraform-provider-alicloud/issues/2559)) -- fix_markdown_auto_provisioning_group ([#2543](https://github.com/aliyun/terraform-provider-alicloud/issues/2543)) -- fix_markdown_snapshot_policy ([#2540](https://github.com/aliyun/terraform-provider-alicloud/issues/2540)) +- update: fix dnat query errror by only use forwardTableId([#2712](https://github.com/aliyun/terraform-provider-alicloud/issues/2712)) +- fix: create rds sql_collector_status bug([#2690](https://github.com/aliyun/terraform-provider-alicloud/issues/2690)) +- fix(edas): improve sweeper test([#2686](https://github.com/aliyun/terraform-provider-alicloud/issues/2686)) +- fix cassandra doc and add describe not found error([#2685](https://github.com/aliyun/terraform-provider-alicloud/issues/2685)) +- fix doc: attach AliyunMNSNotificationRolePolicy to role([#2572](https://github.com/aliyun/terraform-provider-alicloud/issues/2572)) +- docs: fix typos and grammar in Alicloud Provider([#2559](https://github.com/aliyun/terraform-provider-alicloud/issues/2559)) +- fix_markdown_auto_provisioning_group([#2543](https://github.com/aliyun/terraform-provider-alicloud/issues/2543)) +- fix_markdown_snapshot_policy([#2540](https://github.com/aliyun/terraform-provider-alicloud/issues/2540)) ## 1.92.0 (July 31, 2020) -- **New Resource:** `alicloud_oos_template` ([#2670](https://github.com/aliyun/terraform-provider-alicloud/issues/2670)) -- **Data Source:** `alicloud_oos_template` ([#2670](https://github.com/aliyun/terraform-provider-alicloud/issues/2670)) +- **New Resource:** `alicloud_oos_template`([#2670](https://github.com/aliyun/terraform-provider-alicloud/issues/2670)) +- **Data Source:** `alicloud_oos_template`([#2670](https://github.com/aliyun/terraform-provider-alicloud/issues/2670)) IMPROVEMENTS: -- modify alicloud_cen_bandwidth_package_attachment ([#2675](https://github.com/aliyun/terraform-provider-alicloud/issues/2675)) -- UPDATE CHANGELOG ([#2671](https://github.com/aliyun/terraform-provider-alicloud/issues/2671)) -- upgrade resource of Nas AccessGroup ([#2667](https://github.com/aliyun/terraform-provider-alicloud/issues/2667)) -- Supports setting the kms id for oss bucket ([#2662](https://github.com/aliyun/terraform-provider-alicloud/issues/2662)) -- Support service_account_issuer and api_audiences in alicloud_cs_kubernetes and alicloud_cs_managed_kubernetes ([#2573](https://github.com/aliyun/terraform-provider-alicloud/issues/2573)) +- modify alicloud_cen_bandwidth_package_attachment([#2675](https://github.com/aliyun/terraform-provider-alicloud/issues/2675)) +- UPDATE CHANGELOG([#2671](https://github.com/aliyun/terraform-provider-alicloud/issues/2671)) +- upgrade resource of Nas AccessGroup([#2667](https://github.com/aliyun/terraform-provider-alicloud/issues/2667)) +- Supports setting the kms id for oss bucket([#2662](https://github.com/aliyun/terraform-provider-alicloud/issues/2662)) +- Support service_account_issuer and api_audiences in alicloud_cs_kubernetes and alicloud_cs_managed_kubernetes([#2573](https://github.com/aliyun/terraform-provider-alicloud/issues/2573)) BUG FIXES: -- Fix ess kms disk ([#2668](https://github.com/aliyun/terraform-provider-alicloud/issues/2668)) +- Fix ess kms disk([#2668](https://github.com/aliyun/terraform-provider-alicloud/issues/2668)) ## 1.91.0 (July 24, 2020) -- **New Resource:** `alicloud_ecs_dedicated_host` ([#2652](https://github.com/aliyun/terraform-provider-alicloud/issues/2652)) -- **Data Source:** `alicloud_ecs_dedicated_hosts` ([#2652](https://github.com/aliyun/terraform-provider-alicloud/issues/2652)) +- **New Resource:** `alicloud_ecs_dedicated_host`([#2652](https://github.com/aliyun/terraform-provider-alicloud/issues/2652)) +- **Data Source:** `alicloud_ecs_dedicated_hosts`([#2652](https://github.com/aliyun/terraform-provider-alicloud/issues/2652)) IMPROVEMENTS: -- improve test case name ([#2672](https://github.com/aliyun/terraform-provider-alicloud/issues/2672)) -- update: add nat bound eip ipaddress ([#2669](https://github.com/aliyun/terraform-provider-alicloud/issues/2669)) -- correct log alert testcase name ([#2663](https://github.com/aliyun/terraform-provider-alicloud/issues/2663)) -- add example module for OSS bucket ([#2661](https://github.com/aliyun/terraform-provider-alicloud/issues/2661)) -- cs cluster support data disks ([#2657](https://github.com/aliyun/terraform-provider-alicloud/issues/2657)) -- drds support international site ([#2654](https://github.com/aliyun/terraform-provider-alicloud/issues/2654)) -- UPDATE CHANGELOG ([#2649](https://github.com/aliyun/terraform-provider-alicloud/issues/2649)) -- modify cen_instance ([#2644](https://github.com/aliyun/terraform-provider-alicloud/issues/2644)) -- add ability to enable ZRS on bucket creation ([#2605](https://github.com/aliyun/terraform-provider-alicloud/issues/2605)) +- improve test case name([#2672](https://github.com/aliyun/terraform-provider-alicloud/issues/2672)) +- update: add nat bound eip ipaddress([#2669](https://github.com/aliyun/terraform-provider-alicloud/issues/2669)) +- correct log alert testcase name([#2663](https://github.com/aliyun/terraform-provider-alicloud/issues/2663)) +- add example module for OSS bucket([#2661](https://github.com/aliyun/terraform-provider-alicloud/issues/2661)) +- cs cluster support data disks([#2657](https://github.com/aliyun/terraform-provider-alicloud/issues/2657)) +- drds support international site([#2654](https://github.com/aliyun/terraform-provider-alicloud/issues/2654)) +- UPDATE CHANGELOG([#2649](https://github.com/aliyun/terraform-provider-alicloud/issues/2649)) +- modify cen_instance([#2644](https://github.com/aliyun/terraform-provider-alicloud/issues/2644)) +- add ability to enable ZRS on bucket creation([#2605](https://github.com/aliyun/terraform-provider-alicloud/issues/2605)) BUG FIXES: -- fix ddh testcase ([#2665](https://github.com/aliyun/terraform-provider-alicloud/issues/2665)) -- fix dms instance ([#2656](https://github.com/aliyun/terraform-provider-alicloud/issues/2656)) -- fix_markdown_ess_scheduled_task ([#2655](https://github.com/aliyun/terraform-provider-alicloud/issues/2655)) -- fix slb_listener creates NewCommonRequest error handling ([#2653](https://github.com/aliyun/terraform-provider-alicloud/issues/2653)) +- fix ddh testcase([#2665](https://github.com/aliyun/terraform-provider-alicloud/issues/2665)) +- fix dms instance([#2656](https://github.com/aliyun/terraform-provider-alicloud/issues/2656)) +- fix_markdown_ess_scheduled_task([#2655](https://github.com/aliyun/terraform-provider-alicloud/issues/2655)) +- fix slb_listener creates NewCommonRequest error handling([#2653](https://github.com/aliyun/terraform-provider-alicloud/issues/2653)) ## 1.90.1 (July 15, 2020) IMPROVEMENTS: -- perf: rds ssl and tde limitation ([#2645](https://github.com/aliyun/terraform-provider-alicloud/issues/2645)) -- add isp support to cbwp ([#2642](https://github.com/aliyun/terraform-provider-alicloud/issues/2642)) -- Remove the resource_group_id parameter when querying the system disk ([#2641](https://github.com/aliyun/terraform-provider-alicloud/issues/2641)) -- Add 'testAcc' prefix for test case name ([#2636](https://github.com/aliyun/terraform-provider-alicloud/issues/2636)) -- Support DescribeInstanceSystemDisk method return the error message ([#2635](https://github.com/aliyun/terraform-provider-alicloud/issues/2635)) -- UPDATE CHANGELOG ([#2634](https://github.com/aliyun/terraform-provider-alicloud/issues/2634)) +- perf: rds ssl and tde limitation([#2645](https://github.com/aliyun/terraform-provider-alicloud/issues/2645)) +- add isp support to cbwp([#2642](https://github.com/aliyun/terraform-provider-alicloud/issues/2642)) +- Remove the resource_group_id parameter when querying the system disk([#2641](https://github.com/aliyun/terraform-provider-alicloud/issues/2641)) +- Add 'testAcc' prefix for test case name([#2636](https://github.com/aliyun/terraform-provider-alicloud/issues/2636)) +- Support DescribeInstanceSystemDisk method return the error message([#2635](https://github.com/aliyun/terraform-provider-alicloud/issues/2635)) +- UPDATE CHANGELOG([#2634](https://github.com/aliyun/terraform-provider-alicloud/issues/2634)) BUG FIXES: -- fix cassandra doc ([#2648](https://github.com/aliyun/terraform-provider-alicloud/issues/2648)) -- fix_markdown_ess_scheduled_task ([#2647](https://github.com/aliyun/terraform-provider-alicloud/issues/2647)) -- fix WAF instance testcase ([#2640](https://github.com/aliyun/terraform-provider-alicloud/issues/2640)) -- fix testcase name ([#2638](https://github.com/aliyun/terraform-provider-alicloud/issues/2638)) -- fix_instance ([#2632](https://github.com/aliyun/terraform-provider-alicloud/issues/2632)) +- fix cassandra doc ([#2648](https://github.com/aliyun/terraform-provider-alicloud/issues/2648)) +- fix_markdown_ess_scheduled_task([#2647](https://github.com/aliyun/terraform-provider-alicloud/issues/2647)) +- fix WAF instance testcase([#2640](https://github.com/aliyun/terraform-provider-alicloud/issues/2640)) +- fix testcase name([#2638](https://github.com/aliyun/terraform-provider-alicloud/issues/2638)) +- fix_instance([#2632](https://github.com/aliyun/terraform-provider-alicloud/issues/2632)) ## 1.90.0 (July 10, 2020) -- **New Resource:** `alicloud_container_registry_enterprise_sync_rule` ([#2607](https://github.com/aliyun/terraform-provider-alicloud/issues/2607)) -- **New Resource:** `alicloud_dms_user` ([#2604](https://github.com/aliyun/terraform-provider-alicloud/issues/2604)) -- **Data Source:** `alicloud_cr_ee_sync_rules` ([#2630](https://github.com/aliyun/terraform-provider-alicloud/issues/2630)) -- **Data Source:** `alicloud_eci_image_cache` ([#2627](https://github.com/aliyun/terraform-provider-alicloud/issues/2627)) -- **Data Source:** `alicloud_waf_instance` ([#2617](https://github.com/aliyun/terraform-provider-alicloud/issues/2617)) -- **Data Source:** `alicloud_dms_user` ([#2604](https://github.com/aliyun/terraform-provider-alicloud/issues/2604)) +- **New Resource:** `alicloud_container_registry_enterprise_sync_rule`([#2607](https://github.com/aliyun/terraform-provider-alicloud/issues/2607)) +- **New Resource:** `alicloud_dms_user`([#2604](https://github.com/aliyun/terraform-provider-alicloud/issues/2604)) +- **Data Source:** `alicloud_cr_ee_sync_rules`([#2630](https://github.com/aliyun/terraform-provider-alicloud/issues/2630)) +- **Data Source:** `alicloud_eci_image_cache`([#2627](https://github.com/aliyun/terraform-provider-alicloud/issues/2627)) +- **Data Source:** `alicloud_waf_instance`([#2617](https://github.com/aliyun/terraform-provider-alicloud/issues/2617)) +- **Data Source:** `alicloud_dms_user`([#2604](https://github.com/aliyun/terraform-provider-alicloud/issues/2604)) IMPROVEMENTS: -- support the CNAME of CDN domain new ([#2622](https://github.com/aliyun/terraform-provider-alicloud/issues/2622)) -- UPDATE CHANGELOG ([#2594](https://github.com/aliyun/terraform-provider-alicloud/issues/2594)) -- Feature/disable addon ([#2590](https://github.com/aliyun/terraform-provider-alicloud/issues/2590)) -- set system default and make fmt ([#2480](https://github.com/aliyun/terraform-provider-alicloud/issues/2480)) +- support the CNAME of CDN domain new([#2622](https://github.com/aliyun/terraform-provider-alicloud/issues/2622)) +- UPDATE CHANGELOG([#2594](https://github.com/aliyun/terraform-provider-alicloud/issues/2594)) +- Feature/disable addon([#2590](https://github.com/aliyun/terraform-provider-alicloud/issues/2590)) +- set system default and make fmt([#2480](https://github.com/aliyun/terraform-provider-alicloud/issues/2480)) BUG FIXES: -- fix_ess_scheduled_task ([#2628](https://github.com/aliyun/terraform-provider-alicloud/issues/2628)) -- fix testcase of WAF instance datasource ([#2625](https://github.com/aliyun/terraform-provider-alicloud/issues/2625)) -- fix oss lifecycle rule match the whole bucket by default ([#2621](https://github.com/aliyun/terraform-provider-alicloud/issues/2621)) -- fix ack uat ([#2618](https://github.com/aliyun/terraform-provider-alicloud/issues/2618)) +- fix_ess_scheduled_task([#2628](https://github.com/aliyun/terraform-provider-alicloud/issues/2628)) +- fix testcase of WAF instance datasource([#2625](https://github.com/aliyun/terraform-provider-alicloud/issues/2625)) +- fix oss lifecycle rule match the whole bucket by default([#2621](https://github.com/aliyun/terraform-provider-alicloud/issues/2621)) +- fix ack uat([#2618](https://github.com/aliyun/terraform-provider-alicloud/issues/2618)) ## 1.89.0 (July 03, 2020) -- **New Resource:** `alicloud_eci_image_cache` ([#2615](https://github.com/aliyun/terraform-provider-alicloud/issues/2615)) +- **New Resource:** `alicloud_eci_image_cache`([#2615](https://github.com/aliyun/terraform-provider-alicloud/issues/2615)) IMPROVEMENTS: -- improve(alikafka): using default vswitch to run alikafka testcases ([#2591](https://github.com/aliyun/terraform-provider-alicloud/issues/2591)) -- run 'go mod vendor' to sync ([#2587](https://github.com/aliyun/terraform-provider-alicloud/issues/2587)) -- update waf SDK ([#2616](https://github.com/aliyun/terraform-provider-alicloud/issues/2616)) -- umodify cen_route_map ([#2606](https://github.com/aliyun/terraform-provider-alicloud/issues/2606)) -- modify cen_bandwidth_package ([#2603](https://github.com/aliyun/terraform-provider-alicloud/issues/2603)) -- support region cn-wulanchabu ([#2599](https://github.com/aliyun/terraform-provider-alicloud/issues/2599)) -- Add version_stage filter ([#2597](https://github.com/aliyun/terraform-provider-alicloud/issues/2597)) -- support releasing ddoscoo instance ([#2595](https://github.com/aliyun/terraform-provider-alicloud/issues/2595)) -- Support modify system_disk_size online ([#2593](https://github.com/aliyun/terraform-provider-alicloud/issues/2593)) -- Changelog ([#2584](https://github.com/aliyun/terraform-provider-alicloud/issues/2584)) +- improve(alikafka): using default vswitch to run alikafka testcases([#2591](https://github.com/aliyun/terraform-provider-alicloud/issues/2591)) +- run 'go mod vendor' to sync([#2587](https://github.com/aliyun/terraform-provider-alicloud/issues/2587)) +- update waf SDK([#2616](https://github.com/aliyun/terraform-provider-alicloud/issues/2616)) +- umodify cen_route_map([#2606](https://github.com/aliyun/terraform-provider-alicloud/issues/2606)) +- modify cen_bandwidth_package([#2603](https://github.com/aliyun/terraform-provider-alicloud/issues/2603)) +- support region cn-wulanchabu([#2599](https://github.com/aliyun/terraform-provider-alicloud/issues/2599)) +- Add version_stage filter([#2597](https://github.com/aliyun/terraform-provider-alicloud/issues/2597)) +- support releasing ddoscoo instance([#2595](https://github.com/aliyun/terraform-provider-alicloud/issues/2595)) +- Support modify system_disk_size online([#2593](https://github.com/aliyun/terraform-provider-alicloud/issues/2593)) +- Changelog([#2584](https://github.com/aliyun/terraform-provider-alicloud/issues/2584)) BUG FIXES: -- fix cms site monitor document ([#2614](https://github.com/aliyun/terraform-provider-alicloud/issues/2614)) -- fix_kms_ecs_disk ([#2613](https://github.com/aliyun/terraform-provider-alicloud/issues/2613)) -- fix_markdown_ess_notification ([#2598](https://github.com/aliyun/terraform-provider-alicloud/issues/2598)) -- fix kms secret, secret version doc ([#2596](https://github.com/aliyun/terraform-provider-alicloud/issues/2596)) -- fix testcase for pvtz_zone ([#2592](https://github.com/aliyun/terraform-provider-alicloud/issues/2592)) -- fix the dns_record test case bug ([#2588](https://github.com/aliyun/terraform-provider-alicloud/issues/2588)) -- fix_markdown_launch_template ([#2541](https://github.com/aliyun/terraform-provider-alicloud/issues/2541)) +- fix cms site monitor document([#2614](https://github.com/aliyun/terraform-provider-alicloud/issues/2614)) +- fix_kms_ecs_disk([#2613](https://github.com/aliyun/terraform-provider-alicloud/issues/2613)) +- fix_markdown_ess_notification([#2598](https://github.com/aliyun/terraform-provider-alicloud/issues/2598)) +- fix kms secret, secret version doc([#2596](https://github.com/aliyun/terraform-provider-alicloud/issues/2596)) +- fix testcase for pvtz_zone([#2592](https://github.com/aliyun/terraform-provider-alicloud/issues/2592)) +- fix the dns_record test case bug([#2588](https://github.com/aliyun/terraform-provider-alicloud/issues/2588)) +- fix_markdown_launch_template([#2541](https://github.com/aliyun/terraform-provider-alicloud/issues/2541)) ## 1.88.0 (June 22, 2020) -- **New Resource:** `alicloud_cen_vbr_health_check` ([#2575](https://github.com/aliyun/terraform-provider-alicloud/issues/2575)) -- **Data Source:** `alicloud_cen_private_zones` ([#2564](https://github.com/aliyun/terraform-provider-alicloud/issues/2564)) -- **Data Source:** `alicloud_dms_enterprise_instances` ([#2557](https://github.com/aliyun/terraform-provider-alicloud/issues/2557)) -- **Data Source:** `alicloud_cassandra` ([#2574](https://github.com/aliyun/terraform-provider-alicloud/issues/2574)) -- **Data Source:** `alicloud_kms_secret_versions` ([#2583](https://github.com/aliyun/terraform-provider-alicloud/issues/2583)) +- **New Resource:** `alicloud_cen_vbr_health_check`([#2575](https://github.com/aliyun/terraform-provider-alicloud/issues/2575)) +- **Data Source:** `alicloud_cen_private_zones`([#2564](https://github.com/aliyun/terraform-provider-alicloud/issues/2564)) +- **Data Source:** `alicloud_dms_enterprise_instances`([#2557](https://github.com/aliyun/terraform-provider-alicloud/issues/2557)) +- **Data Source:** `alicloud_cassandra`([#2574](https://github.com/aliyun/terraform-provider-alicloud/issues/2574)) +- **Data Source:** `alicloud_kms_secret_versions`([#2583](https://github.com/aliyun/terraform-provider-alicloud/issues/2583)) IMPROVEMENTS: -- skip instance prepaid testcase ([#2585](https://github.com/aliyun/terraform-provider-alicloud/issues/2585)) -- Support setting NO_PROXY and upgrade go sdk ([#2581](https://github.com/aliyun/terraform-provider-alicloud/issues/2581)) -- Features/atoscaler_use_worker_token ([#2578](https://github.com/aliyun/terraform-provider-alicloud/issues/2578)) -- Features/knock autoscaler off nodes ([#2571](https://github.com/aliyun/terraform-provider-alicloud/issues/2571)) -- modify cen_instance_attachment ([#2566](https://github.com/aliyun/terraform-provider-alicloud/issues/2566)) -- gpdb doc change "tf-gpdb-test"" to "tf-gpdb-test" ([#2561](https://github.com/aliyun/terraform-provider-alicloud/issues/2561)) -- UPDATE CHANGELOG ([#2555](https://github.com/aliyun/terraform-provider-alicloud/issues/2555)) -- cassandra cluster ([#2522](https://github.com/aliyun/terraform-provider-alicloud/issues/2522)) +- skip instance prepaid testcase([#2585](https://github.com/aliyun/terraform-provider-alicloud/issues/2585)) +- Support setting NO_PROXY and upgrade go sdk([#2581](https://github.com/aliyun/terraform-provider-alicloud/issues/2581)) +- Features/atoscaler_use_worker_token([#2578](https://github.com/aliyun/terraform-provider-alicloud/issues/2578)) +- Features/knock autoscaler off nodes([#2571](https://github.com/aliyun/terraform-provider-alicloud/issues/2571)) +- modify cen_instance_attachment([#2566](https://github.com/aliyun/terraform-provider-alicloud/issues/2566)) +- gpdb doc change "tf-gpdb-test"" to "tf-gpdb-test"([#2561](https://github.com/aliyun/terraform-provider-alicloud/issues/2561)) +- UPDATE CHANGELOG([#2555](https://github.com/aliyun/terraform-provider-alicloud/issues/2555)) +- cassandra cluster([#2522](https://github.com/aliyun/terraform-provider-alicloud/issues/2522)) BUG FIXES: -- Fix the fc-function testcase and markdown ([#2569](https://github.com/aliyun/terraform-provider-alicloud/issues/2569)) -- fix name spelling mistake ([#2558](https://github.com/aliyun/terraform-provider-alicloud/issues/2558)) +- Fix the fc-function testcase and markdown([#2569](https://github.com/aliyun/terraform-provider-alicloud/issues/2569)) +- fix name spelling mistake([#2558](https://github.com/aliyun/terraform-provider-alicloud/issues/2558)) ## 1.87.0 (June 12, 2020) -- **Data Source:** `alicloud_container_registry_enterprise_repos` ([#2538](https://github.com/aliyun/terraform-provider-alicloud/issues/2538)) -- **Data Source:** `alicloud_container_registry_enterprise_namespaces` ([#2530](https://github.com/aliyun/terraform-provider-alicloud/issues/2530)) -- **Data Source:** `alicloud_container_registry_enterprise_instances` ([#2526](https://github.com/aliyun/terraform-provider-alicloud/issues/2526)) -- **Data Source:** `alicloud_cen_route_maps` ([#2554](https://github.com/aliyun/terraform-provider-alicloud/issues/2554)) +- **Data Source:** `alicloud_container_registry_enterprise_repos`([#2538](https://github.com/aliyun/terraform-provider-alicloud/issues/2538)) +- **Data Source:** `alicloud_container_registry_enterprise_namespaces`([#2530](https://github.com/aliyun/terraform-provider-alicloud/issues/2530)) +- **Data Source:** `alicloud_container_registry_enterprise_instances`([#2526](https://github.com/aliyun/terraform-provider-alicloud/issues/2526)) +- **Data Source:** `alicloud_cen_route_maps`([#2554](https://github.com/aliyun/terraform-provider-alicloud/issues/2554)) IMPROVEMENTS: -- adapter schedulerrule ([#2537](https://github.com/aliyun/terraform-provider-alicloud/issues/2537)) -- UPDATE CHANGELOG ([#2535](https://github.com/aliyun/terraform-provider-alicloud/issues/2535)) -- improve_user_experience ([#2491](https://github.com/aliyun/terraform-provider-alicloud/issues/2491)) -- add testcase ([#2556](https://github.com/aliyun/terraform-provider-alicloud/issues/2556)) -- improve(elasticsearch): resource support to open or close network, and modify the kibana whitelist in private network ([#2548](https://github.com/aliyun/terraform-provider-alicloud/issues/2548)) -- support "resource_group_id" for Bastionhost Instance ([#2544](https://github.com/aliyun/terraform-provider-alicloud/issues/2544)) -- support "resource_group_id" for DBaudit Instance ([#2539](https://github.com/aliyun/terraform-provider-alicloud/issues/2539)) -- Automatically generate dns_domain datasource ([#2549](https://github.com/aliyun/terraform-provider-alicloud/issues/2549)) +- adapter schedulerrule([#2537](https://github.com/aliyun/terraform-provider-alicloud/issues/2537)) +- UPDATE CHANGELOG([#2535](https://github.com/aliyun/terraform-provider-alicloud/issues/2535)) +- improve_user_experience([#2491](https://github.com/aliyun/terraform-provider-alicloud/issues/2491)) +- add testcase([#2556](https://github.com/aliyun/terraform-provider-alicloud/issues/2556)) +- improve(elasticsearch): resource support to open or close network, and modify the kibana whitelist in private network([#2548](https://github.com/aliyun/terraform-provider-alicloud/issues/2548)) +- support "resource_group_id" for Bastionhost Instance([#2544](https://github.com/aliyun/terraform-provider-alicloud/issues/2544)) +- support "resource_group_id" for DBaudit Instance([#2539](https://github.com/aliyun/terraform-provider-alicloud/issues/2539)) +- Automatically generate dns_domain datasource([#2549](https://github.com/aliyun/terraform-provider-alicloud/issues/2549)) BUG FIXES: -- Fix image export ([#2542](https://github.com/aliyun/terraform-provider-alicloud/issues/2542)) -- fix: perf create rds pg ([#2533](https://github.com/aliyun/terraform-provider-alicloud/issues/2533)) -- fix_markdown_ess_scalinggroup ([#2529](https://github.com/aliyun/terraform-provider-alicloud/issues/2529)) -- fix_markdown_image_import ([#2520](https://github.com/aliyun/terraform-provider-alicloud/issues/2520)) -- fix_markdown_disk ([#2504](https://github.com/aliyun/terraform-provider-alicloud/issues/2504)) -- fix_markdown_image_s ([#2546](https://github.com/aliyun/terraform-provider-alicloud/issues/2546)) +- Fix image export([#2542](https://github.com/aliyun/terraform-provider-alicloud/issues/2542)) +- fix: perf create rds pg([#2533](https://github.com/aliyun/terraform-provider-alicloud/issues/2533)) +- fix_markdown_ess_scalinggroup([#2529](https://github.com/aliyun/terraform-provider-alicloud/issues/2529)) +- fix_markdown_image_import([#2520](https://github.com/aliyun/terraform-provider-alicloud/issues/2520)) +- fix_markdown_disk([#2504](https://github.com/aliyun/terraform-provider-alicloud/issues/2504)) +- fix_markdown_image_s([#2546](https://github.com/aliyun/terraform-provider-alicloud/issues/2546)) ## 1.86.0 (June 05, 2020) -- **New Resource:** `alicloud_container_registry_enterprise_repo` ([#2525](https://github.com/aliyun/terraform-provider-alicloud/issues/2525)) -- **New Resource:** `alicloud_Container_registry_enterprise_namespace` ([#2519](https://github.com/aliyun/terraform-provider-alicloud/issues/2519)) -- **New Resource:** `alicloud_ddoscoo_scheduler_rule` ([#2476](https://github.com/aliyun/terraform-provider-alicloud/issues/2476)) -- **New Resource:** `alicloud_resource_manager_policies` ([#2474](https://github.com/aliyun/terraform-provider-alicloud/issues/2474)) -- **Data Source:** `alicloud_waf_domains` ([#2498](https://github.com/aliyun/terraform-provider-alicloud/issues/2498)) -- **Data Source:** `alicloud_kms_secrets` ([#2515](https://github.com/aliyun/terraform-provider-alicloud/issues/2515)) -- **Data Source:** `alicloud_alidns_domain_records` ([#2503](https://github.com/aliyun/terraform-provider-alicloud/issues/2503)) -- **Data Source:** `alicloud_resource_manager_resource_directories` ([#2499](https://github.com/aliyun/terraform-provider-alicloud/issues/2499)) -- **Data Source:** `alicloud_resource_manager_handshakes` ([#2489](https://github.com/aliyun/terraform-provider-alicloud/issues/2489)) -- **Data Source:** `alicloud_resource_manager_accounts` ([#2488](https://github.com/aliyun/terraform-provider-alicloud/issues/2488)) -- **Data Source:** `alicloud_resource_manager_roles` ([#2483](https://github.com/aliyun/terraform-provider-alicloud/issues/2483)) - -IMPROVEMENTS: -- support "resource_group_id" for Elasticsearch instance ([#2528](https://github.com/aliyun/terraform-provider-alicloud/issues/2528)) -- Added new feature of encrypting data node disk ([#2521](https://github.com/aliyun/terraform-provider-alicloud/issues/2521)) -- support "resource_group_id" for Private Zone ([#2518](https://github.com/aliyun/terraform-provider-alicloud/issues/2518)) -- support "resource_group_id" for DB instance ([#2514](https://github.com/aliyun/terraform-provider-alicloud/issues/2514)) -- 更新sdk到v1.61.230 ([#2510](https://github.com/aliyun/terraform-provider-alicloud/issues/2510)) -- support "resource_group_id" for kvstore instance ([#2509](https://github.com/aliyun/terraform-provider-alicloud/issues/2509)) -- Add Log Dashboard ([#2502](https://github.com/aliyun/terraform-provider-alicloud/issues/2502)) -- UPDATE CHANGELOG ([#2497](https://github.com/aliyun/terraform-provider-alicloud/issues/2497)) -- Control the instance start and stop through the status attribute ([#2464](https://github.com/aliyun/terraform-provider-alicloud/issues/2464)) - -BUG FIXES: -- fix_markdown_image_import ([#2516](https://github.com/aliyun/terraform-provider-alicloud/issues/2516)) -- fix ecs 'status' attribute bug ([#2512](https://github.com/aliyun/terraform-provider-alicloud/issues/2512)) -- fix_markdown_ess_scalinggroup_vserver_groups ([#2508](https://github.com/aliyun/terraform-provider-alicloud/issues/2508)) -- fix_markdown_disk_attachment ([#2501](https://github.com/aliyun/terraform-provider-alicloud/issues/2501)) -- fix_markdown_disk_attachment ([#2481](https://github.com/aliyun/terraform-provider-alicloud/issues/2481)) +- **New Resource:** `alicloud_container_registry_enterprise_repo`([#2525](https://github.com/aliyun/terraform-provider-alicloud/issues/2525)) +- **New Resource:** `alicloud_Container_registry_enterprise_namespace`([#2519](https://github.com/aliyun/terraform-provider-alicloud/issues/2519)) +- **New Resource:** `alicloud_ddoscoo_scheduler_rule`([#2476](https://github.com/aliyun/terraform-provider-alicloud/issues/2476)) +- **New Resource:** `alicloud_resource_manager_policies`([#2474](https://github.com/aliyun/terraform-provider-alicloud/issues/2474)) +- **Data Source:** `alicloud_waf_domains`([#2498](https://github.com/aliyun/terraform-provider-alicloud/issues/2498)) +- **Data Source:** `alicloud_kms_secrets`([#2515](https://github.com/aliyun/terraform-provider-alicloud/issues/2515)) +- **Data Source:** `alicloud_alidns_domain_records`([#2503](https://github.com/aliyun/terraform-provider-alicloud/issues/2503)) +- **Data Source:** `alicloud_resource_manager_resource_directories`([#2499](https://github.com/aliyun/terraform-provider-alicloud/issues/2499)) +- **Data Source:** `alicloud_resource_manager_handshakes`([#2489](https://github.com/aliyun/terraform-provider-alicloud/issues/2489)) +- **Data Source:** `alicloud_resource_manager_accounts`([#2488](https://github.com/aliyun/terraform-provider-alicloud/issues/2488)) +- **Data Source:** `alicloud_resource_manager_roles`([#2483](https://github.com/aliyun/terraform-provider-alicloud/issues/2483)) + +IMPROVEMENTS: +- support "resource_group_id" for Elasticsearch instance([#2528](https://github.com/aliyun/terraform-provider-alicloud/issues/2528)) +- Added new feature of encrypting data node disk([#2521](https://github.com/aliyun/terraform-provider-alicloud/issues/2521)) +- support "resource_group_id" for Private Zone([#2518](https://github.com/aliyun/terraform-provider-alicloud/issues/2518)) +- support "resource_group_id" for DB instance([#2514](https://github.com/aliyun/terraform-provider-alicloud/issues/2514)) +- 更新sdk到v1.61.230([#2510](https://github.com/aliyun/terraform-provider-alicloud/issues/2510)) +- support "resource_group_id" for kvstore instance([#2509](https://github.com/aliyun/terraform-provider-alicloud/issues/2509)) +- Add Log Dashboard([#2502](https://github.com/aliyun/terraform-provider-alicloud/issues/2502)) +- UPDATE CHANGELOG([#2497](https://github.com/aliyun/terraform-provider-alicloud/issues/2497)) +- Control the instance start and stop through the status attribute([#2464](https://github.com/aliyun/terraform-provider-alicloud/issues/2464)) + +BUG FIXES: +- fix_markdown_image_import([#2516](https://github.com/aliyun/terraform-provider-alicloud/issues/2516)) +- fix ecs 'status' attribute bug([#2512](https://github.com/aliyun/terraform-provider-alicloud/issues/2512)) +- fix_markdown_ess_scalinggroup_vserver_groups([#2508](https://github.com/aliyun/terraform-provider-alicloud/issues/2508)) +- fix_markdown_disk_attachment([#2501](https://github.com/aliyun/terraform-provider-alicloud/issues/2501)) +- fix_markdown_disk_attachment([#2481](https://github.com/aliyun/terraform-provider-alicloud/issues/2481)) ## 1.85.0 (May 29, 2020) -- **New Resource:** `alicloud_alidns_record` ([#2495](https://github.com/aliyun/terraform-provider-alicloud/issues/2495)) -- **New Resource:** `alicloud_kms_key` ([#2444](https://github.com/aliyun/terraform-provider-alicloud/issues/2444)) -- **New Resource:** `alicloud_kms_keyversion` ([#2471](https://github.com/aliyun/terraform-provider-alicloud/issues/2471)) -- **Data Source:** `alicloud_resource_manager_policy_versions` ([#2496](https://github.com/aliyun/terraform-provider-alicloud/issues/2496)) -- **Data Source:** `alicloud_kms_key_versions` ([#2494](https://github.com/aliyun/terraform-provider-alicloud/issues/2494)) -- **Data Source:** `alicloud_alidns_domain_group` ([#2482](https://github.com/aliyun/terraform-provider-alicloud/issues/2482)) +- **New Resource:** `alicloud_alidns_record`([#2495](https://github.com/aliyun/terraform-provider-alicloud/issues/2495)) +- **New Resource:** `alicloud_kms_key`([#2444](https://github.com/aliyun/terraform-provider-alicloud/issues/2444)) +- **New Resource:** `alicloud_kms_keyversion`([#2471](https://github.com/aliyun/terraform-provider-alicloud/issues/2471)) +- **Data Source:** `alicloud_resource_manager_policy_versions`([#2496](https://github.com/aliyun/terraform-provider-alicloud/issues/2496)) +- **Data Source:** `alicloud_kms_key_versions`([#2494](https://github.com/aliyun/terraform-provider-alicloud/issues/2494)) +- **Data Source:** `alicloud_alidns_domain_group`([#2482](https://github.com/aliyun/terraform-provider-alicloud/issues/2482)) IMPROVEMENTS: -- 增加cdn_config删除错误码 ([#2490](https://github.com/aliyun/terraform-provider-alicloud/issues/2490)) -- UPDATE CHANGELOG.md ([#2477](https://github.com/aliyun/terraform-provider-alicloud/issues/2477)) -- Alicloud edas docs modify ([#2473](https://github.com/aliyun/terraform-provider-alicloud/issues/2473)) +- 增加cdn_config删除错误码([#2490](https://github.com/aliyun/terraform-provider-alicloud/issues/2490)) +- UPDATE CHANGELOG.md([#2477](https://github.com/aliyun/terraform-provider-alicloud/issues/2477)) +- Alicloud edas docs modify([#2473](https://github.com/aliyun/terraform-provider-alicloud/issues/2473)) BUG FIXES: -- fix_markdown_reserved_instance ([#2478](https://github.com/aliyun/terraform-provider-alicloud/issues/2478)) -- fix_markdown_network_interfaces ([#2475](https://github.com/aliyun/terraform-provider-alicloud/issues/2475)) -- fix_apg ([#2472](https://github.com/aliyun/terraform-provider-alicloud/issues/2472)) +- fix_markdown_reserved_instance([#2478](https://github.com/aliyun/terraform-provider-alicloud/issues/2478)) +- fix_markdown_network_interfaces([#2475](https://github.com/aliyun/terraform-provider-alicloud/issues/2475)) +- fix_apg([#2472](https://github.com/aliyun/terraform-provider-alicloud/issues/2472)) ## 1.84.0 (May 22, 2020) -- **New Resource:** `alicloud_alidns_domain_group.` ([#2454](https://github.com/aliyun/terraform-provider-alicloud/issues/2454)) -- **New Resource:** `alicloud_resource_manager_resource_directory` ([#2459](https://github.com/aliyun/terraform-provider-alicloud/issues/2459)) -- **New Resource:** `alicloud_resource_manager_policy_version` ([#2457](https://github.com/aliyun/terraform-provider-alicloud/issues/2457)) -- **Data Source:** `alicloud_resource_manager_folders` ([#2467](https://github.com/aliyun/terraform-provider-alicloud/issues/2467)) -- **Data Source:** `alicloud_alidns_instance.` ([#2468](https://github.com/aliyun/terraform-provider-alicloud/issues/2468)) -- **Data Source:** `alicloud_resource_manager_resource_groups` ([#2462](https://github.com/aliyun/terraform-provider-alicloud/issues/2462)) +- **New Resource:** `alicloud_alidns_domain_group.`([#2454](https://github.com/aliyun/terraform-provider-alicloud/issues/2454)) +- **New Resource:** `alicloud_resource_manager_resource_directory`([#2459](https://github.com/aliyun/terraform-provider-alicloud/issues/2459)) +- **New Resource:** `alicloud_resource_manager_policy_version`([#2457](https://github.com/aliyun/terraform-provider-alicloud/issues/2457)) +- **Data Source:** `alicloud_resource_manager_folders`([#2467](https://github.com/aliyun/terraform-provider-alicloud/issues/2467)) +- **Data Source:** `alicloud_alidns_instance.`([#2468](https://github.com/aliyun/terraform-provider-alicloud/issues/2468)) +- **Data Source:** `alicloud_resource_manager_resource_groups`([#2462](https://github.com/aliyun/terraform-provider-alicloud/issues/2462)) IMPROVEMENTS: -- Update CHANGELOG.md ([#2455](https://github.com/aliyun/terraform-provider-alicloud/issues/2455)) +- Update CHANGELOG.md([#2455](https://github.com/aliyun/terraform-provider-alicloud/issues/2455)) BUG FIXES: -- fix autoscaler configmap update ([#2377](https://github.com/aliyun/terraform-provider-alicloud/issues/2377)) -- fix eip association failed cause by snat entry's snat_ip update bug ([#2440](https://github.com/aliyun/terraform-provider-alicloud/issues/2440)) -- fix_tag_validation ([#2445](https://github.com/aliyun/terraform-provider-alicloud/issues/2445)) -- fix polardb connection string output bug ([#2453](https://github.com/aliyun/terraform-provider-alicloud/issues/2453)) -- fix the bug of TestAccAlicloudEmrCluster_local_storage nodeCount less… ([#2458](https://github.com/aliyun/terraform-provider-alicloud/issues/2458)) -- fix_markdown_key_pair_attachment ([#2460](https://github.com/aliyun/terraform-provider-alicloud/issues/2460)) -- fix_finger_print ([#2463](https://github.com/aliyun/terraform-provider-alicloud/issues/2463)) -- fix_markdown_instance_type_families ([#2465](https://github.com/aliyun/terraform-provider-alicloud/issues/2465)) -- fix_markdown_alicloud_network_interface_attachment ([#2469](https://github.com/aliyun/terraform-provider-alicloud/issues/2469)) +- fix autoscaler configmap update([#2377](https://github.com/aliyun/terraform-provider-alicloud/issues/2377)) +- fix eip association failed cause by snat entry's snat_ip update bug([#2440](https://github.com/aliyun/terraform-provider-alicloud/issues/2440)) +- fix_tag_validation([#2445](https://github.com/aliyun/terraform-provider-alicloud/issues/2445)) +- fix polardb connection string output bug([#2453](https://github.com/aliyun/terraform-provider-alicloud/issues/2453)) +- fix the bug of TestAccAlicloudEmrCluster_local_storage nodeCount less…([#2458](https://github.com/aliyun/terraform-provider-alicloud/issues/2458)) +- fix_markdown_key_pair_attachment([#2460](https://github.com/aliyun/terraform-provider-alicloud/issues/2460)) +- fix_finger_print([#2463](https://github.com/aliyun/terraform-provider-alicloud/issues/2463)) +- fix_markdown_instance_type_families([#2465](https://github.com/aliyun/terraform-provider-alicloud/issues/2465)) +- fix_markdown_alicloud_network_interface_attachment([#2469](https://github.com/aliyun/terraform-provider-alicloud/issues/2469)) ## 1.83.0 (May 15, 2020) -- **New Resource:** `alicloud_waf_instance` ([#2456](https://github.com/aliyun/terraform-provider-alicloud/issues/2456)) -- **New Resource:** `alicloud_resource_manager_account` ([#2441](https://github.com/aliyun/terraform-provider-alicloud/issues/2441)) -- **New Resource:** `alicloud_resource_manager_policy` ([#2439](https://github.com/aliyun/terraform-provider-alicloud/issues/2439)) -- **New Resource:** `alicloud_resource_manager_handshake` ([#2432](https://github.com/aliyun/terraform-provider-alicloud/issues/2432)) -- **New Resource:** `alicloud_cen_private_zone` ([#2421](https://github.com/aliyun/terraform-provider-alicloud/issues/2421)) +- **New Resource:** `alicloud_waf_instance`([#2456](https://github.com/aliyun/terraform-provider-alicloud/issues/2456)) +- **New Resource:** `alicloud_resource_manager_account`([#2441](https://github.com/aliyun/terraform-provider-alicloud/issues/2441)) +- **New Resource:** `alicloud_resource_manager_policy`([#2439](https://github.com/aliyun/terraform-provider-alicloud/issues/2439)) +- **New Resource:** `alicloud_resource_manager_handshake`([#2432](https://github.com/aliyun/terraform-provider-alicloud/issues/2432)) +- **New Resource:** `alicloud_cen_private_zone`([#2421](https://github.com/aliyun/terraform-provider-alicloud/issues/2421)) BUG FIXES: -- fix_markdown_instance ([#2436](https://github.com/aliyun/terraform-provider-alicloud/issues/2436)) +- fix_markdown_instance([#2436](https://github.com/aliyun/terraform-provider-alicloud/issues/2436)) ## 1.82.0 (May 08, 2020) -- **New Resource:** `alicloud_resource_manager_handshake` ([#2425](https://github.com/aliyun/terraform-provider-alicloud/issues/2425)) -- **New Resource:** `alicloud_resource_manager_folder` ([#2425](https://github.com/aliyun/terraform-provider-alicloud/issues/2425)) -- **New Resource:** `alicloud_resource_manager_resource_group` ([#2422](https://github.com/aliyun/terraform-provider-alicloud/issues/2422)) -- **New Resource:** `alicloud_waf_domain` ([#2414](https://github.com/aliyun/terraform-provider-alicloud/issues/2414)) -- **New Resource:** `alicloud_resource_manager_role` ([#2405](https://github.com/aliyun/terraform-provider-alicloud/issues/2405)) -- **New Resource:** `alicloud_edas_application` ([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) -- **New Resource:** `alicloud_edas_deploy_group` ([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) -- **New Resource:** `alicloud_edas_application_scale` ([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) -- **New Resource:** `alicloud_edas_slb_attachment` ([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) -- **New Resource:** `alicloud_edas_cluster` ([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) -- **New Resource:** `alicloud_edas_instance_cluster_attachment` ([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) -- **New Resource:** `alicloud_edas_application_deployment` ([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) -- **New Resource:** `alicloud_cen_route_map` ([#2371](https://github.com/aliyun/terraform-provider-alicloud/issues/2371)) -- **Data Source:** `alicloud_edas_applications` ([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) -- **Data Source:** `alicloud_edas_deploy_groups` ([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) -- **Data Source:** `alicloud_edas_clusters` ([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) +- **New Resource:** `alicloud_resource_manager_handshake`([#2425](https://github.com/aliyun/terraform-provider-alicloud/issues/2425)) +- **New Resource:** `alicloud_resource_manager_folder`([#2425](https://github.com/aliyun/terraform-provider-alicloud/issues/2425)) +- **New Resource:** `alicloud_resource_manager_resource_group`([#2422](https://github.com/aliyun/terraform-provider-alicloud/issues/2422)) +- **New Resource:** `alicloud_waf_domain`([#2414](https://github.com/aliyun/terraform-provider-alicloud/issues/2414)) +- **New Resource:** `alicloud_resource_manager_role`([#2405](https://github.com/aliyun/terraform-provider-alicloud/issues/2405)) +- **New Resource:** `alicloud_edas_application`([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) +- **New Resource:** `alicloud_edas_deploy_group`([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) +- **New Resource:** `alicloud_edas_application_scale`([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) +- **New Resource:** `alicloud_edas_slb_attachment`([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) +- **New Resource:** `alicloud_edas_cluster`([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) +- **New Resource:** `alicloud_edas_instance_cluster_attachment`([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) +- **New Resource:** `alicloud_edas_application_deployment`([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) +- **New Resource:** `alicloud_cen_route_map`([#2371](https://github.com/aliyun/terraform-provider-alicloud/issues/2371)) +- **Data Source:** `alicloud_edas_applications`([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) +- **Data Source:** `alicloud_edas_deploy_groups`([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) +- **Data Source:** `alicloud_edas_clusters`([#2384](https://github.com/aliyun/terraform-provider-alicloud/issues/2384)) IMPROVEMENTS: -- ci supports edas and resourceManager dependencies ([#2424](https://github.com/aliyun/terraform-provider-alicloud/issues/2424)) -- add missing "security_group_id" attribute declaration to schema ([#2417](https://github.com/aliyun/terraform-provider-alicloud/issues/2417)) -- Update go sdk to 1.61.155 ([#2413](https://github.com/aliyun/terraform-provider-alicloud/issues/2413)) -- optimized create emr cluster test case ([#2397](https://github.com/aliyun/terraform-provider-alicloud/issues/2397)) +- ci supports edas and resourceManager dependencies([#2424](https://github.com/aliyun/terraform-provider-alicloud/issues/2424)) +- add missing "security_group_id" attribute declaration to schema([#2417](https://github.com/aliyun/terraform-provider-alicloud/issues/2417)) +- Update go sdk to 1.61.155([#2413](https://github.com/aliyun/terraform-provider-alicloud/issues/2413)) +- optimized create emr cluster test case([#2397](https://github.com/aliyun/terraform-provider-alicloud/issues/2397)) BUG FIXES: -- fix_markdown_instance documentation ([#2430](https://github.com/aliyun/terraform-provider-alicloud/issues/2430)) -- fix_markdown_slb_vpc documentation ([#2429](https://github.com/aliyun/terraform-provider-alicloud/issues/2429)) -- fix log audit document documentation ([#2415](https://github.com/aliyun/terraform-provider-alicloud/issues/2415)) -- Fix regression in writeToFile ([#2412](https://github.com/aliyun/terraform-provider-alicloud/issues/2412)) +- fix_markdown_instance documentation([#2430](https://github.com/aliyun/terraform-provider-alicloud/issues/2430)) +- fix_markdown_slb_vpc documentation([#2429](https://github.com/aliyun/terraform-provider-alicloud/issues/2429)) +- fix log audit document documentation([#2415](https://github.com/aliyun/terraform-provider-alicloud/issues/2415)) +- Fix regression in writeToFile([#2412](https://github.com/aliyun/terraform-provider-alicloud/issues/2412)) ## 1.81.0 (May 01, 2020) -- **New Resource:** `alicloud_hbase_instance` ([#2395](https://github.com/aliyun/terraform-provider-alicloud/issues/2395)) -- **New Resource:** `alicloud_adb_connection` ([#2392](https://github.com/aliyun/terraform-provider-alicloud/issues/2392)) -- **New Resource:** `alicloud_cs_kubernetes` ([#2391](https://github.com/aliyun/terraform-provider-alicloud/issues/2391)) -- **New Resource:** `alicloud_dms_enterprise_instance` ([#2390](https://github.com/aliyun/terraform-provider-alicloud/issues/2390)) -- **Data Source:** `alicloud_polardb_node_classes` ([#2369](https://github.com/aliyun/terraform-provider-alicloud/issues/2369)) +- **New Resource:** `alicloud_hbase_instance`([#2395](https://github.com/aliyun/terraform-provider-alicloud/issues/2395)) +- **New Resource:** `alicloud_adb_connection`([#2392](https://github.com/aliyun/terraform-provider-alicloud/issues/2392)) +- **New Resource:** `alicloud_cs_kubernetes`([#2391](https://github.com/aliyun/terraform-provider-alicloud/issues/2391)) +- **New Resource:** `alicloud_dms_enterprise_instance`([#2390](https://github.com/aliyun/terraform-provider-alicloud/issues/2390)) +- **Data Source:** `alicloud_polardb_node_classes`([#2369](https://github.com/aliyun/terraform-provider-alicloud/issues/2369)) IMPROVEMENTS: -- Update go sdk to 1.61.155 ([#2413](https://github.com/aliyun/terraform-provider-alicloud/issues/2413)) -- add test Parameter dependence ([#2402](https://github.com/aliyun/terraform-provider-alicloud/issues/2402)) -- improve dms docs ([#2401](https://github.com/aliyun/terraform-provider-alicloud/issues/2401)) -- Add sls log audit ([#2389](https://github.com/aliyun/terraform-provider-alicloud/issues/2389)) -- Update CHANGELOG.md ([#2386](https://github.com/aliyun/terraform-provider-alicloud/issues/2386)) -- return connection_string after polardb cluster created ([#2379](https://github.com/aliyun/terraform-provider-alicloud/issues/2379)) +- Update go sdk to 1.61.155([#2413](https://github.com/aliyun/terraform-provider-alicloud/issues/2413)) +- add test Parameter dependence([#2402](https://github.com/aliyun/terraform-provider-alicloud/issues/2402)) +- improve dms docs([#2401](https://github.com/aliyun/terraform-provider-alicloud/issues/2401)) +- Add sls log audit([#2389](https://github.com/aliyun/terraform-provider-alicloud/issues/2389)) +- Update CHANGELOG.md([#2386](https://github.com/aliyun/terraform-provider-alicloud/issues/2386)) +- return connection_string after polardb cluster created([#2379](https://github.com/aliyun/terraform-provider-alicloud/issues/2379)) BUG FIXES: -- Fix regression in writeToFile ([#2412](https://github.com/aliyun/terraform-provider-alicloud/issues/2412)) -- fix(log_audit): resolve cannot get region ([#2411](https://github.com/aliyun/terraform-provider-alicloud/issues/2411)) -- Let WriteFile return write/delete errors ([#2408](https://github.com/aliyun/terraform-provider-alicloud/issues/2408)) -- fix adb documents bug ([#2388](https://github.com/aliyun/terraform-provider-alicloud/issues/2388)) -- fix del rds ins task ([#2387](https://github.com/aliyun/terraform-provider-alicloud/issues/2387)) +- Fix regression in writeToFile([#2412](https://github.com/aliyun/terraform-provider-alicloud/issues/2412)) +- fix(log_audit): resolve cannot get region([#2411](https://github.com/aliyun/terraform-provider-alicloud/issues/2411)) +- Let WriteFile return write/delete errors([#2408](https://github.com/aliyun/terraform-provider-alicloud/issues/2408)) +- fix adb documents bug([#2388](https://github.com/aliyun/terraform-provider-alicloud/issues/2388)) +- fix del rds ins task([#2387](https://github.com/aliyun/terraform-provider-alicloud/issues/2387)) ## 1.80.1 (April 24, 2020) IMPROVEMENTS: -- update emr tag resourceType from instance to cluste ([#2383](https://github.com/aliyun/terraform-provider-alicloud/issues/2383)) -- improve(cen_instances): support tags ([#2376](https://github.com/aliyun/terraform-provider-alicloud/issues/2376)) -- improve(sdk): upgraded the sdk and made compatibility ([#2373](https://github.com/aliyun/terraform-provider-alicloud/issues/2373)) -- Update oss_bucket.html.markdown ([#2359](https://github.com/aliyun/terraform-provider-alicloud/issues/2359)) +- update emr tag resourceType from instance to cluste([#2383](https://github.com/aliyun/terraform-provider-alicloud/issues/2383)) +- improve(cen_instances): support tags([#2376](https://github.com/aliyun/terraform-provider-alicloud/issues/2376)) +- improve(sdk): upgraded the sdk and made compatibility([#2373](https://github.com/aliyun/terraform-provider-alicloud/issues/2373)) +- Update oss_bucket.html.markdown([#2359](https://github.com/aliyun/terraform-provider-alicloud/issues/2359)) BUG FIXES: -- fix adb account & documents bug ([#2382](https://github.com/aliyun/terraform-provider-alicloud/issues/2382)) -- fix(oss): fix the bug of setting a object acl with the wrong option ([#2366](https://github.com/aliyun/terraform-provider-alicloud/issues/2366)) +- fix adb account & documents bug([#2382](https://github.com/aliyun/terraform-provider-alicloud/issues/2382)) +- fix(oss): fix the bug of setting a object acl with the wrong option([#2366](https://github.com/aliyun/terraform-provider-alicloud/issues/2366)) ## 1.80.0 (April 17, 2020) -- **New Resource:** `alicloud_dns_domain_attachmen` ([#2365](https://github.com/aliyun/terraform-provider-alicloud/issues/2365)) -- **New Resource:** `alicloud_dns_instance` ([#2361](https://github.com/aliyun/terraform-provider-alicloud/issues/2361)) -- **New Resource:** `alicloud_polardb_endpoint` ([#2321](https://github.com/aliyun/terraform-provider-alicloud/issues/2321)) -- **Data Source:** `alicloud_dns_domain_txt_guid` ([#2357](https://github.com/aliyun/terraform-provider-alicloud/issues/2357)) -- **Data Source:** `alicloud_kms_aliases` ([#2353](https://github.com/aliyun/terraform-provider-alicloud/issues/2353)) +- **New Resource:** `alicloud_dns_domain_attachmen`([#2365](https://github.com/aliyun/terraform-provider-alicloud/issues/2365)) +- **New Resource:** `alicloud_dns_instance`([#2361](https://github.com/aliyun/terraform-provider-alicloud/issues/2361)) +- **New Resource:** `alicloud_polardb_endpoint`([#2321](https://github.com/aliyun/terraform-provider-alicloud/issues/2321)) +- **Data Source:** `alicloud_dns_domain_txt_guid`([#2357](https://github.com/aliyun/terraform-provider-alicloud/issues/2357)) +- **Data Source:** `alicloud_kms_aliases`([#2353](https://github.com/aliyun/terraform-provider-alicloud/issues/2353)) IMPROVEMENTS: -- improve(cen_instance): support tags ([#2374](https://github.com/aliyun/terraform-provider-alicloud/issues/2374)) -- improve(rds_instance): remove checking zone id ([#2372](https://github.com/aliyun/terraform-provider-alicloud/issues/2372)) -- ADB support scale in/out ([#2367](https://github.com/aliyun/terraform-provider-alicloud/issues/2367)) -- improve(skd): upgraded the sdk and made compatibility ([#2363](https://github.com/aliyun/terraform-provider-alicloud/issues/2363)) -- improve(cen_flowlogs): append output_file ([#2362](https://github.com/aliyun/terraform-provider-alicloud/issues/2362)) -- remove checking instance type before creating ecs instance ang ess configuration ([#2358](https://github.com/aliyun/terraform-provider-alicloud/issues/2358)) +- improve(cen_instance): support tags([#2374](https://github.com/aliyun/terraform-provider-alicloud/issues/2374)) +- improve(rds_instance): remove checking zone id([#2372](https://github.com/aliyun/terraform-provider-alicloud/issues/2372)) +- ADB support scale in/out([#2367](https://github.com/aliyun/terraform-provider-alicloud/issues/2367)) +- improve(skd): upgraded the sdk and made compatibility([#2363](https://github.com/aliyun/terraform-provider-alicloud/issues/2363)) +- improve(cen_flowlogs): append output_file([#2362](https://github.com/aliyun/terraform-provider-alicloud/issues/2362)) +- remove checking instance type before creating ecs instance ang ess configuration([#2358](https://github.com/aliyun/terraform-provider-alicloud/issues/2358)) BUG FIXES: -- Fix alikafka topic tag crate bug ([#2370](https://github.com/aliyun/terraform-provider-alicloud/issues/2370)) -- Fix assign variable bug ([#2368](https://github.com/aliyun/terraform-provider-alicloud/issues/2368)) -- fix(oss): fix creation_date info displays incorrectly bug ([#2364](https://github.com/aliyun/terraform-provider-alicloud/issues/2364)) +- Fix alikafka topic tag crate bug([#2370](https://github.com/aliyun/terraform-provider-alicloud/issues/2370)) +- Fix assign variable bug([#2368](https://github.com/aliyun/terraform-provider-alicloud/issues/2368)) +- fix(oss): fix creation_date info displays incorrectly bug([#2364](https://github.com/aliyun/terraform-provider-alicloud/issues/2364)) ## 1.79.0 (April 10, 2020) -- **New Resource:** `alicloud_auto_provisioning_group` ([#2303](https://github.com/aliyun/terraform-provider-alicloud/issues/2303)) +- **New Resource:** `alicloud_auto_provisioning_group`([#2303](https://github.com/aliyun/terraform-provider-alicloud/issues/2303)) IMPROVEMENTS: -- optimize retryable request for alikafka ([#2350](https://github.com/aliyun/terraform-provider-alicloud/issues/2350)) -- Update data_source_alicloud_fc_triggers.go ([#2348](https://github.com/aliyun/terraform-provider-alicloud/issues/2348)) -- Add error retry in delete method ([#2346](https://github.com/aliyun/terraform-provider-alicloud/issues/2346)) -- improve(vpc): vpc and vswitch supported timeouts settings ([#2345](https://github.com/aliyun/terraform-provider-alicloud/issues/2345)) -- Update fc_function.html.markdown ([#2342](https://github.com/aliyun/terraform-provider-alicloud/issues/2342)) -- Update fc_trigger.html.markdown ([#2341](https://github.com/aliyun/terraform-provider-alicloud/issues/2341)) -- improve(polardb): modify the vsw specified ([#2261](https://github.com/aliyun/terraform-provider-alicloud/issues/2261)) -- eip associate add clientToken support ([#2247](https://github.com/aliyun/terraform-provider-alicloud/issues/2247)) +- optimize retryable request for alikafka([#2350](https://github.com/aliyun/terraform-provider-alicloud/issues/2350)) +- Update data_source_alicloud_fc_triggers.go([#2348](https://github.com/aliyun/terraform-provider-alicloud/issues/2348)) +- Add error retry in delete method([#2346](https://github.com/aliyun/terraform-provider-alicloud/issues/2346)) +- improve(vpc): vpc and vswitch supported timeouts settings([#2345](https://github.com/aliyun/terraform-provider-alicloud/issues/2345)) +- Update fc_function.html.markdown([#2342](https://github.com/aliyun/terraform-provider-alicloud/issues/2342)) +- Update fc_trigger.html.markdown([#2341](https://github.com/aliyun/terraform-provider-alicloud/issues/2341)) +- improve(polardb): modify the vsw specified([#2261](https://github.com/aliyun/terraform-provider-alicloud/issues/2261)) +- eip associate add clientToken support([#2247](https://github.com/aliyun/terraform-provider-alicloud/issues/2247)) BUG FIXES: -- fix(polardb): fix the bug of parameters modification ([#2354](https://github.com/aliyun/terraform-provider-alicloud/issues/2354)) -- fix(ram): fix datasource ram users convince bug ([#2352](https://github.com/aliyun/terraform-provider-alicloud/issues/2352)) -- fix(rds): fix the bug of parameters modification ([#2351](https://github.com/aliyun/terraform-provider-alicloud/issues/2351)) -- fix(managed_kubernetes): resolve field version diff issue ([#2349](https://github.com/aliyun/terraform-provider-alicloud/issues/2349)) -- private_zone has the wrong description ([#2344](https://github.com/aliyun/terraform-provider-alicloud/issues/2344)) -- Fix create rds bug ([#2343](https://github.com/aliyun/terraform-provider-alicloud/issues/2343)) -- fix(db_instance): resolve deleting db instance bug ([#2317](https://github.com/aliyun/terraform-provider-alicloud/issues/2317)) -- user want api server's public ip when they set endpoint_public_access_enabled to true. the second parameter in DescribeClusterUserConfig is "privateIpAddress", so it should be endpoint_public_access_enabled's negative value ([#2290](https://github.com/aliyun/terraform-provider-alicloud/issues/2290)) +- fix(polardb): fix the bug of parameters modification([#2354](https://github.com/aliyun/terraform-provider-alicloud/issues/2354)) +- fix(ram): fix datasource ram users convince bug([#2352](https://github.com/aliyun/terraform-provider-alicloud/issues/2352)) +- fix(rds): fix the bug of parameters modification([#2351](https://github.com/aliyun/terraform-provider-alicloud/issues/2351)) +- fix(managed_kubernetes): resolve field version diff issue([#2349](https://github.com/aliyun/terraform-provider-alicloud/issues/2349)) +- private_zone has the wrong description([#2344](https://github.com/aliyun/terraform-provider-alicloud/issues/2344)) +- Fix create rds bug([#2343](https://github.com/aliyun/terraform-provider-alicloud/issues/2343)) +- fix(db_instance): resolve deleting db instance bug([#2317](https://github.com/aliyun/terraform-provider-alicloud/issues/2317)) +- user want api server's public ip when they set endpoint_public_access_enabled to true. the second parameter in DescribeClusterUserConfig is "privateIpAddress", so it should be endpoint_public_access_enabled's negative value([#2290](https://github.com/aliyun/terraform-provider-alicloud/issues/2290)) ## 1.78.0 (April 03, 2020) -- **New Resource:** `alicloud_log_alert` ([#2325](https://github.com/aliyun/terraform-provider-alicloud/issues/2325)) -- **Data Source:** `alicloud_cen_flowlogs` ([#2336](https://github.com/aliyun/terraform-provider-alicloud/issues/2336)) +- **New Resource:** `alicloud_log_alert`([#2325](https://github.com/aliyun/terraform-provider-alicloud/issues/2325)) +- **Data Source:** `alicloud_cen_flowlogs`([#2336](https://github.com/aliyun/terraform-provider-alicloud/issues/2336)) IMPROVEMENTS: -- improve(cen_flowlogs): add more parameters ([#2338](https://github.com/aliyun/terraform-provider-alicloud/issues/2338)) -- improve(mongodb): supported ssl setting ([#2335](https://github.com/aliyun/terraform-provider-alicloud/issues/2335)) -- Add statistics attribute support ErrorCodeMaximum for cms ([#2328](https://github.com/aliyun/terraform-provider-alicloud/issues/2328)) -- alicloud_kms_secret: mark secret_data as sensitive ([#2322](https://github.com/aliyun/terraform-provider-alicloud/issues/2322)) +- improve(cen_flowlogs): add more parameters([#2338](https://github.com/aliyun/terraform-provider-alicloud/issues/2338)) +- improve(mongodb): supported ssl setting([#2335](https://github.com/aliyun/terraform-provider-alicloud/issues/2335)) +- Add statistics attribute support ErrorCodeMaximum for cms([#2328](https://github.com/aliyun/terraform-provider-alicloud/issues/2328)) +- alicloud_kms_secret: mark secret_data as sensitive([#2322](https://github.com/aliyun/terraform-provider-alicloud/issues/2322)) BUG FIXES: -- fix create rds instance bug ([#2334](https://github.com/aliyun/terraform-provider-alicloud/issues/2334)) -- fix(nas_rule): resolve pagesize bug ([#2330](https://github.com/aliyun/terraform-provider-alicloud/issues/2330)) +- fix create rds instance bug([#2334](https://github.com/aliyun/terraform-provider-alicloud/issues/2334)) +- fix(nas_rule): resolve pagesize bug([#2330](https://github.com/aliyun/terraform-provider-alicloud/issues/2330)) ## 1.77.0 (April 01, 2020) -- **New Resource:** `alicloud_kms_alias` ([#2307](https://github.com/aliyun/terraform-provider-alicloud/issues/2307)) -- **New Resource:** `alicloud_maxcompute_project` ([#1681](https://github.com/aliyun/terraform-provider-alicloud/issues/1681)) +- **New Resource:** `alicloud_kms_alias`([#2307](https://github.com/aliyun/terraform-provider-alicloud/issues/2307)) +- **New Resource:** `alicloud_maxcompute_project`([#1681](https://github.com/aliyun/terraform-provider-alicloud/issues/1681)) IMPROVEMENTS: -- improve(kms_secret): improve tags ([#2313](https://github.com/aliyun/terraform-provider-alicloud/issues/2313)) +- improve(kms_secret): improve tags([#2313](https://github.com/aliyun/terraform-provider-alicloud/issues/2313)) BUG FIXES: -- fix(ram_user): resolve importing ram user notfound bug ([#2319](https://github.com/aliyun/terraform-provider-alicloud/issues/2319)) -- fix adb ci bug ([#2312](https://github.com/aliyun/terraform-provider-alicloud/issues/2312)) -- fix(db_instance): resolve postgres testcase ([#2311](https://github.com/aliyun/terraform-provider-alicloud/issues/2311)) +- fix(ram_user): resolve importing ram user notfound bug([#2319](https://github.com/aliyun/terraform-provider-alicloud/issues/2319)) +- fix adb ci bug([#2312](https://github.com/aliyun/terraform-provider-alicloud/issues/2312)) +- fix(db_instance): resolve postgres testcase([#2311](https://github.com/aliyun/terraform-provider-alicloud/issues/2311)) ## 1.76.0 (March 27, 2020) -- **New Resource:** `alicloud_kms_secret` ([#2310](https://github.com/aliyun/terraform-provider-alicloud/issues/2310)) +- **New Resource:** `alicloud_kms_secret`([#2310](https://github.com/aliyun/terraform-provider-alicloud/issues/2310)) IMPROVEMENTS: -- change default autoscaler tag and refactor docs of managed kubernetes ([#2309](https://github.com/aliyun/terraform-provider-alicloud/issues/2309)) -- improve(sdk): update provider sdk and make it compatible ([#2306](https://github.com/aliyun/terraform-provider-alicloud/issues/2306)) -- add security group id and TDE for mongodb sharding ([#2298](https://github.com/aliyun/terraform-provider-alicloud/issues/2298)) -- improve cen_instance and cen_flowlog ([#2297](https://github.com/aliyun/terraform-provider-alicloud/issues/2297)) -- added support for isp_cities in site_monito ([#2296](https://github.com/aliyun/terraform-provider-alicloud/issues/2296)) -- add security group id for kvstore ([#2292](https://github.com/aliyun/terraform-provider-alicloud/issues/2292))(https://github.com/aliyun/terraform-provider-alicloud/pull/2292)) -- support parameter DesiredCapacity ([#2277](https://github.com/aliyun/terraform-provider-alicloud/issues/2277)) +- change default autoscaler tag and refactor docs of managed kubernetes([#2309](https://github.com/aliyun/terraform-provider-alicloud/issues/2309)) +- improve(sdk): update provider sdk and make it compatible([#2306](https://github.com/aliyun/terraform-provider-alicloud/issues/2306)) +- add security group id and TDE for mongodb sharding([#2298](https://github.com/aliyun/terraform-provider-alicloud/issues/2298)) +- improve cen_instance and cen_flowlog([#2297](https://github.com/aliyun/terraform-provider-alicloud/issues/2297)) +- added support for isp_cities in site_monito([#2296](https://github.com/aliyun/terraform-provider-alicloud/issues/2296)) +- add security group id for kvstore([#2292](https://github.com/aliyun/terraform-provider-alicloud/issues/2292))(https://github.com/aliyun/terraform-provider-alicloud/pull/2292)) +- support parameter DesiredCapacity([#2277](https://github.com/aliyun/terraform-provider-alicloud/issues/2277)) BUG FIXES: --fix(cen):modify resource_alicloud_cen_instance_grant ([#2293](https://github.com/aliyun/terraform-provider-alicloud/issues/2293)) +-fix(cen):modify resource_alicloud_cen_instance_grant([#2293](https://github.com/aliyun/terraform-provider-alicloud/issues/2293)) ## 1.75.0 (March 20, 2020) -- **Data Source:** `alicloud_adb_zones` ([#2248](https://github.com/aliyun/terraform-provider-alicloud/issues/2248)) -- **Data Source:** `alicloud_slb_zones` ([#2244](https://github.com/aliyun/terraform-provider-alicloud/issues/2244)) -- **Data Source:** `alicloud_elasticsearch_zones` ([#2243](https://github.com/aliyun/terraform-provider-alicloud/issues/2243)) +- **Data Source:** `alicloud_adb_zones`([#2248](https://github.com/aliyun/terraform-provider-alicloud/issues/2248)) +- **Data Source:** `alicloud_slb_zones`([#2244](https://github.com/aliyun/terraform-provider-alicloud/issues/2244)) +- **Data Source:** `alicloud_elasticsearch_zones`([#2243](https://github.com/aliyun/terraform-provider-alicloud/issues/2243)) IMPROVEMENTS: -- improve(db_instance): support force_restart ([#2287](https://github.com/aliyun/terraform-provider-alicloud/issues/2287)) -- improve the zones markdown ([#2285](https://github.com/aliyun/terraform-provider-alicloud/issues/2285)) -- Add Terway and other kubernetes params to resource ([#2284](https://github.com/aliyun/terraform-provider-alicloud/issues/2284)) +- improve(db_instance): support force_restart([#2287](https://github.com/aliyun/terraform-provider-alicloud/issues/2287)) +- improve the zones markdown([#2285](https://github.com/aliyun/terraform-provider-alicloud/issues/2285)) +- Add Terway and other kubernetes params to resource([#2284](https://github.com/aliyun/terraform-provider-alicloud/issues/2284)) BUG FIXES: -- fix ADB data source zones ([#2283](https://github.com/aliyun/terraform-provider-alicloud/issues/2283)) -- fix polardb data source zones ([#2274](https://github.com/aliyun/terraform-provider-alicloud/issues/2274)) -- fix adb ci bug ([#2272](https://github.com/aliyun/terraform-provider-alicloud/issues/2272)) -- fix(cen):modify resource_alicloud_cen_instance_attachment ([#2269](https://github.com/aliyun/terraform-provider-alicloud/issues/2269)) +- fix ADB data source zones([#2283](https://github.com/aliyun/terraform-provider-alicloud/issues/2283)) +- fix polardb data source zones([#2274](https://github.com/aliyun/terraform-provider-alicloud/issues/2274)) +- fix adb ci bug([#2272](https://github.com/aliyun/terraform-provider-alicloud/issues/2272)) +- fix(cen):modify resource_alicloud_cen_instance_attachment([#2269](https://github.com/aliyun/terraform-provider-alicloud/issues/2269)) ## 1.74.1 (March 17, 2020) IMPROVEMENTS: -- improve(alikafka_instance): suspend kafka prepaid test ([#2264](https://github.com/aliyun/terraform-provider-alicloud/issues/2264)) -- improve(gpdb): modify the vsw specified ([#2260](https://github.com/aliyun/terraform-provider-alicloud/issues/2260)) -- improve(elasticsearch): modify the vsw specified ([#2239](https://github.com/aliyun/terraform-provider-alicloud/issues/2239)) +- improve(alikafka_instance): suspend kafka prepaid test([#2264](https://github.com/aliyun/terraform-provider-alicloud/issues/2264)) +- improve(gpdb): modify the vsw specified([#2260](https://github.com/aliyun/terraform-provider-alicloud/issues/2260)) +- improve(elasticsearch): modify the vsw specified([#2239](https://github.com/aliyun/terraform-provider-alicloud/issues/2239)) BUG FIXES: -- tagResource bug fix ([#2266](https://github.com/aliyun/terraform-provider-alicloud/issues/2266)) -- fix(kvstore_instance): resolve auto_renew incorrect value ([#2265](https://github.com/aliyun/terraform-provider-alicloud/issues/2265)) +- tagResource bug fix([#2266](https://github.com/aliyun/terraform-provider-alicloud/issues/2266)) +- fix(kvstore_instance): resolve auto_renew incorrect value([#2265](https://github.com/aliyun/terraform-provider-alicloud/issues/2265)) ## 1.74.0 (March 16, 2020) -- **Data Source:** `alicloud_fc_zones` ([#2256](https://github.com/aliyun/terraform-provider-alicloud/issues/2256)) -- **Data Source:** `alicloud_polardb_zones` ([#2250](https://github.com/aliyun/terraform-provider-alicloud/issues/2250)) +- **Data Source:** `alicloud_fc_zones`([#2256](https://github.com/aliyun/terraform-provider-alicloud/issues/2256)) +- **Data Source:** `alicloud_polardb_zones`([#2250](https://github.com/aliyun/terraform-provider-alicloud/issues/2250)) IMPROVEMENTS: -- improve(hbase): modify the vsw specified ([#2259](https://github.com/aliyun/terraform-provider-alicloud/issues/2259)) -- improve(elasticsearch): data_source support tags ([#2257](https://github.com/aliyun/terraform-provider-alicloud/issues/2257)) -- rename polardb test name ([#2255](https://github.com/aliyun/terraform-provider-alicloud/issues/2255)) -- corrct cen_flowlog docs ([#2254](https://github.com/aliyun/terraform-provider-alicloud/issues/2254)) -- Adjust the return error mode ([#2252](https://github.com/aliyun/terraform-provider-alicloud/issues/2252)) -- improve(elasticsearch): resource support tags ([#2251](https://github.com/aliyun/terraform-provider-alicloud/issues/2251)) +- improve(hbase): modify the vsw specified([#2259](https://github.com/aliyun/terraform-provider-alicloud/issues/2259)) +- improve(elasticsearch): data_source support tags([#2257](https://github.com/aliyun/terraform-provider-alicloud/issues/2257)) +- rename polardb test name([#2255](https://github.com/aliyun/terraform-provider-alicloud/issues/2255)) +- corrct cen_flowlog docs([#2254](https://github.com/aliyun/terraform-provider-alicloud/issues/2254)) +- Adjust the return error mode([#2252](https://github.com/aliyun/terraform-provider-alicloud/issues/2252)) +- improve(elasticsearch): resource support tags([#2251](https://github.com/aliyun/terraform-provider-alicloud/issues/2251)) BUG FIXES: -- fix(cms_alarm): resolve the effective_interval default value ([#2253](https://github.com/aliyun/terraform-provider-alicloud/issues/2253)) +- fix(cms_alarm): resolve the effective_interval default value([#2253](https://github.com/aliyun/terraform-provider-alicloud/issues/2253)) ## 1.73.0 (March 13, 2020) -- **New Resource:** `alicloud_cen_flowlog` ([#2229](https://github.com/aliyun/terraform-provider-alicloud/issues/2229)) -- **Data Source:** `alicloud_gpdb_zones` ([#2241](https://github.com/aliyun/terraform-provider-alicloud/issues/2241)) -- **Data Source:** `alicloud_hbase_zones` ([#2240](https://github.com/aliyun/terraform-provider-alicloud/issues/2240)) -- **Data Source:** `alicloud_mongodb_zones` ([#2238](https://github.com/aliyun/terraform-provider-alicloud/issues/2238)) -- **Data Source:** `alicloud_kvstore_zones` ([#2236](https://github.com/aliyun/terraform-provider-alicloud/issues/2236)) -- **Data Source:** `alicloud_db_zones` ([#2235](https://github.com/aliyun/terraform-provider-alicloud/issues/2235)) +- **New Resource:** `alicloud_cen_flowlog`([#2229](https://github.com/aliyun/terraform-provider-alicloud/issues/2229)) +- **Data Source:** `alicloud_gpdb_zones`([#2241](https://github.com/aliyun/terraform-provider-alicloud/issues/2241)) +- **Data Source:** `alicloud_hbase_zones`([#2240](https://github.com/aliyun/terraform-provider-alicloud/issues/2240)) +- **Data Source:** `alicloud_mongodb_zones`([#2238](https://github.com/aliyun/terraform-provider-alicloud/issues/2238)) +- **Data Source:** `alicloud_kvstore_zones`([#2236](https://github.com/aliyun/terraform-provider-alicloud/issues/2236)) +- **Data Source:** `alicloud_db_zones`([#2235](https://github.com/aliyun/terraform-provider-alicloud/issues/2235)) IMPROVEMENTS: -- improve(ecs): supported auto snapshop policy ([#2245](https://github.com/aliyun/terraform-provider-alicloud/issues/2245)) -- add flowlog docs in the alicloud.erb ([#2237](https://github.com/aliyun/terraform-provider-alicloud/issues/2237)) -- fix(elasticsearch): update the sdk ([#2234](https://github.com/aliyun/terraform-provider-alicloud/issues/2234)) -- add new version aliyungo ([#2232](https://github.com/aliyun/terraform-provider-alicloud/issues/2232)) +- improve(ecs): supported auto snapshop policy([#2245](https://github.com/aliyun/terraform-provider-alicloud/issues/2245)) +- add flowlog docs in the alicloud.erb([#2237](https://github.com/aliyun/terraform-provider-alicloud/issues/2237)) +- fix(elasticsearch): update the sdk([#2234](https://github.com/aliyun/terraform-provider-alicloud/issues/2234)) +- add new version aliyungo([#2232](https://github.com/aliyun/terraform-provider-alicloud/issues/2232)) - terraform format examples [2231] -- Hbase tags ([#2228](https://github.com/aliyun/terraform-provider-alicloud/issues/2228)) +- Hbase tags([#2228](https://github.com/aliyun/terraform-provider-alicloud/issues/2228)) - mongodb support TDE [GH2207] BUG FIXES: -- fix(cms_alarm): resolve the effective_interval format bug ([#2242](https://github.com/aliyun/terraform-provider-alicloud/issues/2242)) -- fix SQLServer testcase ([#2233](https://github.com/aliyun/terraform-provider-alicloud/issues/2233)) -- fix(es): fix ci bug ([#2230](https://github.com/aliyun/terraform-provider-alicloud/issues/2230)) +- fix(cms_alarm): resolve the effective_interval format bug([#2242](https://github.com/aliyun/terraform-provider-alicloud/issues/2242)) +- fix SQLServer testcase([#2233](https://github.com/aliyun/terraform-provider-alicloud/issues/2233)) +- fix(es): fix ci bug([#2230](https://github.com/aliyun/terraform-provider-alicloud/issues/2230)) ## 1.72.0 (March 06, 2020) -- **New Resource:** `alicloud_cms_site_monitor` ([#2191](https://github.com/aliyun/terraform-provider-alicloud/issues/2191)) -- **Data Source:** `alicloud_ess_alarms` ([#2215](https://github.com/aliyun/terraform-provider-alicloud/issues/2215)) -- **Data Source:** `alicloud_ess_notifications` ([#2161](https://github.com/aliyun/terraform-provider-alicloud/issues/2161)) -- **Data Source:** `alicloud_ess_scheduled_tasks` ([#2160](https://github.com/aliyun/terraform-provider-alicloud/issues/2160)) +- **New Resource:** `alicloud_cms_site_monitor`([#2191](https://github.com/aliyun/terraform-provider-alicloud/issues/2191)) +- **Data Source:** `alicloud_ess_alarms`([#2215](https://github.com/aliyun/terraform-provider-alicloud/issues/2215)) +- **Data Source:** `alicloud_ess_notifications`([#2161](https://github.com/aliyun/terraform-provider-alicloud/issues/2161)) +- **Data Source:** `alicloud_ess_scheduled_tasks`([#2160](https://github.com/aliyun/terraform-provider-alicloud/issues/2160)) IMPROVEMENTS: -- improve(mns_topic_subscription): remove the validate ([#2225](https://github.com/aliyun/terraform-provider-alicloud/issues/2225)) -- Support the parameter of 'protocol' ([#2214](https://github.com/aliyun/terraform-provider-alicloud/issues/2214)) -- improve sweeper test ([#2212](https://github.com/aliyun/terraform-provider-alicloud/issues/2212)) -- supported bootstrap action when create a new emr cluster instance ([#2210](https://github.com/aliyun/terraform-provider-alicloud/issues/2210)) +- improve(mns_topic_subscription): remove the validate([#2225](https://github.com/aliyun/terraform-provider-alicloud/issues/2225)) +- Support the parameter of 'protocol'([#2214](https://github.com/aliyun/terraform-provider-alicloud/issues/2214)) +- improve sweeper test([#2212](https://github.com/aliyun/terraform-provider-alicloud/issues/2212)) +- supported bootstrap action when create a new emr cluster instance([#2210](https://github.com/aliyun/terraform-provider-alicloud/issues/2210)) BUG FIXES: -- fix sweep test bug ([#2223](https://github.com/aliyun/terraform-provider-alicloud/issues/2223)) -- fix the bug of RAM user cannot be destroyed ([#2219](https://github.com/aliyun/terraform-provider-alicloud/issues/2219)) -- fix(elasticsearch_instance): resolve the ci bug ([#2216](https://github.com/aliyun/terraform-provider-alicloud/issues/2216)) -- fix(slb): fix slb listener fields and rules creation bug ([#2209](https://github.com/aliyun/terraform-provider-alicloud/issues/2209)) +- fix sweep test bug([#2223](https://github.com/aliyun/terraform-provider-alicloud/issues/2223)) +- fix the bug of RAM user cannot be destroyed([#2219](https://github.com/aliyun/terraform-provider-alicloud/issues/2219)) +- fix(elasticsearch_instance): resolve the ci bug([#2216](https://github.com/aliyun/terraform-provider-alicloud/issues/2216)) +- fix(slb): fix slb listener fields and rules creation bug([#2209](https://github.com/aliyun/terraform-provider-alicloud/issues/2209)) ## 1.71.2 (February 28, 2020) IMPROVEMENTS: -- improve alikafka sweeper test ([#2206](https://github.com/aliyun/terraform-provider-alicloud/issues/2206)) -- added filter parameter instance type about data source emr_instance_t… ([#2205](https://github.com/aliyun/terraform-provider-alicloud/issues/2205)) -- improve(polardb): fix update polardb cluster db_node_class will delete instance ([#2203](https://github.com/aliyun/terraform-provider-alicloud/issues/2203)) -- improve(cen): add more sweeper test for cen and update go sdk ([#2201](https://github.com/aliyun/terraform-provider-alicloud/issues/2201)) -- improve(mns_topic_subscription): supports json ([#2200](https://github.com/aliyun/terraform-provider-alicloud/issues/2200)) -- update go sdk to 1.61.1 ([#2197](https://github.com/aliyun/terraform-provider-alicloud/issues/2197)) -- improve(snat): add snat_entry_name for this resource ([#2196](https://github.com/aliyun/terraform-provider-alicloud/issues/2196)) -- add sweeper for polardb and hbase ([#2195](https://github.com/aliyun/terraform-provider-alicloud/issues/2195)) -- improve(nat_gateways): add output vpc_id ([#2194](https://github.com/aliyun/terraform-provider-alicloud/issues/2194)) -- add retry for throttling when setting tags ([#2193](https://github.com/aliyun/terraform-provider-alicloud/issues/2193)) -- improve(client): remove useless goSdkMutex ([#2192](https://github.com/aliyun/terraform-provider-alicloud/issues/2192)) +- improve alikafka sweeper test([#2206](https://github.com/aliyun/terraform-provider-alicloud/issues/2206)) +- added filter parameter instance type about data source emr_instance_t… ([#2205](https://github.com/aliyun/terraform-provider-alicloud/issues/2205)) +- improve(polardb): fix update polardb cluster db_node_class will delete instance([#2203](https://github.com/aliyun/terraform-provider-alicloud/issues/2203)) +- improve(cen): add more sweeper test for cen and update go sdk([#2201](https://github.com/aliyun/terraform-provider-alicloud/issues/2201)) +- improve(mns_topic_subscription): supports json([#2200](https://github.com/aliyun/terraform-provider-alicloud/issues/2200)) +- update go sdk to 1.61.1([#2197](https://github.com/aliyun/terraform-provider-alicloud/issues/2197)) +- improve(snat): add snat_entry_name for this resource([#2196](https://github.com/aliyun/terraform-provider-alicloud/issues/2196)) +- add sweeper for polardb and hbase([#2195](https://github.com/aliyun/terraform-provider-alicloud/issues/2195)) +- improve(nat_gateways): add output vpc_id([#2194](https://github.com/aliyun/terraform-provider-alicloud/issues/2194)) +- add retry for throttling when setting tags([#2193](https://github.com/aliyun/terraform-provider-alicloud/issues/2193)) +- improve(client): remove useless goSdkMutex([#2192](https://github.com/aliyun/terraform-provider-alicloud/issues/2192)) BUG FIXES: -- fix(cms_alarm): resolve the creating rule dunplicated ([#2211](https://github.com/aliyun/terraform-provider-alicloud/issues/2211)) -- fix(ess): fix create ess scaling group error ([#2208](https://github.com/aliyun/terraform-provider-alicloud/issues/2208)) -- fix(ess): fix the bug of creating ess scaling group ([#2204](https://github.com/aliyun/terraform-provider-alicloud/issues/2204)) -fix(common_bandwidth): resolve BandwidthPackageOperation.conflict ([#2199](https://github.com/aliyun/terraform-provider-alicloud/issues/2199)) +- fix(cms_alarm): resolve the creating rule dunplicated([#2211](https://github.com/aliyun/terraform-provider-alicloud/issues/2211)) +- fix(ess): fix create ess scaling group error([#2208](https://github.com/aliyun/terraform-provider-alicloud/issues/2208)) +- fix(ess): fix the bug of creating ess scaling group([#2204](https://github.com/aliyun/terraform-provider-alicloud/issues/2204)) +fix(common_bandwidth): resolve BandwidthPackageOperation.conflict([#2199](https://github.com/aliyun/terraform-provider-alicloud/issues/2199)) ## 1.71.1 (February 21, 2020) IMPROVEMENTS: -- update SnatEntry test case ([#2187](https://github.com/aliyun/terraform-provider-alicloud/issues/2187)) -- improve(vpcs): support outputting tags ([#2184](https://github.com/aliyun/terraform-provider-alicloud/issues/2184)) -- improve(instance): remove sdk mutex and improve instance creating speed ([#2181](https://github.com/aliyun/terraform-provider-alicloud/issues/2181)) -- (improve market_products): supports more filter parameter ([#2177](https://github.com/aliyun/terraform-provider-alicloud/issues/2177)) -- add heyuan region and datasource market supports available_region ([#2176](https://github.com/aliyun/terraform-provider-alicloud/issues/2176)) -- improve(ecs_instance): add tags into runInstances request ([#2175](https://github.com/aliyun/terraform-provider-alicloud/issues/2175)) -- improve(ecs_instance): improve security groups ([#2174](https://github.com/aliyun/terraform-provider-alicloud/issues/2174)) -- improve(fc_function): remove useless code ([#2173](https://github.com/aliyun/terraform-provider-alicloud/issues/2173)) -- add support for create snat entry with source_dir ([#2170](https://github.com/aliyun/terraform-provider-alicloud/issues/2170)) +- update SnatEntry test case([#2187](https://github.com/aliyun/terraform-provider-alicloud/issues/2187)) +- improve(vpcs): support outputting tags([#2184](https://github.com/aliyun/terraform-provider-alicloud/issues/2184)) +- improve(instance): remove sdk mutex and improve instance creating speed([#2181](https://github.com/aliyun/terraform-provider-alicloud/issues/2181)) +- (improve market_products): supports more filter parameter([#2177](https://github.com/aliyun/terraform-provider-alicloud/issues/2177)) +- add heyuan region and datasource market supports available_region([#2176](https://github.com/aliyun/terraform-provider-alicloud/issues/2176)) +- improve(ecs_instance): add tags into runInstances request([#2175](https://github.com/aliyun/terraform-provider-alicloud/issues/2175)) +- improve(ecs_instance): improve security groups([#2174](https://github.com/aliyun/terraform-provider-alicloud/issues/2174)) +- improve(fc_function): remove useless code([#2173](https://github.com/aliyun/terraform-provider-alicloud/issues/2173)) +- add support for create snat entry with source_dir([#2170](https://github.com/aliyun/terraform-provider-alicloud/issues/2170)) BUG FIXES: -- fix(instance): resolve LastTokenProcessing error when modifying nework spec ([#2186](https://github.com/aliyun/terraform-provider-alicloud/issues/2186)) -- fix(instance): resolve modifying network spec LastOrderProcessing error ([#2185](https://github.com/aliyun/terraform-provider-alicloud/issues/2185)) -- fix(instance): resolve volume_tags diff bug when new resource ([#2182](https://github.com/aliyun/terraform-provider-alicloud/issues/2182)) -- fix(image): fix the bug of created image by disk ([#2180](https://github.com/aliyun/terraform-provider-alicloud/issues/2180)) -- Fix creating instance with multiple security groups ([#2168](https://github.com/aliyun/terraform-provider-alicloud/issues/2168)) +- fix(instance): resolve LastTokenProcessing error when modifying nework spec([#2186](https://github.com/aliyun/terraform-provider-alicloud/issues/2186)) +- fix(instance): resolve modifying network spec LastOrderProcessing error([#2185](https://github.com/aliyun/terraform-provider-alicloud/issues/2185)) +- fix(instance): resolve volume_tags diff bug when new resource([#2182](https://github.com/aliyun/terraform-provider-alicloud/issues/2182)) +- fix(image): fix the bug of created image by disk([#2180](https://github.com/aliyun/terraform-provider-alicloud/issues/2180)) +- Fix creating instance with multiple security groups([#2168](https://github.com/aliyun/terraform-provider-alicloud/issues/2168)) ## 1.71.0 (February 14, 2020) -- **New Resource:** `alicloud_adb_account` ([#2169](https://github.com/aliyun/terraform-provider-alicloud/issues/2169)) -- **New Resource:** `alicloud_adb_backup_policy` ([#2169](https://github.com/aliyun/terraform-provider-alicloud/issues/2169)) -- **Data Source:** `alicloud_adb_clusters` ([#2153](https://github.com/aliyun/terraform-provider-alicloud/issues/2153)) +- **New Resource:** `alicloud_adb_account`([#2169](https://github.com/aliyun/terraform-provider-alicloud/issues/2169)) +- **New Resource:** `alicloud_adb_backup_policy`([#2169](https://github.com/aliyun/terraform-provider-alicloud/issues/2169)) +- **Data Source:** `alicloud_adb_clusters`([#2153](https://github.com/aliyun/terraform-provider-alicloud/issues/2153)) IMPROVEMENTS: -- add market product image id ([#2171](https://github.com/aliyun/terraform-provider-alicloud/issues/2171)) -- fixed regional sts endpoint ([#2167](https://github.com/aliyun/terraform-provider-alicloud/issues/2167)) -- improve(cms): add computed for effective_interval ([#2163](https://github.com/aliyun/terraform-provider-alicloud/issues/2163)) +- add market product image id([#2171](https://github.com/aliyun/terraform-provider-alicloud/issues/2171)) +- fixed regional sts endpoint([#2167](https://github.com/aliyun/terraform-provider-alicloud/issues/2167)) +- improve(cms): add computed for effective_interval([#2163](https://github.com/aliyun/terraform-provider-alicloud/issues/2163)) BUG FIXES: -- fix(ram_login_profile): resolve not found when deleting and deprecate alicloud_slb_attachment ([#2164](https://github.com/aliyun/terraform-provider-alicloud/issues/2164)) -- fix(db_account_privilege): resolve privilege timeout bug on PosrgreSql ([#2159](https://github.com/aliyun/terraform-provider-alicloud/issues/2159)) +- fix(ram_login_profile): resolve not found when deleting and deprecate alicloud_slb_attachment([#2164](https://github.com/aliyun/terraform-provider-alicloud/issues/2164)) +- fix(db_account_privilege): resolve privilege timeout bug on PosrgreSql([#2159](https://github.com/aliyun/terraform-provider-alicloud/issues/2159)) ## 1.70.3 (February 06, 2020) IMPROVEMENTS: -- improve(db_instances): add more parameters ([#2158](https://github.com/aliyun/terraform-provider-alicloud/issues/2158)) -- improve(kvstore_account): correct test case ([#2154](https://github.com/aliyun/terraform-provider-alicloud/issues/2154)) +- improve(db_instances): add more parameters([#2158](https://github.com/aliyun/terraform-provider-alicloud/issues/2158)) +- improve(kvstore_account): correct test case([#2154](https://github.com/aliyun/terraform-provider-alicloud/issues/2154)) BUG FIXES: -- Update go SDK to fix redis bug ([#2149](https://github.com/aliyun/terraform-provider-alicloud/issues/2149)) +- Update go SDK to fix redis bug([#2149](https://github.com/aliyun/terraform-provider-alicloud/issues/2149)) ## 1.70.2 (January 31, 2020) IMPROVEMENTS: -- improve(slb): improve set slb tags ([#2147](https://github.com/aliyun/terraform-provider-alicloud/issues/2147)) -- improve(ram_login_profile): resolve EntityNotExist.User ([#2146](https://github.com/aliyun/terraform-provider-alicloud/issues/2146)) -- improve client endpoint ([#2144](https://github.com/aliyun/terraform-provider-alicloud/issues/2144)) -- improve(client): add a method when load endpoint from local file ([#2141](https://github.com/aliyun/terraform-provider-alicloud/issues/2141)) -- improve(error): remove useless error codes ([#2140](https://github.com/aliyun/terraform-provider-alicloud/issues/2140)) -- improve(provider): change IsExceptedError to IsExpectedErrors ([#2139](https://github.com/aliyun/terraform-provider-alicloud/issues/2139)) -- improve(instance): remove the useless method ([#2138](https://github.com/aliyun/terraform-provider-alicloud/issues/2138)) +- improve(slb): improve set slb tags([#2147](https://github.com/aliyun/terraform-provider-alicloud/issues/2147)) +- improve(ram_login_profile): resolve EntityNotExist.User([#2146](https://github.com/aliyun/terraform-provider-alicloud/issues/2146)) +- improve client endpoint([#2144](https://github.com/aliyun/terraform-provider-alicloud/issues/2144)) +- improve(client): add a method when load endpoint from local file ([#2141](https://github.com/aliyun/terraform-provider-alicloud/issues/2141)) +- improve(error): remove useless error codes([#2140](https://github.com/aliyun/terraform-provider-alicloud/issues/2140)) +- improve(provider): change IsExceptedError to IsExpectedErrors([#2139](https://github.com/aliyun/terraform-provider-alicloud/issues/2139)) +- improve(instance): remove the useless method([#2138](https://github.com/aliyun/terraform-provider-alicloud/issues/2138)) BUG FIXES: -- fix(ram): resolve ram resources not found error ([#2143](https://github.com/aliyun/terraform-provider-alicloud/issues/2143)) -- fix(slb): resolve listTags throttling ([#2142](https://github.com/aliyun/terraform-provider-alicloud/issues/2142)) -- fix(instance): resolve the untag bug ([#2137](https://github.com/aliyun/terraform-provider-alicloud/issues/2137)) -- fix vpn bug ([#2065](https://github.com/aliyun/terraform-provider-alicloud/issues/2065)) +- fix(ram): resolve ram resources not found error([#2143](https://github.com/aliyun/terraform-provider-alicloud/issues/2143)) +- fix(slb): resolve listTags throttling([#2142](https://github.com/aliyun/terraform-provider-alicloud/issues/2142)) +- fix(instance): resolve the untag bug([#2137](https://github.com/aliyun/terraform-provider-alicloud/issues/2137)) +- fix vpn bug([#2065](https://github.com/aliyun/terraform-provider-alicloud/issues/2065)) ## 1.70.1 (January 23, 2020) IMPROVEMENTS: -- added data source emr main versions parameter filter: cluster_type ([#2130](https://github.com/aliyun/terraform-provider-alicloud/issues/2130)) -- Features/upgrade cluster ([#2129](https://github.com/aliyun/terraform-provider-alicloud/issues/2129)) -- improve(mongodb_sharding): removing the limitation of node_storage ([#2128](https://github.com/aliyun/terraform-provider-alicloud/issues/2128)) -- improve(hbase): add precheck for the test cases ([#2127](https://github.com/aliyun/terraform-provider-alicloud/issues/2127)) -- Support update alikafka topic partition num and remark ([#2096](https://github.com/aliyun/terraform-provider-alicloud/issues/2096)) +- added data source emr main versions parameter filter: cluster_type([#2130](https://github.com/aliyun/terraform-provider-alicloud/issues/2130)) +- Features/upgrade cluster([#2129](https://github.com/aliyun/terraform-provider-alicloud/issues/2129)) +- improve(mongodb_sharding): removing the limitation of node_storage([#2128](https://github.com/aliyun/terraform-provider-alicloud/issues/2128)) +- improve(hbase): add precheck for the test cases([#2127](https://github.com/aliyun/terraform-provider-alicloud/issues/2127)) +- Support update alikafka topic partition num and remark([#2096](https://github.com/aliyun/terraform-provider-alicloud/issues/2096)) BUG FIXES: -- fix the bug of create emr gateway failed and optimized status delay time ([#2124](https://github.com/aliyun/terraform-provider-alicloud/issues/2124)) +- fix the bug of create emr gateway failed and optimized status delay time([#2124](https://github.com/aliyun/terraform-provider-alicloud/issues/2124)) ## 1.70.0 (January 17, 2020) -- **Data Source:** `alicloud_polardb_accounts` ([#2091](https://github.com/aliyun/terraform-provider-alicloud/issues/2091)) -- **Data Source:** `alicloud_polardb_databases` ([#2091](https://github.com/aliyun/terraform-provider-alicloud/issues/2091)) +- **Data Source:** `alicloud_polardb_accounts`([#2091](https://github.com/aliyun/terraform-provider-alicloud/issues/2091)) +- **Data Source:** `alicloud_polardb_databases`([#2091](https://github.com/aliyun/terraform-provider-alicloud/issues/2091)) IMPROVEMENTS: -- improve(slb_listener): add document for health_check_method ([#2121](https://github.com/aliyun/terraform-provider-alicloud/issues/2121)) -- modify:cen_instance_grant.html.markdown("alicloud_cen_instance_grant.foo") ([#2120](https://github.com/aliyun/terraform-provider-alicloud/issues/2120)) -- improve drds and rds sweeper test ([#2119](https://github.com/aliyun/terraform-provider-alicloud/issues/2119)) -- improve(kvstore_instance_classes): add validateFunc for engine ([#2117](https://github.com/aliyun/terraform-provider-alicloud/issues/2117)) -- improve(instance): close partial ([#2115](https://github.com/aliyun/terraform-provider-alicloud/issues/2115)) -- improve(instance): supports setting auto_release_time#2095 ([#2105](https://github.com/aliyun/terraform-provider-alicloud/issues/2105)) -- improve(slb) update slb_listener add health_check_method ([#2102](https://github.com/aliyun/terraform-provider-alicloud/issues/2102)) -- improve(elasticsearch): resource support to renew a PrePaid instance ([#2099](https://github.com/aliyun/terraform-provider-alicloud/issues/2099)) -- improve(rds): feature rds support sql audit records ([#2082](https://github.com/aliyun/terraform-provider-alicloud/issues/2082)) +- improve(slb_listener): add document for health_check_method([#2121](https://github.com/aliyun/terraform-provider-alicloud/issues/2121)) +- modify:cen_instance_grant.html.markdown("alicloud_cen_instance_grant.foo")([#2120](https://github.com/aliyun/terraform-provider-alicloud/issues/2120)) +- improve drds and rds sweeper test([#2119](https://github.com/aliyun/terraform-provider-alicloud/issues/2119)) +- improve(kvstore_instance_classes): add validateFunc for engine([#2117](https://github.com/aliyun/terraform-provider-alicloud/issues/2117)) +- improve(instance): close partial([#2115](https://github.com/aliyun/terraform-provider-alicloud/issues/2115)) +- improve(instance): supports setting auto_release_time#2095([#2105](https://github.com/aliyun/terraform-provider-alicloud/issues/2105)) +- improve(slb) update slb_listener add health_check_method([#2102](https://github.com/aliyun/terraform-provider-alicloud/issues/2102)) +- improve(elasticsearch): resource support to renew a PrePaid instance([#2099](https://github.com/aliyun/terraform-provider-alicloud/issues/2099)) +- improve(rds): feature rds support sql audit records([#2082](https://github.com/aliyun/terraform-provider-alicloud/issues/2082)) BUG FIXES: -- fix(drds_instance): resolve parsing response error ([#2118](https://github.com/aliyun/terraform-provider-alicloud/issues/2118)) -- fix:cen_instance.html.markdown(modify docs of name & description) ([#2116](https://github.com/aliyun/terraform-provider-alicloud/issues/2116)) -- fix(rds): fix rds modify sql collector policy bug ([#2110](https://github.com/aliyun/terraform-provider-alicloud/issues/2110)) -- fix(rds): fix rds modify db instance spec bug ([#2108](https://github.com/aliyun/terraform-provider-alicloud/issues/2108)) -- fix(drds_instance): resolve parsing failed when creating ([#2106](https://github.com/aliyun/terraform-provider-alicloud/issues/2106)) -- fix(snat_entry): resolve the error OperationUnsupported.EipNatBWPCheck ([#2104](https://github.com/aliyun/terraform-provider-alicloud/issues/2104)) -- fix(pvtz_zone): correct the docs error ([#2097](https://github.com/aliyun/terraform-provider-alicloud/issues/2097)) +- fix(drds_instance): resolve parsing response error([#2118](https://github.com/aliyun/terraform-provider-alicloud/issues/2118)) +- fix:cen_instance.html.markdown(modify docs of name & description)([#2116](https://github.com/aliyun/terraform-provider-alicloud/issues/2116)) +- fix(rds): fix rds modify sql collector policy bug([#2110](https://github.com/aliyun/terraform-provider-alicloud/issues/2110)) +- fix(rds): fix rds modify db instance spec bug([#2108](https://github.com/aliyun/terraform-provider-alicloud/issues/2108)) +- fix(drds_instance): resolve parsing failed when creating([#2106](https://github.com/aliyun/terraform-provider-alicloud/issues/2106)) +- fix(snat_entry): resolve the error OperationUnsupported.EipNatBWPCheck([#2104](https://github.com/aliyun/terraform-provider-alicloud/issues/2104)) +- fix(pvtz_zone): correct the docs error([#2097](https://github.com/aliyun/terraform-provider-alicloud/issues/2097)) ## 1.69.1 (January 13, 2020) IMPROVEMENTS: -- improve(market): supported new field 'search_term' ([#2090](https://github.com/aliyun/terraform-provider-alicloud/issues/2090)) +- improve(market): supported new field 'search_term'([#2090](https://github.com/aliyun/terraform-provider-alicloud/issues/2090)) BUG FIXES: -- fix(instance_types): resolve a bug results from the filed spelling error ([#2093](https://github.com/aliyun/terraform-provider-alicloud/issues/2093)) +- fix(instance_types): resolve a bug results from the filed spelling error([#2093](https://github.com/aliyun/terraform-provider-alicloud/issues/2093)) ## 1.69.0 (January 13, 2020) -- **New Resource:** `alicloud_market_order` ([#2084](https://github.com/aliyun/terraform-provider-alicloud/issues/2084)) -- **New Resource:** `alicloud_image_import` ([#2051](https://github.com/aliyun/terraform-provider-alicloud/issues/2051)) -- **Data Source:** `alicloud_market_product` ([#2070](https://github.com/aliyun/terraform-provider-alicloud/issues/2070)) +- **New Resource:** `alicloud_market_order`([#2084](https://github.com/aliyun/terraform-provider-alicloud/issues/2084)) +- **New Resource:** `alicloud_image_import`([#2051](https://github.com/aliyun/terraform-provider-alicloud/issues/2051)) +- **Data Source:** `alicloud_market_product`([#2070](https://github.com/aliyun/terraform-provider-alicloud/issues/2070)) IMPROVEMENTS: -- improve(api_gateway_group): add outputs sub_domain and vpc_domain ([#2088](https://github.com/aliyun/terraform-provider-alicloud/issues/2088)) -- improve(hbase): expose the hbase docs ([#2087](https://github.com/aliyun/terraform-provider-alicloud/issues/2087)) -- improve(pvtz): supports proxy_pattern, user_client_ip and lang ([#2086](https://github.com/aliyun/terraform-provider-alicloud/issues/2086)) -- improve(test): support force sleep while running testcase ([#2081](https://github.com/aliyun/terraform-provider-alicloud/issues/2081)) -- improve(emr): improve sweeper test for emr ([#2078](https://github.com/aliyun/terraform-provider-alicloud/issues/2078)) -- improve(slb): update slb_server_certificate ([#2077](https://github.com/aliyun/terraform-provider-alicloud/issues/2077)) -- improve(elasticsearch): resource elasticsearch_instance support update for instance_charge_type ([#2073](https://github.com/aliyun/terraform-provider-alicloud/issues/2073)) -- improve(instance_types): support gpu amount and gpu spec ([#2069](https://github.com/aliyun/terraform-provider-alicloud/issues/2069)) -- modify(market): modify the attributes of market products datasource ([#2068](https://github.com/aliyun/terraform-provider-alicloud/issues/2068)) -- improve(listener): supports description ([#2067](https://github.com/aliyun/terraform-provider-alicloud/issues/2067)) -- improve(testcase): change test image name_regex ([#2066](https://github.com/aliyun/terraform-provider-alicloud/issues/2066)) -- improve(instances): improve its efficiency when fetching its disk mappings ([#2062](https://github.com/aliyun/terraform-provider-alicloud/issues/2062)) -- improve(image): correct docs ([#2061](https://github.com/aliyun/terraform-provider-alicloud/issues/2061)) -- improve(instances): supports ram_role_name ([#2060](https://github.com/aliyun/terraform-provider-alicloud/issues/2060)) -- improve(db_instance): support security_group_ids ([#2056](https://github.com/aliyun/terraform-provider-alicloud/issues/2056)) -- improve(api): added app_code in attribute apps ([#2055](https://github.com/aliyun/terraform-provider-alicloud/issues/2055)) -- improve(rds): feature rds backup policy improve the functions ([#2042](https://github.com/aliyun/terraform-provider-alicloud/issues/2042)) +- improve(api_gateway_group): add outputs sub_domain and vpc_domain([#2088](https://github.com/aliyun/terraform-provider-alicloud/issues/2088)) +- improve(hbase): expose the hbase docs([#2087](https://github.com/aliyun/terraform-provider-alicloud/issues/2087)) +- improve(pvtz): supports proxy_pattern, user_client_ip and lang([#2086](https://github.com/aliyun/terraform-provider-alicloud/issues/2086)) +- improve(test): support force sleep while running testcase([#2081](https://github.com/aliyun/terraform-provider-alicloud/issues/2081)) +- improve(emr): improve sweeper test for emr([#2078](https://github.com/aliyun/terraform-provider-alicloud/issues/2078)) +- improve(slb): update slb_server_certificate([#2077](https://github.com/aliyun/terraform-provider-alicloud/issues/2077)) +- improve(elasticsearch): resource elasticsearch_instance support update for instance_charge_type([#2073](https://github.com/aliyun/terraform-provider-alicloud/issues/2073)) +- improve(instance_types): support gpu amount and gpu spec([#2069](https://github.com/aliyun/terraform-provider-alicloud/issues/2069)) +- modify(market): modify the attributes of market products datasource([#2068](https://github.com/aliyun/terraform-provider-alicloud/issues/2068)) +- improve(listener): supports description([#2067](https://github.com/aliyun/terraform-provider-alicloud/issues/2067)) +- improve(testcase): change test image name_regex([#2066](https://github.com/aliyun/terraform-provider-alicloud/issues/2066)) +- improve(instances): improve its efficiency when fetching its disk mappings([#2062](https://github.com/aliyun/terraform-provider-alicloud/issues/2062)) +- improve(image): correct docs([#2061](https://github.com/aliyun/terraform-provider-alicloud/issues/2061)) +- improve(instances): supports ram_role_name([#2060](https://github.com/aliyun/terraform-provider-alicloud/issues/2060)) +- improve(db_instance): support security_group_ids([#2056](https://github.com/aliyun/terraform-provider-alicloud/issues/2056)) +- improve(api): added app_code in attribute apps([#2055](https://github.com/aliyun/terraform-provider-alicloud/issues/2055)) +- improve(rds): feature rds backup policy improve the functions([#2042](https://github.com/aliyun/terraform-provider-alicloud/issues/2042)) BUG FIXES: -- fix(ram_roles): getRole not found error ([#2089](https://github.com/aliyun/terraform-provider-alicloud/issues/2089)) -- fix(polardb): fix polardb add parameters bug ([#2083](https://github.com/aliyun/terraform-provider-alicloud/issues/2083)) -- fix(ecs): fix the bug of ecs instance not supported ([#2063](https://github.com/aliyun/terraform-provider-alicloud/issues/2063)) -- fix(image): fix image disk mapping size bug ([#2052](https://github.com/aliyun/terraform-provider-alicloud/issues/2052)) +- fix(ram_roles): getRole not found error([#2089](https://github.com/aliyun/terraform-provider-alicloud/issues/2089)) +- fix(polardb): fix polardb add parameters bug([#2083](https://github.com/aliyun/terraform-provider-alicloud/issues/2083)) +- fix(ecs): fix the bug of ecs instance not supported([#2063](https://github.com/aliyun/terraform-provider-alicloud/issues/2063)) +- fix(image): fix image disk mapping size bug([#2052](https://github.com/aliyun/terraform-provider-alicloud/issues/2052)) ## 1.68.0 (January 06, 2020) -- **New Resource:** `alicloud_export_image` ([#2036](https://github.com/aliyun/terraform-provider-alicloud/issues/2036)) -- **New Resource:** `alicloud_image_share_permission` ([#2026](https://github.com/aliyun/terraform-provider-alicloud/issues/2026)) -- **New Resource:** `alicloud_polardb_endpoint_address` ([#2020](https://github.com/aliyun/terraform-provider-alicloud/issues/2020)) -- **Data Source:** `alicloud_polardb_endpoints` ([#2020](https://github.com/aliyun/terraform-provider-alicloud/issues/2020)) +- **New Resource:** `alicloud_export_image`([#2036](https://github.com/aliyun/terraform-provider-alicloud/issues/2036)) +- **New Resource:** `alicloud_image_share_permission`([#2026](https://github.com/aliyun/terraform-provider-alicloud/issues/2026)) +- **New Resource:** `alicloud_polardb_endpoint_address`([#2020](https://github.com/aliyun/terraform-provider-alicloud/issues/2020)) +- **Data Source:** `alicloud_polardb_endpoints`([#2020](https://github.com/aliyun/terraform-provider-alicloud/issues/2020)) IMPROVEMENTS: -- improve(db_readonly_instance): supports tags ([#2050](https://github.com/aliyun/terraform-provider-alicloud/issues/2050)) -- improve(db_instance): support setting db_instance_storage_type ([#2048](https://github.com/aliyun/terraform-provider-alicloud/issues/2048)) -- switch r-kvstore sdk to r_kvstor ([#2047](https://github.com/aliyun/terraform-provider-alicloud/issues/2047)) -- ess-rules/groups/configrution three markdown files different with codes ([#2046](https://github.com/aliyun/terraform-provider-alicloud/issues/2046)) +- improve(db_readonly_instance): supports tags([#2050](https://github.com/aliyun/terraform-provider-alicloud/issues/2050)) +- improve(db_instance): support setting db_instance_storage_type([#2048](https://github.com/aliyun/terraform-provider-alicloud/issues/2048)) +- switch r-kvstore sdk to r_kvstor([#2047](https://github.com/aliyun/terraform-provider-alicloud/issues/2047)) +- ess-rules/groups/configrution three markdown files different with codes([#2046](https://github.com/aliyun/terraform-provider-alicloud/issues/2046)) - improve(polardb): feature polardb support tags #2045 -- improve(slb): update slb_server_certificate ([#2044](https://github.com/aliyun/terraform-provider-alicloud/issues/2044)) -- Modify naming issues in alicloud_image_copy ([#2040](https://github.com/aliyun/terraform-provider-alicloud/issues/2040)) -- rollback hbase resource and datasource because of them need to be improved ([#2034](https://github.com/aliyun/terraform-provider-alicloud/issues/2034)) -- improve(sasl): Implement update method for sasl user ([#2027](https://github.com/aliyun/terraform-provider-alicloud/issues/2027)) +- improve(slb): update slb_server_certificate([#2044](https://github.com/aliyun/terraform-provider-alicloud/issues/2044)) +- Modify naming issues in alicloud_image_copy([#2040](https://github.com/aliyun/terraform-provider-alicloud/issues/2040)) +- rollback hbase resource and datasource because of them need to be improved([#2034](https://github.com/aliyun/terraform-provider-alicloud/issues/2034)) +- improve(sasl): Implement update method for sasl user([#2027](https://github.com/aliyun/terraform-provider-alicloud/issues/2027)) BUG FIXES: -- fix(security_group): fix enterprise sg does not support inner access policy from issue #1961 @yongzhang ([#2049](https://github.com/aliyun/terraform-provider-alicloud/issues/2049)) +- fix(security_group): fix enterprise sg does not support inner access policy from issue #1961 @yongzhang([#2049](https://github.com/aliyun/terraform-provider-alicloud/issues/2049)) ## 1.67.0 (December 27, 2019) -- **New Resource:** `alicloud_hbase_instance` ([#2012](https://github.com/aliyun/terraform-provider-alicloud/issues/2012)) -- **New Resource:** `alicloud_polardb_account_privilege` ([#2005](https://github.com/aliyun/terraform-provider-alicloud/issues/2005)) -- **New Resource:** `alicloud_polardb_account` ([#1998](https://github.com/aliyun/terraform-provider-alicloud/issues/1998)) -- **Data Source:** `alicloud_hbase_instances` ([#2012](https://github.com/aliyun/terraform-provider-alicloud/issues/2012)) +- **New Resource:** `alicloud_hbase_instance`([#2012](https://github.com/aliyun/terraform-provider-alicloud/issues/2012)) +- **New Resource:** `alicloud_polardb_account_privilege`([#2005](https://github.com/aliyun/terraform-provider-alicloud/issues/2005)) +- **New Resource:** `alicloud_polardb_account`([#1998](https://github.com/aliyun/terraform-provider-alicloud/issues/1998)) +- **Data Source:** `alicloud_hbase_instances`([#2012](https://github.com/aliyun/terraform-provider-alicloud/issues/2012)) IMPROVEMENTS: -- rollback hbase resource and datasource because of them need to be improved ([#2033](https://github.com/aliyun/terraform-provider-alicloud/issues/2033)) -- improve(ci): add hbase ci ([#2031](https://github.com/aliyun/terraform-provider-alicloud/issues/2031)) -- improve(mongodb): hidden some security ips ([#2025](https://github.com/aliyun/terraform-provider-alicloud/issues/2025)) -- improve(cdn_config): remove the args private_oss_tbl ([#2024](https://github.com/aliyun/terraform-provider-alicloud/issues/2024)) -- improve(ons): update sdk and remove PreventCache in ons ([#2014](https://github.com/aliyun/terraform-provider-alicloud/issues/2014)) -- add resource group id ([#2010](https://github.com/aliyun/terraform-provider-alicloud/issues/2010)) -- improve(kvstore): remove type 'Super' for kvstore ([#2009](https://github.com/aliyun/terraform-provider-alicloud/issues/2009)) -- improve(emr): support emr cluster tag ([#2008](https://github.com/aliyun/terraform-provider-alicloud/issues/2008)) -- feat(alicloud/yundun_bastionhost): Add support for Cloud Bastionhost ([#2006](https://github.com/aliyun/terraform-provider-alicloud/issues/2006)) +- rollback hbase resource and datasource because of them need to be improved([#2033](https://github.com/aliyun/terraform-provider-alicloud/issues/2033)) +- improve(ci): add hbase ci([#2031](https://github.com/aliyun/terraform-provider-alicloud/issues/2031)) +- improve(mongodb): hidden some security ips([#2025](https://github.com/aliyun/terraform-provider-alicloud/issues/2025)) +- improve(cdn_config): remove the args private_oss_tbl([#2024](https://github.com/aliyun/terraform-provider-alicloud/issues/2024)) +- improve(ons): update sdk and remove PreventCache in ons([#2014](https://github.com/aliyun/terraform-provider-alicloud/issues/2014)) +- add resource group id([#2010](https://github.com/aliyun/terraform-provider-alicloud/issues/2010)) +- improve(kvstore): remove type 'Super' for kvstore([#2009](https://github.com/aliyun/terraform-provider-alicloud/issues/2009)) +- improve(emr): support emr cluster tag([#2008](https://github.com/aliyun/terraform-provider-alicloud/issues/2008)) +- feat(alicloud/yundun_bastionhost): Add support for Cloud Bastionhost([#2006](https://github.com/aliyun/terraform-provider-alicloud/issues/2006)) BUG FIXES: -- fix(rds): fix policy sqlserver test bug ([#2030](https://github.com/aliyun/terraform-provider-alicloud/issues/2030)) -- fix(rds): fix rds resource alicloud_db_backup_policy`s log_backup bug ([#2017](https://github.com/aliyun/terraform-provider-alicloud/issues/2017)) -- fix(db_backup_policy): fix postgresql backup policy bug ([#2003](https://github.com/aliyun/terraform-provider-alicloud/issues/2003)) +- fix(rds): fix policy sqlserver test bug([#2030](https://github.com/aliyun/terraform-provider-alicloud/issues/2030)) +- fix(rds): fix rds resource alicloud_db_backup_policy`s log_backup bug([#2017](https://github.com/aliyun/terraform-provider-alicloud/issues/2017)) +- fix(db_backup_policy): fix postgresql backup policy bug([#2003](https://github.com/aliyun/terraform-provider-alicloud/issues/2003)) ## 1.66.0 (December 20, 2019) -- **New Resource:** `alicloud_kvstore_account` ([#1993](https://github.com/aliyun/terraform-provider-alicloud/issues/1993)) -- **New Resource:** `alicloud_copy_image` ([#1978](https://github.com/aliyun/terraform-provider-alicloud/issues/1978)) -- **New Resource:** `alicloud_polardb_database` ([#1996](https://github.com/aliyun/terraform-provider-alicloud/issues/1996)) -- **New Resource:** `alicloud_polardb_backup_policy` ([#1991](https://github.com/aliyun/terraform-provider-alicloud/issues/1991)) -- **New Resource:** `alicloud_poloardb_cluster` ([#1978](https://github.com/aliyun/terraform-provider-alicloud/issues/1978)) +- **New Resource:** `alicloud_kvstore_account`([#1993](https://github.com/aliyun/terraform-provider-alicloud/issues/1993)) +- **New Resource:** `alicloud_copy_image`([#1978](https://github.com/aliyun/terraform-provider-alicloud/issues/1978)) +- **New Resource:** `alicloud_polardb_database`([#1996](https://github.com/aliyun/terraform-provider-alicloud/issues/1996)) +- **New Resource:** `alicloud_polardb_backup_policy`([#1991](https://github.com/aliyun/terraform-provider-alicloud/issues/1991)) +- **New Resource:** `alicloud_poloardb_cluster`([#1978](https://github.com/aliyun/terraform-provider-alicloud/issues/1978)) - **New Resource:** `alicloud_alikafka_sasl_acl` ([#2000](https://github.com/aliyun/terraform-provider-alicloud/issues/2000) - **New Resource:** `alicloud_alikafka_sasl_user` ([#2000](https://github.com/aliyun/terraform-provider-alicloud/issues/2000) -- **Data Source:** `alicloud_poloardb_clusters` ([#1978](https://github.com/aliyun/terraform-provider-alicloud/issues/1978)) +- **Data Source:** `alicloud_poloardb_clusters`([#1978](https://github.com/aliyun/terraform-provider-alicloud/issues/1978)) - **Data Source:** `alicloud_alikafka_sasl_acls` ([#2000](https://github.com/aliyun/terraform-provider-alicloud/issues/2000)) - **Data Source:** `alicloud_alikafka_sasl_users`([#2000](https://github.com/aliyun/terraform-provider-alicloud/issues/2000)) IMPROVEMENTS: -- improve(SLS): Support SLS logstore index json keys ([#1999](https://github.com/aliyun/terraform-provider-alicloud/issues/1999)) -- improve(acl): add missing tags for acl, keypair and son ([#1997](https://github.com/aliyun/terraform-provider-alicloud/issues/1997)) -- improve(market): product datasource supported name regex and ids filter ([#1992](https://github.com/aliyun/terraform-provider-alicloud/issues/1992)) -- improve(instance): improve auto_renew_period setting ([#1990](https://github.com/aliyun/terraform-provider-alicloud/issues/1990)) -- documenting the replica_set_name attribute in mongodb @chanind ([#1989](https://github.com/aliyun/terraform-provider-alicloud/issues/1989)) -- improve(period): improve computing period method ([#1988](https://github.com/aliyun/terraform-provider-alicloud/issues/1988)) -- improve(prepaid): support computing period by week ([#1985](https://github.com/aliyun/terraform-provider-alicloud/issues/1985)) -- improve(prepaid): add a method to fix period importer diff ([#1984](https://github.com/aliyun/terraform-provider-alicloud/issues/1984)) -- improve(mongoDB): supported field 'tags' ([#1980](https://github.com/aliyun/terraform-provider-alicloud/issues/1980)) -- add output to ssl vpn client cert @ionTea ([#1979](https://github.com/aliyun/terraform-provider-alicloud/issues/1979)) +- improve(SLS): Support SLS logstore index json keys([#1999](https://github.com/aliyun/terraform-provider-alicloud/issues/1999)) +- improve(acl): add missing tags for acl, keypair and son([#1997](https://github.com/aliyun/terraform-provider-alicloud/issues/1997)) +- improve(market): product datasource supported name regex and ids filter([#1992](https://github.com/aliyun/terraform-provider-alicloud/issues/1992)) +- improve(instance): improve auto_renew_period setting([#1990](https://github.com/aliyun/terraform-provider-alicloud/issues/1990)) +- documenting the replica_set_name attribute in mongodb @chanind([#1989](https://github.com/aliyun/terraform-provider-alicloud/issues/1989)) +- improve(period): improve computing period method([#1988](https://github.com/aliyun/terraform-provider-alicloud/issues/1988)) +- improve(prepaid): support computing period by week([#1985](https://github.com/aliyun/terraform-provider-alicloud/issues/1985)) +- improve(prepaid): add a method to fix period importer diff([#1984](https://github.com/aliyun/terraform-provider-alicloud/issues/1984)) +- improve(mongoDB): supported field 'tags'([#1980](https://github.com/aliyun/terraform-provider-alicloud/issues/1980)) +- add output to ssl vpn client cert @ionTea([#1979](https://github.com/aliyun/terraform-provider-alicloud/issues/1979)) BUG FIXES: -- fix(db_backup_policy): fix postgresql backup policy bug ([#2002](https://github.com/aliyun/terraform-provider-alicloud/issues/2002)) -- fix(fc): fixed bug from issue #1961 @yokzy88 ([#1987](https://github.com/aliyun/terraform-provider-alicloud/issues/1987)) -- fix(vpn): fix bug from issue #1965 @chanind ([#1981](https://github.com/aliyun/terraform-provider-alicloud/issues/1981)) -- fix(vpn): added Computed to field `vswitch_id` @chanind ([#1977](https://github.com/aliyun/terraform-provider-alicloud/issues/1977)) +- fix(db_backup_policy): fix postgresql backup policy bug([#2002](https://github.com/aliyun/terraform-provider-alicloud/issues/2002)) +- fix(fc): fixed bug from issue #1961 @yokzy88([#1987](https://github.com/aliyun/terraform-provider-alicloud/issues/1987)) +- fix(vpn): fix bug from issue #1965 @chanind([#1981](https://github.com/aliyun/terraform-provider-alicloud/issues/1981)) +- fix(vpn): added Computed to field `vswitch_id` @chanind([#1977](https://github.com/aliyun/terraform-provider-alicloud/issues/1977)) ## 1.65.0 (December 13, 2019) -- **New Resource:** `alicloud_reserved_instance` ([#1967](https://github.com/aliyun/terraform-provider-alicloud/issues/1967)) -- **New Resource:** `alicloud_cs_kubernetes_autoscaler` ([#1956](https://github.com/aliyun/terraform-provider-alicloud/issues/1956)) -- **New Data Source:** `alicloud_caller_identity` ([#1944](https://github.com/aliyun/terraform-provider-alicloud/issues/1944)) -- **New Resource:** `alicloud_sag_client_user` ([#1807](https://github.com/aliyun/terraform-provider-alicloud/issues/1807)) +- **New Resource:** `alicloud_reserved_instance`([#1967](https://github.com/aliyun/terraform-provider-alicloud/issues/1967)) +- **New Resource:** `alicloud_cs_kubernetes_autoscaler`([#1956](https://github.com/aliyun/terraform-provider-alicloud/issues/1956)) +- **New Data Source:** `alicloud_caller_identity`([#1944](https://github.com/aliyun/terraform-provider-alicloud/issues/1944)) +- **New Resource:** `alicloud_sag_client_user`([#1807](https://github.com/aliyun/terraform-provider-alicloud/issues/1807)) IMPROVEMENTS: -- improve(ess_vserver_groups): improve docs ([#1976](https://github.com/aliyun/terraform-provider-alicloud/issues/1976)) -- improve(kvstore_instance): set period using createtime and endtime ([#1971](https://github.com/aliyun/terraform-provider-alicloud/issues/1971)) -- improve(slb_server_group): set servers to computed and avoid diff when using ess_scaling_vserver_group ([#1970](https://github.com/aliyun/terraform-provider-alicloud/issues/1970)) -- improve(k8s):add AccessKey and AccessKeySecret instead of RamRole ([#1966](https://github.com/aliyun/terraform-provider-alicloud/issues/1966)) +- improve(ess_vserver_groups): improve docs([#1976](https://github.com/aliyun/terraform-provider-alicloud/issues/1976)) +- improve(kvstore_instance): set period using createtime and endtime([#1971](https://github.com/aliyun/terraform-provider-alicloud/issues/1971)) +- improve(slb_server_group): set servers to computed and avoid diff when using ess_scaling_vserver_group([#1970](https://github.com/aliyun/terraform-provider-alicloud/issues/1970)) +- improve(k8s):add AccessKey and AccessKeySecret instead of RamRole([#1966](https://github.com/aliyun/terraform-provider-alicloud/issues/1966)) BUG FIXES: -- fix(market): remove the suggested_price check for avoid the error of testcase ([#1964](https://github.com/aliyun/terraform-provider-alicloud/issues/1964)) -- fix(provider): Resolve issues from aone. ([#1963](https://github.com/aliyun/terraform-provider-alicloud/issues/1963)) -- fix(market): remove the tags check for avoid the error of testcase ([#1962](https://github.com/aliyun/terraform-provider-alicloud/issues/1962)) +- fix(market): remove the suggested_price check for avoid the error of testcase([#1964](https://github.com/aliyun/terraform-provider-alicloud/issues/1964)) +- fix(provider): Resolve issues from aone.([#1963](https://github.com/aliyun/terraform-provider-alicloud/issues/1963)) +- fix(market): remove the tags check for avoid the error of testcase([#1962](https://github.com/aliyun/terraform-provider-alicloud/issues/1962)) - fix(alicloud/yundun_bastionhost): Bastionhost RAM policy authorization bug fix([#1960](https://github.com/aliyun/terraform-provider-alicloud/issues/1960)) -- fix(datahub): fix updating datahub topic comment bug ([#1959](https://github.com/aliyun/terraform-provider-alicloud/issues/1959)) -- fix(kms): correct test case errors ([#1958](https://github.com/aliyun/terraform-provider-alicloud/issues/1958)) -- fix(validator): update package github.com/denverdino/aliyungo/cdn ([#1946](https://github.com/aliyun/terraform-provider-alicloud/issues/1946)) +- fix(datahub): fix updating datahub topic comment bug([#1959](https://github.com/aliyun/terraform-provider-alicloud/issues/1959)) +- fix(kms): correct test case errors ([#1958](https://github.com/aliyun/terraform-provider-alicloud/issues/1958)) +- fix(validator): update package github.com/denverdino/aliyungo/cdn([#1946](https://github.com/aliyun/terraform-provider-alicloud/issues/1946)) ## 1.64.0 (December 06, 2019) -- **New Data Source:** `alicloud_market_products` ([#1941](https://github.com/aliyun/terraform-provider-alicloud/issues/1941)) -- **New Resource:** `alicloud_cloud_connect_network_attachment` ([#1933](https://github.com/aliyun/terraform-provider-alicloud/issues/1933)) -- **New Resource:** `alicloud_image` ([#1913](https://github.com/aliyun/terraform-provider-alicloud/issues/1913)) +- **New Data Source:** `alicloud_market_products`([#1941](https://github.com/aliyun/terraform-provider-alicloud/issues/1941)) +- **New Resource:** `alicloud_cloud_connect_network_attachment`([#1933](https://github.com/aliyun/terraform-provider-alicloud/issues/1933)) +- **New Resource:** `alicloud_image`([#1913](https://github.com/aliyun/terraform-provider-alicloud/issues/1913)) IMPROVEMENTS: -- improve(docs): improve module guide ([#1957](https://github.com/aliyun/terraform-provider-alicloud/issues/1957)) -- improve(db_account_privilege): supports more privileges ([#1945](https://github.com/aliyun/terraform-provider-alicloud/issues/1945)) -- improve(datasources): remove sorted_by testcase results from some internal limitation ([#1943](https://github.com/aliyun/terraform-provider-alicloud/issues/1943)) -- improve(sdk): Updated sdk to v1.60.280 and modified drds fields ([#1938](https://github.com/aliyun/terraform-provider-alicloud/issues/1938)) -- improve(snat): update example to support for snat's creation with multi eips ([#1931](https://github.com/aliyun/terraform-provider-alicloud/issues/1931)) -- improve(ess): resource alicloud_ess_scalinggroup_vserver_groups support parameter ([#1919](https://github.com/aliyun/terraform-provider-alicloud/issues/1919)) -- improve(db_instance): make 'instance_types' 'db_instance_class' 'kvstore_instance_class' support price ([#1749](https://github.com/aliyun/terraform-provider-alicloud/issues/1749)) +- improve(docs): improve module guide([#1957](https://github.com/aliyun/terraform-provider-alicloud/issues/1957)) +- improve(db_account_privilege): supports more privileges([#1945](https://github.com/aliyun/terraform-provider-alicloud/issues/1945)) +- improve(datasources): remove sorted_by testcase results from some internal limitation([#1943](https://github.com/aliyun/terraform-provider-alicloud/issues/1943)) +- improve(sdk): Updated sdk to v1.60.280 and modified drds fields([#1938](https://github.com/aliyun/terraform-provider-alicloud/issues/1938)) +- improve(snat): update example to support for snat's creation with multi eips([#1931](https://github.com/aliyun/terraform-provider-alicloud/issues/1931)) +- improve(ess): resource alicloud_ess_scalinggroup_vserver_groups support parameter([#1919](https://github.com/aliyun/terraform-provider-alicloud/issues/1919)) +- improve(db_instance): make 'instance_types' 'db_instance_class' 'kvstore_instance_class' support price([#1749](https://github.com/aliyun/terraform-provider-alicloud/issues/1749)) BUG FIXES: -- fix(alikafka): fix bug in when doing alikafka instance multi acc test ([#1947](https://github.com/aliyun/terraform-provider-alicloud/issues/1947)) -- fix(CSKubernetes): fix 3az test case ([#1942](https://github.com/aliyun/terraform-provider-alicloud/issues/1942)) -- fix(cdn_domain_new): constant timeout waiting for server cert ([#1937](https://github.com/aliyun/terraform-provider-alicloud/issues/1937)) -- fix(pvtz_zone_record): allow SRV records ([#1936](https://github.com/aliyun/terraform-provider-alicloud/issues/1936)) -- fix(Serverless Kubernetes): fix #1867 add serverless kube_config ([#1923](https://github.com/aliyun/terraform-provider-alicloud/issues/1923)) +- fix(alikafka): fix bug in when doing alikafka instance multi acc test([#1947](https://github.com/aliyun/terraform-provider-alicloud/issues/1947)) +- fix(CSKubernetes): fix 3az test case([#1942](https://github.com/aliyun/terraform-provider-alicloud/issues/1942)) +- fix(cdn_domain_new): constant timeout waiting for server cert([#1937](https://github.com/aliyun/terraform-provider-alicloud/issues/1937)) +- fix(pvtz_zone_record): allow SRV records([#1936](https://github.com/aliyun/terraform-provider-alicloud/issues/1936)) +- fix(Serverless Kubernetes): fix #1867 add serverless kube_config([#1923](https://github.com/aliyun/terraform-provider-alicloud/issues/1923)) ## 1.63.0 (December 02, 2019) -- **New Resource:** `alicloud_cloud_connect_network_grant` ([#1921](https://github.com/aliyun/terraform-provider-alicloud/issues/1921)) -- **New Data Source:** `alicloud_yundun_bastionhost_instances` ([#1894](https://github.com/aliyun/terraform-provider-alicloud/issues/1894)) -- **New Resource:** `alicloud_yundun_bastionhost_instance` ([#1894](https://github.com/aliyun/terraform-provider-alicloud/issues/1894)) -- **New Data Source:** `alicloud_kms_ciphertext` ([#1858](https://github.com/aliyun/terraform-provider-alicloud/issues/1858)) -- **New Data Source:** `alicloud_kms_plaintext` ([#1858](https://github.com/aliyun/terraform-provider-alicloud/issues/1858)) -- **New Resource:** `alicloud_kms_ciphertext` ([#1858](https://github.com/aliyun/terraform-provider-alicloud/issues/1858)) -- **New Resource:** `alicloud_sag_dnat_entry` ([#1823](https://github.com/aliyun/terraform-provider-alicloud/issues/1823)) +- **New Resource:** `alicloud_cloud_connect_network_grant`([#1921](https://github.com/aliyun/terraform-provider-alicloud/issues/1921)) +- **New Data Source:** `alicloud_yundun_bastionhost_instances`([#1894](https://github.com/aliyun/terraform-provider-alicloud/issues/1894)) +- **New Resource:** `alicloud_yundun_bastionhost_instance`([#1894](https://github.com/aliyun/terraform-provider-alicloud/issues/1894)) +- **New Data Source:** `alicloud_kms_ciphertext`([#1858](https://github.com/aliyun/terraform-provider-alicloud/issues/1858)) +- **New Data Source:** `alicloud_kms_plaintext`([#1858](https://github.com/aliyun/terraform-provider-alicloud/issues/1858)) +- **New Resource:** `alicloud_kms_ciphertext`([#1858](https://github.com/aliyun/terraform-provider-alicloud/issues/1858)) +- **New Resource:** `alicloud_sag_dnat_entry`([#1823](https://github.com/aliyun/terraform-provider-alicloud/issues/1823)) IMPROVEMENTS: -- improve(vpc): add module support for vpc, vswitch and route entry ([#1934](https://github.com/aliyun/terraform-provider-alicloud/issues/1934)) -- improve(db_instance): tags supports case sensitive ([#1930](https://github.com/aliyun/terraform-provider-alicloud/issues/1930)) -- improve(mongodb_instance): adding replica_set_name to output from alicloud_mongodb_instance ([#1929](https://github.com/aliyun/terraform-provider-alicloud/issues/1929)) -- improve(slb): add a new field delete_protection_validation ([#1927](https://github.com/aliyun/terraform-provider-alicloud/issues/1927)) -- improve(kms): improve kms testcases use new method ([#1926](https://github.com/aliyun/terraform-provider-alicloud/issues/1926)) -- improve(provider): added 'Computed : true' to all 'ids' fields. ([#1924](https://github.com/aliyun/terraform-provider-alicloud/issues/1924)) -- improve(validator): Delete TagNum Count ([#1920](https://github.com/aliyun/terraform-provider-alicloud/issues/1920)) -- improve(sag_dnat_entry): modify docs "add subcategory" ([#1918](https://github.com/aliyun/terraform-provider-alicloud/issues/1918)) -- improve(sdk): upgrade alibaba go sdk ([#1917](https://github.com/aliyun/terraform-provider-alicloud/issues/1917)) -- improve(db_database):update db_database doc ([#1916](https://github.com/aliyun/terraform-provider-alicloud/issues/1916)) -- improve(validator): shift validator to official ones ([#1912](https://github.com/aliyun/terraform-provider-alicloud/issues/1912)) -- improve(alikafka): Support pre paid instance & Support tag resource ([#1873](https://github.com/aliyun/terraform-provider-alicloud/issues/1873)) +- improve(vpc): add module support for vpc, vswitch and route entry([#1934](https://github.com/aliyun/terraform-provider-alicloud/issues/1934)) +- improve(db_instance): tags supports case sensitive([#1930](https://github.com/aliyun/terraform-provider-alicloud/issues/1930)) +- improve(mongodb_instance): adding replica_set_name to output from alicloud_mongodb_instance([#1929](https://github.com/aliyun/terraform-provider-alicloud/issues/1929)) +- improve(slb): add a new field delete_protection_validation([#1927](https://github.com/aliyun/terraform-provider-alicloud/issues/1927)) +- improve(kms): improve kms testcases use new method([#1926](https://github.com/aliyun/terraform-provider-alicloud/issues/1926)) +- improve(provider): added 'Computed : true' to all 'ids' fields.([#1924](https://github.com/aliyun/terraform-provider-alicloud/issues/1924)) +- improve(validator): Delete TagNum Count([#1920](https://github.com/aliyun/terraform-provider-alicloud/issues/1920)) +- improve(sag_dnat_entry): modify docs "add subcategory"([#1918](https://github.com/aliyun/terraform-provider-alicloud/issues/1918)) +- improve(sdk): upgrade alibaba go sdk([#1917](https://github.com/aliyun/terraform-provider-alicloud/issues/1917)) +- improve(db_database):update db_database doc([#1916](https://github.com/aliyun/terraform-provider-alicloud/issues/1916)) +- improve(validator): shift validator to official ones([#1912](https://github.com/aliyun/terraform-provider-alicloud/issues/1912)) +- improve(alikafka): Support pre paid instance & Support tag resource([#1873](https://github.com/aliyun/terraform-provider-alicloud/issues/1873)) BUG FIXES: -- fix(dns_record): fix dns_record testcase bug ([#1892](https://github.com/aliyun/terraform-provider-alicloud/issues/1892)) -- fix(ecs): FIX: query system disk does not exist because no resource_group_id is specified ([#1884](https://github.com/aliyun/terraform-provider-alicloud/issues/1884)) +- fix(dns_record): fix dns_record testcase bug([#1892](https://github.com/aliyun/terraform-provider-alicloud/issues/1892)) +- fix(ecs): FIX: query system disk does not exist because no resource_group_id is specified([#1884](https://github.com/aliyun/terraform-provider-alicloud/issues/1884)) ## 1.62.2 (November 26, 2019) IMPROVEMENTS: -- improve(mongodb): feature mongodb support postpaid to prepaid ([#1908](https://github.com/aliyun/terraform-provider-alicloud/issues/1908)) -- improve(kvstore_instance_classes): skip unsupported zones ([#1901](https://github.com/aliyun/terraform-provider-alicloud/issues/1901)) +- improve(mongodb): feature mongodb support postpaid to prepaid([#1908](https://github.com/aliyun/terraform-provider-alicloud/issues/1908)) +- improve(kvstore_instance_classes): skip unsupported zones([#1901](https://github.com/aliyun/terraform-provider-alicloud/issues/1901)) BUG FIXES: -- fix(pvtz_attachment): fix vpc_ids diff error ([#1911](https://github.com/aliyun/terraform-provider-alicloud/issues/1911)) -- fix(kafka): remove the const endpoint ([#1910](https://github.com/aliyun/terraform-provider-alicloud/issues/1910)) -- fix(ess): modify the type of from Set to List. ([#1905](https://github.com/aliyun/terraform-provider-alicloud/issues/1905)) -- fix managedkubernetes demo documentation ([#1903](https://github.com/aliyun/terraform-provider-alicloud/issues/1903)) -- fix the bug of TestAccAlicloudEmrCluster_local_storage failed ([#1902](https://github.com/aliyun/terraform-provider-alicloud/issues/1902)) -- fix(db_instance): fix postgre testcase ([#1899](https://github.com/aliyun/terraform-provider-alicloud/issues/1899)) -- fix(db_instance): test case ([#1898](https://github.com/aliyun/terraform-provider-alicloud/issues/1898)) +- fix(pvtz_attachment): fix vpc_ids diff error([#1911](https://github.com/aliyun/terraform-provider-alicloud/issues/1911)) +- fix(kafka): remove the const endpoint([#1910](https://github.com/aliyun/terraform-provider-alicloud/issues/1910)) +- fix(ess): modify the type of from Set to List.([#1905](https://github.com/aliyun/terraform-provider-alicloud/issues/1905)) +- fix managedkubernetes demo documentation([#1903](https://github.com/aliyun/terraform-provider-alicloud/issues/1903)) +- fix the bug of TestAccAlicloudEmrCluster_local_storage failed([#1902](https://github.com/aliyun/terraform-provider-alicloud/issues/1902)) +- fix(db_instance): fix postgre testcase([#1899](https://github.com/aliyun/terraform-provider-alicloud/issues/1899)) +- fix(db_instance): test case([#1898](https://github.com/aliyun/terraform-provider-alicloud/issues/1898)) ## 1.62.1 (November 22, 2019) IMPROVEMENTS: -- improve(db_instance): add new field auto_upgrade_minor_version to set minor version ([#1897](https://github.com/aliyun/terraform-provider-alicloud/issues/1897)) -- improve(docs): add AODC warning ([#1893](https://github.com/aliyun/terraform-provider-alicloud/issues/1893)) -- improve(kvstore_instance): correct its docs ([#1891](https://github.com/aliyun/terraform-provider-alicloud/issues/1891)) -- improve(pvtz_zone_attachment):make pvtz_zone_attachment support different region vpc ([#1890](https://github.com/aliyun/terraform-provider-alicloud/issues/1890)) -- improve(db, kvstore): add auto-pay when changing instance charge type ([#1889](https://github.com/aliyun/terraform-provider-alicloud/issues/1889)) -- improve(cs): Do not assume `private_zone` is returned from API ([#1885](https://github.com/aliyun/terraform-provider-alicloud/issues/1885)) -- improve(cs): modify the value of 'new_nat_gateway' to avoid errors. ([#1882](https://github.com/aliyun/terraform-provider-alicloud/issues/1882)) -- improve(docs): Terraform registry docs ([#1881](https://github.com/aliyun/terraform-provider-alicloud/issues/1881)) -- improve(rds): feature support high security access mode not submitted ([#1880](https://github.com/aliyun/terraform-provider-alicloud/issues/1880)) -- improve(oss): add transitions to life-cycle ([#1879](https://github.com/aliyun/terraform-provider-alicloud/issues/1879)) -- improve(db_instance): feature support high security access mode not submitted ([#1878](https://github.com/aliyun/terraform-provider-alicloud/issues/1878)) -- improve(scalingconfiguration): supports changing password_inherit ([#1877](https://github.com/aliyun/terraform-provider-alicloud/issues/1877)) -- improve(zones): use describeAvailableResource API to get rds available zones ([#1876](https://github.com/aliyun/terraform-provider-alicloud/issues/1876)) -- improve(kvstore_instance_classess): improve test case error caused by no stock ([#1875](https://github.com/aliyun/terraform-provider-alicloud/issues/1875)) -- improve(mns): mns support sts access ([#1871](https://github.com/aliyun/terraform-provider-alicloud/issues/1871)) -- improve(elasticsearch): Added retry to avoid CreateInstance TokenPreviousRequestProcessError error ([#1870](https://github.com/aliyun/terraform-provider-alicloud/issues/1870)) -- improve(kvstore_instance_engines): improve its code ([#1864](https://github.com/aliyun/terraform-provider-alicloud/issues/1864)) -- improve(kvstore): remove memcache filter from datasource test ([#1863](https://github.com/aliyun/terraform-provider-alicloud/issues/1863)) -- improve(oss_bucket_object):make oss_bucket_object support KMS encryption ([#1860](https://github.com/aliyun/terraform-provider-alicloud/issues/1860)) -- improve(provider): added endpoint for resources. ([#1855](https://github.com/aliyun/terraform-provider-alicloud/issues/1855)) - -BUG FIXES: - -- fix(db_backup_policy): add limitation when modify sqlservr policy ([#1896](https://github.com/aliyun/terraform-provider-alicloud/issues/1896)) -- fix(kvstore): remove the kvstore instance password limitation ([#1886](https://github.com/aliyun/terraform-provider-alicloud/issues/1886)) -- fix(mongodb_instances): fix filetering bug ([#1874](https://github.com/aliyun/terraform-provider-alicloud/issues/1874)) -- fix(mongodb_instances): fix name_regex bug ([#1865](https://github.com/aliyun/terraform-provider-alicloud/issues/1865)) -- fix(key_pair):fix key_pair testcase bug ([#1862](https://github.com/aliyun/terraform-provider-alicloud/issues/1862)) -- fix(autoscaling): fix autoscaling bugs. ([#1832](https://github.com/aliyun/terraform-provider-alicloud/issues/1832)) +- improve(db_instance): add new field auto_upgrade_minor_version to set minor version([#1897](https://github.com/aliyun/terraform-provider-alicloud/issues/1897)) +- improve(docs): add AODC warning([#1893](https://github.com/aliyun/terraform-provider-alicloud/issues/1893)) +- improve(kvstore_instance): correct its docs([#1891](https://github.com/aliyun/terraform-provider-alicloud/issues/1891)) +- improve(pvtz_zone_attachment):make pvtz_zone_attachment support different region vpc([#1890](https://github.com/aliyun/terraform-provider-alicloud/issues/1890)) +- improve(db, kvstore): add auto-pay when changing instance charge type([#1889](https://github.com/aliyun/terraform-provider-alicloud/issues/1889)) +- improve(cs): Do not assume `private_zone` is returned from API([#1885](https://github.com/aliyun/terraform-provider-alicloud/issues/1885)) +- improve(cs): modify the value of 'new_nat_gateway' to avoid errors.([#1882](https://github.com/aliyun/terraform-provider-alicloud/issues/1882)) +- improve(docs): Terraform registry docs([#1881](https://github.com/aliyun/terraform-provider-alicloud/issues/1881)) +- improve(rds): feature support high security access mode not submitted([#1880](https://github.com/aliyun/terraform-provider-alicloud/issues/1880)) +- improve(oss): add transitions to life-cycle([#1879](https://github.com/aliyun/terraform-provider-alicloud/issues/1879)) +- improve(db_instance): feature support high security access mode not submitted([#1878](https://github.com/aliyun/terraform-provider-alicloud/issues/1878)) +- improve(scalingconfiguration): supports changing password_inherit([#1877](https://github.com/aliyun/terraform-provider-alicloud/issues/1877)) +- improve(zones): use describeAvailableResource API to get rds available zones([#1876](https://github.com/aliyun/terraform-provider-alicloud/issues/1876)) +- improve(kvstore_instance_classess): improve test case error caused by no stock([#1875](https://github.com/aliyun/terraform-provider-alicloud/issues/1875)) +- improve(mns): mns support sts access([#1871](https://github.com/aliyun/terraform-provider-alicloud/issues/1871)) +- improve(elasticsearch): Added retry to avoid CreateInstance TokenPreviousRequestProcessError error([#1870](https://github.com/aliyun/terraform-provider-alicloud/issues/1870)) +- improve(kvstore_instance_engines): improve its code([#1864](https://github.com/aliyun/terraform-provider-alicloud/issues/1864)) +- improve(kvstore): remove memcache filter from datasource test([#1863](https://github.com/aliyun/terraform-provider-alicloud/issues/1863)) +- improve(oss_bucket_object):make oss_bucket_object support KMS encryption([#1860](https://github.com/aliyun/terraform-provider-alicloud/issues/1860)) +- improve(provider): added endpoint for resources.([#1855](https://github.com/aliyun/terraform-provider-alicloud/issues/1855)) + +BUG FIXES: + +- fix(db_backup_policy): add limitation when modify sqlservr policy([#1896](https://github.com/aliyun/terraform-provider-alicloud/issues/1896)) +- fix(kvstore): remove the kvstore instance password limitation([#1886](https://github.com/aliyun/terraform-provider-alicloud/issues/1886)) +- fix(mongodb_instances): fix filetering bug([#1874](https://github.com/aliyun/terraform-provider-alicloud/issues/1874)) +- fix(mongodb_instances): fix name_regex bug([#1865](https://github.com/aliyun/terraform-provider-alicloud/issues/1865)) +- fix(key_pair):fix key_pair testcase bug([#1862](https://github.com/aliyun/terraform-provider-alicloud/issues/1862)) +- fix(autoscaling): fix autoscaling bugs.([#1832](https://github.com/aliyun/terraform-provider-alicloud/issues/1832)) ## 1.62.0 (November 13, 2019) -- **New Resource:** `alicloud_yundun_dbaudit_instance` ([#1819](https://github.com/aliyun/terraform-provider-alicloud/issues/1819)) -- **New Data Source:** `alicloud_yundun_dbaudit_instances` ([#1819](https://github.com/aliyun/terraform-provider-alicloud/issues/1819)) +- **New Resource:** `alicloud_yundun_dbaudit_instance`([#1819](https://github.com/aliyun/terraform-provider-alicloud/issues/1819)) +- **New Data Source:** `alicloud_yundun_dbaudit_instances`([#1819](https://github.com/aliyun/terraform-provider-alicloud/issues/1819)) IMPROVEMENTS: -- improve(ess_scalingconfiguration): support password_inherit ([#1856](https://github.com/aliyun/terraform-provider-alicloud/issues/1856)) -- improve docs and add ci for yundun dbaudit ([#1853](https://github.com/aliyun/terraform-provider-alicloud/issues/1853)) +- improve(ess_scalingconfiguration): support password_inherit([#1856](https://github.com/aliyun/terraform-provider-alicloud/issues/1856)) +- improve docs and add ci for yundun dbaudit([#1853](https://github.com/aliyun/terraform-provider-alicloud/issues/1853)) BUG FIXES: -- fix(provider): fix the bug: slice bounds out of range ([#1854](https://github.com/aliyun/terraform-provider-alicloud/issues/1854)) +- fix(provider): fix the bug: slice bounds out of range([#1854](https://github.com/aliyun/terraform-provider-alicloud/issues/1854)) ## 1.61.0 (November 12, 2019) -- **New Resource:** `alicloud_sag_snat_entry` ([#1799](https://github.com/aliyun/terraform-provider-alicloud/issues/1799)) +- **New Resource:** `alicloud_sag_snat_entry`([#1799](https://github.com/aliyun/terraform-provider-alicloud/issues/1799)) IMPROVEMENTS: -- improve(provider): add default value for configuration_source ([#1852](https://github.com/aliyun/terraform-provider-alicloud/issues/1852)) -- improve(ess): add module guide for the ess resources ([#1850](https://github.com/aliyun/terraform-provider-alicloud/issues/1850)) -- improve(instance): postpaid instance supported 'dry_run' ([#1845](https://github.com/aliyun/terraform-provider-alicloud/issues/1845)) -- improve(rds): fix for hidden dts ip list ([#1844](https://github.com/aliyun/terraform-provider-alicloud/issues/1844)) -- improve(resource_alicloud_db_database): support Mohawk_100_BIN ([#1838](https://github.com/aliyun/terraform-provider-alicloud/issues/1838)) -- perf(alicloud_db_backup_policy,db_instances):perf rds document desc ([#1836](https://github.com/aliyun/terraform-provider-alicloud/issues/1836)) -- change sideBar ([#1830](https://github.com/aliyun/terraform-provider-alicloud/issues/1830)) -- modify CloudConnectNetwork_multi ([#1828](https://github.com/aliyun/terraform-provider-alicloud/issues/1828)) -- improve(alikafka): Added name for vpcs and vswitches ([#1827](https://github.com/aliyun/terraform-provider-alicloud/issues/1827)) -- support to create emr gateway cluster instance ([#1821](https://github.com/aliyun/terraform-provider-alicloud/issues/1821)) +- improve(provider): add default value for configuration_source([#1852](https://github.com/aliyun/terraform-provider-alicloud/issues/1852)) +- improve(ess): add module guide for the ess resources([#1850](https://github.com/aliyun/terraform-provider-alicloud/issues/1850)) +- improve(instance): postpaid instance supported 'dry_run'([#1845](https://github.com/aliyun/terraform-provider-alicloud/issues/1845)) +- improve(rds): fix for hidden dts ip list([#1844](https://github.com/aliyun/terraform-provider-alicloud/issues/1844)) +- improve(resource_alicloud_db_database): support Mohawk_100_BIN([#1838](https://github.com/aliyun/terraform-provider-alicloud/issues/1838)) +- perf(alicloud_db_backup_policy,db_instances):perf rds document desc([#1836](https://github.com/aliyun/terraform-provider-alicloud/issues/1836)) +- change sideBar([#1830](https://github.com/aliyun/terraform-provider-alicloud/issues/1830)) +- modify CloudConnectNetwork_multi([#1828](https://github.com/aliyun/terraform-provider-alicloud/issues/1828)) +- improve(alikafka): Added name for vpcs and vswitches([#1827](https://github.com/aliyun/terraform-provider-alicloud/issues/1827)) +- support to create emr gateway cluster instance([#1821](https://github.com/aliyun/terraform-provider-alicloud/issues/1821)) BUG FIXES: -- fix(cs_kubenrnetes): fix terraform docs documentation ([#1851](https://github.com/aliyun/terraform-provider-alicloud/issues/1851)) -- fix(nat_gateway):fix nat_gateway period bug ([#1841](https://github.com/aliyun/terraform-provider-alicloud/issues/1841)) -- fix waitfor method nil bug ([#1840](https://github.com/aliyun/terraform-provider-alicloud/issues/1840)) -- fix(ess): use GetOkExists to avoid some potential bugs ([#1835](https://github.com/aliyun/terraform-provider-alicloud/issues/1835)) +- fix(cs_kubenrnetes): fix terraform docs documentation([#1851](https://github.com/aliyun/terraform-provider-alicloud/issues/1851)) +- fix(nat_gateway):fix nat_gateway period bug([#1841](https://github.com/aliyun/terraform-provider-alicloud/issues/1841)) +- fix waitfor method nil bug([#1840](https://github.com/aliyun/terraform-provider-alicloud/issues/1840)) +- fix(ess): use GetOkExists to avoid some potential bugs([#1835](https://github.com/aliyun/terraform-provider-alicloud/issues/1835)) ## 1.60.0 (November 01, 2019) -- **New Data Source:** `alicloud_emr_disk_types` ([#1805](https://github.com/aliyun/terraform-provider-alicloud/issues/1805)) -- **New Data Source:** `alicloud_dns_resolution_lines` ([#1800](https://github.com/aliyun/terraform-provider-alicloud/issues/1800)) -- **New Resource:** `alicloud_sag_qos` ([#1790](https://github.com/aliyun/terraform-provider-alicloud/issues/1790)) -- **New Resource:** `alicloud_sag_qos_policy` ([#1790](https://github.com/aliyun/terraform-provider-alicloud/issues/1790)) -- **New Resource:** `alicloud_sag_qos_car` ([#1790](https://github.com/aliyun/terraform-provider-alicloud/issues/1790)) -- **New Resource:** `alicloud_sag_acl` ([#1788](https://github.com/aliyun/terraform-provider-alicloud/issues/1788)) -- **New Resource:** `alicloud_sag_acl_rule` ([#1788](https://github.com/aliyun/terraform-provider-alicloud/issues/1788)) -- **New Data Source:** `alicloud_sag_acls` ([#1788](https://github.com/aliyun/terraform-provider-alicloud/issues/1788)) -- **New Resource:** `alicloud_slb_domain_extension` ([#1756](https://github.com/aliyun/terraform-provider-alicloud/issues/1756)) -- **New Data Source:** `alicloud_slb_domain_extensions` ([#1756](https://github.com/aliyun/terraform-provider-alicloud/issues/1756)) +- **New Data Source:** `alicloud_emr_disk_types`([#1805](https://github.com/aliyun/terraform-provider-alicloud/issues/1805)) +- **New Data Source:** `alicloud_dns_resolution_lines`([#1800](https://github.com/aliyun/terraform-provider-alicloud/issues/1800)) +- **New Resource:** `alicloud_sag_qos`([#1790](https://github.com/aliyun/terraform-provider-alicloud/issues/1790)) +- **New Resource:** `alicloud_sag_qos_policy`([#1790](https://github.com/aliyun/terraform-provider-alicloud/issues/1790)) +- **New Resource:** `alicloud_sag_qos_car`([#1790](https://github.com/aliyun/terraform-provider-alicloud/issues/1790)) +- **New Resource:** `alicloud_sag_acl`([#1788](https://github.com/aliyun/terraform-provider-alicloud/issues/1788)) +- **New Resource:** `alicloud_sag_acl_rule`([#1788](https://github.com/aliyun/terraform-provider-alicloud/issues/1788)) +- **New Data Source:** `alicloud_sag_acls`([#1788](https://github.com/aliyun/terraform-provider-alicloud/issues/1788)) +- **New Resource:** `alicloud_slb_domain_extension`([#1756](https://github.com/aliyun/terraform-provider-alicloud/issues/1756)) +- **New Data Source:** `alicloud_slb_domain_extensions`([#1756](https://github.com/aliyun/terraform-provider-alicloud/issues/1756)) IMPROVEMENTS: -- alicloud_ess_scheduled_task supports Cron type ([#1824](https://github.com/aliyun/terraform-provider-alicloud/issues/1824)) -- vpc product datasource support resource_group_id ([#1822](https://github.com/aliyun/terraform-provider-alicloud/issues/1822)) -- improve(instance): modified the argument reference in doc. ([#1815](https://github.com/aliyun/terraform-provider-alicloud/issues/1815)) -- Add resource_group_id to data_source_alicloud_route_tables ([#1814](https://github.com/aliyun/terraform-provider-alicloud/issues/1814)) -- use homedir to expand shared_credentials_file value and add environment variable for it ([#1811](https://github.com/aliyun/terraform-provider-alicloud/issues/1811)) -- Add password to resource_alicloud_ess_scalingconfiguration ([#1810](https://github.com/aliyun/terraform-provider-alicloud/issues/1810)) -- add ids for db_instance_classes and remove limitation for db_database resource ([#1803](https://github.com/aliyun/terraform-provider-alicloud/issues/1803)) -- improve(db_instances):update tags type from string to map ([#1802](https://github.com/aliyun/terraform-provider-alicloud/issues/1802)) -- improve(instance): field 'user_data' supported update ([#1798](https://github.com/aliyun/terraform-provider-alicloud/issues/1798)) -- add doc of cloud_connect_network ([#1791](https://github.com/aliyun/terraform-provider-alicloud/issues/1791)) -- improve(slb): updated slb attachment testcase. ([#1758](https://github.com/aliyun/terraform-provider-alicloud/issues/1758)) +- alicloud_ess_scheduled_task supports Cron type([#1824](https://github.com/aliyun/terraform-provider-alicloud/issues/1824)) +- vpc product datasource support resource_group_id([#1822](https://github.com/aliyun/terraform-provider-alicloud/issues/1822)) +- improve(instance): modified the argument reference in doc.([#1815](https://github.com/aliyun/terraform-provider-alicloud/issues/1815)) +- Add resource_group_id to data_source_alicloud_route_tables([#1814](https://github.com/aliyun/terraform-provider-alicloud/issues/1814)) +- use homedir to expand shared_credentials_file value and add environment variable for it([#1811](https://github.com/aliyun/terraform-provider-alicloud/issues/1811)) +- Add password to resource_alicloud_ess_scalingconfiguration([#1810](https://github.com/aliyun/terraform-provider-alicloud/issues/1810)) +- add ids for db_instance_classes and remove limitation for db_database resource([#1803](https://github.com/aliyun/terraform-provider-alicloud/issues/1803)) +- improve(db_instances):update tags type from string to map([#1802](https://github.com/aliyun/terraform-provider-alicloud/issues/1802)) +- improve(instance): field 'user_data' supported update([#1798](https://github.com/aliyun/terraform-provider-alicloud/issues/1798)) +- add doc of cloud_connect_network([#1791](https://github.com/aliyun/terraform-provider-alicloud/issues/1791)) +- improve(slb): updated slb attachment testcase.([#1758](https://github.com/aliyun/terraform-provider-alicloud/issues/1758)) BUG FIXES: -- fix(tag): fix api gw, gpdb, kvstore datasource bug ([#1817](https://github.com/aliyun/terraform-provider-alicloud/issues/1817)) -- fix(rds): fix creating db account empty pointer bug ([#1812](https://github.com/aliyun/terraform-provider-alicloud/issues/1812)) +- fix(tag): fix api gw, gpdb, kvstore datasource bug([#1817](https://github.com/aliyun/terraform-provider-alicloud/issues/1817)) +- fix(rds): fix creating db account empty pointer bug([#1812](https://github.com/aliyun/terraform-provider-alicloud/issues/1812)) - fix(slb_listener): fix server_certificate_id diff bug and add sag ci([#1808](https://github.com/aliyun/terraform-provider-alicloud/issues/1808)) -- fix(vpc): fix DescribeTag bug for vpc's datasource ([#1801](https://github.com/aliyun/terraform-provider-alicloud/issues/1801)) +- fix(vpc): fix DescribeTag bug for vpc's datasource([#1801](https://github.com/aliyun/terraform-provider-alicloud/issues/1801)) ## 1.59.0 (October 25, 2019) -- **New Resource:** `alicloud_cloud_connect_network` ([#1784](https://github.com/aliyun/terraform-provider-alicloud/issues/1784)) -- **New Resource:** `alicloud_alikafka_instance` ([#1764](https://github.com/aliyun/terraform-provider-alicloud/issues/1764)) -- **New Data Source:** `alicloud_cloud_connect_networks` ([#1784](https://github.com/aliyun/terraform-provider-alicloud/issues/1784)) -- **New Data Source:** `alicloud_emr_instance_types` ([#1773](https://github.com/aliyun/terraform-provider-alicloud/issues/1773)) -- **New Data Source:** `alicloud_emr_main_versions` ([#1773](https://github.com/aliyun/terraform-provider-alicloud/issues/1773)) -- **New Data Source:** `alicloud_alikafka_instances` ([#1764](https://github.com/aliyun/terraform-provider-alicloud/issues/1764)) -- **New Data Source:** `alicloud_file_crc64_checksum` ([#1722](https://github.com/aliyun/terraform-provider-alicloud/issues/1722)) +- **New Resource:** `alicloud_cloud_connect_network`([#1784](https://github.com/aliyun/terraform-provider-alicloud/issues/1784)) +- **New Resource:** `alicloud_alikafka_instance`([#1764](https://github.com/aliyun/terraform-provider-alicloud/issues/1764)) +- **New Data Source:** `alicloud_cloud_connect_networks`([#1784](https://github.com/aliyun/terraform-provider-alicloud/issues/1784)) +- **New Data Source:** `alicloud_emr_instance_types`([#1773](https://github.com/aliyun/terraform-provider-alicloud/issues/1773)) +- **New Data Source:** `alicloud_emr_main_versions`([#1773](https://github.com/aliyun/terraform-provider-alicloud/issues/1773)) +- **New Data Source:** `alicloud_alikafka_instances`([#1764](https://github.com/aliyun/terraform-provider-alicloud/issues/1764)) +- **New Data Source:** `alicloud_file_crc64_checksum`([#1722](https://github.com/aliyun/terraform-provider-alicloud/issues/1722)) IMPROVEMENTS: -- improve(slb_listener): deprecate ssl_certificate_id and use server_certificate_id instead ([#1797](https://github.com/aliyun/terraform-provider-alicloud/issues/1797)) -- improve(slb): improve slb docs ([#1796](https://github.com/aliyun/terraform-provider-alicloud/issues/1796)) -- improve(slb_listener): add retry for StartLoadBalancerListener ([#1794](https://github.com/aliyun/terraform-provider-alicloud/issues/1794)) -- improve(fc_trigger):change testcase dependence resource cdn_domain to new ([#1793](https://github.com/aliyun/terraform-provider-alicloud/issues/1793)) -- improve(zones): using describeAvailableResource instead of DescribeZones for RKvstore ([#1789](https://github.com/aliyun/terraform-provider-alicloud/issues/1789)) -- Update ssl_vpn_server.html.markdown ([#1786](https://github.com/aliyun/terraform-provider-alicloud/issues/1786)) -- add resource_group_id to dns ([#1781](https://github.com/aliyun/terraform-provider-alicloud/issues/1781)) -- improve(provider): modified the kms field conflict to diffsuppress ([#1780](https://github.com/aliyun/terraform-provider-alicloud/issues/1780)) -- Always set PolicyDocument for RAM policy update ([#1777](https://github.com/aliyun/terraform-provider-alicloud/issues/1777)) -- rename cs_serveless_kubernetes to cs_serverless_kubernetes ([#1776](https://github.com/aliyun/terraform-provider-alicloud/issues/1776)) -- improve(slb): updated slb server_group testcase ([#1753](https://github.com/aliyun/terraform-provider-alicloud/issues/1753)) -- improve(fc_function):support code_checksum ([#1722](https://github.com/aliyun/terraform-provider-alicloud/issues/1722)) +- improve(slb_listener): deprecate ssl_certificate_id and use server_certificate_id instead([#1797](https://github.com/aliyun/terraform-provider-alicloud/issues/1797)) +- improve(slb): improve slb docs([#1796](https://github.com/aliyun/terraform-provider-alicloud/issues/1796)) +- improve(slb_listener): add retry for StartLoadBalancerListener([#1794](https://github.com/aliyun/terraform-provider-alicloud/issues/1794)) +- improve(fc_trigger):change testcase dependence resource cdn_domain to new([#1793](https://github.com/aliyun/terraform-provider-alicloud/issues/1793)) +- improve(zones): using describeAvailableResource instead of DescribeZones for RKvstore([#1789](https://github.com/aliyun/terraform-provider-alicloud/issues/1789)) +- Update ssl_vpn_server.html.markdown([#1786](https://github.com/aliyun/terraform-provider-alicloud/issues/1786)) +- add resource_group_id to dns([#1781](https://github.com/aliyun/terraform-provider-alicloud/issues/1781)) +- improve(provider): modified the kms field conflict to diffsuppress([#1780](https://github.com/aliyun/terraform-provider-alicloud/issues/1780)) +- Always set PolicyDocument for RAM policy update([#1777](https://github.com/aliyun/terraform-provider-alicloud/issues/1777)) +- rename cs_serveless_kubernetes to cs_serverless_kubernetes([#1776](https://github.com/aliyun/terraform-provider-alicloud/issues/1776)) +- improve(slb): updated slb server_group testcase([#1753](https://github.com/aliyun/terraform-provider-alicloud/issues/1753)) +- improve(fc_function):support code_checksum([#1722](https://github.com/aliyun/terraform-provider-alicloud/issues/1722)) BUG FIXES: -- fix(slb): address_type diff bug ([#1795](https://github.com/aliyun/terraform-provider-alicloud/issues/1795)) -- fix(ddosbgp): the docs error ([#1782](https://github.com/aliyun/terraform-provider-alicloud/issues/1782)) -- fix(instance):fix credit_specification bug ([#1778](https://github.com/aliyun/terraform-provider-alicloud/issues/1778)) +- fix(slb): address_type diff bug([#1795](https://github.com/aliyun/terraform-provider-alicloud/issues/1795)) +- fix(ddosbgp): the docs error([#1782](https://github.com/aliyun/terraform-provider-alicloud/issues/1782)) +- fix(instance):fix credit_specification bug([#1778](https://github.com/aliyun/terraform-provider-alicloud/issues/1778)) ## 1.58.1 (October 22, 2019) IMPROVEMENTS: -- add missing resource ddosbgp_instance docs index ([#1775](https://github.com/aliyun/terraform-provider-alicloud/issues/1775)) +- add missing resource ddosbgp_instance docs index([#1775](https://github.com/aliyun/terraform-provider-alicloud/issues/1775)) BUG FIXES: -- fix(common_bandwidth_package): fix common bandwidth package resource_group_id forcenew bug ([#1772](https://github.com/aliyun/terraform-provider-alicloud/issues/1772)) +- fix(common_bandwidth_package): fix common bandwidth package resource_group_id forcenew bug([#1772](https://github.com/aliyun/terraform-provider-alicloud/issues/1772)) ## 1.58.0 (October 18, 2019) -- **New Data Source:** `alicloud_cs_serverless_kubernetes_clusters` ([#1746](https://github.com/aliyun/terraform-provider-alicloud/issues/1746)) -- **New Resource:** `alicloud_cs_serverless_kubernetes` ([#1746](https://github.com/aliyun/terraform-provider-alicloud/issues/1746)) +- **New Data Source:** `alicloud_cs_serverless_kubernetes_clusters`([#1746](https://github.com/aliyun/terraform-provider-alicloud/issues/1746)) +- **New Resource:** `alicloud_cs_serverless_kubernetes`([#1746](https://github.com/aliyun/terraform-provider-alicloud/issues/1746)) IMPROVEMENTS: -- Make `resource_group_id` to computed ([#1771](https://github.com/aliyun/terraform-provider-alicloud/issues/1771)) -- Add tag for `resource_group_id` in the docs ([#1770](https://github.com/aliyun/terraform-provider-alicloud/issues/1770)) -- add resource_group_id to vpc, slb resources and data sources and revise corresponding docs ([#1769](https://github.com/aliyun/terraform-provider-alicloud/issues/1769)) -- improve(security_group):make security_group support resource_group_id ([#1762](https://github.com/aliyun/terraform-provider-alicloud/issues/1762)) -- Add resource_group_id to common_bandwidth_package(resource&data_source) ([#1761](https://github.com/aliyun/terraform-provider-alicloud/issues/1761)) -- improve(cen): added precheck for testcases ([#1759](https://github.com/aliyun/terraform-provider-alicloud/issues/1759)) -- improve(security_group):support security_group_type ([#1755](https://github.com/aliyun/terraform-provider-alicloud/issues/1755)) -- Add missing routing rules for alicloud_dns_record ([#1754](https://github.com/aliyun/terraform-provider-alicloud/issues/1754)) -- improve(slb): updated slb serverCertificate testcase ([#1751](https://github.com/aliyun/terraform-provider-alicloud/issues/1751)) -- improve(slb): updated slb rule testcase ([#1748](https://github.com/aliyun/terraform-provider-alicloud/issues/1748)) -- Improve(alicloud_ess_scaling_rule): support TargetTrackingScalingRule and StepScalingRule ([#1744](https://github.com/aliyun/terraform-provider-alicloud/issues/1744)) -- improve(cdn): added adddebug for tags APIs ([#1741](https://github.com/aliyun/terraform-provider-alicloud/issues/1741)) -- improve(slb): updated slb ca_certificate testcase ([#1740](https://github.com/aliyun/terraform-provider-alicloud/issues/1740)) -- improve(slb): updated slb acl testcase ([#1739](https://github.com/aliyun/terraform-provider-alicloud/issues/1739)) -- improve(slb): updated slb slb_attachment testcase ([#1738](https://github.com/aliyun/terraform-provider-alicloud/issues/1738)) -- use a new ram role instead of hardcode name about emr unit test case and example ([#1732](https://github.com/aliyun/terraform-provider-alicloud/issues/1732)) -- Revision of goReportCard.com suggestions ([#1729](https://github.com/aliyun/terraform-provider-alicloud/issues/1729)) -- improve(cs): resources supports timeouts setting ([#1679](https://github.com/aliyun/terraform-provider-alicloud/issues/1679)) +- Make `resource_group_id` to computed([#1771](https://github.com/aliyun/terraform-provider-alicloud/issues/1771)) +- Add tag for `resource_group_id` in the docs([#1770](https://github.com/aliyun/terraform-provider-alicloud/issues/1770)) +- add resource_group_id to vpc, slb resources and data sources and revise corresponding docs([#1769](https://github.com/aliyun/terraform-provider-alicloud/issues/1769)) +- improve(security_group):make security_group support resource_group_id([#1762](https://github.com/aliyun/terraform-provider-alicloud/issues/1762)) +- Add resource_group_id to common_bandwidth_package(resource&data_source)([#1761](https://github.com/aliyun/terraform-provider-alicloud/issues/1761)) +- improve(cen): added precheck for testcases([#1759](https://github.com/aliyun/terraform-provider-alicloud/issues/1759)) +- improve(security_group):support security_group_type([#1755](https://github.com/aliyun/terraform-provider-alicloud/issues/1755)) +- Add missing routing rules for alicloud_dns_record([#1754](https://github.com/aliyun/terraform-provider-alicloud/issues/1754)) +- improve(slb): updated slb serverCertificate testcase([#1751](https://github.com/aliyun/terraform-provider-alicloud/issues/1751)) +- improve(slb): updated slb rule testcase([#1748](https://github.com/aliyun/terraform-provider-alicloud/issues/1748)) +- Improve(alicloud_ess_scaling_rule): support TargetTrackingScalingRule and StepScalingRule([#1744](https://github.com/aliyun/terraform-provider-alicloud/issues/1744)) +- improve(cdn): added adddebug for tags APIs([#1741](https://github.com/aliyun/terraform-provider-alicloud/issues/1741)) +- improve(slb): updated slb ca_certificate testcase([#1740](https://github.com/aliyun/terraform-provider-alicloud/issues/1740)) +- improve(slb): updated slb acl testcase([#1739](https://github.com/aliyun/terraform-provider-alicloud/issues/1739)) +- improve(slb): updated slb slb_attachment testcase([#1738](https://github.com/aliyun/terraform-provider-alicloud/issues/1738)) +- use a new ram role instead of hardcode name about emr unit test case and example([#1732](https://github.com/aliyun/terraform-provider-alicloud/issues/1732)) +- Revision of goReportCard.com suggestions([#1729](https://github.com/aliyun/terraform-provider-alicloud/issues/1729)) +- improve(cs): resources supports timeouts setting([#1679](https://github.com/aliyun/terraform-provider-alicloud/issues/1679)) BUG FIXES: -- fix(instance):fix instance test bug ([#1768](https://github.com/aliyun/terraform-provider-alicloud/issues/1768)) -- fix slb sweep bug and add region for role test ([#1752](https://github.com/aliyun/terraform-provider-alicloud/issues/1752)) -- fix (cs) : log_config support create new project ([#1745](https://github.com/aliyun/terraform-provider-alicloud/issues/1745)) -- fix(cs): modify the new_nat_gateway field in testcase to avoid InstanceRouterEntryNotExist error ([#1733](https://github.com/aliyun/terraform-provider-alicloud/issues/1733)) -- fix(mongodb):fix password encrypt bug ([#1730](https://github.com/aliyun/terraform-provider-alicloud/issues/1730)) -- fix typo in worker_instance_types description ([#1726](https://github.com/aliyun/terraform-provider-alicloud/issues/1726)) +- fix(instance):fix instance test bug([#1768](https://github.com/aliyun/terraform-provider-alicloud/issues/1768)) +- fix slb sweep bug and add region for role test([#1752](https://github.com/aliyun/terraform-provider-alicloud/issues/1752)) +- fix (cs) : log_config support create new project([#1745](https://github.com/aliyun/terraform-provider-alicloud/issues/1745)) +- fix(cs): modify the new_nat_gateway field in testcase to avoid InstanceRouterEntryNotExist error([#1733](https://github.com/aliyun/terraform-provider-alicloud/issues/1733)) +- fix(mongodb):fix password encrypt bug([#1730](https://github.com/aliyun/terraform-provider-alicloud/issues/1730)) +- fix typo in worker_instance_types description([#1726](https://github.com/aliyun/terraform-provider-alicloud/issues/1726)) ## 1.57.1 (October 11, 2019) IMPROVEMENTS: -- improve:improve some resource support encrypt password ([#1727](https://github.com/aliyun/terraform-provider-alicloud/issues/1727)) -- improve(sdk): updated sdk to v1.60.191 ([#1725](https://github.com/aliyun/terraform-provider-alicloud/issues/1725)) -- update tablestore package ([#1719](https://github.com/aliyun/terraform-provider-alicloud/issues/1719)) -- managekubernetes support sls ([#1718](https://github.com/aliyun/terraform-provider-alicloud/issues/1718)) -- improve(instance): support encrypt password when creating or updating ecs instance ([#1711](https://github.com/aliyun/terraform-provider-alicloud/issues/1711)) -- update golang image version ([#1709](https://github.com/aliyun/terraform-provider-alicloud/issues/1709)) -- Added credit_specification to ECS instance resource ([#1705](https://github.com/aliyun/terraform-provider-alicloud/issues/1705)) -- improve(slb_rule): remove `name` forcenew and make it can be updated ([#1703](https://github.com/aliyun/terraform-provider-alicloud/issues/1703)) -- upgrade terraform package ([#1702](https://github.com/aliyun/terraform-provider-alicloud/issues/1702)) -- improve emr test case, update document ([#1698](https://github.com/aliyun/terraform-provider-alicloud/issues/1698)) -- improve emr test case ([#1697](https://github.com/aliyun/terraform-provider-alicloud/issues/1697)) -- improve(provider): update go version to 1.12 ([#1686](https://github.com/aliyun/terraform-provider-alicloud/issues/1686)) -- impove(slb_listener) slb listener support same port ([#1655](https://github.com/aliyun/terraform-provider-alicloud/issues/1655)) +- improve:improve some resource support encrypt password([#1727](https://github.com/aliyun/terraform-provider-alicloud/issues/1727)) +- improve(sdk): updated sdk to v1.60.191([#1725](https://github.com/aliyun/terraform-provider-alicloud/issues/1725)) +- update tablestore package([#1719](https://github.com/aliyun/terraform-provider-alicloud/issues/1719)) +- managekubernetes support sls([#1718](https://github.com/aliyun/terraform-provider-alicloud/issues/1718)) +- improve(instance): support encrypt password when creating or updating ecs instance([#1711](https://github.com/aliyun/terraform-provider-alicloud/issues/1711)) +- update golang image version([#1709](https://github.com/aliyun/terraform-provider-alicloud/issues/1709)) +- Added credit_specification to ECS instance resource([#1705](https://github.com/aliyun/terraform-provider-alicloud/issues/1705)) +- improve(slb_rule): remove `name` forcenew and make it can be updated([#1703](https://github.com/aliyun/terraform-provider-alicloud/issues/1703)) +- upgrade terraform package([#1702](https://github.com/aliyun/terraform-provider-alicloud/issues/1702)) +- improve emr test case, update document([#1698](https://github.com/aliyun/terraform-provider-alicloud/issues/1698)) +- improve emr test case([#1697](https://github.com/aliyun/terraform-provider-alicloud/issues/1697)) +- improve(provider): update go version to 1.12([#1686](https://github.com/aliyun/terraform-provider-alicloud/issues/1686)) +- impove(slb_listener) slb listener support same port([#1655](https://github.com/aliyun/terraform-provider-alicloud/issues/1655)) BUG FIXES: -- fix go clean error in the ci ([#1710](https://github.com/aliyun/terraform-provider-alicloud/issues/1710)) +- fix go clean error in the ci([#1710](https://github.com/aliyun/terraform-provider-alicloud/issues/1710)) ## 1.57.0 (September 27, 2019) -- **New Resource:** `alicloud_ddosbgp_instance` ([#1650](https://github.com/aliyun/terraform-provider-alicloud/issues/1650)) -- **New Data Source:** `alicloud_ddosbgp_instances` ([#1650](https://github.com/aliyun/terraform-provider-alicloud/issues/1650)) -- **New Resource:** `alicloud_emr_cluster` ([#1644](https://github.com/aliyun/terraform-provider-alicloud/issues/1644)) -- **New Resource:** `alicloud_vpn_route_entry` ([#1613](https://github.com/aliyun/terraform-provider-alicloud/issues/1613)) +- **New Resource:** `alicloud_ddosbgp_instance`([#1650](https://github.com/aliyun/terraform-provider-alicloud/issues/1650)) +- **New Data Source:** `alicloud_ddosbgp_instances`([#1650](https://github.com/aliyun/terraform-provider-alicloud/issues/1650)) +- **New Resource:** `alicloud_emr_cluster`([#1644](https://github.com/aliyun/terraform-provider-alicloud/issues/1644)) +- **New Resource:** `alicloud_vpn_route_entry`([#1613](https://github.com/aliyun/terraform-provider-alicloud/issues/1613)) IMPROVEMENTS: -- improve(ci): add new job emr ([#1695](https://github.com/aliyun/terraform-provider-alicloud/issues/1695)) -- improve(elasticsearch): added retry setting to avoid InstanceStatusNotSupportCurrentAction and InstanceActivating error ([#1693](https://github.com/aliyun/terraform-provider-alicloud/issues/1693)) -- improve useragent setting ([#1692](https://github.com/aliyun/terraform-provider-alicloud/issues/1692)) -- improve(ecs):add resource_group_id to ecs ([#1690](https://github.com/aliyun/terraform-provider-alicloud/issues/1690)) -- improve(sls): improve sls notfounderror ([#1689](https://github.com/aliyun/terraform-provider-alicloud/issues/1689)) -- improve(kafka): added retry to aviod GetTopicList Throttling.User error ([#1688](https://github.com/aliyun/terraform-provider-alicloud/issues/1688)) -- improve(ci): add ddosbgp job ([#1687](https://github.com/aliyun/terraform-provider-alicloud/issues/1687)) -- improve: rds,redis,mongodb remove the enumeration ([#1684](https://github.com/aliyun/terraform-provider-alicloud/issues/1684)) -- Update the default period of the ddosbgp instance to 12, add the bandwidth value 201, and update the test case ([#1683](https://github.com/aliyun/terraform-provider-alicloud/issues/1683)) -- improve(elasticsearch): added wait setting for retry ([#1678](https://github.com/aliyun/terraform-provider-alicloud/issues/1678)) -- improve(provider): change the ubuntu version to 18 ([#1677](https://github.com/aliyun/terraform-provider-alicloud/issues/1677)) -- improve(provider): support provider test ([#1675](https://github.com/aliyun/terraform-provider-alicloud/issues/1675)) -- ddoscoo instance only support upgrade currently ([#1673](https://github.com/aliyun/terraform-provider-alicloud/issues/1673)) +- improve(ci): add new job emr([#1695](https://github.com/aliyun/terraform-provider-alicloud/issues/1695)) +- improve(elasticsearch): added retry setting to avoid InstanceStatusNotSupportCurrentAction and InstanceActivating error([#1693](https://github.com/aliyun/terraform-provider-alicloud/issues/1693)) +- improve useragent setting([#1692](https://github.com/aliyun/terraform-provider-alicloud/issues/1692)) +- improve(ecs):add resource_group_id to ecs([#1690](https://github.com/aliyun/terraform-provider-alicloud/issues/1690)) +- improve(sls): improve sls notfounderror([#1689](https://github.com/aliyun/terraform-provider-alicloud/issues/1689)) +- improve(kafka): added retry to aviod GetTopicList Throttling.User error([#1688](https://github.com/aliyun/terraform-provider-alicloud/issues/1688)) +- improve(ci): add ddosbgp job([#1687](https://github.com/aliyun/terraform-provider-alicloud/issues/1687)) +- improve: rds,redis,mongodb remove the enumeration([#1684](https://github.com/aliyun/terraform-provider-alicloud/issues/1684)) +- Update the default period of the ddosbgp instance to 12, add the bandwidth value 201, and update the test case([#1683](https://github.com/aliyun/terraform-provider-alicloud/issues/1683)) +- improve(elasticsearch): added wait setting for retry([#1678](https://github.com/aliyun/terraform-provider-alicloud/issues/1678)) +- improve(provider): change the ubuntu version to 18([#1677](https://github.com/aliyun/terraform-provider-alicloud/issues/1677)) +- improve(provider): support provider test([#1675](https://github.com/aliyun/terraform-provider-alicloud/issues/1675)) +- ddoscoo instance only support upgrade currently([#1673](https://github.com/aliyun/terraform-provider-alicloud/issues/1673)) BUG FIXES: -- fix unsupport account site for test ([#1696](https://github.com/aliyun/terraform-provider-alicloud/issues/1696)) -- fix(ram user): supported backward compatible ([#1685](https://github.com/aliyun/terraform-provider-alicloud/issues/1685)) +- fix unsupport account site for test([#1696](https://github.com/aliyun/terraform-provider-alicloud/issues/1696)) +- fix(ram user): supported backward compatible([#1685](https://github.com/aliyun/terraform-provider-alicloud/issues/1685)) ## 1.56.0 (September 20, 2019) -- **New Resource:** `alicloud_alikafka_consumer_group` ([#1658](https://github.com/aliyun/terraform-provider-alicloud/issues/1658)) -- **New Data Source:** `alicloud_alikafka_consumer_groups` ([#1658](https://github.com/aliyun/terraform-provider-alicloud/issues/1658)) -- **New Resource:** `alicloud_alikafka_topic` ([#1642](https://github.com/aliyun/terraform-provider-alicloud/issues/1642)) -- **New Data Source:** `alicloud_alikafka_topics` ([#1642](https://github.com/aliyun/terraform-provider-alicloud/issues/1642)) +- **New Resource:** `alicloud_alikafka_consumer_group`([#1658](https://github.com/aliyun/terraform-provider-alicloud/issues/1658)) +- **New Data Source:** `alicloud_alikafka_consumer_groups`([#1658](https://github.com/aliyun/terraform-provider-alicloud/issues/1658)) +- **New Resource:** `alicloud_alikafka_topic`([#1642](https://github.com/aliyun/terraform-provider-alicloud/issues/1642)) +- **New Data Source:** `alicloud_alikafka_topics`([#1642](https://github.com/aliyun/terraform-provider-alicloud/issues/1642)) IMPROVEMENTS: -- improve(elasticsearch): Added retry to avoid UpdateInstance ConcurrencyUpdateInstanceConflict error. ([#1669](https://github.com/aliyun/terraform-provider-alicloud/issues/1669)) -- fix(security_group_rule):fix description bug ([#1668](https://github.com/aliyun/terraform-provider-alicloud/issues/1668)) -- improve: rds,redis,mongodb support modify maintain time ([#1665](https://github.com/aliyun/terraform-provider-alicloud/issues/1665)) -- add missing field ALICLOUD_INSTANCE_ID ([#1664](https://github.com/aliyun/terraform-provider-alicloud/issues/1664)) -- improve(sdk): update sdk to v1.60.164 ([#1663](https://github.com/aliyun/terraform-provider-alicloud/issues/1663)) -- improve(ci): add ci test for alikafka ([#1662](https://github.com/aliyun/terraform-provider-alicloud/issues/1662)) -- improve(provider): rename source_name to configuration_source ([#1661](https://github.com/aliyun/terraform-provider-alicloud/issues/1661)) -- improve(cen): Added wait time to avoid CreateCen Operation.Blocking error ([#1660](https://github.com/aliyun/terraform-provider-alicloud/issues/1660)) -- improve(provider): add a new field source_name to mark template ([#1657](https://github.com/aliyun/terraform-provider-alicloud/issues/1657)) -- improve(vpc): Added retry to avoid ListTagResources Throttling error ([#1652](https://github.com/aliyun/terraform-provider-alicloud/issues/1652)) -- update VPNgateway resource vswitchId field ([#1643](https://github.com/aliyun/terraform-provider-alicloud/issues/1643)) +- improve(elasticsearch): Added retry to avoid UpdateInstance ConcurrencyUpdateInstanceConflict error.([#1669](https://github.com/aliyun/terraform-provider-alicloud/issues/1669)) +- fix(security_group_rule):fix description bug ([#1668](https://github.com/aliyun/terraform-provider-alicloud/issues/1668)) +- improve: rds,redis,mongodb support modify maintain time([#1665](https://github.com/aliyun/terraform-provider-alicloud/issues/1665)) +- add missing field ALICLOUD_INSTANCE_ID([#1664](https://github.com/aliyun/terraform-provider-alicloud/issues/1664)) +- improve(sdk): update sdk to v1.60.164([#1663](https://github.com/aliyun/terraform-provider-alicloud/issues/1663)) +- improve(ci): add ci test for alikafka([#1662](https://github.com/aliyun/terraform-provider-alicloud/issues/1662)) +- improve(provider): rename source_name to configuration_source([#1661](https://github.com/aliyun/terraform-provider-alicloud/issues/1661)) +- improve(cen): Added wait time to avoid CreateCen Operation.Blocking error([#1660](https://github.com/aliyun/terraform-provider-alicloud/issues/1660)) +- improve(provider): add a new field source_name to mark template([#1657](https://github.com/aliyun/terraform-provider-alicloud/issues/1657)) +- improve(vpc): Added retry to avoid ListTagResources Throttling error([#1652](https://github.com/aliyun/terraform-provider-alicloud/issues/1652)) +- update VPNgateway resource vswitchId field([#1643](https://github.com/aliyun/terraform-provider-alicloud/issues/1643)) BUG FIXES: -- fix(ess_alarm):The 'ForceNew' attribute of input parameter 'scaling_group_id' is set 'True'. ([#1671](https://github.com/aliyun/terraform-provider-alicloud/issues/1671)) -- fix(testCommon):fix test common bug ([#1666](https://github.com/aliyun/terraform-provider-alicloud/issues/1666)) +- fix(ess_alarm):The 'ForceNew' attribute of input parameter 'scaling_group_id' is set 'True'.([#1671](https://github.com/aliyun/terraform-provider-alicloud/issues/1671)) +- fix(testCommon):fix test common bug([#1666](https://github.com/aliyun/terraform-provider-alicloud/issues/1666)) ## 1.55.4 (September 17, 2019) IMPROVEMENTS: -- improve(table store): set primary key to forcenew ([#1654](https://github.com/aliyun/terraform-provider-alicloud/issues/1654)) -- improve(docs): Added sensitive tag for the doc which has password ([#1653](https://github.com/aliyun/terraform-provider-alicloud/issues/1653)) -- improve(provider): add the provider version in the useragent ([#1651](https://github.com/aliyun/terraform-provider-alicloud/issues/1651)) -- improve(images): modified the testcase of images datasource ([#1648](https://github.com/aliyun/terraform-provider-alicloud/issues/1648)) -- improve(security_group_id):update description to support for modify ([#1647](https://github.com/aliyun/terraform-provider-alicloud/issues/1647)) -- impove(slb):add new allowed spec for slb ([#1646](https://github.com/aliyun/terraform-provider-alicloud/issues/1646)) -- improve(provider):support ecs_role_name + assume_role ([#1639](https://github.com/aliyun/terraform-provider-alicloud/issues/1639)) -- improve(example): update the examples to the format of terraform version 0.12 ([#1633](https://github.com/aliyun/terraform-provider-alicloud/issues/1633)) -- improve(instance):remove bandwidth limit ([#1630](https://github.com/aliyun/terraform-provider-alicloud/issues/1630)) -- improve(gpdb): gpdb instance supported tags ([#1615](https://github.com/aliyun/terraform-provider-alicloud/issues/1615)) +- improve(table store): set primary key to forcenew([#1654](https://github.com/aliyun/terraform-provider-alicloud/issues/1654)) +- improve(docs): Added sensitive tag for the doc which has password([#1653](https://github.com/aliyun/terraform-provider-alicloud/issues/1653)) +- improve(provider): add the provider version in the useragent([#1651](https://github.com/aliyun/terraform-provider-alicloud/issues/1651)) +- improve(images): modified the testcase of images datasource([#1648](https://github.com/aliyun/terraform-provider-alicloud/issues/1648)) +- improve(security_group_id):update description to support for modify([#1647](https://github.com/aliyun/terraform-provider-alicloud/issues/1647)) +- impove(slb):add new allowed spec for slb([#1646](https://github.com/aliyun/terraform-provider-alicloud/issues/1646)) +- improve(provider):support ecs_role_name + assume_role([#1639](https://github.com/aliyun/terraform-provider-alicloud/issues/1639)) +- improve(example): update the examples to the format of terraform version 0.12([#1633](https://github.com/aliyun/terraform-provider-alicloud/issues/1633)) +- improve(instance):remove bandwidth limit([#1630](https://github.com/aliyun/terraform-provider-alicloud/issues/1630)) +- improve(gpdb): gpdb instance supported tags([#1615](https://github.com/aliyun/terraform-provider-alicloud/issues/1615)) BUG FIXES: -- fix(security_group):fix security_group bug ([#1640](https://github.com/aliyun/terraform-provider-alicloud/issues/1640)) -- fix(rds): add diffsuppressfunc to rds tags ([#1602](https://github.com/aliyun/terraform-provider-alicloud/issues/1602)) +- fix(security_group):fix security_group bug([#1640](https://github.com/aliyun/terraform-provider-alicloud/issues/1640)) +- fix(rds): add diffsuppressfunc to rds tags([#1602](https://github.com/aliyun/terraform-provider-alicloud/issues/1602)) ## 1.55.3 (September 09, 2019) IMPROVEMENTS: -- improve(slb): midified the sweep rules of slb ([#1631](https://github.com/aliyun/terraform-provider-alicloud/issues/1631)) -- improve(slb): add new field resource_group_id ([#1629](https://github.com/aliyun/terraform-provider-alicloud/issues/1629)) -- improve(example): update the examples to the format of the new version ([#1625](https://github.com/aliyun/terraform-provider-alicloud/issues/1625)) -- improve(api gateway): api gateway app supported tags ([#1622](https://github.com/aliyun/terraform-provider-alicloud/issues/1622)) -- improve(vpc): vpc resources and datasources supported tags ([#1621](https://github.com/aliyun/terraform-provider-alicloud/issues/1621)) -- improve(kvstore): kvstore instance supported tags ([#1619](https://github.com/aliyun/terraform-provider-alicloud/issues/1619)) -- update example to support for snat's creation with multi eips ([#1554](https://github.com/aliyun/terraform-provider-alicloud/issues/1554)) +- improve(slb): midified the sweep rules of slb([#1631](https://github.com/aliyun/terraform-provider-alicloud/issues/1631)) +- improve(slb): add new field resource_group_id([#1629](https://github.com/aliyun/terraform-provider-alicloud/issues/1629)) +- improve(example): update the examples to the format of the new version([#1625](https://github.com/aliyun/terraform-provider-alicloud/issues/1625)) +- improve(api gateway): api gateway app supported tags([#1622](https://github.com/aliyun/terraform-provider-alicloud/issues/1622)) +- improve(vpc): vpc resources and datasources supported tags([#1621](https://github.com/aliyun/terraform-provider-alicloud/issues/1621)) +- improve(kvstore): kvstore instance supported tags([#1619](https://github.com/aliyun/terraform-provider-alicloud/issues/1619)) +- update example to support for snat's creation with multi eips([#1554](https://github.com/aliyun/terraform-provider-alicloud/issues/1554)) BUG FIXES: -- fix(common_bandwidth_package):make ratio ForceNew ([#1626](https://github.com/aliyun/terraform-provider-alicloud/issues/1626)) -- fix(disk):fix disk detach bug ([#1610](https://github.com/aliyun/terraform-provider-alicloud/issues/1610)) -- fix:resource security_group 'inner_access_policy' replaces 'inner_access',resource slb 'address_type' replaces 'internet' ([#1594](https://github.com/aliyun/terraform-provider-alicloud/issues/1594)) +- fix(common_bandwidth_package):make ratio ForceNew([#1626](https://github.com/aliyun/terraform-provider-alicloud/issues/1626)) +- fix(disk):fix disk detach bug([#1610](https://github.com/aliyun/terraform-provider-alicloud/issues/1610)) +- fix:resource security_group 'inner_access_policy' replaces 'inner_access',resource slb 'address_type' replaces 'internet'([#1594](https://github.com/aliyun/terraform-provider-alicloud/issues/1594)) ## 1.55.2 (August 30, 2019) IMPROVEMENTS: -- improve(elasticsearch): modified availability zone of elasticsearch instance. ([#1617](https://github.com/aliyun/terraform-provider-alicloud/issues/1617)) -- improve(ram & actiontrail): added precheck for resources testcases. ([#1616](https://github.com/aliyun/terraform-provider-alicloud/issues/1616)) -- improve(cdn): cdn domain supported tags. ([#1609](https://github.com/aliyun/terraform-provider-alicloud/issues/1609)) -- improve(db_readonly_instance):improve db_readonly_instance testcase ([#1607](https://github.com/aliyun/terraform-provider-alicloud/issues/1607)) -- improve(cdn) modified wait time of cdn domain creation. ([#1606](https://github.com/aliyun/terraform-provider-alicloud/issues/1606)) -- improve(drds): modified drds supported regions ([#1605](https://github.com/aliyun/terraform-provider-alicloud/issues/1605)) -- improve(CI): change sweeper time ([#1600](https://github.com/aliyun/terraform-provider-alicloud/issues/1600)) -- improve(rds): fix db_instance apply error after import ([#1599](https://github.com/aliyun/terraform-provider-alicloud/issues/1599)) -- improve(ons_topic):retry when Throttling.User ([#1598](https://github.com/aliyun/terraform-provider-alicloud/issues/1598)) -- Improve(ddoscoo): Improve its resource and datasource use common method ([#1591](https://github.com/aliyun/terraform-provider-alicloud/issues/1591)) -- Improve(slb):slb support set AddressIpVersion ([#1587](https://github.com/aliyun/terraform-provider-alicloud/issues/1587)) -- Improve(cs_kubernetes): Improve its resource and datasource use common method ([#1584](https://github.com/aliyun/terraform-provider-alicloud/issues/1584)) -- Improve(cs_managed_kubernetes): Improve its resource and datasource use common method ([#1581](https://github.com/aliyun/terraform-provider-alicloud/issues/1581)) +- improve(elasticsearch): modified availability zone of elasticsearch instance.([#1617](https://github.com/aliyun/terraform-provider-alicloud/issues/1617)) +- improve(ram & actiontrail): added precheck for resources testcases.([#1616](https://github.com/aliyun/terraform-provider-alicloud/issues/1616)) +- improve(cdn): cdn domain supported tags.([#1609](https://github.com/aliyun/terraform-provider-alicloud/issues/1609)) +- improve(db_readonly_instance):improve db_readonly_instance testcase([#1607](https://github.com/aliyun/terraform-provider-alicloud/issues/1607)) +- improve(cdn) modified wait time of cdn domain creation.([#1606](https://github.com/aliyun/terraform-provider-alicloud/issues/1606)) +- improve(drds): modified drds supported regions([#1605](https://github.com/aliyun/terraform-provider-alicloud/issues/1605)) +- improve(CI): change sweeper time([#1600](https://github.com/aliyun/terraform-provider-alicloud/issues/1600)) +- improve(rds): fix db_instance apply error after import([#1599](https://github.com/aliyun/terraform-provider-alicloud/issues/1599)) +- improve(ons_topic):retry when Throttling.User([#1598](https://github.com/aliyun/terraform-provider-alicloud/issues/1598)) +- Improve(ddoscoo): Improve its resource and datasource use common method([#1591](https://github.com/aliyun/terraform-provider-alicloud/issues/1591)) +- Improve(slb):slb support set AddressIpVersion([#1587](https://github.com/aliyun/terraform-provider-alicloud/issues/1587)) +- Improve(cs_kubernetes): Improve its resource and datasource use common method([#1584](https://github.com/aliyun/terraform-provider-alicloud/issues/1584)) +- Improve(cs_managed_kubernetes): Improve its resource and datasource use common method([#1581](https://github.com/aliyun/terraform-provider-alicloud/issues/1581)) BUG FIXES: -- fix(ons):fix ons error Throttling.User ([#1608](https://github.com/aliyun/terraform-provider-alicloud/issues/1608)) -- fix(ons): fix the create group error in testcase ([#1604](https://github.com/aliyun/terraform-provider-alicloud/issues/1604)) +- fix(ons):fix ons error Throttling.User([#1608](https://github.com/aliyun/terraform-provider-alicloud/issues/1608)) +- fix(ons): fix the create group error in testcase([#1604](https://github.com/aliyun/terraform-provider-alicloud/issues/1604)) ## 1.55.1 (August 23, 2019) IMPROVEMENTS: -- improve(ons_instance): set instance name using random ([#1597](https://github.com/aliyun/terraform-provider-alicloud/issues/1597)) -- add support to Ipsec_pfs field be set with "disabled" and add example files ([#1589](https://github.com/aliyun/terraform-provider-alicloud/issues/1589)) -- improve(slb): sweep the protected slb ([#1588](https://github.com/aliyun/terraform-provider-alicloud/issues/1588)) -- Improve(ram): ram resources supports import ([#1586](https://github.com/aliyun/terraform-provider-alicloud/issues/1586)) -- improve(tags): modified test case to check the upper case letters in tags ([#1585](https://github.com/aliyun/terraform-provider-alicloud/issues/1585)) -- improve(Document):improve document demo about set ([#1580](https://github.com/aliyun/terraform-provider-alicloud/issues/1580)) -- Update RouteEntry Resource RouteEntryName Field ([#1578](https://github.com/aliyun/terraform-provider-alicloud/issues/1578)) -- improve(ci):supplement log ([#1577](https://github.com/aliyun/terraform-provider-alicloud/issues/1577)) -- improve(sdk):update alibaba-cloud-sdk-go(1.60.107) ([#1575](https://github.com/aliyun/terraform-provider-alicloud/issues/1575)) -- Rename resource name that is not start with a letter ([#1573](https://github.com/aliyun/terraform-provider-alicloud/issues/1573)) -- Improve(datahub_topic): Improve resource use common method ([#1565](https://github.com/aliyun/terraform-provider-alicloud/issues/1565)) -- Improve(datahub_subscription): Improve resource use common method ([#1556](https://github.com/aliyun/terraform-provider-alicloud/issues/1556)) -- Improve(datahub_project): Improve resource use common method ([#1555](https://github.com/aliyun/terraform-provider-alicloud/issues/1555)) +- improve(ons_instance): set instance name using random([#1597](https://github.com/aliyun/terraform-provider-alicloud/issues/1597)) +- add support to Ipsec_pfs field be set with "disabled" and add example files([#1589](https://github.com/aliyun/terraform-provider-alicloud/issues/1589)) +- improve(slb): sweep the protected slb([#1588](https://github.com/aliyun/terraform-provider-alicloud/issues/1588)) +- Improve(ram): ram resources supports import([#1586](https://github.com/aliyun/terraform-provider-alicloud/issues/1586)) +- improve(tags): modified test case to check the upper case letters in tags([#1585](https://github.com/aliyun/terraform-provider-alicloud/issues/1585)) +- improve(Document):improve document demo about set([#1580](https://github.com/aliyun/terraform-provider-alicloud/issues/1580)) +- Update RouteEntry Resource RouteEntryName Field([#1578](https://github.com/aliyun/terraform-provider-alicloud/issues/1578)) +- improve(ci):supplement log([#1577](https://github.com/aliyun/terraform-provider-alicloud/issues/1577)) +- improve(sdk):update alibaba-cloud-sdk-go(1.60.107)([#1575](https://github.com/aliyun/terraform-provider-alicloud/issues/1575)) +- Rename resource name that is not start with a letter([#1573](https://github.com/aliyun/terraform-provider-alicloud/issues/1573)) +- Improve(datahub_topic): Improve resource use common method([#1565](https://github.com/aliyun/terraform-provider-alicloud/issues/1565)) +- Improve(datahub_subscription): Improve resource use common method([#1556](https://github.com/aliyun/terraform-provider-alicloud/issues/1556)) +- Improve(datahub_project): Improve resource use common method([#1555](https://github.com/aliyun/terraform-provider-alicloud/issues/1555)) BUG FIXES: -- fix(vsw): fix bug from GitHub issue ([#1593](https://github.com/aliyun/terraform-provider-alicloud/issues/1593)) -- fix(instance):update instance testcase ([#1590](https://github.com/aliyun/terraform-provider-alicloud/issues/1590)) -- fix(ci):fix CI statistics bug ([#1576](https://github.com/aliyun/terraform-provider-alicloud/issues/1576)) -- Fix typo ([#1574](https://github.com/aliyun/terraform-provider-alicloud/issues/1574)) -- fix(disks):fix dataSource test case bug ([#1566](https://github.com/aliyun/terraform-provider-alicloud/issues/1566)) +- fix(vsw): fix bug from GitHub issue([#1593](https://github.com/aliyun/terraform-provider-alicloud/issues/1593)) +- fix(instance):update instance testcase([#1590](https://github.com/aliyun/terraform-provider-alicloud/issues/1590)) +- fix(ci):fix CI statistics bug([#1576](https://github.com/aliyun/terraform-provider-alicloud/issues/1576)) +- Fix typo([#1574](https://github.com/aliyun/terraform-provider-alicloud/issues/1574)) +- fix(disks):fix dataSource test case bug([#1566](https://github.com/aliyun/terraform-provider-alicloud/issues/1566)) ## 1.55.0 (August 16, 2019) -- **New Resource:** `alicloud_ess_notification` ([#1549](https://github.com/aliyun/terraform-provider-alicloud/issues/1549)) +- **New Resource:** `alicloud_ess_notification`([#1549](https://github.com/aliyun/terraform-provider-alicloud/issues/1549)) IMPROVEMENTS: -- improve(key_pair):update key_pair document ([#1563](https://github.com/aliyun/terraform-provider-alicloud/issues/1563)) -- improve(CI): add default bucket and region for CI ([#1561](https://github.com/aliyun/terraform-provider-alicloud/issues/1561)) -- improve(CI): terraform CI log ([#1557](https://github.com/aliyun/terraform-provider-alicloud/issues/1557)) -- Improve(ots_instance_attachment): Improve its resource and datasource use common method ([#1552](https://github.com/aliyun/terraform-provider-alicloud/issues/1552)) -- Improve(ots_instance): Improve its resource and datasource use common method ([#1551](https://github.com/aliyun/terraform-provider-alicloud/issues/1551)) -- Improve(ram): ram policy attachment resources supports import ([#1550](https://github.com/aliyun/terraform-provider-alicloud/issues/1550)) -- Improve(ots_table): Improve its resource and datasource use common method ([#1546](https://github.com/aliyun/terraform-provider-alicloud/issues/1546)) -- Improve(router_interface): modified testcase multi count ([#1545](https://github.com/aliyun/terraform-provider-alicloud/issues/1545)) -- Improve(images): removed image alinux check in datasource ([#1543](https://github.com/aliyun/terraform-provider-alicloud/issues/1543)) -- Improve(logtail_config): Improve resource use common method ([#1500](https://github.com/aliyun/terraform-provider-alicloud/issues/1500)) +- improve(key_pair):update key_pair document([#1563](https://github.com/aliyun/terraform-provider-alicloud/issues/1563)) +- improve(CI): add default bucket and region for CI([#1561](https://github.com/aliyun/terraform-provider-alicloud/issues/1561)) +- improve(CI): terraform CI log([#1557](https://github.com/aliyun/terraform-provider-alicloud/issues/1557)) +- Improve(ots_instance_attachment): Improve its resource and datasource use common method([#1552](https://github.com/aliyun/terraform-provider-alicloud/issues/1552)) +- Improve(ots_instance): Improve its resource and datasource use common method([#1551](https://github.com/aliyun/terraform-provider-alicloud/issues/1551)) +- Improve(ram): ram policy attachment resources supports import([#1550](https://github.com/aliyun/terraform-provider-alicloud/issues/1550)) +- Improve(ots_table): Improve its resource and datasource use common method([#1546](https://github.com/aliyun/terraform-provider-alicloud/issues/1546)) +- Improve(router_interface): modified testcase multi count([#1545](https://github.com/aliyun/terraform-provider-alicloud/issues/1545)) +- Improve(images): removed image alinux check in datasource([#1543](https://github.com/aliyun/terraform-provider-alicloud/issues/1543)) +- Improve(logtail_config): Improve resource use common method([#1500](https://github.com/aliyun/terraform-provider-alicloud/issues/1500)) BUG FIXES: -- bugfix:throw notFoundError when scalingGroup is not found ([#1572](https://github.com/aliyun/terraform-provider-alicloud/issues/1572)) -- fix(sweep): modified the error return to run sweep completely ([#1569](https://github.com/aliyun/terraform-provider-alicloud/issues/1569)) -- fix(CI): remove the useless code ([#1564](https://github.com/aliyun/terraform-provider-alicloud/issues/1564)) -- fix(CI): fix pipeline grammar error ([#1562](https://github.com/aliyun/terraform-provider-alicloud/issues/1562)) -- Fix log document ([#1559](https://github.com/aliyun/terraform-provider-alicloud/issues/1559)) -- modify(cs): skip the testcases of cs_application and cs_swarm ([#1553](https://github.com/aliyun/terraform-provider-alicloud/issues/1553)) -- fix kvstore unexpected state 'Changing' ([#1539](https://github.com/aliyun/terraform-provider-alicloud/issues/1539)) +- bugfix:throw notFoundError when scalingGroup is not found([#1572](https://github.com/aliyun/terraform-provider-alicloud/issues/1572)) +- fix(sweep): modified the error return to run sweep completely([#1569](https://github.com/aliyun/terraform-provider-alicloud/issues/1569)) +- fix(CI): remove the useless code([#1564](https://github.com/aliyun/terraform-provider-alicloud/issues/1564)) +- fix(CI): fix pipeline grammar error([#1562](https://github.com/aliyun/terraform-provider-alicloud/issues/1562)) +- Fix log document([#1559](https://github.com/aliyun/terraform-provider-alicloud/issues/1559)) +- modify(cs): skip the testcases of cs_application and cs_swarm([#1553](https://github.com/aliyun/terraform-provider-alicloud/issues/1553)) +- fix kvstore unexpected state 'Changing'([#1539](https://github.com/aliyun/terraform-provider-alicloud/issues/1539)) ## 1.54.0 (August 12, 2019) -- **New Data Source:** `alicloud_slb_master_slave_server_groups` ([#1531](https://github.com/aliyun/terraform-provider-alicloud/issues/1531)) -- **New Resource:** `alicloud_slb_master_slave_server_group` ([#1531](https://github.com/aliyun/terraform-provider-alicloud/issues/1531)) -- **New Data Source:** `alicloud_instance_type_families` ([#1519](https://github.com/aliyun/terraform-provider-alicloud/issues/1519)) +- **New Data Source:** `alicloud_slb_master_slave_server_groups`([#1531](https://github.com/aliyun/terraform-provider-alicloud/issues/1531)) +- **New Resource:** `alicloud_slb_master_slave_server_group`([#1531](https://github.com/aliyun/terraform-provider-alicloud/issues/1531)) +- **New Data Source:** `alicloud_instance_type_families`([#1519](https://github.com/aliyun/terraform-provider-alicloud/issues/1519)) IMPROVEMENTS: -- improve(provider):profile,role_arn,session_name,session_expiration support ENV ([#1537](https://github.com/aliyun/terraform-provider-alicloud/issues/1537)) -- support sg description ([#1536](https://github.com/aliyun/terraform-provider-alicloud/issues/1536)) -- support mac address ([#1535](https://github.com/aliyun/terraform-provider-alicloud/issues/1535)) -- improve(sdk): update sdk and modify api_gateway strconv ([#1533](https://github.com/aliyun/terraform-provider-alicloud/issues/1533)) -- Improve(pvtz_zone_record): Improve resource use common method ([#1528](https://github.com/aliyun/terraform-provider-alicloud/issues/1528)) -- improve(alicloud_ess_scaling_group): support 'COST_OPTIMIZED' mode of autoscaling group ([#1527](https://github.com/aliyun/terraform-provider-alicloud/issues/1527)) -- Improve(pvtz_zone): Improve its and attachment resources use common method ([#1525](https://github.com/aliyun/terraform-provider-alicloud/issues/1525)) -- remove useless trigger in vpn ci ([#1522](https://github.com/aliyun/terraform-provider-alicloud/issues/1522)) -- Improve(cr_repo): Improve resource use common method ([#1515](https://github.com/aliyun/terraform-provider-alicloud/issues/1515)) -- Improve(cr_namespace): Improve resource use common method ([#1509](https://github.com/aliyun/terraform-provider-alicloud/issues/1509)) -- improve(kvstore): kvstore_instance resource supports timeouts setting ([#1445](https://github.com/aliyun/terraform-provider-alicloud/issues/1445)) +- improve(provider):profile,role_arn,session_name,session_expiration support ENV([#1537](https://github.com/aliyun/terraform-provider-alicloud/issues/1537)) +- support sg description([#1536](https://github.com/aliyun/terraform-provider-alicloud/issues/1536)) +- support mac address([#1535](https://github.com/aliyun/terraform-provider-alicloud/issues/1535)) +- improve(sdk): update sdk and modify api_gateway strconv([#1533](https://github.com/aliyun/terraform-provider-alicloud/issues/1533)) +- Improve(pvtz_zone_record): Improve resource use common method([#1528](https://github.com/aliyun/terraform-provider-alicloud/issues/1528)) +- improve(alicloud_ess_scaling_group): support 'COST_OPTIMIZED' mode of autoscaling group([#1527](https://github.com/aliyun/terraform-provider-alicloud/issues/1527)) +- Improve(pvtz_zone): Improve its and attachment resources use common method([#1525](https://github.com/aliyun/terraform-provider-alicloud/issues/1525)) +- remove useless trigger in vpn ci([#1522](https://github.com/aliyun/terraform-provider-alicloud/issues/1522)) +- Improve(cr_repo): Improve resource use common method([#1515](https://github.com/aliyun/terraform-provider-alicloud/issues/1515)) +- Improve(cr_namespace): Improve resource use common method([#1509](https://github.com/aliyun/terraform-provider-alicloud/issues/1509)) +- improve(kvstore): kvstore_instance resource supports timeouts setting([#1445](https://github.com/aliyun/terraform-provider-alicloud/issues/1445)) BUG FIXES: -- Fix(alicloud_logstore_index) Repair parameter description document ([#1532](https://github.com/aliyun/terraform-provider-alicloud/issues/1532)) -- fix(sweep): modified the region of prefixes ([#1526](https://github.com/aliyun/terraform-provider-alicloud/issues/1526)) -- fix(mongodb_instance): fix notfound error when describing it ([#1521](https://github.com/aliyun/terraform-provider-alicloud/issues/1521)) +- Fix(alicloud_logstore_index) Repair parameter description document([#1532](https://github.com/aliyun/terraform-provider-alicloud/issues/1532)) +- fix(sweep): modified the region of prefixes([#1526](https://github.com/aliyun/terraform-provider-alicloud/issues/1526)) +- fix(mongodb_instance): fix notfound error when describing it([#1521](https://github.com/aliyun/terraform-provider-alicloud/issues/1521)) ## 1.53.0 (August 02, 2019) -- **New Resource:** `alicloud_ons_group` ([#1506](https://github.com/aliyun/terraform-provider-alicloud/issues/1506)) -- **New Resource:** `alicloud_ess_scalinggroup_vserver_groups` ([#1503](https://github.com/aliyun/terraform-provider-alicloud/issues/1503)) -- **New Resource:** `alicloud_slb_backend_server` ([#1498](https://github.com/aliyun/terraform-provider-alicloud/issues/1498)) -- **New Resource:** `alicloud_ons_topic` ([#1483](https://github.com/aliyun/terraform-provider-alicloud/issues/1483)) -- **New Data Source:** `alicloud_ons_groups` ([#1506](https://github.com/aliyun/terraform-provider-alicloud/issues/1506)) -- **New Data source:** `alicloud_slb_backend_servers` ([#1498](https://github.com/aliyun/terraform-provider-alicloud/issues/1498)) -- **New Data Source:** `alicloud_ons_topics` ([#1483](https://github.com/aliyun/terraform-provider-alicloud/issues/1483)) - - -IMPROVEMENTS: - -- improve(dns_record): add diffsuppressfunc to avoid DomainRecordDuplicate error. ([#1518](https://github.com/aliyun/terraform-provider-alicloud/issues/1518)) -- remove useless import ([#1517](https://github.com/aliyun/terraform-provider-alicloud/issues/1517)) -- remove empty fields in managed k8s, add force_update, add multiple az support ([#1516](https://github.com/aliyun/terraform-provider-alicloud/issues/1516)) -- improve(fc_function):fc_function support sweeper ([#1513](https://github.com/aliyun/terraform-provider-alicloud/issues/1513)) -- improve(fc_trigger):fc_trigger support sweeper ([#1512](https://github.com/aliyun/terraform-provider-alicloud/issues/1512)) -- Improve(logtail_attachment): Improve resource use common method ([#1508](https://github.com/aliyun/terraform-provider-alicloud/issues/1508)) -- improve(slb):update testcase ([#1507](https://github.com/aliyun/terraform-provider-alicloud/issues/1507)) -- improve(disk):update disk_attachment ([#1501](https://github.com/aliyun/terraform-provider-alicloud/issues/1501)) -- add(slb_backend_server): slb backend server resource & data source ([#1498](https://github.com/aliyun/terraform-provider-alicloud/issues/1498)) -- Improve(log_machine_group): Improve resources use common method ([#1497](https://github.com/aliyun/terraform-provider-alicloud/issues/1497)) -- Improve(log_project): Improve resource use common method ([#1496](https://github.com/aliyun/terraform-provider-alicloud/issues/1496)) -- improve(network_interface): enhance sweeper test ([#1495](https://github.com/aliyun/terraform-provider-alicloud/issues/1495)) -- Improve(log_store): Improve resources use common method ([#1494](https://github.com/aliyun/terraform-provider-alicloud/issues/1494)) -- improve(instance_type):update testcase config ([#1493](https://github.com/aliyun/terraform-provider-alicloud/issues/1493)) -- Improve(mns_topic_subscription): Improve its resource use common method ([#1492](https://github.com/aliyun/terraform-provider-alicloud/issues/1492)) -- improve(disk):support delete_auto_snapshot delete_with_instance enable_auto_snapshot ([#1491](https://github.com/aliyun/terraform-provider-alicloud/issues/1491)) -- Improve(mns_topic): Improve its resource use common method ([#1488](https://github.com/aliyun/terraform-provider-alicloud/issues/1488)) -- Improve(api_gateway): api_gateway_api added testcases ([#1487](https://github.com/aliyun/terraform-provider-alicloud/issues/1487)) -- Improve(mns_queue): Improve its resource use common method ([#1485](https://github.com/aliyun/terraform-provider-alicloud/issues/1485)) -- improve(customer_gateway):create add retry ([#1477](https://github.com/aliyun/terraform-provider-alicloud/issues/1477)) -- improve(gpdb): resources supports timeouts setting ([#1476](https://github.com/aliyun/terraform-provider-alicloud/issues/1476)) -- improve(fc_triggers): Added ids filter to datasource ([#1475](https://github.com/aliyun/terraform-provider-alicloud/issues/1475)) -- improve(fc_services): Added ids filter to datasource ([#1474](https://github.com/aliyun/terraform-provider-alicloud/issues/1474)) -- improve(fc_functions): Added ids filter to datasource ([#1473](https://github.com/aliyun/terraform-provider-alicloud/issues/1473)) -- improve(instance_types):update instance_types filter condition ([#1472](https://github.com/aliyun/terraform-provider-alicloud/issues/1472)) -- improve(pvtz_zone__domain): Added ids filter to datasource ([#1471](https://github.com/aliyun/terraform-provider-alicloud/issues/1471)) -- improve(cr_repos): Added names to datasource attributes ([#1470](https://github.com/aliyun/terraform-provider-alicloud/issues/1470)) -- improve(cr_namespaces): Added names to datasource attributes ([#1469](https://github.com/aliyun/terraform-provider-alicloud/issues/1469)) -- improve(cdn): Added region to domain name and modified sweep rules ([#1466](https://github.com/aliyun/terraform-provider-alicloud/issues/1466)) -- improve(ram_roles): Added ids filter to datasource ([#1461](https://github.com/aliyun/terraform-provider-alicloud/issues/1461)) -- improve(ram_users): Added ids filter to datasource ([#1459](https://github.com/aliyun/terraform-provider-alicloud/issues/1459)) -- improve(pvtz_zones): Added ids filter and added names to datasource attributes ([#1458](https://github.com/aliyun/terraform-provider-alicloud/issues/1458)) -- improve(nas_mount_targets): Added ids filter to datasource ([#1453](https://github.com/aliyun/terraform-provider-alicloud/issues/1453)) -- improve(nas_file_systems): Added descriptions to datasource attributes ([#1450](https://github.com/aliyun/terraform-provider-alicloud/issues/1450)) -- improve(nas_access_rules): Added ids filter to datasource ([#1448](https://github.com/aliyun/terraform-provider-alicloud/issues/1448)) -- improve(mongodb_instance): supports timeouts setting ([#1446](https://github.com/aliyun/terraform-provider-alicloud/issues/1446)) -- improve(nas_access_groups): Added names to its attributes ([#1444](https://github.com/aliyun/terraform-provider-alicloud/issues/1444)) -- improve(mns_topics): Added names to datasource attributes ([#1442](https://github.com/aliyun/terraform-provider-alicloud/issues/1442)) -- improve(mns_topic_subscriptions): Added names to datasource attributes ([#1441](https://github.com/aliyun/terraform-provider-alicloud/issues/1441)) -- improve(mns_queues): Added names to datasource attributes ([#1439](https://github.com/aliyun/terraform-provider-alicloud/issues/1439)) - -BUG FIXES: - -- Fix(logstore_index): Invalid update parameter change ([#1505](https://github.com/aliyun/terraform-provider-alicloud/issues/1505)) -- fix(api_gateway): fix can't get resource id when stage_names set ([#1486](https://github.com/aliyun/terraform-provider-alicloud/issues/1486)) -- fix(kvstore_instance): resource kvstore_instance add Retry while ModifyInstanceSpec err ([#1484](https://github.com/aliyun/terraform-provider-alicloud/issues/1484)) -- fix(cen): modified the timeouts of cen instance to avoid errors ([#1451](https://github.com/aliyun/terraform-provider-alicloud/issues/1451)) +- **New Resource:** `alicloud_ons_group`([#1506](https://github.com/aliyun/terraform-provider-alicloud/issues/1506)) +- **New Resource:** `alicloud_ess_scalinggroup_vserver_groups`([#1503](https://github.com/aliyun/terraform-provider-alicloud/issues/1503)) +- **New Resource:** `alicloud_slb_backend_server`([#1498](https://github.com/aliyun/terraform-provider-alicloud/issues/1498)) +- **New Resource:** `alicloud_ons_topic`([#1483](https://github.com/aliyun/terraform-provider-alicloud/issues/1483)) +- **New Data Source:** `alicloud_ons_groups`([#1506](https://github.com/aliyun/terraform-provider-alicloud/issues/1506)) +- **New Data source:** `alicloud_slb_backend_servers`([#1498](https://github.com/aliyun/terraform-provider-alicloud/issues/1498)) +- **New Data Source:** `alicloud_ons_topics`([#1483](https://github.com/aliyun/terraform-provider-alicloud/issues/1483)) + + +IMPROVEMENTS: + +- improve(dns_record): add diffsuppressfunc to avoid DomainRecordDuplicate error.([#1518](https://github.com/aliyun/terraform-provider-alicloud/issues/1518)) +- remove useless import([#1517](https://github.com/aliyun/terraform-provider-alicloud/issues/1517)) +- remove empty fields in managed k8s, add force_update, add multiple az support([#1516](https://github.com/aliyun/terraform-provider-alicloud/issues/1516)) +- improve(fc_function):fc_function support sweeper([#1513](https://github.com/aliyun/terraform-provider-alicloud/issues/1513)) +- improve(fc_trigger):fc_trigger support sweeper([#1512](https://github.com/aliyun/terraform-provider-alicloud/issues/1512)) +- Improve(logtail_attachment): Improve resource use common method([#1508](https://github.com/aliyun/terraform-provider-alicloud/issues/1508)) +- improve(slb):update testcase([#1507](https://github.com/aliyun/terraform-provider-alicloud/issues/1507)) +- improve(disk):update disk_attachment([#1501](https://github.com/aliyun/terraform-provider-alicloud/issues/1501)) +- add(slb_backend_server): slb backend server resource & data source([#1498](https://github.com/aliyun/terraform-provider-alicloud/issues/1498)) +- Improve(log_machine_group): Improve resources use common method([#1497](https://github.com/aliyun/terraform-provider-alicloud/issues/1497)) +- Improve(log_project): Improve resource use common method([#1496](https://github.com/aliyun/terraform-provider-alicloud/issues/1496)) +- improve(network_interface): enhance sweeper test([#1495](https://github.com/aliyun/terraform-provider-alicloud/issues/1495)) +- Improve(log_store): Improve resources use common method([#1494](https://github.com/aliyun/terraform-provider-alicloud/issues/1494)) +- improve(instance_type):update testcase config([#1493](https://github.com/aliyun/terraform-provider-alicloud/issues/1493)) +- Improve(mns_topic_subscription): Improve its resource use common method([#1492](https://github.com/aliyun/terraform-provider-alicloud/issues/1492)) +- improve(disk):support delete_auto_snapshot delete_with_instance enable_auto_snapshot([#1491](https://github.com/aliyun/terraform-provider-alicloud/issues/1491)) +- Improve(mns_topic): Improve its resource use common method([#1488](https://github.com/aliyun/terraform-provider-alicloud/issues/1488)) +- Improve(api_gateway): api_gateway_api added testcases([#1487](https://github.com/aliyun/terraform-provider-alicloud/issues/1487)) +- Improve(mns_queue): Improve its resource use common method([#1485](https://github.com/aliyun/terraform-provider-alicloud/issues/1485)) +- improve(customer_gateway):create add retry([#1477](https://github.com/aliyun/terraform-provider-alicloud/issues/1477)) +- improve(gpdb): resources supports timeouts setting([#1476](https://github.com/aliyun/terraform-provider-alicloud/issues/1476)) +- improve(fc_triggers): Added ids filter to datasource([#1475](https://github.com/aliyun/terraform-provider-alicloud/issues/1475)) +- improve(fc_services): Added ids filter to datasource([#1474](https://github.com/aliyun/terraform-provider-alicloud/issues/1474)) +- improve(fc_functions): Added ids filter to datasource([#1473](https://github.com/aliyun/terraform-provider-alicloud/issues/1473)) +- improve(instance_types):update instance_types filter condition([#1472](https://github.com/aliyun/terraform-provider-alicloud/issues/1472)) +- improve(pvtz_zone__domain): Added ids filter to datasource([#1471](https://github.com/aliyun/terraform-provider-alicloud/issues/1471)) +- improve(cr_repos): Added names to datasource attributes([#1470](https://github.com/aliyun/terraform-provider-alicloud/issues/1470)) +- improve(cr_namespaces): Added names to datasource attributes([#1469](https://github.com/aliyun/terraform-provider-alicloud/issues/1469)) +- improve(cdn): Added region to domain name and modified sweep rules([#1466](https://github.com/aliyun/terraform-provider-alicloud/issues/1466)) +- improve(ram_roles): Added ids filter to datasource([#1461](https://github.com/aliyun/terraform-provider-alicloud/issues/1461)) +- improve(ram_users): Added ids filter to datasource([#1459](https://github.com/aliyun/terraform-provider-alicloud/issues/1459)) +- improve(pvtz_zones): Added ids filter and added names to datasource attributes([#1458](https://github.com/aliyun/terraform-provider-alicloud/issues/1458)) +- improve(nas_mount_targets): Added ids filter to datasource([#1453](https://github.com/aliyun/terraform-provider-alicloud/issues/1453)) +- improve(nas_file_systems): Added descriptions to datasource attributes([#1450](https://github.com/aliyun/terraform-provider-alicloud/issues/1450)) +- improve(nas_access_rules): Added ids filter to datasource([#1448](https://github.com/aliyun/terraform-provider-alicloud/issues/1448)) +- improve(mongodb_instance): supports timeouts setting([#1446](https://github.com/aliyun/terraform-provider-alicloud/issues/1446)) +- improve(nas_access_groups): Added names to its attributes([#1444](https://github.com/aliyun/terraform-provider-alicloud/issues/1444)) +- improve(mns_topics): Added names to datasource attributes([#1442](https://github.com/aliyun/terraform-provider-alicloud/issues/1442)) +- improve(mns_topic_subscriptions): Added names to datasource attributes([#1441](https://github.com/aliyun/terraform-provider-alicloud/issues/1441)) +- improve(mns_queues): Added names to datasource attributes([#1439](https://github.com/aliyun/terraform-provider-alicloud/issues/1439)) + +BUG FIXES: + +- Fix(logstore_index): Invalid update parameter change([#1505](https://github.com/aliyun/terraform-provider-alicloud/issues/1505)) +- fix(api_gateway): fix can't get resource id when stage_names set([#1486](https://github.com/aliyun/terraform-provider-alicloud/issues/1486)) +- fix(kvstore_instance): resource kvstore_instance add Retry while ModifyInstanceSpec err([#1484](https://github.com/aliyun/terraform-provider-alicloud/issues/1484)) +- fix(cen): modified the timeouts of cen instance to avoid errors([#1451](https://github.com/aliyun/terraform-provider-alicloud/issues/1451)) ## 1.52.2 (July 20, 2019) IMPROVEMENTS: -- improve(eip_association): supporting to set PrivateIPAddress documentation ([#1480](https://github.com/aliyun/terraform-provider-alicloud/issues/1480)) -- improve(mongodb_instances): Added ids filter to datasource ([#1478](https://github.com/aliyun/terraform-provider-alicloud/issues/1478)) -- improve(dns_domain): Added ids filter to datasource ([#1468](https://github.com/aliyun/terraform-provider-alicloud/issues/1468)) -- improve(cdn): Added retry to avoid ServiceBusy error ([#1467](https://github.com/aliyun/terraform-provider-alicloud/issues/1467)) -- improve(dns_records): Added ids filter to datasource ([#1464](https://github.com/aliyun/terraform-provider-alicloud/issues/1464)) -- improve(dns_groups): Added ids filter and added names to datasource attributes ([#1463](https://github.com/aliyun/terraform-provider-alicloud/issues/1463)) -- improve(stateConfig):update stateConfig error ([#1462](https://github.com/aliyun/terraform-provider-alicloud/issues/1462)) -- improve(kvstore): Added ids filter to datasource ([#1457](https://github.com/aliyun/terraform-provider-alicloud/issues/1457)) -- improve(cas): Added precheck to testcases ([#1456](https://github.com/aliyun/terraform-provider-alicloud/issues/1456)) -- improve(rds): db_instance and db_readonly_instance resource modify timeouts 20mins to 30mins ([#1455](https://github.com/aliyun/terraform-provider-alicloud/issues/1455)) -- add CI for the alicloud provider ([#1449](https://github.com/aliyun/terraform-provider-alicloud/issues/1449)) -- improve(api_gateway_apps): Deprecated api_id ([#1426](https://github.com/aliyun/terraform-provider-alicloud/issues/1426)) -- improve(api_gateway_apis): Added ids filter to datasource ([#1425](https://github.com/aliyun/terraform-provider-alicloud/issues/1425)) -- improve(slb_server_group): remove the maximum limitation of adding backend servers ([#1416](https://github.com/aliyun/terraform-provider-alicloud/issues/1416)) -- improve(cdn): cdn_domain_config added testcases ([#1405](https://github.com/aliyun/terraform-provider-alicloud/issues/1405)) +- improve(eip_association): supporting to set PrivateIPAddress documentation([#1480](https://github.com/aliyun/terraform-provider-alicloud/issues/1480)) +- improve(mongodb_instances): Added ids filter to datasource([#1478](https://github.com/aliyun/terraform-provider-alicloud/issues/1478)) +- improve(dns_domain): Added ids filter to datasource([#1468](https://github.com/aliyun/terraform-provider-alicloud/issues/1468)) +- improve(cdn): Added retry to avoid ServiceBusy error([#1467](https://github.com/aliyun/terraform-provider-alicloud/issues/1467)) +- improve(dns_records): Added ids filter to datasource([#1464](https://github.com/aliyun/terraform-provider-alicloud/issues/1464)) +- improve(dns_groups): Added ids filter and added names to datasource attributes([#1463](https://github.com/aliyun/terraform-provider-alicloud/issues/1463)) +- improve(stateConfig):update stateConfig error([#1462](https://github.com/aliyun/terraform-provider-alicloud/issues/1462)) +- improve(kvstore): Added ids filter to datasource([#1457](https://github.com/aliyun/terraform-provider-alicloud/issues/1457)) +- improve(cas): Added precheck to testcases([#1456](https://github.com/aliyun/terraform-provider-alicloud/issues/1456)) +- improve(rds): db_instance and db_readonly_instance resource modify timeouts 20mins to 30mins([#1455](https://github.com/aliyun/terraform-provider-alicloud/issues/1455)) +- add CI for the alicloud provider([#1449](https://github.com/aliyun/terraform-provider-alicloud/issues/1449)) +- improve(api_gateway_apps): Deprecated api_id([#1426](https://github.com/aliyun/terraform-provider-alicloud/issues/1426)) +- improve(api_gateway_apis): Added ids filter to datasource([#1425](https://github.com/aliyun/terraform-provider-alicloud/issues/1425)) +- improve(slb_server_group): remove the maximum limitation of adding backend servers([#1416](https://github.com/aliyun/terraform-provider-alicloud/issues/1416)) +- improve(cdn): cdn_domain_config added testcases([#1405](https://github.com/aliyun/terraform-provider-alicloud/issues/1405)) BUG FIXES: -- fix(kvstore_instance): resource kvstore_instance add Retry while ModifyInstanceSpec err ([#1465](https://github.com/aliyun/terraform-provider-alicloud/issues/1465)) -- fix(slb): fix slb testcase can not find instance types' bug ([#1454](https://github.com/aliyun/terraform-provider-alicloud/issues/1454)) +- fix(kvstore_instance): resource kvstore_instance add Retry while ModifyInstanceSpec err([#1465](https://github.com/aliyun/terraform-provider-alicloud/issues/1465)) +- fix(slb): fix slb testcase can not find instance types' bug([#1454](https://github.com/aliyun/terraform-provider-alicloud/issues/1454)) ## 1.52.1 (July 16, 2019) IMPROVEMENTS: -- improve(disk): support online resize ([#1447](https://github.com/aliyun/terraform-provider-alicloud/issues/1447)) -- improve(rds): db_readonly_instance resource supports timeouts setting ([#1438](https://github.com/aliyun/terraform-provider-alicloud/issues/1438)) -- improve(rds):improve db_readonly_instance TestAccAlicloudDBReadonlyInstance_multi testcase ([#1432](https://github.com/aliyun/terraform-provider-alicloud/issues/1432)) -- improve(key_pairs): Added ids filter to datasource ([#1431](https://github.com/aliyun/terraform-provider-alicloud/issues/1431)) -- improve(elasticsearch): Added ids filter and added descriptions to datasource attributes ([#1430](https://github.com/aliyun/terraform-provider-alicloud/issues/1430)) -- improve(drds): Added descriptions to attributes of datasource ([#1429](https://github.com/aliyun/terraform-provider-alicloud/issues/1429)) -- improve(rds):update ppas not support regions ([#1428](https://github.com/aliyun/terraform-provider-alicloud/issues/1428)) -- improve(api_gateway_groups): Added ids filter to datasource ([#1427](https://github.com/aliyun/terraform-provider-alicloud/issues/1427)) -- improve(docs): Reformat abnormal inline HCL code in docs ([#1423](https://github.com/aliyun/terraform-provider-alicloud/issues/1423)) -- improve(mns):modified mns_queues.html ([#1422](https://github.com/aliyun/terraform-provider-alicloud/issues/1422)) -- improve(rds): db_instance resource supports timeouts setting ([#1409](https://github.com/aliyun/terraform-provider-alicloud/issues/1409)) -- improve(kms): modified the args of kms_keys datasource ([#1407](https://github.com/aliyun/terraform-provider-alicloud/issues/1407)) -- improve(kms_key): modify the param `description` to forcenew ([#1406](https://github.com/aliyun/terraform-provider-alicloud/issues/1406)) +- improve(disk): support online resize([#1447](https://github.com/aliyun/terraform-provider-alicloud/issues/1447)) +- improve(rds): db_readonly_instance resource supports timeouts setting([#1438](https://github.com/aliyun/terraform-provider-alicloud/issues/1438)) +- improve(rds):improve db_readonly_instance TestAccAlicloudDBReadonlyInstance_multi testcase([#1432](https://github.com/aliyun/terraform-provider-alicloud/issues/1432)) +- improve(key_pairs): Added ids filter to datasource([#1431](https://github.com/aliyun/terraform-provider-alicloud/issues/1431)) +- improve(elasticsearch): Added ids filter and added descriptions to datasource attributes([#1430](https://github.com/aliyun/terraform-provider-alicloud/issues/1430)) +- improve(drds): Added descriptions to attributes of datasource([#1429](https://github.com/aliyun/terraform-provider-alicloud/issues/1429)) +- improve(rds):update ppas not support regions([#1428](https://github.com/aliyun/terraform-provider-alicloud/issues/1428)) +- improve(api_gateway_groups): Added ids filter to datasource([#1427](https://github.com/aliyun/terraform-provider-alicloud/issues/1427)) +- improve(docs): Reformat abnormal inline HCL code in docs([#1423](https://github.com/aliyun/terraform-provider-alicloud/issues/1423)) +- improve(mns):modified mns_queues.html([#1422](https://github.com/aliyun/terraform-provider-alicloud/issues/1422)) +- improve(rds): db_instance resource supports timeouts setting([#1409](https://github.com/aliyun/terraform-provider-alicloud/issues/1409)) +- improve(kms): modified the args of kms_keys datasource([#1407](https://github.com/aliyun/terraform-provider-alicloud/issues/1407)) +- improve(kms_key): modify the param `description` to forcenew([#1406](https://github.com/aliyun/terraform-provider-alicloud/issues/1406)) BUG FIXES: -- fix(db_instance): modified the target state of state config ([#1437](https://github.com/aliyun/terraform-provider-alicloud/issues/1437)) -- fix(db_readonly_instance): fix invalid status error when updating and deleting ([#1435](https://github.com/aliyun/terraform-provider-alicloud/issues/1435)) -- fix(ots_table): fix setting deviation_cell_version_in_sec error ([#1434](https://github.com/aliyun/terraform-provider-alicloud/issues/1434)) -- fix(db_backup_policy): resource db_backup_policy testcase use datasource db_instance_classes ([#1424](https://github.com/aliyun/terraform-provider-alicloud/issues/1424)) +- fix(db_instance): modified the target state of state config([#1437](https://github.com/aliyun/terraform-provider-alicloud/issues/1437)) +- fix(db_readonly_instance): fix invalid status error when updating and deleting([#1435](https://github.com/aliyun/terraform-provider-alicloud/issues/1435)) +- fix(ots_table): fix setting deviation_cell_version_in_sec error([#1434](https://github.com/aliyun/terraform-provider-alicloud/issues/1434)) +- fix(db_backup_policy): resource db_backup_policy testcase use datasource db_instance_classes([#1424](https://github.com/aliyun/terraform-provider-alicloud/issues/1424)) ## 1.52.0 (July 12, 2019) -- **New Datasource:** `alicloud_ons_instances` ([#1411](https://github.com/aliyun/terraform-provider-alicloud/issues/1411)) +- **New Datasource:** `alicloud_ons_instances`([#1411](https://github.com/aliyun/terraform-provider-alicloud/issues/1411)) IMPROVEMENTS: -- improve(vpc):add ids filter ([#1420](https://github.com/aliyun/terraform-provider-alicloud/issues/1420)) -- improve(db_instances): Added ids filter and added names to datasource attributes ([#1419](https://github.com/aliyun/terraform-provider-alicloud/issues/1419)) -- improve(cas): Added ids filter and added names to datasource attributes ([#1417](https://github.com/aliyun/terraform-provider-alicloud/issues/1417)) -- docs(format): Convert inline HCL configs to canonical format ([#1415](https://github.com/aliyun/terraform-provider-alicloud/issues/1415)) -- improve(gpdb_instance):add vpc name ([#1413](https://github.com/aliyun/terraform-provider-alicloud/issues/1413)) -- improve(provider): add a new parameter `skip_region_validation` in the provider config ([#1404](https://github.com/aliyun/terraform-provider-alicloud/issues/1404)) -- improve(cdn): cdn_domain support certificate config ([#1393](https://github.com/aliyun/terraform-provider-alicloud/issues/1393)) -- improve(rds): resource db_instance support update for instance_charge_type ([#1389](https://github.com/aliyun/terraform-provider-alicloud/issues/1389)) +- improve(vpc):add ids filter([#1420](https://github.com/aliyun/terraform-provider-alicloud/issues/1420)) +- improve(db_instances): Added ids filter and added names to datasource attributes([#1419](https://github.com/aliyun/terraform-provider-alicloud/issues/1419)) +- improve(cas): Added ids filter and added names to datasource attributes([#1417](https://github.com/aliyun/terraform-provider-alicloud/issues/1417)) +- docs(format): Convert inline HCL configs to canonical format([#1415](https://github.com/aliyun/terraform-provider-alicloud/issues/1415)) +- improve(gpdb_instance):add vpc name([#1413](https://github.com/aliyun/terraform-provider-alicloud/issues/1413)) +- improve(provider): add a new parameter `skip_region_validation` in the provider config([#1404](https://github.com/aliyun/terraform-provider-alicloud/issues/1404)) +- improve(cdn): cdn_domain support certificate config([#1393](https://github.com/aliyun/terraform-provider-alicloud/issues/1393)) +- improve(rds): resource db_instance support update for instance_charge_type([#1389](https://github.com/aliyun/terraform-provider-alicloud/issues/1389)) BUG FIXES: -- fix(db_instance):fix db_instance testcase vsw availability_zone ([#1418](https://github.com/aliyun/terraform-provider-alicloud/issues/1418)) -- fix(api_gateway): modified the testcase to avoid errors ([#1410](https://github.com/aliyun/terraform-provider-alicloud/issues/1410)) -- fix(db_readonly_instance): extend the waiting time for spec modification ([#1408](https://github.com/aliyun/terraform-provider-alicloud/issues/1408)) -- fix(db_readonly_instance): add retryable error content in instance spec modification and deletion ([#1403](https://github.com/aliyun/terraform-provider-alicloud/issues/1403)) +- fix(db_instance):fix db_instance testcase vsw availability_zone([#1418](https://github.com/aliyun/terraform-provider-alicloud/issues/1418)) +- fix(api_gateway): modified the testcase to avoid errors([#1410](https://github.com/aliyun/terraform-provider-alicloud/issues/1410)) +- fix(db_readonly_instance): extend the waiting time for spec modification([#1408](https://github.com/aliyun/terraform-provider-alicloud/issues/1408)) +- fix(db_readonly_instance): add retryable error content in instance spec modification and deletion([#1403](https://github.com/aliyun/terraform-provider-alicloud/issues/1403)) ## 1.51.0 (July 08, 2019) -- **New Date Source:** `alicloud_kvstore_instance_engines` ([#1371](https://github.com/aliyun/terraform-provider-alicloud/issues/1371)) -- **New Resource:** `alicloud_ons_instance` ([#1333](https://github.com/aliyun/terraform-provider-alicloud/issues/1333)) - -IMPROVEMENTS: - -- improve(db_instance): improve db_instance MAZ testcase ([#1391](https://github.com/aliyun/terraform-provider-alicloud/issues/1391)) -- improve(cs_kubernetes): add importIgnore parameters in the importer testcase ([#1387](https://github.com/aliyun/terraform-provider-alicloud/issues/1387)) -- Remove govendor commands in CI ([#1386](https://github.com/aliyun/terraform-provider-alicloud/issues/1386)) -- improve(slb_vserver_group): support attaching eni ([#1384](https://github.com/aliyun/terraform-provider-alicloud/issues/1384)) -- improve(db_instance_classes): add new parameter db_instance_class ([#1383](https://github.com/aliyun/terraform-provider-alicloud/issues/1383)) -- improve(images): Add os_name_en to the attributes of images datasource ([#1380](https://github.com/aliyun/terraform-provider-alicloud/issues/1380)) -- improve(disk): the snapshot_id conflicts with encrypted ([#1378](https://github.com/aliyun/terraform-provider-alicloud/issues/1378)) -- Improve(cs_kubernetes): add some importState ignore fields in the importer testcase ([#1377](https://github.com/aliyun/terraform-provider-alicloud/issues/1377)) -- Improve(oss_bucket): Add names for its attributes of datasource ([#1374](https://github.com/aliyun/terraform-provider-alicloud/issues/1374)) -- improve(common_test):update common_test for terraform 0.12 ([#1372](https://github.com/aliyun/terraform-provider-alicloud/issues/1372)) -- Improve(cs_kubernetes): add import ignore parameter `log_config` ([#1370](https://github.com/aliyun/terraform-provider-alicloud/issues/1370)) -- improve(slb):support slb instance delete protection ([#1369](https://github.com/aliyun/terraform-provider-alicloud/issues/1369)) -- improve(slb_rule): support health check config ([#1367](https://github.com/aliyun/terraform-provider-alicloud/issues/1367)) -- Improve(oss_bucket_object): Improve its use common method ([#1366](https://github.com/aliyun/terraform-provider-alicloud/issues/1366)) -- improve(drds_instance): Added precheck to its testcases ([#1364](https://github.com/aliyun/terraform-provider-alicloud/issues/1364)) -- Improve(oss_bucket): Improve its resource use common method ([#1353](https://github.com/aliyun/terraform-provider-alicloud/issues/1353)) -- improve(launch_template): support update method ([#1327](https://github.com/aliyun/terraform-provider-alicloud/issues/1327)) -- improve(snapshot): support setting timeouts ([#1304](https://github.com/aliyun/terraform-provider-alicloud/issues/1304)) -- improve(instance):update testcase ([#1199](https://github.com/aliyun/terraform-provider-alicloud/issues/1199)) - -BUG FIXES: - -- fix(instance): fix missing dry_run when creating instance ([#1401](https://github.com/aliyun/terraform-provider-alicloud/issues/1401)) -- fix(oss_bucket): fix oss bucket deleting timeout error ([#1400](https://github.com/aliyun/terraform-provider-alicloud/issues/1400)) -- fix(route_entry):fix route_entry create bug ([#1398](https://github.com/aliyun/terraform-provider-alicloud/issues/1398)) -- fix(instance):fix testcase name too length bug ([#1396](https://github.com/aliyun/terraform-provider-alicloud/issues/1396)) -- fix(vswitch):fix vswitch describe method wrapErrorf bug ([#1392](https://github.com/aliyun/terraform-provider-alicloud/issues/1392)) -- fix(slb_rule): fix testcase bug ([#1390](https://github.com/aliyun/terraform-provider-alicloud/issues/1390)) -- fix(db_backup_policy): pg10 of category 'basic' modify log_backup error ([#1388](https://github.com/aliyun/terraform-provider-alicloud/issues/1388)) -- fix(cen):Add deadline to cen datasources and modify timeout for DescribeCenBandwidthPackages ([#1381](https://github.com/aliyun/terraform-provider-alicloud/issues/1381)) -- fix(kvstore): kvstore_instance PostPaid to PrePaid error ([#1375](https://github.com/aliyun/terraform-provider-alicloud/issues/1375)) -- fix(cen): fixed its not display error message, added CenThrottlingUser retry ([#1373](https://github.com/aliyun/terraform-provider-alicloud/issues/1373)) +- **New Date Source:** `alicloud_kvstore_instance_engines`([#1371](https://github.com/aliyun/terraform-provider-alicloud/issues/1371)) +- **New Resource:** `alicloud_ons_instance`([#1333](https://github.com/aliyun/terraform-provider-alicloud/issues/1333)) + +IMPROVEMENTS: + +- improve(db_instance): improve db_instance MAZ testcase([#1391](https://github.com/aliyun/terraform-provider-alicloud/issues/1391)) +- improve(cs_kubernetes): add importIgnore parameters in the importer testcase([#1387](https://github.com/aliyun/terraform-provider-alicloud/issues/1387)) +- Remove govendor commands in CI([#1386](https://github.com/aliyun/terraform-provider-alicloud/issues/1386)) +- improve(slb_vserver_group): support attaching eni([#1384](https://github.com/aliyun/terraform-provider-alicloud/issues/1384)) +- improve(db_instance_classes): add new parameter db_instance_class([#1383](https://github.com/aliyun/terraform-provider-alicloud/issues/1383)) +- improve(images): Add os_name_en to the attributes of images datasource([#1380](https://github.com/aliyun/terraform-provider-alicloud/issues/1380)) +- improve(disk): the snapshot_id conflicts with encrypted([#1378](https://github.com/aliyun/terraform-provider-alicloud/issues/1378)) +- Improve(cs_kubernetes): add some importState ignore fields in the importer testcase([#1377](https://github.com/aliyun/terraform-provider-alicloud/issues/1377)) +- Improve(oss_bucket): Add names for its attributes of datasource([#1374](https://github.com/aliyun/terraform-provider-alicloud/issues/1374)) +- improve(common_test):update common_test for terraform 0.12([#1372](https://github.com/aliyun/terraform-provider-alicloud/issues/1372)) +- Improve(cs_kubernetes): add import ignore parameter `log_config`([#1370](https://github.com/aliyun/terraform-provider-alicloud/issues/1370)) +- improve(slb):support slb instance delete protection([#1369](https://github.com/aliyun/terraform-provider-alicloud/issues/1369)) +- improve(slb_rule): support health check config([#1367](https://github.com/aliyun/terraform-provider-alicloud/issues/1367)) +- Improve(oss_bucket_object): Improve its use common method([#1366](https://github.com/aliyun/terraform-provider-alicloud/issues/1366)) +- improve(drds_instance): Added precheck to its testcases([#1364](https://github.com/aliyun/terraform-provider-alicloud/issues/1364)) +- Improve(oss_bucket): Improve its resource use common method([#1353](https://github.com/aliyun/terraform-provider-alicloud/issues/1353)) +- improve(launch_template): support update method([#1327](https://github.com/aliyun/terraform-provider-alicloud/issues/1327)) +- improve(snapshot): support setting timeouts([#1304](https://github.com/aliyun/terraform-provider-alicloud/issues/1304)) +- improve(instance):update testcase([#1199](https://github.com/aliyun/terraform-provider-alicloud/issues/1199)) + +BUG FIXES: + +- fix(instance): fix missing dry_run when creating instance([#1401](https://github.com/aliyun/terraform-provider-alicloud/issues/1401)) +- fix(oss_bucket): fix oss bucket deleting timeout error([#1400](https://github.com/aliyun/terraform-provider-alicloud/issues/1400)) +- fix(route_entry):fix route_entry create bug([#1398](https://github.com/aliyun/terraform-provider-alicloud/issues/1398)) +- fix(instance):fix testcase name too length bug([#1396](https://github.com/aliyun/terraform-provider-alicloud/issues/1396)) +- fix(vswitch):fix vswitch describe method wrapErrorf bug([#1392](https://github.com/aliyun/terraform-provider-alicloud/issues/1392)) +- fix(slb_rule): fix testcase bug([#1390](https://github.com/aliyun/terraform-provider-alicloud/issues/1390)) +- fix(db_backup_policy): pg10 of category 'basic' modify log_backup error([#1388](https://github.com/aliyun/terraform-provider-alicloud/issues/1388)) +- fix(cen):Add deadline to cen datasources and modify timeout for DescribeCenBandwidthPackages([#1381](https://github.com/aliyun/terraform-provider-alicloud/issues/1381)) +- fix(kvstore): kvstore_instance PostPaid to PrePaid error([#1375](https://github.com/aliyun/terraform-provider-alicloud/issues/1375)) +- fix(cen): fixed its not display error message, added CenThrottlingUser retry([#1373](https://github.com/aliyun/terraform-provider-alicloud/issues/1373)) ## 1.50.0 (July 01, 2019) IMPROVEMENTS: -- Remove cs kubernetes autovpc testcases ([#1368](https://github.com/aliyun/terraform-provider-alicloud/issues/1368)) -- disable nav-visible in the alicloud.erb file ([#1365](https://github.com/aliyun/terraform-provider-alicloud/issues/1365)) -- Improve sweeper test and remove some needless waiting ([#1361](https://github.com/aliyun/terraform-provider-alicloud/issues/1361)) -- This is a Terraform 0.12 compatible release of this provider ([#1356](https://github.com/aliyun/terraform-provider-alicloud/issues/1356)) -- Deprecated resource `alicloud_cms_alarm` parameter start_time, end_time and removed notify_type based on the latest go sdk ([#1356](https://github.com/aliyun/terraform-provider-alicloud/issues/1356)) -- Adapt to new parameters of dedicated kubernetes cluster ([#1354](https://github.com/aliyun/terraform-provider-alicloud/issues/1354)) +- Remove cs kubernetes autovpc testcases([#1368](https://github.com/aliyun/terraform-provider-alicloud/issues/1368)) +- disable nav-visible in the alicloud.erb file([#1365](https://github.com/aliyun/terraform-provider-alicloud/issues/1365)) +- Improve sweeper test and remove some needless waiting([#1361](https://github.com/aliyun/terraform-provider-alicloud/issues/1361)) +- This is a Terraform 0.12 compatible release of this provider([#1356](https://github.com/aliyun/terraform-provider-alicloud/issues/1356)) +- Deprecated resource `alicloud_cms_alarm` parameter start_time, end_time and removed notify_type based on the latest go sdk([#1356](https://github.com/aliyun/terraform-provider-alicloud/issues/1356)) +- Adapt to new parameters of dedicated kubernetes cluster([#1354](https://github.com/aliyun/terraform-provider-alicloud/issues/1354)) BUG FIXES: -- Fix alicloud_cas_certificate setId bug ([#1368](https://github.com/aliyun/terraform-provider-alicloud/issues/1368)) -- Fix oss bucket datasource testcase based on the 0.12 syntax ([#1362](https://github.com/aliyun/terraform-provider-alicloud/issues/1362)) -- Fix deleting mongodb instance "NotFound" bug ([#1359](https://github.com/aliyun/terraform-provider-alicloud/issues/1359)) +- Fix alicloud_cas_certificate setId bug([#1368](https://github.com/aliyun/terraform-provider-alicloud/issues/1368)) +- Fix oss bucket datasource testcase based on the 0.12 syntax([#1362](https://github.com/aliyun/terraform-provider-alicloud/issues/1362)) +- Fix deleting mongodb instance "NotFound" bug([#1359](https://github.com/aliyun/terraform-provider-alicloud/issues/1359)) ## 1.49.0 (June 28, 2019) -- **New Date Source:** `alicloud_kvstore_instance_classes` ([#1315](https://github.com/aliyun/terraform-provider-alicloud/issues/1315)) +- **New Date Source:** `alicloud_kvstore_instance_classes`([#1315](https://github.com/aliyun/terraform-provider-alicloud/issues/1315)) IMPROVEMENTS: -- remove the skipped testcase ([#1349](https://github.com/aliyun/terraform-provider-alicloud/issues/1349)) -- Move some import testcase into resource testcase ([#1348](https://github.com/aliyun/terraform-provider-alicloud/issues/1348)) -- Support attach & detach operation for loadbalancers and dbinstances ([#1346](https://github.com/aliyun/terraform-provider-alicloud/issues/1346)) -- update security_group_rule md ([#1345](https://github.com/aliyun/terraform-provider-alicloud/issues/1345)) -- Improve mongodb,rds testcase ([#1339](https://github.com/aliyun/terraform-provider-alicloud/issues/1339)) -- Deprecate field statement and use field document to replace ([#1338](https://github.com/aliyun/terraform-provider-alicloud/issues/1338)) -- Add function BuildStateConf for common timeouts setting ([#1330](https://github.com/aliyun/terraform-provider-alicloud/issues/1330)) -- drds_instance resource supports timeouts setting ([#1329](https://github.com/aliyun/terraform-provider-alicloud/issues/1329)) -- add support get Ak from config file ([#1328](https://github.com/aliyun/terraform-provider-alicloud/issues/1328)) -- Improve api_gateway_vpc use common method. ([#1323](https://github.com/aliyun/terraform-provider-alicloud/issues/1323)) -- Organize official documents in alphabetical order ([#1322](https://github.com/aliyun/terraform-provider-alicloud/issues/1322)) -- improve snapshot_policy testcase ([#1313](https://github.com/aliyun/terraform-provider-alicloud/issues/1313)) -- Improve api_gateway_group use common method ([#1311](https://github.com/aliyun/terraform-provider-alicloud/issues/1311)) -- Improve api_gateway_app use common method ([#1306](https://github.com/aliyun/terraform-provider-alicloud/issues/1306)) +- remove the skipped testcase([#1349](https://github.com/aliyun/terraform-provider-alicloud/issues/1349)) +- Move some import testcase into resource testcase([#1348](https://github.com/aliyun/terraform-provider-alicloud/issues/1348)) +- Support attach & detach operation for loadbalancers and dbinstances([#1346](https://github.com/aliyun/terraform-provider-alicloud/issues/1346)) +- update security_group_rule md([#1345](https://github.com/aliyun/terraform-provider-alicloud/issues/1345)) +- Improve mongodb,rds testcase([#1339](https://github.com/aliyun/terraform-provider-alicloud/issues/1339)) +- Deprecate field statement and use field document to replace([#1338](https://github.com/aliyun/terraform-provider-alicloud/issues/1338)) +- Add function BuildStateConf for common timeouts setting([#1330](https://github.com/aliyun/terraform-provider-alicloud/issues/1330)) +- drds_instance resource supports timeouts setting([#1329](https://github.com/aliyun/terraform-provider-alicloud/issues/1329)) +- add support get Ak from config file([#1328](https://github.com/aliyun/terraform-provider-alicloud/issues/1328)) +- Improve api_gateway_vpc use common method.([#1323](https://github.com/aliyun/terraform-provider-alicloud/issues/1323)) +- Organize official documents in alphabetical order([#1322](https://github.com/aliyun/terraform-provider-alicloud/issues/1322)) +- improve snapshot_policy testcase([#1313](https://github.com/aliyun/terraform-provider-alicloud/issues/1313)) +- Improve api_gateway_group use common method([#1311](https://github.com/aliyun/terraform-provider-alicloud/issues/1311)) +- Improve api_gateway_app use common method([#1306](https://github.com/aliyun/terraform-provider-alicloud/issues/1306)) BUG FIXES: -- bugfix: modify ess loadbalancers batch size ([#1352](https://github.com/aliyun/terraform-provider-alicloud/issues/1352)) -- fix instance OperationConflict bug ([#1351](https://github.com/aliyun/terraform-provider-alicloud/issues/1351)) -- fix(nas): convert some retrable error to nonretryable ([#1344](https://github.com/aliyun/terraform-provider-alicloud/issues/1344)) -- fix mongodb testcase ([#1341](https://github.com/aliyun/terraform-provider-alicloud/issues/1341)) -- fix log_store fields cannot be changed ([#1337](https://github.com/aliyun/terraform-provider-alicloud/issues/1337)) -- fix(nas): fix error handling ([#1336](https://github.com/aliyun/terraform-provider-alicloud/issues/1336)) -- fix db_instance_classes,db_instance_engines ([#1331](https://github.com/aliyun/terraform-provider-alicloud/issues/1331)) -- fix sls-logconfig config_name field to name ([#1326](https://github.com/aliyun/terraform-provider-alicloud/issues/1326)) -- fix db_instance_engines testcase ([#1325](https://github.com/aliyun/terraform-provider-alicloud/issues/1325)) -- fix forward_entries testcase bug ([#1324](https://github.com/aliyun/terraform-provider-alicloud/issues/1324)) +- bugfix: modify ess loadbalancers batch size([#1352](https://github.com/aliyun/terraform-provider-alicloud/issues/1352)) +- fix instance OperationConflict bug([#1351](https://github.com/aliyun/terraform-provider-alicloud/issues/1351)) +- fix(nas): convert some retrable error to nonretryable([#1344](https://github.com/aliyun/terraform-provider-alicloud/issues/1344)) +- fix mongodb testcase([#1341](https://github.com/aliyun/terraform-provider-alicloud/issues/1341)) +- fix log_store fields cannot be changed([#1337](https://github.com/aliyun/terraform-provider-alicloud/issues/1337)) +- fix(nas): fix error handling([#1336](https://github.com/aliyun/terraform-provider-alicloud/issues/1336)) +- fix db_instance_classes,db_instance_engines([#1331](https://github.com/aliyun/terraform-provider-alicloud/issues/1331)) +- fix sls-logconfig config_name field to name([#1326](https://github.com/aliyun/terraform-provider-alicloud/issues/1326)) +- fix db_instance_engines testcase([#1325](https://github.com/aliyun/terraform-provider-alicloud/issues/1325)) +- fix forward_entries testcase bug([#1324](https://github.com/aliyun/terraform-provider-alicloud/issues/1324)) ## 1.48.0 (June 21, 2019) -- **New Resource:** `alicloud_gpdb_connection` ([#1290](https://github.com/aliyun/terraform-provider-alicloud/issues/1290)) +- **New Resource:** `alicloud_gpdb_connection`([#1290](https://github.com/aliyun/terraform-provider-alicloud/issues/1290)) IMPROVEMENTS: -- Improve rds testcase zone_id ([#1321](https://github.com/aliyun/terraform-provider-alicloud/issues/1321)) -- feature: support enable/disable action for resource alicloud_ess_alarm ([#1320](https://github.com/aliyun/terraform-provider-alicloud/issues/1320)) -- cen_instance resource supports timeouts setting ([#1318](https://github.com/aliyun/terraform-provider-alicloud/issues/1318)) -- added importer support for security_group_rule ([#1317](https://github.com/aliyun/terraform-provider-alicloud/issues/1317)) -- add multi_zone for db_instance_classes and db_instance_engines ([#1310](https://github.com/aliyun/terraform-provider-alicloud/issues/1310)) -- Update Eip Resource Isp Field ([#1303](https://github.com/aliyun/terraform-provider-alicloud/issues/1303)) -- Improve db_instance,db_read_write_splitting_connection,db_readonly_instance testcase ([#1300](https://github.com/aliyun/terraform-provider-alicloud/issues/1300)) -- Improve api_gateway_api use common method ([#1299](https://github.com/aliyun/terraform-provider-alicloud/issues/1299)) -- Add name for cen bandwidth package testcase ([#1298](https://github.com/aliyun/terraform-provider-alicloud/issues/1298)) -- Improve db testcase ([#1294](https://github.com/aliyun/terraform-provider-alicloud/issues/1294)) -- elasticsearch_instance resource supports timeouts setting ([#1268](https://github.com/aliyun/terraform-provider-alicloud/issues/1268)) +- Improve rds testcase zone_id([#1321](https://github.com/aliyun/terraform-provider-alicloud/issues/1321)) +- feature: support enable/disable action for resource alicloud_ess_alarm([#1320](https://github.com/aliyun/terraform-provider-alicloud/issues/1320)) +- cen_instance resource supports timeouts setting([#1318](https://github.com/aliyun/terraform-provider-alicloud/issues/1318)) +- added importer support for security_group_rule([#1317](https://github.com/aliyun/terraform-provider-alicloud/issues/1317)) +- add multi_zone for db_instance_classes and db_instance_engines([#1310](https://github.com/aliyun/terraform-provider-alicloud/issues/1310)) +- Update Eip Resource Isp Field([#1303](https://github.com/aliyun/terraform-provider-alicloud/issues/1303)) +- Improve db_instance,db_read_write_splitting_connection,db_readonly_instance testcase([#1300](https://github.com/aliyun/terraform-provider-alicloud/issues/1300)) +- Improve api_gateway_api use common method([#1299](https://github.com/aliyun/terraform-provider-alicloud/issues/1299)) +- Add name for cen bandwidth package testcase([#1298](https://github.com/aliyun/terraform-provider-alicloud/issues/1298)) +- Improve db testcase([#1294](https://github.com/aliyun/terraform-provider-alicloud/issues/1294)) +- elasticsearch_instance resource supports timeouts setting([#1268](https://github.com/aliyun/terraform-provider-alicloud/issues/1268)) BUG FIXES: -- bugfix: remove the 'ForceNew' attribute of 'vswitch_ids' from resource alicloud_ess_scaling_group ([#1316](https://github.com/aliyun/terraform-provider-alicloud/issues/1316)) -- managed k8s no longer returns vswitchids and instancetypes, fix crash ([#1314](https://github.com/aliyun/terraform-provider-alicloud/issues/1314)) -- fix db_instance_classes ([#1309](https://github.com/aliyun/terraform-provider-alicloud/issues/1309)) -- fix oss lifecycle nil pointer bug ([#1307](https://github.com/aliyun/terraform-provider-alicloud/issues/1307)) -- Fix cen_bandwidth_limit Throttling.User bug ([#1305](https://github.com/aliyun/terraform-provider-alicloud/issues/1305)) -- fix disk_attachment test bug ([#1302](https://github.com/aliyun/terraform-provider-alicloud/issues/1302)) +- bugfix: remove the 'ForceNew' attribute of 'vswitch_ids' from resource alicloud_ess_scaling_group([#1316](https://github.com/aliyun/terraform-provider-alicloud/issues/1316)) +- managed k8s no longer returns vswitchids and instancetypes, fix crash([#1314](https://github.com/aliyun/terraform-provider-alicloud/issues/1314)) +- fix db_instance_classes([#1309](https://github.com/aliyun/terraform-provider-alicloud/issues/1309)) +- fix oss lifecycle nil pointer bug([#1307](https://github.com/aliyun/terraform-provider-alicloud/issues/1307)) +- Fix cen_bandwidth_limit Throttling.User bug([#1305](https://github.com/aliyun/terraform-provider-alicloud/issues/1305)) +- fix disk_attachment test bug([#1302](https://github.com/aliyun/terraform-provider-alicloud/issues/1302)) ## 1.47.0 (June 17, 2019) -- **New Date Source:** `alicloud_gpdb_instances` ([#1279](https://github.com/aliyun/terraform-provider-alicloud/issues/1279)) -- **New Resource:** `alicloud_gpdb_instance` ([#1260](https://github.com/aliyun/terraform-provider-alicloud/issues/1260)) - -IMPROVEMENTS: - -- fc_trigger datasource support outputting ids and names ([#1286](https://github.com/aliyun/terraform-provider-alicloud/issues/1286)) -- add fc_trigger support cdn_events ([#1285](https://github.com/aliyun/terraform-provider-alicloud/issues/1285)) -- modify apigateway-fc example ([#1284](https://github.com/aliyun/terraform-provider-alicloud/issues/1284)) -- Added PGP encrypt Support for ram access key ([#1280](https://github.com/aliyun/terraform-provider-alicloud/issues/1280)) -- Update Eip Resource Isp Field ([#1275](https://github.com/aliyun/terraform-provider-alicloud/issues/1275)) -- Improve fc_service use common method ([#1269](https://github.com/aliyun/terraform-provider-alicloud/issues/1269)) -- Improve fc_function use common method ([#1266](https://github.com/aliyun/terraform-provider-alicloud/issues/1266)) -- update dns_group testcase name ([#1265](https://github.com/aliyun/terraform-provider-alicloud/issues/1265)) -- update slb sdk ([#1263](https://github.com/aliyun/terraform-provider-alicloud/issues/1263)) -- improve vpn_connection testcase ([#1257](https://github.com/aliyun/terraform-provider-alicloud/issues/1257)) -- Improve cen_route_entries use common method ([#1249](https://github.com/aliyun/terraform-provider-alicloud/issues/1249)) -- Improve cen_bandwidth_package_attachment resource use common method ([#1240](https://github.com/aliyun/terraform-provider-alicloud/issues/1240)) -- Improve cen_bandwidth_package resource use common method ([#1237](https://github.com/aliyun/terraform-provider-alicloud/issues/1237)) - -BUG FIXES: - -- feat(nas): fix error report ([#1293](https://github.com/aliyun/terraform-provider-alicloud/issues/1293)) -- temp fix no value returned by cs openapi ([#1289](https://github.com/aliyun/terraform-provider-alicloud/issues/1289)) -- fix disk device_name bug ([#1288](https://github.com/aliyun/terraform-provider-alicloud/issues/1288)) -- fix sql server instance storage set bug ([#1283](https://github.com/aliyun/terraform-provider-alicloud/issues/1283)) -- fix db_instance_classes storage_range bug ([#1282](https://github.com/aliyun/terraform-provider-alicloud/issues/1282)) -- fc_service datasource support outputting ids and names ([#1278](https://github.com/aliyun/terraform-provider-alicloud/issues/1278)) -- fix log_store ListShards InternalServerError bug ([#1277](https://github.com/aliyun/terraform-provider-alicloud/issues/1277)) -- fix slb_listener docs bug ([#1276](https://github.com/aliyun/terraform-provider-alicloud/issues/1276)) -- fix clientToken bug ([#1272](https://github.com/aliyun/terraform-provider-alicloud/issues/1272)) -- fix(nas): fix document and nas_access_rules ([#1271](https://github.com/aliyun/terraform-provider-alicloud/issues/1271)) -- docs(version) Added 6.7 supported and fixed bug of version difference ([#1270](https://github.com/aliyun/terraform-provider-alicloud/issues/1270)) -- fix(nas): fix documents ([#1267](https://github.com/aliyun/terraform-provider-alicloud/issues/1267)) -- fix(nas): describe mount target & access rule ([#1264](https://github.com/aliyun/terraform-provider-alicloud/issues/1264)) +- **New Date Source:** `alicloud_gpdb_instances`([#1279](https://github.com/aliyun/terraform-provider-alicloud/issues/1279)) +- **New Resource:** `alicloud_gpdb_instance`([#1260](https://github.com/aliyun/terraform-provider-alicloud/issues/1260)) + +IMPROVEMENTS: + +- fc_trigger datasource support outputting ids and names([#1286](https://github.com/aliyun/terraform-provider-alicloud/issues/1286)) +- add fc_trigger support cdn_events([#1285](https://github.com/aliyun/terraform-provider-alicloud/issues/1285)) +- modify apigateway-fc example([#1284](https://github.com/aliyun/terraform-provider-alicloud/issues/1284)) +- Added PGP encrypt Support for ram access key([#1280](https://github.com/aliyun/terraform-provider-alicloud/issues/1280)) +- Update Eip Resource Isp Field([#1275](https://github.com/aliyun/terraform-provider-alicloud/issues/1275)) +- Improve fc_service use common method([#1269](https://github.com/aliyun/terraform-provider-alicloud/issues/1269)) +- Improve fc_function use common method([#1266](https://github.com/aliyun/terraform-provider-alicloud/issues/1266)) +- update dns_group testcase name([#1265](https://github.com/aliyun/terraform-provider-alicloud/issues/1265)) +- update slb sdk([#1263](https://github.com/aliyun/terraform-provider-alicloud/issues/1263)) +- improve vpn_connection testcase([#1257](https://github.com/aliyun/terraform-provider-alicloud/issues/1257)) +- Improve cen_route_entries use common method([#1249](https://github.com/aliyun/terraform-provider-alicloud/issues/1249)) +- Improve cen_bandwidth_package_attachment resource use common method([#1240](https://github.com/aliyun/terraform-provider-alicloud/issues/1240)) +- Improve cen_bandwidth_package resource use common method([#1237](https://github.com/aliyun/terraform-provider-alicloud/issues/1237)) + +BUG FIXES: + +- feat(nas): fix error report([#1293](https://github.com/aliyun/terraform-provider-alicloud/issues/1293)) +- temp fix no value returned by cs openapi([#1289](https://github.com/aliyun/terraform-provider-alicloud/issues/1289)) +- fix disk device_name bug([#1288](https://github.com/aliyun/terraform-provider-alicloud/issues/1288)) +- fix sql server instance storage set bug([#1283](https://github.com/aliyun/terraform-provider-alicloud/issues/1283)) +- fix db_instance_classes storage_range bug([#1282](https://github.com/aliyun/terraform-provider-alicloud/issues/1282)) +- fc_service datasource support outputting ids and names([#1278](https://github.com/aliyun/terraform-provider-alicloud/issues/1278)) +- fix log_store ListShards InternalServerError bug([#1277](https://github.com/aliyun/terraform-provider-alicloud/issues/1277)) +- fix slb_listener docs bug([#1276](https://github.com/aliyun/terraform-provider-alicloud/issues/1276)) +- fix clientToken bug([#1272](https://github.com/aliyun/terraform-provider-alicloud/issues/1272)) +- fix(nas): fix document and nas_access_rules([#1271](https://github.com/aliyun/terraform-provider-alicloud/issues/1271)) +- docs(version) Added 6.7 supported and fixed bug of version difference([#1270](https://github.com/aliyun/terraform-provider-alicloud/issues/1270)) +- fix(nas): fix documents([#1267](https://github.com/aliyun/terraform-provider-alicloud/issues/1267)) +- fix(nas): describe mount target & access rule([#1264](https://github.com/aliyun/terraform-provider-alicloud/issues/1264)) ## 1.46.0 (June 10, 2019) -- **New Resource:** `alicloud_ram_account_password_policy` ([#1212](https://github.com/aliyun/terraform-provider-alicloud/issues/1212)) -- **New Date Source:** `alicloud_db_instance_engines` ([#1201](https://github.com/aliyun/terraform-provider-alicloud/issues/1201)) -- **New Date Source:** `alicloud_db_instance_classes` ([#1201](https://github.com/aliyun/terraform-provider-alicloud/issues/1201)) - -IMPROVEMENTS: - -- refactor(nas): move import to resource ([#1254](https://github.com/aliyun/terraform-provider-alicloud/issues/1254)) -- Improve ess_scalingconfiguration use common method ([#1250](https://github.com/aliyun/terraform-provider-alicloud/issues/1250)) -- improve ssl_vpn_client_cert testcase ([#1248](https://github.com/aliyun/terraform-provider-alicloud/issues/1248)) -- Improve ram_account_password_policy resource use common method ([#1247](https://github.com/aliyun/terraform-provider-alicloud/issues/1247)) -- add pending status for resource instance when creating ([#1245](https://github.com/aliyun/terraform-provider-alicloud/issues/1245)) -- resource instance supports timeouts configure ([#1244](https://github.com/aliyun/terraform-provider-alicloud/issues/1244)) -- added webhook support for alarms ([#1243](https://github.com/aliyun/terraform-provider-alicloud/issues/1243)) -- improve common test method ([#1242](https://github.com/aliyun/terraform-provider-alicloud/issues/1242)) -- Update Eip Association Resource ([#1238](https://github.com/aliyun/terraform-provider-alicloud/issues/1238)) -- improve ssl_vpn_server testcase ([#1235](https://github.com/aliyun/terraform-provider-alicloud/issues/1235)) -- Improve ess_scalingconfigurations datasource use common method ([#1234](https://github.com/aliyun/terraform-provider-alicloud/issues/1234)) -- improve vpn_customer_gateway testcase ([#1232](https://github.com/aliyun/terraform-provider-alicloud/issues/1232)) -- Improve cen_instance_grant use common method ([#1230](https://github.com/aliyun/terraform-provider-alicloud/issues/1230)) -- improve vpn_gateway testcase ([#1229](https://github.com/aliyun/terraform-provider-alicloud/issues/1229)) -- Improve cen_bandwidth_limit use common method ([#1227](https://github.com/aliyun/terraform-provider-alicloud/issues/1227)) -- Feature/support multi instance types ([#1226](https://github.com/aliyun/terraform-provider-alicloud/issues/1226)) -- Improve ess_attachment use common method ([#1225](https://github.com/aliyun/terraform-provider-alicloud/issues/1225)) -- Improve ess_alarm use common method ([#1218](https://github.com/aliyun/terraform-provider-alicloud/issues/1218)) -- Add support for assume_role in provider block ([#1217](https://github.com/aliyun/terraform-provider-alicloud/issues/1217)) -- Improve cen_instance_attachment resource use common method. ([#1216](https://github.com/aliyun/terraform-provider-alicloud/issues/1216)) -- add db instance engines and db instance classes data source support ([#1201](https://github.com/aliyun/terraform-provider-alicloud/issues/1201)) -- Handle alicloud_cs_*_kubernetes resource NotFound error properly ([#1191](https://github.com/aliyun/terraform-provider-alicloud/issues/1191)) - -BUG FIXES: - -- fix slb_attachment classic testcase ([#1259](https://github.com/aliyun/terraform-provider-alicloud/issues/1259)) -- fix oss bucket update bug ([#1258](https://github.com/aliyun/terraform-provider-alicloud/issues/1258)) -- fix scalingConfiguration is inconsistent with the information that is returned by describe, when the input parameter user_data is base64 ([#1256](https://github.com/aliyun/terraform-provider-alicloud/issues/1256)) -- fix slb_attachment err ObtainIpFail ([#1253](https://github.com/aliyun/terraform-provider-alicloud/issues/1253)) -- Fix password to comliant with the default password policy ([#1241](https://github.com/aliyun/terraform-provider-alicloud/issues/1241)) -- fix cr repo details, improve cs and cr docs ([#1239](https://github.com/aliyun/terraform-provider-alicloud/issues/1239)) -- fix(nas): fix unittest bugs ([#1236](https://github.com/aliyun/terraform-provider-alicloud/issues/1236)) -- fix slb_ca_certificate err ServiceIsConfiguring ([#1233](https://github.com/aliyun/terraform-provider-alicloud/issues/1233)) -- fix reset account_password don't work ([#1231](https://github.com/aliyun/terraform-provider-alicloud/issues/1231)) -- fix(nas): fix testcase errors ([#1184](https://github.com/aliyun/terraform-provider-alicloud/issues/1184)) +- **New Resource:** `alicloud_ram_account_password_policy`([#1212](https://github.com/aliyun/terraform-provider-alicloud/issues/1212)) +- **New Date Source:** `alicloud_db_instance_engines`([#1201](https://github.com/aliyun/terraform-provider-alicloud/issues/1201)) +- **New Date Source:** `alicloud_db_instance_classes`([#1201](https://github.com/aliyun/terraform-provider-alicloud/issues/1201)) + +IMPROVEMENTS: + +- refactor(nas): move import to resource([#1254](https://github.com/aliyun/terraform-provider-alicloud/issues/1254)) +- Improve ess_scalingconfiguration use common method([#1250](https://github.com/aliyun/terraform-provider-alicloud/issues/1250)) +- improve ssl_vpn_client_cert testcase([#1248](https://github.com/aliyun/terraform-provider-alicloud/issues/1248)) +- Improve ram_account_password_policy resource use common method([#1247](https://github.com/aliyun/terraform-provider-alicloud/issues/1247)) +- add pending status for resource instance when creating([#1245](https://github.com/aliyun/terraform-provider-alicloud/issues/1245)) +- resource instance supports timeouts configure([#1244](https://github.com/aliyun/terraform-provider-alicloud/issues/1244)) +- added webhook support for alarms([#1243](https://github.com/aliyun/terraform-provider-alicloud/issues/1243)) +- improve common test method([#1242](https://github.com/aliyun/terraform-provider-alicloud/issues/1242)) +- Update Eip Association Resource([#1238](https://github.com/aliyun/terraform-provider-alicloud/issues/1238)) +- improve ssl_vpn_server testcase([#1235](https://github.com/aliyun/terraform-provider-alicloud/issues/1235)) +- Improve ess_scalingconfigurations datasource use common method([#1234](https://github.com/aliyun/terraform-provider-alicloud/issues/1234)) +- improve vpn_customer_gateway testcase([#1232](https://github.com/aliyun/terraform-provider-alicloud/issues/1232)) +- Improve cen_instance_grant use common method([#1230](https://github.com/aliyun/terraform-provider-alicloud/issues/1230)) +- improve vpn_gateway testcase([#1229](https://github.com/aliyun/terraform-provider-alicloud/issues/1229)) +- Improve cen_bandwidth_limit use common method([#1227](https://github.com/aliyun/terraform-provider-alicloud/issues/1227)) +- Feature/support multi instance types([#1226](https://github.com/aliyun/terraform-provider-alicloud/issues/1226)) +- Improve ess_attachment use common method([#1225](https://github.com/aliyun/terraform-provider-alicloud/issues/1225)) +- Improve ess_alarm use common method([#1218](https://github.com/aliyun/terraform-provider-alicloud/issues/1218)) +- Add support for assume_role in provider block([#1217](https://github.com/aliyun/terraform-provider-alicloud/issues/1217)) +- Improve cen_instance_attachment resource use common method.([#1216](https://github.com/aliyun/terraform-provider-alicloud/issues/1216)) +- add db instance engines and db instance classes data source support([#1201](https://github.com/aliyun/terraform-provider-alicloud/issues/1201)) +- Handle alicloud_cs_*_kubernetes resource NotFound error properly([#1191](https://github.com/aliyun/terraform-provider-alicloud/issues/1191)) + +BUG FIXES: + +- fix slb_attachment classic testcase([#1259](https://github.com/aliyun/terraform-provider-alicloud/issues/1259)) +- fix oss bucket update bug([#1258](https://github.com/aliyun/terraform-provider-alicloud/issues/1258)) +- fix scalingConfiguration is inconsistent with the information that is returned by describe, when the input parameter user_data is base64([#1256](https://github.com/aliyun/terraform-provider-alicloud/issues/1256)) +- fix slb_attachment err ObtainIpFail([#1253](https://github.com/aliyun/terraform-provider-alicloud/issues/1253)) +- Fix password to comliant with the default password policy([#1241](https://github.com/aliyun/terraform-provider-alicloud/issues/1241)) +- fix cr repo details, improve cs and cr docs([#1239](https://github.com/aliyun/terraform-provider-alicloud/issues/1239)) +- fix(nas): fix unittest bugs([#1236](https://github.com/aliyun/terraform-provider-alicloud/issues/1236)) +- fix slb_ca_certificate err ServiceIsConfiguring([#1233](https://github.com/aliyun/terraform-provider-alicloud/issues/1233)) +- fix reset account_password don't work([#1231](https://github.com/aliyun/terraform-provider-alicloud/issues/1231)) +- fix(nas): fix testcase errors([#1184](https://github.com/aliyun/terraform-provider-alicloud/issues/1184)) ## 1.45.0 (May 29, 2019) FEATURES: -- **New Resource:** `alicloud_network_acl_entries` ([#1208](https://github.com/aliyun/terraform-provider-alicloud/issues/1208)) +- **New Resource:** `alicloud_network_acl_entries`([#1208](https://github.com/aliyun/terraform-provider-alicloud/issues/1208)) IMPROVEMENTS: -- update changeLog ([#1224](https://github.com/aliyun/terraform-provider-alicloud/issues/1224)) -- support oss object versioning ([#1121](https://github.com/aliyun/terraform-provider-alicloud/issues/1121)) -- update instance dataSource doc ([#1215](https://github.com/aliyun/terraform-provider-alicloud/issues/1215)) -- update oss buket encryption configuration ([#1214](https://github.com/aliyun/terraform-provider-alicloud/issues/1214)) -- support oss bucket tags ([#1213](https://github.com/aliyun/terraform-provider-alicloud/issues/1213)) -- support oss bucket encryption configuration ([#1210](https://github.com/aliyun/terraform-provider-alicloud/issues/1210)) -- Improve cen_instances use common method ([#1206](https://github.com/aliyun/terraform-provider-alicloud/issues/1206)) -- support set oss bucket stroage class ([#1204](https://github.com/aliyun/terraform-provider-alicloud/issues/1204)) -- Improve ess_lifecyclehook resource use common method ([#1196](https://github.com/aliyun/terraform-provider-alicloud/issues/1196)) -- Improve ess_scalinggroup use common method ([#1192](https://github.com/aliyun/terraform-provider-alicloud/issues/1192)) -- Improve ess_scheduled_task resource use common method ([#1175](https://github.com/aliyun/terraform-provider-alicloud/issues/1175)) -- improve route_table testcase ([#1109](https://github.com/aliyun/terraform-provider-alicloud/issues/1109)) +- update changeLog([#1224](https://github.com/aliyun/terraform-provider-alicloud/issues/1224)) +- support oss object versioning([#1121](https://github.com/aliyun/terraform-provider-alicloud/issues/1121)) +- update instance dataSource doc([#1215](https://github.com/aliyun/terraform-provider-alicloud/issues/1215)) +- update oss buket encryption configuration([#1214](https://github.com/aliyun/terraform-provider-alicloud/issues/1214)) +- support oss bucket tags([#1213](https://github.com/aliyun/terraform-provider-alicloud/issues/1213)) +- support oss bucket encryption configuration([#1210](https://github.com/aliyun/terraform-provider-alicloud/issues/1210)) +- Improve cen_instances use common method([#1206](https://github.com/aliyun/terraform-provider-alicloud/issues/1206)) +- support set oss bucket stroage class([#1204](https://github.com/aliyun/terraform-provider-alicloud/issues/1204)) +- Improve ess_lifecyclehook resource use common method([#1196](https://github.com/aliyun/terraform-provider-alicloud/issues/1196)) +- Improve ess_scalinggroup use common method([#1192](https://github.com/aliyun/terraform-provider-alicloud/issues/1192)) +- Improve ess_scheduled_task resource use common method([#1175](https://github.com/aliyun/terraform-provider-alicloud/issues/1175)) +- improve route_table testcase([#1109](https://github.com/aliyun/terraform-provider-alicloud/issues/1109)) BUG FIXES: -- fix nat_gateway and network_interface testcase bug ([#1211](https://github.com/aliyun/terraform-provider-alicloud/issues/1211)) -- Fix ram testcases name length bug ([#1205](https://github.com/aliyun/terraform-provider-alicloud/issues/1205)) -- fix actiontrail bug ([#1203](https://github.com/aliyun/terraform-provider-alicloud/issues/1203)) +- fix nat_gateway and network_interface testcase bug([#1211](https://github.com/aliyun/terraform-provider-alicloud/issues/1211)) +- Fix ram testcases name length bug([#1205](https://github.com/aliyun/terraform-provider-alicloud/issues/1205)) +- fix actiontrail bug([#1203](https://github.com/aliyun/terraform-provider-alicloud/issues/1203)) ## 1.44.0 (May 24, 2019) FEATURES: -- **New Resource:** `alicloud_network_acl_attachment` ([#1187](https://github.com/aliyun/terraform-provider-alicloud/issues/1187)) - -IMPROVEMENTS: - -- update CHANGELOG.md ([#1209](https://github.com/aliyun/terraform-provider-alicloud/issues/1209)) -- Skip instance some testcases to avoid qouta limit ([#1195](https://github.com/aliyun/terraform-provider-alicloud/issues/1195)) -- Added the multi zone's instance supported ([#1194](https://github.com/aliyun/terraform-provider-alicloud/issues/1194)) -- remove multi test of ram_account_alias ([#1186](https://github.com/aliyun/terraform-provider-alicloud/issues/1186)) -- Improve ram_role_attachment resource use common method ([#1185](https://github.com/aliyun/terraform-provider-alicloud/issues/1185)) -- Improve ess_scalingrule use common method ([#1183](https://github.com/aliyun/terraform-provider-alicloud/issues/1183)) -- update mongodb instance resource document ([#1182](https://github.com/aliyun/terraform-provider-alicloud/issues/1182)) -- Improve ram_role resource use common method ([#1181](https://github.com/aliyun/terraform-provider-alicloud/issues/1181)) -- Correct the oss bucket docs ([#1178](https://github.com/aliyun/terraform-provider-alicloud/issues/1178)) -- add slb classic not support regions ([#1176](https://github.com/aliyun/terraform-provider-alicloud/issues/1176)) -- Dev versioning ([#1174](https://github.com/aliyun/terraform-provider-alicloud/issues/1174)) -- Improve ram_user_policy_attachment resource use common method ([#1172](https://github.com/aliyun/terraform-provider-alicloud/issues/1172)) -- Improve ram_role_policy_attachment resource use common method ([#1171](https://github.com/aliyun/terraform-provider-alicloud/issues/1171)) -- improve router_interface testcase ([#1170](https://github.com/aliyun/terraform-provider-alicloud/issues/1170)) -- Improve ram_policy resource use common method ([#1166](https://github.com/aliyun/terraform-provider-alicloud/issues/1166)) -- Improve slb_listeners datasource use common method ([#1165](https://github.com/aliyun/terraform-provider-alicloud/issues/1165)) -- add name attribute for forward_entry ([#1164](https://github.com/aliyun/terraform-provider-alicloud/issues/1164)) -- Improve ram_group_policy_attachment resource use common method ([#1163](https://github.com/aliyun/terraform-provider-alicloud/issues/1163)) -- Improve ram_group_membership resource use common method ([#1159](https://github.com/aliyun/terraform-provider-alicloud/issues/1159)) -- Improve ram_login_profile resource use common method ([#1158](https://github.com/aliyun/terraform-provider-alicloud/issues/1158)) -- Improve ram_group resource use common method ([#1150](https://github.com/aliyun/terraform-provider-alicloud/issues/1150)) - -BUG FIXES: - -- Fix ram_user sweeper ([#1200](https://github.com/aliyun/terraform-provider-alicloud/issues/1200)) -- Fix ram group import bug ([#1198](https://github.com/aliyun/terraform-provider-alicloud/issues/1198)) -- fix router_interface dataSource testcase bug ([#1197](https://github.com/aliyun/terraform-provider-alicloud/issues/1197)) -- fix forward_entry multi testcase bug ([#1189](https://github.com/aliyun/terraform-provider-alicloud/issues/1189)) -- fix api gw and network acl sweeper test error ([#1180](https://github.com/aliyun/terraform-provider-alicloud/issues/1180)) -- fix ram user diff bug ([#1179](https://github.com/aliyun/terraform-provider-alicloud/issues/1179)) -- Fix ram account alias multi testcase bug ([#1169](https://github.com/aliyun/terraform-provider-alicloud/issues/1169)) +- **New Resource:** `alicloud_network_acl_attachment`([#1187](https://github.com/aliyun/terraform-provider-alicloud/issues/1187)) + +IMPROVEMENTS: + +- update CHANGELOG.md([#1209](https://github.com/aliyun/terraform-provider-alicloud/issues/1209)) +- Skip instance some testcases to avoid qouta limit([#1195](https://github.com/aliyun/terraform-provider-alicloud/issues/1195)) +- Added the multi zone's instance supported([#1194](https://github.com/aliyun/terraform-provider-alicloud/issues/1194)) +- remove multi test of ram_account_alias([#1186](https://github.com/aliyun/terraform-provider-alicloud/issues/1186)) +- Improve ram_role_attachment resource use common method([#1185](https://github.com/aliyun/terraform-provider-alicloud/issues/1185)) +- Improve ess_scalingrule use common method([#1183](https://github.com/aliyun/terraform-provider-alicloud/issues/1183)) +- update mongodb instance resource document([#1182](https://github.com/aliyun/terraform-provider-alicloud/issues/1182)) +- Improve ram_role resource use common method([#1181](https://github.com/aliyun/terraform-provider-alicloud/issues/1181)) +- Correct the oss bucket docs([#1178](https://github.com/aliyun/terraform-provider-alicloud/issues/1178)) +- add slb classic not support regions([#1176](https://github.com/aliyun/terraform-provider-alicloud/issues/1176)) +- Dev versioning([#1174](https://github.com/aliyun/terraform-provider-alicloud/issues/1174)) +- Improve ram_user_policy_attachment resource use common method([#1172](https://github.com/aliyun/terraform-provider-alicloud/issues/1172)) +- Improve ram_role_policy_attachment resource use common method([#1171](https://github.com/aliyun/terraform-provider-alicloud/issues/1171)) +- improve router_interface testcase([#1170](https://github.com/aliyun/terraform-provider-alicloud/issues/1170)) +- Improve ram_policy resource use common method([#1166](https://github.com/aliyun/terraform-provider-alicloud/issues/1166)) +- Improve slb_listeners datasource use common method([#1165](https://github.com/aliyun/terraform-provider-alicloud/issues/1165)) +- add name attribute for forward_entry([#1164](https://github.com/aliyun/terraform-provider-alicloud/issues/1164)) +- Improve ram_group_policy_attachment resource use common method([#1163](https://github.com/aliyun/terraform-provider-alicloud/issues/1163)) +- Improve ram_group_membership resource use common method([#1159](https://github.com/aliyun/terraform-provider-alicloud/issues/1159)) +- Improve ram_login_profile resource use common method([#1158](https://github.com/aliyun/terraform-provider-alicloud/issues/1158)) +- Improve ram_group resource use common method([#1150](https://github.com/aliyun/terraform-provider-alicloud/issues/1150)) + +BUG FIXES: + +- Fix ram_user sweeper([#1200](https://github.com/aliyun/terraform-provider-alicloud/issues/1200)) +- Fix ram group import bug([#1198](https://github.com/aliyun/terraform-provider-alicloud/issues/1198)) +- fix router_interface dataSource testcase bug([#1197](https://github.com/aliyun/terraform-provider-alicloud/issues/1197)) +- fix forward_entry multi testcase bug([#1189](https://github.com/aliyun/terraform-provider-alicloud/issues/1189)) +- fix api gw and network acl sweeper test error([#1180](https://github.com/aliyun/terraform-provider-alicloud/issues/1180)) +- fix ram user diff bug([#1179](https://github.com/aliyun/terraform-provider-alicloud/issues/1179)) +- Fix ram account alias multi testcase bug([#1169](https://github.com/aliyun/terraform-provider-alicloud/issues/1169)) ## 1.43.0 (May 17, 2019) @@ -3760,1086 +4085,1086 @@ FEATURES: IMPROVEMENTS: -- change ecs instance instance_charge_type modifying position ([#1168](https://github.com/aliyun/terraform-provider-alicloud/issues/1168)) -- AutoScaling support multiple security groups ([#1167](https://github.com/aliyun/terraform-provider-alicloud/issues/1167)) -- Update ots and vpc document ([#1162](https://github.com/aliyun/terraform-provider-alicloud/issues/1162)) -- Improve some slb datasource ([#1155](https://github.com/aliyun/terraform-provider-alicloud/issues/1155)) -- improve forward_entry testcase ([#1152](https://github.com/aliyun/terraform-provider-alicloud/issues/1152)) -- improve slb_attachment resource use common method ([#1148](https://github.com/aliyun/terraform-provider-alicloud/issues/1148)) -- Improve ram_account_alias resource use common method ([#1147](https://github.com/aliyun/terraform-provider-alicloud/issues/1147)) -- slb instance support updating specification ([#1145](https://github.com/aliyun/terraform-provider-alicloud/issues/1145)) -- improve slb_server_group resource use common method ([#1144](https://github.com/aliyun/terraform-provider-alicloud/issues/1144)) -- add note for SLB that intl account does not support creating PrePaid instance ([#1143](https://github.com/aliyun/terraform-provider-alicloud/issues/1143)) -- Update ots document ([#1142](https://github.com/aliyun/terraform-provider-alicloud/issues/1142)) -- improve slb_server_certificate resource use common method ([#1139](https://github.com/aliyun/terraform-provider-alicloud/issues/1139)) +- change ecs instance instance_charge_type modifying position([#1168](https://github.com/aliyun/terraform-provider-alicloud/issues/1168)) +- AutoScaling support multiple security groups([#1167](https://github.com/aliyun/terraform-provider-alicloud/issues/1167)) +- Update ots and vpc document([#1162](https://github.com/aliyun/terraform-provider-alicloud/issues/1162)) +- Improve some slb datasource([#1155](https://github.com/aliyun/terraform-provider-alicloud/issues/1155)) +- improve forward_entry testcase([#1152](https://github.com/aliyun/terraform-provider-alicloud/issues/1152)) +- improve slb_attachment resource use common method([#1148](https://github.com/aliyun/terraform-provider-alicloud/issues/1148)) +- Improve ram_account_alias resource use common method ([#1147](https://github.com/aliyun/terraform-provider-alicloud/issues/1147)) +- slb instance support updating specification([#1145](https://github.com/aliyun/terraform-provider-alicloud/issues/1145)) +- improve slb_server_group resource use common method([#1144](https://github.com/aliyun/terraform-provider-alicloud/issues/1144)) +- add note for SLB that intl account does not support creating PrePaid instance([#1143](https://github.com/aliyun/terraform-provider-alicloud/issues/1143)) +- Update ots document([#1142](https://github.com/aliyun/terraform-provider-alicloud/issues/1142)) +- improve slb_server_certificate resource use common method([#1139](https://github.com/aliyun/terraform-provider-alicloud/issues/1139)) BUG FIXES: -- Fix ram account alias notfound bug ([#1161](https://github.com/aliyun/terraform-provider-alicloud/issues/1161)) -- fix(nas): refactor testcases ([#1157](https://github.com/aliyun/terraform-provider-alicloud/issues/1157)) +- Fix ram account alias notfound bug([#1161](https://github.com/aliyun/terraform-provider-alicloud/issues/1161)) +- fix(nas): refactor testcases([#1157](https://github.com/aliyun/terraform-provider-alicloud/issues/1157)) ## 1.42.0 (May 10, 2019) FEATURES: -- **New Resource:** `alicloud_snapshot_policy` ([#989](https://github.com/aliyun/terraform-provider-alicloud/issues/989)) - -IMPROVEMENTS: - -- improve mongodb and db sweeper test ([#1138](https://github.com/aliyun/terraform-provider-alicloud/issues/1138)) -- Alicloud_ots_table: add max version offset ([#1137](https://github.com/aliyun/terraform-provider-alicloud/issues/1137)) -- update disk category ([#1135](https://github.com/aliyun/terraform-provider-alicloud/issues/1135)) -- Update Route Entry Resource ([#1134](https://github.com/aliyun/terraform-provider-alicloud/issues/1134)) -- update images testcase check condition ([#1133](https://github.com/aliyun/terraform-provider-alicloud/issues/1133)) -- bugfix: ess alarm apply recreate ([#1131](https://github.com/aliyun/terraform-provider-alicloud/issues/1131)) -- improve slb_listener resource use common method ([#1130](https://github.com/aliyun/terraform-provider-alicloud/issues/1130)) -- mongodb sharding instance add backup policy support ([#1127](https://github.com/aliyun/terraform-provider-alicloud/issues/1127)) -- Improve ram_users datasource use common method ([#1126](https://github.com/aliyun/terraform-provider-alicloud/issues/1126)) -- Improve ram_policies datasource use common method ([#1125](https://github.com/aliyun/terraform-provider-alicloud/issues/1125)) -- rds datasource test case remove connection mode check ([#1124](https://github.com/aliyun/terraform-provider-alicloud/issues/1124)) -- Add missing bracket ([#1123](https://github.com/aliyun/terraform-provider-alicloud/issues/1123)) -- add support sha256 ([#1122](https://github.com/aliyun/terraform-provider-alicloud/issues/1122)) -- Improve ram_groups datasource use common method ([#1121](https://github.com/aliyun/terraform-provider-alicloud/issues/1121)) -- Modified the sweep rules in ram_roles testcases ([#1116](https://github.com/aliyun/terraform-provider-alicloud/issues/1116)) -- improve instance testcase ([#1114](https://github.com/aliyun/terraform-provider-alicloud/issues/1114)) -- Improve slb_ca_certificate resource use common method ([#1113](https://github.com/aliyun/terraform-provider-alicloud/issues/1113)) -- Improve ram_roles datasource use common method ([#1112](https://github.com/aliyun/terraform-provider-alicloud/issues/1112)) -- Improve slb datasource use common method ([#1111](https://github.com/aliyun/terraform-provider-alicloud/issues/1111)) -- Improve ram_account_alias use common method ([#1108](https://github.com/aliyun/terraform-provider-alicloud/issues/1108)) -- update data_source_alicoud_mongo_instances and add test case ([#1107](https://github.com/aliyun/terraform-provider-alicloud/issues/1107)) -- add mongodb backup policy support, test case, document ([#1106](https://github.com/aliyun/terraform-provider-alicloud/issues/1106)) -- update route_entry and forward_entry document ([#1096](https://github.com/aliyun/terraform-provider-alicloud/issues/1096)) -- Improve slb_acl resource use common method ([#1092](https://github.com/aliyun/terraform-provider-alicloud/issues/1092)) -- improve snat_entry testcase ([#1091](https://github.com/aliyun/terraform-provider-alicloud/issues/1091)) -- Improve slb resource use common method ([#1090](https://github.com/aliyun/terraform-provider-alicloud/issues/1090)) -- improve nat_gateway testcase ([#1089](https://github.com/aliyun/terraform-provider-alicloud/issues/1089)) -- Modify table to entry ([#1088](https://github.com/aliyun/terraform-provider-alicloud/issues/1088)) -- Modified the error code returned when timeout of upgrading instance ([#1085](https://github.com/aliyun/terraform-provider-alicloud/issues/1085)) -- improve db backup policy test case ([#1083](https://github.com/aliyun/terraform-provider-alicloud/issues/1083)) - -BUG FIXES: - -- Fix scalinggroup id is not found before creating scaling configuration ([#1119](https://github.com/aliyun/terraform-provider-alicloud/issues/1119)) -- fix slb instance sets tags bug ([#1105](https://github.com/aliyun/terraform-provider-alicloud/issues/1105)) -- fix not support outputfile ([#1095](https://github.com/aliyun/terraform-provider-alicloud/issues/1095)) -- Bugfix/slb import server group ([#1093](https://github.com/aliyun/terraform-provider-alicloud/issues/1093)) -- Fix fc_triggers datasource when type is mns_topic ([#1086](https://github.com/aliyun/terraform-provider-alicloud/issues/1086)) +- **New Resource:** `alicloud_snapshot_policy`([#989](https://github.com/aliyun/terraform-provider-alicloud/issues/989)) + +IMPROVEMENTS: + +- improve mongodb and db sweeper test([#1138](https://github.com/aliyun/terraform-provider-alicloud/issues/1138)) +- Alicloud_ots_table: add max version offset([#1137](https://github.com/aliyun/terraform-provider-alicloud/issues/1137)) +- update disk category([#1135](https://github.com/aliyun/terraform-provider-alicloud/issues/1135)) +- Update Route Entry Resource([#1134](https://github.com/aliyun/terraform-provider-alicloud/issues/1134)) +- update images testcase check condition([#1133](https://github.com/aliyun/terraform-provider-alicloud/issues/1133)) +- bugfix: ess alarm apply recreate([#1131](https://github.com/aliyun/terraform-provider-alicloud/issues/1131)) +- improve slb_listener resource use common method([#1130](https://github.com/aliyun/terraform-provider-alicloud/issues/1130)) +- mongodb sharding instance add backup policy support([#1127](https://github.com/aliyun/terraform-provider-alicloud/issues/1127)) +- Improve ram_users datasource use common method([#1126](https://github.com/aliyun/terraform-provider-alicloud/issues/1126)) +- Improve ram_policies datasource use common method([#1125](https://github.com/aliyun/terraform-provider-alicloud/issues/1125)) +- rds datasource test case remove connection mode check([#1124](https://github.com/aliyun/terraform-provider-alicloud/issues/1124)) +- Add missing bracket([#1123](https://github.com/aliyun/terraform-provider-alicloud/issues/1123)) +- add support sha256([#1122](https://github.com/aliyun/terraform-provider-alicloud/issues/1122)) +- Improve ram_groups datasource use common method([#1121](https://github.com/aliyun/terraform-provider-alicloud/issues/1121)) +- Modified the sweep rules in ram_roles testcases([#1116](https://github.com/aliyun/terraform-provider-alicloud/issues/1116)) +- improve instance testcase([#1114](https://github.com/aliyun/terraform-provider-alicloud/issues/1114)) +- Improve slb_ca_certificate resource use common method([#1113](https://github.com/aliyun/terraform-provider-alicloud/issues/1113)) +- Improve ram_roles datasource use common method([#1112](https://github.com/aliyun/terraform-provider-alicloud/issues/1112)) +- Improve slb datasource use common method([#1111](https://github.com/aliyun/terraform-provider-alicloud/issues/1111)) +- Improve ram_account_alias use common method([#1108](https://github.com/aliyun/terraform-provider-alicloud/issues/1108)) +- update data_source_alicoud_mongo_instances and add test case([#1107](https://github.com/aliyun/terraform-provider-alicloud/issues/1107)) +- add mongodb backup policy support, test case, document([#1106](https://github.com/aliyun/terraform-provider-alicloud/issues/1106)) +- update route_entry and forward_entry document([#1096](https://github.com/aliyun/terraform-provider-alicloud/issues/1096)) +- Improve slb_acl resource use common method([#1092](https://github.com/aliyun/terraform-provider-alicloud/issues/1092)) +- improve snat_entry testcase([#1091](https://github.com/aliyun/terraform-provider-alicloud/issues/1091)) +- Improve slb resource use common method([#1090](https://github.com/aliyun/terraform-provider-alicloud/issues/1090)) +- improve nat_gateway testcase([#1089](https://github.com/aliyun/terraform-provider-alicloud/issues/1089)) +- Modify table to entry([#1088](https://github.com/aliyun/terraform-provider-alicloud/issues/1088)) +- Modified the error code returned when timeout of upgrading instance([#1085](https://github.com/aliyun/terraform-provider-alicloud/issues/1085)) +- improve db backup policy test case([#1083](https://github.com/aliyun/terraform-provider-alicloud/issues/1083)) + +BUG FIXES: + +- Fix scalinggroup id is not found before creating scaling configuration ([#1119](https://github.com/aliyun/terraform-provider-alicloud/issues/1119)) +- fix slb instance sets tags bug([#1105](https://github.com/aliyun/terraform-provider-alicloud/issues/1105)) +- fix not support outputfile([#1095](https://github.com/aliyun/terraform-provider-alicloud/issues/1095)) +- Bugfix/slb import server group([#1093](https://github.com/aliyun/terraform-provider-alicloud/issues/1093)) +- Fix fc_triggers datasource when type is mns_topic([#1086](https://github.com/aliyun/terraform-provider-alicloud/issues/1086)) ## 1.41.0 (April 29, 2019) IMPROVEMENTS: -- Improve fc_trigger support mns_topic modify config ([#1082](https://github.com/aliyun/terraform-provider-alicloud/issues/1082)) -- Rds sdk-update ([#1078](https://github.com/aliyun/terraform-provider-alicloud/issues/1078)) -- update some eip method name ([#1077](https://github.com/aliyun/terraform-provider-alicloud/issues/1077)) -- improve vswitch testcase ([#1076](https://github.com/aliyun/terraform-provider-alicloud/issues/1076)) -- add rand for db_instances testcase ([#1074](https://github.com/aliyun/terraform-provider-alicloud/issues/1074)) -- Improve fc_trigger support mns_topic ([#1073](https://github.com/aliyun/terraform-provider-alicloud/issues/1073)) -- remove zone_id setting in the db instance testcase ([#1069](https://github.com/aliyun/terraform-provider-alicloud/issues/1069)) -- change database default zone id to avoid some unsupported cases ([#1067](https://github.com/aliyun/terraform-provider-alicloud/issues/1067)) -- add oss bucket policy implementation ([#1066](https://github.com/aliyun/terraform-provider-alicloud/issues/1066)) -- improve vpc testcase ([#1065](https://github.com/aliyun/terraform-provider-alicloud/issues/1065)) -- Change password to Yourpassword ([#1063](https://github.com/aliyun/terraform-provider-alicloud/issues/1063)) -- Improve kvstore_instance datasource use common method ([#1062](https://github.com/aliyun/terraform-provider-alicloud/issues/1062)) -- improve eip testcase ([#1058](https://github.com/aliyun/terraform-provider-alicloud/issues/1058)) -- Improve kvstore_instance testcase use common method ([#1052](https://github.com/aliyun/terraform-provider-alicloud/issues/1052)) -- improve mongodb testcase ([#1050](https://github.com/aliyun/terraform-provider-alicloud/issues/1050)) -- update network_interface dataSource basic testcase config ([#1049](https://github.com/aliyun/terraform-provider-alicloud/issues/1049)) -- Improve kvstore_backup_policy testcase use common method ([#1044](https://github.com/aliyun/terraform-provider-alicloud/issues/1044)) +- Improve fc_trigger support mns_topic modify config([#1082](https://github.com/aliyun/terraform-provider-alicloud/issues/1082)) +- Rds sdk-update([#1078](https://github.com/aliyun/terraform-provider-alicloud/issues/1078)) +- update some eip method name([#1077](https://github.com/aliyun/terraform-provider-alicloud/issues/1077)) +- improve vswitch testcase ([#1076](https://github.com/aliyun/terraform-provider-alicloud/issues/1076)) +- add rand for db_instances testcase([#1074](https://github.com/aliyun/terraform-provider-alicloud/issues/1074)) +- Improve fc_trigger support mns_topic([#1073](https://github.com/aliyun/terraform-provider-alicloud/issues/1073)) +- remove zone_id setting in the db instance testcase([#1069](https://github.com/aliyun/terraform-provider-alicloud/issues/1069)) +- change database default zone id to avoid some unsupported cases([#1067](https://github.com/aliyun/terraform-provider-alicloud/issues/1067)) +- add oss bucket policy implementation([#1066](https://github.com/aliyun/terraform-provider-alicloud/issues/1066)) +- improve vpc testcase([#1065](https://github.com/aliyun/terraform-provider-alicloud/issues/1065)) +- Change password to Yourpassword([#1063](https://github.com/aliyun/terraform-provider-alicloud/issues/1063)) +- Improve kvstore_instance datasource use common method([#1062](https://github.com/aliyun/terraform-provider-alicloud/issues/1062)) +- improve eip testcase([#1058](https://github.com/aliyun/terraform-provider-alicloud/issues/1058)) +- Improve kvstore_instance testcase use common method([#1052](https://github.com/aliyun/terraform-provider-alicloud/issues/1052)) +- improve mongodb testcase([#1050](https://github.com/aliyun/terraform-provider-alicloud/issues/1050)) +- update network_interface dataSource basic testcase config([#1049](https://github.com/aliyun/terraform-provider-alicloud/issues/1049)) +- Improve kvstore_backup_policy testcase use common method([#1044](https://github.com/aliyun/terraform-provider-alicloud/issues/1044)) BUG FIXES: -- Fix fc_triggers datasource when type is mns_topic ([#1086](https://github.com/aliyun/terraform-provider-alicloud/issues/1086)) -- Fix kvstore_instance multi ([#1080](https://github.com/aliyun/terraform-provider-alicloud/issues/1080)) -- fix eip_association bug when snat or forward be released ([#1075](https://github.com/aliyun/terraform-provider-alicloud/issues/1075)) -- Fix db_readonly_instance instance_name ([#1071](https://github.com/aliyun/terraform-provider-alicloud/issues/1071)) -- fixed DB log backup policy bug when the log_retention_period does not input ([#1056](https://github.com/aliyun/terraform-provider-alicloud/issues/1056)) -- fix cms diff bug and improve its testcases ([#1057](https://github.com/aliyun/terraform-provider-alicloud/issues/1057)) +- Fix fc_triggers datasource when type is mns_topic([#1086](https://github.com/aliyun/terraform-provider-alicloud/issues/1086)) +- Fix kvstore_instance multi([#1080](https://github.com/aliyun/terraform-provider-alicloud/issues/1080)) +- fix eip_association bug when snat or forward be released([#1075](https://github.com/aliyun/terraform-provider-alicloud/issues/1075)) +- Fix db_readonly_instance instance_name([#1071](https://github.com/aliyun/terraform-provider-alicloud/issues/1071)) +- fixed DB log backup policy bug when the log_retention_period does not input([#1056](https://github.com/aliyun/terraform-provider-alicloud/issues/1056)) +- fix cms diff bug and improve its testcases([#1057](https://github.com/aliyun/terraform-provider-alicloud/issues/1057)) ## 1.40.0 (April 20, 2019) FEATURES: -- **New Resource:** `alicloud_mongodb_sharding_instance` ([#1017](https://github.com/aliyun/terraform-provider-alicloud/issues/1017)) -- **New Data Source:** `alicloud_snapshots` ([#988](https://github.com/aliyun/terraform-provider-alicloud/issues/988)) -- **New Resource:** `alicloud_snapshot` ([#954](https://github.com/aliyun/terraform-provider-alicloud/issues/954)) - -IMPROVEMENTS: - -- Fix db_instance can't find method DescribeDbInstance ([#1046](https://github.com/aliyun/terraform-provider-alicloud/issues/1046)) -- update network_interface testcase config ([#1045](https://github.com/aliyun/terraform-provider-alicloud/issues/1045)) -- Update Nat Gateway Resource ([#1043](https://github.com/aliyun/terraform-provider-alicloud/issues/1043)) -- improve network_interface dataSource testcase ([#1042](https://github.com/aliyun/terraform-provider-alicloud/issues/1042)) -- improve network_interface resource testcase ([#1041](https://github.com/aliyun/terraform-provider-alicloud/issues/1041)) -- Improve db_database db_instance db_readonly_instance db_readwrite_splitting_connection ([#1040](https://github.com/aliyun/terraform-provider-alicloud/issues/1040)) -- improve key_pair resource testcase ([#1039](https://github.com/aliyun/terraform-provider-alicloud/issues/1039)) -- improve key_pair dataSource testcase ([#1038](https://github.com/aliyun/terraform-provider-alicloud/issues/1038)) -- make fmt ess_scalinggroups ([#1036](https://github.com/aliyun/terraform-provider-alicloud/issues/1036)) -- improve test common method ([#1030](https://github.com/aliyun/terraform-provider-alicloud/issues/1030)) -- Update cen data source document ([#1029](https://github.com/aliyun/terraform-provider-alicloud/issues/1029)) -- fix Error method ([#1024](https://github.com/aliyun/terraform-provider-alicloud/issues/1024)) -- Update Nat Gateway Token ([#1020](https://github.com/aliyun/terraform-provider-alicloud/issues/1020)) -- update RAM website document ([#1019](https://github.com/aliyun/terraform-provider-alicloud/issues/1019)) -- add computed for resource_group_id ([#1018](https://github.com/aliyun/terraform-provider-alicloud/issues/1018)) -- remove ram validators and update website docs ([#1016](https://github.com/aliyun/terraform-provider-alicloud/issues/1016)) -- improve test common method, support 'TestMatchResourceAttr' check ([#1012](https://github.com/aliyun/terraform-provider-alicloud/issues/1012)) -- resource group support for creating new VPC ([#1010](https://github.com/aliyun/terraform-provider-alicloud/issues/1010)) -- Improve cs_cluster sweeper test removing retained resources ([#1002](https://github.com/aliyun/terraform-provider-alicloud/issues/1002)) -- improve security_group testcase use common method ([#995](https://github.com/aliyun/terraform-provider-alicloud/issues/995)) -- fix vpn change local_subnet and remote_subnet bug ([#994](https://github.com/aliyun/terraform-provider-alicloud/issues/994)) -- improve disk dataSource testcase use common method ([#990](https://github.com/aliyun/terraform-provider-alicloud/issues/990)) -- fix(nas): use new sdk ([#984](https://github.com/aliyun/terraform-provider-alicloud/issues/984)) -- Feature/slb listener redirect http to https ([#981](https://github.com/aliyun/terraform-provider-alicloud/issues/981)) -- improve disk and diskAttachment resource testcase use testCommon method ([#978](https://github.com/aliyun/terraform-provider-alicloud/issues/978)) -- improve dns dataSource testcase use testCommon method ([#971](https://github.com/aliyun/terraform-provider-alicloud/issues/971)) - -BUG FIXES: - -- Fix ess go sdk compatibility ([#1032](https://github.com/aliyun/terraform-provider-alicloud/issues/1032)) -- Update sdk to fix timeout bug ([#1015](https://github.com/aliyun/terraform-provider-alicloud/issues/1015)) -- Fix Eip And VSwitch ClientToken bug ([#1000](https://github.com/aliyun/terraform-provider-alicloud/issues/1000)) -- fix db_account diff bug and add some notes for it ([#999](https://github.com/aliyun/terraform-provider-alicloud/issues/999)) -- fix vpn gateway Period bug ([#993](https://github.com/aliyun/terraform-provider-alicloud/issues/993)) +- **New Resource:** `alicloud_mongodb_sharding_instance`([#1017](https://github.com/aliyun/terraform-provider-alicloud/issues/1017)) +- **New Data Source:** `alicloud_snapshots`([#988](https://github.com/aliyun/terraform-provider-alicloud/issues/988)) +- **New Resource:** `alicloud_snapshot`([#954](https://github.com/aliyun/terraform-provider-alicloud/issues/954)) + +IMPROVEMENTS: + +- Fix db_instance can't find method DescribeDbInstance([#1046](https://github.com/aliyun/terraform-provider-alicloud/issues/1046)) +- update network_interface testcase config([#1045](https://github.com/aliyun/terraform-provider-alicloud/issues/1045)) +- Update Nat Gateway Resource([#1043](https://github.com/aliyun/terraform-provider-alicloud/issues/1043)) +- improve network_interface dataSource testcase([#1042](https://github.com/aliyun/terraform-provider-alicloud/issues/1042)) +- improve network_interface resource testcase([#1041](https://github.com/aliyun/terraform-provider-alicloud/issues/1041)) +- Improve db_database db_instance db_readonly_instance db_readwrite_splitting_connection([#1040](https://github.com/aliyun/terraform-provider-alicloud/issues/1040)) +- improve key_pair resource testcase([#1039](https://github.com/aliyun/terraform-provider-alicloud/issues/1039)) +- improve key_pair dataSource testcase([#1038](https://github.com/aliyun/terraform-provider-alicloud/issues/1038)) +- make fmt ess_scalinggroups([#1036](https://github.com/aliyun/terraform-provider-alicloud/issues/1036)) +- improve test common method([#1030](https://github.com/aliyun/terraform-provider-alicloud/issues/1030)) +- Update cen data source document([#1029](https://github.com/aliyun/terraform-provider-alicloud/issues/1029)) +- fix Error method([#1024](https://github.com/aliyun/terraform-provider-alicloud/issues/1024)) +- Update Nat Gateway Token([#1020](https://github.com/aliyun/terraform-provider-alicloud/issues/1020)) +- update RAM website document([#1019](https://github.com/aliyun/terraform-provider-alicloud/issues/1019)) +- add computed for resource_group_id([#1018](https://github.com/aliyun/terraform-provider-alicloud/issues/1018)) +- remove ram validators and update website docs([#1016](https://github.com/aliyun/terraform-provider-alicloud/issues/1016)) +- improve test common method, support 'TestMatchResourceAttr' check([#1012](https://github.com/aliyun/terraform-provider-alicloud/issues/1012)) +- resource group support for creating new VPC([#1010](https://github.com/aliyun/terraform-provider-alicloud/issues/1010)) +- Improve cs_cluster sweeper test removing retained resources([#1002](https://github.com/aliyun/terraform-provider-alicloud/issues/1002)) +- improve security_group testcase use common method([#995](https://github.com/aliyun/terraform-provider-alicloud/issues/995)) +- fix vpn change local_subnet and remote_subnet bug([#994](https://github.com/aliyun/terraform-provider-alicloud/issues/994)) +- improve disk dataSource testcase use common method([#990](https://github.com/aliyun/terraform-provider-alicloud/issues/990)) +- fix(nas): use new sdk([#984](https://github.com/aliyun/terraform-provider-alicloud/issues/984)) +- Feature/slb listener redirect http to https([#981](https://github.com/aliyun/terraform-provider-alicloud/issues/981)) +- improve disk and diskAttachment resource testcase use testCommon method([#978](https://github.com/aliyun/terraform-provider-alicloud/issues/978)) +- improve dns dataSource testcase use testCommon method([#971](https://github.com/aliyun/terraform-provider-alicloud/issues/971)) + +BUG FIXES: + +- Fix ess go sdk compatibility([#1032](https://github.com/aliyun/terraform-provider-alicloud/issues/1032)) +- Update sdk to fix timeout bug([#1015](https://github.com/aliyun/terraform-provider-alicloud/issues/1015)) +- Fix Eip And VSwitch ClientToken bug([#1000](https://github.com/aliyun/terraform-provider-alicloud/issues/1000)) +- fix db_account diff bug and add some notes for it([#999](https://github.com/aliyun/terraform-provider-alicloud/issues/999)) +- fix vpn gateway Period bug([#993](https://github.com/aliyun/terraform-provider-alicloud/issues/993)) ## 1.39.0 (April 09, 2019) FEATURES: -- **New Data Source:** `alicloud_ots_instance_attachments` ([#986](https://github.com/aliyun/terraform-provider-alicloud/issues/986)) -- **New Data Source:** `alicloud_ssl_vpc_servers` ([#985](https://github.com/aliyun/terraform-provider-alicloud/issues/985)) -- **New Data Source:** `alicloud_ssl_vpn_client_certs` ([#986](https://github.com/aliyun/terraform-provider-alicloud/issues/986)) -- **New Data Source:** `alicloud_ess_scaling_rules` ([#976](https://github.com/aliyun/terraform-provider-alicloud/issues/976)) -- **New Data Source:** `alicloud_ess_scaling_configurations` ([#974](https://github.com/aliyun/terraform-provider-alicloud/issues/974)) -- **New Data Source:** `alicloud_ess_scaling_groups` ([#973](https://github.com/aliyun/terraform-provider-alicloud/issues/973)) -- **New Data Source:** `alicloud_ddoscoo_instances` ([#967](https://github.com/aliyun/terraform-provider-alicloud/issues/967)) -- **New Data Source:** `alicloud_ots_instances` ([#946](https://github.com/aliyun/terraform-provider-alicloud/issues/946)) +- **New Data Source:** `alicloud_ots_instance_attachments`([#986](https://github.com/aliyun/terraform-provider-alicloud/issues/986)) +- **New Data Source:** `alicloud_ssl_vpc_servers`([#985](https://github.com/aliyun/terraform-provider-alicloud/issues/985)) +- **New Data Source:** `alicloud_ssl_vpn_client_certs`([#986](https://github.com/aliyun/terraform-provider-alicloud/issues/986)) +- **New Data Source:** `alicloud_ess_scaling_rules`([#976](https://github.com/aliyun/terraform-provider-alicloud/issues/976)) +- **New Data Source:** `alicloud_ess_scaling_configurations`([#974](https://github.com/aliyun/terraform-provider-alicloud/issues/974)) +- **New Data Source:** `alicloud_ess_scaling_groups`([#973](https://github.com/aliyun/terraform-provider-alicloud/issues/973)) +- **New Data Source:** `alicloud_ddoscoo_instances`([#967](https://github.com/aliyun/terraform-provider-alicloud/issues/967)) +- **New Data Source:** `alicloud_ots_instances`([#946](https://github.com/aliyun/terraform-provider-alicloud/issues/946)) IMPROVEMENTS: -- Improve instance type updating testcase ([#979](https://github.com/aliyun/terraform-provider-alicloud/issues/979)) -- support changing prepaid instance type ([#977](https://github.com/aliyun/terraform-provider-alicloud/issues/977)) -- Improve db_account db_account_privilege db_backup_policy db_connection ([#963](https://github.com/aliyun/terraform-provider-alicloud/issues/963)) +- Improve instance type updating testcase([#979](https://github.com/aliyun/terraform-provider-alicloud/issues/979)) +- support changing prepaid instance type([#977](https://github.com/aliyun/terraform-provider-alicloud/issues/977)) +- Improve db_account db_account_privilege db_backup_policy db_connection([#963](https://github.com/aliyun/terraform-provider-alicloud/issues/963)) BUG FIXES: -- Fix Nat GW ClientToken bug ([#983](https://github.com/aliyun/terraform-provider-alicloud/issues/983)) -- Fix print error bug after DescribeDBInstanceById ([#980](https://github.com/aliyun/terraform-provider-alicloud/issues/980)) +- Fix Nat GW ClientToken bug([#983](https://github.com/aliyun/terraform-provider-alicloud/issues/983)) +- Fix print error bug after DescribeDBInstanceById([#980](https://github.com/aliyun/terraform-provider-alicloud/issues/980)) ## 1.38.0 (April 03, 2019) FEATURES: -- **New Resource:** `alicloud_ddoscoo_instance` ([#952](https://github.com/aliyun/terraform-provider-alicloud/issues/952)) +- **New Resource:** `alicloud_ddoscoo_instance`([#952](https://github.com/aliyun/terraform-provider-alicloud/issues/952)) IMPROVEMENTS: -- update dns_group describe method ([#966](https://github.com/aliyun/terraform-provider-alicloud/issues/966)) -- update ram_policy resource testcase ([#964](https://github.com/aliyun/terraform-provider-alicloud/issues/964)) -- improve ram_policy resource update method ([#960](https://github.com/aliyun/terraform-provider-alicloud/issues/960)) -- ecs prepaid instance supports changing instance type ([#949](https://github.com/aliyun/terraform-provider-alicloud/issues/949)) -- update mongodb instance test case for multiAZ ([#947](https://github.com/aliyun/terraform-provider-alicloud/issues/947)) -- add test common method ,improve dns resource testcase ([#927](https://github.com/aliyun/terraform-provider-alicloud/issues/927)) +- update dns_group describe method([#966](https://github.com/aliyun/terraform-provider-alicloud/issues/966)) +- update ram_policy resource testcase([#964](https://github.com/aliyun/terraform-provider-alicloud/issues/964)) +- improve ram_policy resource update method([#960](https://github.com/aliyun/terraform-provider-alicloud/issues/960)) +- ecs prepaid instance supports changing instance type([#949](https://github.com/aliyun/terraform-provider-alicloud/issues/949)) +- update mongodb instance test case for multiAZ([#947](https://github.com/aliyun/terraform-provider-alicloud/issues/947)) +- add test common method ,improve dns resource testcase([#927](https://github.com/aliyun/terraform-provider-alicloud/issues/927)) BUG FIXES: -- Fix drds instance sweeper test bug ([#955](https://github.com/aliyun/terraform-provider-alicloud/issues/955)) +- Fix drds instance sweeper test bug([#955](https://github.com/aliyun/terraform-provider-alicloud/issues/955)) ## 1.37.0 (March 29, 2019) FEATURES: -- **New Resource:** `alicloud_mongodb_instance` ([#881](https://github.com/aliyun/terraform-provider-alicloud/issues/881)) -- **New Resource:** `alicloud_cen_instance_grant` ([#857](https://github.com/aliyun/terraform-provider-alicloud/issues/857)) -- **New Data Source:** `alicloud_forward_entries` ([#922](https://github.com/aliyun/terraform-provider-alicloud/issues/922)) -- **New Data Source:** `alicloud_snat_entries` ([#920](https://github.com/aliyun/terraform-provider-alicloud/issues/920)) -- **New Data Source:** `alicloud_nat_gateways` ([#918](https://github.com/aliyun/terraform-provider-alicloud/issues/918)) -- **New Data Source:** `alicloud_route_entries` ([#915](https://github.com/aliyun/terraform-provider-alicloud/issues/915)) - -IMPROVEMENTS: - -- Add missing outputs for datasource dns_records, security groups, vpcs and vswitches ([#943](https://github.com/aliyun/terraform-provider-alicloud/issues/943)) -- datasource dns_records add a output urls ([#942](https://github.com/aliyun/terraform-provider-alicloud/issues/942)) -- modify stop instance timeout to 5min to avoid the exception timeout ([#941](https://github.com/aliyun/terraform-provider-alicloud/issues/941)) -- datasource security_groups, vpcs and vswitches support outputs ids and names ([#939](https://github.com/aliyun/terraform-provider-alicloud/issues/939)) -- Improve all of parameter's tag, like 'Required', 'ForceNew' ([#938](https://github.com/aliyun/terraform-provider-alicloud/issues/938)) -- Improve pvtz_zone_record WrapError ([#934](https://github.com/aliyun/terraform-provider-alicloud/issues/934)) -- Improve pvtz_zone_record create record ([#933](https://github.com/aliyun/terraform-provider-alicloud/issues/933)) -- testSweepCRNamespace skip not supported region ([#932](https://github.com/aliyun/terraform-provider-alicloud/issues/932)) -- refine retry logic of resource tablestore to avoid the exception timeout ([#931](https://github.com/aliyun/terraform-provider-alicloud/issues/931)) -- Improve pvtz resource datasource testcases ([#928](https://github.com/aliyun/terraform-provider-alicloud/issues/928)) -- cr_repos fix docs link error ([#926](https://github.com/aliyun/terraform-provider-alicloud/issues/926)) -- resource DB instance supports setting security group ([#925](https://github.com/aliyun/terraform-provider-alicloud/issues/925)) -- resource DB instance supports setting monitor period ([#924](https://github.com/aliyun/terraform-provider-alicloud/issues/924)) -- Skipping bandwidth package related test for international site account ([#917](https://github.com/aliyun/terraform-provider-alicloud/issues/917)) -- Resource snat entry update id and support import ([#916](https://github.com/aliyun/terraform-provider-alicloud/issues/916)) -- add docs about prerequisites for cs and cr ([#914](https://github.com/aliyun/terraform-provider-alicloud/issues/914)) -- add new schema environment_variables to fc_function.html.markdown ([#913](https://github.com/aliyun/terraform-provider-alicloud/issues/913)) -- add skipping check for datasource route tables' testcases ([#911](https://github.com/aliyun/terraform-provider-alicloud/issues/911)) -- modify ram_user id by userId ([#900](https://github.com/aliyun/terraform-provider-alicloud/issues/900)) - -BUG FIXES: - -- Deprecate bucket `logging_isenable` and fix referer_config diff bug ([#937](https://github.com/aliyun/terraform-provider-alicloud/issues/937)) -- fix ram user and group sweeper test bug ([#929](https://github.com/aliyun/terraform-provider-alicloud/issues/929)) -- Fix the parameter bug when actiontrail is created ([#921](https://github.com/aliyun/terraform-provider-alicloud/issues/921)) -- fix default pod_cidr in k8s docs ([#919](https://github.com/aliyun/terraform-provider-alicloud/issues/919)) +- **New Resource:** `alicloud_mongodb_instance`([#881](https://github.com/aliyun/terraform-provider-alicloud/issues/881)) +- **New Resource:** `alicloud_cen_instance_grant`([#857](https://github.com/aliyun/terraform-provider-alicloud/issues/857)) +- **New Data Source:** `alicloud_forward_entries`([#922](https://github.com/aliyun/terraform-provider-alicloud/issues/922)) +- **New Data Source:** `alicloud_snat_entries`([#920](https://github.com/aliyun/terraform-provider-alicloud/issues/920)) +- **New Data Source:** `alicloud_nat_gateways`([#918](https://github.com/aliyun/terraform-provider-alicloud/issues/918)) +- **New Data Source:** `alicloud_route_entries`([#915](https://github.com/aliyun/terraform-provider-alicloud/issues/915)) + +IMPROVEMENTS: + +- Add missing outputs for datasource dns_records, security groups, vpcs and vswitches([#943](https://github.com/aliyun/terraform-provider-alicloud/issues/943)) +- datasource dns_records add a output urls([#942](https://github.com/aliyun/terraform-provider-alicloud/issues/942)) +- modify stop instance timeout to 5min to avoid the exception timeout([#941](https://github.com/aliyun/terraform-provider-alicloud/issues/941)) +- datasource security_groups, vpcs and vswitches support outputs ids and names([#939](https://github.com/aliyun/terraform-provider-alicloud/issues/939)) +- Improve all of parameter's tag, like 'Required', 'ForceNew'([#938](https://github.com/aliyun/terraform-provider-alicloud/issues/938)) +- Improve pvtz_zone_record WrapError([#934](https://github.com/aliyun/terraform-provider-alicloud/issues/934)) +- Improve pvtz_zone_record create record([#933](https://github.com/aliyun/terraform-provider-alicloud/issues/933)) +- testSweepCRNamespace skip not supported region ([#932](https://github.com/aliyun/terraform-provider-alicloud/issues/932)) +- refine retry logic of resource tablestore to avoid the exception timeout([#931](https://github.com/aliyun/terraform-provider-alicloud/issues/931)) +- Improve pvtz resource datasource testcases([#928](https://github.com/aliyun/terraform-provider-alicloud/issues/928)) +- cr_repos fix docs link error([#926](https://github.com/aliyun/terraform-provider-alicloud/issues/926)) +- resource DB instance supports setting security group([#925](https://github.com/aliyun/terraform-provider-alicloud/issues/925)) +- resource DB instance supports setting monitor period([#924](https://github.com/aliyun/terraform-provider-alicloud/issues/924)) +- Skipping bandwidth package related test for international site account([#917](https://github.com/aliyun/terraform-provider-alicloud/issues/917)) +- Resource snat entry update id and support import([#916](https://github.com/aliyun/terraform-provider-alicloud/issues/916)) +- add docs about prerequisites for cs and cr ([#914](https://github.com/aliyun/terraform-provider-alicloud/issues/914)) +- add new schema environment_variables to fc_function.html.markdown([#913](https://github.com/aliyun/terraform-provider-alicloud/issues/913)) +- add skipping check for datasource route tables' testcases([#911](https://github.com/aliyun/terraform-provider-alicloud/issues/911)) +- modify ram_user id by userId([#900](https://github.com/aliyun/terraform-provider-alicloud/issues/900)) + +BUG FIXES: + +- Deprecate bucket `logging_isenable` and fix referer_config diff bug([#937](https://github.com/aliyun/terraform-provider-alicloud/issues/937)) +- fix ram user and group sweeper test bug([#929](https://github.com/aliyun/terraform-provider-alicloud/issues/929)) +- Fix the parameter bug when actiontrail is created([#921](https://github.com/aliyun/terraform-provider-alicloud/issues/921)) +- fix default pod_cidr in k8s docs([#919](https://github.com/aliyun/terraform-provider-alicloud/issues/919)) ## 1.36.0 (March 24, 2019) FEATURES: -- **New Resource:** `alicloud_cas_certificate` ([#875](https://github.com/aliyun/terraform-provider-alicloud/issues/875)) -- **New Data Source:** `alicloud_route_tables` ([#905](https://github.com/aliyun/terraform-provider-alicloud/issues/905)) -- **New Data Source:** `alicloud_common_bandwidth_packages` ([#897](https://github.com/aliyun/terraform-provider-alicloud/issues/897)) -- **New Data Source:** `alicloud_actiontrails` ([#891](https://github.com/aliyun/terraform-provider-alicloud/issues/891)) -- **New Data Source:** `alicloud_cas_certificates` ([#875](https://github.com/aliyun/terraform-provider-alicloud/issues/875)) +- **New Resource:** `alicloud_cas_certificate`([#875](https://github.com/aliyun/terraform-provider-alicloud/issues/875)) +- **New Data Source:** `alicloud_route_tables`([#905](https://github.com/aliyun/terraform-provider-alicloud/issues/905)) +- **New Data Source:** `alicloud_common_bandwidth_packages`([#897](https://github.com/aliyun/terraform-provider-alicloud/issues/897)) +- **New Data Source:** `alicloud_actiontrails`([#891](https://github.com/aliyun/terraform-provider-alicloud/issues/891)) +- **New Data Source:** `alicloud_cas_certificates`([#875](https://github.com/aliyun/terraform-provider-alicloud/issues/875)) IMPROVEMENTS: -- Add wait method for disk and disk attachment ([#910](https://github.com/aliyun/terraform-provider-alicloud/issues/910)) -- Add wait method for cen instance ([#909](https://github.com/aliyun/terraform-provider-alicloud/issues/909)) -- add dns and dns_group test sweeper ([#906](https://github.com/aliyun/terraform-provider-alicloud/issues/906)) -- fc_function add new schema environment_variables ([#904](https://github.com/aliyun/terraform-provider-alicloud/issues/904)) -- support kv-store auto renewal option documentation ([#902](https://github.com/aliyun/terraform-provider-alicloud/issues/902)) -- Sort slb slave zone ids to avoid needless error ([#898](https://github.com/aliyun/terraform-provider-alicloud/issues/898)) -- add region skip for container registry testcase ([#896](https://github.com/aliyun/terraform-provider-alicloud/issues/896)) -- Add `enable_details` for alicloud_zones and support retrieving slb slave zones ([#893](https://github.com/aliyun/terraform-provider-alicloud/issues/893)) -- Slb support setting master and slave zone id ([#887](https://github.com/aliyun/terraform-provider-alicloud/issues/887)) -- improve disk and attachment resource testcase ([#886](https://github.com/aliyun/terraform-provider-alicloud/issues/886)) -- Remove ModifySecurityGroupPolicy waiting and backend has fixed it ([#883](https://github.com/aliyun/terraform-provider-alicloud/issues/883)) -- Improve cas resource and datasource testcases ([#882](https://github.com/aliyun/terraform-provider-alicloud/issues/882)) -- Make db_connection resource code more standard ([#879](https://github.com/aliyun/terraform-provider-alicloud/issues/879)) +- Add wait method for disk and disk attachment([#910](https://github.com/aliyun/terraform-provider-alicloud/issues/910)) +- Add wait method for cen instance([#909](https://github.com/aliyun/terraform-provider-alicloud/issues/909)) +- add dns and dns_group test sweeper([#906](https://github.com/aliyun/terraform-provider-alicloud/issues/906)) +- fc_function add new schema environment_variables([#904](https://github.com/aliyun/terraform-provider-alicloud/issues/904)) +- support kv-store auto renewal option documentation([#902](https://github.com/aliyun/terraform-provider-alicloud/issues/902)) +- Sort slb slave zone ids to avoid needless error([#898](https://github.com/aliyun/terraform-provider-alicloud/issues/898)) +- add region skip for container registry testcase([#896](https://github.com/aliyun/terraform-provider-alicloud/issues/896)) +- Add `enable_details` for alicloud_zones and support retrieving slb slave zones([#893](https://github.com/aliyun/terraform-provider-alicloud/issues/893)) +- Slb support setting master and slave zone id([#887](https://github.com/aliyun/terraform-provider-alicloud/issues/887)) +- improve disk and attachment resource testcase([#886](https://github.com/aliyun/terraform-provider-alicloud/issues/886)) +- Remove ModifySecurityGroupPolicy waiting and backend has fixed it([#883](https://github.com/aliyun/terraform-provider-alicloud/issues/883)) +- Improve cas resource and datasource testcases([#882](https://github.com/aliyun/terraform-provider-alicloud/issues/882)) +- Make db_connection resource code more standard([#879](https://github.com/aliyun/terraform-provider-alicloud/issues/879)) BUG FIXES: -- Fix cen instance deleting bug ([#908](https://github.com/aliyun/terraform-provider-alicloud/issues/908)) -- Fix cen create bug when one resion is China ([#903](https://github.com/aliyun/terraform-provider-alicloud/issues/903)) -- fix cas_certificate sweeper test bug ([#899](https://github.com/aliyun/terraform-provider-alicloud/issues/899)) -- Modify ram group's name's ForceNew to true ([#895](https://github.com/aliyun/terraform-provider-alicloud/issues/895)) -- fix mount target deletion bugs ([#892](https://github.com/aliyun/terraform-provider-alicloud/issues/892)) -- Fix link to BatchSetCdnDomainConfig document documentation ([#885](https://github.com/aliyun/terraform-provider-alicloud/issues/885)) -- fix rds instance parameter test case issue ([#880](https://github.com/aliyun/terraform-provider-alicloud/issues/880)) +- Fix cen instance deleting bug([#908](https://github.com/aliyun/terraform-provider-alicloud/issues/908)) +- Fix cen create bug when one resion is China([#903](https://github.com/aliyun/terraform-provider-alicloud/issues/903)) +- fix cas_certificate sweeper test bug([#899](https://github.com/aliyun/terraform-provider-alicloud/issues/899)) +- Modify ram group's name's ForceNew to true([#895](https://github.com/aliyun/terraform-provider-alicloud/issues/895)) +- fix mount target deletion bugs([#892](https://github.com/aliyun/terraform-provider-alicloud/issues/892)) +- Fix link to BatchSetCdnDomainConfig document documentation([#885](https://github.com/aliyun/terraform-provider-alicloud/issues/885)) +- fix rds instance parameter test case issue([#880](https://github.com/aliyun/terraform-provider-alicloud/issues/880)) ## 1.35.0 (March 18, 2019) FEATURES: -- **New Resource:** `alicloud_cr_repo` ([#862](https://github.com/aliyun/terraform-provider-alicloud/issues/862)) -- **New Resource:** `alicloud_actiontrail` ([#858](https://github.com/aliyun/terraform-provider-alicloud/issues/858)) -- **New Data Source:** `alicloud_cr_repos` ([#868](https://github.com/aliyun/terraform-provider-alicloud/issues/868)) -- **New Data Source:** `alicloud_cr_namespaces` ([#867](https://github.com/aliyun/terraform-provider-alicloud/issues/867)) -- **New Data Source:** `alicloud_nas_file_systems` ([#864](https://github.com/aliyun/terraform-provider-alicloud/issues/864)) -- **New Data Source:** `alicloud_nas_mount_targets` ([#864](https://github.com/aliyun/terraform-provider-alicloud/issues/864)) -- **New Data Source:** `alicloud_drds_instances` ([#861](https://github.com/aliyun/terraform-provider-alicloud/issues/861)) -- **New Data Source:** `alicloud_nas_access_rules` ([#860](https://github.com/aliyun/terraform-provider-alicloud/issues/860)) -- **New Data Source:** `alicloud_nas_access_groups` ([#856](https://github.com/aliyun/terraform-provider-alicloud/issues/856)) +- **New Resource:** `alicloud_cr_repo`([#862](https://github.com/aliyun/terraform-provider-alicloud/issues/862)) +- **New Resource:** `alicloud_actiontrail`([#858](https://github.com/aliyun/terraform-provider-alicloud/issues/858)) +- **New Data Source:** `alicloud_cr_repos`([#868](https://github.com/aliyun/terraform-provider-alicloud/issues/868)) +- **New Data Source:** `alicloud_cr_namespaces`([#867](https://github.com/aliyun/terraform-provider-alicloud/issues/867)) +- **New Data Source:** `alicloud_nas_file_systems`([#864](https://github.com/aliyun/terraform-provider-alicloud/issues/864)) +- **New Data Source:** `alicloud_nas_mount_targets`([#864](https://github.com/aliyun/terraform-provider-alicloud/issues/864)) +- **New Data Source:** `alicloud_drds_instances`([#861](https://github.com/aliyun/terraform-provider-alicloud/issues/861)) +- **New Data Source:** `alicloud_nas_access_rules`([#860](https://github.com/aliyun/terraform-provider-alicloud/issues/860)) +- **New Data Source:** `alicloud_nas_access_groups`([#856](https://github.com/aliyun/terraform-provider-alicloud/issues/856)) IMPROVEMENTS: -- Improve actiontrail docs ([#878](https://github.com/aliyun/terraform-provider-alicloud/issues/878)) -- Add account pre-check for common bandwidth package to avoid known error ([#877](https://github.com/aliyun/terraform-provider-alicloud/issues/877)) -- Make dns resource code more standard ([#876](https://github.com/aliyun/terraform-provider-alicloud/issues/876)) -- Improve dns resources' testcases ([#859](https://github.com/aliyun/terraform-provider-alicloud/issues/859)) -- Add client token for vpn services ([#855](https://github.com/aliyun/terraform-provider-alicloud/issues/855)) -- reback the lossing datasource ([#866](https://github.com/aliyun/terraform-provider-alicloud/issues/866)) -- Improve drds instances testcases documentation ([#863](https://github.com/aliyun/terraform-provider-alicloud/issues/863)) -- Update sdk for vpc package ([#854](https://github.com/aliyun/terraform-provider-alicloud/issues/854)) +- Improve actiontrail docs([#878](https://github.com/aliyun/terraform-provider-alicloud/issues/878)) +- Add account pre-check for common bandwidth package to avoid known error([#877](https://github.com/aliyun/terraform-provider-alicloud/issues/877)) +- Make dns resource code more standard([#876](https://github.com/aliyun/terraform-provider-alicloud/issues/876)) +- Improve dns resources' testcases([#859](https://github.com/aliyun/terraform-provider-alicloud/issues/859)) +- Add client token for vpn services([#855](https://github.com/aliyun/terraform-provider-alicloud/issues/855)) +- reback the lossing datasource([#866](https://github.com/aliyun/terraform-provider-alicloud/issues/866)) +- Improve drds instances testcases documentation([#863](https://github.com/aliyun/terraform-provider-alicloud/issues/863)) +- Update sdk for vpc package([#854](https://github.com/aliyun/terraform-provider-alicloud/issues/854)) BUG FIXES: -- Add waiting method to ensure the security group status is ok ([#873](https://github.com/aliyun/terraform-provider-alicloud/issues/873)) -- Fix nas mount target notfound bug and improve nas datasource's testcases ([#872](https://github.com/aliyun/terraform-provider-alicloud/issues/872)) -- Fix dns notfound bug ([#871](https://github.com/aliyun/terraform-provider-alicloud/issues/871)) -- fix creating slb bug ([#870](https://github.com/aliyun/terraform-provider-alicloud/issues/870)) -- fix elastic search sweeper test bug ([#865](https://github.com/aliyun/terraform-provider-alicloud/issues/865)) +- Add waiting method to ensure the security group status is ok([#873](https://github.com/aliyun/terraform-provider-alicloud/issues/873)) +- Fix nas mount target notfound bug and improve nas datasource's testcases([#872](https://github.com/aliyun/terraform-provider-alicloud/issues/872)) +- Fix dns notfound bug([#871](https://github.com/aliyun/terraform-provider-alicloud/issues/871)) +- fix creating slb bug([#870](https://github.com/aliyun/terraform-provider-alicloud/issues/870)) +- fix elastic search sweeper test bug([#865](https://github.com/aliyun/terraform-provider-alicloud/issues/865)) ## 1.34.0 (March 13, 2019) FEATURES: -- **New Resource:** `alicloud_nas_mount_target` ([#835](https://github.com/aliyun/terraform-provider-alicloud/issues/835)) -- **New Resource:** `alicloud_cdn_domain_config` ([#829](https://github.com/aliyun/terraform-provider-alicloud/issues/829)) -- **New Resource:** `alicloud_cr_namespace` ([#827](https://github.com/aliyun/terraform-provider-alicloud/issues/827)) -- **New Resource:** `alicloud_nas_access_rule` ([#827](https://github.com/aliyun/terraform-provider-alicloud/issues/827)) -- **New Resource:** `alicloud_cdn_domain_new` ([#787](https://github.com/aliyun/terraform-provider-alicloud/issues/787)) -- **New Data Source:** `alicloud_cs_kubernetes_clusters` ([#818](https://github.com/aliyun/terraform-provider-alicloud/issues/818)) - -IMPROVEMENTS: - -- Add drds instance docs ([#853](https://github.com/aliyun/terraform-provider-alicloud/issues/853)) -- Improve resource mount target testcases ([#852](https://github.com/aliyun/terraform-provider-alicloud/issues/852)) -- Add using note for spot instance ([#851](https://github.com/aliyun/terraform-provider-alicloud/issues/851)) -- Resource alicloud_slb supports PrePaid ([#850](https://github.com/aliyun/terraform-provider-alicloud/issues/850)) -- Add ssl_vpn_server and ssl_vpn_client_cert sweeper test ([#843](https://github.com/aliyun/terraform-provider-alicloud/issues/843)) -- Improve vpn_gateway testcases and some sweeper test ([#842](https://github.com/aliyun/terraform-provider-alicloud/issues/842)) -- Improve dns datasource testcases ([#841](https://github.com/aliyun/terraform-provider-alicloud/issues/841)) -- Improve Eip and mns testcase ([#840](https://github.com/aliyun/terraform-provider-alicloud/issues/840)) -- Add version notes in some docs ([#838](https://github.com/aliyun/terraform-provider-alicloud/issues/838)) -- RDS resource supports auto-renewal ([#836](https://github.com/aliyun/terraform-provider-alicloud/issues/836)) -- Deprecate the resource alicloud_cdn_domain ([#830](https://github.com/aliyun/terraform-provider-alicloud/issues/830)) - -BUG FIXES: - -- Fix deleting dns record InternalError bug ([#848](https://github.com/aliyun/terraform-provider-alicloud/issues/848)) -- fix log store and config sweeper test deleting bug ([#847](https://github.com/aliyun/terraform-provider-alicloud/issues/847)) -- Fix drds resource no supporting client token ([#846](https://github.com/aliyun/terraform-provider-alicloud/issues/846)) -- fix kms sweeper test deleting bug ([#844](https://github.com/aliyun/terraform-provider-alicloud/issues/844)) -- fix kubernetes data resource ut and import error ([#839](https://github.com/aliyun/terraform-provider-alicloud/issues/839)) -- Bugfix: destroying alicloud_ess_attachment timeout ([#834](https://github.com/aliyun/terraform-provider-alicloud/issues/834)) -- fix cdn service func WaitForCdnDomain ([#833](https://github.com/aliyun/terraform-provider-alicloud/issues/833)) -- deal with the error message in cen route entry ([#831](https://github.com/aliyun/terraform-provider-alicloud/issues/831)) -- change bool to *bool in parameters of k8s clusters ([#828](https://github.com/aliyun/terraform-provider-alicloud/issues/828)) -- Fix nas docs bug ([#825](https://github.com/aliyun/terraform-provider-alicloud/issues/825)) -- create vpn gateway got "UnnecessarySslConnection" error when enable_ssl is false ([#822](https://github.com/aliyun/terraform-provider-alicloud/issues/822)) +- **New Resource:** `alicloud_nas_mount_target`([#835](https://github.com/aliyun/terraform-provider-alicloud/issues/835)) +- **New Resource:** `alicloud_cdn_domain_config`([#829](https://github.com/aliyun/terraform-provider-alicloud/issues/829)) +- **New Resource:** `alicloud_cr_namespace`([#827](https://github.com/aliyun/terraform-provider-alicloud/issues/827)) +- **New Resource:** `alicloud_nas_access_rule`([#827](https://github.com/aliyun/terraform-provider-alicloud/issues/827)) +- **New Resource:** `alicloud_cdn_domain_new`([#787](https://github.com/aliyun/terraform-provider-alicloud/issues/787)) +- **New Data Source:** `alicloud_cs_kubernetes_clusters`([#818](https://github.com/aliyun/terraform-provider-alicloud/issues/818)) + +IMPROVEMENTS: + +- Add drds instance docs([#853](https://github.com/aliyun/terraform-provider-alicloud/issues/853)) +- Improve resource mount target testcases([#852](https://github.com/aliyun/terraform-provider-alicloud/issues/852)) +- Add using note for spot instance([#851](https://github.com/aliyun/terraform-provider-alicloud/issues/851)) +- Resource alicloud_slb supports PrePaid([#850](https://github.com/aliyun/terraform-provider-alicloud/issues/850)) +- Add ssl_vpn_server and ssl_vpn_client_cert sweeper test([#843](https://github.com/aliyun/terraform-provider-alicloud/issues/843)) +- Improve vpn_gateway testcases and some sweeper test([#842](https://github.com/aliyun/terraform-provider-alicloud/issues/842)) +- Improve dns datasource testcases([#841](https://github.com/aliyun/terraform-provider-alicloud/issues/841)) +- Improve Eip and mns testcase([#840](https://github.com/aliyun/terraform-provider-alicloud/issues/840)) +- Add version notes in some docs([#838](https://github.com/aliyun/terraform-provider-alicloud/issues/838)) +- RDS resource supports auto-renewal([#836](https://github.com/aliyun/terraform-provider-alicloud/issues/836)) +- Deprecate the resource alicloud_cdn_domain([#830](https://github.com/aliyun/terraform-provider-alicloud/issues/830)) + +BUG FIXES: + +- Fix deleting dns record InternalError bug([#848](https://github.com/aliyun/terraform-provider-alicloud/issues/848)) +- fix log store and config sweeper test deleting bug([#847](https://github.com/aliyun/terraform-provider-alicloud/issues/847)) +- Fix drds resource no supporting client token([#846](https://github.com/aliyun/terraform-provider-alicloud/issues/846)) +- fix kms sweeper test deleting bug([#844](https://github.com/aliyun/terraform-provider-alicloud/issues/844)) +- fix kubernetes data resource ut and import error([#839](https://github.com/aliyun/terraform-provider-alicloud/issues/839)) +- Bugfix: destroying alicloud_ess_attachment timeout([#834](https://github.com/aliyun/terraform-provider-alicloud/issues/834)) +- fix cdn service func WaitForCdnDomain([#833](https://github.com/aliyun/terraform-provider-alicloud/issues/833)) +- deal with the error message in cen route entry([#831](https://github.com/aliyun/terraform-provider-alicloud/issues/831)) +- change bool to *bool in parameters of k8s clusters([#828](https://github.com/aliyun/terraform-provider-alicloud/issues/828)) +- Fix nas docs bug([#825](https://github.com/aliyun/terraform-provider-alicloud/issues/825)) +- create vpn gateway got "UnnecessarySslConnection" error when enable_ssl is false([#822](https://github.com/aliyun/terraform-provider-alicloud/issues/822)) ## 1.33.0 (March 05, 2019) FEATURES: -- **New Resource:** `alicloud_nas_access_group` ([#817](https://github.com/aliyun/terraform-provider-alicloud/issues/817)) -- **New Resource:** `alicloud_nas_file_system` ([#807](https://github.com/aliyun/terraform-provider-alicloud/issues/807)) +- **New Resource:** `alicloud_nas_access_group`([#817](https://github.com/aliyun/terraform-provider-alicloud/issues/817)) +- **New Resource:** `alicloud_nas_file_system`([#807](https://github.com/aliyun/terraform-provider-alicloud/issues/807)) IMPROVEMENTS: -- Improve nas resource docs ([#824](https://github.com/aliyun/terraform-provider-alicloud/issues/824)) +- Improve nas resource docs([#824](https://github.com/aliyun/terraform-provider-alicloud/issues/824)) BUG FIXES: -- bugfix: create vpn gateway got "UnnecessarySslConnection" error when enable_ssl is false ([#822](https://github.com/aliyun/terraform-provider-alicloud/issues/822)) -- fix volume_tags diff bug when running testcases ([#816](https://github.com/aliyun/terraform-provider-alicloud/issues/816)) +- bugfix: create vpn gateway got "UnnecessarySslConnection" error when enable_ssl is false([#822](https://github.com/aliyun/terraform-provider-alicloud/issues/822)) +- fix volume_tags diff bug when running testcases([#816](https://github.com/aliyun/terraform-provider-alicloud/issues/816)) ## 1.32.1 (March 03, 2019) BUG FIXES: -- fix volume_tags diff bug when setting tags by alicloud_disk ([#815](https://github.com/aliyun/terraform-provider-alicloud/issues/815)) +- fix volume_tags diff bug when setting tags by alicloud_disk([#815](https://github.com/aliyun/terraform-provider-alicloud/issues/815)) ## 1.32.0 (March 01, 2019) FEATURES: -- **New Resource:** `alicloud_db_readwrite_splitting_connection` ([#753](https://github.com/aliyun/terraform-provider-alicloud/issues/753)) +- **New Resource:** `alicloud_db_readwrite_splitting_connection`([#753](https://github.com/aliyun/terraform-provider-alicloud/issues/753)) IMPROVEMENTS: -- add slb_internet_enabled to managed kubernetes ([#806](https://github.com/aliyun/terraform-provider-alicloud/issues/806)) -- update alicloud_slb_attachment usage example ([#805](https://github.com/aliyun/terraform-provider-alicloud/issues/805)) -- rds support op tags documentation ([#797](https://github.com/aliyun/terraform-provider-alicloud/issues/797)) -- ForceNew for resource record and zone id updates for pvtz record ([#794](https://github.com/aliyun/terraform-provider-alicloud/issues/794)) -- support volume tags for ecs instance disks ([#793](https://github.com/aliyun/terraform-provider-alicloud/issues/793)) -- Improve instance and security group testcase for different account site ([#792](https://github.com/aliyun/terraform-provider-alicloud/issues/792)) -- Add account site type setting to skip unsupported test cases automatically ([#790](https://github.com/aliyun/terraform-provider-alicloud/issues/790)) -- update alibaba-cloud-sdk-go to use lastest useragent and modify errMessage when signature does not match dependencies ([#788](https://github.com/aliyun/terraform-provider-alicloud/issues/788)) -- make the timeout longer when cen attach/detach vpc ([#786](https://github.com/aliyun/terraform-provider-alicloud/issues/786)) -- cen child instance attach after vsw created ([#785](https://github.com/aliyun/terraform-provider-alicloud/issues/785)) -- kvstore support parameter configuration ([#784](https://github.com/aliyun/terraform-provider-alicloud/issues/784)) -- Modify useragent to meet the standard of sdk ([#778](https://github.com/aliyun/terraform-provider-alicloud/issues/778)) -- Modify kms client to dock with the alicloud official GO SDK ([#763](https://github.com/aliyun/terraform-provider-alicloud/issues/763)) +- add slb_internet_enabled to managed kubernetes([#806](https://github.com/aliyun/terraform-provider-alicloud/issues/806)) +- update alicloud_slb_attachment usage example([#805](https://github.com/aliyun/terraform-provider-alicloud/issues/805)) +- rds support op tags documentation([#797](https://github.com/aliyun/terraform-provider-alicloud/issues/797)) +- ForceNew for resource record and zone id updates for pvtz record([#794](https://github.com/aliyun/terraform-provider-alicloud/issues/794)) +- support volume tags for ecs instance disks([#793](https://github.com/aliyun/terraform-provider-alicloud/issues/793)) +- Improve instance and security group testcase for different account site([#792](https://github.com/aliyun/terraform-provider-alicloud/issues/792)) +- Add account site type setting to skip unsupported test cases automatically([#790](https://github.com/aliyun/terraform-provider-alicloud/issues/790)) +- update alibaba-cloud-sdk-go to use lastest useragent and modify errMessage when signature does not match dependencies([#788](https://github.com/aliyun/terraform-provider-alicloud/issues/788)) +- make the timeout longer when cen attach/detach vpc([#786](https://github.com/aliyun/terraform-provider-alicloud/issues/786)) +- cen child instance attach after vsw created([#785](https://github.com/aliyun/terraform-provider-alicloud/issues/785)) +- kvstore support parameter configuration([#784](https://github.com/aliyun/terraform-provider-alicloud/issues/784)) +- Modify useragent to meet the standard of sdk([#778](https://github.com/aliyun/terraform-provider-alicloud/issues/778)) +- Modify kms client to dock with the alicloud official GO SDK([#763](https://github.com/aliyun/terraform-provider-alicloud/issues/763)) BUG FIXES: -- fix rds readonly instance name update issue ([#812](https://github.com/aliyun/terraform-provider-alicloud/issues/812)) -- fix import managed kubernetes test ([#809](https://github.com/aliyun/terraform-provider-alicloud/issues/809)) -- fix rds parameter update issue ([#804](https://github.com/aliyun/terraform-provider-alicloud/issues/804)) -- fix first create db with tags ([#803](https://github.com/aliyun/terraform-provider-alicloud/issues/803)) -- Fix dns record ttl setting error and update bug ([#800](https://github.com/aliyun/terraform-provider-alicloud/issues/800)) -- Fix vpc return custom route table bug ([#799](https://github.com/aliyun/terraform-provider-alicloud/issues/799)) -- fix ssl vpn subnet can not pass comma separated string problem ([#780](https://github.com/aliyun/terraform-provider-alicloud/issues/780)) -- fix(whitelist) Modified whitelist returned and filter the default values ([#779](https://github.com/aliyun/terraform-provider-alicloud/issues/779)) +- fix rds readonly instance name update issue([#812](https://github.com/aliyun/terraform-provider-alicloud/issues/812)) +- fix import managed kubernetes test([#809](https://github.com/aliyun/terraform-provider-alicloud/issues/809)) +- fix rds parameter update issue([#804](https://github.com/aliyun/terraform-provider-alicloud/issues/804)) +- fix first create db with tags([#803](https://github.com/aliyun/terraform-provider-alicloud/issues/803)) +- Fix dns record ttl setting error and update bug([#800](https://github.com/aliyun/terraform-provider-alicloud/issues/800)) +- Fix vpc return custom route table bug([#799](https://github.com/aliyun/terraform-provider-alicloud/issues/799)) +- fix ssl vpn subnet can not pass comma separated string problem([#780](https://github.com/aliyun/terraform-provider-alicloud/issues/780)) +- fix(whitelist) Modified whitelist returned and filter the default values([#779](https://github.com/aliyun/terraform-provider-alicloud/issues/779)) ## 1.31.0 (February 19, 2019) FEATURES: -- **New Resource:** `alicloud_db_readonly_instance` ([#755](https://github.com/aliyun/terraform-provider-alicloud/issues/755)) +- **New Resource:** `alicloud_db_readonly_instance`([#755](https://github.com/aliyun/terraform-provider-alicloud/issues/755)) IMPROVEMENTS: -- support update deletion_protection option documentation ([#771](https://github.com/aliyun/terraform-provider-alicloud/issues/771)) -- add three az k8s cluster docs documentation ([#767](https://github.com/aliyun/terraform-provider-alicloud/issues/767)) -- kvstore support vpc_auth_mode dependencies ([#765](https://github.com/aliyun/terraform-provider-alicloud/issues/765)) -- Fix sls logtail config collection error ([#762](https://github.com/aliyun/terraform-provider-alicloud/issues/762)) -- Add attribute parameters to resource alicloud_db_instance documentation ([#761](https://github.com/aliyun/terraform-provider-alicloud/issues/761)) -- Add attribute parameters to resource alicloud_db_instance ([#761](https://github.com/aliyun/terraform-provider-alicloud/issues/761)) -- Modify dns client to dock with the alicloud official GO SDK ([#750](https://github.com/aliyun/terraform-provider-alicloud/issues/750)) +- support update deletion_protection option documentation([#771](https://github.com/aliyun/terraform-provider-alicloud/issues/771)) +- add three az k8s cluster docs documentation([#767](https://github.com/aliyun/terraform-provider-alicloud/issues/767)) +- kvstore support vpc_auth_mode dependencies([#765](https://github.com/aliyun/terraform-provider-alicloud/issues/765)) +- Fix sls logtail config collection error([#762](https://github.com/aliyun/terraform-provider-alicloud/issues/762)) +- Add attribute parameters to resource alicloud_db_instance documentation([#761](https://github.com/aliyun/terraform-provider-alicloud/issues/761)) +- Add attribute parameters to resource alicloud_db_instance([#761](https://github.com/aliyun/terraform-provider-alicloud/issues/761)) +- Modify dns client to dock with the alicloud official GO SDK([#750](https://github.com/aliyun/terraform-provider-alicloud/issues/750)) BUG FIXES: -- Fix cms_alarm updating notify_type bug ([#773](https://github.com/aliyun/terraform-provider-alicloud/issues/773)) -- fix(error) Fixed bug of error code when timeout for upgrade instance ([#770](https://github.com/aliyun/terraform-provider-alicloud/issues/770)) -- delete success if not found cen route when delete ([#753](https://github.com/aliyun/terraform-provider-alicloud/issues/753)) +- Fix cms_alarm updating notify_type bug([#773](https://github.com/aliyun/terraform-provider-alicloud/issues/773)) +- fix(error) Fixed bug of error code when timeout for upgrade instance([#770](https://github.com/aliyun/terraform-provider-alicloud/issues/770)) +- delete success if not found cen route when delete([#753](https://github.com/aliyun/terraform-provider-alicloud/issues/753)) ## 1.30.0 (February 04, 2019) FEATURES: -- **New Resource:** `alicloud_elasticsearch_instance` ([#722](https://github.com/aliyun/terraform-provider-alicloud/issues/722)) -- **New Resource:** `alicloud_logtail_attachment` ([#705](https://github.com/aliyun/terraform-provider-alicloud/issues/705)) -- **New Data Source:** `alicloud_elasticsearch_instances` ([#739](https://github.com/aliyun/terraform-provider-alicloud/issues/739)) - -IMPROVEMENTS: - -- Improve snat and forward testcases ([#749](https://github.com/aliyun/terraform-provider-alicloud/issues/749)) -- delete data source roles limit of policy_type and policy_name ([#748](https://github.com/aliyun/terraform-provider-alicloud/issues/748)) -- make k8s cluster deleting timeout longer ([#746](https://github.com/aliyun/terraform-provider-alicloud/issues/746)) -- Improve nat_gateway testcases ([#743](https://github.com/aliyun/terraform-provider-alicloud/issues/743)) -- Improve eip_association testcases ([#742](https://github.com/aliyun/terraform-provider-alicloud/issues/742)) -- Improve elasticinstnace testcases for IPV6 supported ([#741](https://github.com/aliyun/terraform-provider-alicloud/issues/741)) -- Add debug for db instance and ess group ([#740](https://github.com/aliyun/terraform-provider-alicloud/issues/740)) -- Improve api_gateway_vpc_access testcases ([#738](https://github.com/aliyun/terraform-provider-alicloud/issues/738)) -- Modify errors and ram client to dock with the GO SDK ([#735](https://github.com/aliyun/terraform-provider-alicloud/issues/735)) -- provider supports getting credential via ecs role name ([#731](https://github.com/aliyun/terraform-provider-alicloud/issues/731)) -- Update testcases for cen region domain route entries ([#729](https://github.com/aliyun/terraform-provider-alicloud/issues/729)) -- cs_kubernetes supports user_ca ([#726](https://github.com/aliyun/terraform-provider-alicloud/issues/726)) -- Wrap resource elasticserarch_instance's error ([#725](https://github.com/aliyun/terraform-provider-alicloud/issues/725)) -- Add note for kubernetes resource and improve its testcase ([#724](https://github.com/aliyun/terraform-provider-alicloud/issues/724)) -- Datasource instance_types supports filter results and used to create kuberneters ([#723](https://github.com/aliyun/terraform-provider-alicloud/issues/723)) +- **New Resource:** `alicloud_elasticsearch_instance`([#722](https://github.com/aliyun/terraform-provider-alicloud/issues/722)) +- **New Resource:** `alicloud_logtail_attachment`([#705](https://github.com/aliyun/terraform-provider-alicloud/issues/705)) +- **New Data Source:** `alicloud_elasticsearch_instances`([#739](https://github.com/aliyun/terraform-provider-alicloud/issues/739)) + +IMPROVEMENTS: + +- Improve snat and forward testcases([#749](https://github.com/aliyun/terraform-provider-alicloud/issues/749)) +- delete data source roles limit of policy_type and policy_name([#748](https://github.com/aliyun/terraform-provider-alicloud/issues/748)) +- make k8s cluster deleting timeout longer([#746](https://github.com/aliyun/terraform-provider-alicloud/issues/746)) +- Improve nat_gateway testcases([#743](https://github.com/aliyun/terraform-provider-alicloud/issues/743)) +- Improve eip_association testcases([#742](https://github.com/aliyun/terraform-provider-alicloud/issues/742)) +- Improve elasticinstnace testcases for IPV6 supported([#741](https://github.com/aliyun/terraform-provider-alicloud/issues/741)) +- Add debug for db instance and ess group([#740](https://github.com/aliyun/terraform-provider-alicloud/issues/740)) +- Improve api_gateway_vpc_access testcases([#738](https://github.com/aliyun/terraform-provider-alicloud/issues/738)) +- Modify errors and ram client to dock with the GO SDK([#735](https://github.com/aliyun/terraform-provider-alicloud/issues/735)) +- provider supports getting credential via ecs role name([#731](https://github.com/aliyun/terraform-provider-alicloud/issues/731)) +- Update testcases for cen region domain route entries([#729](https://github.com/aliyun/terraform-provider-alicloud/issues/729)) +- cs_kubernetes supports user_ca([#726](https://github.com/aliyun/terraform-provider-alicloud/issues/726)) +- Wrap resource elasticserarch_instance's error([#725](https://github.com/aliyun/terraform-provider-alicloud/issues/725)) +- Add note for kubernetes resource and improve its testcase([#724](https://github.com/aliyun/terraform-provider-alicloud/issues/724)) +- Datasource instance_types supports filter results and used to create kuberneters([#723](https://github.com/aliyun/terraform-provider-alicloud/issues/723)) - Add ids parameter extraction in data source regions,zones,dns_domain,images and instance_types([#718](https://github.com/aliyun/terraform-provider-alicloud/issues/718)) -- Improve dns group testcase ([#717](https://github.com/aliyun/terraform-provider-alicloud/issues/717)) -- Improve security group rule testcase for classic ([#716](https://github.com/aliyun/terraform-provider-alicloud/issues/716)) -- Improve security group creating request ([#715](https://github.com/aliyun/terraform-provider-alicloud/issues/715)) -- Route entry supports Nat Gateway ([#713](https://github.com/aliyun/terraform-provider-alicloud/issues/713)) -- Modify db account returning update to read after creating ([#711](https://github.com/aliyun/terraform-provider-alicloud/issues/711)) -- Improve cdn testcase ([#708](https://github.com/aliyun/terraform-provider-alicloud/issues/708)) -- Apply wraperror to security_group, security_group_rule, vswitch, disk ([#707](https://github.com/aliyun/terraform-provider-alicloud/issues/707)) -- Improve cdn testcase ([#705](https://github.com/aliyun/terraform-provider-alicloud/issues/705)) -- Add notes for datahub and improve its testcase ([#704](https://github.com/aliyun/terraform-provider-alicloud/issues/704)) -- Improve security_group_rule resource and data source testcases ([#703](https://github.com/aliyun/terraform-provider-alicloud/issues/703)) -- Improve kvstore backup policy ([#701](https://github.com/aliyun/terraform-provider-alicloud/issues/701)) -- Improve pvtz attachment testcase ([#700](https://github.com/aliyun/terraform-provider-alicloud/issues/700)) -- Modify pagesize on API DescribeVSWitches tp avoid ServiceUnavailable ([#698](https://github.com/aliyun/terraform-provider-alicloud/issues/698)) -- Improve eip resource and data source testcases ([#697](https://github.com/aliyun/terraform-provider-alicloud/issues/697)) - -BUG FIXES: - -- FIx cen route NotFoundRoute error when deleting ([#753](https://github.com/aliyun/terraform-provider-alicloud/issues/753)) -- Fix log_store InternalServerError error ([#737](https://github.com/aliyun/terraform-provider-alicloud/issues/737)) -- Fix cen region route entries testcase bug ([#734](https://github.com/aliyun/terraform-provider-alicloud/issues/734)) -- Fix ots_table StorageServerBusy bug ([#733](https://github.com/aliyun/terraform-provider-alicloud/issues/733)) -- Fix db_account setting description bug ([#732](https://github.com/aliyun/terraform-provider-alicloud/issues/732)) -- Fix Router Entry Token Bug ([#730](https://github.com/aliyun/terraform-provider-alicloud/issues/730)) -- Fix instance diff bug when updating its VPC attributes ([#728](https://github.com/aliyun/terraform-provider-alicloud/issues/728)) -- Fix snat entry IncorretSnatEntryStatus error when deleting ([#714](https://github.com/aliyun/terraform-provider-alicloud/issues/714)) -- Fix forward entry UnknownError error ([#712](https://github.com/aliyun/terraform-provider-alicloud/issues/712)) -- Fix pvtz record Zone.NotExists error when deleting record ([#710](https://github.com/aliyun/terraform-provider-alicloud/issues/710)) -- Fix modify kvstore policy not working bug ([#709](https://github.com/aliyun/terraform-provider-alicloud/issues/709)) -- reattach the key pair after update OS image ([#699](https://github.com/aliyun/terraform-provider-alicloud/issues/699)) -- Fix ServiceUnavailable error on VPC and VSW ([#695](https://github.com/aliyun/terraform-provider-alicloud/issues/695)) +- Improve dns group testcase([#717](https://github.com/aliyun/terraform-provider-alicloud/issues/717)) +- Improve security group rule testcase for classic([#716](https://github.com/aliyun/terraform-provider-alicloud/issues/716)) +- Improve security group creating request([#715](https://github.com/aliyun/terraform-provider-alicloud/issues/715)) +- Route entry supports Nat Gateway([#713](https://github.com/aliyun/terraform-provider-alicloud/issues/713)) +- Modify db account returning update to read after creating([#711](https://github.com/aliyun/terraform-provider-alicloud/issues/711)) +- Improve cdn testcase([#708](https://github.com/aliyun/terraform-provider-alicloud/issues/708)) +- Apply wraperror to security_group, security_group_rule, vswitch, disk([#707](https://github.com/aliyun/terraform-provider-alicloud/issues/707)) +- Improve cdn testcase([#705](https://github.com/aliyun/terraform-provider-alicloud/issues/705)) +- Add notes for datahub and improve its testcase([#704](https://github.com/aliyun/terraform-provider-alicloud/issues/704)) +- Improve security_group_rule resource and data source testcases([#703](https://github.com/aliyun/terraform-provider-alicloud/issues/703)) +- Improve kvstore backup policy([#701](https://github.com/aliyun/terraform-provider-alicloud/issues/701)) +- Improve pvtz attachment testcase([#700](https://github.com/aliyun/terraform-provider-alicloud/issues/700)) +- Modify pagesize on API DescribeVSWitches tp avoid ServiceUnavailable([#698](https://github.com/aliyun/terraform-provider-alicloud/issues/698)) +- Improve eip resource and data source testcases([#697](https://github.com/aliyun/terraform-provider-alicloud/issues/697)) + +BUG FIXES: + +- FIx cen route NotFoundRoute error when deleting([#753](https://github.com/aliyun/terraform-provider-alicloud/issues/753)) +- Fix log_store InternalServerError error([#737](https://github.com/aliyun/terraform-provider-alicloud/issues/737)) +- Fix cen region route entries testcase bug([#734](https://github.com/aliyun/terraform-provider-alicloud/issues/734)) +- Fix ots_table StorageServerBusy bug([#733](https://github.com/aliyun/terraform-provider-alicloud/issues/733)) +- Fix db_account setting description bug([#732](https://github.com/aliyun/terraform-provider-alicloud/issues/732)) +- Fix Router Entry Token Bug([#730](https://github.com/aliyun/terraform-provider-alicloud/issues/730)) +- Fix instance diff bug when updating its VPC attributes([#728](https://github.com/aliyun/terraform-provider-alicloud/issues/728)) +- Fix snat entry IncorretSnatEntryStatus error when deleting([#714](https://github.com/aliyun/terraform-provider-alicloud/issues/714)) +- Fix forward entry UnknownError error([#712](https://github.com/aliyun/terraform-provider-alicloud/issues/712)) +- Fix pvtz record Zone.NotExists error when deleting record([#710](https://github.com/aliyun/terraform-provider-alicloud/issues/710)) +- Fix modify kvstore policy not working bug([#709](https://github.com/aliyun/terraform-provider-alicloud/issues/709)) +- reattach the key pair after update OS image([#699](https://github.com/aliyun/terraform-provider-alicloud/issues/699)) +- Fix ServiceUnavailable error on VPC and VSW([#695](https://github.com/aliyun/terraform-provider-alicloud/issues/695)) ## 1.29.0 (January 21, 2019) FEATURES: -- **New Resource:** `alicloud_logtail_config` ([#685](https://github.com/aliyun/terraform-provider-alicloud/issues/685)) +- **New Resource:** `alicloud_logtail_config`([#685](https://github.com/aliyun/terraform-provider-alicloud/issues/685)) IMPROVEMENTS: -- Apply wraperror to ess group ([#689](https://github.com/aliyun/terraform-provider-alicloud/issues/689)) -- Add wraperror and apply it to vpc and eip ([#688](https://github.com/aliyun/terraform-provider-alicloud/issues/688)) -- Improve vswitch resource and data source testcases ([#687](https://github.com/aliyun/terraform-provider-alicloud/issues/687)) -- Improve security_group resource and data source testcases ([#686](https://github.com/aliyun/terraform-provider-alicloud/issues/686)) -- Improve vpc resource and data source testcases ([#684](https://github.com/aliyun/terraform-provider-alicloud/issues/684)) -- Modify the slb sever group testcase name ([#681](https://github.com/aliyun/terraform-provider-alicloud/issues/681)) -- Improve sweeper testcases ([#680](https://github.com/aliyun/terraform-provider-alicloud/issues/680)) -- Improve db instance's testcases ([#679](https://github.com/aliyun/terraform-provider-alicloud/issues/679)) -- Improve ecs disk's testcases ([#678](https://github.com/aliyun/terraform-provider-alicloud/issues/678)) -- Add multi_zone_ids for datasource alicloud_zones ([#677](https://github.com/aliyun/terraform-provider-alicloud/issues/677)) -- Improve redis and memcache instance testcases ([#676](https://github.com/aliyun/terraform-provider-alicloud/issues/676)) -- Improve ecs instance testcases ([#675](https://github.com/aliyun/terraform-provider-alicloud/issues/675)) +- Apply wraperror to ess group([#689](https://github.com/aliyun/terraform-provider-alicloud/issues/689)) +- Add wraperror and apply it to vpc and eip([#688](https://github.com/aliyun/terraform-provider-alicloud/issues/688)) +- Improve vswitch resource and data source testcases([#687](https://github.com/aliyun/terraform-provider-alicloud/issues/687)) +- Improve security_group resource and data source testcases([#686](https://github.com/aliyun/terraform-provider-alicloud/issues/686)) +- Improve vpc resource and data source testcases([#684](https://github.com/aliyun/terraform-provider-alicloud/issues/684)) +- Modify the slb sever group testcase name([#681](https://github.com/aliyun/terraform-provider-alicloud/issues/681)) +- Improve sweeper testcases([#680](https://github.com/aliyun/terraform-provider-alicloud/issues/680)) +- Improve db instance's testcases([#679](https://github.com/aliyun/terraform-provider-alicloud/issues/679)) +- Improve ecs disk's testcases([#678](https://github.com/aliyun/terraform-provider-alicloud/issues/678)) +- Add multi_zone_ids for datasource alicloud_zones([#677](https://github.com/aliyun/terraform-provider-alicloud/issues/677)) +- Improve redis and memcache instance testcases([#676](https://github.com/aliyun/terraform-provider-alicloud/issues/676)) +- Improve ecs instance testcases([#675](https://github.com/aliyun/terraform-provider-alicloud/issues/675)) BUG FIXES: -- Fix oss bucket docs error ([#692](https://github.com/aliyun/terraform-provider-alicloud/issues/692)) -- Fix pvtz 'Zone.VpcExists' error ([#691](https://github.com/aliyun/terraform-provider-alicloud/issues/691)) -- Fix multi-k8s testcase failed error ([#683](https://github.com/aliyun/terraform-provider-alicloud/issues/683)) -- Fix pvtz attchment Zone.NotExists error ([#682](https://github.com/aliyun/terraform-provider-alicloud/issues/682)) -- Fix deleting ram role error ([#674](https://github.com/aliyun/terraform-provider-alicloud/issues/674)) -- Fix k8s cluster worker_period_unit type error ([#672](https://github.com/aliyun/terraform-provider-alicloud/issues/672)) +- Fix oss bucket docs error([#692](https://github.com/aliyun/terraform-provider-alicloud/issues/692)) +- Fix pvtz 'Zone.VpcExists' error([#691](https://github.com/aliyun/terraform-provider-alicloud/issues/691)) +- Fix multi-k8s testcase failed error([#683](https://github.com/aliyun/terraform-provider-alicloud/issues/683)) +- Fix pvtz attchment Zone.NotExists error([#682](https://github.com/aliyun/terraform-provider-alicloud/issues/682)) +- Fix deleting ram role error([#674](https://github.com/aliyun/terraform-provider-alicloud/issues/674)) +- Fix k8s cluster worker_period_unit type error([#672](https://github.com/aliyun/terraform-provider-alicloud/issues/672)) ## 1.28.0 (January 16, 2019) IMPROVEMENTS: -- Ots service support https ([#669](https://github.com/aliyun/terraform-provider-alicloud/issues/669)) -- check vswitch id when creating instance documentation ([#668](https://github.com/aliyun/terraform-provider-alicloud/issues/668)) -- Improve pvtz attachment test updating case ([#663](https://github.com/aliyun/terraform-provider-alicloud/issues/663)) -- add vswitch id checker when creating k8s clusters ([#656](https://github.com/aliyun/terraform-provider-alicloud/issues/656)) -- Improve cen instance testcase to avoid mistake query ([#655](https://github.com/aliyun/terraform-provider-alicloud/issues/655)) -- Improve route entry retry strategy to avoid concurrence issue ([#654](https://github.com/aliyun/terraform-provider-alicloud/issues/654)) -- Offline drds resource from website results from drds does not support idempotent ([#653](https://github.com/aliyun/terraform-provider-alicloud/issues/653)) -- Support customer endpoints in the provider ([#652](https://github.com/aliyun/terraform-provider-alicloud/issues/652)) -- Reback image filter to meet many non-ecs testcase ([#649](https://github.com/aliyun/terraform-provider-alicloud/issues/649)) -- Improve ecs instance testcase by update instance type ([#646](https://github.com/aliyun/terraform-provider-alicloud/issues/646)) -- Support cs client setting customer endpoint ([#643](https://github.com/aliyun/terraform-provider-alicloud/issues/643)) -- do not poll nodes when k8s cluster is stable ([#641](https://github.com/aliyun/terraform-provider-alicloud/issues/641)) -- Improve pvtz_zone testcase by using rand ([#639](https://github.com/aliyun/terraform-provider-alicloud/issues/639)) -- support for zero node clusters in swarm container service ([#638](https://github.com/aliyun/terraform-provider-alicloud/issues/638)) -- Slb listener can not be updated when load balancer instance is shared-performance ([#637](https://github.com/aliyun/terraform-provider-alicloud/issues/637)) -- Improve db_account testcase and its docs ([#635](https://github.com/aliyun/terraform-provider-alicloud/issues/635)) -- Adding https_config options to the alicloud_cdn_domain resource ([#605](https://github.com/aliyun/terraform-provider-alicloud/issues/605)) - -BUG FIXES: - -- Fix slb OperationFailed.TokenIsProcessing error ([#667](https://github.com/aliyun/terraform-provider-alicloud/issues/667)) -- Fix deleting log project requestTimeout error ([#666](https://github.com/aliyun/terraform-provider-alicloud/issues/666)) -- Fix cs_kubernetes setting int value error ([#665](https://github.com/aliyun/terraform-provider-alicloud/issues/665)) -- Fix pvtz zone attaching vpc system busy error ([#660](https://github.com/aliyun/terraform-provider-alicloud/issues/660)) -- Fix ecs and ess tags read bug with ignore system tag ([#659](https://github.com/aliyun/terraform-provider-alicloud/issues/659)) -- Fix cs cluster not found error and improve its testcase ([#658](https://github.com/aliyun/terraform-provider-alicloud/issues/658)) -- Fix deleting pvtz zone not exist and internal error ([#657](https://github.com/aliyun/terraform-provider-alicloud/issues/657)) -- Fix pvtz throttling user bug and improve WrapError ([#650](https://github.com/aliyun/terraform-provider-alicloud/issues/650)) -- Fix ess group describing error ([#644](https://github.com/aliyun/terraform-provider-alicloud/issues/644)) -- Fix pvtz throttling user bug and add WrapError ([#642](https://github.com/aliyun/terraform-provider-alicloud/issues/642)) -- Fix kvstore instance docs ([#636](https://github.com/aliyun/terraform-provider-alicloud/issues/636)) +- Ots service support https([#669](https://github.com/aliyun/terraform-provider-alicloud/issues/669)) +- check vswitch id when creating instance documentation([#668](https://github.com/aliyun/terraform-provider-alicloud/issues/668)) +- Improve pvtz attachment test updating case([#663](https://github.com/aliyun/terraform-provider-alicloud/issues/663)) +- add vswitch id checker when creating k8s clusters([#656](https://github.com/aliyun/terraform-provider-alicloud/issues/656)) +- Improve cen instance testcase to avoid mistake query([#655](https://github.com/aliyun/terraform-provider-alicloud/issues/655)) +- Improve route entry retry strategy to avoid concurrence issue([#654](https://github.com/aliyun/terraform-provider-alicloud/issues/654)) +- Offline drds resource from website results from drds does not support idempotent([#653](https://github.com/aliyun/terraform-provider-alicloud/issues/653)) +- Support customer endpoints in the provider([#652](https://github.com/aliyun/terraform-provider-alicloud/issues/652)) +- Reback image filter to meet many non-ecs testcase([#649](https://github.com/aliyun/terraform-provider-alicloud/issues/649)) +- Improve ecs instance testcase by update instance type([#646](https://github.com/aliyun/terraform-provider-alicloud/issues/646)) +- Support cs client setting customer endpoint([#643](https://github.com/aliyun/terraform-provider-alicloud/issues/643)) +- do not poll nodes when k8s cluster is stable([#641](https://github.com/aliyun/terraform-provider-alicloud/issues/641)) +- Improve pvtz_zone testcase by using rand([#639](https://github.com/aliyun/terraform-provider-alicloud/issues/639)) +- support for zero node clusters in swarm container service([#638](https://github.com/aliyun/terraform-provider-alicloud/issues/638)) +- Slb listener can not be updated when load balancer instance is shared-performance([#637](https://github.com/aliyun/terraform-provider-alicloud/issues/637)) +- Improve db_account testcase and its docs([#635](https://github.com/aliyun/terraform-provider-alicloud/issues/635)) +- Adding https_config options to the alicloud_cdn_domain resource([#605](https://github.com/aliyun/terraform-provider-alicloud/issues/605)) + +BUG FIXES: + +- Fix slb OperationFailed.TokenIsProcessing error([#667](https://github.com/aliyun/terraform-provider-alicloud/issues/667)) +- Fix deleting log project requestTimeout error([#666](https://github.com/aliyun/terraform-provider-alicloud/issues/666)) +- Fix cs_kubernetes setting int value error([#665](https://github.com/aliyun/terraform-provider-alicloud/issues/665)) +- Fix pvtz zone attaching vpc system busy error([#660](https://github.com/aliyun/terraform-provider-alicloud/issues/660)) +- Fix ecs and ess tags read bug with ignore system tag([#659](https://github.com/aliyun/terraform-provider-alicloud/issues/659)) +- Fix cs cluster not found error and improve its testcase([#658](https://github.com/aliyun/terraform-provider-alicloud/issues/658)) +- Fix deleting pvtz zone not exist and internal error([#657](https://github.com/aliyun/terraform-provider-alicloud/issues/657)) +- Fix pvtz throttling user bug and improve WrapError([#650](https://github.com/aliyun/terraform-provider-alicloud/issues/650)) +- Fix ess group describing error([#644](https://github.com/aliyun/terraform-provider-alicloud/issues/644)) +- Fix pvtz throttling user bug and add WrapError([#642](https://github.com/aliyun/terraform-provider-alicloud/issues/642)) +- Fix kvstore instance docs([#636](https://github.com/aliyun/terraform-provider-alicloud/issues/636)) ## 1.27.0 (January 08, 2019) IMPROVEMENTS: -- Improve slb instance docs ([#632](https://github.com/aliyun/terraform-provider-alicloud/issues/632)) -- Upgrade to Go 1.11 ([#629](https://github.com/aliyun/terraform-provider-alicloud/issues/629)) -- Remove ots https schema because of in some region only supports http ([#630](https://github.com/aliyun/terraform-provider-alicloud/issues/630)) -- Support https for log client ([#623](https://github.com/aliyun/terraform-provider-alicloud/issues/623)) -- Support https for ram, cdn, kms and fc client ([#622](https://github.com/aliyun/terraform-provider-alicloud/issues/622)) -- Support https for dns client ([#621](https://github.com/aliyun/terraform-provider-alicloud/issues/621)) -- Support https for services client using official sdk ([#619](https://github.com/aliyun/terraform-provider-alicloud/issues/619)) -- Support mns client https and improve mns testcase ([#618](https://github.com/aliyun/terraform-provider-alicloud/issues/618)) -- Support oss client https ([#617](https://github.com/aliyun/terraform-provider-alicloud/issues/617)) -- Support change kvstore instance charge type ([#602](https://github.com/aliyun/terraform-provider-alicloud/issues/602)) -- add region checks to kubernetes, multiaz kubernetes, swarm clusters ([#607](https://github.com/aliyun/terraform-provider-alicloud/issues/607)) -- Add forcenew for ess lifecycle hook name and improve ess testcase by random name ([#603](https://github.com/aliyun/terraform-provider-alicloud/issues/603)) -- Improve ess configuration testcase ([#600](https://github.com/aliyun/terraform-provider-alicloud/issues/600)) -- Improve kvstore and ess schedule testcase ([#599](https://github.com/aliyun/terraform-provider-alicloud/issues/599)) -- Improve apigateway testcase ([#593](https://github.com/aliyun/terraform-provider-alicloud/issues/593)) -- Improve ram, ess schedule and cdn testcase ([#592](https://github.com/aliyun/terraform-provider-alicloud/issues/592)) -- Improve kvstore client token ([#586](https://github.com/aliyun/terraform-provider-alicloud/issues/586)) - -BUG FIXES: - -- Fix api gateway deleteing app bug ([#633](https://github.com/aliyun/terraform-provider-alicloud/issues/633)) -- Fix cs_kubernetes missing name error ([#625](https://github.com/aliyun/terraform-provider-alicloud/issues/625)) -- Fix api gateway groups filter bug ([#624](https://github.com/aliyun/terraform-provider-alicloud/issues/624)) -- Fix ots instance description force new bug ([#616](https://github.com/aliyun/terraform-provider-alicloud/issues/616)) -- Fix oss bucket object testcase destroy bug ([#605](https://github.com/aliyun/terraform-provider-alicloud/issues/605)) -- Fix deleting ess group timeout bug ([#604](https://github.com/aliyun/terraform-provider-alicloud/issues/604)) -- Fix deleting mns subscription bug ([#601](https://github.com/aliyun/terraform-provider-alicloud/issues/601)) -- bug fix for the input of cen bandwidth limit ([#598](https://github.com/aliyun/terraform-provider-alicloud/issues/598)) -- Fix log service timeout error ([#594](https://github.com/aliyun/terraform-provider-alicloud/issues/594)) -- Fix record not found issue if pvtz records are more than 50 ([#590](https://github.com/aliyun/terraform-provider-alicloud/issues/590)) -- Fix cen instance and bandwidth multi regions test case bug ([#588](https://github.com/aliyun/terraform-provider-alicloud/issues/588)) +- Improve slb instance docs([#632](https://github.com/aliyun/terraform-provider-alicloud/issues/632)) +- Upgrade to Go 1.11([#629](https://github.com/aliyun/terraform-provider-alicloud/issues/629)) +- Remove ots https schema because of in some region only supports http([#630](https://github.com/aliyun/terraform-provider-alicloud/issues/630)) +- Support https for log client([#623](https://github.com/aliyun/terraform-provider-alicloud/issues/623)) +- Support https for ram, cdn, kms and fc client([#622](https://github.com/aliyun/terraform-provider-alicloud/issues/622)) +- Support https for dns client([#621](https://github.com/aliyun/terraform-provider-alicloud/issues/621)) +- Support https for services client using official sdk([#619](https://github.com/aliyun/terraform-provider-alicloud/issues/619)) +- Support mns client https and improve mns testcase([#618](https://github.com/aliyun/terraform-provider-alicloud/issues/618)) +- Support oss client https([#617](https://github.com/aliyun/terraform-provider-alicloud/issues/617)) +- Support change kvstore instance charge type([#602](https://github.com/aliyun/terraform-provider-alicloud/issues/602)) +- add region checks to kubernetes, multiaz kubernetes, swarm clusters([#607](https://github.com/aliyun/terraform-provider-alicloud/issues/607)) +- Add forcenew for ess lifecycle hook name and improve ess testcase by random name([#603](https://github.com/aliyun/terraform-provider-alicloud/issues/603)) +- Improve ess configuration testcase([#600](https://github.com/aliyun/terraform-provider-alicloud/issues/600)) +- Improve kvstore and ess schedule testcase([#599](https://github.com/aliyun/terraform-provider-alicloud/issues/599)) +- Improve apigateway testcase([#593](https://github.com/aliyun/terraform-provider-alicloud/issues/593)) +- Improve ram, ess schedule and cdn testcase([#592](https://github.com/aliyun/terraform-provider-alicloud/issues/592)) +- Improve kvstore client token([#586](https://github.com/aliyun/terraform-provider-alicloud/issues/586)) + +BUG FIXES: + +- Fix api gateway deleteing app bug([#633](https://github.com/aliyun/terraform-provider-alicloud/issues/633)) +- Fix cs_kubernetes missing name error([#625](https://github.com/aliyun/terraform-provider-alicloud/issues/625)) +- Fix api gateway groups filter bug([#624](https://github.com/aliyun/terraform-provider-alicloud/issues/624)) +- Fix ots instance description force new bug([#616](https://github.com/aliyun/terraform-provider-alicloud/issues/616)) +- Fix oss bucket object testcase destroy bug([#605](https://github.com/aliyun/terraform-provider-alicloud/issues/605)) +- Fix deleting ess group timeout bug([#604](https://github.com/aliyun/terraform-provider-alicloud/issues/604)) +- Fix deleting mns subscription bug([#601](https://github.com/aliyun/terraform-provider-alicloud/issues/601)) +- bug fix for the input of cen bandwidth limit([#598](https://github.com/aliyun/terraform-provider-alicloud/issues/598)) +- Fix log service timeout error([#594](https://github.com/aliyun/terraform-provider-alicloud/issues/594)) +- Fix record not found issue if pvtz records are more than 50([#590](https://github.com/aliyun/terraform-provider-alicloud/issues/590)) +- Fix cen instance and bandwidth multi regions test case bug([#588](https://github.com/aliyun/terraform-provider-alicloud/issues/588)) ## 1.26.0 (December 20, 2018) FEATURES: -- **New Resource:** `alicloud_cs_managed_kubernetes` ([#563](https://github.com/aliyun/terraform-provider-alicloud/issues/563)) - -IMPROVEMENTS: - -- Improve ram client endpoint ([#584](https://github.com/aliyun/terraform-provider-alicloud/issues/584)) -- Remove useless sweeper depencences for alicloud_instance sweeper testcase ([#582](https://github.com/aliyun/terraform-provider-alicloud/issues/582)) -- Improve kvstore backup policy testcase ([#580](https://github.com/aliyun/terraform-provider-alicloud/issues/580)) -- Improve the describing endpoint ([#579](https://github.com/aliyun/terraform-provider-alicloud/issues/579)) -- VPN gateway supports 200/500/1000M bandwidth ([#577](https://github.com/aliyun/terraform-provider-alicloud/issues/577)) -- skip private ip test in some regions ([#575](https://github.com/aliyun/terraform-provider-alicloud/issues/575)) -- Add timeout and retry for tablestore client and Improve its testcases ([#569](https://github.com/aliyun/terraform-provider-alicloud/issues/569)) -- Modify kvstore_instance password to Optional and improve its testcases ([#567](https://github.com/aliyun/terraform-provider-alicloud/issues/567)) -- Improve datasource alicloud_vpcs testcase ([#566](https://github.com/aliyun/terraform-provider-alicloud/issues/566)) -- Improve dns_domains testcase ([#561](https://github.com/aliyun/terraform-provider-alicloud/issues/561)) -- Improve ram_role_attachment testcase ([#560](https://github.com/aliyun/terraform-provider-alicloud/issues/560)) -- support PrePaid instances, image_id to be set when creating k8s clusters ([#559](https://github.com/aliyun/terraform-provider-alicloud/issues/559)) -- Add retry and timemout for fc client ([#557](https://github.com/aliyun/terraform-provider-alicloud/issues/557)) -- Datasource alicloud_zones supports filter FunctionCompute ([#555](https://github.com/aliyun/terraform-provider-alicloud/issues/555)) -- Fix a bug that caused the alicloud_dns_record.routing attribute ([#554](https://github.com/aliyun/terraform-provider-alicloud/issues/554)) -- Modify router interface prepaid test case documentation ([#552](https://github.com/aliyun/terraform-provider-alicloud/issues/552)) -- Resource alicloud_ess_scalingconfiguration supports system_disk_size ([#551](https://github.com/aliyun/terraform-provider-alicloud/issues/551)) -- Improve datahub project testcase ([#548](https://github.com/aliyun/terraform-provider-alicloud/issues/548)) -- resource alicloud_slb_listener support server group ([#545](https://github.com/aliyun/terraform-provider-alicloud/issues/545)) -- Improve ecs instance and disk testcase with common case ([#544](https://github.com/aliyun/terraform-provider-alicloud/issues/544)) - -BUG FIXES: - -- Fix provider compile error on 32bit ([#585](https://github.com/aliyun/terraform-provider-alicloud/issues/585)) -- Fix table store no such host error with deleting and updating ([#583](https://github.com/aliyun/terraform-provider-alicloud/issues/583)) -- Fix pvtz_record RecordInvalidConflict bug ([#581](https://github.com/aliyun/terraform-provider-alicloud/issues/581)) -- fixed bug in backup policy update ([#521](https://github.com/aliyun/terraform-provider-alicloud/issues/521)) -- Fix docs eip_association ([#578](https://github.com/aliyun/terraform-provider-alicloud/issues/578)) -- Fix a bug about instance charge type change ([#576](https://github.com/aliyun/terraform-provider-alicloud/issues/576)) -- Fix describing endpoint failed error ([#574](https://github.com/aliyun/terraform-provider-alicloud/issues/574)) -- Fix table store describing no such host error ([#572](https://github.com/aliyun/terraform-provider-alicloud/issues/572)) -- Fix table store creating timeout error ([#571](https://github.com/aliyun/terraform-provider-alicloud/issues/571)) -- Fix kvstore instance class update error ([#570](https://github.com/aliyun/terraform-provider-alicloud/issues/570)) -- Fix ess_scaling_group import bugs and improve ess schedule testcase ([#565](https://github.com/aliyun/terraform-provider-alicloud/issues/565)) -- Fix alicloud rds related IncorrectStatus bug ([#558](https://github.com/aliyun/terraform-provider-alicloud/issues/558)) -- Fix alicloud_fc_trigger's config diff bug ([#556](https://github.com/aliyun/terraform-provider-alicloud/issues/556)) -- Fix oss bucket deleting failed error ([#550](https://github.com/aliyun/terraform-provider-alicloud/issues/550)) -- Fix potential bugs of datahub and ram when the resource has been deleted ([#546](https://github.com/aliyun/terraform-provider-alicloud/issues/546)) -- Fix pvtz_record describing bug ([#543](https://github.com/aliyun/terraform-provider-alicloud/issues/543)) +- **New Resource:** `alicloud_cs_managed_kubernetes`([#563](https://github.com/aliyun/terraform-provider-alicloud/issues/563)) + +IMPROVEMENTS: + +- Improve ram client endpoint([#584](https://github.com/aliyun/terraform-provider-alicloud/issues/584)) +- Remove useless sweeper depencences for alicloud_instance sweeper testcase([#582](https://github.com/aliyun/terraform-provider-alicloud/issues/582)) +- Improve kvstore backup policy testcase([#580](https://github.com/aliyun/terraform-provider-alicloud/issues/580)) +- Improve the describing endpoint([#579](https://github.com/aliyun/terraform-provider-alicloud/issues/579)) +- VPN gateway supports 200/500/1000M bandwidth([#577](https://github.com/aliyun/terraform-provider-alicloud/issues/577)) +- skip private ip test in some regions([#575](https://github.com/aliyun/terraform-provider-alicloud/issues/575)) +- Add timeout and retry for tablestore client and Improve its testcases([#569](https://github.com/aliyun/terraform-provider-alicloud/issues/569)) +- Modify kvstore_instance password to Optional and improve its testcases([#567](https://github.com/aliyun/terraform-provider-alicloud/issues/567)) +- Improve datasource alicloud_vpcs testcase([#566](https://github.com/aliyun/terraform-provider-alicloud/issues/566)) +- Improve dns_domains testcase([#561](https://github.com/aliyun/terraform-provider-alicloud/issues/561)) +- Improve ram_role_attachment testcase([#560](https://github.com/aliyun/terraform-provider-alicloud/issues/560)) +- support PrePaid instances, image_id to be set when creating k8s clusters([#559](https://github.com/aliyun/terraform-provider-alicloud/issues/559)) +- Add retry and timemout for fc client([#557](https://github.com/aliyun/terraform-provider-alicloud/issues/557)) +- Datasource alicloud_zones supports filter FunctionCompute([#555](https://github.com/aliyun/terraform-provider-alicloud/issues/555)) +- Fix a bug that caused the alicloud_dns_record.routing attribute([#554](https://github.com/aliyun/terraform-provider-alicloud/issues/554)) +- Modify router interface prepaid test case documentation([#552](https://github.com/aliyun/terraform-provider-alicloud/issues/552)) +- Resource alicloud_ess_scalingconfiguration supports system_disk_size([#551](https://github.com/aliyun/terraform-provider-alicloud/issues/551)) +- Improve datahub project testcase([#548](https://github.com/aliyun/terraform-provider-alicloud/issues/548)) +- resource alicloud_slb_listener support server group([#545](https://github.com/aliyun/terraform-provider-alicloud/issues/545)) +- Improve ecs instance and disk testcase with common case([#544](https://github.com/aliyun/terraform-provider-alicloud/issues/544)) + +BUG FIXES: + +- Fix provider compile error on 32bit([#585](https://github.com/aliyun/terraform-provider-alicloud/issues/585)) +- Fix table store no such host error with deleting and updating([#583](https://github.com/aliyun/terraform-provider-alicloud/issues/583)) +- Fix pvtz_record RecordInvalidConflict bug([#581](https://github.com/aliyun/terraform-provider-alicloud/issues/581)) +- fixed bug in backup policy update([#521](https://github.com/aliyun/terraform-provider-alicloud/issues/521)) +- Fix docs eip_association([#578](https://github.com/aliyun/terraform-provider-alicloud/issues/578)) +- Fix a bug about instance charge type change([#576](https://github.com/aliyun/terraform-provider-alicloud/issues/576)) +- Fix describing endpoint failed error([#574](https://github.com/aliyun/terraform-provider-alicloud/issues/574)) +- Fix table store describing no such host error([#572](https://github.com/aliyun/terraform-provider-alicloud/issues/572)) +- Fix table store creating timeout error([#571](https://github.com/aliyun/terraform-provider-alicloud/issues/571)) +- Fix kvstore instance class update error([#570](https://github.com/aliyun/terraform-provider-alicloud/issues/570)) +- Fix ess_scaling_group import bugs and improve ess schedule testcase([#565](https://github.com/aliyun/terraform-provider-alicloud/issues/565)) +- Fix alicloud rds related IncorrectStatus bug([#558](https://github.com/aliyun/terraform-provider-alicloud/issues/558)) +- Fix alicloud_fc_trigger's config diff bug([#556](https://github.com/aliyun/terraform-provider-alicloud/issues/556)) +- Fix oss bucket deleting failed error([#550](https://github.com/aliyun/terraform-provider-alicloud/issues/550)) +- Fix potential bugs of datahub and ram when the resource has been deleted([#546](https://github.com/aliyun/terraform-provider-alicloud/issues/546)) +- Fix pvtz_record describing bug([#543](https://github.com/aliyun/terraform-provider-alicloud/issues/543)) ## 1.25.0 (November 30, 2018) IMPROVEMENTS: -- return a empty list when there is no any data source ([#540](https://github.com/aliyun/terraform-provider-alicloud/issues/540)) -- Skip automatically the testcases which does not support API gateway ([#538](https://github.com/aliyun/terraform-provider-alicloud/issues/538)) -- Improve common bandwidth package test case and remove PayBy95 ([#530](https://github.com/aliyun/terraform-provider-alicloud/issues/530)) -- Update resource drds supported regions ([#534](https://github.com/aliyun/terraform-provider-alicloud/issues/534)) -- Remove DB instance engine_version limitation ([#528](https://github.com/aliyun/terraform-provider-alicloud/issues/528)) -- Skip automatically the testcases which does not support route table and classic drds ([#526](https://github.com/aliyun/terraform-provider-alicloud/issues/526)) -- Skip automatically the testcases which does not support classic regions ([#524](https://github.com/aliyun/terraform-provider-alicloud/issues/524)) -- datasource alicloud_slbs support tags ([#523](https://github.com/aliyun/terraform-provider-alicloud/issues/523)) -- resouce alicloud_slb support tags ([#522](https://github.com/aliyun/terraform-provider-alicloud/issues/522)) -- Skip automatically the testcases which does not support multi az regions ([#518](https://github.com/aliyun/terraform-provider-alicloud/issues/518)) -- Add some region limitation guide for sone resources ([#517](https://github.com/aliyun/terraform-provider-alicloud/issues/517)) -- Skip automatically the testcases which does not support some known regions ([#516](https://github.com/aliyun/terraform-provider-alicloud/issues/516)) -- create instance with runinstances ([#514](https://github.com/aliyun/terraform-provider-alicloud/issues/514)) -- support eni amount in data source instance types ([#512](https://github.com/aliyun/terraform-provider-alicloud/issues/512)) -- Add a docs guides/getting-account to help user learn alibaba cloud account ([#510](https://github.com/aliyun/terraform-provider-alicloud/issues/510)) +- return a empty list when there is no any data source([#540](https://github.com/aliyun/terraform-provider-alicloud/issues/540)) +- Skip automatically the testcases which does not support API gateway([#538](https://github.com/aliyun/terraform-provider-alicloud/issues/538)) +- Improve common bandwidth package test case and remove PayBy95([#530](https://github.com/aliyun/terraform-provider-alicloud/issues/530)) +- Update resource drds supported regions([#534](https://github.com/aliyun/terraform-provider-alicloud/issues/534)) +- Remove DB instance engine_version limitation([#528](https://github.com/aliyun/terraform-provider-alicloud/issues/528)) +- Skip automatically the testcases which does not support route table and classic drds([#526](https://github.com/aliyun/terraform-provider-alicloud/issues/526)) +- Skip automatically the testcases which does not support classic regions([#524](https://github.com/aliyun/terraform-provider-alicloud/issues/524)) +- datasource alicloud_slbs support tags([#523](https://github.com/aliyun/terraform-provider-alicloud/issues/523)) +- resouce alicloud_slb support tags([#522](https://github.com/aliyun/terraform-provider-alicloud/issues/522)) +- Skip automatically the testcases which does not support multi az regions([#518](https://github.com/aliyun/terraform-provider-alicloud/issues/518)) +- Add some region limitation guide for sone resources([#517](https://github.com/aliyun/terraform-provider-alicloud/issues/517)) +- Skip automatically the testcases which does not support some known regions([#516](https://github.com/aliyun/terraform-provider-alicloud/issues/516)) +- create instance with runinstances([#514](https://github.com/aliyun/terraform-provider-alicloud/issues/514)) +- support eni amount in data source instance types([#512](https://github.com/aliyun/terraform-provider-alicloud/issues/512)) +- Add a docs guides/getting-account to help user learn alibaba cloud account([#510](https://github.com/aliyun/terraform-provider-alicloud/issues/510)) BUG FIXES: -- Fix route_entry concurrence bug and improve it testcases ([#537](https://github.com/aliyun/terraform-provider-alicloud/issues/537)) -- Fix router interface prepaid purchase ([#529](https://github.com/aliyun/terraform-provider-alicloud/issues/529)) -- Fix fc_service sweeper test bug ([#536](https://github.com/aliyun/terraform-provider-alicloud/issues/536)) -- Fix drds creating VPC instance bug by adding vpc_id ([#531](https://github.com/aliyun/terraform-provider-alicloud/issues/531)) -- fix a snat_entry bug without set id to empty ([#525](https://github.com/aliyun/terraform-provider-alicloud/issues/525)) -- fix a bug of ram_use display name ([#519](https://github.com/aliyun/terraform-provider-alicloud/issues/519)) -- fix a bug of instance testcase ([#513](https://github.com/aliyun/terraform-provider-alicloud/issues/513)) -- Fix pvtz resource priority bug ([#511](https://github.com/aliyun/terraform-provider-alicloud/issues/511)) +- Fix route_entry concurrence bug and improve it testcases([#537](https://github.com/aliyun/terraform-provider-alicloud/issues/537)) +- Fix router interface prepaid purchase([#529](https://github.com/aliyun/terraform-provider-alicloud/issues/529)) +- Fix fc_service sweeper test bug([#536](https://github.com/aliyun/terraform-provider-alicloud/issues/536)) +- Fix drds creating VPC instance bug by adding vpc_id([#531](https://github.com/aliyun/terraform-provider-alicloud/issues/531)) +- fix a snat_entry bug without set id to empty([#525](https://github.com/aliyun/terraform-provider-alicloud/issues/525)) +- fix a bug of ram_use display name([#519](https://github.com/aliyun/terraform-provider-alicloud/issues/519)) +- fix a bug of instance testcase([#513](https://github.com/aliyun/terraform-provider-alicloud/issues/513)) +- Fix pvtz resource priority bug([#511](https://github.com/aliyun/terraform-provider-alicloud/issues/511)) ## 1.24.0 (November 21, 2018) FEATURES: -- **New Resource:** `alicloud_drds_instance` ([#446](https://github.com/aliyun/terraform-provider-alicloud/issues/446)) +- **New Resource:** `alicloud_drds_instance`([#446](https://github.com/aliyun/terraform-provider-alicloud/issues/446)) IMPROVEMENTS: -- Improve drds_instance docs ([#509](https://github.com/aliyun/terraform-provider-alicloud/issues/509)) -- Add a new test case for drds_instance ([#508](https://github.com/aliyun/terraform-provider-alicloud/issues/508)) -- Improve provider config with Trim method ([#504](https://github.com/aliyun/terraform-provider-alicloud/issues/504)) -- api gateway skip app relevant tests ([#500](https://github.com/aliyun/terraform-provider-alicloud/issues/500)) -- update api resource that support to deploy api ([#498](https://github.com/aliyun/terraform-provider-alicloud/issues/498)) -- Skip ram_groups a test case ([#496](https://github.com/aliyun/terraform-provider-alicloud/issues/496)) -- support disk resize ([#490](https://github.com/aliyun/terraform-provider-alicloud/issues/490)) -- cancel the limit of system disk size ([#489](https://github.com/aliyun/terraform-provider-alicloud/issues/489)) -- Improve docs alicloud_db_database and alicloud_cs_kubernetes ([#488](https://github.com/aliyun/terraform-provider-alicloud/issues/488)) -- Support creating data disk with instance ([#484](https://github.com/aliyun/terraform-provider-alicloud/issues/484)) +- Improve drds_instance docs([#509](https://github.com/aliyun/terraform-provider-alicloud/issues/509)) +- Add a new test case for drds_instance([#508](https://github.com/aliyun/terraform-provider-alicloud/issues/508)) +- Improve provider config with Trim method([#504](https://github.com/aliyun/terraform-provider-alicloud/issues/504)) +- api gateway skip app relevant tests([#500](https://github.com/aliyun/terraform-provider-alicloud/issues/500)) +- update api resource that support to deploy api([#498](https://github.com/aliyun/terraform-provider-alicloud/issues/498)) +- Skip ram_groups a test case([#496](https://github.com/aliyun/terraform-provider-alicloud/issues/496)) +- support disk resize([#490](https://github.com/aliyun/terraform-provider-alicloud/issues/490)) +- cancel the limit of system disk size([#489](https://github.com/aliyun/terraform-provider-alicloud/issues/489)) +- Improve docs alicloud_db_database and alicloud_cs_kubernetes([#488](https://github.com/aliyun/terraform-provider-alicloud/issues/488)) +- Support creating data disk with instance([#484](https://github.com/aliyun/terraform-provider-alicloud/issues/484)) BUG FIXES: -- Fix the sweeper test for CEN and CEN bandwidth package ([#505](https://github.com/aliyun/terraform-provider-alicloud/issues/505)) -- Fix pvtz_zone_record update bug ([#503](https://github.com/aliyun/terraform-provider-alicloud/issues/503)) -- Fix network_interface_attachment docs error ([#502](https://github.com/aliyun/terraform-provider-alicloud/issues/502)) -- fix fix datahub bug when visit region of ap-southeast-1 ([#499](https://github.com/aliyun/terraform-provider-alicloud/issues/499)) -- Fix examples/mns-topic parameter error ([#497](https://github.com/aliyun/terraform-provider-alicloud/issues/497)) -- Fix db_connection not found error when deleting ([#495](https://github.com/aliyun/terraform-provider-alicloud/issues/495)) -- fix error about the docs format ([#492](https://github.com/aliyun/terraform-provider-alicloud/issues/492)) +- Fix the sweeper test for CEN and CEN bandwidth package([#505](https://github.com/aliyun/terraform-provider-alicloud/issues/505)) +- Fix pvtz_zone_record update bug([#503](https://github.com/aliyun/terraform-provider-alicloud/issues/503)) +- Fix network_interface_attachment docs error([#502](https://github.com/aliyun/terraform-provider-alicloud/issues/502)) +- fix fix datahub bug when visit region of ap-southeast-1([#499](https://github.com/aliyun/terraform-provider-alicloud/issues/499)) +- Fix examples/mns-topic parameter error([#497](https://github.com/aliyun/terraform-provider-alicloud/issues/497)) +- Fix db_connection not found error when deleting([#495](https://github.com/aliyun/terraform-provider-alicloud/issues/495)) +- fix error about the docs format ([#492](https://github.com/aliyun/terraform-provider-alicloud/issues/492)) ## 1.23.0 (November 13, 2018) FEATURES: -- **New Resource:** `alicloud_api_gateway_app_attachment` ([#478](https://github.com/aliyun/terraform-provider-alicloud/issues/478)) -- **New Resource:** `alicloud_network_interface_attachment` ([#474](https://github.com/aliyun/terraform-provider-alicloud/issues/474)) -- **New Resource:** `alicloud_api_gateway_vpc_access` ([#472](https://github.com/aliyun/terraform-provider-alicloud/issues/472)) -- **New Resource:** `alicloud_network_interface` ([#469](https://github.com/aliyun/terraform-provider-alicloud/issues/469)) -- **New Resource:** `alicloud_common_bandwidth_package` ([#468](https://github.com/aliyun/terraform-provider-alicloud/issues/468)) -- **New Data Source:** `alicloud_network_interfaces` ([#475](https://github.com/aliyun/terraform-provider-alicloud/issues/475)) -- **New Data Source:** `alicloud_api_gateway_apps` ([#467](https://github.com/aliyun/terraform-provider-alicloud/issues/467)) +- **New Resource:** `alicloud_api_gateway_app_attachment`([#478](https://github.com/aliyun/terraform-provider-alicloud/issues/478)) +- **New Resource:** `alicloud_network_interface_attachment`([#474](https://github.com/aliyun/terraform-provider-alicloud/issues/474)) +- **New Resource:** `alicloud_api_gateway_vpc_access`([#472](https://github.com/aliyun/terraform-provider-alicloud/issues/472)) +- **New Resource:** `alicloud_network_interface`([#469](https://github.com/aliyun/terraform-provider-alicloud/issues/469)) +- **New Resource:** `alicloud_common_bandwidth_package`([#468](https://github.com/aliyun/terraform-provider-alicloud/issues/468)) +- **New Data Source:** `alicloud_network_interfaces`([#475](https://github.com/aliyun/terraform-provider-alicloud/issues/475)) +- **New Data Source:** `alicloud_api_gateway_apps`([#467](https://github.com/aliyun/terraform-provider-alicloud/issues/467)) IMPROVEMENTS: -- Add a new region eu-west-1 ([#486](https://github.com/aliyun/terraform-provider-alicloud/issues/486)) -- remove unreachable codes ([#479](https://github.com/aliyun/terraform-provider-alicloud/issues/479)) -- support enable/disable security enhancement strategy of alicloud_instance ([#471](https://github.com/aliyun/terraform-provider-alicloud/issues/471)) -- alicloud_slb_listener support idle_timeout/request_timeout ([#463](https://github.com/aliyun/terraform-provider-alicloud/issues/463)) +- Add a new region eu-west-1([#486](https://github.com/aliyun/terraform-provider-alicloud/issues/486)) +- remove unreachable codes([#479](https://github.com/aliyun/terraform-provider-alicloud/issues/479)) +- support enable/disable security enhancement strategy of alicloud_instance([#471](https://github.com/aliyun/terraform-provider-alicloud/issues/471)) +- alicloud_slb_listener support idle_timeout/request_timeout([#463](https://github.com/aliyun/terraform-provider-alicloud/issues/463)) BUG FIXES: -- Fix cs_application cluster not found ([#480](https://github.com/aliyun/terraform-provider-alicloud/issues/480)) -- fix the bug of security_group inner_access bug ([#477](https://github.com/aliyun/terraform-provider-alicloud/issues/477)) -- Fix pagenumber built error ([#470](https://github.com/aliyun/terraform-provider-alicloud/issues/470)) -- Fix cs_application cluster not found ([#480](https://github.com/aliyun/terraform-provider-alicloud/issues/480)) +- Fix cs_application cluster not found([#480](https://github.com/aliyun/terraform-provider-alicloud/issues/480)) +- fix the bug of security_group inner_access bug([#477](https://github.com/aliyun/terraform-provider-alicloud/issues/477)) +- Fix pagenumber built error([#470](https://github.com/aliyun/terraform-provider-alicloud/issues/470)) +- Fix cs_application cluster not found([#480](https://github.com/aliyun/terraform-provider-alicloud/issues/480)) ## 1.22.0 (November 02, 2018) FEATURES: -- **New Resource:** `alicloud_api_gateway_api` ([#457](https://github.com/aliyun/terraform-provider-alicloud/issues/457)) -- **New Resource:** `alicloud_api_gateway_app` ([#462](https://github.com/aliyun/terraform-provider-alicloud/issues/462)) -- **New Reource:** `alicloud_common_bandwidth_package` ([#454](https://github.com/aliyun/terraform-provider-alicloud/issues/454)) -- **New Data Source:** `alicloud_api_gateway_apis` ([#458](https://github.com/aliyun/terraform-provider-alicloud/issues/458)) -- **New Data Source:** `cen_region_route_entries` ([#442](https://github.com/aliyun/terraform-provider-alicloud/issues/442)) -- **New Data Source:** `alicloud_slb_ca_certificates` ([#452](https://github.com/aliyun/terraform-provider-alicloud/issues/452)) +- **New Resource:** `alicloud_api_gateway_api`([#457](https://github.com/aliyun/terraform-provider-alicloud/issues/457)) +- **New Resource:** `alicloud_api_gateway_app`([#462](https://github.com/aliyun/terraform-provider-alicloud/issues/462)) +- **New Reource:** `alicloud_common_bandwidth_package`([#454](https://github.com/aliyun/terraform-provider-alicloud/issues/454)) +- **New Data Source:** `alicloud_api_gateway_apis`([#458](https://github.com/aliyun/terraform-provider-alicloud/issues/458)) +- **New Data Source:** `cen_region_route_entries`([#442](https://github.com/aliyun/terraform-provider-alicloud/issues/442)) +- **New Data Source:** `alicloud_slb_ca_certificates`([#452](https://github.com/aliyun/terraform-provider-alicloud/issues/452)) IMPROVEMENTS: -- Use product code to get common request domain ([#466](https://github.com/aliyun/terraform-provider-alicloud/issues/466)) -- KVstore instance password supports at sign ([#465](https://github.com/aliyun/terraform-provider-alicloud/issues/465)) -- Correct docs spelling error ([#464](https://github.com/aliyun/terraform-provider-alicloud/issues/464)) -- alicloud_log_service : support update project and shard auto spit ([#461](https://github.com/aliyun/terraform-provider-alicloud/issues/461)) -- Correct datasource alicloud_cen_route_entries docs error ([#460](https://github.com/aliyun/terraform-provider-alicloud/issues/460)) -- Remove CDN default configuration ([#450](https://github.com/aliyun/terraform-provider-alicloud/issues/450)) +- Use product code to get common request domain([#466](https://github.com/aliyun/terraform-provider-alicloud/issues/466)) +- KVstore instance password supports at sign([#465](https://github.com/aliyun/terraform-provider-alicloud/issues/465)) +- Correct docs spelling error([#464](https://github.com/aliyun/terraform-provider-alicloud/issues/464)) +- alicloud_log_service : support update project and shard auto spit([#461](https://github.com/aliyun/terraform-provider-alicloud/issues/461)) +- Correct datasource alicloud_cen_route_entries docs error([#460](https://github.com/aliyun/terraform-provider-alicloud/issues/460)) +- Remove CDN default configuration([#450](https://github.com/aliyun/terraform-provider-alicloud/issues/450)) BUG FIXES: -- set number of cen instances five for normal alicloud account testcases ([#459](https://github.com/aliyun/terraform-provider-alicloud/issues/459)) +- set number of cen instances five for normal alicloud account testcases([#459](https://github.com/aliyun/terraform-provider-alicloud/issues/459)) ## 1.21.0 (October 30, 2018) FEATURES: -- **New Data Source:** `alicloud_slb_server_certificates` ([#444](https://github.com/aliyun/terraform-provider-alicloud/issues/444)) -- **New Data Source:** `alicloud_slb_acls` ([#443](https://github.com/aliyun/terraform-provider-alicloud/issues/443)) -- **New Resource:** `alicloud_slb_ca_certificate` ([#438](https://github.com/aliyun/terraform-provider-alicloud/issues/438)) -- **New Resource:** `alicloud_slb_server_certificate` ([#436](https://github.com/aliyun/terraform-provider-alicloud/issues/436)) +- **New Data Source:** `alicloud_slb_server_certificates`([#444](https://github.com/aliyun/terraform-provider-alicloud/issues/444)) +- **New Data Source:** `alicloud_slb_acls`([#443](https://github.com/aliyun/terraform-provider-alicloud/issues/443)) +- **New Resource:** `alicloud_slb_ca_certificate`([#438](https://github.com/aliyun/terraform-provider-alicloud/issues/438)) +- **New Resource:** `alicloud_slb_server_certificate`([#436](https://github.com/aliyun/terraform-provider-alicloud/issues/436)) IMPROVEMENTS: -- resource alicloud_slb_listener tcp protocol support established_timeout parameter ([#440](https://github.com/aliyun/terraform-provider-alicloud/issues/440)) +- resource alicloud_slb_listener tcp protocol support established_timeout parameter([#440](https://github.com/aliyun/terraform-provider-alicloud/issues/440)) BUG FIXES: -- Fix mns resource docs bug ([#441](https://github.com/aliyun/terraform-provider-alicloud/issues/441)) +- Fix mns resource docs bug([#441](https://github.com/aliyun/terraform-provider-alicloud/issues/441)) ## 1.20.0 (October 22, 2018) FEATURES: -- **New Resource:** `alicloud_slb_acl` ([#413](https://github.com/aliyun/terraform-provider-alicloud/issues/413)) -- **New Resource:** `alicloud_cen_route_entry` ([#415](https://github.com/aliyun/terraform-provider-alicloud/issues/415)) -- **New Data Source:** `alicloud_cen_route_entries` ([#424](https://github.com/aliyun/terraform-provider-alicloud/issues/424)) +- **New Resource:** `alicloud_slb_acl`([#413](https://github.com/aliyun/terraform-provider-alicloud/issues/413)) +- **New Resource:** `alicloud_cen_route_entry`([#415](https://github.com/aliyun/terraform-provider-alicloud/issues/415)) +- **New Data Source:** `alicloud_cen_route_entries`([#424](https://github.com/aliyun/terraform-provider-alicloud/issues/424)) IMPROVEMENTS: -- Improve datahub_project sweeper test ([#435](https://github.com/aliyun/terraform-provider-alicloud/issues/435)) -- Modify mns test case name ([#434](https://github.com/aliyun/terraform-provider-alicloud/issues/434)) -- Improve fc_service sweeper test ([#433](https://github.com/aliyun/terraform-provider-alicloud/issues/433)) -- Support provider thread safety ([#432](https://github.com/aliyun/terraform-provider-alicloud/issues/432)) -- add tags to security group ([#423](https://github.com/aliyun/terraform-provider-alicloud/issues/423)) -- Resource router_interface support PrePaid ([#425](https://github.com/aliyun/terraform-provider-alicloud/issues/425)) -- resource alicloud_slb_listener support acl ([#426](https://github.com/aliyun/terraform-provider-alicloud/issues/426)) -- change child instance type Vbr to VBR and replace some const variables ([#422](https://github.com/aliyun/terraform-provider-alicloud/issues/422)) -- add slb_internet_enabled to Kubernetes Cluster ([#421](https://github.com/aliyun/terraform-provider-alicloud/issues/421)) -- Hide AliCloud HaVip Attachment resource docs because of it is not public totally ([#420](https://github.com/aliyun/terraform-provider-alicloud/issues/420)) -- Improve examples/ots-table ([#417](https://github.com/aliyun/terraform-provider-alicloud/issues/417)) -- Improve examples ecs-vpc, ecs-new-vpc and api-gateway ([#416](https://github.com/aliyun/terraform-provider-alicloud/issues/416)) +- Improve datahub_project sweeper test([#435](https://github.com/aliyun/terraform-provider-alicloud/issues/435)) +- Modify mns test case name([#434](https://github.com/aliyun/terraform-provider-alicloud/issues/434)) +- Improve fc_service sweeper test([#433](https://github.com/aliyun/terraform-provider-alicloud/issues/433)) +- Support provider thread safety([#432](https://github.com/aliyun/terraform-provider-alicloud/issues/432)) +- add tags to security group([#423](https://github.com/aliyun/terraform-provider-alicloud/issues/423)) +- Resource router_interface support PrePaid([#425](https://github.com/aliyun/terraform-provider-alicloud/issues/425)) +- resource alicloud_slb_listener support acl([#426](https://github.com/aliyun/terraform-provider-alicloud/issues/426)) +- change child instance type Vbr to VBR and replace some const variables([#422](https://github.com/aliyun/terraform-provider-alicloud/issues/422)) +- add slb_internet_enabled to Kubernetes Cluster([#421](https://github.com/aliyun/terraform-provider-alicloud/issues/421)) +- Hide AliCloud HaVip Attachment resource docs because of it is not public totally([#420](https://github.com/aliyun/terraform-provider-alicloud/issues/420)) +- Improve examples/ots-table([#417](https://github.com/aliyun/terraform-provider-alicloud/issues/417)) +- Improve examples ecs-vpc, ecs-new-vpc and api-gateway([#416](https://github.com/aliyun/terraform-provider-alicloud/issues/416)) BUG FIXES: -- Fix reources' id description bugs ([#428](https://github.com/aliyun/terraform-provider-alicloud/issues/428)) -- Fix alicloud_ess_scaling_configuration setting data_disk failed ([#427](https://github.com/aliyun/terraform-provider-alicloud/issues/427)) +- Fix reources' id description bugs([#428](https://github.com/aliyun/terraform-provider-alicloud/issues/428)) +- Fix alicloud_ess_scaling_configuration setting data_disk failed([#427](https://github.com/aliyun/terraform-provider-alicloud/issues/427)) ## 1.19.0 (October 13, 2018) FEATURES: -- **New Resource:** `alicloud_api_gateway_group` ([#409](https://github.com/aliyun/terraform-provider-alicloud/issues/409)) -- **New Resource:** `alicloud_datahub_subscription` ([#405](https://github.com/aliyun/terraform-provider-alicloud/issues/405)) -- **New Resource:** `alicloud_datahub_topic` ([#404](https://github.com/aliyun/terraform-provider-alicloud/issues/404)) -- **New Resource:** `alicloud_datahub_project` ([#403](https://github.com/aliyun/terraform-provider-alicloud/issues/403)) -- **New Data Source:** `alicloud_api_gateway_groups` ([#412](https://github.com/aliyun/terraform-provider-alicloud/issues/412)) -- **New Data Source:** `alicloud_cen_bandwidth_limits` ([#402](https://github.com/aliyun/terraform-provider-alicloud/issues/402)) +- **New Resource:** `alicloud_api_gateway_group`([#409](https://github.com/aliyun/terraform-provider-alicloud/issues/409)) +- **New Resource:** `alicloud_datahub_subscription`([#405](https://github.com/aliyun/terraform-provider-alicloud/issues/405)) +- **New Resource:** `alicloud_datahub_topic`([#404](https://github.com/aliyun/terraform-provider-alicloud/issues/404)) +- **New Resource:** `alicloud_datahub_project`([#403](https://github.com/aliyun/terraform-provider-alicloud/issues/403)) +- **New Data Source:** `alicloud_api_gateway_groups`([#412](https://github.com/aliyun/terraform-provider-alicloud/issues/412)) +- **New Data Source:** `alicloud_cen_bandwidth_limits`([#402](https://github.com/aliyun/terraform-provider-alicloud/issues/402)) IMPROVEMENTS: -- added need_slb attribute to cs swarm ([#414](https://github.com/aliyun/terraform-provider-alicloud/issues/414)) -- Add new example/datahub ([#407](https://github.com/aliyun/terraform-provider-alicloud/issues/407)) -- Add new example/datahub ([#406](https://github.com/aliyun/terraform-provider-alicloud/issues/406)) -- Format examples ([#397](https://github.com/aliyun/terraform-provider-alicloud/issues/397)) -- Add new example/kvstore ([#396](https://github.com/aliyun/terraform-provider-alicloud/issues/396)) -- Remove useless datasource cache file ([#395](https://github.com/aliyun/terraform-provider-alicloud/issues/395)) -- Add new example/pvtz ([#394](https://github.com/aliyun/terraform-provider-alicloud/issues/394)) -- Improve example/ecs-key-pair ([#393](https://github.com/aliyun/terraform-provider-alicloud/issues/393)) -- Change key pair file mode to 400 ([#392](https://github.com/aliyun/terraform-provider-alicloud/issues/392)) +- added need_slb attribute to cs swarm([#414](https://github.com/aliyun/terraform-provider-alicloud/issues/414)) +- Add new example/datahub([#407](https://github.com/aliyun/terraform-provider-alicloud/issues/407)) +- Add new example/datahub([#406](https://github.com/aliyun/terraform-provider-alicloud/issues/406)) +- Format examples([#397](https://github.com/aliyun/terraform-provider-alicloud/issues/397)) +- Add new example/kvstore([#396](https://github.com/aliyun/terraform-provider-alicloud/issues/396)) +- Remove useless datasource cache file([#395](https://github.com/aliyun/terraform-provider-alicloud/issues/395)) +- Add new example/pvtz([#394](https://github.com/aliyun/terraform-provider-alicloud/issues/394)) +- Improve example/ecs-key-pair([#393](https://github.com/aliyun/terraform-provider-alicloud/issues/393)) +- Change key pair file mode to 400([#392](https://github.com/aliyun/terraform-provider-alicloud/issues/392)) BUG FIXES: -- fix kubernetes's new_nat_gateway issue ([#410](https://github.com/aliyun/terraform-provider-alicloud/issues/410)) -- modify the mns err info ([#400](https://github.com/aliyun/terraform-provider-alicloud/issues/400)) -- Skip havip test case ([#399](https://github.com/aliyun/terraform-provider-alicloud/issues/399)) -- modify the sweeptest nameprefix ([#398](https://github.com/aliyun/terraform-provider-alicloud/issues/398)) +- fix kubernetes's new_nat_gateway issue([#410](https://github.com/aliyun/terraform-provider-alicloud/issues/410)) +- modify the mns err info([#400](https://github.com/aliyun/terraform-provider-alicloud/issues/400)) +- Skip havip test case([#399](https://github.com/aliyun/terraform-provider-alicloud/issues/399)) +- modify the sweeptest nameprefix([#398](https://github.com/aliyun/terraform-provider-alicloud/issues/398)) ## 1.18.0 (October 09, 2018) FEATURES: -- **New Resource:** `alicloud_havip` ([#378](https://github.com/aliyun/terraform-provider-alicloud/issues/378)) -- **New Resource:** `alicloud_havip_attachment` ([#388](https://github.com/aliyun/terraform-provider-alicloud/issues/388)) -- **New Resource:** `alicloud_mns_topic_subscription` ([#376](https://github.com/aliyun/terraform-provider-alicloud/issues/376)) -- **New Resource:** `alicloud_route_table_attachment` ([#362](https://github.com/aliyun/terraform-provider-alicloud/issues/362)) -- **New Resource:** `alicloud_cen_bandwidth_limit` ([#361](https://github.com/aliyun/terraform-provider-alicloud/issues/361)) -- **New Resource:** `alicloud_mns_topic` ([#374](https://github.com/aliyun/terraform-provider-alicloud/issues/374)) -- **New Resource:** `alicloud_mns_queue` ([#365](https://github.com/aliyun/terraform-provider-alicloud/issues/365)) -- **New Resource:** `alicloud_cen_bandwidth_package_attachment` ([#354](https://github.com/aliyun/terraform-provider-alicloud/issues/354)) -- **New Resource:** `alicloud_route_table` ([#356](https://github.com/aliyun/terraform-provider-alicloud/issues/356)) -- **New Data Source:** `alicloud_mns_queues` ([#382](https://github.com/aliyun/terraform-provider-alicloud/issues/382)) -- **New Data Source:** `alicloud_mns_topics` ([#384](https://github.com/aliyun/terraform-provider-alicloud/issues/384)) -- **New Data Source:** `alicloud_mns_topic_subscriptions` ([#386](https://github.com/aliyun/terraform-provider-alicloud/issues/386)) -- **New Data Source:** `alicloud_cen_bandwidth_packages` ([#367](https://github.com/aliyun/terraform-provider-alicloud/issues/367)) -- **New Data Source:** `alicloud_vpn_connections` ([#366](https://github.com/aliyun/terraform-provider-alicloud/issues/366)) -- **New Data Source:** `alicloud_vpn_gateways` ([#363](https://github.com/aliyun/terraform-provider-alicloud/issues/363)) -- **New Data Source:** `alicloud_vpn_customer_gateways` ([#364](https://github.com/aliyun/terraform-provider-alicloud/issues/364)) -- **New Data Source:** `alicloud_cen_instances` ([#342](https://github.com/aliyun/terraform-provider-alicloud/issues/342)) - -IMPROVEMENTS: - -- Improve resource ram_policy's document validatefunc ([#385](https://github.com/aliyun/terraform-provider-alicloud/issues/385)) -- RAM support useragent ([#383](https://github.com/aliyun/terraform-provider-alicloud/issues/383)) -- add node_cidr_mas and log_config, fix worker_data_disk issue ([#368](https://github.com/aliyun/terraform-provider-alicloud/issues/368)) -- Improve WaitForRouteTable and WaitForRouteTableAttachment method ([#375](https://github.com/aliyun/terraform-provider-alicloud/issues/375)) -- Correct Function Compute conn ([#371](https://github.com/aliyun/terraform-provider-alicloud/issues/371)) -- Improve datasource `images`'s docs ([#370](https://github.com/aliyun/terraform-provider-alicloud/issues/370)) -- add worker_data_disk_category and worker_data_disk_size to kubernetes creation ([#355](https://github.com/aliyun/terraform-provider-alicloud/issues/355)) - -BUG FIXES: - -- Fix alicloud_ram_user_policy_attachment EntityNotExist.User error ([#381](https://github.com/aliyun/terraform-provider-alicloud/issues/381)) -- Add parameter 'force_delete' to support deleting 'PrePaid' instance ([#377](https://github.com/aliyun/terraform-provider-alicloud/issues/377)) -- Add wait time to fix random detaching disk error ([#373](https://github.com/aliyun/terraform-provider-alicloud/issues/373)) -- Fix cen_instances markdown ([#372](https://github.com/aliyun/terraform-provider-alicloud/issues/372)) +- **New Resource:** `alicloud_havip`([#378](https://github.com/aliyun/terraform-provider-alicloud/issues/378)) +- **New Resource:** `alicloud_havip_attachment`([#388](https://github.com/aliyun/terraform-provider-alicloud/issues/388)) +- **New Resource:** `alicloud_mns_topic_subscription`([#376](https://github.com/aliyun/terraform-provider-alicloud/issues/376)) +- **New Resource:** `alicloud_route_table_attachment`([#362](https://github.com/aliyun/terraform-provider-alicloud/issues/362)) +- **New Resource:** `alicloud_cen_bandwidth_limit`([#361](https://github.com/aliyun/terraform-provider-alicloud/issues/361)) +- **New Resource:** `alicloud_mns_topic`([#374](https://github.com/aliyun/terraform-provider-alicloud/issues/374)) +- **New Resource:** `alicloud_mns_queue`([#365](https://github.com/aliyun/terraform-provider-alicloud/issues/365)) +- **New Resource:** `alicloud_cen_bandwidth_package_attachment`([#354](https://github.com/aliyun/terraform-provider-alicloud/issues/354)) +- **New Resource:** `alicloud_route_table`([#356](https://github.com/aliyun/terraform-provider-alicloud/issues/356)) +- **New Data Source:** `alicloud_mns_queues`([#382](https://github.com/aliyun/terraform-provider-alicloud/issues/382)) +- **New Data Source:** `alicloud_mns_topics`([#384](https://github.com/aliyun/terraform-provider-alicloud/issues/384)) +- **New Data Source:** `alicloud_mns_topic_subscriptions`([#386](https://github.com/aliyun/terraform-provider-alicloud/issues/386)) +- **New Data Source:** `alicloud_cen_bandwidth_packages`([#367](https://github.com/aliyun/terraform-provider-alicloud/issues/367)) +- **New Data Source:** `alicloud_vpn_connections`([#366](https://github.com/aliyun/terraform-provider-alicloud/issues/366)) +- **New Data Source:** `alicloud_vpn_gateways`([#363](https://github.com/aliyun/terraform-provider-alicloud/issues/363)) +- **New Data Source:** `alicloud_vpn_customer_gateways`([#364](https://github.com/aliyun/terraform-provider-alicloud/issues/364)) +- **New Data Source:** `alicloud_cen_instances`([#342](https://github.com/aliyun/terraform-provider-alicloud/issues/342)) + +IMPROVEMENTS: + +- Improve resource ram_policy's document validatefunc([#385](https://github.com/aliyun/terraform-provider-alicloud/issues/385)) +- RAM support useragent([#383](https://github.com/aliyun/terraform-provider-alicloud/issues/383)) +- add node_cidr_mas and log_config, fix worker_data_disk issue([#368](https://github.com/aliyun/terraform-provider-alicloud/issues/368)) +- Improve WaitForRouteTable and WaitForRouteTableAttachment method([#375](https://github.com/aliyun/terraform-provider-alicloud/issues/375)) +- Correct Function Compute conn([#371](https://github.com/aliyun/terraform-provider-alicloud/issues/371)) +- Improve datasource `images`'s docs([#370](https://github.com/aliyun/terraform-provider-alicloud/issues/370)) +- add worker_data_disk_category and worker_data_disk_size to kubernetes creation([#355](https://github.com/aliyun/terraform-provider-alicloud/issues/355)) + +BUG FIXES: + +- Fix alicloud_ram_user_policy_attachment EntityNotExist.User error([#381](https://github.com/aliyun/terraform-provider-alicloud/issues/381)) +- Add parameter 'force_delete' to support deleting 'PrePaid' instance([#377](https://github.com/aliyun/terraform-provider-alicloud/issues/377)) +- Add wait time to fix random detaching disk error([#373](https://github.com/aliyun/terraform-provider-alicloud/issues/373)) +- Fix cen_instances markdown([#372](https://github.com/aliyun/terraform-provider-alicloud/issues/372)) ## 1.17.0 (September 22, 2018) FEATURES: -- **New Data Source:** `alicloud_fc_triggers` ([#351](https://github.com/aliyun/terraform-provider-alicloud/pull/351)) -- **New Data Source:** `alicloud_oss_bucket_objects` ([#350](https://github.com/aliyun/terraform-provider-alicloud/pull/350)) -- **New Data Source:** `alicloud_fc_functions` ([#349](https://github.com/aliyun/terraform-provider-alicloud/pull/349)) -- **New Data Source:** `alicloud_fc_services` ([#348](https://github.com/aliyun/terraform-provider-alicloud/pull/348)) -- **New Data Source:** `alicloud_oss_buckets` ([#345](https://github.com/aliyun/terraform-provider-alicloud/pull/345)) -- **New Data Source:** `alicloud_disks` ([#343](https://github.com/aliyun/terraform-provider-alicloud/pull/343)) -- **New Resource:** `alicloud_cen_bandwidth_package` ([#333](https://github.com/aliyun/terraform-provider-alicloud/pull/333)) +- **New Data Source:** `alicloud_fc_triggers`([#351](https://github.com/aliyun/terraform-provider-alicloud/pull/351)) +- **New Data Source:** `alicloud_oss_bucket_objects`([#350](https://github.com/aliyun/terraform-provider-alicloud/pull/350)) +- **New Data Source:** `alicloud_fc_functions`([#349](https://github.com/aliyun/terraform-provider-alicloud/pull/349)) +- **New Data Source:** `alicloud_fc_services`([#348](https://github.com/aliyun/terraform-provider-alicloud/pull/348)) +- **New Data Source:** `alicloud_oss_buckets`([#345](https://github.com/aliyun/terraform-provider-alicloud/pull/345)) +- **New Data Source:** `alicloud_disks`([#343](https://github.com/aliyun/terraform-provider-alicloud/pull/343)) +- **New Resource:** `alicloud_cen_bandwidth_package`([#333](https://github.com/aliyun/terraform-provider-alicloud/pull/333)) IMPROVEMENTS: -- Update OSS Resources' link to English ([#352](https://github.com/aliyun/terraform-provider-alicloud/pull/352)) -- Improve example/kubernetes to support multi-az ([#344](https://github.com/aliyun/terraform-provider-alicloud/pull/344)) +- Update OSS Resources' link to English([#352](https://github.com/aliyun/terraform-provider-alicloud/pull/352)) +- Improve example/kubernetes to support multi-az([#344](https://github.com/aliyun/terraform-provider-alicloud/pull/344)) ## 1.16.0 (September 16, 2018) FEATURES: -- **New Resource:** `alicloud_cen_instance_attachment` ([#327](https://github.com/aliyun/terraform-provider-alicloud/pull/327)) +- **New Resource:** `alicloud_cen_instance_attachment`([#327](https://github.com/aliyun/terraform-provider-alicloud/pull/327)) IMPROVEMENTS: -- Allow setting the scaling group balancing policy ([#339](https://github.com/aliyun/terraform-provider-alicloud/pull/339)) -- cs_kubernetes supports multi-az ([#222](https://github.com/aliyun/terraform-provider-alicloud/pull/222)) -- Improve client token using timestemp ([#326](https://github.com/aliyun/terraform-provider-alicloud/pull/326)) +- Allow setting the scaling group balancing policy([#339](https://github.com/aliyun/terraform-provider-alicloud/pull/339)) +- cs_kubernetes supports multi-az([#222](https://github.com/aliyun/terraform-provider-alicloud/pull/222)) +- Improve client token using timestemp([#326](https://github.com/aliyun/terraform-provider-alicloud/pull/326)) BUG FIXES: -- Fix alicloud db connection ([#341](https://github.com/aliyun/terraform-provider-alicloud/pull/341)) -- Fix knstore productId ([#338](https://github.com/aliyun/terraform-provider-alicloud/pull/338)) -- Fix retriving kvstore multi zones bug ([#337](https://github.com/aliyun/terraform-provider-alicloud/pull/337)) -- Fix kvstore instance period bug ([#335](https://github.com/aliyun/terraform-provider-alicloud/pull/335)) -- Fix kvstore docs bug ([#334](https://github.com/aliyun/terraform-provider-alicloud/pull/334)) +- Fix alicloud db connection([#341](https://github.com/aliyun/terraform-provider-alicloud/pull/341)) +- Fix knstore productId([#338](https://github.com/aliyun/terraform-provider-alicloud/pull/338)) +- Fix retriving kvstore multi zones bug([#337](https://github.com/aliyun/terraform-provider-alicloud/pull/337)) +- Fix kvstore instance period bug([#335](https://github.com/aliyun/terraform-provider-alicloud/pull/335)) +- Fix kvstore docs bug([#334](https://github.com/aliyun/terraform-provider-alicloud/pull/334)) ## 1.15.0 (September 07, 2018) FEATURES: -- **New Resource:** `alicloud_kvstore_backup_policy` ([#331](https://github.com/aliyun/terraform-provider-alicloud/pull/331)) -- **New Resource:** `alicloud_kvstore_instance` ([#330](https://github.com/aliyun/terraform-provider-alicloud/pull/330)) -- **New Data Source:** `alicloud_kvstore_instances` ([#329](https://github.com/aliyun/terraform-provider-alicloud/pull/329)) -- **New Resource:** `alicloud_ess_alarm` ([#328](https://github.com/aliyun/terraform-provider-alicloud/pull/328)) -- **New Resource:** `alicloud_ssl_vpn_client_cert` ([#317](https://github.com/aliyun/terraform-provider-alicloud/pull/317)) -- **New Resource:** `alicloud_cen_instance` ([#312](https://github.com/aliyun/terraform-provider-alicloud/pull/312)) -- **New Data Source:** `alicloud_slb_server_groups` ([#324](https://github.com/aliyun/terraform-provider-alicloud/pull/324)) -- **New Data Source:** `alicloud_slb_rules` ([#323](https://github.com/aliyun/terraform-provider-alicloud/pull/323)) -- **New Data Source:** `alicloud_slb_listeners` ([#323](https://github.com/aliyun/terraform-provider-alicloud/pull/323)) -- **New Data Source:** `alicloud_slb_attachments` ([#322](https://github.com/aliyun/terraform-provider-alicloud/pull/322)) -- **New Data Source:** `alicloud_slbs` ([#321](https://github.com/aliyun/terraform-provider-alicloud/pull/321)) -- **New Data Source:** `alicloud_account` ([#319](https://github.com/aliyun/terraform-provider-alicloud/pull/319)) -- **New Resource:** `alicloud_ssl_vpn_server` ([#313](https://github.com/aliyun/terraform-provider-alicloud/pull/313)) +- **New Resource:** `alicloud_kvstore_backup_policy`([#331](https://github.com/aliyun/terraform-provider-alicloud/pull/331)) +- **New Resource:** `alicloud_kvstore_instance`([#330](https://github.com/aliyun/terraform-provider-alicloud/pull/330)) +- **New Data Source:** `alicloud_kvstore_instances`([#329](https://github.com/aliyun/terraform-provider-alicloud/pull/329)) +- **New Resource:** `alicloud_ess_alarm`([#328](https://github.com/aliyun/terraform-provider-alicloud/pull/328)) +- **New Resource:** `alicloud_ssl_vpn_client_cert`([#317](https://github.com/aliyun/terraform-provider-alicloud/pull/317)) +- **New Resource:** `alicloud_cen_instance`([#312](https://github.com/aliyun/terraform-provider-alicloud/pull/312)) +- **New Data Source:** `alicloud_slb_server_groups` ([#324](https://github.com/aliyun/terraform-provider-alicloud/pull/324)) +- **New Data Source:** `alicloud_slb_rules` ([#323](https://github.com/aliyun/terraform-provider-alicloud/pull/323)) +- **New Data Source:** `alicloud_slb_listeners` ([#323](https://github.com/aliyun/terraform-provider-alicloud/pull/323)) +- **New Data Source:** `alicloud_slb_attachments` ([#322](https://github.com/aliyun/terraform-provider-alicloud/pull/322)) +- **New Data Source:** `alicloud_slbs` ([#321](https://github.com/aliyun/terraform-provider-alicloud/pull/321)) +- **New Data Source:** `alicloud_account` ([#319](https://github.com/aliyun/terraform-provider-alicloud/pull/319)) +- **New Resource:** `alicloud_ssl_vpn_server`([#313](https://github.com/aliyun/terraform-provider-alicloud/pull/313)) IMPROVEMENTS: -- Support sweeper to clean some resources coming from failed testcases ([#326](https://github.com/aliyun/terraform-provider-alicloud/pull/326)) -- Improve function compute tst cases ([#325](https://github.com/aliyun/terraform-provider-alicloud/pull/325)) -- Improve fc test case using new datasource `alicloud_account` ([#320](https://github.com/aliyun/terraform-provider-alicloud/pull/320)) -- Base64 encode ESS scaling config user_data ([#315](https://github.com/aliyun/terraform-provider-alicloud/pull/315)) -- Retrieve the account_id automatically if needed ([#314](https://github.com/aliyun/terraform-provider-alicloud/pull/314)) +- Support sweeper to clean some resources coming from failed testcases([#326](https://github.com/aliyun/terraform-provider-alicloud/pull/326)) +- Improve function compute tst cases([#325](https://github.com/aliyun/terraform-provider-alicloud/pull/325)) +- Improve fc test case using new datasource `alicloud_account`([#320](https://github.com/aliyun/terraform-provider-alicloud/pull/320)) +- Base64 encode ESS scaling config user_data([#315](https://github.com/aliyun/terraform-provider-alicloud/pull/315)) +- Retrieve the account_id automatically if needed([#314](https://github.com/aliyun/terraform-provider-alicloud/pull/314)) BUG FIXES: -- Fix DNS tests falied error ([#318](https://github.com/aliyun/terraform-provider-alicloud/pull/318)) -- Fix DB database not found error ([#316](https://github.com/aliyun/terraform-provider-alicloud/pull/316)) +- Fix DNS tests falied error([#318](https://github.com/aliyun/terraform-provider-alicloud/pull/318)) +- Fix DB database not found error([#316](https://github.com/aliyun/terraform-provider-alicloud/pull/316)) ## 1.14.0 (August 31, 2018) FEATURES: -- **New Resource:** `alicloud_vpn_connection` ([#304](https://github.com/aliyun/terraform-provider-alicloud/pull/304)) -- **New Resource:** `alicloud_vpn_customer_gateway` ([#299](https://github.com/aliyun/terraform-provider-alicloud/pull/299)) +- **New Resource:** `alicloud_vpn_connection`([#304](https://github.com/aliyun/terraform-provider-alicloud/pull/304)) +- **New Resource:** `alicloud_vpn_customer_gateway`([#299](https://github.com/aliyun/terraform-provider-alicloud/pull/299)) IMPROVEMENTS: -- Add 'force' to make key pair affect immediately ([#310](https://github.com/aliyun/terraform-provider-alicloud/pull/310)) -- Improve http proxy support ([#307](https://github.com/aliyun/terraform-provider-alicloud/pull/307)) -- Add flags to skip tests that use features not supported in all regions ([#306](https://github.com/aliyun/terraform-provider-alicloud/pull/306)) -- Improve data source dns_domains test case ([#305](https://github.com/aliyun/terraform-provider-alicloud/pull/305)) -- Change SDK config timeout ([#302](https://github.com/aliyun/terraform-provider-alicloud/pull/302)) -- Support ClientToken for some request ([#301](https://github.com/aliyun/terraform-provider-alicloud/pull/301)) -- Enlarge sdk default timeout to fix some timeout scenario ([#300](https://github.com/aliyun/terraform-provider-alicloud/pull/300)) +- Add 'force' to make key pair affect immediately([#310](https://github.com/aliyun/terraform-provider-alicloud/pull/310)) +- Improve http proxy support([#307](https://github.com/aliyun/terraform-provider-alicloud/pull/307)) +- Add flags to skip tests that use features not supported in all regions([#306](https://github.com/aliyun/terraform-provider-alicloud/pull/306)) +- Improve data source dns_domains test case([#305](https://github.com/aliyun/terraform-provider-alicloud/pull/305)) +- Change SDK config timeout([#302](https://github.com/aliyun/terraform-provider-alicloud/pull/302)) +- Support ClientToken for some request([#301](https://github.com/aliyun/terraform-provider-alicloud/pull/301)) +- Enlarge sdk default timeout to fix some timeout scenario([#300](https://github.com/aliyun/terraform-provider-alicloud/pull/300)) BUG FIXES: -- Fix container cluster SDK timezone error ([#308](https://github.com/aliyun/terraform-provider-alicloud/pull/308)) -- Fix network products throttling error ([#303](https://github.com/aliyun/terraform-provider-alicloud/pull/303)) +- Fix container cluster SDK timezone error([#308](https://github.com/aliyun/terraform-provider-alicloud/pull/308)) +- Fix network products throttling error([#303](https://github.com/aliyun/terraform-provider-alicloud/pull/303)) ## 1.13.0 (August 28, 2018) FEATURES: -- **New Resource:** `alicloud_vpn_gateway` ([#298](https://github.com/aliyun/terraform-provider-alicloud/pull/298)) -- **New Data Source:** `alicloud_mongo_instances` ([#221](https://github.com/aliyun/terraform-provider-alicloud/pull/221)) -- **New Data Source:** `alicloud_pvtz_zone_records` ([#288](https://github.com/aliyun/terraform-provider-alicloud/pull/288)) -- **New Data Source:** `alicloud_pvtz_zones` ([#287](https://github.com/aliyun/terraform-provider-alicloud/pull/287)) -- **New Resource:** `alicloud_pvtz_zone_record` ([#286](https://github.com/aliyun/terraform-provider-alicloud/pull/286)) -- **New Resource:** `alicloud_pvtz_zone_attachment` ([#285](https://github.com/aliyun/terraform-provider-alicloud/pull/285)) -- **New Resource:** `alicloud_pvtz_zone` ([#284](https://github.com/aliyun/terraform-provider-alicloud/pull/284)) -- **New Resource:** `alicloud_ess_lifecycle_hook` ([#283](https://github.com/aliyun/terraform-provider-alicloud/pull/283)) -- **New Data Source:** `alicloud_router_interfaces` ([#269](https://github.com/aliyun/terraform-provider-alicloud/pull/269)) - -IMPROVEMENTS: - -- Check pvtzconn error ([#295](https://github.com/aliyun/terraform-provider-alicloud/pull/295)) -- For internationalize tests ([#294](https://github.com/aliyun/terraform-provider-alicloud/pull/294)) -- Improve data source docs ([#293](https://github.com/aliyun/terraform-provider-alicloud/pull/293)) -- Add SLB PayByBandwidth test case ([#292](https://github.com/aliyun/terraform-provider-alicloud/pull/292)) -- Update vpc sdk to support new resource VPN gateway ([#291](https://github.com/aliyun/terraform-provider-alicloud/pull/291)) -- Improve snat entry test case ([#290](https://github.com/aliyun/terraform-provider-alicloud/pull/290)) -- Allow empty list of SLBs as arg to ESG ([#289](https://github.com/aliyun/terraform-provider-alicloud/pull/289)) -- Improve docs vroute_entry ([#281](https://github.com/aliyun/terraform-provider-alicloud/pull/281)) -- Improve examples/router_interface ([#278](https://github.com/aliyun/terraform-provider-alicloud/pull/278)) -- Improve SLB instance test case ([#274](https://github.com/aliyun/terraform-provider-alicloud/pull/274)) -- Improve alicloud_router_interface's test case ([#272](https://github.com/aliyun/terraform-provider-alicloud/pull/272)) -- Improve data source alicloud_regions's test case ([#271](https://github.com/aliyun/terraform-provider-alicloud/pull/271)) -- Add notes about ordering between two alicloud_router_interface_connections ([#270](https://github.com/aliyun/terraform-provider-alicloud/pull/270)) -- Improve docs spelling error ([#268](https://github.com/aliyun/terraform-provider-alicloud/pull/268)) -- ECS instance support more tags and update instance test cases ([#267](https://github.com/aliyun/terraform-provider-alicloud/pull/267)) -- Improve OSS bucket test case ([#266](https://github.com/aliyun/terraform-provider-alicloud/pull/266)) -- Fixing a broken link ([#265](https://github.com/aliyun/terraform-provider-alicloud/pull/265)) -- Allow creation of slb vserver group with 0 servers ([#264](https://github.com/aliyun/terraform-provider-alicloud/pull/264)) -- Improve SLB test cases results from international regions does support PayByBandwidth and ' Guaranteed-performance' instance ([#263](https://github.com/aliyun/terraform-provider-alicloud/pull/263)) -- Improve EIP test cases results from international regions does support PayByBandwidth ([#262](https://github.com/aliyun/terraform-provider-alicloud/pull/262)) -- Improve ESS test cases results from some region does support Classic Network ([#261](https://github.com/aliyun/terraform-provider-alicloud/pull/261)) -- Recover nat gateway bandwidth pacakges to meet stock user requirements ([#260](https://github.com/aliyun/terraform-provider-alicloud/pull/260)) -- Resource alicloud_slb_listener supports new field 'x-forwarded-for' ([#259](https://github.com/aliyun/terraform-provider-alicloud/pull/259)) -- Resource alicloud_slb_listener supports new field 'gzip' ([#258](https://github.com/aliyun/terraform-provider-alicloud/pull/258)) - -BUG FIXES: - -- Fix getting oss endpoint timeout error ([#282](https://github.com/aliyun/terraform-provider-alicloud/pull/282)) -- Fix router interface connection error when 'opposite_interface_owner_id' is empty ([#277](https://github.com/aliyun/terraform-provider-alicloud/pull/277)) -- Fix router interface connection error and deleting error ([#275](https://github.com/aliyun/terraform-provider-alicloud/pull/275)) -- Fix disk detach error and improve test using dynamic zone and region ([#273](https://github.com/aliyun/terraform-provider-alicloud/pull/273)) +- **New Resource:** `alicloud_vpn_gateway`([#298](https://github.com/aliyun/terraform-provider-alicloud/pull/298)) +- **New Data Source:** `alicloud_mongo_instances`([#221](https://github.com/aliyun/terraform-provider-alicloud/pull/221)) +- **New Data Source:** `alicloud_pvtz_zone_records`([#288](https://github.com/aliyun/terraform-provider-alicloud/pull/288)) +- **New Data Source:** `alicloud_pvtz_zones`([#287](https://github.com/aliyun/terraform-provider-alicloud/pull/287)) +- **New Resource:** `alicloud_pvtz_zone_record`([#286](https://github.com/aliyun/terraform-provider-alicloud/pull/286)) +- **New Resource:** `alicloud_pvtz_zone_attachment`([#285](https://github.com/aliyun/terraform-provider-alicloud/pull/285)) +- **New Resource:** `alicloud_pvtz_zone`([#284](https://github.com/aliyun/terraform-provider-alicloud/pull/284)) +- **New Resource:** `alicloud_ess_lifecycle_hook`([#283](https://github.com/aliyun/terraform-provider-alicloud/pull/283)) +- **New Data Source:** `alicloud_router_interfaces`([#269](https://github.com/aliyun/terraform-provider-alicloud/pull/269)) + +IMPROVEMENTS: + +- Check pvtzconn error([#295](https://github.com/aliyun/terraform-provider-alicloud/pull/295)) +- For internationalize tests([#294](https://github.com/aliyun/terraform-provider-alicloud/pull/294)) +- Improve data source docs([#293](https://github.com/aliyun/terraform-provider-alicloud/pull/293)) +- Add SLB PayByBandwidth test case([#292](https://github.com/aliyun/terraform-provider-alicloud/pull/292)) +- Update vpc sdk to support new resource VPN gateway([#291](https://github.com/aliyun/terraform-provider-alicloud/pull/291)) +- Improve snat entry test case([#290](https://github.com/aliyun/terraform-provider-alicloud/pull/290)) +- Allow empty list of SLBs as arg to ESG([#289](https://github.com/aliyun/terraform-provider-alicloud/pull/289)) +- Improve docs vroute_entry([#281](https://github.com/aliyun/terraform-provider-alicloud/pull/281)) +- Improve examples/router_interface([#278](https://github.com/aliyun/terraform-provider-alicloud/pull/278)) +- Improve SLB instance test case([#274](https://github.com/aliyun/terraform-provider-alicloud/pull/274)) +- Improve alicloud_router_interface's test case([#272](https://github.com/aliyun/terraform-provider-alicloud/pull/272)) +- Improve data source alicloud_regions's test case([#271](https://github.com/aliyun/terraform-provider-alicloud/pull/271)) +- Add notes about ordering between two alicloud_router_interface_connections([#270](https://github.com/aliyun/terraform-provider-alicloud/pull/270)) +- Improve docs spelling error([#268](https://github.com/aliyun/terraform-provider-alicloud/pull/268)) +- ECS instance support more tags and update instance test cases([#267](https://github.com/aliyun/terraform-provider-alicloud/pull/267)) +- Improve OSS bucket test case([#266](https://github.com/aliyun/terraform-provider-alicloud/pull/266)) +- Fixing a broken link([#265](https://github.com/aliyun/terraform-provider-alicloud/pull/265)) +- Allow creation of slb vserver group with 0 servers([#264](https://github.com/aliyun/terraform-provider-alicloud/pull/264)) +- Improve SLB test cases results from international regions does support PayByBandwidth and ' Guaranteed-performance' instance([#263](https://github.com/aliyun/terraform-provider-alicloud/pull/263)) +- Improve EIP test cases results from international regions does support PayByBandwidth([#262](https://github.com/aliyun/terraform-provider-alicloud/pull/262)) +- Improve ESS test cases results from some region does support Classic Network([#261](https://github.com/aliyun/terraform-provider-alicloud/pull/261)) +- Recover nat gateway bandwidth pacakges to meet stock user requirements([#260](https://github.com/aliyun/terraform-provider-alicloud/pull/260)) +- Resource alicloud_slb_listener supports new field 'x-forwarded-for'([#259](https://github.com/aliyun/terraform-provider-alicloud/pull/259)) +- Resource alicloud_slb_listener supports new field 'gzip'([#258](https://github.com/aliyun/terraform-provider-alicloud/pull/258)) + +BUG FIXES: + +- Fix getting oss endpoint timeout error([#282](https://github.com/aliyun/terraform-provider-alicloud/pull/282)) +- Fix router interface connection error when 'opposite_interface_owner_id' is empty([#277](https://github.com/aliyun/terraform-provider-alicloud/pull/277)) +- Fix router interface connection error and deleting error([#275](https://github.com/aliyun/terraform-provider-alicloud/pull/275)) +- Fix disk detach error and improve test using dynamic zone and region([#273](https://github.com/aliyun/terraform-provider-alicloud/pull/273)) ## 1.12.0 (August 10, 2018) IMPROVEMENTS: -- Improve `make build` ([#256](https://github.com/aliyun/terraform-provider-alicloud/pull/256)) -- Improve examples slb and slb-vpc by modifying 'paybytraffic' to 'PayByTraffic' ([#256](https://github.com/aliyun/terraform-provider-alicloud/pull/256)) -- Improve example/router-interface by adding resource alicloud_router_interface_connection ([#255](https://github.com/aliyun/terraform-provider-alicloud/pull/255)) -- Support more specification of router interface ([#253](https://github.com/aliyun/terraform-provider-alicloud/pull/253)) -- Improve resource alicloud_fc_service docs ([#252](https://github.com/aliyun/terraform-provider-alicloud/pull/252)) -- Modify resource alicloud_fc_function 'handler' is required ([#251](https://github.com/aliyun/terraform-provider-alicloud/pull/251)) -- Resource alicloud_router_interface support "import" function ([#249](https://github.com/aliyun/terraform-provider-alicloud/pull/249)) -- Deprecate some field of alicloud_router_interface fields and use new resource instead ([#248](https://github.com/aliyun/terraform-provider-alicloud/pull/248)) -- *New Resource*: _alicloud_router_interface_connection_ ([#247](https://github.com/aliyun/terraform-provider-alicloud/pull/247)) +- Improve `make build`([#256](https://github.com/aliyun/terraform-provider-alicloud/pull/256)) +- Improve examples slb and slb-vpc by modifying 'paybytraffic' to 'PayByTraffic'([#256](https://github.com/aliyun/terraform-provider-alicloud/pull/256)) +- Improve example/router-interface by adding resource alicloud_router_interface_connection([#255](https://github.com/aliyun/terraform-provider-alicloud/pull/255)) +- Support more specification of router interface([#253](https://github.com/aliyun/terraform-provider-alicloud/pull/253)) +- Improve resource alicloud_fc_service docs([#252](https://github.com/aliyun/terraform-provider-alicloud/pull/252)) +- Modify resource alicloud_fc_function 'handler' is required([#251](https://github.com/aliyun/terraform-provider-alicloud/pull/251)) +- Resource alicloud_router_interface support "import" function([#249](https://github.com/aliyun/terraform-provider-alicloud/pull/249)) +- Deprecate some field of alicloud_router_interface fields and use new resource instead([#248](https://github.com/aliyun/terraform-provider-alicloud/pull/248)) +- *New Resource*: _alicloud_router_interface_connection_([#247](https://github.com/aliyun/terraform-provider-alicloud/pull/247)) BUG FIXES: -- Fix network resource throttling error ([#257](https://github.com/aliyun/terraform-provider-alicloud/pull/257)) -- Fix resource alicloud_fc_trigger "source_arn" inputting empty error ([#253](https://github.com/aliyun/terraform-provider-alicloud/pull/253)) -- Fix describing vpcs with name_regex no results error ([#250](https://github.com/aliyun/terraform-provider-alicloud/pull/250)) -- Fix creating slb listener in international region failed error ([#246](https://github.com/aliyun/terraform-provider-alicloud/pull/246)) +- Fix network resource throttling error([#257](https://github.com/aliyun/terraform-provider-alicloud/pull/257)) +- Fix resource alicloud_fc_trigger "source_arn" inputting empty error([#253](https://github.com/aliyun/terraform-provider-alicloud/pull/253)) +- Fix describing vpcs with name_regex no results error([#250](https://github.com/aliyun/terraform-provider-alicloud/pull/250)) +- Fix creating slb listener in international region failed error([#246](https://github.com/aliyun/terraform-provider-alicloud/pull/246)) ## 1.11.0 (August 08, 2018) IMPROVEMENTS: -- Resource alicloud_eip support name and description ([#244](https://github.com/aliyun/terraform-provider-alicloud/pull/244)) -- Resource alicloud_eip support PrePaid ([#243](https://github.com/aliyun/terraform-provider-alicloud/pull/243)) -- Correct version writing error ([#241](https://github.com/aliyun/terraform-provider-alicloud/pull/241)) -- Change slb go sdk to official repo ([#240](https://github.com/aliyun/terraform-provider-alicloud/pull/240)) -- Remove useless file website/fc_service.html.markdown ([#239](https://github.com/aliyun/terraform-provider-alicloud/pull/239)) -- Update Go version to 1.10.1 to match new sdk ([#237](https://github.com/aliyun/terraform-provider-alicloud/pull/237)) -- Support http(s) proxy ([#236](https://github.com/aliyun/terraform-provider-alicloud/pull/236)) -- Add guide for installing goimports ([#233](https://github.com/aliyun/terraform-provider-alicloud/pull/233)) -- Improve the makefile and README ([#232](https://github.com/aliyun/terraform-provider-alicloud/pull/232)) +- Resource alicloud_eip support name and description([#244](https://github.com/aliyun/terraform-provider-alicloud/pull/244)) +- Resource alicloud_eip support PrePaid([#243](https://github.com/aliyun/terraform-provider-alicloud/pull/243)) +- Correct version writing error([#241](https://github.com/aliyun/terraform-provider-alicloud/pull/241)) +- Change slb go sdk to official repo([#240](https://github.com/aliyun/terraform-provider-alicloud/pull/240)) +- Remove useless file website/fc_service.html.markdown([#239](https://github.com/aliyun/terraform-provider-alicloud/pull/239)) +- Update Go version to 1.10.1 to match new sdk([#237](https://github.com/aliyun/terraform-provider-alicloud/pull/237)) +- Support http(s) proxy([#236](https://github.com/aliyun/terraform-provider-alicloud/pull/236)) +- Add guide for installing goimports([#233](https://github.com/aliyun/terraform-provider-alicloud/pull/233)) +- Improve the makefile and README([#232](https://github.com/aliyun/terraform-provider-alicloud/pull/232)) BUG FIXES: -- Fix losing key pair error after updating ecs instance ([#245](https://github.com/aliyun/terraform-provider-alicloud/pull/245)) -- Fix BackendServer Configuring error when creating slb rule ([#242](https://github.com/aliyun/terraform-provider-alicloud/pull/242)) -- Fix bug "...zoneinfo.zip: no such file or directory" happened in windows. ([#238](https://github.com/aliyun/terraform-provider-alicloud/pull/238)) -- Fix ess_scalingrule InvalidScalingRuleId.NotFound error ([#234](https://github.com/aliyun/terraform-provider-alicloud/pull/234)) +- Fix losing key pair error after updating ecs instance([#245](https://github.com/aliyun/terraform-provider-alicloud/pull/245)) +- Fix BackendServer Configuring error when creating slb rule([#242](https://github.com/aliyun/terraform-provider-alicloud/pull/242)) +- Fix bug "...zoneinfo.zip: no such file or directory" happened in windows.([#238](https://github.com/aliyun/terraform-provider-alicloud/pull/238)) +- Fix ess_scalingrule InvalidScalingRuleId.NotFound error([#234](https://github.com/aliyun/terraform-provider-alicloud/pull/234)) ## 1.10.0 (July 27, 2018) IMPROVEMENTS: -- Rds supports to create 10.0 PostgreSQL instance. ([#230](https://github.com/aliyun/terraform-provider-alicloud/pull/230)) -- *New Resource*: _alicloud_fc_trigger_ ([#228](https://github.com/aliyun/terraform-provider-alicloud/pull/228)) -- *New Resource*: _alicloud_fc_function_ ([#227](https://github.com/aliyun/terraform-provider-alicloud/pull/227)) +- Rds supports to create 10.0 PostgreSQL instance.([#230](https://github.com/aliyun/terraform-provider-alicloud/pull/230)) +- *New Resource*: _alicloud_fc_trigger_([#228](https://github.com/aliyun/terraform-provider-alicloud/pull/228)) +- *New Resource*: _alicloud_fc_function_([#227](https://github.com/aliyun/terraform-provider-alicloud/pull/227)) - *New Resource*: _alicloud_fc_service_ 30([#226](https://github.com/aliyun/terraform-provider-alicloud/pull/226)) -- Support new field 'instance_name' for _alicloud_ots_table_ ([#225](https://github.com/aliyun/terraform-provider-alicloud/pull/225)) -- *New Resource*: _alicloud_ots_instance_attachment_ ([#224](https://github.com/aliyun/terraform-provider-alicloud/pull/224)) -- *New Resource*: _alicloud_ots_instance_ ([#223](https://github.com/aliyun/terraform-provider-alicloud/pull/223)) +- Support new field 'instance_name' for _alicloud_ots_table_([#225](https://github.com/aliyun/terraform-provider-alicloud/pull/225)) +- *New Resource*: _alicloud_ots_instance_attachment_([#224](https://github.com/aliyun/terraform-provider-alicloud/pull/224)) +- *New Resource*: _alicloud_ots_instance_([#223](https://github.com/aliyun/terraform-provider-alicloud/pull/223)) BUG FIXES: -- Fix Snat entry not found error ([#229](https://github.com/aliyun/terraform-provider-alicloud/pull/229)) +- Fix Snat entry not found error([#229](https://github.com/aliyun/terraform-provider-alicloud/pull/229)) ## 1.9.6 (July 24, 2018) IMPROVEMENTS: -- Remove the number limitation of vswitch_ids, slb_ids and db_instance_ids ([#219](https://github.com/aliyun/terraform-provider-alicloud/pull/219)) -- Reduce test nat gateway cost ([#218](https://github.com/aliyun/terraform-provider-alicloud/pull/218)) -- Support creating zero-node swarm cluster ([#217](https://github.com/aliyun/terraform-provider-alicloud/pull/217)) -- Improve security group and rule data source test case ([#216](https://github.com/aliyun/terraform-provider-alicloud/pull/216)) -- Improve dns record resource test case ([#215](https://github.com/aliyun/terraform-provider-alicloud/pull/215)) -- Improve test case destroy method ([#214](https://github.com/aliyun/terraform-provider-alicloud/pull/214)) -- Improve ecs instance resource test case ([#213](https://github.com/aliyun/terraform-provider-alicloud/pull/213)) -- Improve cdn resource test case ([#212](https://github.com/aliyun/terraform-provider-alicloud/pull/212)) -- Improve kms resource test case ([#211](https://github.com/aliyun/terraform-provider-alicloud/pull/211)) -- Improve key pair resource test case ([#210](https://github.com/aliyun/terraform-provider-alicloud/pull/210)) -- Improve rds resource test case ([#209](https://github.com/aliyun/terraform-provider-alicloud/pull/209)) -- Improve disk resource test case ([#208](https://github.com/aliyun/terraform-provider-alicloud/pull/208)) -- Improve eip resource test case ([#207](https://github.com/aliyun/terraform-provider-alicloud/pull/207)) -- Improve scaling service resource test case ([#206](https://github.com/aliyun/terraform-provider-alicloud/pull/206)) -- Improve vpc and vswitch resource test case ([#205](https://github.com/aliyun/terraform-provider-alicloud/pull/205)) -- Improve slb resource test case ([#204](https://github.com/aliyun/terraform-provider-alicloud/pull/204)) -- Improve security group resource test case ([#203](https://github.com/aliyun/terraform-provider-alicloud/pull/203)) -- Improve ram resource test case ([#202](https://github.com/aliyun/terraform-provider-alicloud/pull/202)) -- Improve container cluster resource test case ([#201](https://github.com/aliyun/terraform-provider-alicloud/pull/201)) -- Improve cloud monitor resource test case ([#200](https://github.com/aliyun/terraform-provider-alicloud/pull/200)) -- Improve route and router interface resource test case ([#199](https://github.com/aliyun/terraform-provider-alicloud/pull/199)) -- Improve dns resource test case ([#198](https://github.com/aliyun/terraform-provider-alicloud/pull/198)) -- Improve oss resource test case ([#197](https://github.com/aliyun/terraform-provider-alicloud/pull/197)) -- Improve ots table resource test case ([#196](https://github.com/aliyun/terraform-provider-alicloud/pull/196)) -- Improve nat gateway resource test case ([#195](https://github.com/aliyun/terraform-provider-alicloud/pull/195)) -- Improve log resource test case ([#194](https://github.com/aliyun/terraform-provider-alicloud/pull/194)) -- Support changing ecs charge type from Prepaid to PostPaid ([#192](https://github.com/aliyun/terraform-provider-alicloud/pull/192)) -- Add method to compare json template is equal ([#187](https://github.com/aliyun/terraform-provider-alicloud/pull/187)) -- Remove useless file ([#191](https://github.com/aliyun/terraform-provider-alicloud/pull/191)) - -BUG FIXES: - -- Fix CS kubernetes read error and CS app timeout ([#217](https://github.com/aliyun/terraform-provider-alicloud/pull/217)) -- Fix getting location connection error ([#193](https://github.com/aliyun/terraform-provider-alicloud/pull/193)) -- Fix CS kubernetes connection error ([#190](https://github.com/aliyun/terraform-provider-alicloud/pull/190)) -- Fix Oss bucket diff error ([#189](https://github.com/aliyun/terraform-provider-alicloud/pull/189)) +- Remove the number limitation of vswitch_ids, slb_ids and db_instance_ids([#219](https://github.com/aliyun/terraform-provider-alicloud/pull/219)) +- Reduce test nat gateway cost([#218](https://github.com/aliyun/terraform-provider-alicloud/pull/218)) +- Support creating zero-node swarm cluster([#217](https://github.com/aliyun/terraform-provider-alicloud/pull/217)) +- Improve security group and rule data source test case([#216](https://github.com/aliyun/terraform-provider-alicloud/pull/216)) +- Improve dns record resource test case([#215](https://github.com/aliyun/terraform-provider-alicloud/pull/215)) +- Improve test case destroy method([#214](https://github.com/aliyun/terraform-provider-alicloud/pull/214)) +- Improve ecs instance resource test case([#213](https://github.com/aliyun/terraform-provider-alicloud/pull/213)) +- Improve cdn resource test case([#212](https://github.com/aliyun/terraform-provider-alicloud/pull/212)) +- Improve kms resource test case([#211](https://github.com/aliyun/terraform-provider-alicloud/pull/211)) +- Improve key pair resource test case([#210](https://github.com/aliyun/terraform-provider-alicloud/pull/210)) +- Improve rds resource test case([#209](https://github.com/aliyun/terraform-provider-alicloud/pull/209)) +- Improve disk resource test case([#208](https://github.com/aliyun/terraform-provider-alicloud/pull/208)) +- Improve eip resource test case([#207](https://github.com/aliyun/terraform-provider-alicloud/pull/207)) +- Improve scaling service resource test case([#206](https://github.com/aliyun/terraform-provider-alicloud/pull/206)) +- Improve vpc and vswitch resource test case([#205](https://github.com/aliyun/terraform-provider-alicloud/pull/205)) +- Improve slb resource test case([#204](https://github.com/aliyun/terraform-provider-alicloud/pull/204)) +- Improve security group resource test case([#203](https://github.com/aliyun/terraform-provider-alicloud/pull/203)) +- Improve ram resource test case([#202](https://github.com/aliyun/terraform-provider-alicloud/pull/202)) +- Improve container cluster resource test case([#201](https://github.com/aliyun/terraform-provider-alicloud/pull/201)) +- Improve cloud monitor resource test case([#200](https://github.com/aliyun/terraform-provider-alicloud/pull/200)) +- Improve route and router interface resource test case([#199](https://github.com/aliyun/terraform-provider-alicloud/pull/199)) +- Improve dns resource test case([#198](https://github.com/aliyun/terraform-provider-alicloud/pull/198)) +- Improve oss resource test case([#197](https://github.com/aliyun/terraform-provider-alicloud/pull/197)) +- Improve ots table resource test case([#196](https://github.com/aliyun/terraform-provider-alicloud/pull/196)) +- Improve nat gateway resource test case([#195](https://github.com/aliyun/terraform-provider-alicloud/pull/195)) +- Improve log resource test case([#194](https://github.com/aliyun/terraform-provider-alicloud/pull/194)) +- Support changing ecs charge type from Prepaid to PostPaid([#192](https://github.com/aliyun/terraform-provider-alicloud/pull/192)) +- Add method to compare json template is equal([#187](https://github.com/aliyun/terraform-provider-alicloud/pull/187)) +- Remove useless file([#191](https://github.com/aliyun/terraform-provider-alicloud/pull/191)) + +BUG FIXES: + +- Fix CS kubernetes read error and CS app timeout([#217](https://github.com/aliyun/terraform-provider-alicloud/pull/217)) +- Fix getting location connection error([#193](https://github.com/aliyun/terraform-provider-alicloud/pull/193)) +- Fix CS kubernetes connection error([#190](https://github.com/aliyun/terraform-provider-alicloud/pull/190)) +- Fix Oss bucket diff error([#189](https://github.com/aliyun/terraform-provider-alicloud/pull/189)) NOTES: @@ -4850,174 +5175,174 @@ replaced by alicloud_ram_account_alias. Details refer to [pull 191](https://gith IMPROVEMENTS: -- Improve log machine group docs ([#186](https://github.com/aliyun/terraform-provider-alicloud/pull/186)) -- Support sts token for some resources ([#185](https://github.com/aliyun/terraform-provider-alicloud/pull/185)) -- Support user agent for log service ([#184](https://github.com/aliyun/terraform-provider-alicloud/pull/184)) -- *New Resource*: _alicloud_log_machine_group_ ([#183](https://github.com/aliyun/terraform-provider-alicloud/pull/183)) -- *New Resource*: _alicloud_log_store_index_ ([#182](https://github.com/aliyun/terraform-provider-alicloud/pull/182)) -- *New Resource*: _alicloud_log_store_ ([#181](https://github.com/aliyun/terraform-provider-alicloud/pull/181)) -- *New Resource*: _alicloud_log_project_ ([#180](https://github.com/aliyun/terraform-provider-alicloud/pull/180)) -- Improve example about cs_kubernetes ([#179](https://github.com/aliyun/terraform-provider-alicloud/pull/179)) -- Add losing docs about cs_kubernetes ([#178](https://github.com/aliyun/terraform-provider-alicloud/pull/178)) +- Improve log machine group docs([#186](https://github.com/aliyun/terraform-provider-alicloud/pull/186)) +- Support sts token for some resources([#185](https://github.com/aliyun/terraform-provider-alicloud/pull/185)) +- Support user agent for log service([#184](https://github.com/aliyun/terraform-provider-alicloud/pull/184)) +- *New Resource*: _alicloud_log_machine_group_([#183](https://github.com/aliyun/terraform-provider-alicloud/pull/183)) +- *New Resource*: _alicloud_log_store_index_([#182](https://github.com/aliyun/terraform-provider-alicloud/pull/182)) +- *New Resource*: _alicloud_log_store_([#181](https://github.com/aliyun/terraform-provider-alicloud/pull/181)) +- *New Resource*: _alicloud_log_project_([#180](https://github.com/aliyun/terraform-provider-alicloud/pull/180)) +- Improve example about cs_kubernetes([#179](https://github.com/aliyun/terraform-provider-alicloud/pull/179)) +- Add losing docs about cs_kubernetes([#178](https://github.com/aliyun/terraform-provider-alicloud/pull/178)) ## 1.9.4 (June 08, 2018) IMPROVEMENTS: -- cs_kubernetes supports output worker nodes and master nodes ([#177](https://github.com/aliyun/terraform-provider-alicloud/pull/177)) -- cs_kubernetes supports to output kube config and certificate ([#176](https://github.com/aliyun/terraform-provider-alicloud/pull/176)) -- Add a example to deploy mysql and wordpress on kubernetes ([#175](https://github.com/aliyun/terraform-provider-alicloud/pull/175)) -- Add a example to create swarm and deploy wordpress on it ([#174](https://github.com/aliyun/terraform-provider-alicloud/pull/174)) -- Change ECS and ESS sdk to official go sdk ([#173](https://github.com/aliyun/terraform-provider-alicloud/pull/173)) +- cs_kubernetes supports output worker nodes and master nodes([#177](https://github.com/aliyun/terraform-provider-alicloud/pull/177)) +- cs_kubernetes supports to output kube config and certificate([#176](https://github.com/aliyun/terraform-provider-alicloud/pull/176)) +- Add a example to deploy mysql and wordpress on kubernetes([#175](https://github.com/aliyun/terraform-provider-alicloud/pull/175)) +- Add a example to create swarm and deploy wordpress on it([#174](https://github.com/aliyun/terraform-provider-alicloud/pull/174)) +- Change ECS and ESS sdk to official go sdk([#173](https://github.com/aliyun/terraform-provider-alicloud/pull/173)) ## 1.9.3 (May 27, 2018) IMPROVEMENTS: -- *New Data Source*: _alicloud_db_instances_ ([#161](https://github.com/aliyun/terraform-provider-alicloud/pull/161)) -- Support to set auto renew for ECS instance ([#172](https://github.com/aliyun/terraform-provider-alicloud/pull/172)) -- Improve cs_kubernetes, slb_listener and db_database docs ([#171](https://github.com/aliyun/terraform-provider-alicloud/pull/171)) -- Add missing code for describing RDS zones ([#170](https://github.com/aliyun/terraform-provider-alicloud/pull/170)) +- *New Data Source*: _alicloud_db_instances_([#161](https://github.com/aliyun/terraform-provider-alicloud/pull/161)) +- Support to set auto renew for ECS instance([#172](https://github.com/aliyun/terraform-provider-alicloud/pull/172)) +- Improve cs_kubernetes, slb_listener and db_database docs([#171](https://github.com/aliyun/terraform-provider-alicloud/pull/171)) +- Add missing code for describing RDS zones([#170](https://github.com/aliyun/terraform-provider-alicloud/pull/170)) - Add docs notes for windows os([#169](https://github.com/aliyun/terraform-provider-alicloud/pull/169)) -- Add filter parameters and export parameters for instance types data source. ([#168](https://github.com/aliyun/terraform-provider-alicloud/pull/168)) -- Add filter parameters for zones data source. ([#167](https://github.com/aliyun/terraform-provider-alicloud/pull/167)) -- Remove kubernetes work_number limitation ([#165](https://github.com/aliyun/terraform-provider-alicloud/pull/165)) -- Improve kubernetes examples ([#163](https://github.com/aliyun/terraform-provider-alicloud/pull/163)) +- Add filter parameters and export parameters for instance types data source.([#168](https://github.com/aliyun/terraform-provider-alicloud/pull/168)) +- Add filter parameters for zones data source.([#167](https://github.com/aliyun/terraform-provider-alicloud/pull/167)) +- Remove kubernetes work_number limitation([#165](https://github.com/aliyun/terraform-provider-alicloud/pull/165)) +- Improve kubernetes examples([#163](https://github.com/aliyun/terraform-provider-alicloud/pull/163)) BUG FIXES: -- Fix getting some instance types failed bug ([#166](https://github.com/aliyun/terraform-provider-alicloud/pull/166)) -- Fix kubernetes out range index error ([#164](https://github.com/aliyun/terraform-provider-alicloud/pull/164)) +- Fix getting some instance types failed bug([#166](https://github.com/aliyun/terraform-provider-alicloud/pull/166)) +- Fix kubernetes out range index error([#164](https://github.com/aliyun/terraform-provider-alicloud/pull/164)) ## 1.9.2 (May 09, 2018) IMPROVEMENTS: -- *New Resource*: _alicloud_ots_table_ ([#162](https://github.com/aliyun/terraform-provider-alicloud/pull/162)) -- Fix SLB listener "OperationBusy" error ([#159](https://github.com/aliyun/terraform-provider-alicloud/pull/159)) -- Prolong waiting time for creating kubernetes cluster to avoid timeout ([#158](https://github.com/aliyun/terraform-provider-alicloud/pull/158)) -- Support load endpoint from environment variable or specified file ([#157](https://github.com/aliyun/terraform-provider-alicloud/pull/157)) -- Update example ([#155](https://github.com/aliyun/terraform-provider-alicloud/pull/155)) +- *New Resource*: _alicloud_ots_table_([#162](https://github.com/aliyun/terraform-provider-alicloud/pull/162)) +- Fix SLB listener "OperationBusy" error([#159](https://github.com/aliyun/terraform-provider-alicloud/pull/159)) +- Prolong waiting time for creating kubernetes cluster to avoid timeout([#158](https://github.com/aliyun/terraform-provider-alicloud/pull/158)) +- Support load endpoint from environment variable or specified file([#157](https://github.com/aliyun/terraform-provider-alicloud/pull/157)) +- Update example([#155](https://github.com/aliyun/terraform-provider-alicloud/pull/155)) BUG FIXES: -- Fix modifying instance host name failed bug ([#160](https://github.com/aliyun/terraform-provider-alicloud/pull/160)) -- Fix SLB listener "OperationBusy" error ([#159](https://github.com/aliyun/terraform-provider-alicloud/pull/159)) -- Fix deleting forward table not found error ([#154](https://github.com/aliyun/terraform-provider-alicloud/pull/154)) -- Fix deleting slb listener error ([#150](https://github.com/aliyun/terraform-provider-alicloud/pull/150)) -- Fix creating vswitch error ([#149](https://github.com/aliyun/terraform-provider-alicloud/pull/149)) +- Fix modifying instance host name failed bug([#160](https://github.com/aliyun/terraform-provider-alicloud/pull/160)) +- Fix SLB listener "OperationBusy" error([#159](https://github.com/aliyun/terraform-provider-alicloud/pull/159)) +- Fix deleting forward table not found error([#154](https://github.com/aliyun/terraform-provider-alicloud/pull/154)) +- Fix deleting slb listener error([#150](https://github.com/aliyun/terraform-provider-alicloud/pull/150)) +- Fix creating vswitch error([#149](https://github.com/aliyun/terraform-provider-alicloud/pull/149)) ## 1.9.1 (April 13, 2018) IMPROVEMENTS: -- *New Resource*: _alicloud_cms_alarm_ ([#146](https://github.com/aliyun/terraform-provider-alicloud/pull/146)) -- *New Resource*: _alicloud_cs_application_ ([#136](https://github.com/aliyun/terraform-provider-alicloud/pull/136)) -- *New Datasource*: _alicloud_security_group_rules_ ([#135](https://github.com/aliyun/terraform-provider-alicloud/pull/135)) -- Output application attribution service block ([#141](https://github.com/aliyun/terraform-provider-alicloud/pull/141)) -- Output swarm attribution 'vpc_id' ([#140](https://github.com/aliyun/terraform-provider-alicloud/pull/140)) -- Support to release eip after deploying swarm cluster. ([#139](https://github.com/aliyun/terraform-provider-alicloud/pull/139)) -- Output swarm and kubernetes's nodes information and other attribution ([#138](https://github.com/aliyun/terraform-provider-alicloud/pull/138)) -- Modify `size` to `node_number` ([#137](https://github.com/aliyun/terraform-provider-alicloud/pull/137)) -- Set swarm ID before waiting its status ([#134](https://github.com/aliyun/terraform-provider-alicloud/pull/134)) -- Add 'is_outdated' for cs_swarm and cs_kubernetes ([#133](https://github.com/aliyun/terraform-provider-alicloud/pull/133)) -- Add warning when creating postgresql and ppas database ([#132](https://github.com/aliyun/terraform-provider-alicloud/pull/132)) -- Add kubernetes example ([#142](https://github.com/aliyun/terraform-provider-alicloud/pull/142)) -- Update sdk to support user-agent ([#143](https://github.com/aliyun/terraform-provider-alicloud/pull/143)) -- Add eip unassociation retry times to avoid needless error ([#144](https://github.com/aliyun/terraform-provider-alicloud/pull/144)) -- Add connections output for kubernetes cluster ([#145](https://github.com/aliyun/terraform-provider-alicloud/pull/145)) +- *New Resource*: _alicloud_cms_alarm_([#146](https://github.com/aliyun/terraform-provider-alicloud/pull/146)) +- *New Resource*: _alicloud_cs_application_([#136](https://github.com/aliyun/terraform-provider-alicloud/pull/136)) +- *New Datasource*: _alicloud_security_group_rules_([#135](https://github.com/aliyun/terraform-provider-alicloud/pull/135)) +- Output application attribution service block([#141](https://github.com/aliyun/terraform-provider-alicloud/pull/141)) +- Output swarm attribution 'vpc_id'([#140](https://github.com/aliyun/terraform-provider-alicloud/pull/140)) +- Support to release eip after deploying swarm cluster.([#139](https://github.com/aliyun/terraform-provider-alicloud/pull/139)) +- Output swarm and kubernetes's nodes information and other attribution([#138](https://github.com/aliyun/terraform-provider-alicloud/pull/138)) +- Modify `size` to `node_number`([#137](https://github.com/aliyun/terraform-provider-alicloud/pull/137)) +- Set swarm ID before waiting its status([#134](https://github.com/aliyun/terraform-provider-alicloud/pull/134)) +- Add 'is_outdated' for cs_swarm and cs_kubernetes([#133](https://github.com/aliyun/terraform-provider-alicloud/pull/133)) +- Add warning when creating postgresql and ppas database([#132](https://github.com/aliyun/terraform-provider-alicloud/pull/132)) +- Add kubernetes example([#142](https://github.com/aliyun/terraform-provider-alicloud/pull/142)) +- Update sdk to support user-agent([#143](https://github.com/aliyun/terraform-provider-alicloud/pull/143)) +- Add eip unassociation retry times to avoid needless error([#144](https://github.com/aliyun/terraform-provider-alicloud/pull/144)) +- Add connections output for kubernetes cluster([#145](https://github.com/aliyun/terraform-provider-alicloud/pull/145)) BUG FIXES: -- Fix vpc not found when vpc has been deleted ([#131](https://github.com/aliyun/terraform-provider-alicloud/pull/131)) +- Fix vpc not found when vpc has been deleted([#131](https://github.com/aliyun/terraform-provider-alicloud/pull/131)) ## 1.9.0 (March 19, 2018) IMPROVEMENTS: -- *New Resource*: _alicloud_cs_kubernetes_ ([#129](https://github.com/aliyun/terraform-provider-alicloud/pull/129)) -- *New DataSource*: _alicloud_eips_ ([#123](https://github.com/aliyun/terraform-provider-alicloud/pull/123)) -- Add server_group_id to slb listener resource ([#122](https://github.com/aliyun/terraform-provider-alicloud/pull/122)) -- Rename _alicloud_container_cluster_ to _alicloud_cs_swarm_ ([#128](https://github.com/aliyun/terraform-provider-alicloud/pull/128)) +- *New Resource*: _alicloud_cs_kubernetes_([#129](https://github.com/aliyun/terraform-provider-alicloud/pull/129)) +- *New DataSource*: _alicloud_eips_([#123](https://github.com/aliyun/terraform-provider-alicloud/pull/123)) +- Add server_group_id to slb listener resource([#122](https://github.com/aliyun/terraform-provider-alicloud/pull/122)) +- Rename _alicloud_container_cluster_ to _alicloud_cs_swarm_([#128](https://github.com/aliyun/terraform-provider-alicloud/pull/128)) BUG FIXES: -- Fix vpc description validate ([#125](https://github.com/aliyun/terraform-provider-alicloud/pull/125)) -- Update SDK version to fix unresolving endpoint issue ([#126](https://github.com/aliyun/terraform-provider-alicloud/pull/126)) -- Add waiting time after ECS bind ECS to ensure network is ok ([#127](https://github.com/aliyun/terraform-provider-alicloud/pull/127)) +- Fix vpc description validate([#125](https://github.com/aliyun/terraform-provider-alicloud/pull/125)) +- Update SDK version to fix unresolving endpoint issue([#126](https://github.com/aliyun/terraform-provider-alicloud/pull/126)) +- Add waiting time after ECS bind ECS to ensure network is ok([#127](https://github.com/aliyun/terraform-provider-alicloud/pull/127)) ## 1.8.1 (March 09, 2018) IMPROVEMENTS: -- DB instance supports multiple zone ([#120](https://github.com/aliyun/terraform-provider-alicloud/pull/120)) -- Data source zones support to retrieve multiple zone ([#119](https://github.com/aliyun/terraform-provider-alicloud/pull/119)) -- VPC supports alibaba cloud official go sdk ([#118](https://github.com/aliyun/terraform-provider-alicloud/pull/118)) +- DB instance supports multiple zone([#120](https://github.com/aliyun/terraform-provider-alicloud/pull/120)) +- Data source zones support to retrieve multiple zone([#119](https://github.com/aliyun/terraform-provider-alicloud/pull/119)) +- VPC supports alibaba cloud official go sdk([#118](https://github.com/aliyun/terraform-provider-alicloud/pull/118)) BUG FIXES: -- Fix not found db instance bug when allocating connection ([#121](https://github.com/aliyun/terraform-provider-alicloud/pull/121)) +- Fix not found db instance bug when allocating connection([#121](https://github.com/aliyun/terraform-provider-alicloud/pull/121)) ## 1.8.0 (March 02, 2018) IMPROVEMENTS: -- Support golang version 1.9 ([#114](https://github.com/aliyun/terraform-provider-alicloud/pull/114)) -- RDS supports alibaba cloud official go sdk ([#113](https://github.com/aliyun/terraform-provider-alicloud/pull/113)) -- Deprecated 'in_use' in eips datasource to fix conflict ([#115](https://github.com/aliyun/terraform-provider-alicloud/pull/115)) +- Support golang version 1.9([#114](https://github.com/aliyun/terraform-provider-alicloud/pull/114)) +- RDS supports alibaba cloud official go sdk([#113](https://github.com/aliyun/terraform-provider-alicloud/pull/113)) +- Deprecated 'in_use' in eips datasource to fix conflict([#115](https://github.com/aliyun/terraform-provider-alicloud/pull/115)) - Add encrypted argument to alicloud_disk resource([#116](https://github.com/aliyun/terraform-provider-alicloud/pull/116)) BUG FIXES: -- Fix reading router interface failed bug ([#117](https://github.com/aliyun/terraform-provider-alicloud/pull/117)) +- Fix reading router interface failed bug([#117](https://github.com/aliyun/terraform-provider-alicloud/pull/117)) ## 1.7.2 (February 09, 2018) IMPROVEMENTS: -- *New DataSource*: _alicloud_eips_ ([#110](https://github.com/aliyun/terraform-provider-alicloud/pull/110)) -- *New DataSource*: _alicloud_vswitches_ ([#109](https://github.com/aliyun/terraform-provider-alicloud/pull/109)) -- Support inner network segregation in one security group ([#112](https://github.com/aliyun/terraform-provider-alicloud/pull/112)) +- *New DataSource*: _alicloud_eips_([#110](https://github.com/aliyun/terraform-provider-alicloud/pull/110)) +- *New DataSource*: _alicloud_vswitches_([#109](https://github.com/aliyun/terraform-provider-alicloud/pull/109)) +- Support inner network segregation in one security group([#112](https://github.com/aliyun/terraform-provider-alicloud/pull/112)) BUG FIXES: -- Fix creating Classic instance failed result in role_name ([#111](https://github.com/aliyun/terraform-provider-alicloud/pull/111)) -- Fix eip is not exist in nat gateway when creating snat ([#108](https://github.com/aliyun/terraform-provider-alicloud/pull/108)) +- Fix creating Classic instance failed result in role_name([#111](https://github.com/aliyun/terraform-provider-alicloud/pull/111)) +- Fix eip is not exist in nat gateway when creating snat([#108](https://github.com/aliyun/terraform-provider-alicloud/pull/108)) ## 1.7.1 (February 02, 2018) IMPROVEMENTS: -- Support setting instance_name for ESS scaling configuration ([#107](https://github.com/aliyun/terraform-provider-alicloud/pull/107)) -- Support multiple vswitches for ESS scaling group and output slbIds and dbIds ([#105](https://github.com/aliyun/terraform-provider-alicloud/pull/105)) -- Support to set internet_max_bandwidth_out is 0 for ESS configuration ([#103](https://github.com/aliyun/terraform-provider-alicloud/pull/103)) -- Modify EIP default to PayByTraffic for international account ([#101](https://github.com/aliyun/terraform-provider-alicloud/pull/101)) -- Deprecate nat gateway fileds 'spec' and 'bandwidth_packages' ([#100](https://github.com/aliyun/terraform-provider-alicloud/pull/100)) -- Support to associate EIP with SLB and Nat Gateway ([#99](https://github.com/aliyun/terraform-provider-alicloud/pull/99)) +- Support setting instance_name for ESS scaling configuration([#107](https://github.com/aliyun/terraform-provider-alicloud/pull/107)) +- Support multiple vswitches for ESS scaling group and output slbIds and dbIds([#105](https://github.com/aliyun/terraform-provider-alicloud/pull/105)) +- Support to set internet_max_bandwidth_out is 0 for ESS configuration([#103](https://github.com/aliyun/terraform-provider-alicloud/pull/103)) +- Modify EIP default to PayByTraffic for international account([#101](https://github.com/aliyun/terraform-provider-alicloud/pull/101)) +- Deprecate nat gateway fileds 'spec' and 'bandwidth_packages'([#100](https://github.com/aliyun/terraform-provider-alicloud/pull/100)) +- Support to associate EIP with SLB and Nat Gateway([#99](https://github.com/aliyun/terraform-provider-alicloud/pull/99)) BUG FIXES: -- fix a bug that can't create multiple VPC, vswitch and nat gateway at one time ([#102](https://github.com/aliyun/terraform-provider-alicloud/pull/102)) -- fix a bug that can't import instance 'role_name' ([#104](https://github.com/aliyun/terraform-provider-alicloud/pull/104)) -- fix a bug that creating ESS scaling group and configuration results from 'Throttling' ([#106](https://github.com/aliyun/terraform-provider-alicloud/pull/106)) +- fix a bug that can't create multiple VPC, vswitch and nat gateway at one time([#102](https://github.com/aliyun/terraform-provider-alicloud/pull/102)) +- fix a bug that can't import instance 'role_name'([#104](https://github.com/aliyun/terraform-provider-alicloud/pull/104)) +- fix a bug that creating ESS scaling group and configuration results from 'Throttling'([#106](https://github.com/aliyun/terraform-provider-alicloud/pull/106)) ## 1.7.0 (January 25, 2018) IMPROVEMENTS: -- *New Resource*: _alicloud_kms_key_ ([#91](https://github.com/aliyun/terraform-provider-alicloud/pull/91)) -- *New DataSource*: _alicloud_kms_keys_ ([#93](https://github.com/aliyun/terraform-provider-alicloud/pull/93)) -- *New DataSource*: _alicloud_instances_ ([#94](https://github.com/aliyun/terraform-provider-alicloud/pull/94)) -- Add a new output field "arn" for _alicloud_kms_key_ ([#92](https://github.com/aliyun/terraform-provider-alicloud/pull/92)) -- Add a new field "specification" for _alicloud_slb_ ([#95](https://github.com/aliyun/terraform-provider-alicloud/pull/95)) -- Improve security group rule's port range for "-1/-1" ([#96](https://github.com/aliyun/terraform-provider-alicloud/pull/96)) +- *New Resource*: _alicloud_kms_key_([#91](https://github.com/aliyun/terraform-provider-alicloud/pull/91)) +- *New DataSource*: _alicloud_kms_keys_([#93](https://github.com/aliyun/terraform-provider-alicloud/pull/93)) +- *New DataSource*: _alicloud_instances_([#94](https://github.com/aliyun/terraform-provider-alicloud/pull/94)) +- Add a new output field "arn" for _alicloud_kms_key_([#92](https://github.com/aliyun/terraform-provider-alicloud/pull/92)) +- Add a new field "specification" for _alicloud_slb_([#95](https://github.com/aliyun/terraform-provider-alicloud/pull/95)) +- Improve security group rule's port range for "-1/-1"([#96](https://github.com/aliyun/terraform-provider-alicloud/pull/96)) BUG FIXES: -- fix slb invalid status error when launching ESS scaling group ([#97](https://github.com/aliyun/terraform-provider-alicloud/pull/97)) +- fix slb invalid status error when launching ESS scaling group([#97](https://github.com/aliyun/terraform-provider-alicloud/pull/97)) ## 1.6.2 (January 22, 2018) @@ -5026,184 +5351,184 @@ IMPROVEMENTS: - Modify db_connection prefix default value to "instance_id + 'tf'"([#90](https://github.com/aliyun/terraform-provider-alicloud/pull/90)) - Modify db_connection ID to make it more simple while importing it([#90](https://github.com/aliyun/terraform-provider-alicloud/pull/90)) - Add wait method to avoid useless status error while creating/modifying account or privilege or connection or database([#90](https://github.com/aliyun/terraform-provider-alicloud/pull/90)) -- Support to set instnace name for RDS ([#88](https://github.com/aliyun/terraform-provider-alicloud/pull/88)) -- Avoid container cluster cidr block conflicts with vswitch's ([#88](https://github.com/aliyun/terraform-provider-alicloud/pull/88)) -- Output resource import information ([#87](https://github.com/aliyun/terraform-provider-alicloud/pull/87)) +- Support to set instnace name for RDS([#88](https://github.com/aliyun/terraform-provider-alicloud/pull/88)) +- Avoid container cluster cidr block conflicts with vswitch's([#88](https://github.com/aliyun/terraform-provider-alicloud/pull/88)) +- Output resource import information([#87](https://github.com/aliyun/terraform-provider-alicloud/pull/87)) BUG FIXES: - fix instance id not found and instane status not supported bug([#90](https://github.com/aliyun/terraform-provider-alicloud/pull/90)) -- fix deleting slb_attachment resource failed bug ([#86](https://github.com/aliyun/terraform-provider-alicloud/pull/86)) +- fix deleting slb_attachment resource failed bug([#86](https://github.com/aliyun/terraform-provider-alicloud/pull/86)) ## 1.6.1 (January 18, 2018) IMPROVEMENTS: -- Support to modify instance type and network spec ([#84](https://github.com/aliyun/terraform-provider-alicloud/pull/84)) -- Avoid needless error when creating security group rule ([#83](https://github.com/aliyun/terraform-provider-alicloud/pull/83)) +- Support to modify instance type and network spec([#84](https://github.com/aliyun/terraform-provider-alicloud/pull/84)) +- Avoid needless error when creating security group rule([#83](https://github.com/aliyun/terraform-provider-alicloud/pull/83)) BUG FIXES: -- fix creating cluster container failed bug ([#85](https://github.com/aliyun/terraform-provider-alicloud/pull/85)) +- fix creating cluster container failed bug([#85](https://github.com/aliyun/terraform-provider-alicloud/pull/85)) ## 1.6.0 (January 15, 2018) IMPROVEMENTS: -- *New Resource*: _alicloud_ess_attachment_ ([#80](https://github.com/aliyun/terraform-provider-alicloud/pull/80)) -- *New Resource*: _alicloud_slb_rule_ ([#79](https://github.com/aliyun/terraform-provider-alicloud/pull/79)) -- *New Resource*: _alicloud_slb_server_group_ ([#78](https://github.com/aliyun/terraform-provider-alicloud/pull/78)) -- Support Spot Instance ([#77](https://github.com/aliyun/terraform-provider-alicloud/pull/77)) -- Output tip message when international account create SLB failed ([#75](https://github.com/aliyun/terraform-provider-alicloud/pull/75)) -- Standardize the order of imports packages ([#74](https://github.com/aliyun/terraform-provider-alicloud/pull/74)) -- Add "weight" for slb_attachment to improve the resource ([#81](https://github.com/aliyun/terraform-provider-alicloud/pull/81)) +- *New Resource*: _alicloud_ess_attachment_([#80](https://github.com/aliyun/terraform-provider-alicloud/pull/80)) +- *New Resource*: _alicloud_slb_rule_([#79](https://github.com/aliyun/terraform-provider-alicloud/pull/79)) +- *New Resource*: _alicloud_slb_server_group_([#78](https://github.com/aliyun/terraform-provider-alicloud/pull/78)) +- Support Spot Instance([#77](https://github.com/aliyun/terraform-provider-alicloud/pull/77)) +- Output tip message when international account create SLB failed([#75](https://github.com/aliyun/terraform-provider-alicloud/pull/75)) +- Standardize the order of imports packages([#74](https://github.com/aliyun/terraform-provider-alicloud/pull/74)) +- Add "weight" for slb_attachment to improve the resource([#81](https://github.com/aliyun/terraform-provider-alicloud/pull/81)) BUG FIXES: -- fix allocating RDS public connection conflict error ([#76](https://github.com/aliyun/terraform-provider-alicloud/pull/76)) +- fix allocating RDS public connection conflict error([#76](https://github.com/aliyun/terraform-provider-alicloud/pull/76)) ## 1.5.3 (January 9, 2018) BUG FIXES: - * fix getting OSS endpoint failed error ([#73](https://github.com/aliyun/terraform-provider-alicloud/pull/73)) - * fix describing dns record not found when deleting record ([#73](https://github.com/aliyun/terraform-provider-alicloud/pull/73)) + * fix getting OSS endpoint failed error ([#73](https://github.com/aliyun/terraform-provider-alicloud/pull/73)) + * fix describing dns record not found when deleting record([#73](https://github.com/aliyun/terraform-provider-alicloud/pull/73)) ## 1.5.2 (January 8, 2018) BUG FIXES: - * fix creating rds 'Prepaid' instance failed error ([#70](https://github.com/aliyun/terraform-provider-alicloud/pull/70)) + * fix creating rds 'Prepaid' instance failed error ([#70](https://github.com/aliyun/terraform-provider-alicloud/pull/70)) ## 1.5.1 (January 5, 2018) BUG FIXES: - * modify security_token to Optional ([#69](https://github.com/aliyun/terraform-provider-alicloud/pull/69)) + * modify security_token to Optional([#69](https://github.com/aliyun/terraform-provider-alicloud/pull/69)) ## 1.5.0 (January 4, 2018) IMPROVEMENTS: -- *New Resource*: _alicloud_db_database_ ([#68](https://github.com/aliyun/terraform-provider-alicloud/pull/68)) -- *New Resource*: _alicloud_db_backup_policy_ ([#68](https://github.com/aliyun/terraform-provider-alicloud/pull/68)) -- *New Resource*: _alicloud_db_connection_ ([#67](https://github.com/aliyun/terraform-provider-alicloud/pull/67)) -- *New Resource*: _alicloud_db_account_ ([#66](https://github.com/aliyun/terraform-provider-alicloud/pull/66)) -- *New Resource*: _alicloud_db_account_privilege_ ([#66](https://github.com/aliyun/terraform-provider-alicloud/pull/66)) -- resource/db_instance: remove some field to new resource ([#65](https://github.com/aliyun/terraform-provider-alicloud/pull/65)) -- resource/instance: support to modify private ip, vswitch_id and instance charge type ([#65](https://github.com/aliyun/terraform-provider-alicloud/pull/65)) +- *New Resource*: _alicloud_db_database_([#68](https://github.com/aliyun/terraform-provider-alicloud/pull/68)) +- *New Resource*: _alicloud_db_backup_policy_([#68](https://github.com/aliyun/terraform-provider-alicloud/pull/68)) +- *New Resource*: _alicloud_db_connection_([#67](https://github.com/aliyun/terraform-provider-alicloud/pull/67)) +- *New Resource*: _alicloud_db_account_([#66](https://github.com/aliyun/terraform-provider-alicloud/pull/66)) +- *New Resource*: _alicloud_db_account_privilege_([#66](https://github.com/aliyun/terraform-provider-alicloud/pull/66)) +- resource/db_instance: remove some field to new resource([#65](https://github.com/aliyun/terraform-provider-alicloud/pull/65)) +- resource/instance: support to modify private ip, vswitch_id and instance charge type([#65](https://github.com/aliyun/terraform-provider-alicloud/pull/65)) BUG FIXES: -- resource/dns-record: Fix dns record still exist after deleting it ([#65](https://github.com/aliyun/terraform-provider-alicloud/pull/65)) -- resource/instance: fix deleting route entry error ([#69](https://github.com/aliyun/terraform-provider-alicloud/pull/69)) +- resource/dns-record: Fix dns record still exist after deleting it([#65](https://github.com/aliyun/terraform-provider-alicloud/pull/65)) +- resource/instance: fix deleting route entry error([#69](https://github.com/aliyun/terraform-provider-alicloud/pull/69)) ## 1.2.0 (December 15, 2017) IMPROVEMENTS: -- resource/slb: wait for SLB active before return back ([#61](https://github.com/aliyun/terraform-provider-alicloud/pull/61)) +- resource/slb: wait for SLB active before return back([#61](https://github.com/aliyun/terraform-provider-alicloud/pull/61)) BUG FIXES: -- resource/dns-record: Fix setting dns priority failed ([#58](https://github.com/aliyun/terraform-provider-alicloud/pull/58)) -- resource/dns-record: Fix ESS attachs SLB failed ([#59](https://github.com/aliyun/terraform-provider-alicloud/pull/59)) -- resource/dns-record: Fix security group not found error ([#59](https://github.com/aliyun/terraform-provider-alicloud/pull/59)) +- resource/dns-record: Fix setting dns priority failed([#58](https://github.com/aliyun/terraform-provider-alicloud/pull/58)) +- resource/dns-record: Fix ESS attachs SLB failed([#59](https://github.com/aliyun/terraform-provider-alicloud/pull/59)) +- resource/dns-record: Fix security group not found error([#59](https://github.com/aliyun/terraform-provider-alicloud/pull/59)) ## 1.0.0 (December 11, 2017) IMPROVEMENTS: -- *New Resource*: _alicloud_slb_listener_ ([#53](https://github.com/aliyun/terraform-provider-alicloud/pull/53)) -- *New Resource*: _alicloud_cdn_domain_ ([#52](https://github.com/aliyun/terraform-provider-alicloud/pull/52)) -- *New Resource*: _alicloud_dns_ ([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) -- *New Resource*: _alicloud_dns_group_ ([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) -- *New Resource*: _alicloud_dns_record_ ([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) -- *New Resource*: _alicloud_ram_account_alias_ ([#50](https://github.com/aliyun/terraform-provider-alicloud/pull/50)) -- *New Resource*: _alicloud_ram_login_profile_ ([#50](https://github.com/aliyun/terraform-provider-alicloud/pull/50)) -- *New Resource*: _alicloud_ram_access_key_ ([#50](https://github.com/aliyun/terraform-provider-alicloud/pull/50)) -- *New Resource*: _alicloud_ram_group_ ([#49](https://github.com/aliyun/terraform-provider-alicloud/pull/49)) -- *New Resource*: _alicloud_ram_group_membership_ ([#49](https://github.com/aliyun/terraform-provider-alicloud/pull/49)) -- *New Resource*: _alicloud_ram_group_policy_attachment_ ([#49](https://github.com/aliyun/terraform-provider-alicloud/pull/49)) -- *New Resource*: _alicloud_ram_role_ ([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) -- *New Resource*: _alicloud_ram_role_attachment_ ([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) -- *New Resource*: _alicloud_ram_role_polocy_attachment_ ([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) -- *New Resource*: _alicloud_container_cluster_ ([#47](https://github.com/aliyun/terraform-provider-alicloud/pull/47)) -- *New Resource:* _alicloud_ram_policy_ ([#46](https://github.com/aliyun/terraform-provider-alicloud/pull/46)) -- *New Resource*: _alicloud_ram_user_policy_attachment_ ([#46](https://github.com/aliyun/terraform-provider-alicloud/pull/46)) -- *New Resource* _alicloud_ram_user_ ([#44](https://github.com/aliyun/terraform-provider-alicloud/pull/44)) -- *New Datasource* _alicloud_ram_policies_ ([#46](https://github.com/aliyun/terraform-provider-alicloud/pull/46)) -- *New Datasource* _alicloud_ram_users_ ([#44](https://github.com/aliyun/terraform-provider-alicloud/pull/44)) -- *New Datasource*: _alicloud_ram_roles_ ([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) -- *New Datasource*: _alicloud_ram_account_aliases_ ([#50](https://github.com/aliyun/terraform-provider-alicloud/pull/50)) -- *New Datasource*: _alicloud_dns_domains_ ([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) -- *New Datasource*: _alicloud_dns_groups_ ([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) -- *New Datasource*: _alicloud_dns_records_ ([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) -- resource/instance: add new parameter `role_name` ([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) -- resource/slb: remove slb schema field `listeners` and using new listener resource to replace ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) -- resource/ess_scaling_configuration: add new parameters `key_name`, `role_name`, `user_data`, `force_delete` and `tags` ([#54](https://github.com/aliyun/terraform-provider-alicloud/pull/54)) -- resource/ess_scaling_configuration: remove it importing ([#54](https://github.com/aliyun/terraform-provider-alicloud/pull/54)) -- resource: format not found error ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) -- website: improve resource docs ([#56](https://github.com/aliyun/terraform-provider-alicloud/pull/56)) -- examples: add new examples, like oss, key_pair, router_interface and so on ([#56](https://github.com/aliyun/terraform-provider-alicloud/pull/56)) +- *New Resource*: _alicloud_slb_listener_([#53](https://github.com/aliyun/terraform-provider-alicloud/pull/53)) +- *New Resource*: _alicloud_cdn_domain_([#52](https://github.com/aliyun/terraform-provider-alicloud/pull/52)) +- *New Resource*: _alicloud_dns_([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) +- *New Resource*: _alicloud_dns_group_([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) +- *New Resource*: _alicloud_dns_record_([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) +- *New Resource*: _alicloud_ram_account_alias_([#50](https://github.com/aliyun/terraform-provider-alicloud/pull/50)) +- *New Resource*: _alicloud_ram_login_profile_([#50](https://github.com/aliyun/terraform-provider-alicloud/pull/50)) +- *New Resource*: _alicloud_ram_access_key_([#50](https://github.com/aliyun/terraform-provider-alicloud/pull/50)) +- *New Resource*: _alicloud_ram_group_([#49](https://github.com/aliyun/terraform-provider-alicloud/pull/49)) +- *New Resource*: _alicloud_ram_group_membership_([#49](https://github.com/aliyun/terraform-provider-alicloud/pull/49)) +- *New Resource*: _alicloud_ram_group_policy_attachment_([#49](https://github.com/aliyun/terraform-provider-alicloud/pull/49)) +- *New Resource*: _alicloud_ram_role_([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) +- *New Resource*: _alicloud_ram_role_attachment_([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) +- *New Resource*: _alicloud_ram_role_polocy_attachment_([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) +- *New Resource*: _alicloud_container_cluster_([#47](https://github.com/aliyun/terraform-provider-alicloud/pull/47)) +- *New Resource:* _alicloud_ram_policy_([#46](https://github.com/aliyun/terraform-provider-alicloud/pull/46)) +- *New Resource*: _alicloud_ram_user_policy_attachment_([#46](https://github.com/aliyun/terraform-provider-alicloud/pull/46)) +- *New Resource* _alicloud_ram_user_([#44](https://github.com/aliyun/terraform-provider-alicloud/pull/44)) +- *New Datasource* _alicloud_ram_policies_([#46](https://github.com/aliyun/terraform-provider-alicloud/pull/46)) +- *New Datasource* _alicloud_ram_users_([#44](https://github.com/aliyun/terraform-provider-alicloud/pull/44)) +- *New Datasource*: _alicloud_ram_roles_([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) +- *New Datasource*: _alicloud_ram_account_aliases_([#50](https://github.com/aliyun/terraform-provider-alicloud/pull/50)) +- *New Datasource*: _alicloud_dns_domains_([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) +- *New Datasource*: _alicloud_dns_groups_([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) +- *New Datasource*: _alicloud_dns_records_([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) +- resource/instance: add new parameter `role_name`([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) +- resource/slb: remove slb schema field `listeners` and using new listener resource to replace([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) +- resource/ess_scaling_configuration: add new parameters `key_name`, `role_name`, `user_data`, `force_delete` and `tags`([#54](https://github.com/aliyun/terraform-provider-alicloud/pull/54)) +- resource/ess_scaling_configuration: remove it importing([#54](https://github.com/aliyun/terraform-provider-alicloud/pull/54)) +- resource: format not found error([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) +- website: improve resource docs([#56](https://github.com/aliyun/terraform-provider-alicloud/pull/56)) +- examples: add new examples, like oss, key_pair, router_interface and so on([#56](https://github.com/aliyun/terraform-provider-alicloud/pull/56)) - Added support for importing: - - `alicloud_container_cluster` ([#47](https://github.com/aliyun/terraform-provider-alicloud/pull/47)) - - `alicloud_ram_policy` ([#46](https://github.com/aliyun/terraform-provider-alicloud/pull/46)) - - `alicloud_ram_user` ([#44](https://github.com/aliyun/terraform-provider-alicloud/pull/44)) - - `alicloud_ram_role` ([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) - - `alicloud_ram_groups` ([#49](https://github.com/aliyun/terraform-provider-alicloud/pull/49)) - - `alicloud_ram_login_profile` ([#50](https://github.com/aliyun/terraform-provider-alicloud/pull/50)) - - `alicloud_dns` ([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) - - `alicloud_dns_record` ([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) - - `alicloud_slb_listener` ([#53](https://github.com/aliyun/terraform-provider-alicloud/pull/53)) - - `alicloud_security_group` ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) - - `alicloud_slb` ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) - - `alicloud_vswitch` ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) - - `alicloud_vroute_entry` ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) - -BUG FIXES: - -- resource/vroute_entry: Fix building route_entry concurrency issue ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) -- resource/vswitch: Fix building vswitch concurrency issue ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) -- resource/router_interface: Fix building router interface concurrency issue ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) -- resource/vpc: Fix building vpc concurrency issue ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) -- resource/slb_attachment: Fix attaching slb failed ([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) + - `alicloud_container_cluster`([#47](https://github.com/aliyun/terraform-provider-alicloud/pull/47)) + - `alicloud_ram_policy`([#46](https://github.com/aliyun/terraform-provider-alicloud/pull/46)) + - `alicloud_ram_user`([#44](https://github.com/aliyun/terraform-provider-alicloud/pull/44)) + - `alicloud_ram_role`([#48](https://github.com/aliyun/terraform-provider-alicloud/pull/48)) + - `alicloud_ram_groups`([#49](https://github.com/aliyun/terraform-provider-alicloud/pull/49)) + - `alicloud_ram_login_profile`([#50](https://github.com/aliyun/terraform-provider-alicloud/pull/50)) + - `alicloud_dns`([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) + - `alicloud_dns_record`([#51](https://github.com/aliyun/terraform-provider-alicloud/pull/51)) + - `alicloud_slb_listener`([#53](https://github.com/aliyun/terraform-provider-alicloud/pull/53)) + - `alicloud_security_group`([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) + - `alicloud_slb`([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) + - `alicloud_vswitch`([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) + - `alicloud_vroute_entry`([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) + +BUG FIXES: + +- resource/vroute_entry: Fix building route_entry concurrency issue([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) +- resource/vswitch: Fix building vswitch concurrency issue([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) +- resource/router_interface: Fix building router interface concurrency issue([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) +- resource/vpc: Fix building vpc concurrency issue([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) +- resource/slb_attachment: Fix attaching slb failed([#55](https://github.com/aliyun/terraform-provider-alicloud/pull/55)) ## 0.1.1 (December 11, 2017) IMPROVEMENTS: -- *New Resource:* _alicloud_key_pair_ ([#27](https://github.com/aliyun/terraform-provider-alicloud/pull/27)) -- *New Resource*: _alicloud_key_pair_attachment_ ([#28](https://github.com/aliyun/terraform-provider-alicloud/pull/28)) -- *New Resource*: _alicloud_router_interface_ ([#40](https://github.com/aliyun/terraform-provider-alicloud/pull/40)) -- *New Resource:* _alicloud_oss_bucket_ ([#10](https://github.com/aliyun/terraform-provider-alicloud/pull/10)) -- *New Resource*: _alicloud_oss_bucket_object_ ([#14](https://github.com/aliyun/terraform-provider-alicloud/pull/14)) -- *New Datasource* _alicloud_key_pairs_ ([#30](https://github.com/aliyun/terraform-provider-alicloud/pull/30)) -- *New Datasource* _alicloud_vpcs_ ([#34](https://github.com/aliyun/terraform-provider-alicloud/pull/34)) -- *New output_file* option for data sources: export data to a specified file ([#29](https://github.com/aliyun/terraform-provider-alicloud/pull/29)) -- resource/instance:add new parameter `key_name` ([#31](https://github.com/aliyun/terraform-provider-alicloud/pull/31)) -- resource/route_entry: new nexthop type 'RouterInterface' for route entry ([#41](https://github.com/aliyun/terraform-provider-alicloud/pull/41)) -- resource/security_group_rule: Remove `cidr_ip` contribute "ConflictsWith" ([#39](https://github.com/aliyun/terraform-provider-alicloud/pull/39)) -- resource/rds: add ability to change instance password ([#17](https://github.com/aliyun/terraform-provider-alicloud/pull/17)) -- resource/rds: Add ability to import existing RDS resources ([#16](https://github.com/aliyun/terraform-provider-alicloud/pull/16)) -- datasource/alicloud_zones: Add more options for filtering ([#19](https://github.com/aliyun/terraform-provider-alicloud/pull/19)) +- *New Resource:* _alicloud_key_pair_([#27](https://github.com/aliyun/terraform-provider-alicloud/pull/27)) +- *New Resource*: _alicloud_key_pair_attachment_([#28](https://github.com/aliyun/terraform-provider-alicloud/pull/28)) +- *New Resource*: _alicloud_router_interface_([#40](https://github.com/aliyun/terraform-provider-alicloud/pull/40)) +- *New Resource:* _alicloud_oss_bucket_([#10](https://github.com/aliyun/terraform-provider-alicloud/pull/10)) +- *New Resource*: _alicloud_oss_bucket_object_([#14](https://github.com/aliyun/terraform-provider-alicloud/pull/14)) +- *New Datasource* _alicloud_key_pairs_([#30](https://github.com/aliyun/terraform-provider-alicloud/pull/30)) +- *New Datasource* _alicloud_vpcs_([#34](https://github.com/aliyun/terraform-provider-alicloud/pull/34)) +- *New output_file* option for data sources: export data to a specified file([#29](https://github.com/aliyun/terraform-provider-alicloud/pull/29)) +- resource/instance:add new parameter `key_name`([#31](https://github.com/aliyun/terraform-provider-alicloud/pull/31)) +- resource/route_entry: new nexthop type 'RouterInterface' for route entry([#41](https://github.com/aliyun/terraform-provider-alicloud/pull/41)) +- resource/security_group_rule: Remove `cidr_ip` contribute "ConflictsWith"([#39](https://github.com/aliyun/terraform-provider-alicloud/pull/39)) +- resource/rds: add ability to change instance password([#17](https://github.com/aliyun/terraform-provider-alicloud/pull/17)) +- resource/rds: Add ability to import existing RDS resources([#16](https://github.com/aliyun/terraform-provider-alicloud/pull/16)) +- datasource/alicloud_zones: Add more options for filtering([#19](https://github.com/aliyun/terraform-provider-alicloud/pull/19)) - Added support for importing: - - `alicloud_vpc` ([#32](https://github.com/aliyun/terraform-provider-alicloud/pull/32)) - - `alicloud_route_entry` ([#33](https://github.com/aliyun/terraform-provider-alicloud/pull/33)) - - `alicloud_nat_gateway` ([#26](https://github.com/aliyun/terraform-provider-alicloud/pull/26)) - - `alicloud_ess_schedule` ([#25](https://github.com/aliyun/terraform-provider-alicloud/pull/25)) - - `alicloud_ess_scaling_group` ([#24](https://github.com/aliyun/terraform-provider-alicloud/pull/24)) - - `alicloud_instance` ([#23](https://github.com/aliyun/terraform-provider-alicloud/pull/23)) - - `alicloud_eip` ([#22](https://github.com/aliyun/terraform-provider-alicloud/pull/22)) - - `alicloud_disk` ([#21](https://github.com/aliyun/terraform-provider-alicloud/pull/21)) + - `alicloud_vpc`([#32](https://github.com/aliyun/terraform-provider-alicloud/pull/32)) + - `alicloud_route_entry`([#33](https://github.com/aliyun/terraform-provider-alicloud/pull/33)) + - `alicloud_nat_gateway`([#26](https://github.com/aliyun/terraform-provider-alicloud/pull/26)) + - `alicloud_ess_schedule`([#25](https://github.com/aliyun/terraform-provider-alicloud/pull/25)) + - `alicloud_ess_scaling_group`([#24](https://github.com/aliyun/terraform-provider-alicloud/pull/24)) + - `alicloud_instance`([#23](https://github.com/aliyun/terraform-provider-alicloud/pull/23)) + - `alicloud_eip`([#22](https://github.com/aliyun/terraform-provider-alicloud/pull/22)) + - `alicloud_disk`([#21](https://github.com/aliyun/terraform-provider-alicloud/pull/21)) BUG FIXES: -- resource/disk_attachment: Fix issue attaching multiple disks and set disk_attachment's parameter 'device_name' as deprecated ([#9](https://github.com/aliyun/terraform-provider-alicloud/pull/9)) -- resource/rds: Fix diff error about rds security_ips ([#13](https://github.com/aliyun/terraform-provider-alicloud/pull/13)) -- resource/security_group_rule: Fix diff error when authorizing security group rules ([#15](https://github.com/aliyun/terraform-provider-alicloud/pull/15)) -- resource/security_group_rule: Fix diff bug by modifying 'DestCidrIp' to 'DestGroupId' when running read ([#35](https://github.com/aliyun/terraform-provider-alicloud/pull/35)) +- resource/disk_attachment: Fix issue attaching multiple disks and set disk_attachment's parameter 'device_name' as deprecated([#9](https://github.com/aliyun/terraform-provider-alicloud/pull/9)) +- resource/rds: Fix diff error about rds security_ips([#13](https://github.com/aliyun/terraform-provider-alicloud/pull/13)) +- resource/security_group_rule: Fix diff error when authorizing security group rules([#15](https://github.com/aliyun/terraform-provider-alicloud/pull/15)) +- resource/security_group_rule: Fix diff bug by modifying 'DestCidrIp' to 'DestGroupId' when running read([#35](https://github.com/aliyun/terraform-provider-alicloud/pull/35)) ## 0.1.0 (June 20, 2017) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/common.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/common.go index 64f67aca386..91b2654b4c8 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/common.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/common.go @@ -16,6 +16,8 @@ import ( "strings" "time" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/denverdino/aliyungo/cs" "github.com/aliyun/aliyun-datahub-sdk-go/datahub" @@ -1008,7 +1010,6 @@ func formatInt(src interface{}) int { default: panic(fmt.Sprintf("Not support type %s", attrType.String())) } - return 0 } func convertArrayObjectToJsonString(src interface{}) (string, error) { @@ -1073,3 +1074,22 @@ func SplitSlice(xs []interface{}, chunkSize int) [][]interface{} { divided[i] = xs[prev:] return divided } + +func isPagingRequest(d *schema.ResourceData) bool { + v, ok := d.GetOk("page_number") + return ok && v.(int) > 0 +} + +func setPagingRequest(d *schema.ResourceData, request map[string]interface{}, maxPageSize int) { + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["PageNumber"] = v.(int) + } else { + request["PageNumber"] = 1 + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge + } + return +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/client.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/client.go index 94cfd6d92c0..01dedca8095 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/client.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/client.go @@ -172,7 +172,7 @@ var loadSdkfromRemoteMutex = sync.Mutex{} var loadSdkEndpointMutex = sync.Mutex{} // The main version number that is being run at the moment. -var providerVersion = "1.148.0" +var providerVersion = "1.158.0" var terraformVersion = strings.TrimSuffix(schema.Provider{}.TerraformVersion, "-dev") // Temporarily maintain map for old ecs client methods and store special endpoint information @@ -1789,6 +1789,9 @@ func (client *AliyunClient) NewAdbClient() (*rpc.Client, error) { productCode := "ads" endpoint := "" if client.config.Endpoints[productCode] == nil { + if v := client.config.AdbEndpoint; v != "" { + client.config.Endpoints[productCode] = v + } if err := client.loadEndpoint(productCode); err != nil { return nil, err } @@ -3857,9 +3860,7 @@ func (client *AliyunClient) NewMhubClient() (*rpc.Client, error) { endpoint := "" if v, ok := client.config.Endpoints[productCode]; !ok || v.(string) == "" { if err := client.loadEndpoint(productCode); err != nil { - endpoint = fmt.Sprintf("mhub.%s.aliyuncs.com", client.config.RegionId) - client.config.Endpoints[productCode] = endpoint - log.Printf("[ERROR] loading %s endpoint got an error: %#v. Using the endpoint %s instead.", productCode, err, endpoint) + return nil, fmt.Errorf("[ERROR] loading %s endpoint got an error: %#v. Using the endpoint %s instead.\"", productCode, err, fmt.Sprintf("mhub.%s.aliyuncs.com", client.config.RegionId)) } } if v, ok := client.config.Endpoints[productCode]; ok && v.(string) != "" { @@ -4000,3 +4001,29 @@ func (client *AliyunClient) NewDdsClient() (*rpc.Client, error) { } return conn, nil } + +func (client *AliyunClient) NewAlikafkaClient() (*rpc.Client, error) { + productCode := "alikafka" + endpoint := "" + if v, ok := client.config.Endpoints[productCode]; !ok || v.(string) == "" { + if err := client.loadEndpoint(productCode); err != nil { + return nil, err + } + } + if v, ok := client.config.Endpoints[productCode]; ok && v.(string) != "" { + endpoint = v.(string) + } + if endpoint == "" { + return nil, fmt.Errorf("[ERROR] missing the product %s endpoint.", productCode) + } + + sdkConfig := client.teaSdkConfig + sdkConfig.SetEndpoint(endpoint) + + conn, err := rpc.NewClient(&sdkConfig) + if err != nil { + return nil, fmt.Errorf("unable to initialize the %s client: %#v", productCode, err) + } + + return conn, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/config.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/config.go index ed6019df1c3..7d4a6f212d2 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/config.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/config.go @@ -160,6 +160,7 @@ type Config struct { AcrEndpoint string EdsuserEndpoint string GpdbEndpoint string + GaplusEndpoint string } func (c *Config) loadAndValidate() error { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/regions.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/regions.go index 83f1a29883f..f871c20be7f 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/regions.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity/regions.go @@ -115,7 +115,7 @@ var MaxComputeSupportRegions = []Region{} var FnfSupportRegions = []Region{Hangzhou, Beijing, Shanghai, Shenzhen, USWest1} var PrivateLinkRegions = []Region{EUCentral1} var BrainIndustrialRegions = []Region{Hangzhou} -var EciContainerGroupRegions = []Region{Beijing} +var EciContainerGroupRegions = []Region{Hangzhou} var TsdbInstanceSupportRegions = []Region{Beijing, Hangzhou, Shenzhen, Shanghai, ShenZhenFinance, Qingdao, Zhangjiakou, ShanghaiFinance, Hongkong, USWest1, APNorthEast1, EUWest1, APSouthEast1, APSouthEast2, APSouthEast3, EUCentral1, APSouthEast5, Zhangjiakou, CnNorth2Gov1} var EipanycastSupportRegions = []Region{Hangzhou} var VpcIpv6SupportRegions = []Region{Hangzhou, Shanghai, Shenzhen, Beijing, Huhehaote, Hongkong, APSouthEast1} @@ -131,7 +131,6 @@ var SaeSupportRegions = []Region{Hangzhou, Shanghai, Beijing, Zhangjiakou, Shenz var HbrSupportRegions = []Region{Hangzhou} var EcdSupportRegions = []Region{Hangzhou, Shanghai, Beijing, Shenzhen, Hongkong, APSouthEast1, APSouthEast2} var EcpSupportRegions = []Region{Hangzhou, Shanghai, Beijing, Shenzhen} -var CsgSupportRegions = []Region{Shanghai} var SddpSupportRegions = []Region{Hangzhou, Zhangjiakou, APSouthEast1} var CddcSupportRegions = []Region{Shenzhen, Beijing, APSouth1, EUWest1, APNorthEast1, MEEast1, ChengDu, Qingdao, Shanghai, Hongkong, HeYuan, APSouthEast1, APSouthEast2, APSouthEast3, EUCentral1, Huhehaote, APSouthEast5, USEast1, Zhangjiakou, USWest1, Hangzhou} var DfsSupportRegions = []Region{Hangzhou, Zhangjiakou, Shanghai, Beijing, HeYuan, ChengDu, APSouthEast5, USEast1, RusWest1} @@ -162,3 +161,22 @@ var DTSSupportRegions = []Region{Hangzhou, APSouth1, ShenZhenFinance, CnNorth2Go var OOSSupportRegions = []Region{APSouthEast5, USWest1, EUWest1, Qingdao, ChengDu, Shanghai, Huhehaote, Shenzhen, APNorthEast1, APSouthEast1, EUCentral1, Hangzhou, Beijing, APSouth1, APSouthEast3, USEast1, Zhangjiakou, Hongkong, APSouthEast2} var MongoDBSupportRegions = []Region{APSouth1, Shanghai, APSouthEast2, WuLanChaBu, CnNorth2Gov1, Hangzhou, Beijing, Qingdao, Zhangjiakou, USWest1, GuangZhou, APSouthEast6, EUWest1, ChengDu, APSouthEast1, APSouthEast3, APSouthEast5, ShanghaiFinance, Hongkong, HeYuan, Huhehaote, USEast1, EUCentral1, APNorthEast1, Shenzhen, ShenZhenFinance, MEEast1} var MongoDBServerlessSupportRegions = []Region{APSouthEast5, Shanghai, USEast1, Hongkong, HeYuan, Zhangjiakou, APSouthEast6, GuangZhou, Huhehaote, Beijing, Shenzhen, WuLanChaBu, ChengDu, Hangzhou, Qingdao, USWest1, APSouthEast1} +var FnFSupportRegions = []Region{Shenzhen, Beijing, Shanghai, APSouthEast1, USWest1, Hangzhou} +var GaSupportRegions = []Region{Hangzhou, APSouthEast1} +var AlidnsSupportRegions = []Region{Hangzhou, APSouthEast1} +var VPCVbrHaSupportRegions = []Region{Hangzhou} +var ROSSupportRegions = []Region{USWest1, HeYuan, Zhangjiakou, Hongkong, APSouthEast3, EUCentral1, Huhehaote, APSouthEast6, Shenzhen, APSouth1, Qingdao, GuangZhou, APSouthEast2, WuLanChaBu, EUWest1, MEEast1, ChengDu, Shanghai, APSouthEast1, APSouthEast5, USEast1, Beijing, APNorthEast1, Hangzhou} +var VPCBgpGroupSupportRegions = []Region{Hangzhou} +var NASSupportRegions = []Region{HeYuan, Huhehaote, APSouthEast5, WuLanChaBu, CnNorth2Gov1, Qingdao, ChengDu, Hangzhou, APSouth1, ShenZhenFinance, EUCentral1, Shenzhen, APSouthEast2, Beijing, Shanghai, ShanghaiFinance, APSouthEast1, APSouthEast6, APNorthEast1, APSouthEast3, GuangZhou, USEast1, EUWest1, Hongkong, Zhangjiakou, USWest1} +var HBRSupportRegions = []Region{Beijing, ChengDu, Huhehaote, Qingdao, Shanghai, Shenzhen, Zhangjiakou, Hangzhou} +var NASCPFSSupportRegions = []Region{Hangzhou, Shenzhen, Beijing, Shanghai, HeYuan, Huhehaote, WuLanChaBu, Qingdao, ChengDu} +var WAFSupportRegions = []Region{Hangzhou, APSouth1} +var MSCSupportRegions = []Region{Hangzhou} +var FCSupportRegions = []Region{Hangzhou} +var RDCupportRegions = []Region{Hangzhou} +var MSESupportRegions = []Region{Shenzhen, Beijing, EUWest1, APNorthEast1, Shanghai, ShanghaiFinance, APSouthEast5, USEast1, Zhangjiakou, CnNorth2Gov1, APSouthEast3, EUCentral1, Hangzhou, ShenZhenFinance, Qingdao, Hongkong, APSouthEast2, APSouth1, ChengDu, APSouthEast1, HeYuan, Huhehaote, USWest1} +var BrainIndustrialSupportRegions = []Region{Hangzhou} +var TestSalveRegions = []Region{Hangzhou} +var ECPSupportRegions = []Region{Beijing, Hangzhou} +var DCDNSupportRegions = []Region{Hangzhou, APSouthEast1, APNorthEast1} +var GpdbElasticInstanceSupportRegions = []Region{Beijing, Hangzhou, Shanghai, Shenzhen, APSouthEast1, APSouthEast5, Hongkong} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_adb_db_clusters.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_adb_db_clusters.go index e86bb5ec783..9e2cc3a1cac 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_adb_db_clusters.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_adb_db_clusters.go @@ -55,6 +55,15 @@ func dataSourceAlicloudAdbDbClusters() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 100, + }, "clusters": { Type: schema.TypeList, Computed: true, @@ -241,6 +250,10 @@ func dataSourceAlicloudAdbDbClusters() *schema.Resource { Optional: true, Default: false, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -270,9 +283,17 @@ func dataSourceAlicloudAdbDbClustersRead(d *schema.ResourceData, meta interface{ } request["Tag.*"] = tags } - request["PageSize"] = PageSizeLarge - request["PageNumber"] = 1 - var objects []map[string]interface{} + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["PageNumber"] = v.(int) + } else { + request["PageNumber"] = 1 + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge + } + var objects []interface{} var descriptionRegex *regexp.Regexp if v, ok := d.GetOk("description_regex"); ok { r, err := regexp.Compile(v.(string)) @@ -310,6 +331,10 @@ func dataSourceAlicloudAdbDbClustersRead(d *schema.ResourceData, meta interface{ return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Items.DBCluster", response) } result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break + } for _, v := range result { item := v.(map[string]interface{}) if descriptionRegex != nil { @@ -324,7 +349,7 @@ func dataSourceAlicloudAdbDbClustersRead(d *schema.ResourceData, meta interface{ } objects = append(objects, item) } - if len(result) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } request["PageNumber"] = request["PageNumber"].(int) + 1 @@ -332,7 +357,8 @@ func dataSourceAlicloudAdbDbClustersRead(d *schema.ResourceData, meta interface{ descriptions := make([]string, 0) ids := make([]string, 0) s := make([]map[string]interface{}, 0) - for _, object := range objects { + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ "commodity_code": object["CommodityCode"], "compute_resource": object["ComputeResource"], @@ -431,6 +457,9 @@ func dataSourceAlicloudAdbDbClustersRead(d *schema.ResourceData, meta interface{ if err := d.Set("clusters", s); err != nil { return WrapError(err) } + if err := d.Set("total_count", formatInt(response["TotalCount"])); err != nil { + return WrapError(err) + } if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alb_load_balancers.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alb_load_balancers.go index 378261cf3fe..81b8e8d09c2 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alb_load_balancers.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alb_load_balancers.go @@ -28,7 +28,7 @@ func dataSourceAlicloudAlbLoadBalancers() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"Abnormal", "Normal"}, false), - Deprecated: "Field 'load_balancer_bussiness_status' has been deprecated from provider version 1.142.0 and it will be remove in the future version. Please use the new attribute 'load_balancer_business_status' instead.", + Deprecated: "Field 'load_balancer_bussiness_status' has been deprecated from provider version 1.142.0 and it will be removed in the future version. Please use the new attribute 'load_balancer_business_status' instead.", }, "load_balancer_business_status": { Type: schema.TypeString, @@ -169,7 +169,7 @@ func dataSourceAlicloudAlbLoadBalancers() *schema.Resource { "load_balancer_bussiness_status": { Type: schema.TypeString, Computed: true, - Deprecated: "Field 'load_balancer_bussiness_status' has been deprecated from provider version 1.142.0 and it will be remove in the future version. Please use the new parameter 'load_balancer_business_status' instead.", + Deprecated: "Field 'load_balancer_bussiness_status' has been deprecated from provider version 1.142.0 and it will be removed in the future version. Please use the new parameter 'load_balancer_business_status' instead.", }, "load_balancer_business_status": { Type: schema.TypeString, diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_access_strategies.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_access_strategies.go new file mode 100644 index 00000000000..5e23fbbf181 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_access_strategies.go @@ -0,0 +1,440 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudAlidnsAccessStrategies() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudAlidnsAccessStrategiesRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "lang": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "strategy_mode": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"GEO", "LATENCY"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "strategies": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "access_strategy_id": { + Type: schema.TypeString, + Computed: true, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "create_timestamp": { + Type: schema.TypeString, + Computed: true, + }, + "default_addr_pool_type": { + Type: schema.TypeString, + Computed: true, + }, + "default_addr_pools": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "addr_count": { + Type: schema.TypeInt, + Computed: true, + }, + "addr_pool_id": { + Type: schema.TypeString, + Computed: true, + }, + "lba_weight": { + Type: schema.TypeInt, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "default_available_addr_num": { + Type: schema.TypeInt, + Computed: true, + }, + "default_latency_optimization": { + Type: schema.TypeString, + Computed: true, + }, + "default_lba_strategy": { + Type: schema.TypeString, + Computed: true, + }, + "default_max_return_addr_num": { + Type: schema.TypeInt, + Computed: true, + }, + "default_min_available_addr_num": { + Type: schema.TypeInt, + Computed: true, + }, + "effective_addr_pool_group_type": { + Type: schema.TypeString, + Computed: true, + }, + "failover_addr_pool_type": { + Type: schema.TypeString, + Computed: true, + }, + "failover_addr_pools": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "addr_count": { + Type: schema.TypeInt, + Computed: true, + }, + "addr_pool_id": { + Type: schema.TypeString, + Computed: true, + }, + "lba_weight": { + Type: schema.TypeInt, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "failover_available_addr_num": { + Type: schema.TypeInt, + Computed: true, + }, + "failover_latency_optimization": { + Type: schema.TypeString, + Computed: true, + }, + "failover_lba_strategy": { + Type: schema.TypeString, + Computed: true, + }, + "failover_max_return_addr_num": { + Type: schema.TypeInt, + Computed: true, + }, + "failover_min_available_addr_num": { + Type: schema.TypeInt, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "access_mode": { + Type: schema.TypeString, + Computed: true, + }, + "lines": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "group_code": { + Type: schema.TypeString, + Computed: true, + }, + "group_name": { + Type: schema.TypeString, + Computed: true, + }, + "line_code": { + Type: schema.TypeString, + Computed: true, + }, + "line_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "strategy_mode": { + Type: schema.TypeString, + Computed: true, + }, + "strategy_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudAlidnsAccessStrategiesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeDnsGtmAccessStrategies" + request := make(map[string]interface{}) + request["InstanceId"] = d.Get("instance_id") + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + request["StrategyMode"] = d.Get("strategy_mode") + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + var nameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + nameRegex = r + } + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_alidns_access_strategies", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Strategies.Strategy", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Strategies.Strategy", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if nameRegex != nil { + if !nameRegex.MatchString(fmt.Sprint(item["StrategyName"])) { + continue + } + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["StrategyId"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "id": fmt.Sprint(object["StrategyId"]), + "access_strategy_id": fmt.Sprint(object["StrategyId"]), + "create_time": object["CreateTime"], + "create_timestamp": fmt.Sprint(object["CreateTimestamp"]), + "effective_addr_pool_group_type": object["EffectiveAddrPoolGroupType"], + "strategy_name": object["StrategyName"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["StrategyName"]) + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["StrategyId"]) + alidnsService := AlidnsService{client} + getResp, err := alidnsService.DescribeAlidnsAccessStrategy(id) + if err != nil { + return WrapError(err) + } + mapping["default_addr_pool_type"] = getResp["DefaultAddrPoolType"] + + defaultAddrPool := make([]map[string]interface{}, 0) + if v, ok := getResp["DefaultAddrPools"]; ok { + defaultAddrPools := v.(map[string]interface{}) + if v, ok := defaultAddrPools["DefaultAddrPool"]; ok { + defaultAddrPoolList := v.([]interface{}) + for _, v := range defaultAddrPoolList { + if m1, ok := v.(map[string]interface{}); ok { + temp1 := map[string]interface{}{ + "addr_count": formatInt(m1["AddrCount"]), + "addr_pool_id": m1["Id"], + "lba_weight": formatInt(m1["LbaWeight"]), + "name": m1["Name"], + } + defaultAddrPool = append(defaultAddrPool, temp1) + } + } + } + } + + mapping["default_addr_pools"] = defaultAddrPool + if v, ok := getResp["DefaultAvailableAddrNum"]; ok && fmt.Sprint(v) != "0" { + mapping["default_available_addr_num"] = formatInt(v) + } + mapping["default_latency_optimization"] = getResp["DefaultLatencyOptimization"] + mapping["default_lba_strategy"] = getResp["DefaultLbaStrategy"] + if v, ok := getResp["DefaultMaxReturnAddrNum"]; ok && fmt.Sprint(v) != "0" { + mapping["default_max_return_addr_num"] = formatInt(v) + } + if v, ok := getResp["DefaultMinAvailableAddrNum"]; ok && fmt.Sprint(v) != "0" { + mapping["default_min_available_addr_num"] = formatInt(v) + } + mapping["failover_addr_pool_type"] = getResp["FailoverAddrPoolType"] + mapping["access_mode"] = getResp["AccessMode"] + + failoverAddrPool := make([]map[string]interface{}, 0) + if v, ok := getResp["FailoverAddrPools"]; ok { + failoverAddrPools := v.(map[string]interface{}) + if v, ok := failoverAddrPools["FailoverAddrPool"]; ok { + failoverAddrPoolList := v.([]interface{}) + for _, v := range failoverAddrPoolList { + if m1, ok := v.(map[string]interface{}); ok { + temp1 := map[string]interface{}{ + "addr_count": formatInt(m1["AddrCount"]), + "addr_pool_id": m1["Id"], + "lba_weight": formatInt(m1["LbaWeight"]), + "name": m1["Name"], + } + failoverAddrPool = append(failoverAddrPool, temp1) + } + } + } + } + mapping["failover_addr_pools"] = failoverAddrPool + if v, ok := getResp["FailoverAvailableAddrNum"]; ok && fmt.Sprint(v) != "0" { + mapping["failover_available_addr_num"] = formatInt(v) + } + mapping["failover_latency_optimization"] = getResp["FailoverLatencyOptimization"] + mapping["failover_lba_strategy"] = getResp["FailoverLbaStrategy"] + if v, ok := getResp["FailoverMaxReturnAddrNum"]; ok && fmt.Sprint(v) != "0" { + mapping["failover_max_return_addr_num"] = formatInt(v) + } + if v, ok := getResp["FailoverMinAvailableAddrNum"]; ok && fmt.Sprint(v) != "0" { + mapping["failover_min_available_addr_num"] = formatInt(v) + } + mapping["instance_id"] = getResp["InstanceId"] + + lineMaps := make([]map[string]interface{}, 0) + if v, ok := getResp["Lines"]; ok { + lines := v.(map[string]interface{}) + if v, ok := lines["Line"]; ok { + lineList := v.([]interface{}) + for _, v := range lineList { + if m1, ok := v.(map[string]interface{}); ok { + temp1 := map[string]interface{}{ + "group_code": m1["GroupCode"], + "group_name": m1["GroupName"], + "line_code": m1["LineCode"], + "line_name": m1["LineName"], + } + lineMaps = append(lineMaps, temp1) + } + } + } + } + mapping["lines"] = lineMaps + mapping["strategy_mode"] = getResp["StrategyMode"] + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + if err := d.Set("strategies", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_address_pools.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_address_pools.go new file mode 100644 index 00000000000..8ba96e015df --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_address_pools.go @@ -0,0 +1,283 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudAlidnsAddressPools() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudAlidnsAddressPoolsRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "pools": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "address_pool_id": { + Type: schema.TypeString, + Computed: true, + }, + "address_pool_name": { + Type: schema.TypeString, + Computed: true, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "create_timestamp": { + Type: schema.TypeString, + Computed: true, + }, + "lba_strategy": { + Type: schema.TypeString, + Computed: true, + }, + "monitor_status": { + Type: schema.TypeString, + Computed: true, + }, + "monitor_config_id": { + Type: schema.TypeString, + Computed: true, + }, + "type": { + Type: schema.TypeString, + Computed: true, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + }, + "update_timestamp": { + Type: schema.TypeString, + Computed: true, + }, + "address": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "address": { + Type: schema.TypeString, + Computed: true, + }, + "attribute_info": { + Type: schema.TypeString, + Computed: true, + }, + "lba_weight": { + Type: schema.TypeInt, + Computed: true, + }, + "mode": { + Type: schema.TypeString, + Computed: true, + }, + "remark": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudAlidnsAddressPoolsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeDnsGtmInstanceAddressPools" + request := make(map[string]interface{}) + request["InstanceId"] = d.Get("instance_id") + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + var addressPoolNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + addressPoolNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_alidns_address_pools", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.AddrPools.AddrPool", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.AddrPools.AddrPool", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if addressPoolNameRegex != nil && !addressPoolNameRegex.MatchString(fmt.Sprint(item["Name"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["AddrPoolId"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "id": fmt.Sprint(object["AddrPoolId"]), + "instance_id": request["InstanceId"], + "address_pool_id": fmt.Sprint(object["AddrPoolId"]), + "address_pool_name": object["Name"], + "create_time": object["CreateTime"], + "create_timestamp": fmt.Sprint(object["CreateTimestamp"]), + "lba_strategy": object["LbaStrategy"], + "type": object["Type"], + "update_timestamp": fmt.Sprint(object["UpdateTimestamp"]), + "update_time": fmt.Sprint(object["UpdateTime"]), + "monitor_status": object["MonitorStatus"], + "monitor_config_id": object["MonitorConfigId"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["Name"]) + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["AddrPoolId"]) + alidnsService := AlidnsService{client} + getResp, err := alidnsService.DescribeAlidnsAddressPool(id) + if err != nil { + return WrapError(err) + } + addressMaps := make([]map[string]interface{}, 0) + if v, ok := getResp["Addrs"]; ok { + addressList := v.(map[string]interface{}) + if v, ok := addressList["Addr"]; ok { + addressSli := v.([]interface{}) + for _, v := range addressSli { + if m1, ok := v.(map[string]interface{}); ok { + addressMap := make(map[string]interface{}) + addressMap["attribute_info"] = m1["AttributeInfo"] + addressMap["remark"] = m1["Remark"] + if v, ok := m1["LbaWeight"]; ok { + addressMap["lba_weight"] = v + } + addressMap["address"] = m1["Addr"] + addressMap["mode"] = m1["Mode"] + addressMaps = append(addressMaps, addressMap) + } + } + } + } + mapping["address"] = addressMaps + + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + if err := d.Set("pools", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_custom_lines.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_custom_lines.go new file mode 100644 index 00000000000..872bd4ad9b7 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_custom_lines.go @@ -0,0 +1,235 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudAlidnsCustomLines() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudAlidnsCustomLinesRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "domain_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "lang": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "lines": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "code": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "custom_line_id": { + Type: schema.TypeString, + Computed: true, + }, + "custom_line_name": { + Type: schema.TypeString, + Computed: true, + }, + "domain_name": { + Type: schema.TypeString, + Computed: true, + }, + "ip_segment_list": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "end_ip": { + Type: schema.TypeString, + Computed: true, + }, + "start_ip": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudAlidnsCustomLinesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeCustomLines" + request := make(map[string]interface{}) + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + request["DomainName"] = d.Get("domain_name") + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + var customLineNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + customLineNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_alidns_custom_lines", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.CustomLines", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.CustomLines", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if customLineNameRegex != nil && !customLineNameRegex.MatchString(fmt.Sprint(item["Name"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["Id"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "code": object["Code"], + "id": fmt.Sprint(object["Id"]), + "custom_line_id": fmt.Sprint(object["Id"]), + "custom_line_name": object["Name"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["Name"]) + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["Id"]) + alidnsService := AlidnsService{client} + getResp, err := alidnsService.DescribeAlidnsCustomLine(id) + if err != nil { + return WrapError(err) + } + mapping["domain_name"] = getResp["DomainName"] + if ipSegmentList, ok := object["IpSegmentList"]; ok { + ipSegments := make([]map[string]interface{}, 0) + for _, ipSegmentListItem := range ipSegmentList.([]interface{}) { + ipSegmentMap := ipSegmentListItem.(map[string]interface{}) + ipSegmentArg := make(map[string]interface{}, 0) + ipSegmentArg["end_ip"] = ipSegmentMap["EndIp"] + ipSegmentArg["start_ip"] = ipSegmentMap["StartIp"] + ipSegments = append(ipSegments, ipSegmentArg) + } + mapping["ip_segment_list"] = ipSegments + } + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("lines", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_gtm_instances.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_gtm_instances.go new file mode 100644 index 00000000000..6d5db21bbbc --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alidns_gtm_instances.go @@ -0,0 +1,275 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudAlidnsGtmInstances() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudAlidnsGtmInstancesRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "lang": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "resource_group_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "output_file": { + Type: schema.TypeString, + Computed: true, + }, + "instances": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "alert_config": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "dingtalk_notice": { + Type: schema.TypeBool, + Computed: true, + }, + "email_notice": { + Type: schema.TypeBool, + Computed: true, + }, + "notice_type": { + Type: schema.TypeString, + Computed: true, + }, + "sms_notice": { + Type: schema.TypeBool, + Computed: true, + }, + }, + }, + }, + "alert_group": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cname_type": { + Type: schema.TypeString, + Computed: true, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "expire_time": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "instance_name": { + Type: schema.TypeString, + Computed: true, + }, + "strategy_mode": { + Type: schema.TypeString, + Computed: true, + }, + "payment_type": { + Type: schema.TypeString, + Computed: true, + }, + "public_cname_mode": { + Type: schema.TypeString, + Computed: true, + }, + "public_rr": { + Type: schema.TypeString, + Computed: true, + }, + "public_user_domain_name": { + Type: schema.TypeString, + Computed: true, + }, + "public_zone_name": { + Type: schema.TypeString, + Computed: true, + }, + "resource_group_id": { + Type: schema.TypeString, + Computed: true, + }, + "ttl": { + Type: schema.TypeInt, + Computed: true, + }, + "package_edition": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudAlidnsGtmInstancesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeDnsGtmInstances" + request := make(map[string]interface{}) + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + if v, ok := d.GetOk("resource_group_id"); ok { + request["ResourceGroupId"] = v + } + + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_alidns_gtm_instances", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.GtmInstances", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.GtmInstances", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["InstanceId"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "payment_type": object["PaymentType"], + "create_time": object["CreateTime"], + "expire_time": object["ExpireTime"], + "id": fmt.Sprint(object["InstanceId"]), + "instance_id": fmt.Sprint(object["InstanceId"]), + "resource_group_id": object["ResourceGroupId"], + "package_edition": object["VersionCode"], + } + + if config, ok := object["Config"].(map[string]interface{}); ok { + mapping["public_zone_name"] = config["PublicZoneName"] + mapping["cname_type"] = config["CnameType"] + mapping["instance_name"] = config["InstanceName"] + mapping["strategy_mode"] = config["StrategyMode"] + mapping["public_cname_mode"] = config["PublicCnameMode"] + mapping["public_rr"] = config["PublicRr"] + mapping["public_user_domain_name"] = config["PublicUserDomainName"] + if v, ok := config["Ttl"]; ok { + mapping["ttl"] = formatInt(v) + } + if v, ok := config["AlertGroup"].(string); ok { + vv, err := convertJsonStringToList(v) + if err != nil { + return WrapError(err) + } else { + mapping["alert_group"] = vv + } + } + + if alertConfigsList, ok := config["AlertConfig"]; ok { + alertConfigConfigArgs := alertConfigsList.([]interface{}) + alertConfigsMaps := make([]map[string]interface{}, 0) + for _, alertConfigMapArgitem := range alertConfigConfigArgs { + alertConfigMapArg := alertConfigMapArgitem.(map[string]interface{}) + alertConfigsMap := map[string]interface{}{} + alertConfigsMap["sms_notice"] = alertConfigMapArg["SmsNotice"] + alertConfigsMap["notice_type"] = alertConfigMapArg["NoticeType"] + alertConfigsMap["email_notice"] = alertConfigMapArg["EmailNotice"] + alertConfigsMap["dingtalk_notice"] = alertConfigMapArg["DingtalkNotice"] + alertConfigsMaps = append(alertConfigsMaps, alertConfigsMap) + } + mapping["alert_config"] = alertConfigsMaps + } + } + ids = append(ids, fmt.Sprint(mapping["id"])) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("instances", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_consumer_groups.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_consumer_groups.go index 4f09237a258..bbf4fa88380 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_consumer_groups.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_consumer_groups.go @@ -1,6 +1,7 @@ package alicloud import ( + "fmt" "regexp" "github.com/aliyun/alibaba-cloud-sdk-go/services/alikafka" @@ -25,17 +26,55 @@ func dataSourceAlicloudAlikafkaConsumerGroups() *schema.Resource { ValidateFunc: validation.ValidateRegexp, ForceNew: true, }, + // Computed values + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, "output_file": { Type: schema.TypeString, Optional: true, ForceNew: true, }, // Computed values + "names": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "consumer_ids": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "groups": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "consumer_id": { + Type: schema.TypeString, + Computed: true, + }, + "remark": { + Type: schema.TypeString, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), + }, + }, + }, }, } } @@ -48,6 +87,16 @@ func dataSourceAlicloudAlikafkaConsumerGroupsRead(d *schema.ResourceData, meta i request.InstanceId = d.Get("instance_id").(string) request.RegionId = client.RegionId + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + raw, err := alikafkaService.client.WithAlikafkaClient(func(alikafkaClient *alikafka.Client) (interface{}, error) { return alikafkaClient.GetConsumerList(request) }) @@ -59,38 +108,63 @@ func dataSourceAlicloudAlikafkaConsumerGroupsRead(d *schema.ResourceData, meta i var filteredConsumerGroups []alikafka.ConsumerVO nameRegex, ok := d.GetOk("consumer_id_regex") - if ok && nameRegex.(string) != "" { + for _, consumer := range response.ConsumerList.ConsumerVO { var r *regexp.Regexp - if nameRegex != "" { - r, err = regexp.Compile(nameRegex.(string)) - if err != nil { - return WrapError(err) + + if ok && nameRegex.(string) != "" { + if nameRegex != "" { + r, err = regexp.Compile(nameRegex.(string)) + if err != nil { + return WrapError(err) + } } } - for _, consumer := range response.ConsumerList.ConsumerVO { - if r != nil && !r.MatchString(consumer.ConsumerId) { + + if r != nil && !r.MatchString(consumer.ConsumerId) { + continue + } + + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(consumer.InstanceId, ":", consumer.ConsumerId)]; !ok { continue } - - filteredConsumerGroups = append(filteredConsumerGroups, consumer) } - } else { - filteredConsumerGroups = response.ConsumerList.ConsumerVO + + filteredConsumerGroups = append(filteredConsumerGroups, consumer) } + return alikafkaConsumerGroupsDecriptionAttributes(d, filteredConsumerGroups, meta) } func alikafkaConsumerGroupsDecriptionAttributes(d *schema.ResourceData, consumerGroupsInfo []alikafka.ConsumerVO, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + alikafkaService := AlikafkaService{client} var ids []string + var names []string + var s []map[string]interface{} for _, item := range consumerGroupsInfo { - - ids = append(ids, item.ConsumerId) + mapping := map[string]interface{}{ + "id": fmt.Sprint(item.InstanceId, ":", item.ConsumerId), + "instance_id": item.InstanceId, + "consumer_id": item.ConsumerId, + "remark": item.Remark, + "tags": alikafkaService.tagVOTagsToMap(item.Tags.TagVO), + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, item.ConsumerId) + s = append(s, mapping) } d.SetId(dataResourceIdHash(ids)) - if err := d.Set("consumer_ids", ids); err != nil { + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + if err := d.Set("groups", s); err != nil { return WrapError(err) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_instances.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_instances.go index 0cc906f605b..8aadb782037 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_instances.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_instances.go @@ -1,10 +1,14 @@ package alicloud import ( + "fmt" "regexp" "time" - "github.com/aliyun/alibaba-cloud-sdk-go/services/alikafka" + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" @@ -39,6 +43,11 @@ func dataSourceAlicloudAlikafkaInstances() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, "instances": { Type: schema.TypeList, Computed: true, @@ -132,6 +141,77 @@ func dataSourceAlicloudAlikafkaInstances() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "upgrade_service_detail_info": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "current2_open_source_version": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "allowed_list": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "deploy_type": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_list": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "allowed_ip_list": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "port_range": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "internet_list": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "allowed_ip_list": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "port_range": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + "domain_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "ssl_domain_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "sasl_domain_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), }, }, }, @@ -141,10 +221,17 @@ func dataSourceAlicloudAlikafkaInstances() *schema.Resource { func dataSourceAlicloudAlikafkaInstancesRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) - alikafkaService := AlikafkaService{client} - request := alikafka.CreateGetInstanceListRequest() - request.RegionId = client.RegionId + action := "GetInstanceList" + request := make(map[string]interface{}) + conn, err := client.NewAlikafkaClient() + if err != nil { + return WrapError(err) + } + + request["RegionId"] = client.RegionId + + var objects []map[string]interface{} idsMap := make(map[string]string) if v, ok := d.GetOk("ids"); ok { @@ -152,90 +239,166 @@ func dataSourceAlicloudAlikafkaInstancesRead(d *schema.ResourceData, meta interf if vv == nil { continue } - idsMap[Trim(vv.(string))] = Trim(vv.(string)) + idsMap[vv.(string)] = vv.(string) } } - - raw, err := alikafkaService.client.WithAlikafkaClient(func(alikafkaClient *alikafka.Client) (interface{}, error) { - return alikafkaClient.GetInstanceList(request) - }) - if err != nil { - return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_alikafka_instances", request.GetActionName(), AlibabaCloudSdkGoERROR) + var nameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + nameRegex = regexp.MustCompile(v.(string)) } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) - response, _ := raw.(*alikafka.GetInstanceListResponse) - - var filteredInstances []alikafka.InstanceVO - nameRegex, ok := d.GetOk("name_regex") - if (ok && nameRegex.(string) != "") || (len(idsMap) > 0) { - var r *regexp.Regexp - if nameRegex != "" { - r, err = regexp.Compile(nameRegex.(string)) + + var response map[string]interface{} + pageNo, pageSize := 1, PageSizeLarge + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-16"), StringPointer("AK"), nil, request, &runtime) if err != nil { - return WrapError(err) + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_alikafka_instances", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.InstanceList.InstanceVO", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.InstanceList.InstanceVO", response) } - for _, instance := range response.InstanceList.InstanceVO { - if r != nil && !r.MatchString(instance.Name) { + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if nameRegex != nil && !nameRegex.MatchString(fmt.Sprint(item["Name"])) { continue } + if len(idsMap) > 0 { - if _, ok := idsMap[instance.InstanceId]; !ok { + if _, ok := idsMap[fmt.Sprint(item["InstanceId"])]; !ok { continue } } - - filteredInstances = append(filteredInstances, instance) + objects = append(objects, item) + } + if len(result) < pageSize { + break } - } else { - filteredInstances = response.InstanceList.InstanceVO + pageNo++ } - return alikafkaInstancesDecriptionAttributes(d, filteredInstances, meta) -} - -func alikafkaInstancesDecriptionAttributes(d *schema.ResourceData, instancesInfo []alikafka.InstanceVO, meta interface{}) error { - var ids []string - var names []string - var s []map[string]interface{} - for _, item := range instancesInfo { + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { paidType := PostPaid - if item.PaidType == 0 { + if object["PaidType"] == 0 { paidType = PrePaid } + mapping := map[string]interface{}{ - "id": item.InstanceId, - "name": item.Name, - "create_time": time.Unix(int64(item.CreateTime)/1000, 0).Format("2006-01-02 03:04:05"), - "service_status": item.ServiceStatus, - "deploy_type": item.DeployType, - "vpc_id": item.VpcId, - "vswitch_id": item.VSwitchId, - "io_max": item.IoMax, - "eip_max": item.EipMax, - "disk_type": item.DiskType, - "disk_size": item.DiskSize, - "topic_quota": item.TopicNumLimit, - "paid_type": paidType, - "spec_type": item.SpecType, - "zone_id": item.ZoneId, - "end_point": item.EndPoint, - "security_group": item.SecurityGroup, - "service_version": item.UpgradeServiceDetailInfo.Current2OpenSourceVersion, - "config": item.AllConfig, - "expired_time": item.ExpiredTime, - "msg_retain": item.MsgRetain, - "ssl_end_point": item.SslEndPoint, + "id": object["InstanceId"], + "name": object["Name"], + "create_time": object["CreateTime"], + "service_status": object["ServiceStatus"], + "deploy_type": object["DeployType"], + "vpc_id": object["VpcId"], + "vswitch_id": object["VSwitchId"], + "io_max": object["IoMax"], + "eip_max": object["EipMax"], + "disk_type": object["DiskType"], + "disk_size": object["DiskSize"], + "topic_quota": object["TopicNumLimit"], + "paid_type": paidType, + "service_version": object["UpgradeServiceDetailInfo"].(map[string]interface{})["Current2OpenSourceVersion"], + "spec_type": object["SpecType"], + "zone_id": object["ZoneId"], + "end_point": object["EndPoint"], + "security_group": object["SecurityGroup"], + "config": object["AllConfig"], + "expired_time": object["ExpiredTime"], + "msg_retain": object["MsgRetain"], + "ssl_end_point": object["SslEndPoint"], + "domain_endpoint": object["DomainEndpoint"], + "ssl_domain_endpoint": object["SslDomainEndpoint"], + "sasl_domain_endpoint": object["SaslDomainEndpoint"], + } + tags := make(map[string]interface{}) + t, _ := jsonpath.Get("$.Tags.TagVO", object) + if t != nil { + for _, t := range t.([]interface{}) { + key := t.(map[string]interface{})["Key"].(string) + value := t.(map[string]interface{})["Value"].(string) + if !ignoredTags(key, value) { + tags[key] = value + } + } + } + mapping["tags"] = tags + + DetailInfoMaps := make([]map[string]interface{}, 0) + if _, ok := object["UpgradeServiceDetailInfo"].(map[string]interface{}); ok { + UpgradeServiceDetailInfoMap := map[string]interface{}{} + UpgradeServiceDetailInfoMap["current2_open_source_version"] = object["UpgradeServiceDetailInfo"].(map[string]interface{})["Current2OpenSourceVersion"] + DetailInfoMaps = append(DetailInfoMaps, UpgradeServiceDetailInfoMap) + } + mapping["upgrade_service_detail_info"] = DetailInfoMaps + + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, mapping["name"]) + id := fmt.Sprint(object["InstanceId"]) + + AlikaService := AlikafkaService{client} + if d.Get("enable_details").(bool) { + getResp, err := AlikaService.GetAllowedIpList(id) + if err != nil { + return WrapError(err) + } + + allowedListMaps := make([]map[string]interface{}, 0) + if defaultActionsList, ok := getResp["AllowedList"].(map[string]interface{}); ok { + defaultActionsMap := map[string]interface{}{} + defaultActionsMap["deploy_type"] = defaultActionsList["DeployType"] + if forwardGroupConfigArg, ok := defaultActionsList["VpcList"].([]interface{}); ok { + serverGroupTuplesMaps := make([]map[string]interface{}, 0) + for _, serverGroupTuples := range forwardGroupConfigArg { + serverGroupTuplesArg := serverGroupTuples.(map[string]interface{}) + serverGroupTuplesMap := map[string]interface{}{} + serverGroupTuplesMap["port_range"] = serverGroupTuplesArg["PortRange"] + serverGroupTuplesMap["allowed_ip_list"] = serverGroupTuplesArg["AllowedIpList"] + serverGroupTuplesMaps = append(serverGroupTuplesMaps, serverGroupTuplesMap) + } + defaultActionsMap["vpc_list"] = serverGroupTuplesMaps + } + + if forwardGroupConfigArg, ok := defaultActionsList["InternetList"].([]interface{}); ok { + serverGroupTuplesMaps := make([]map[string]interface{}, 0) + for _, serverGroupTuples := range forwardGroupConfigArg { + serverGroupTuplesArg := serverGroupTuples.(map[string]interface{}) + serverGroupTuplesMap := map[string]interface{}{} + serverGroupTuplesMap["port_range"] = serverGroupTuplesArg["PortRange"] + serverGroupTuplesMap["allowed_ip_list"] = serverGroupTuplesArg["AllowedIpList"] + serverGroupTuplesMaps = append(serverGroupTuplesMaps, serverGroupTuplesMap) + } + defaultActionsMap["internet_list"] = serverGroupTuplesMaps + } + + allowedListMaps = append(allowedListMaps, defaultActionsMap) + + } + mapping["allowed_list"] = allowedListMaps } - ids = append(ids, item.InstanceId) - names = append(names, item.Name) s = append(s, mapping) } d.SetId(dataResourceIdHash(ids)) - if err := d.Set("ids", ids); err != nil { return WrapError(err) } @@ -245,11 +408,9 @@ func alikafkaInstancesDecriptionAttributes(d *schema.ResourceData, instancesInfo if err := d.Set("instances", s); err != nil { return WrapError(err) } - - // create a json file in current directory and write data source to it if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } - return nil + return nil } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_topics.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_topics.go index 1f9bc9c27a5..6f6a4295f59 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_topics.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_alikafka_topics.go @@ -1,12 +1,15 @@ package alicloud import ( + "fmt" "regexp" "time" + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/aliyun/alibaba-cloud-sdk-go/services/alikafka" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" @@ -28,11 +31,33 @@ func dataSourceAlicloudAlikafkaTopics() *schema.Resource { ValidateFunc: validation.ValidateRegexp, ForceNew: true, }, + // Computed values + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "topic": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, "output_file": { Type: schema.TypeString, Optional: true, ForceNew: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 50, + }, // Computed values "names": { Type: schema.TypeList, @@ -44,6 +69,10 @@ func dataSourceAlicloudAlikafkaTopics() *schema.Resource { Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, "topic": { Type: schema.TypeString, Computed: true, @@ -72,100 +101,167 @@ func dataSourceAlicloudAlikafkaTopics() *schema.Resource { Type: schema.TypeInt, Computed: true, }, + "status_name": { + Type: schema.TypeString, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), }, }, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } func dataSourceAlicloudAlikafkaTopicsRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) - alikafkaService := AlikafkaService{client} - - request := alikafka.CreateGetTopicListRequest() - request.InstanceId = d.Get("instance_id").(string) - request.RegionId = client.RegionId - wait := incrementalWait(3*time.Second, 5*time.Second) - var raw interface{} - var err error + action := "GetTopicList" + request := make(map[string]interface{}) + conn, err := client.NewAlikafkaClient() + if err != nil { + return WrapError(err) + } + request["RegionId"] = client.RegionId + request["InstanceId"] = d.Get("instance_id").(string) + if v, ok := d.GetOk("topic"); ok { + request["Topic"] = v + } - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - raw, err = alikafkaService.client.WithAlikafkaClient(func(alikafkaClient *alikafka.Client) (interface{}, error) { - return alikafkaClient.GetTopicList(request) - }) - if err != nil { - if IsExpectedErrors(err, []string{ThrottlingUser}) { - wait() - return resource.RetryableError(err) + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue } - return resource.NonRetryableError(err) + idsMap[vv.(string)] = vv.(string) } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) - return nil - }) + } + var nameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + nameRegex = regexp.MustCompile(v.(string)) + } - if err != nil { - return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_alikafka_topics", request.GetActionName(), AlibabaCloudSdkGoERROR) + var response map[string]interface{} + + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["CurrentPage"] = v.(int) + } else { + request["CurrentPage"] = 1 } - response, _ := raw.(*alikafka.GetTopicListResponse) - - var filteredTopics []alikafka.TopicVO - nameRegex, ok := d.GetOk("name_regex") - if ok && nameRegex.(string) != "" { - var r *regexp.Regexp - if nameRegex != "" { - r, err = regexp.Compile(nameRegex.(string)) + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge + } + + var objects []interface{} + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-16"), StringPointer("AK"), nil, request, &runtime) if err != nil { - return WrapError(err) + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_alikafka_topics", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.TopicList.TopicVO", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.TopicList.TopicVO", response) + } + result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break } - for _, topic := range response.TopicList.TopicVO { - if r != nil && !r.MatchString(topic.Topic) { + for _, v := range result { + item := v.(map[string]interface{}) + if nameRegex != nil && !nameRegex.MatchString(fmt.Sprint(item["Topic"])) { continue } - filteredTopics = append(filteredTopics, topic) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["InstanceId"], ":", item["Topic"])]; !ok { + continue + } + } + objects = append(objects, item) } - } else { - filteredTopics = response.TopicList.TopicVO + if len(result) < request["PageSize"].(int) { + break + } + request["CurrentPage"] = request["CurrentPage"].(int) + 1 } - return alikafkaTopicsDecriptionAttributes(d, filteredTopics, meta) -} -func alikafkaTopicsDecriptionAttributes(d *schema.ResourceData, topicsInfo []alikafka.TopicVO, meta interface{}) error { - var names []string - var s []map[string]interface{} + ids := make([]string, 0) + names := make([]interface{}, 0) - for _, item := range topicsInfo { + s := make([]map[string]interface{}, 0) + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ - "topic": item.Topic, - "create_time": time.Unix(int64(item.CreateTime)/1000, 0).Format("2006-01-02 03:04:05"), - "local_topic": item.LocalTopic, - "compact_topic": item.CompactTopic, - "partition_num": item.PartitionNum, - "remark": item.Remark, - "status": item.Status, + "id": fmt.Sprint(object["InstanceId"], ":", object["Topic"]), + "topic": object["Topic"], + "create_time": object["CreateTime"], + "local_topic": object["LocalTopic"], + "compact_topic": object["CompactTopic"], + "partition_num": object["PartitionNum"], + "remark": object["Remark"], + "status": object["Status"], + "status_name": object["StatusName"], + "instance_id": object["InstanceId"], } - - names = append(names, item.Topic) + tags := make(map[string]interface{}) + t, _ := jsonpath.Get("$.Tags.TagVO", object) + if t != nil { + for _, t := range t.([]interface{}) { + key := t.(map[string]interface{})["Key"].(string) + value := t.(map[string]interface{})["Value"].(string) + if !ignoredTags(key, value) { + tags[key] = value + } + } + } + mapping["tags"] = tags + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, mapping["name"]) s = append(s, mapping) } - d.SetId(dataResourceIdHash(names)) - + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } if err := d.Set("names", names); err != nil { return WrapError(err) } if err := d.Set("topics", s); err != nil { return WrapError(err) } - - // create a json file in current directory and write data source to it + if err := d.Set("total_count", formatInt(response["Total"])); err != nil { + return WrapError(err) + } if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } - return nil + return nil } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_amqp_instances.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_amqp_instances.go index 50d8bc81cf7..2ba4db44dda 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_amqp_instances.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_amqp_instances.go @@ -218,7 +218,7 @@ func dataSourceAlicloudAmqpInstancesRead(d *schema.ResourceData, meta interface{ } id := fmt.Sprint(object["InstanceId"]) bssOpenApiService := BssOpenApiService{client} - getResp, err := bssOpenApiService.QueryAvailableInstances(id, "ons", "ons_onsproxy_pre") + getResp, err := bssOpenApiService.QueryAvailableInstances(id, "ons", "ons_onsproxy_pre", "ons_onsproxy_public_intl") if err != nil { return WrapError(err) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cdn_ip_info.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cdn_ip_info.go new file mode 100644 index 00000000000..d48ab253c63 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cdn_ip_info.go @@ -0,0 +1,94 @@ +package alicloud + +import ( + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudCdnIpInfo() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudCdnIpInfoRead, + Schema: map[string]*schema.Schema{ + "ip": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "cdn_ip": { + Type: schema.TypeString, + Computed: true, + }, + "isp": { + Type: schema.TypeString, + Computed: true, + }, + "isp_ename": { + Type: schema.TypeString, + Computed: true, + }, + "region": { + Type: schema.TypeString, + Computed: true, + }, + "region_ename": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAlicloudCdnIpInfoRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeIpInfo" + request := make(map[string]interface{}) + + id := "" + if v, ok := d.GetOk("ip"); ok { + request["IP"] = v.(string) + id = v.(string) + } + var response map[string]interface{} + conn, err := client.NewCdnClient() + if err != nil { + return WrapError(err) + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2018-05-10"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_cdn_ip_info", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "", response) + } + object := resp.(map[string]interface{}) + d.SetId(id) + d.Set("cdn_ip", object["CdnIp"]) + d.Set("isp", object["ISP"]) + d.Set("isp_ename", object["IspEname"]) + d.Set("region", object["Region"]) + d.Set("region_ename", object["RegionEname"]) + d.Set("ip", id) + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cen_transit_routers.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cen_transit_routers.go index db5fbd85522..7263f1e8981 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cen_transit_routers.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cen_transit_routers.go @@ -30,7 +30,8 @@ func dataSourceAlicloudCenTransitRouters() *schema.Resource { }, "transit_router_id": { Type: schema.TypeString, - Required: true, + Optional: true, + ForceNew: true, }, "transit_router_ids": { Type: schema.TypeList, @@ -52,7 +53,8 @@ func dataSourceAlicloudCenTransitRouters() *schema.Resource { "ids": { Type: schema.TypeList, Elem: &schema.Schema{Type: schema.TypeString}, - Computed: true, + Optional: true, + ForceNew: true, }, "output_file": { Type: schema.TypeString, @@ -115,7 +117,9 @@ func dataSourceAlicloudCenTransitRoutersRead(d *schema.ResourceData, meta interf request["RegionId"] = client.RegionId request["PageSize"] = PageSizeLarge request["PageNumber"] = 1 - request["TransitRouterId"] = d.Get("transit_router_id") + if v, ok := d.GetOk("transit_router_id"); ok { + request["TransitRouterId"] = v + } var objects []map[string]interface{} var transitRouterNameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { @@ -127,7 +131,7 @@ func dataSourceAlicloudCenTransitRoutersRead(d *schema.ResourceData, meta interf } idsMap := make(map[string]string) - if v, ok := d.GetOk("transit_router_ids"); ok { + if v, ok := d.GetOk("ids"); ok { for _, vv := range v.([]interface{}) { if vv == nil { continue @@ -135,7 +139,17 @@ func dataSourceAlicloudCenTransitRoutersRead(d *schema.ResourceData, meta interf idsMap[vv.(string)] = vv.(string) } } - request["TransitRouterIds"] = idsMap + + transitRouterIdsMap := make(map[string]string) + if v, ok := d.GetOk("transit_router_ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + transitRouterIdsMap[vv.(string)] = vv.(string) + } + } + status, statusOk := d.GetOk("status") var response map[string]interface{} conn, err := client.NewCbnClient() @@ -174,7 +188,12 @@ func dataSourceAlicloudCenTransitRoutersRead(d *schema.ResourceData, meta interf } } if len(idsMap) > 0 { - if _, ok := idsMap[fmt.Sprint(item["TransitRouterId"])]; !ok { + if _, ok := idsMap[fmt.Sprint(item["CenId"], ":", item["TransitRouterId"])]; !ok { + continue + } + } + if len(transitRouterIdsMap) > 0 { + if _, ok := transitRouterIdsMap[fmt.Sprint(item["TransitRouterId"])]; !ok { continue } } @@ -197,7 +216,7 @@ func dataSourceAlicloudCenTransitRoutersRead(d *schema.ResourceData, meta interf "cen_id": object["CenId"], "status": object["Status"], "transit_router_description": object["TransitRouterDescription"], - "id": fmt.Sprint(object["TransitRouterId"]), + "id": fmt.Sprint(object["CenId"], ":", object["TransitRouterId"]), "transit_router_id": fmt.Sprint(object["TransitRouterId"]), "transit_router_name": object["TransitRouterName"], "type": object["Type"], diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_click_house_db_clusters.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_click_house_db_clusters.go index 089a076bca3..699d35c1110 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_click_house_db_clusters.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_click_house_db_clusters.go @@ -75,6 +75,7 @@ func dataSourceAlicloudClickHouseDbClusters() *schema.Resource { "db_cluster_ip_array_attribute": { Type: schema.TypeString, Computed: true, + Removed: "Field 'db_cluster_ip_array_attribute' has been removed from provider", }, "db_cluster_ip_array_name": { Type: schema.TypeString, @@ -357,7 +358,7 @@ func dataSourceAlicloudClickHouseDbClustersRead(d *schema.ResourceData, meta int if iPArrayList, ok := getResp1["DBClusterAccessWhiteList"].(map[string]interface{})["IPArray"].([]interface{}); ok { for _, v := range iPArrayList { if m1, ok := v.(map[string]interface{}); ok { - if m1["DBClusterIPArrayName"].(string) == "default" { + if m1["DBClusterIPArrayName"].(string) == "default" || m1["DBClusterIPArrayName"].(string) == "dms" { continue } temp1 := map[string]interface{}{ diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cloud_storage_gateway_gateways.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cloud_storage_gateway_gateways.go index f77465ebdf5..13998e69ff4 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cloud_storage_gateway_gateways.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cloud_storage_gateway_gateways.go @@ -50,6 +50,15 @@ func dataSourceAlicloudCloudStorageGatewayGateways() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 50, + }, "gateways": { Type: schema.TypeList, Computed: true, @@ -162,6 +171,10 @@ func dataSourceAlicloudCloudStorageGatewayGateways() *schema.Resource { }, }, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -171,9 +184,8 @@ func dataSourceAlicloudCloudStorageGatewayGatewaysRead(d *schema.ResourceData, m action := "DescribeGateways" request := make(map[string]interface{}) request["StorageBundleId"] = d.Get("storage_bundle_id") - request["PageSize"] = PageSizeLarge - request["PageNumber"] = 1 - var objects []map[string]interface{} + setPagingRequest(d, request, PageSizeLarge) + var objects []interface{} var nameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { r, err := regexp.Compile(v.(string)) @@ -225,6 +237,10 @@ func dataSourceAlicloudCloudStorageGatewayGatewaysRead(d *schema.ResourceData, m return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Gateways.Gateway", response) } result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break + } for _, v := range result { item := v.(map[string]interface{}) if nameRegex != nil && !nameRegex.MatchString(fmt.Sprint(item["Name"])) { @@ -240,7 +256,7 @@ func dataSourceAlicloudCloudStorageGatewayGatewaysRead(d *schema.ResourceData, m } objects = append(objects, item) } - if len(result) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } request["PageNumber"] = request["PageNumber"].(int) + 1 @@ -248,7 +264,8 @@ func dataSourceAlicloudCloudStorageGatewayGatewaysRead(d *schema.ResourceData, m ids := make([]string, 0) names := make([]interface{}, 0) s := make([]map[string]interface{}, 0) - for _, object := range objects { + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ "activated_time": fmt.Sprint(object["ActivatedTime"]), "buy_url": object["BuyURL"], @@ -294,6 +311,11 @@ func dataSourceAlicloudCloudStorageGatewayGatewaysRead(d *schema.ResourceData, m if err := d.Set("gateways", s); err != nil { return WrapError(err) } + + if err := d.Set("total_count", formatInt(response["TotalCount"])); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cloud_storage_gateway_storage_bundles.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cloud_storage_gateway_storage_bundles.go index 176a1d28e61..7dd0a9626b5 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cloud_storage_gateway_storage_bundles.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cloud_storage_gateway_storage_bundles.go @@ -42,6 +42,15 @@ func dataSourceAlicloudCloudStorageGatewayStorageBundles() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 50, + }, "bundles": { Type: schema.TypeList, Computed: true, @@ -74,6 +83,10 @@ func dataSourceAlicloudCloudStorageGatewayStorageBundles() *schema.Resource { }, }, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -84,9 +97,8 @@ func dataSourceAlicloudCloudStorageGatewayStorageBundlesRead(d *schema.ResourceD action := "DescribeStorageBundles" request := make(map[string]interface{}) request["BackendBucketRegionId"] = d.Get("backend_bucket_region_id") - request["PageSize"] = PageSizeLarge - request["PageNumber"] = 1 - var objects []map[string]interface{} + setPagingRequest(d, request, PageSizeLarge) + var objects []interface{} var storageBundleNameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { r, err := regexp.Compile(v.(string)) @@ -124,6 +136,10 @@ func dataSourceAlicloudCloudStorageGatewayStorageBundlesRead(d *schema.ResourceD return WrapErrorf(err, FailedGetAttributeMsg, action, "$.StorageBundles.StorageBundle", response) } result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break + } for _, v := range result { item := v.(map[string]interface{}) if storageBundleNameRegex != nil { @@ -138,7 +154,7 @@ func dataSourceAlicloudCloudStorageGatewayStorageBundlesRead(d *schema.ResourceD } objects = append(objects, item) } - if len(result) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } request["PageNumber"] = request["PageNumber"].(int) + 1 @@ -146,7 +162,8 @@ func dataSourceAlicloudCloudStorageGatewayStorageBundlesRead(d *schema.ResourceD ids := make([]string, 0) names := make([]interface{}, 0) s := make([]map[string]interface{}, 0) - for _, object := range objects { + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ "description": object["Description"], "location": object["Location"], @@ -172,6 +189,11 @@ func dataSourceAlicloudCloudStorageGatewayStorageBundlesRead(d *schema.ResourceD if err := d.Set("bundles", s); err != nil { return WrapError(err) } + + if err := d.Set("total_count", formatInt(response["TotalCount"])); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cr_chart_namespaces.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cr_chart_namespaces.go new file mode 100644 index 00000000000..cdcedc637b7 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cr_chart_namespaces.go @@ -0,0 +1,190 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudCrChartNamespaces() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudCrChartNamespacesRead, + Schema: map[string]*schema.Schema{ + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + }, + "names": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "namespaces": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "auto_create_repo": { + Type: schema.TypeBool, + Computed: true, + }, + "chart_namespace_id": { + Type: schema.TypeString, + Computed: true, + }, + "default_repo_type": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "namespace_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudCrChartNamespacesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "ListChartNamespace" + request := make(map[string]interface{}) + request["RegionId"] = client.RegionId + request["InstanceId"] = d.Get("instance_id") + + var objects []map[string]interface{} + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var nameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + nameRegex = regexp.MustCompile(v.(string)) + } + + var response map[string]interface{} + conn, err := client.NewAcrClient() + if err != nil { + return WrapError(err) + } + + pageNo, pageSize := 1, PageSizeLarge + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_cr_chart_namespaces", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Namespaces", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Namespaces", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if nameRegex != nil && !nameRegex.MatchString(fmt.Sprint(item["NamespaceName"])) { + continue + } + + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["InstanceId"], ":", item["NamespaceName"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < pageSize { + break + } + pageNo++ + } + + ids := make([]string, 0) + names := make([]interface{}, 0) + + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "auto_create_repo": object["AutoCreateRepo"], + "chart_namespace_id": object["NamespaceId"], + "default_repo_type": object["DefaultRepoType"], + "id": fmt.Sprint(request["InstanceId"], ":", request["NamespaceName"]), + "instance_id": fmt.Sprint(object["InstanceId"]), + "namespace_name": object["NamespaceName"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, mapping["namespace_name"]) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + if err := d.Set("namespaces", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cr_chart_repositories.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cr_chart_repositories.go new file mode 100644 index 00000000000..92682667ad2 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cr_chart_repositories.go @@ -0,0 +1,198 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudCrChartRepositories() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudCrChartRepositoriesRead, + Schema: map[string]*schema.Schema{ + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + }, + "names": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "repositories": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "chart_repository_id": { + Type: schema.TypeString, + Computed: true, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "repo_name": { + Type: schema.TypeString, + Computed: true, + }, + "repo_namespace_name": { + Type: schema.TypeString, + Computed: true, + }, + "repo_type": { + Type: schema.TypeString, + Computed: true, + }, + "summary": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudCrChartRepositoriesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "ListChartRepository" + request := make(map[string]interface{}) + request["InstanceId"] = d.Get("instance_id") + request["RegionId"] = client.RegionId + + var objects []map[string]interface{} + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var nameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + nameRegex = regexp.MustCompile(v.(string)) + } + + var response map[string]interface{} + conn, err := client.NewAcrClient() + if err != nil { + return WrapError(err) + } + pageNo, pageSize := 1, PageSizeLarge + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_cr_chart_repositories", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Repositories", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Repositories", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if nameRegex != nil && !nameRegex.MatchString(fmt.Sprint(item["RepoName"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["InstanceId"], ":", item["RepoNamespaceName"], ":", item["RepoName"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < pageSize { + break + } + pageNo++ + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + + for _, object := range objects { + mapping := map[string]interface{}{ + "chart_repository_id": object["RepoId"], + "create_time": fmt.Sprint(object["CreateTime"]), + "instance_id": object["InstanceId"], + "id": fmt.Sprint(object["InstanceId"], ":", object["RepoNamespaceName"], ":", object["RepoName"]), + "repo_name": fmt.Sprint(object["RepoName"]), + "repo_namespace_name": object["RepoNamespaceName"], + "repo_type": object["RepoType"], + "summary": object["Summary"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, mapping["repo_name"]) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("repositories", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cs_kubernetes_addons.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cs_kubernetes_addons.go new file mode 100644 index 00000000000..1b29dbf5597 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_cs_kubernetes_addons.go @@ -0,0 +1,150 @@ +package alicloud + +import ( + "fmt" + "regexp" + + "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + "github.com/alibabacloud-go/tea/tea" + + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudCSKubernetesAddons() *schema.Resource { + return &schema.Resource{ + Read: dataAlicloudCSKubernetesAddonsRead, + + Schema: map[string]*schema.Schema{ + "cluster_id": { + Type: schema.TypeString, + Required: true, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + }, + "names": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "addons": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + }, + "current_version": { + Type: schema.TypeString, + Computed: true, + }, + "next_version": { + Type: schema.TypeString, + Computed: true, + }, + "required": { + Type: schema.TypeBool, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataAlicloudCSKubernetesAddonsRead(d *schema.ResourceData, meta interface{}) error { + filterAddons := make(map[string]*Component) + var ids, names []string + + clusterId := d.Get("cluster_id").(string) + + addons, err := describeAvailableAddons(d, meta) + for _, addon := range addons { + if nameRegex, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(nameRegex.(string)) + if err != nil { + return WrapError(err) + } + if !r.MatchString(addon.ComponentName) { + continue + } + } + if ids, ok := d.GetOk("ids"); ok { + findId := func(id string, ids []string) (ret bool) { + for _, i := range ids { + if id == i { + ret = true + } + } + return + } + if !findId(fmt.Sprintf("%s%s%s", clusterId, COLON_SEPARATED, addon.ComponentName), expandStringList(ids.([]interface{}))) { + continue + } + } + filterAddons[addon.ComponentName] = addon + ids = append(ids, fmt.Sprintf("%s%s%s", clusterId, COLON_SEPARATED, addon.ComponentName)) + names = append(names, addon.ComponentName) + } + + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "describeAddonsMeta", err) + } + result := fetchAddonsMetadata(filterAddons) + + d.Set("cluster_id", clusterId) + d.Set("ids", ids) + d.Set("names", names) + d.Set("addons", result) + + d.SetId(tea.ToString(hashcode.String(clusterId))) + return nil +} + +func describeAvailableAddons(d *schema.ResourceData, meta interface{}) (map[string]*Component, error) { + clusterId := d.Get("cluster_id").(string) + + client, err := meta.(*connectivity.AliyunClient).NewRoaCsClient() + if err != nil { + return nil, err + } + csClient := CsClient{client} + + availableAddons, err := csClient.DescribeCsKubernetesAllAvailableAddons(clusterId) + if err != nil { + return nil, WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "DescribeCsKubernetesAllAvailableAddons", err) + } + + return availableAddons, nil +} + +func fetchAddonsMetadata(addonsMap map[string]*Component) []map[string]interface{} { + result := []map[string]interface{}{} + for name, addon := range addonsMap { + state := map[string]interface{}{} + state["name"] = name + state["current_version"] = addon.Version + state["next_version"] = addon.NextVersion + state["required"] = addon.Required + result = append(result, state) + } + return result +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_db_instances.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_db_instances.go index 3103c5f8054..a63c37ceb45 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_db_instances.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_db_instances.go @@ -82,7 +82,15 @@ func dataSourceAlicloudDBInstances() *schema.Resource { Type: schema.TypeString, Optional: true, }, - + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 100, + }, // Computed values "names": { Type: schema.TypeList, @@ -339,6 +347,10 @@ func dataSourceAlicloudDBInstances() *schema.Resource { }, }, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -347,10 +359,18 @@ func dataSourceAlicloudDBInstancesRead(d *schema.ResourceData, meta interface{}) client := meta.(*connectivity.AliyunClient) action := "DescribeDBInstances" request := map[string]interface{}{ - "RegionId": client.RegionId, - "SourceIp": client.SourceIp, - "PageSize": PageSizeLarge, - "PageNumber": 1, + "RegionId": client.RegionId, + "SourceIp": client.SourceIp, + } + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["PageNumber"] = v.(int) + } else { + request["PageNumber"] = 1 + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge } if v, ok := d.GetOk("engine"); ok && v.(string) != "" { request["Engine"] = v.(string) @@ -385,7 +405,7 @@ func dataSourceAlicloudDBInstancesRead(d *schema.ResourceData, meta interface{}) return WrapError(err) } - var objects []map[string]interface{} + var objects []interface{} var nameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { @@ -431,6 +451,10 @@ func dataSourceAlicloudDBInstancesRead(d *schema.ResourceData, meta interface{}) return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Items.DBInstance", response) } result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break + } for _, v := range result { item := v.(map[string]interface{}) if nameRegex != nil { @@ -445,15 +469,15 @@ func dataSourceAlicloudDBInstancesRead(d *schema.ResourceData, meta interface{}) } objects = append(objects, item) } - if len(result) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } request["PageNumber"] = request["PageNumber"].(int) + 1 } - return rdsInstancesDescription(d, meta, objects) + return rdsInstancesDescription(d, meta, objects, formatInt(response["TotalRecordCount"])) } -func rdsInstancesDescription(d *schema.ResourceData, meta interface{}, objects []map[string]interface{}) error { +func rdsInstancesDescription(d *schema.ResourceData, meta interface{}, objects []interface{}, totalCount int) error { client := meta.(*connectivity.AliyunClient) rdsService := RdsService{client} @@ -461,7 +485,8 @@ func rdsInstancesDescription(d *schema.ResourceData, meta interface{}, objects [ var names []string var s []map[string]interface{} - for _, item := range objects { + for _, v := range objects { + item := v.(map[string]interface{}) readOnlyInstanceIDs := []string{} for _, id := range item["ReadOnlyDBInstanceIds"].(map[string]interface{})["ReadOnlyDBInstanceId"].([]interface{}) { readOnlyInstanceIDs = append(readOnlyInstanceIDs, fmt.Sprint(id.(map[string]interface{})["DBInstanceId"])) @@ -623,7 +648,9 @@ func rdsInstancesDescription(d *schema.ResourceData, meta interface{}, objects [ if err := d.Set("names", names); err != nil { return WrapError(err) } - + if err := d.Set("total_count", totalCount); err != nil { + return WrapError(err) + } // create a json file in current directory and write data source to it if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_dbfs_snapshots.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_dbfs_snapshots.go new file mode 100644 index 00000000000..4b7c0f7d7c8 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_dbfs_snapshots.go @@ -0,0 +1,221 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudDbfsSnapshots() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudDbfsSnapshotsRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"accomplished", "failed", "progressing"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "snapshots": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "category": { + Type: schema.TypeString, + Computed: true, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "last_modified_time": { + Type: schema.TypeString, + Computed: true, + }, + "progress": { + Type: schema.TypeString, + Computed: true, + }, + "remain_time": { + Type: schema.TypeInt, + Computed: true, + }, + "retention_days": { + Type: schema.TypeInt, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_id": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_name": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_type": { + Type: schema.TypeString, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "source_fs_size": { + Type: schema.TypeInt, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudDbfsSnapshotsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "ListSnapshot" + request := make(map[string]interface{}) + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("ids"); ok { + request["SnapshotIds"] = convertListToJsonString(v.([]interface{})) + } + if v, ok := d.GetOk("status"); ok { + request["Status"] = v + } + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + var snapshotNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + snapshotNameRegex = r + } + var response map[string]interface{} + conn, err := client.NewDbfsClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-04-18"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_dbfs_snapshots", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Snapshots", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Snapshots", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if snapshotNameRegex != nil && !snapshotNameRegex.MatchString(fmt.Sprint(item["SnapshotName"])) { + continue + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "category": object["Category"], + "create_time": object["CreationTime"], + "description": object["Description"], + "last_modified_time": object["LastModifiedTime"], + "progress": object["Progress"], + "remain_time": formatInt(object["RemainTime"]), + "retention_days": formatInt(object["RetentionDays"]), + "id": fmt.Sprint(object["SnapshotId"]), + "snapshot_id": fmt.Sprint(object["SnapshotId"]), + "snapshot_name": object["SnapshotName"], + "snapshot_type": object["SnapshotType"], + "instance_id": object["SourceFsId"], + "source_fs_size": formatInt(object["SourceFsSize"]), + "status": object["Status"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["SnapshotName"]) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("snapshots", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_dcdn_ipa_domains.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_dcdn_ipa_domains.go new file mode 100644 index 00000000000..6e7af1e62e2 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_dcdn_ipa_domains.go @@ -0,0 +1,266 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudDcdnIpaDomains() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudDcdnIpaDomainsRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "domain_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"online", "offline", "configuring", "configure_failed", "checking", "check_failed"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "domains": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cert_name": { + Type: schema.TypeString, + Computed: true, + }, + "cname": { + Type: schema.TypeString, + Computed: true, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "domain_name": { + Type: schema.TypeString, + Computed: true, + }, + "resource_group_id": { + Type: schema.TypeString, + Computed: true, + }, + "scope": { + Type: schema.TypeString, + Computed: true, + }, + "sources": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "content": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Computed: true, + }, + "priority": { + Type: schema.TypeString, + Computed: true, + }, + "type": { + Type: schema.TypeString, + Computed: true, + }, + "weight": { + Type: schema.TypeInt, + Computed: true, + }, + }, + }, + }, + "ssl_protocol": { + Type: schema.TypeString, + Computed: true, + }, + "ssl_pub": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudDcdnIpaDomainsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeDcdnIpaUserDomains" + request := make(map[string]interface{}) + if v, ok := d.GetOk("domain_name"); ok { + request["DomainName"] = v + } + if v, ok := d.GetOk("status"); ok { + request["DomainStatus"] = v + } + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewDcdnClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_dcdn_ipa_domains", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Domains.PageData", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Domains.PageData", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["DomainName"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]string, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "cname": object["Cname"], + "description": object["Description"], + "id": fmt.Sprint(object["DomainName"]), + "domain_name": fmt.Sprint(object["DomainName"]), + "resource_group_id": object["ResourceGroupId"], + "ssl_protocol": object["SSLProtocol"], + "status": object["DomainStatus"], + } + if v, ok := object["Sources"].(map[string]interface{})["Source"].([]interface{}); ok { + source := make([]map[string]interface{}, 0) + for _, val := range v { + item := val.(map[string]interface{}) + source = append(source, map[string]interface{}{ + "content": item["Content"], + "port": formatInt(item["Port"]), + "priority": item["Priority"], + "type": item["Type"], + "weight": formatInt(item["Weight"]), + }) + } + mapping["sources"] = source + } + + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["DomainName"].(string)) + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["DomainName"]) + dcdnService := DcdnService{client} + getResp, err := dcdnService.DescribeDcdnIpaDomain(id) + if err != nil { + return WrapError(err) + } + mapping["cert_name"] = getResp["CertName"] + mapping["create_time"] = getResp["GmtCreated"] + mapping["scope"] = getResp["Scope"] + mapping["ssl_pub"] = getResp["SSLPub"] + ids = append(ids, fmt.Sprint(object["DomainName"])) + names = append(names, object["DomainName"].(string)) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + if err := d.Set("domains", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_dts_migration_jobs.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_dts_migration_jobs.go new file mode 100644 index 00000000000..f49fd72e879 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_dts_migration_jobs.go @@ -0,0 +1,325 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudDtsMigrationJobs() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudDtsMigrationJobsRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "jobs": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "data_initialization": { + Type: schema.TypeBool, + Computed: true, + }, + "data_synchronization": { + Type: schema.TypeBool, + Computed: true, + }, + "db_list": { + Type: schema.TypeString, + Computed: true, + }, + "destination_endpoint_data_base_name": { + Type: schema.TypeString, + Computed: true, + }, + "destination_endpoint_engine_name": { + Type: schema.TypeString, + Computed: true, + }, + "destination_endpoint_ip": { + Type: schema.TypeString, + Computed: true, + }, + "destination_endpoint_instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "destination_endpoint_instance_type": { + Type: schema.TypeString, + Computed: true, + }, + "destination_endpoint_oracle_sid": { + Type: schema.TypeString, + Computed: true, + }, + "destination_endpoint_port": { + Type: schema.TypeString, + Computed: true, + }, + "destination_endpoint_region": { + Type: schema.TypeString, + Computed: true, + }, + "destination_endpoint_user_name": { + Type: schema.TypeString, + Computed: true, + }, + "dts_instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "dts_job_id": { + Type: schema.TypeString, + Computed: true, + }, + "dts_job_name": { + Type: schema.TypeString, + Computed: true, + }, + "payment_type": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_database_name": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_engine_name": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_ip": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_instance_type": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_oracle_sid": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_owner_id": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_port": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_region": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_role": { + Type: schema.TypeString, + Computed: true, + }, + "source_endpoint_user_name": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "structure_initialization": { + Type: schema.TypeBool, + Computed: true, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudDtsMigrationJobsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeDtsJobs" + request := make(map[string]interface{}) + request["JobType"] = "MIGRATION" + request["RegionId"] = client.RegionId + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + var jobNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + jobNameRegex = r + } + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewDtsClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-01-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_dts_migration_jobs", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.DtsJobList", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.DtsJobList", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["DtsJobId"])]; !ok { + continue + } + } + + if jobNameRegex != nil && !jobNameRegex.MatchString(fmt.Sprint(item["DtsJobName"])) { + continue + } + + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + migrationModeObj := object["MigrationMode"].(map[string]interface{}) + destinationEndpointObj := object["DestinationEndpoint"].(map[string]interface{}) + sourceEndpointObj := object["SourceEndpoint"].(map[string]interface{}) + mapping := map[string]interface{}{ + "data_initialization": migrationModeObj["DataInitialization"], + "data_synchronization": migrationModeObj["DataSynchronization"], + "structure_initialization": migrationModeObj["StructureInitialization"], + "db_list": object["DbObject"], + "destination_endpoint_data_base_name": destinationEndpointObj["DatabaseName"], + "destination_endpoint_engine_name": destinationEndpointObj["EngineName"], + "destination_endpoint_ip": destinationEndpointObj["Ip"], + "destination_endpoint_instance_id": destinationEndpointObj["InstanceID"], + "destination_endpoint_instance_type": destinationEndpointObj["InstanceType"], + "destination_endpoint_oracle_sid": destinationEndpointObj["OracleSID"], + "destination_endpoint_port": destinationEndpointObj["Port"], + "destination_endpoint_region": destinationEndpointObj["Region"], + "destination_endpoint_user_name": destinationEndpointObj["UserName"], + "dts_instance_id": object["DtsInstanceID"], + "id": fmt.Sprint(object["DtsJobId"]), + "payment_type": convertDtsMigrationJobPaymentTypeResponse(object["PayType"]), + "dts_job_id": fmt.Sprint(object["DtsJobId"]), + "dts_job_name": object["DtsJobName"], + "source_endpoint_database_name": sourceEndpointObj["DatabaseName"], + "source_endpoint_engine_name": sourceEndpointObj["EngineName"], + "source_endpoint_ip": sourceEndpointObj["Ip"], + "source_endpoint_instance_id": sourceEndpointObj["InstanceID"], + "source_endpoint_instance_type": sourceEndpointObj["InstanceType"], + "source_endpoint_oracle_sid": sourceEndpointObj["OracleSID"], + "source_endpoint_port": sourceEndpointObj["Port"], + "source_endpoint_region": sourceEndpointObj["Region"], + "source_endpoint_user_name": sourceEndpointObj["UserName"], + "status": object["Status"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["DtsJobName"]) + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["DtsJobId"]) + dtsService := DtsService{client} + getResp, err := dtsService.DescribeDtsMigrationJob(id) + if err != nil { + return WrapError(err) + } + mapping["source_endpoint_owner_id"] = getResp["SourceEndpoint"].(map[string]interface{})["AliyunUid"] + mapping["source_endpoint_role"] = getResp["SourceEndpoint"].(map[string]interface{})["RoleName"] + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("jobs", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecp_instance_types.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecp_instance_types.go new file mode 100644 index 00000000000..3d3633c340a --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecp_instance_types.go @@ -0,0 +1,109 @@ +package alicloud + +import ( + "strconv" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudEcpInstanceTypes() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudEcpInstanceTypesRead, + Schema: map[string]*schema.Schema{ + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "instance_types": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "instance_type": { + Type: schema.TypeString, + Computed: true, + }, + "default_resolution": { + Type: schema.TypeString, + Computed: true, + }, + "cpu_core_count": { + Type: schema.TypeInt, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "name_en": { + Type: schema.TypeString, + Computed: true, + }, + "instance_type_family": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudEcpInstanceTypesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "ListInstanceTypes" + request := make(map[string]interface{}) + request["RegionId"] = client.RegionId + var objects []map[string]interface{} + var response map[string]interface{} + conn, err := client.NewCloudphoneClient() + if err != nil { + return WrapError(err) + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_ecp_instance_types", action, AlibabaCloudSdkGoERROR) + } + addDebug(action, response, request) + + resp, err := jsonpath.Get("$.InstanceTypes.InstanceType", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.InstanceTypes.InstanceType", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + objects = append(objects, item) + } + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "instance_type": object["InstanceType"], + "default_resolution": object["DefaultResolution"], + "cpu_core_count": object["CpuCoreCount"], + "name": object["Name"], + "name_en": object["NameEn"], + "instance_type_family": object["InstanceTypeFamily"], + } + s = append(s, mapping) + } + + d.SetId(strconv.FormatInt(time.Now().Unix(), 16)) + + if err := d.Set("instance_types", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecp_instances.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecp_instances.go new file mode 100644 index 00000000000..58b0393e301 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecp_instances.go @@ -0,0 +1,306 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudEcpInstances() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudEcpInstancesRead, + Schema: map[string]*schema.Schema{ + "payment_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"PayAsYouGo", "Subscription"}, false), + }, + "image_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "instance_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "instance_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "key_pair_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "resolution": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Pending", "Running", "Starting", "Stopped", "Stopping"}, false), + }, + "zone_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "instances": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Computed: true, + }, + "image_id": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "instance_name": { + Type: schema.TypeString, + Computed: true, + }, + "instance_type": { + Type: schema.TypeString, + Computed: true, + }, + "key_pair_name": { + Type: schema.TypeString, + Computed: true, + }, + "resolution": { + Type: schema.TypeString, + Computed: true, + }, + "security_group_id": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Computed: true, + }, + "vnc_url": { + Type: schema.TypeString, + Computed: true, + }, + "payment_type": { + Type: schema.TypeString, + Computed: true, + }, + "zone_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudEcpInstancesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "ListInstances" + request := make(map[string]interface{}) + if v, ok := d.GetOk("payment_type"); ok { + request["ChargeType"] = convertEcpSyncPaymentTypeRequest(v.(string)) + } + if v, ok := d.GetOk("image_id"); ok { + request["ImageId"] = v + } + if v, ok := d.GetOk("instance_name"); ok { + request["InstanceName"] = v + } + if v, ok := d.GetOk("instance_type"); ok { + request["InstanceType"] = v + } + if v, ok := d.GetOk("key_pair_name"); ok { + request["KeyPairName"] = v + } + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("resolution"); ok { + request["Resolution"] = v + } + if v, ok := d.GetOk("status"); ok { + request["Status"] = v + } + if v, ok := d.GetOk("zone_id"); ok { + request["ZoneId"] = v + } + request["MaxResults"] = PageSizeLarge + var objects []map[string]interface{} + var instanceNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + instanceNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewCloudphoneClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_ecp_instances", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Instances.Instance", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Instances.Instance", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if instanceNameRegex != nil && !instanceNameRegex.MatchString(fmt.Sprint(item["InstanceName"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["InstanceId"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if nextToken, ok := response["NextToken"].(string); ok && nextToken != "" { + request["NextToken"] = nextToken + } else { + break + } + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "description": object["Description"], + "image_id": object["ImageId"], + "id": fmt.Sprint(object["InstanceId"]), + "instance_id": fmt.Sprint(object["InstanceId"]), + "instance_name": object["InstanceName"], + "instance_type": object["InstanceType"], + "zone_id": object["ZoneId"], + "payment_type": convertEcpSyncPaymentTypeResponse(object["ChargeType"]), + "key_pair_name": object["KeyPairName"], + "resolution": object["Resolution"], + "security_group_id": object["SecurityGroupId"], + "status": object["Status"], + "vswitch_id": object["VpcAttributes"].(map[string]interface{})["VSwitchId"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["InstanceName"]) + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["InstanceId"]) + cloudphoneService := CloudphoneService{client} + getResp, err := cloudphoneService.ListInstanceVncUrl(id) + if err != nil { + return WrapError(err) + } + mapping["vnc_url"] = getResp["VncUrl"] + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("instances", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecp_zones.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecp_zones.go new file mode 100644 index 00000000000..3b41aaab1d3 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecp_zones.go @@ -0,0 +1,84 @@ +package alicloud + +import ( + "strconv" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudEcpZones() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudEcpZonesRead, + Schema: map[string]*schema.Schema{ + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "zones": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "zone_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudEcpZonesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "ListZones" + request := make(map[string]interface{}) + request["RegionId"] = client.RegionId + var objects []map[string]interface{} + var response map[string]interface{} + conn, err := client.NewCloudphoneClient() + if err != nil { + return WrapError(err) + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_ecp_zones", action, AlibabaCloudSdkGoERROR) + } + addDebug(action, response, request) + + resp, err := jsonpath.Get("$.Zones.Zone", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Zones.Zone", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + objects = append(objects, item) + } + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "zone_id": object["ZoneId"], + } + s = append(s, mapping) + } + + d.SetId(strconv.FormatInt(time.Now().Unix(), 16)) + + if err := d.Set("zones", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_disks.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_disks.go index 5cb6d3a2a93..66fe8062230 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_disks.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_disks.go @@ -174,6 +174,14 @@ func dataSourceAlicloudEcsDisks() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + }, "disks": { Type: schema.TypeList, Computed: true, @@ -366,6 +374,10 @@ func dataSourceAlicloudEcsDisks() *schema.Resource { }, }, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -465,9 +477,18 @@ func dataSourceAlicloudEcsDisksRead(d *schema.ResourceData, meta interface{}) er } else if v, ok := d.GetOk("availability_zone"); ok { request["ZoneId"] = v } - request["PageSize"] = PageSizeLarge - request["PageNumber"] = 1 - var objects []map[string]interface{} + + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["PageNumber"] = v.(int) + } else { + request["PageNumber"] = 1 + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge + } + var objects []interface{} var diskNameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { r, err := regexp.Compile(v.(string)) @@ -515,6 +536,10 @@ func dataSourceAlicloudEcsDisksRead(d *schema.ResourceData, meta interface{}) er return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Disks.Disk", response) } result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break + } for _, v := range result { item := v.(map[string]interface{}) if diskNameRegex != nil { @@ -529,7 +554,7 @@ func dataSourceAlicloudEcsDisksRead(d *schema.ResourceData, meta interface{}) er } objects = append(objects, item) } - if len(result) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } request["PageNumber"] = request["PageNumber"].(int) + 1 @@ -537,7 +562,8 @@ func dataSourceAlicloudEcsDisksRead(d *schema.ResourceData, meta interface{}) er ids := make([]string, 0) names := make([]interface{}, 0) s := make([]map[string]interface{}, 0) - for _, object := range objects { + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ "attached_time": object["AttachedTime"], "auto_snapshot_policy_id": object["AutoSnapshotPolicyId"], @@ -640,6 +666,10 @@ func dataSourceAlicloudEcsDisksRead(d *schema.ResourceData, meta interface{}) er if err := d.Set("disks", s); err != nil { return WrapError(err) } + + if err := d.Set("total_count", formatInt(response["TotalCount"])); err != nil { + return WrapError(err) + } if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_network_interfaces.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_network_interfaces.go index c46d8e6adee..f05d0489a3b 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_network_interfaces.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_network_interfaces.go @@ -204,6 +204,14 @@ func dataSourceAlicloudEcsNetworkInterfaces() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "network_interface_traffic_mode": { + Type: schema.TypeString, + Computed: true, + }, + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, "security_groups": { Type: schema.TypeList, Computed: true, @@ -340,27 +348,29 @@ func dataSourceAlicloudEcsNetworkInterfacesRead(d *schema.ResourceData, meta int s := make([]map[string]interface{}, 0) for _, object := range objects { mapping := map[string]interface{}{ - "description": object["Description"], - "instance_id": object["InstanceId"], - "mac": object["MacAddress"], - "id": fmt.Sprint(object["NetworkInterfaceId"]), - "network_interface_id": fmt.Sprint(object["NetworkInterfaceId"]), - "network_interface_name": object["NetworkInterfaceName"], - "name": object["NetworkInterfaceName"], - "primary_ip_address": object["PrivateIpAddress"], - "private_ip": object["PrivateIpAddress"], - "queue_number": formatInt(object["QueueNumber"]), - "resource_group_id": object["ResourceGroupId"], - "security_group_ids": object["SecurityGroupIds"].(map[string]interface{})["SecurityGroupId"], - "service_id": formatInt(object["ServiceID"]), - "service_managed": object["ServiceManaged"], - "status": object["Status"], - "type": object["Type"], - "vswitch_id": object["VSwitchId"], - "vpc_id": object["VpcId"], - "zone_id": object["ZoneId"], - "creation_time": object["CreationTime"], - "security_groups": object["SecurityGroupIds"].(map[string]interface{})["SecurityGroupId"], + "description": object["Description"], + "instance_id": object["InstanceId"], + "mac": object["MacAddress"], + "id": fmt.Sprint(object["NetworkInterfaceId"]), + "network_interface_id": fmt.Sprint(object["NetworkInterfaceId"]), + "network_interface_name": object["NetworkInterfaceName"], + "name": object["NetworkInterfaceName"], + "primary_ip_address": object["PrivateIpAddress"], + "private_ip": object["PrivateIpAddress"], + "queue_number": formatInt(object["QueueNumber"]), + "resource_group_id": object["ResourceGroupId"], + "security_group_ids": object["SecurityGroupIds"].(map[string]interface{})["SecurityGroupId"], + "service_id": formatInt(object["ServiceID"]), + "service_managed": object["ServiceManaged"], + "status": object["Status"], + "type": object["Type"], + "vswitch_id": object["VSwitchId"], + "vpc_id": object["VpcId"], + "zone_id": object["ZoneId"], + "network_interface_traffic_mode": object["NetworkInterfaceTrafficMode"], + "owner_id": object["OwnerId"], + "creation_time": object["CreationTime"], + "security_groups": object["SecurityGroupIds"].(map[string]interface{})["SecurityGroupId"], } if v := object["PrivateIpSets"].(map[string]interface{})["PrivateIpSet"].([]interface{}); len(v) > 0 { privateIps := make([]interface{}, 0, len(object["PrivateIpSets"].(map[string]interface{})["PrivateIpSet"].([]interface{}))) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_prefix_lists.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_prefix_lists.go new file mode 100644 index 00000000000..44c9f4717a7 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_prefix_lists.go @@ -0,0 +1,252 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudEcsPrefixLists() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudEcsPrefixListsRead, + Schema: map[string]*schema.Schema{ + "address_family": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"IPv4", "IPv6"}, false), + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "lists": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "address_family": { + Type: schema.TypeString, + Computed: true, + }, + "association_count": { + Type: schema.TypeInt, + Computed: true, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "entry": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cidr": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "max_entries": { + Type: schema.TypeInt, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "prefix_list_id": { + Type: schema.TypeString, + Computed: true, + }, + "prefix_list_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudEcsPrefixListsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribePrefixLists" + request := make(map[string]interface{}) + if v, ok := d.GetOk("address_family"); ok { + request["AddressFamily"] = v + } + if v, ok := d.GetOk("prefix_list_name"); ok { + request["PrefixListName"] = v + } + request["RegionId"] = client.RegionId + request["MaxResults"] = PageSizeLarge + var objects []map[string]interface{} + var prefixListNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + prefixListNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_ecs_prefix_lists", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.PrefixLists.PrefixList", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.PrefixLists.PrefixList", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if prefixListNameRegex != nil && !prefixListNameRegex.MatchString(fmt.Sprint(item["PrefixListName"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["PrefixListId"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if nextToken, ok := response["NextToken"].(string); ok && nextToken != "" { + request["NextToken"] = nextToken + } else { + break + } + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "address_family": object["AddressFamily"], + "association_count": formatInt(object["AssociationCount"]), + "create_time": object["CreationTime"], + "max_entries": formatInt(object["MaxEntries"]), + "id": fmt.Sprint(object["PrefixListId"]), + "prefix_list_id": fmt.Sprint(object["PrefixListId"]), + "prefix_list_name": object["PrefixListName"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["PrefixListName"]) + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["PrefixListId"]) + ecsService := EcsService{client} + getResp, err := ecsService.DescribeEcsPrefixList(id) + if err != nil { + return WrapError(err) + } + mapping["description"] = getResp["Description"] + + entry := make([]map[string]interface{}, 0) + if entryList, ok := getResp["Entries"].(map[string]interface{})["Entry"].([]interface{}); ok { + for _, v := range entryList { + if m1, ok := v.(map[string]interface{}); ok { + temp1 := map[string]interface{}{ + "cidr": m1["Cidr"], + "description": m1["Description"], + } + entry = append(entry, temp1) + } + } + } + mapping["entry"] = entry + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("lists", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_storage_capacity_units.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_storage_capacity_units.go new file mode 100644 index 00000000000..9f27b3f05b8 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ecs_storage_capacity_units.go @@ -0,0 +1,221 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudEcsStorageCapacityUnits() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudEcsStorageCapacityUnitsRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Active", "Creating", "Expired", "Pending"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "units": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "allocation_status": { + Type: schema.TypeString, + Computed: true, + }, + "capacity": { + Type: schema.TypeInt, + Computed: true, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "expired_time": { + Type: schema.TypeString, + Computed: true, + }, + "start_time": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "storage_capacity_unit_id": { + Type: schema.TypeString, + Computed: true, + }, + "storage_capacity_unit_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudEcsStorageCapacityUnitsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeStorageCapacityUnits" + request := make(map[string]interface{}) + if v, ok := d.GetOk("allocation_type"); ok { + request["AllocationType"] = v + } + if v, ok := d.GetOk("capacity"); ok { + request["Capacity"] = v + } + request["RegionId"] = client.RegionId + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + var storageCapacityUnitNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + storageCapacityUnitNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + status, statusOk := d.GetOk("status") + var response map[string]interface{} + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_ecs_storage_capacity_units", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.StorageCapacityUnits.StorageCapacityUnit", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.StorageCapacityUnits.StorageCapacityUnit", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if storageCapacityUnitNameRegex != nil && !storageCapacityUnitNameRegex.MatchString(fmt.Sprint(item["Name"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["StorageCapacityUnitId"])]; !ok { + continue + } + } + if statusOk && status.(string) != "" && status.(string) != item["Status"].(string) { + continue + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "allocation_status": object["AllocationStatus"], + "capacity": formatInt(object["Capacity"]), + "create_time": object["CreationTime"], + "description": object["Description"], + "expired_time": object["ExpiredTime"], + "start_time": object["StartTime"], + "status": object["Status"], + "id": fmt.Sprint(object["StorageCapacityUnitId"]), + "storage_capacity_unit_id": fmt.Sprint(object["StorageCapacityUnitId"]), + "storage_capacity_unit_name": object["Name"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["Name"]) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("units", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_eip_addresses.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_eip_addresses.go index 0fd981cb77e..2a456fc661d 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_eip_addresses.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_eip_addresses.go @@ -23,7 +23,7 @@ func dataSourceAlicloudEipAddresses() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, ForceNew: true, MinItems: 1, - Deprecated: "Field 'ip_addresses' has been deprecated from provider version 1.126.0 and it will be remove in the future version. Please use the new attribute 'ip_address' instead.", + Deprecated: "Field 'ip_addresses' has been deprecated from provider version 1.126.0 and it will be removed in the future version. Please use the new attribute 'ip_address' instead.", }, "in_use": { Type: schema.TypeBool, @@ -253,7 +253,7 @@ func dataSourceAlicloudEipAddresses() *schema.Resource { "eips": { Type: schema.TypeList, Computed: true, - Deprecated: "Field 'eips' has been deprecated from provider version 1.126.0 and it will be remove in the future version. Please use the new attribute 'addresses' instead.", + Deprecated: "Field 'eips' has been deprecated from provider version 1.126.0 and it will be removed in the future version. Please use the new attribute 'addresses' instead.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "id": { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_emr_clusters.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_emr_clusters.go index e33b1800551..75b5e355990 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_emr_clusters.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_emr_clusters.go @@ -98,6 +98,15 @@ func dataSourceAlicloudEmrClusters() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 50, + }, "clusters": { Type: schema.TypeList, Computed: true, @@ -527,6 +536,10 @@ func dataSourceAlicloudEmrClusters() *schema.Resource { Optional: true, Default: false, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -570,9 +583,18 @@ func dataSourceAlicloudEmrClustersRead(d *schema.ResourceData, meta interface{}) if v, ok := d.GetOk("vpc_id"); ok { request["VpcId"] = v } - request["PageSize"] = PageSizeLarge - request["PageNumber"] = 1 - var objects []map[string]interface{} + + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["PageNumber"] = v.(int) + } else { + request["PageNumber"] = 1 + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge + } + var clusterNameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { r, err := regexp.Compile(v.(string)) @@ -597,6 +619,7 @@ func dataSourceAlicloudEmrClustersRead(d *schema.ResourceData, meta interface{}) if err != nil { return WrapError(err) } + var objects []interface{} for { runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) @@ -621,6 +644,10 @@ func dataSourceAlicloudEmrClustersRead(d *schema.ResourceData, meta interface{}) return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Clusters.ClusterInfo", response) } result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break + } for _, v := range result { item := v.(map[string]interface{}) if clusterNameRegex != nil && !clusterNameRegex.MatchString(fmt.Sprint(item["Name"])) { @@ -634,7 +661,7 @@ func dataSourceAlicloudEmrClustersRead(d *schema.ResourceData, meta interface{}) objects = append(objects, item) } - if len(result) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } request["PageNumber"] = request["PageNumber"].(int) + 1 @@ -642,7 +669,8 @@ func dataSourceAlicloudEmrClustersRead(d *schema.ResourceData, meta interface{}) ids := make([]string, 0) names := make([]interface{}, 0) s := make([]map[string]interface{}, 0) - for _, object := range objects { + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ "id": fmt.Sprint(object["Id"]), "cluster_id": fmt.Sprint(object["Id"]), @@ -891,6 +919,10 @@ func dataSourceAlicloudEmrClustersRead(d *schema.ResourceData, meta interface{}) if err := d.Set("clusters", s); err != nil { return WrapError(err) } + if err := d.Set("total_count", formatInt(response["TotalCount"])); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_emr_main_versions.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_emr_main_versions.go index 077b6ea24f4..f3abe164a99 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_emr_main_versions.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_emr_main_versions.go @@ -2,6 +2,9 @@ package alicloud import ( "strings" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" @@ -112,8 +115,21 @@ func dataSourceAlicloudEmrMainVersionsRead(d *schema.ResourceData, meta interfac continue } versionRequest.EmrVersion = v.EmrVersion - versionRaw, err = client.WithEmrClient(func(emrClient *emr.Client) (interface{}, error) { - return emrClient.DescribeEmrMainVersion(versionRequest) + wait := incrementalWait(1*time.Second, 1*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + versionRaw, err = client.WithEmrClient(func(emrClient *emr.Client) (interface{}, error) { + return emrClient.DescribeEmrMainVersion(versionRequest) + }) + if err != nil { + if IsExpectedErrors(err, []string{"Throttling.User"}) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + addDebug(request.GetActionName(), raw, request.RpcRequest, request) + versionResponse, _ = versionRaw.(*emr.DescribeEmrMainVersionResponse) + return nil }) if err != nil { return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_emr_main_versions", request.GetActionName(), AlibabaCloudSdkGoERROR) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ess_scalingconfigurations.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ess_scalingconfigurations.go index 6cb4a22b4f6..5a2dd9d31f9 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ess_scalingconfigurations.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ess_scalingconfigurations.go @@ -147,6 +147,26 @@ func dataSourceAlicloudEssScalingConfigurations() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "spot_strategy": { + Type: schema.TypeString, + Computed: true, + }, + "spot_price_limit": { + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "instance_type": { + Type: schema.TypeString, + Optional: true, + }, + "price_limit": { + Type: schema.TypeFloat, + Optional: true, + }, + }, + }, + Computed: true, + }, }, }, }, @@ -255,6 +275,8 @@ func scalingConfigurationsDescriptionAttribute(d *schema.ResourceData, scalingCo "creation_time": scalingConfiguration.CreationTime, "instance_name": scalingConfiguration.InstanceName, "host_name": scalingConfiguration.HostName, + "spot_strategy": scalingConfiguration.SpotStrategy, + "spot_price_limit": essService.flattenSpotPriceLimitMappings(scalingConfiguration.SpotPriceLimit.SpotPriceModel), } ids = append(ids, scalingConfiguration.ScalingConfigurationId) names = append(names, scalingConfiguration.ScalingConfigurationName) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ess_scalinggroups.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ess_scalinggroups.go index 466f36ecc82..514903dabc5 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ess_scalinggroups.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ess_scalinggroups.go @@ -102,10 +102,39 @@ func dataSourceAlicloudEssScalingGroups() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Computed: true, + }, + "health_check_type": { + Type: schema.TypeString, + Computed: true, + }, + "suspended_processes": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "group_deletion_protection": { + Type: schema.TypeBool, + Computed: true, + }, + "modification_time": { + Type: schema.TypeString, + Computed: true, + }, "total_capacity": { Type: schema.TypeInt, Computed: true, }, + "total_instance_count": { + Type: schema.TypeInt, + Computed: true, + }, "active_capacity": { Type: schema.TypeInt, Computed: true, @@ -225,6 +254,13 @@ func scalingGroupsDescriptionAttribute(d *schema.ResourceData, scalingGroups []e "active_capacity": scalingGroup.ActiveCapacity, "pending_capacity": scalingGroup.PendingCapacity, "removing_capacity": scalingGroup.RemovingCapacity, + "total_instance_count": scalingGroup.TotalInstanceCount, + "vpc_id": scalingGroup.VpcId, + "vswitch_id": scalingGroup.VSwitchId, + "health_check_type": scalingGroup.HealthCheckType, + "suspended_processes": scalingGroup.SuspendedProcesses.SuspendedProcess, + "group_deletion_protection": scalingGroup.GroupDeletionProtection, + "modification_time": scalingGroup.ModificationTime, "creation_time": scalingGroup.CreationTime, } ids = append(ids, scalingGroup.ScalingGroupId) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_fnf_executions.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_fnf_executions.go new file mode 100644 index 00000000000..c1d6cb7a74b --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_fnf_executions.go @@ -0,0 +1,224 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudFnFExecutions() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudFnFExecutionsRead, + Schema: map[string]*schema.Schema{ + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "flow_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Running", "Stopped", "Succeeded", "Failed", "TimedOut"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "executions": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "execution_name": { + Type: schema.TypeString, + Computed: true, + }, + "flow_name": { + Type: schema.TypeString, + Computed: true, + }, + "input": { + Type: schema.TypeString, + Computed: true, + }, + "output": { + Type: schema.TypeString, + Computed: true, + }, + "started_time": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "stopped_time": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudFnFExecutionsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "ListExecutions" + request := make(map[string]interface{}) + request["FlowName"] = d.Get("flow_name") + if v, ok := d.GetOk("status"); ok { + request["Status"] = v + } + var objects []map[string]interface{} + var executionNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + executionNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + + var response map[string]interface{} + conn, err := client.NewFnfClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2019-03-15"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_fnf_executions", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Executions", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Executions", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if executionNameRegex != nil && !executionNameRegex.MatchString(fmt.Sprint(item["Name"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["FlowName"], ":", item["Name"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if nextToken, ok := response["NextToken"].(string); ok && nextToken != "" { + request["NextToken"] = nextToken + } else { + break + } + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "id": fmt.Sprint(object["FlowName"], ":", object["Name"]), + "execution_name": fmt.Sprint(object["Name"]), + "flow_name": object["FlowName"], + "input": object["Input"], + "output": object["Output"], + "started_time": object["StartedTime"], + "stopped_time": object["StoppedTime"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["Name"]) + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["FlowName"], ":", object["Name"]) + fnfService := FnfService{client} + getResp, err := fnfService.DescribeFnFExecution(id) + if err != nil { + return WrapError(err) + } + mapping["status"] = getResp["Status"] + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("executions", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ga_acls.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ga_acls.go new file mode 100644 index 00000000000..03541948312 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ga_acls.go @@ -0,0 +1,242 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudGaAcls() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudGaAclsRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "acl_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"active", "configuring", "deleting", "init"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "acls": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "acl_entries": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "entry": { + Type: schema.TypeString, + Computed: true, + }, + "entry_description": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "acl_id": { + Type: schema.TypeString, + Computed: true, + }, + "acl_name": { + Type: schema.TypeString, + Computed: true, + }, + "address_ip_version": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudGaAclsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "ListAcls" + request := make(map[string]interface{}) + if v, ok := d.GetOk("acl_name"); ok { + request["AclName"] = v + } + request["RegionId"] = client.RegionId + request["MaxResults"] = PageSizeLarge + var objects []map[string]interface{} + var aclNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + aclNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + status, statusOk := d.GetOk("status") + var response map[string]interface{} + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_ga_acls", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Acls", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Acls", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if aclNameRegex != nil && !aclNameRegex.MatchString(fmt.Sprint(item["AclName"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["AclId"])]; !ok { + continue + } + } + if statusOk && status.(string) != "" && status.(string) != item["AclStatus"].(string) { + continue + } + objects = append(objects, item) + } + if nextToken, ok := response["NextToken"].(string); ok && nextToken != "" { + request["NextToken"] = nextToken + } else { + break + } + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "id": fmt.Sprint(object["AclId"]), + "acl_id": fmt.Sprint(object["AclId"]), + "acl_name": object["AclName"], + "address_ip_version": object["AddressIPVersion"], + "status": object["AclStatus"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["AclName"]) + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["AclId"]) + gaService := GaService{client} + getResp, err := gaService.DescribeGaAcl(id) + if err != nil { + return WrapError(err) + } + if v, ok := getResp["AclEntries"].([]interface{}); ok { + aclEntries := make([]map[string]interface{}, 0) + for _, val := range v { + item := val.(map[string]interface{}) + temp := map[string]interface{}{ + "entry": item["Entry"], + "entry_description": item["EntryDescription"], + } + + aclEntries = append(aclEntries, temp) + } + mapping["acl_entries"] = aclEntries + } + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("acls", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ga_additional_certificates.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ga_additional_certificates.go new file mode 100644 index 00000000000..4eb93686ee0 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ga_additional_certificates.go @@ -0,0 +1,163 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudGaAdditionalCertificates() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudGaAdditionalCertificatesRead, + Schema: map[string]*schema.Schema{ + "accelerator_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "listener_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "certificates": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "accelerator_id": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_id": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "domain": { + Type: schema.TypeString, + Computed: true, + }, + "listener_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudGaAdditionalCertificatesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "ListListenerCertificates" + request := make(map[string]interface{}) + request["AcceleratorId"] = d.Get("accelerator_id") + request["ListenerId"] = d.Get("listener_id") + request["RegionId"] = client.RegionId + request["Role"] = "additional" + request["MaxResults"] = PageSizeLarge + var objects []map[string]interface{} + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_ga_additional_certificates", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Certificates", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Certificates", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(request["AcceleratorId"], ":", request["ListenerId"], ":", item["Domain"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if nextToken, ok := response["NextToken"].(string); ok && nextToken != "" { + request["NextToken"] = nextToken + } else { + break + } + } + ids := make([]string, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "accelerator_id": request["AcceleratorId"], + "certificate_id": object["CertificateId"], + "id": fmt.Sprint(request["AcceleratorId"], ":", request["ListenerId"], ":", object["Domain"]), + "domain": fmt.Sprint(object["Domain"]), + "listener_id": request["ListenerId"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("certificates", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_hbr_replication_vault_regions.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_hbr_replication_vault_regions.go new file mode 100644 index 00000000000..a21058f38b4 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_hbr_replication_vault_regions.go @@ -0,0 +1,91 @@ +package alicloud + +import ( + "fmt" + "strconv" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudHbrReplicationVaultRegions() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudHbrReplicationVaultRegionsRead, + Schema: map[string]*schema.Schema{ + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "regions": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "replication_region_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudHbrReplicationVaultRegionsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DescribeVaultReplicationRegions" + request := make(map[string]interface{}) + var response map[string]interface{} + conn, err := client.NewHbrClient() + if err != nil { + return WrapError(err) + } + + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-08"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_hbr_replication_vault_regions", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Regions.RegionId", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Regions", response) + } + result, _ := resp.([]interface{}) + s := make([]map[string]interface{}, 0) + for _, v := range result { + mapping := map[string]interface{}{ + "replication_region_id": fmt.Sprint(v), + } + + s = append(s, mapping) + } + + d.SetId(strconv.FormatInt(time.Now().Unix(), 16)) + if err := d.Set("regions", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_instance_types.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_instance_types.go index 1d991a95edc..926359e3f5f 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_instance_types.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_instance_types.go @@ -110,7 +110,6 @@ func dataSourceAlicloudInstanceTypes() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - Default: "cloud_efficiency", ValidateFunc: validation.StringInSlice([]string{"cloud", "ephemeral_ssd", "cloud_essd", "cloud_efficiency", "cloud_ssd"}, false), }, "output_file": { @@ -231,15 +230,15 @@ func dataSourceAlicloudInstanceTypesRead(d *schema.ResourceData, meta interface{ continue } for _, r := range zone.AvailableResources.AvailableResource { - if r.Type == string(InstanceTypeResource) { - for _, t := range r.SupportedResources.SupportedResource { - if t.Status == string(SoldOut) { - continue - } - - zones, _ := mapInstanceTypes[t.Value] - zones = append(zones, zone.ZoneId) - mapInstanceTypes[t.Value] = zones + for _, t := range r.SupportedResources.SupportedResource { + if t.Status == string(SoldOut) { + continue + } + if v, ok := mapInstanceTypes[t.Value]; ok { + v = append(v, zone.ZoneId) + mapInstanceTypes[t.Value] = v + } else { + mapInstanceTypes[t.Value] = []string{zone.ZoneId} } } } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_instances.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_instances.go index 76a645872b1..066500ba5c4 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_instances.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_instances.go @@ -2,6 +2,7 @@ package alicloud import ( "regexp" + "strconv" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/services/ecs" @@ -79,6 +80,14 @@ func dataSourceAlicloudInstances() *schema.Resource { Optional: true, ForceNew: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + }, // Computed values "names": { @@ -209,6 +218,10 @@ func dataSourceAlicloudInstances() *schema.Resource { }, }, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -247,9 +260,18 @@ func dataSourceAlicloudInstancesRead(d *schema.ResourceData, meta interface{}) e } var allInstances []ecs.Instance - request.PageSize = requests.NewInteger(PageSizeLarge) - request.PageNumber = requests.NewInteger(1) + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request.PageNumber = requests.NewInteger(v.(int)) + } else { + request.PageNumber = requests.NewInteger(1) + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request.PageSize = requests.NewInteger(v.(int)) + } else { + request.PageSize = requests.NewInteger(PageSizeLarge) + } + var response *ecs.DescribeInstancesResponse for { raw, err := client.WithEcsClient(func(ecsClient *ecs.Client) (interface{}, error) { return ecsClient.DescribeInstances(request) @@ -258,14 +280,22 @@ func dataSourceAlicloudInstancesRead(d *schema.ResourceData, meta interface{}) e return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_instances", request.GetActionName(), AlibabaCloudSdkGoERROR) } addDebug(request.GetActionName(), raw, request.RpcRequest, request) - response, _ := raw.(*ecs.DescribeInstancesResponse) + response, _ = raw.(*ecs.DescribeInstancesResponse) + if isPagingRequest(d) { + allInstances = response.Instances.Instance + break + } if len(response.Instances.Instance) < 1 { break } allInstances = append(allInstances, response.Instances.Instance...) + pageSize, err := strconv.Atoi(string(request.PageSize)) + if err != nil { + return WrapError(err) + } - if len(response.Instances.Instance) < PageSizeLarge { + if len(response.Instances.Instance) < pageSize { break } @@ -349,11 +379,11 @@ func dataSourceAlicloudInstancesRead(d *schema.ResourceData, meta interface{}) e return WrapError(err) } - return instancessDescriptionAttributes(d, filteredInstancesTemp, instanceRoleNameMap, instanceDiskMappings, meta) + return instancessDescriptionAttributes(d, filteredInstancesTemp, instanceRoleNameMap, instanceDiskMappings, meta, response.TotalCount) } // populate the numerous fields that the instance description returns. -func instancessDescriptionAttributes(d *schema.ResourceData, instances []ecs.Instance, instanceRoleNameMap map[string]string, instanceDisksMap map[string][]map[string]interface{}, meta interface{}) error { +func instancessDescriptionAttributes(d *schema.ResourceData, instances []ecs.Instance, instanceRoleNameMap map[string]string, instanceDisksMap map[string][]map[string]interface{}, meta interface{}, totalCount int) error { client := meta.(*connectivity.AliyunClient) ecsService := EcsService{client} var ids []string @@ -411,7 +441,9 @@ func instancessDescriptionAttributes(d *schema.ResourceData, instances []ecs.Ins if err := d.Set("instances", s); err != nil { return WrapError(err) } - + if err := d.Set("total_count", totalCount); err != nil { + return WrapError(err) + } // create a json file in current directory and write data source to it. if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_mongodb_sharding_network_private_addresses.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_mongodb_sharding_network_private_addresses.go new file mode 100644 index 00000000000..daef255b72b --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_mongodb_sharding_network_private_addresses.go @@ -0,0 +1,177 @@ +package alicloud + +import ( + "strconv" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudMongodbShardingNetworkPrivateAddresses() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudMongodbShardingNetworkPrivateAddressesRead, + Schema: map[string]*schema.Schema{ + "db_instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "node_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "role": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Primary", "Secondary"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "addresses": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "db_instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "expired_time": { + Type: schema.TypeString, + Computed: true, + }, + "ip_address": { + Type: schema.TypeString, + Computed: true, + }, + "network_address": { + Type: schema.TypeString, + Computed: true, + }, + "network_type": { + Type: schema.TypeString, + Computed: true, + }, + "node_id": { + Type: schema.TypeString, + Computed: true, + }, + "node_type": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeString, + Computed: true, + }, + "role": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudMongodbShardingNetworkPrivateAddressesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeShardingNetworkAddress" + request := make(map[string]interface{}) + request["DBInstanceId"] = d.Get("db_instance_id") + if v, ok := d.GetOk("node_id"); ok { + request["NodeId"] = v + } + role, roleOk := d.GetOk("role") + var objects []map[string]interface{} + var response map[string]interface{} + conn, err := client.NewDdsClient() + if err != nil { + return WrapError(err) + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-12-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_mongodb_sharding_network_private_addresses", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.NetworkAddresses.NetworkAddress", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.NetworkAddresses.NetworkAddress", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if roleOk && role.(string) != "" && role.(string) != item["Role"].(string) { + continue + } + if item["NetworkType"].(string) == "Public" { + continue + } + objects = append(objects, item) + } + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "db_instance_id": request["DBInstanceId"], + "expired_time": object["ExpiredTime"], + "ip_address": object["IPAddress"], + "network_address": object["NetworkAddress"], + "network_type": object["NetworkType"], + "node_type": object["NodeType"], + "port": object["Port"], + "role": object["Role"], + "vpc_id": object["VPCId"], + "vswitch_id": object["VswitchId"], + } + + if v, ok := d.GetOk("node_id"); ok { + mapping["node_id"] = v + } else { + mapping["node_id"] = object["NodeId"] + } + s = append(s, mapping) + } + + d.SetId(strconv.FormatInt(time.Now().Unix(), 16)) + if err := d.Set("addresses", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_mongodb_sharding_network_public_addresses.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_mongodb_sharding_network_public_addresses.go new file mode 100644 index 00000000000..e772868b491 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_mongodb_sharding_network_public_addresses.go @@ -0,0 +1,178 @@ +package alicloud + +import ( + "strconv" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudMongodbShardingNetworkPublicAddresses() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudMongodbShardingNetworkPublicAddressesRead, + Schema: map[string]*schema.Schema{ + "db_instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "node_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "role": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Primary", "Secondary"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "addresses": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "db_instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "expired_time": { + Type: schema.TypeString, + Computed: true, + }, + "ip_address": { + Type: schema.TypeString, + Computed: true, + }, + "network_address": { + Type: schema.TypeString, + Computed: true, + }, + "network_type": { + Type: schema.TypeString, + Computed: true, + }, + "node_id": { + Type: schema.TypeString, + Computed: true, + }, + "node_type": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeString, + Computed: true, + }, + "role": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudMongodbShardingNetworkPublicAddressesRead(d *schema.ResourceData, meta interface{}) error { + + client := meta.(*connectivity.AliyunClient) + + action := "DescribeShardingNetworkAddress" + request := make(map[string]interface{}) + request["DBInstanceId"] = d.Get("db_instance_id") + if v, ok := d.GetOk("node_id"); ok { + request["NodeId"] = v + } + role, roleOk := d.GetOk("role") + var response map[string]interface{} + var objects []map[string]interface{} + conn, err := client.NewDdsClient() + if err != nil { + return WrapError(err) + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-12-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_mongodb_sharding_network_public_addresses", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.NetworkAddresses.NetworkAddress", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.NetworkAddresses.NetworkAddress", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if roleOk && role.(string) != "" && role.(string) != item["Role"].(string) { + continue + } + if item["NetworkType"].(string) != "Public" { + continue + } + objects = append(objects, item) + } + + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "db_instance_id": request["DBInstanceId"], + "expired_time": object["ExpiredTime"], + "ip_address": object["IPAddress"], + "network_address": object["NetworkAddress"], + "network_type": object["NetworkType"], + "node_type": object["NodeType"], + "port": object["Port"], + "role": object["Role"], + "vpc_id": object["VPCId"], + "vswitch_id": object["VswitchId"], + } + if v, ok := d.GetOk("node_id"); ok { + mapping["node_id"] = v + } else { + mapping["node_id"] = object["NodeId"] + } + s = append(s, mapping) + } + + d.SetId(strconv.FormatInt(time.Now().Unix(), 16)) + if err := d.Set("addresses", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_msc_sub_contact_verification_message.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_msc_sub_contact_verification_message.go new file mode 100644 index 00000000000..6b4ee5fb2fd --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_msc_sub_contact_verification_message.go @@ -0,0 +1,75 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAlicloudMscSubContactVerificationMessage() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudMscSubContactVerificationMessageRead, + Schema: map[string]*schema.Schema{ + "contact_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "type": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntInSlice([]int{1, 2}), + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAlicloudMscSubContactVerificationMessageRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "SendVerificationMessage" + var response map[string]interface{} + request := make(map[string]interface{}) + conn, err := client.NewMscopensubscriptionClient() + if err != nil { + return WrapError(err) + } + request["ContactId"] = d.Get("contact_id") + request["Type"] = d.Get("type") + request["Locale"] = "en" + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2021-07-13"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil || fmt.Sprint(response["Success"]) == "false" { + d.SetId("SendMscSubContactVerificationMessage") + d.Set("status", "Failed") + return WrapErrorf(err, DefaultErrorMsg, "alicloud_msc_sub_contact_verification_message", action, AlibabaCloudSdkGoERROR) + } + + d.SetId("SendMscSubContactVerificationMessage") + d.Set("status", "Success") + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_mse_gateways.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_mse_gateways.go new file mode 100644 index 00000000000..fbcd96e8e5a --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_mse_gateways.go @@ -0,0 +1,320 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudMseGateways() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudMseGatewaysRead, + Schema: map[string]*schema.Schema{ + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "gateway_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"0", "1", "2", "3", "4", "6", "8", "9", "10", "11", "12", "13"}, false), + }, + "vpc_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "gateways": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "backup_vswitch_id": { + Type: schema.TypeString, + Computed: true, + }, + "gateway_name": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "gateway_unique_id": { + Type: schema.TypeString, + Computed: true, + }, + "payment_type": { + Type: schema.TypeString, + Computed: true, + }, + "replica": { + Type: schema.TypeString, + Computed: true, + }, + "spec": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + "slb_list": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "associate_id": { + Type: schema.TypeString, + Computed: true, + }, + "slb_id": { + Type: schema.TypeString, + Computed: true, + }, + "slb_ip": { + Type: schema.TypeString, + Computed: true, + }, + "slb_port": { + Type: schema.TypeString, + Computed: true, + }, + "type": { + Type: schema.TypeString, + Computed: true, + }, + "gmt_create": { + Type: schema.TypeString, + Computed: true, + }, + "gateway_slb_mode": { + Type: schema.TypeString, + Computed: true, + }, + "gateway_slb_status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudMseGatewaysRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "ListGateway" + request := make(map[string]interface{}) + filterParams := make(map[string]interface{}) + + if v, ok := d.GetOk("gateway_name"); ok { + filterParams["Name"] = v + } + + if v, ok := d.GetOk("vpc_id"); ok { + filterParams["Vpc"] = v + } + + if len(filterParams) > 0 { + if v, err := convertMaptoJsonString(filterParams); err != nil { + return WrapError(err) + } else { + request["FilterParams"] = v + } + } + + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + var gatewayNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + gatewayNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + status, statusOk := d.GetOk("status") + var response map[string]interface{} + conn, err := client.NewMseClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-05-31"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_mse_gateways", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Data.Result", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Data.Result", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if gatewayNameRegex != nil && !gatewayNameRegex.MatchString(fmt.Sprint(item["Name"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["GatewayUniqueId"])]; !ok { + continue + } + } + if statusOk && status.(string) != "" && status.(string) != fmt.Sprint(item["Status"]) { + continue + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "gateway_name": object["Name"], + "id": fmt.Sprint(object["GatewayUniqueId"]), + "gateway_unique_id": fmt.Sprint(object["GatewayUniqueId"]), + "payment_type": object["ChargeType"], + "replica": fmt.Sprint(object["Replica"]), + "spec": object["Spec"], + "status": fmt.Sprint(object["Status"]), + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["Name"]) + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["GatewayUniqueId"]) + mseService := MseService{client} + getResp, err := mseService.DescribeMseGateway(id) + if err != nil { + return WrapError(err) + } + mapping["backup_vswitch_id"] = getResp["Vswitch2"] + mapping["vswitch_id"] = getResp["Vswitch"] + mapping["vpc_id"] = getResp["Vpc"] + + slbListObject, err := mseService.ListGatewaySlb(id) + if err != nil { + return WrapError(err) + } + slbList := slbListObject["SlbList"] + + slbMapList := make([]map[string]interface{}, 0) + for _, v := range slbList.([]interface{}) { + slbMap := v.(map[string]interface{}) + slb := map[string]interface{}{ + "associate_id": slbMap["Id"], + "slb_id": slbMap["SlbId"], + "slb_ip": slbMap["SlbIp"], + "slb_port": slbMap["SlbPort"], + "type": slbMap["Type"], + "gmt_create": slbMap["GmtCreate"], + "gateway_slb_mode": slbMap["GatewaySlbMode"], + "gateway_slb_status": slbMap["GatewaySlbStatus"], + } + slbMapList = append(slbMapList, slb) + } + mapping["slb_list"] = slbMapList + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("gateways", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_auto_snapshot_policies.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_auto_snapshot_policies.go new file mode 100644 index 00000000000..9facfbc2f24 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_auto_snapshot_policies.go @@ -0,0 +1,217 @@ +package alicloud + +import ( + "fmt" + "regexp" + "strings" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudNasAutoSnapshotPolicies() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudNasAutoSnapshotPoliciesRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Available", "Creating"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "policies": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "auto_snapshot_policy_id": { + Type: schema.TypeString, + Computed: true, + }, + "auto_snapshot_policy_name": { + Type: schema.TypeString, + Computed: true, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "file_system_nums": { + Type: schema.TypeInt, + Computed: true, + }, + "repeat_weekdays": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "retention_days": { + Type: schema.TypeInt, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "time_points": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudNasAutoSnapshotPoliciesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeAutoSnapshotPolicies" + request := make(map[string]interface{}) + request["FileSystemType"] = "extreme" + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + var autoSnapshotPolicyNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + autoSnapshotPolicyNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + status, statusOk := d.GetOk("status") + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_nas_auto_snapshot_policies", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.AutoSnapshotPolicies.AutoSnapshotPolicy", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.AutoSnapshotPolicies.AutoSnapshotPolicy", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if autoSnapshotPolicyNameRegex != nil && !autoSnapshotPolicyNameRegex.MatchString(fmt.Sprint(item["AutoSnapshotPolicyName"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["AutoSnapshotPolicyId"])]; !ok { + continue + } + } + if statusOk && status.(string) != "" && status.(string) != item["Status"].(string) { + continue + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "id": fmt.Sprint(object["AutoSnapshotPolicyId"]), + "auto_snapshot_policy_id": fmt.Sprint(object["AutoSnapshotPolicyId"]), + "auto_snapshot_policy_name": object["AutoSnapshotPolicyName"], + "create_time": object["CreateTime"], + "file_system_nums": formatInt(object["FileSystemNums"]), + "repeat_weekdays": strings.Split(object["RepeatWeekdays"].(string), ","), + "retention_days": formatInt(object["RetentionDays"]), + "status": object["Status"], + "time_points": strings.Split(object["TimePoints"].(string), ","), + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["AutoSnapshotPolicyName"]) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("policies", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_data_flows.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_data_flows.go new file mode 100644 index 00000000000..94eeb989750 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_data_flows.go @@ -0,0 +1,206 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudNasDataFlows() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudNasDataFlowsRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "file_system_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Starting", "Running", "Stopped", "Updating", "Deleting", "Stopping", "Misconfigured"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "flows": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "data_flow_id": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "error_message": { + Type: schema.TypeString, + Computed: true, + }, + "file_system_id": { + Type: schema.TypeString, + Computed: true, + }, + "file_system_path": { + Type: schema.TypeString, + Computed: true, + }, + "fset_description": { + Type: schema.TypeString, + Computed: true, + }, + "fset_id": { + Type: schema.TypeString, + Computed: true, + }, + "source_security_type": { + Type: schema.TypeString, + Computed: true, + }, + "source_storage": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "throughput": { + Type: schema.TypeInt, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudNasDataFlowsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeDataFlows" + request := make(map[string]interface{}) + request["FileSystemId"] = d.Get("file_system_id") + request["MaxResults"] = PageSizeLarge + var objects []map[string]interface{} + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + status, statusOk := d.GetOk("status") + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_nas_data_flows", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.DataFlowInfo.DataFlow", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.DataFlowInfo.DataFlow", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["FileSystemId"], ":", item["DataFlowId"])]; !ok { + continue + } + } + if statusOk && status.(string) != "" && status.(string) != item["Status"].(string) { + continue + } + objects = append(objects, item) + } + if nextToken, ok := response["NextToken"].(string); ok && nextToken != "" { + request["NextToken"] = nextToken + } else { + break + } + } + ids := make([]string, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "create_time": object["CreateTime"], + "id": fmt.Sprint(object["FileSystemId"], ":", object["DataFlowId"]), + "data_flow_id": fmt.Sprint(object["DataFlowId"]), + "description": object["Description"], + "error_message": object["ErrorMessage"], + "file_system_id": object["FileSystemId"], + "file_system_path": object["FileSystemPath"], + "fset_description": object["FsetDescription"], + "fset_id": object["FsetId"], + "source_security_type": object["SourceSecurityType"], + "source_storage": object["SourceStorage"], + "status": object["Status"], + "throughput": formatInt(object["Throughput"]), + } + + ids = append(ids, fmt.Sprint(mapping["id"])) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + if err := d.Set("flows", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_filesets.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_filesets.go new file mode 100644 index 00000000000..f97945c4d94 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_filesets.go @@ -0,0 +1,180 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudNasFilesets() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudNasFilesetsRead, + Schema: map[string]*schema.Schema{ + "file_system_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"CREATED", "CREATING", "RELEASED", "RELEASING"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "filesets": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "file_system_id": { + Type: schema.TypeString, + Computed: true, + }, + "file_system_path": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "fileset_id": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudNasFilesetsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeFilesets" + request := make(map[string]interface{}) + request["FileSystemId"] = d.Get("file_system_id") + request["MaxResults"] = PageSizeMedium + var objects []map[string]interface{} + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + status, statusOk := d.GetOk("status") + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_nas_filesets", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Entries.Entrie", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Entries.Entrie", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(request["FileSystemId"], ":", item["FsetId"])]; !ok { + continue + } + } + if statusOk && status.(string) != "" && status.(string) != item["Status"].(string) { + continue + } + objects = append(objects, item) + } + if nextToken, ok := response["NextToken"].(string); ok && nextToken != "" { + request["NextToken"] = nextToken + } else { + break + } + } + ids := make([]string, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "create_time": object["CreateTime"], + "description": object["Description"], + "file_system_id": request["FileSystemId"], + "file_system_path": object["FileSystemPath"], + "id": fmt.Sprint(request["FileSystemId"], ":", object["FsetId"]), + "fileset_id": fmt.Sprint(object["FsetId"]), + "status": object["Status"], + "update_time": object["UpdateTiem"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("filesets", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_lifecycle_policies.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_lifecycle_policies.go new file mode 100644 index 00000000000..9173ffdae67 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_lifecycle_policies.go @@ -0,0 +1,196 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudNasLifecyclePolicies() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudNasLifecyclePoliciesRead, + Schema: map[string]*schema.Schema{ + "file_system_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "policies": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "file_system_id": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "lifecycle_policy_name": { + Type: schema.TypeString, + Computed: true, + }, + "lifecycle_rule_name": { + Type: schema.TypeString, + Computed: true, + }, + "paths": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "storage_type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudNasLifecyclePoliciesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeLifecyclePolicies" + request := make(map[string]interface{}) + request["FileSystemId"] = d.Get("file_system_id") + request["PageSize"] = PageSizeMedium + request["PageNumber"] = 1 + var objects []map[string]interface{} + var lifecyclePolicyNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + lifecyclePolicyNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2017-06-26"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_nas_lifecycle_policies", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.LifecyclePolicies", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.LifecyclePolicies", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if lifecyclePolicyNameRegex != nil && !lifecyclePolicyNameRegex.MatchString(fmt.Sprint(item["LifecyclePolicyName"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["FileSystemId"], ":", item["LifecyclePolicyName"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < PageSizeMedium { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "create_time": object["CreateTime"], + "file_system_id": object["FileSystemId"], + "id": fmt.Sprint(object["FileSystemId"], ":", object["LifecyclePolicyName"]), + "lifecycle_policy_name": fmt.Sprint(object["LifecyclePolicyName"]), + "lifecycle_rule_name": object["LifecycleRuleName"], + "paths": object["Paths"], + "storage_type": object["StorageType"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["LifecyclePolicyName"]) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("policies", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_snapshots.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_snapshots.go new file mode 100644 index 00000000000..5039030427e --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_snapshots.go @@ -0,0 +1,248 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudNasSnapshots() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudNasSnapshotsRead, + Schema: map[string]*schema.Schema{ + "file_system_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "snapshot_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"accomplished", "failed", "progressing"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "snapshots": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "encrypt_type": { + Type: schema.TypeInt, + Computed: true, + }, + "progress": { + Type: schema.TypeString, + Computed: true, + }, + "remain_time": { + Type: schema.TypeInt, + Computed: true, + }, + "retention_days": { + Type: schema.TypeInt, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_id": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_name": { + Type: schema.TypeString, + Computed: true, + }, + "source_file_system_id": { + Type: schema.TypeString, + Computed: true, + }, + "source_file_system_size": { + Type: schema.TypeString, + Computed: true, + }, + "source_file_system_version": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudNasSnapshotsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeSnapshots" + request := make(map[string]interface{}) + if v, ok := d.GetOk("file_system_id"); ok { + request["FileSystemId"] = v + } + request["FileSystemType"] = "extreme" + if v, ok := d.GetOk("snapshot_name"); ok { + request["SnapshotName"] = v + } + if v, ok := d.GetOk("snapshot_type"); ok { + request["SnapshotType"] = v + } + if v, ok := d.GetOk("status"); ok { + request["Status"] = v + } + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + var snapshotNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + snapshotNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_nas_snapshots", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Snapshots.Snapshot", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Snapshots.Snapshot", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if snapshotNameRegex != nil && !snapshotNameRegex.MatchString(fmt.Sprint(item["SnapshotName"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["SnapshotId"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "create_time": object["CreateTime"], + "description": object["Description"], + "encrypt_type": formatInt(object["EncryptType"]), + "progress": object["Progress"], + "remain_time": formatInt(object["RemainTime"]), + "retention_days": formatInt(object["RetentionDays"]), + "id": fmt.Sprint(object["SnapshotId"]), + "snapshot_id": fmt.Sprint(object["SnapshotId"]), + "snapshot_name": object["SnapshotName"], + "source_file_system_id": object["SourceFileSystemId"], + "source_file_system_size": fmt.Sprint(object["SourceFileSystemSize"]), + "source_file_system_version": object["SourceFileSystemVersion"], + "status": object["Status"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["SnapshotName"]) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + + if err := d.Set("snapshots", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_zones.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_zones.go index edebf937bfe..b734268343a 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_zones.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nas_zones.go @@ -4,6 +4,8 @@ import ( "strconv" "time" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "github.com/PaesslerAG/jsonpath" util "github.com/alibabacloud-go/tea-utils/service" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" @@ -14,6 +16,12 @@ func dataSourceAlicloudNasZones() *schema.Resource { return &schema.Resource{ Read: dataSourceAlicloudNasZonesRead, Schema: map[string]*schema.Schema{ + "file_system_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"standard", "extreme", "cpfs"}, false), + }, "output_file": { Type: schema.TypeString, Optional: true, @@ -56,6 +64,9 @@ func dataSourceAlicloudNasZonesRead(d *schema.ResourceData, meta interface{}) er action := "DescribeZones" request := make(map[string]interface{}) request["RegionId"] = client.RegionId + if v, ok := d.GetOk("file_system_type"); ok { + request["FileSystemType"] = v + } var objects []map[string]interface{} var response map[string]interface{} conn, err := client.NewNasClient() diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nat_gateways.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nat_gateways.go index ee7a66ec6fb..f912ef6498d 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nat_gateways.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_nat_gateways.go @@ -64,7 +64,6 @@ func dataSourceAlicloudNatGateways() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - Default: "Small", ValidateFunc: validation.StringInSlice([]string{"Large", "Middle", "Small", "XLarge.1"}, false), }, "status": { @@ -83,6 +82,15 @@ func dataSourceAlicloudNatGateways() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 50, + }, "gateways": { Type: schema.TypeList, Computed: true, @@ -191,6 +199,10 @@ func dataSourceAlicloudNatGateways() *schema.Resource { Optional: true, Default: false, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -235,9 +247,17 @@ func dataSourceAlicloudNatGatewaysRead(d *schema.ResourceData, meta interface{}) if v, ok := d.GetOk("vpc_id"); ok { request["VpcId"] = v } - request["PageSize"] = PageSizeLarge - request["PageNumber"] = 1 - var objects []map[string]interface{} + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["PageNumber"] = v.(int) + } else { + request["PageNumber"] = 1 + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge + } + var objects []interface{} var natGatewayNameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { r, err := regexp.Compile(v.(string)) @@ -275,6 +295,10 @@ func dataSourceAlicloudNatGatewaysRead(d *schema.ResourceData, meta interface{}) return WrapErrorf(err, FailedGetAttributeMsg, action, "$.NatGateways.NatGateway", response) } result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break + } for _, v := range result { item := v.(map[string]interface{}) if natGatewayNameRegex != nil { @@ -289,7 +313,7 @@ func dataSourceAlicloudNatGatewaysRead(d *schema.ResourceData, meta interface{}) } objects = append(objects, item) } - if len(result) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } request["PageNumber"] = request["PageNumber"].(int) + 1 @@ -297,7 +321,8 @@ func dataSourceAlicloudNatGatewaysRead(d *schema.ResourceData, meta interface{}) ids := make([]string, 0) names := make([]interface{}, 0) s := make([]map[string]interface{}, 0) - for _, object := range objects { + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ "business_status": object["BusinessStatus"], "deletion_protection": object["DeletionProtection"], @@ -363,6 +388,9 @@ func dataSourceAlicloudNatGatewaysRead(d *schema.ResourceData, meta interface{}) if err := d.Set("gateways", s); err != nil { return WrapError(err) } + if err := d.Set("total_count", formatInt(response["TotalCount"])); err != nil { + return WrapError(err) + } if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_pvtz_rules.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_pvtz_rules.go index 97a503627c9..06ed3b1dbad 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_pvtz_rules.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_pvtz_rules.go @@ -97,6 +97,30 @@ func dataSourceAlicloudPvtzRules() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "bind_vpcs": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "vpc_name": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + "region_name": { + Type: schema.TypeString, + Computed: true, + }, + "region_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, }, }, }, @@ -116,6 +140,7 @@ func dataSourceAlicloudPvtzRulesRead(d *schema.ResourceData, meta interface{}) e request["Lang"] = "en" request["PageSize"] = PageSizeLarge request["PageNumber"] = 1 + request["NeedDetailAttributes"] = true var objects []map[string]interface{} var ruleNameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { @@ -206,6 +231,20 @@ func dataSourceAlicloudPvtzRulesRead(d *schema.ResourceData, meta interface{}) e } } mapping["forward_ips"] = forwardConfigsSli + + bindVpcsSlice := make([]map[string]interface{}, 0) + if bindVpcs, ok := object["BindVpcs"].([]interface{}); ok { + for _, bindVpcsArgs := range bindVpcs { + bindVpcsArg := bindVpcsArgs.(map[string]interface{}) + bindVpcsMap := make(map[string]interface{}) + bindVpcsMap["vpc_id"] = bindVpcsArg["VpcId"] + bindVpcsMap["region_id"] = bindVpcsArg["RegionId"] + bindVpcsMap["vpc_name"] = bindVpcsArg["VpcName"] + bindVpcsMap["region_name"] = bindVpcsArg["RegionName"] + bindVpcsSlice = append(bindVpcsSlice, bindVpcsMap) + } + } + mapping["bind_vpcs"] = bindVpcsSlice ids = append(ids, fmt.Sprint(mapping["id"])) names = append(names, object["Name"]) s = append(s, mapping) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_rds_backups.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_rds_backups.go new file mode 100644 index 00000000000..1458de801ed --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_rds_backups.go @@ -0,0 +1,271 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudRdsBackups() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudRdsBackupsRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "backup_mode": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Automated", "Manual"}, false), + }, + "db_instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "end_time": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "start_time": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "backup_status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Success", "Failed"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "backups": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "backup_download_url": { + Type: schema.TypeString, + Computed: true, + }, + "backup_end_time": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "backup_id": { + Type: schema.TypeString, + Computed: true, + }, + "backup_initiator": { + Type: schema.TypeString, + Computed: true, + }, + "backup_intranet_download_url": { + Type: schema.TypeString, + Computed: true, + }, + "backup_method": { + Type: schema.TypeString, + Computed: true, + }, + "backup_mode": { + Type: schema.TypeString, + Computed: true, + }, + "backup_size": { + Type: schema.TypeString, + Computed: true, + }, + "backup_start_time": { + Type: schema.TypeString, + Computed: true, + }, + "backup_type": { + Type: schema.TypeString, + Computed: true, + }, + "consistent_time": { + Type: schema.TypeString, + Computed: true, + }, + "copy_only_backup": { + Type: schema.TypeString, + Computed: true, + }, + "db_instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "encryption": { + Type: schema.TypeString, + Computed: true, + }, + "host_instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "is_avail": { + Type: schema.TypeInt, + Computed: true, + }, + "meta_status": { + Type: schema.TypeString, + Computed: true, + }, + "backup_status": { + Type: schema.TypeString, + Computed: true, + }, + "storage_class": { + Type: schema.TypeString, + Computed: true, + }, + "store_status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudRdsBackupsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeBackups" + request := make(map[string]interface{}) + request["SourceIp"] = client.SourceIp + if v, ok := d.GetOk("backup_mode"); ok { + request["BackupMode"] = v + } + request["DBInstanceId"] = d.Get("db_instance_id") + if v, ok := d.GetOk("end_time"); ok { + request["EndTime"] = v + } + if v, ok := d.GetOk("start_time"); ok { + request["StartTime"] = v + } + if v, ok := d.GetOk("backup_status"); ok { + request["BackupStatus"] = v + } + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_rds_backups", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.Items.Backup", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Items.Backup", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["DBInstanceId"], ":", item["BackupId"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "backup_download_url": object["BackupDownloadURL"], + "backup_end_time": object["BackupEndTime"], + "id": fmt.Sprint(object["DBInstanceId"], ":", object["BackupId"]), + "backup_id": fmt.Sprint(object["BackupId"]), + "backup_initiator": object["BackupInitiator"], + "backup_intranet_download_url": object["BackupIntranetDownloadURL"], + "backup_method": object["BackupMethod"], + "backup_mode": object["BackupMode"], + "backup_size": fmt.Sprint(object["BackupSize"]), + "backup_start_time": object["BackupStartTime"], + "backup_type": object["BackupType"], + "consistent_time": fmt.Sprint(object["ConsistentTime"]), + "copy_only_backup": object["CopyOnlyBackup"], + "db_instance_id": object["DBInstanceId"], + "encryption": object["Encryption"], + "host_instance_id": object["HostInstanceID"], + "is_avail": formatInt(object["IsAvail"]), + "meta_status": object["MetaStatus"], + "backup_status": object["BackupStatus"], + "storage_class": object["StorageClass"], + "store_status": object["StoreStatus"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("backups", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ros_template_scratches.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ros_template_scratches.go new file mode 100644 index 00000000000..8db07357ac1 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ros_template_scratches.go @@ -0,0 +1,349 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudRosTemplateScratches() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudRosTemplateScratchesRead, + Schema: map[string]*schema.Schema{ + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"GENERATE_COMPLETE", "GENERATE_FAILED", "GENERATE_IN_PROGRESS"}, false), + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "template_scratch_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"ResourceImport", "ArchitectureReplication"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "scratches": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "logical_id_strategy": { + Type: schema.TypeString, + Computed: true, + }, + "preference_parameters": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "parameter_key": { + Type: schema.TypeString, + Computed: true, + }, + "parameter_value": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "source_tag": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_tags": { + Type: schema.TypeMap, + Computed: true, + }, + "resource_type_filter": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "source_resource_group": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_group_id": { + Type: schema.TypeString, + Computed: true, + }, + "resource_type_filter": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "source_resources": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_id": { + Type: schema.TypeString, + Computed: true, + }, + "resource_type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "stacks": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "stack_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "template_scratch_id": { + Type: schema.TypeString, + Computed: true, + }, + "template_scratch_type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func dataSourceAlicloudRosTemplateScratchesRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "ListTemplateScratches" + request := make(map[string]interface{}) + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("status"); ok { + request["Status"] = convertListToJsonString([]interface{}{v}) + } + if v, ok := d.GetOk("template_scratch_type"); ok { + request["TemplateScratchType"] = v + } + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + var response map[string]interface{} + conn, err := client.NewRosClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-10"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_ros_template_scratches", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.TemplateScratches", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.TemplateScratches", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["TemplateScratchId"])]; !ok { + continue + } + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "create_time": object["CreateTime"], + "description": object["Description"], + "logical_id_strategy": object["LogicalIdStrategy"], + "status": object["Status"], + "id": fmt.Sprint(object["TemplateScratchId"]), + "template_scratch_id": fmt.Sprint(object["TemplateScratchId"]), + "template_scratch_type": object["TemplateScratchType"], + } + + preferenceParameters := make([]map[string]interface{}, 0) + if preferenceParametersList, ok := object["PreferenceParameters"].([]interface{}); ok { + for _, v := range preferenceParametersList { + if m1, ok := v.(map[string]interface{}); ok { + if v, ok := m1["ParameterValue"]; ok && fmt.Sprint(v) != "" { + temp1 := map[string]interface{}{ + "parameter_key": m1["ParameterKey"], + "parameter_value": v, + } + preferenceParameters = append(preferenceParameters, temp1) + } + } + } + } + mapping["preference_parameters"] = preferenceParameters + + sourceResourceGroupSli := make([]map[string]interface{}, 0) + if v, ok := object["SourceResourceGroup"]; ok { + if sourceResourceGroup, ok := v.(map[string]interface{}); ok && len(sourceResourceGroup) > 0 { + sourceResourceGroupMap := make(map[string]interface{}) + sourceResourceGroupMap["resource_group_id"] = sourceResourceGroup["ResourceGroupId"] + resourceTypeFilter := make([]interface{}, 0) + if v, ok := sourceResourceGroup["ResourceTypeFilter"]; ok { + if vv, ok := v.([]interface{}); ok && len(vv) > 0 { + resourceTypeFilter = append(resourceTypeFilter, vv...) + } + } + sourceResourceGroupMap["resource_type_filter"] = resourceTypeFilter + sourceResourceGroupSli = append(sourceResourceGroupSli, sourceResourceGroupMap) + } + } + mapping["source_resource_group"] = sourceResourceGroupSli + + sourceResources := make([]map[string]interface{}, 0) + if sourceResourcesList, ok := object["SourceResources"].([]interface{}); ok { + for _, v := range sourceResourcesList { + if m1, ok := v.(map[string]interface{}); ok { + temp1 := map[string]interface{}{ + "resource_id": m1["ResourceId"], + "resource_type": m1["ResourceType"], + } + sourceResources = append(sourceResources, temp1) + } + } + } + mapping["source_resources"] = sourceResources + + sourceTagSli := make([]map[string]interface{}, 0) + if v, ok := object["SourceTag"]; ok { + if sourceTag, ok := v.(map[string]interface{}); ok && len(sourceTag) > 0 { + sourceTagMap := make(map[string]interface{}) + sourceTagMap["resource_tags"] = sourceTag["ResourceTags"] + resourceTypeFilter := make([]interface{}, 0) + if v, ok := sourceTag["ResourceTypeFilter"]; ok { + if vv, ok := v.([]interface{}); ok && len(vv) > 0 { + resourceTypeFilter = append(resourceTypeFilter, vv...) + } + } + sourceTagMap["resource_type_filter"] = resourceTypeFilter + sourceTagSli = append(sourceTagSli, sourceTagMap) + } + } + mapping["source_tag"] = sourceTagSli + + ids = append(ids, fmt.Sprint(mapping["id"])) + if detailedEnabled := d.Get("enable_details"); !detailedEnabled.(bool) { + s = append(s, mapping) + continue + } + id := fmt.Sprint(object["TemplateScratchId"]) + rosService := RosService{client} + getResp, err := rosService.DescribeRosTemplateScratch(id) + if err != nil { + return WrapError(err) + } + + stacks := make([]map[string]interface{}, 0) + if stacksList, ok := getResp["Stacks"].([]interface{}); ok { + for _, v := range stacksList { + if m1, ok := v.(map[string]interface{}); ok { + temp1 := map[string]interface{}{ + "stack_id": m1["StackId"], + } + stacks = append(stacks, temp1) + } + } + } + mapping["stacks"] = stacks + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + if err := d.Set("scratches", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_route_tables.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_route_tables.go index bc7db0d715c..e00bed634fa 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_route_tables.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_route_tables.go @@ -70,6 +70,15 @@ func dataSourceAlicloudRouteTables() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 50, + }, "tables": { Type: schema.TypeList, Computed: true, @@ -131,6 +140,10 @@ func dataSourceAlicloudRouteTables() *schema.Resource { }, }, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -166,9 +179,17 @@ func dataSourceAlicloudRouteTablesRead(d *schema.ResourceData, meta interface{}) if v, ok := d.GetOk("vpc_id"); ok { request["VpcId"] = v } - request["PageSize"] = PageSizeLarge - request["PageNumber"] = 1 - var objects []map[string]interface{} + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["PageNumber"] = v.(int) + } else { + request["PageNumber"] = 1 + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge + } + var objects []interface{} var routeTableNameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { r, err := regexp.Compile(v.(string)) @@ -207,6 +228,10 @@ func dataSourceAlicloudRouteTablesRead(d *schema.ResourceData, meta interface{}) return WrapErrorf(err, FailedGetAttributeMsg, action, "$.RouterTableList.RouterTableListType", response) } result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break + } for _, v := range result { item := v.(map[string]interface{}) if routeTableNameRegex != nil { @@ -224,7 +249,7 @@ func dataSourceAlicloudRouteTablesRead(d *schema.ResourceData, meta interface{}) } objects = append(objects, item) } - if len(result) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } request["PageNumber"] = request["PageNumber"].(int) + 1 @@ -232,7 +257,8 @@ func dataSourceAlicloudRouteTablesRead(d *schema.ResourceData, meta interface{}) ids := make([]string, 0) names := make([]interface{}, 0) s := make([]map[string]interface{}, 0) - for _, object := range objects { + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ "description": object["Description"], "resource_group_id": object["ResourceGroupId"], @@ -277,6 +303,9 @@ func dataSourceAlicloudRouteTablesRead(d *schema.ResourceData, meta interface{}) if err := d.Set("tables", s); err != nil { return WrapError(err) } + if err := d.Set("total_count", formatInt(response["TotalCount"])); err != nil { + return WrapError(err) + } if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_security_groups.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_security_groups.go index abf75bb1eec..c852d3df355 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_security_groups.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_security_groups.go @@ -1,22 +1,17 @@ package alicloud import ( + "fmt" "regexp" + "time" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/services/ecs" + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) -type SecurityGroup struct { - Attributes ecs.DescribeSecurityGroupAttributeResponse - CreationTime string - SecurityGroupType string - ResourceGroupId string - Tags ecs.TagsInDescribeSecurityGroups -} - func dataSourceAlicloudSecurityGroups() *schema.Resource { return &schema.Resource{ Read: dataSourceAlicloudSecurityGroupsRead, @@ -41,6 +36,15 @@ func dataSourceAlicloudSecurityGroups() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 50, + }, "tags": tagsSchema(), "ids": { Type: schema.TypeList, @@ -95,141 +99,184 @@ func dataSourceAlicloudSecurityGroups() *schema.Resource { }, }, }, + "enable_details": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } func dataSourceAlicloudSecurityGroupsRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) - ecsService := EcsService{client} - - request := ecs.CreateDescribeSecurityGroupsRequest() - request.RegionId = client.RegionId - request.VpcId = d.Get("vpc_id").(string) - request.PageNumber = requests.NewInteger(1) - request.PageSize = requests.NewInteger(PageSizeLarge) - request.ResourceGroupId = d.Get("resource_group_id").(string) - var sg []SecurityGroup - var nameRegex *regexp.Regexp - if v, ok := d.GetOk("name_regex"); ok { - if r, err := regexp.Compile(v.(string)); err == nil { - nameRegex = r - } + + action := "DescribeSecurityGroups" + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) } - if v, ok := d.GetOk("tags"); ok { - var tags []ecs.DescribeSecurityGroupsTag + request := make(map[string]interface{}) - for key, value := range v.(map[string]interface{}) { - tags = append(tags, ecs.DescribeSecurityGroupsTag{ - Key: key, - Value: value.(string), - }) + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["PageNumber"] = v.(int) + } else { + request["PageNumber"] = 1 + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge + } + + var objects []interface{} + var securityGroupNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) } - request.Tag = &tags + securityGroupNameRegex = r } - // ids idsMap := make(map[string]string) if v, ok := d.GetOk("ids"); ok { for _, vv := range v.([]interface{}) { if vv == nil { continue } - idsMap[Trim(vv.(string))] = Trim(vv.(string)) + idsMap[vv.(string)] = vv.(string) } } + if v, ok := d.GetOk("tags"); ok { + tags := make([]map[string]interface{}, 0) + for key, value := range v.(map[string]interface{}) { + tags = append(tags, map[string]interface{}{ + "Key": key, + "Value": value.(string), + }) + } + request["Tag"] = tags + } + + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("vpc_id"); ok { + request["VpcId"] = v + } + if v, ok := d.GetOk("resource_group_id"); ok { + request["ResourceGroupId"] = v + } + if v, ok := d.GetOk("security_group_name"); ok { + request["SecurityGroupName"] = v + } + + var response map[string]interface{} for { - raw, err := client.WithEcsClient(func(ecsClient *ecs.Client) (interface{}, error) { - return ecsClient.DescribeSecurityGroups(request) + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil }) + addDebug(action, response, request) + resp, err := jsonpath.Get("$.SecurityGroups.SecurityGroup", response) if err != nil { - return WrapErrorf(err, DataDefaultErrorMsg, "security_groups", request.GetActionName(), AlibabaCloudSdkGoERROR) + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.SecurityGroups.SecurityGroup", response) } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) - response, _ := raw.(*ecs.DescribeSecurityGroupsResponse) - if len(response.SecurityGroups.SecurityGroup) < 1 { + result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result break } - - for _, item := range response.SecurityGroups.SecurityGroup { - if nameRegex != nil { - if !nameRegex.MatchString(item.SecurityGroupName) { + for _, v := range result { + item := v.(map[string]interface{}) + if securityGroupNameRegex != nil { + if !securityGroupNameRegex.MatchString(fmt.Sprint(item["SecurityGroupName"])) { continue } } - if len(idsMap) > 0 { - if _, ok := idsMap[item.SecurityGroupId]; !ok { + if _, ok := idsMap[fmt.Sprint(item["SecurityGroupId"])]; !ok { continue } } - - attr, err := ecsService.DescribeSecurityGroup(item.SecurityGroupId) - if err != nil { - return WrapError(err) - } - - sg = append(sg, - SecurityGroup{ - Attributes: attr, - CreationTime: item.CreationTime, - SecurityGroupType: item.SecurityGroupType, - ResourceGroupId: item.ResourceGroupId, - Tags: item.Tags, - }, - ) + objects = append(objects, item) } - - if len(response.SecurityGroups.SecurityGroup) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } - - if page, err := getNextpageNumber(request.PageNumber); err != nil { - return WrapError(err) - } else { - request.PageNumber = page - } + request["PageNumber"] = request["PageNumber"].(int) + 1 } - return securityGroupsDescription(d, sg, meta) -} - -func securityGroupsDescription(d *schema.ResourceData, sg []SecurityGroup, meta interface{}) error { - client := meta.(*connectivity.AliyunClient) - ecsService := EcsService{client} - var ids []string - var names []string - var s []map[string]interface{} - for _, item := range sg { + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ - "id": item.Attributes.SecurityGroupId, - "name": item.Attributes.SecurityGroupName, - "description": item.Attributes.Description, - "vpc_id": item.Attributes.VpcId, - "resource_group_id": item.ResourceGroupId, - "security_group_type": item.SecurityGroupType, - "inner_access": item.Attributes.InnerAccessPolicy == string(GroupInnerAccept), - "creation_time": item.CreationTime, - "tags": ecsService.tagsToMap(item.Tags.Tag), + "id": object["SecurityGroupId"], + "name": object["SecurityGroupName"], + "description": object["Description"], + "vpc_id": object["VpcId"], + "resource_group_id": object["ResourceGroupId"], + "security_group_type": object["SecurityGroupType"], + "creation_time": object["CreationTime"], } - ids = append(ids, string(item.Attributes.SecurityGroupId)) - names = append(names, item.Attributes.SecurityGroupName) + tags := make(map[string]interface{}) + t, _ := jsonpath.Get("$.Tags.Tag", object) + if t != nil { + for _, t := range t.([]interface{}) { + key := t.(map[string]interface{})["TagKey"].(string) + value := t.(map[string]interface{})["TagValue"].(string) + if !ignoredTags(key, value) { + tags[key] = value + } + } + } + mapping["tags"] = tags + + if d.Get("enable_details").(bool) { + ecsService := EcsService{client} + id := fmt.Sprint(object["SecurityGroupId"]) + getResp, err := ecsService.DescribeSecurityGroupAttribute(id) + if err != nil { + return WrapError(err) + } + mapping["inner_access"] = getResp["InnerAccessPolicy"] == string(GroupInnerAccept) + } + ids = append(ids, fmt.Sprint(object["SecurityGroupId"])) + names = append(names, object["SecurityGroupName"]) s = append(s, mapping) } - d.SetId(dataResourceIdHash(ids)) - if err := d.Set("groups", s); err != nil { + if err := d.Set("ids", ids); err != nil { return WrapError(err) } + if err := d.Set("names", names); err != nil { return WrapError(err) } - if err := d.Set("ids", ids); err != nil { + + if err := d.Set("groups", s); err != nil { + return WrapError(err) + } + if err := d.Set("total_count", formatInt(response["TotalCount"])); err != nil { return WrapError(err) } - // create a json file in current directory and write data source to it if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_slb_load_balancers.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_slb_load_balancers.go index 1e91fea177d..cda3f7dd1c0 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_slb_load_balancers.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_slb_load_balancers.go @@ -134,6 +134,15 @@ func dataSourceAlicloudSlbLoadBalancers() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 100, + }, "balancers": { Type: schema.TypeList, Computed: true, @@ -392,6 +401,10 @@ func dataSourceAlicloudSlbLoadBalancers() *schema.Resource { Optional: true, Default: false, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -457,9 +470,17 @@ func dataSourceAlicloudSlbLoadBalancersRead(d *schema.ResourceData, meta interfa if v, ok := d.GetOk("vpc_id"); ok { request["VpcId"] = v } - request["PageSize"] = PageSizeLarge - request["PageNumber"] = 1 - var objects []map[string]interface{} + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["PageNumber"] = v.(int) + } else { + request["PageNumber"] = 1 + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge + } + var objects []interface{} var loadBalancerNameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { r, err := regexp.Compile(v.(string)) @@ -507,6 +528,10 @@ func dataSourceAlicloudSlbLoadBalancersRead(d *schema.ResourceData, meta interfa return WrapErrorf(err, FailedGetAttributeMsg, action, "$.LoadBalancers.LoadBalancer", response) } result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break + } for _, v := range result { item := v.(map[string]interface{}) if loadBalancerNameRegex != nil { @@ -521,7 +546,7 @@ func dataSourceAlicloudSlbLoadBalancersRead(d *schema.ResourceData, meta interfa } objects = append(objects, item) } - if len(result) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } request["PageNumber"] = request["PageNumber"].(int) + 1 @@ -530,7 +555,8 @@ func dataSourceAlicloudSlbLoadBalancersRead(d *schema.ResourceData, meta interfa names := make([]interface{}, 0) s := make([]map[string]interface{}, 0) slbs := make([]map[string]interface{}, 0) - for _, object := range objects { + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ "address": object["Address"], "address_ip_version": object["AddressIPVersion"], @@ -672,6 +698,9 @@ func dataSourceAlicloudSlbLoadBalancersRead(d *schema.ResourceData, meta interfa if err := d.Set("slbs", slbs); err != nil { return WrapError(err) } + if err := d.Set("total_count", formatInt(response["TotalCount"])); err != nil { + return WrapError(err) + } if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_slb_zones.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_slb_zones.go index 5c0d955be51..ba86c4d1114 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_slb_zones.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_slb_zones.go @@ -1,7 +1,7 @@ package alicloud import ( - "sort" + "strings" "github.com/aliyun/alibaba-cloud-sdk-go/services/slb" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" @@ -18,7 +18,7 @@ func dataSourceAlicloudSlbZones() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{"Vpc", "classic_intranet", "classic_internet"}, false), + ValidateFunc: validation.StringInSlice([]string{"vpc", "classic_intranet", "classic_internet", "Vpc"}, false), }, "available_slb_address_ip_version": { Type: schema.TypeString, @@ -26,14 +26,25 @@ func dataSourceAlicloudSlbZones() *schema.Resource { ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"ipv4", "ipv6"}, false), }, + "master_zone_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "slave_zone_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, "output_file": { Type: schema.TypeString, Optional: true, }, "enable_details": { - Type: schema.TypeBool, - Optional: true, - Default: false, + Type: schema.TypeBool, + Optional: true, + Default: false, + Deprecated: "The parameter enable_details has been deprecated from version v1.154.0+", }, "ids": { Type: schema.TypeList, @@ -49,10 +60,35 @@ func dataSourceAlicloudSlbZones() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "master_zone_id": { + Type: schema.TypeString, + Computed: true, + }, + "slave_zone_id": { + Type: schema.TypeString, + Computed: true, + }, "slb_slave_zone_ids": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Deprecated: "the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.", + }, + "supported_resources": { Type: schema.TypeList, Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "address_type": { + Type: schema.TypeString, + Computed: true, + }, + "address_ip_version": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, }, }, }, @@ -63,15 +99,13 @@ func dataSourceAlicloudSlbZones() *schema.Resource { func dataSourceAlicloudSlbZonesRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) - slaveZones := make(map[string][]string) - request := slb.CreateDescribeAvailableResourceRequest() request.RegionId = client.RegionId if ipVersion, ok := d.GetOk("available_slb_address_ip_version"); ok { request.AddressIPVersion = ipVersion.(string) } if addressType, ok := d.GetOk("available_slb_address_type"); ok { - request.AddressType = addressType.(string) + request.AddressType = strings.ToLower(addressType.(string)) } raw, err := client.WithSlbClient(func(slbClient *slb.Client) (interface{}, error) { return slbClient.DescribeAvailableResource(request) @@ -81,33 +115,30 @@ func dataSourceAlicloudSlbZonesRead(d *schema.ResourceData, meta interface{}) er } addDebug(request.GetActionName(), raw, request.RpcRequest, request) response, _ := raw.(*slb.DescribeAvailableResourceResponse) - for _, resource := range response.AvailableResources.AvailableResource { - slaveIds := slaveZones[resource.MasterZoneId] - slaveIds = append(slaveIds, resource.SlaveZoneId) - if len(slaveIds) > 0 { - sort.Strings(slaveIds) - } - slaveZones[resource.MasterZoneId] = slaveIds - } - var ids []string - for v, _ := range slaveZones { - ids = append(ids, v) - } - if len(ids) > 0 { - sort.Strings(ids) - } - var s []map[string]interface{} - for _, zoneId := range ids { - mapping := map[string]interface{}{"id": zoneId} - if len(slaveZones) > 0 { - mapping["slb_slave_zone_ids"] = slaveZones[zoneId] + for _, r := range response.AvailableResources.AvailableResource { + if v, ok := d.GetOk("master_zone_id"); ok && v.(string) != r.MasterZoneId { + continue } - if !d.Get("enable_details").(bool) { - s = append(s, mapping) + if v, ok := d.GetOk("slave_zone_id"); ok && v.(string) != r.SlaveZoneId { continue } + ids = append(ids, r.MasterZoneId) + mapping := map[string]interface{}{ + "id": r.MasterZoneId, + "master_zone_id": r.MasterZoneId, + "slave_zone_id": r.SlaveZoneId, + "slb_slave_zone_ids": []string{r.SlaveZoneId}, + } + supportedResourceList := make([]map[string]interface{}, 0) + for _, v := range r.SupportResources.SupportResource { + supportedResourceList = append(supportedResourceList, map[string]interface{}{ + "address_type": v.AddressType, + "address_ip_version": v.AddressIPVersion, + }) + } + mapping["supported_resources"] = supportedResourceList s = append(s, mapping) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ssl_certificates_service_certificates.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ssl_certificates_service_certificates.go index 4eefaeb6927..7094583db87 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ssl_certificates_service_certificates.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_ssl_certificates_service_certificates.go @@ -70,7 +70,7 @@ func dataSourceAlicloudSslCertificatesServiceCertificates() *schema.Resource { }, "name": { Type: schema.TypeString, - Deprecated: "Field 'name' has been deprecated from provider version 1.129.0 and it will be remove in the future version. Please use the new attribute 'certificate_name' instead.", + Deprecated: "Field 'name' has been deprecated from provider version 1.129.0 and it will be removed in the future version. Please use the new attribute 'certificate_name' instead.", Computed: true, }, "city": { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpc_bgp_groups.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpc_bgp_groups.go new file mode 100644 index 00000000000..9dc4289b2fc --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpc_bgp_groups.go @@ -0,0 +1,236 @@ +package alicloud + +import ( + "fmt" + "regexp" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudVpcBgpGroups() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudVpcBgpGroupsRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "name_regex": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRegexp, + ForceNew: true, + }, + "names": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "router_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Available", "Deleting", "Pending"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "groups": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "auth_key": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "bgp_group_name": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "hold": { + Type: schema.TypeString, + Computed: true, + }, + "ip_version": { + Type: schema.TypeString, + Computed: true, + }, + "is_fake_asn": { + Type: schema.TypeBool, + Computed: true, + }, + "keepalive": { + Type: schema.TypeString, + Computed: true, + }, + "local_asn": { + Type: schema.TypeInt, + Computed: true, + }, + "peer_asn": { + Type: schema.TypeInt, + Computed: true, + }, + "route_limit": { + Type: schema.TypeString, + Computed: true, + }, + "router_id": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudVpcBgpGroupsRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeBgpGroups" + request := make(map[string]interface{}) + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("router_id"); ok { + request["RouterId"] = v + } + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + var bgpGroupNameRegex *regexp.Regexp + if v, ok := d.GetOk("name_regex"); ok { + r, err := regexp.Compile(v.(string)) + if err != nil { + return WrapError(err) + } + bgpGroupNameRegex = r + } + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + status, statusOk := d.GetOk("status") + var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_vpc_bgp_groups", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.BgpGroups.BgpGroup", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.BgpGroups.BgpGroup", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if bgpGroupNameRegex != nil && !bgpGroupNameRegex.MatchString(fmt.Sprint(item["Name"])) { + continue + } + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["BgpGroupId"])]; !ok { + continue + } + } + if statusOk && status.(string) != "" && status.(string) != item["Status"].(string) { + continue + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + names := make([]interface{}, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "auth_key": object["AuthKey"], + "id": fmt.Sprint(object["BgpGroupId"]), + "bgp_group_name": object["Name"], + "description": object["Description"], + "hold": object["Hold"], + "ip_version": object["IpVersion"], + "is_fake_asn": object["IsFake"], + "keepalive": object["Keepalive"], + "local_asn": formatInt(object["LocalAsn"]), + "peer_asn": formatInt(object["PeerAsn"]), + "route_limit": object["RouteLimit"], + "router_id": object["RouterId"], + "status": object["Status"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + names = append(names, object["Name"]) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + if err := d.Set("names", names); err != nil { + return WrapError(err) + } + if err := d.Set("groups", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpc_bgp_networks.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpc_bgp_networks.go new file mode 100644 index 00000000000..360a5293458 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpc_bgp_networks.go @@ -0,0 +1,164 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudVpcBgpNetworks() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudVpcBgpNetworksRead, + Schema: map[string]*schema.Schema{ + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "router_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Available", "Pending", "Deleting"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "networks": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "dst_cidr_block": { + Type: schema.TypeString, + Computed: true, + }, + "router_id": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudVpcBgpNetworksRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeBgpNetworks" + request := make(map[string]interface{}) + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("router_id"); ok { + request["RouterId"] = v + } + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + var objects []map[string]interface{} + + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + status, statusOk := d.GetOk("status") + var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_vpc_bgp_networks", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.BgpNetworks.BgpNetwork", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.BgpNetworks.BgpNetwork", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["RouterId"], ":", item["DstCidrBlock"])]; !ok { + continue + } + } + if statusOk && status.(string) != "" && status.(string) != item["Status"].(string) { + continue + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "id": fmt.Sprint(object["RouterId"], ":", object["DstCidrBlock"]), + "dst_cidr_block": fmt.Sprint(object["DstCidrBlock"]), + "router_id": object["RouterId"], + "status": object["Status"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + + if err := d.Set("networks", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpc_bgp_peers.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpc_bgp_peers.go new file mode 100644 index 00000000000..104fe540f9d --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpc_bgp_peers.go @@ -0,0 +1,245 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func dataSourceAlicloudVpcBgpPeers() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAlicloudVpcBgpPeersRead, + Schema: map[string]*schema.Schema{ + "bgp_group_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "ids": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "router_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Available", "Deleted", "Deleting", "Modifying", "Pending"}, false), + }, + "output_file": { + Type: schema.TypeString, + Optional: true, + }, + "peers": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "auth_key": { + Type: schema.TypeString, + Computed: true, + }, + "bfd_multi_hop": { + Type: schema.TypeInt, + Computed: true, + }, + "bgp_group_id": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "bgp_peer_id": { + Type: schema.TypeString, + Computed: true, + }, + "bgp_peer_name": { + Type: schema.TypeString, + Computed: true, + }, + "bgp_status": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "enable_bfd": { + Type: schema.TypeBool, + Computed: true, + }, + "hold": { + Type: schema.TypeString, + Computed: true, + }, + "ip_version": { + Type: schema.TypeString, + Computed: true, + }, + "is_fake": { + Type: schema.TypeBool, + Computed: true, + }, + "keepalive": { + Type: schema.TypeString, + Computed: true, + }, + "local_asn": { + Type: schema.TypeString, + Computed: true, + }, + "peer_asn": { + Type: schema.TypeString, + Computed: true, + }, + "peer_ip_address": { + Type: schema.TypeString, + Computed: true, + }, + "route_limit": { + Type: schema.TypeString, + Computed: true, + }, + "router_id": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAlicloudVpcBgpPeersRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + + action := "DescribeBgpPeers" + request := make(map[string]interface{}) + if v, ok := d.GetOk("bgp_group_id"); ok { + request["BgpGroupId"] = v + } + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("router_id"); ok { + request["RouterId"] = v + } + request["PageSize"] = PageSizeMedium + request["PageNumber"] = 1 + var objects []map[string]interface{} + idsMap := make(map[string]string) + if v, ok := d.GetOk("ids"); ok { + for _, vv := range v.([]interface{}) { + if vv == nil { + continue + } + idsMap[vv.(string)] = vv.(string) + } + } + status, statusOk := d.GetOk("status") + var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_vpc_bgp_peers", action, AlibabaCloudSdkGoERROR) + } + resp, err := jsonpath.Get("$.BgpPeers.BgpPeer", response) + if err != nil { + return WrapErrorf(err, FailedGetAttributeMsg, action, "$.BgpPeers.BgpPeer", response) + } + result, _ := resp.([]interface{}) + for _, v := range result { + item := v.(map[string]interface{}) + if len(idsMap) > 0 { + if _, ok := idsMap[fmt.Sprint(item["BgpPeerId"])]; !ok { + continue + } + } + if statusOk && status.(string) != "" && status.(string) != item["Status"].(string) { + continue + } + objects = append(objects, item) + } + if len(result) < PageSizeLarge { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + ids := make([]string, 0) + s := make([]map[string]interface{}, 0) + for _, object := range objects { + mapping := map[string]interface{}{ + "auth_key": object["AuthKey"], + "bfd_multi_hop": formatInt(object["BfdMultiHop"]), + "bgp_group_id": object["BgpGroupId"], + "id": fmt.Sprint(object["BgpPeerId"]), + "bgp_peer_id": fmt.Sprint(object["BgpPeerId"]), + "bgp_peer_name": object["Name"], + "bgp_status": object["BgpStatus"], + "description": object["Description"], + "enable_bfd": object["EnableBfd"], + "hold": object["Hold"], + "ip_version": object["IpVersion"], + "is_fake": object["IsFake"], + "keepalive": object["Keepalive"], + "local_asn": object["LocalAsn"], + "peer_asn": object["PeerAsn"], + "peer_ip_address": object["PeerIpAddress"], + "route_limit": object["RouteLimit"], + "router_id": object["RouterId"], + "status": object["Status"], + } + ids = append(ids, fmt.Sprint(mapping["id"])) + s = append(s, mapping) + } + + d.SetId(dataResourceIdHash(ids)) + if err := d.Set("ids", ids); err != nil { + return WrapError(err) + } + if err := d.Set("peers", s); err != nil { + return WrapError(err) + } + if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { + writeToFile(output.(string), s) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpcs.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpcs.go index 25c802e4ca2..a4392dc5a48 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpcs.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_vpcs.go @@ -84,6 +84,15 @@ func dataSourceAlicloudVpcs() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "page_number": { + Type: schema.TypeInt, + Optional: true, + }, + "page_size": { + Type: schema.TypeInt, + Optional: true, + Default: 50, + }, "vpcs": { Type: schema.TypeList, Computed: true, @@ -172,6 +181,10 @@ func dataSourceAlicloudVpcs() *schema.Resource { Optional: true, Default: true, }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -210,9 +223,17 @@ func dataSourceAlicloudVpcsRead(d *schema.ResourceData, meta interface{}) error if v, ok := d.GetOk("vpc_owner_id"); ok { request["VpcOwnerId"] = v } - request["PageSize"] = PageSizeLarge - request["PageNumber"] = 1 - var objects []map[string]interface{} + if v, ok := d.GetOk("page_number"); ok && v.(int) > 0 { + request["PageNumber"] = v.(int) + } else { + request["PageNumber"] = 1 + } + if v, ok := d.GetOk("page_size"); ok && v.(int) > 0 { + request["PageSize"] = v.(int) + } else { + request["PageSize"] = PageSizeLarge + } + var objects []interface{} var vpcNameRegex *regexp.Regexp if v, ok := d.GetOk("name_regex"); ok { r, err := regexp.Compile(v.(string)) @@ -251,6 +272,10 @@ func dataSourceAlicloudVpcsRead(d *schema.ResourceData, meta interface{}) error return WrapErrorf(err, FailedGetAttributeMsg, action, "$.Vpcs.Vpc", response) } result, _ := resp.([]interface{}) + if isPagingRequest(d) { + objects = result + break + } for _, v := range result { item := v.(map[string]interface{}) if v, ok := d.GetOk("cidr_block"); ok && v.(string) != "" && item["CidrBlock"].(string) != v.(string) { @@ -274,7 +299,7 @@ func dataSourceAlicloudVpcsRead(d *schema.ResourceData, meta interface{}) error } objects = append(objects, item) } - if len(result) < PageSizeLarge { + if len(result) < request["PageSize"].(int) { break } request["PageNumber"] = request["PageNumber"].(int) + 1 @@ -282,7 +307,8 @@ func dataSourceAlicloudVpcsRead(d *schema.ResourceData, meta interface{}) error ids := make([]string, 0) names := make([]interface{}, 0) s := make([]map[string]interface{}, 0) - for _, object := range objects { + for _, v := range objects { + object := v.(map[string]interface{}) mapping := map[string]interface{}{ "region_id": object["RegionId"], "creation_time": object["CreationTime"], @@ -345,6 +371,9 @@ func dataSourceAlicloudVpcsRead(d *schema.ResourceData, meta interface{}) error if err := d.Set("vpcs", s); err != nil { return WrapError(err) } + if err := d.Set("total_count", formatInt(response["TotalCount"])); err != nil { + return WrapError(err) + } if output, ok := d.GetOk("output_file"); ok && output.(string) != "" { writeToFile(output.(string), s) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_yundun_dbaudit_instances.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_yundun_dbaudit_instances.go index 48d9aaeb3e6..a52e782a6dc 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_yundun_dbaudit_instances.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/data_source_alicloud_yundun_dbaudit_instances.go @@ -170,7 +170,7 @@ func dataSourceAlicloudDbauditInstancesRead(d *schema.ResourceData, meta interfa } addDebug(request.GetActionName(), raw, request.RpcRequest, request) response, _ := raw.(*yundun_dbaudit.ListTagResourcesResponse) - instanceTags = append(instanceTags, yundun_dbaudit.TagResources{response.TagResources}) + instanceTags = append(instanceTags, yundun_dbaudit.TagResources{TagResource: response.TagResources}) } return WrapError(extractDbauditInstance(d, instances, instanceTags)) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/diff_suppress_funcs.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/diff_suppress_funcs.go index e533571b218..6e6425b9255 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/diff_suppress_funcs.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/diff_suppress_funcs.go @@ -381,6 +381,15 @@ func ecsSecurityGroupRulePortRangeDiffSuppressFunc(k, old, new string, d *schema return true } +func ecsSecurityGroupRulePreFixListIdDiffSuppressFunc(k, old, new string, d *schema.ResourceData) bool { + _, cidrIpExist := d.GetOk("cidr_ip") + _, SourceSecurityGroupIdExist := d.GetOk("source_security_group_id") + if cidrIpExist || SourceSecurityGroupIdExist { + return true + } + return false +} + func vpcTypeResourceDiffSuppressFunc(k, old, new string, d *schema.ResourceData) bool { if len(Trim(d.Get("vswitch_id").(string))) > 0 { return false diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/errors.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/errors.go index 2afebc68311..34ce7cb5017 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/errors.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/errors.go @@ -44,7 +44,7 @@ var SlbIsBusy = []string{"SystemBusy", "OperationBusy", "ServiceIsStopping", "Ba var EcsNotFound = []string{"InvalidInstanceId.NotFound", "Forbidden.InstanceNotFound"} var DiskInvalidOperation = []string{"IncorrectDiskStatus", "IncorrectInstanceStatus", "OperationConflict", "InternalError", "InvalidOperation.Conflict", "IncorrectDiskStatus.Initializing"} var NetworkInterfaceInvalidOperations = []string{"InvalidOperation.InvalidEniState", "InvalidOperation.InvalidEcsState", "OperationConflict", "ServiceUnavailable", "InternalError"} -var OperationDeniedDBStatus = []string{"OperationDenied.DBStatus", "OperationDenied.DBInstanceStatus", "OperationDenied.DBClusterStatus", "InternalError", "OperationDenied.OutofUsage", "IncorrectDBInstanceState"} +var OperationDeniedDBStatus = []string{"InstanceConnectTimeoutFault", "OperationDenied.DBStatus", "OperationDenied.DBInstanceStatus", "OperationDenied.DBClusterStatus", "InternalError", "OperationDenied.OutofUsage", "IncorrectDBInstanceState"} var DBReadInstanceNotReadyStatus = []string{"OperationDenied.ReadDBInstanceStatus", "OperationDenied.MasterDBInstanceState", "ReadDBInstance.Mismatch"} var NasNotFound = []string{"InvalidMountTarget.NotFound", "InvalidFileSystem.NotFound", "Forbidden.NasNotFound", "InvalidLBid.NotFound", "VolumeUnavailable"} var SnapshotInvalidOperations = []string{"OperationConflict", "ServiceUnavailable", "InternalError", "SnapshotCreatedDisk", "SnapshotCreatedImage"} @@ -386,5 +386,6 @@ const FailedGetAttributeMsg = "Getting resource %s attribute by path %s failed!! const DefaultDebugMsg = "\n*************** %s Response *************** \n%s\n%s******************************\n\n" const FailedToReachTargetStatus = "Failed to reach target status. Current status is %s." +const FailedToReachTargetStatusWithResponse = FailedToReachTargetStatus + " Response: %s" const FailedToReachTargetAttribute = "Failed to reach value for target attribute. Current value is %s." const RequiredWhenMsg = "attribute '%s' is required when '%s' is %v" diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/provider.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/provider.go index 45dc3737f45..080582ba175 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/provider.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/provider.go @@ -227,6 +227,7 @@ func Provider() terraform.ResourceProvider { "alicloud_db_instances": dataSourceAlicloudDBInstances(), "alicloud_db_instance_engines": dataSourceAlicloudDBInstanceEngines(), "alicloud_db_instance_classes": dataSourceAlicloudDBInstanceClasses(), + "alicloud_rds_backups": dataSourceAlicloudRdsBackups(), "alicloud_pvtz_zones": dataSourceAlicloudPvtzZones(), "alicloud_pvtz_zone_records": dataSourceAlicloudPvtzZoneRecords(), "alicloud_router_interfaces": dataSourceAlicloudRouterInterfaces(), @@ -262,6 +263,7 @@ func Provider() terraform.ResourceProvider { "alicloud_cs_edge_kubernetes_clusters": dataSourceAlicloudCSEdgeKubernetesClusters(), "alicloud_cs_serverless_kubernetes_clusters": dataSourceAlicloudCSServerlessKubernetesClusters(), "alicloud_cs_kubernetes_permissions": dataSourceAlicloudCSKubernetesPermissions(), + "alicloud_cs_kubernetes_addons": dataSourceAlicloudCSKubernetesAddons(), "alicloud_cr_namespaces": dataSourceAlicloudCRNamespaces(), "alicloud_cr_repos": dataSourceAlicloudCRRepos(), "alicloud_cr_ee_instances": dataSourceAlicloudCrEEInstances(), @@ -633,6 +635,38 @@ func Provider() terraform.ResourceProvider { "alicloud_mongodb_accounts": dataSourceAlicloudMongodbAccounts(), "alicloud_mongodb_serverless_instances": dataSourceAlicloudMongodbServerlessInstances(), "alicloud_cddc_dedicated_host_accounts": dataSourceAlicloudCddcDedicatedHostAccounts(), + "alicloud_cr_chart_namespaces": dataSourceAlicloudCrChartNamespaces(), + "alicloud_fnf_executions": dataSourceAlicloudFnFExecutions(), + "alicloud_cr_chart_repositories": dataSourceAlicloudCrChartRepositories(), + "alicloud_mongodb_sharding_network_public_addresses": dataSourceAlicloudMongodbShardingNetworkPublicAddresses(), + "alicloud_ga_acls": dataSourceAlicloudGaAcls(), + "alicloud_ga_additional_certificates": dataSourceAlicloudGaAdditionalCertificates(), + "alicloud_alidns_custom_lines": dataSourceAlicloudAlidnsCustomLines(), + "alicloud_ros_template_scratches": dataSourceAlicloudRosTemplateScratches(), + "alicloud_alidns_gtm_instances": dataSourceAlicloudAlidnsGtmInstances(), + "alicloud_vpc_bgp_groups": dataSourceAlicloudVpcBgpGroups(), + "alicloud_nas_snapshots": dataSourceAlicloudNasSnapshots(), + "alicloud_hbr_replication_vault_regions": dataSourceAlicloudHbrReplicationVaultRegions(), + "alicloud_alidns_address_pools": dataSourceAlicloudAlidnsAddressPools(), + "alicloud_ecs_prefix_lists": dataSourceAlicloudEcsPrefixLists(), + "alicloud_alidns_access_strategies": dataSourceAlicloudAlidnsAccessStrategies(), + "alicloud_vpc_bgp_peers": dataSourceAlicloudVpcBgpPeers(), + "alicloud_nas_filesets": dataSourceAlicloudNasFilesets(), + "alicloud_cdn_ip_info": dataSourceAlicloudCdnIpInfo(), + "alicloud_nas_auto_snapshot_policies": dataSourceAlicloudNasAutoSnapshotPolicies(), + "alicloud_nas_lifecycle_policies": dataSourceAlicloudNasLifecyclePolicies(), + "alicloud_vpc_bgp_networks": dataSourceAlicloudVpcBgpNetworks(), + "alicloud_nas_data_flows": dataSourceAlicloudNasDataFlows(), + "alicloud_ecs_storage_capacity_units": dataSourceAlicloudEcsStorageCapacityUnits(), + "alicloud_dbfs_snapshots": dataSourceAlicloudDbfsSnapshots(), + "alicloud_msc_sub_contact_verification_message": dataSourceAlicloudMscSubContactVerificationMessage(), + "alicloud_dts_migration_jobs": dataSourceAlicloudDtsMigrationJobs(), + "alicloud_mse_gateways": dataSourceAlicloudMseGateways(), + "alicloud_mongodb_sharding_network_private_addresses": dataSourceAlicloudMongodbShardingNetworkPrivateAddresses(), + "alicloud_ecp_instances": dataSourceAlicloudEcpInstances(), + "alicloud_ecp_zones": dataSourceAlicloudEcpZones(), + "alicloud_ecp_instance_types": dataSourceAlicloudEcpInstanceTypes(), + "alicloud_dcdn_ipa_domains": dataSourceAlicloudDcdnIpaDomains(), }, ResourcesMap: map[string]*schema.Resource{ "alicloud_instance": resourceAliyunInstance(), @@ -660,6 +694,9 @@ func Provider() terraform.ResourceProvider { "alicloud_db_connection": resourceAlicloudDBConnection(), "alicloud_db_read_write_splitting_connection": resourceAlicloudDBReadWriteSplittingConnection(), "alicloud_db_instance": resourceAlicloudDBInstance(), + "alicloud_rds_backup": resourceAlicloudRdsBackup(), + "alicloud_rds_clone_db_instance": resourceAlicloudRdsCloneDbInstance(), + "alicloud_rds_upgrade_db_instance": resourceAlicloudRdsUpgradeDbInstance(), "alicloud_mongodb_instance": resourceAlicloudMongoDBInstance(), "alicloud_mongodb_sharding_instance": resourceAlicloudMongoDBShardingInstance(), "alicloud_gpdb_instance": resourceAlicloudGpdbInstance(), @@ -677,6 +714,7 @@ func Provider() terraform.ResourceProvider { "alicloud_ess_notification": resourceAlicloudEssNotification(), "alicloud_ess_alarm": resourceAlicloudEssAlarm(), "alicloud_ess_scalinggroup_vserver_groups": resourceAlicloudEssScalingGroupVserverGroups(), + "alicloud_ess_alb_server_group_attachment": resourceAlicloudEssAlbServerGroupAttachment(), "alicloud_vpc": resourceAlicloudVpc(), "alicloud_nat_gateway": resourceAlicloudNatGateway(), "alicloud_nas_file_system": resourceAlicloudNasFileSystem(), @@ -739,6 +777,7 @@ func Provider() terraform.ResourceProvider { "alicloud_cs_application": resourceAlicloudCSApplication(), "alicloud_cs_swarm": resourceAlicloudCSSwarm(), "alicloud_cs_kubernetes": resourceAlicloudCSKubernetes(), + "alicloud_cs_kubernetes_addon": resourceAlicloudCSKubernetesAddon(), "alicloud_cs_managed_kubernetes": resourceAlicloudCSManagedKubernetes(), "alicloud_cs_edge_kubernetes": resourceAlicloudCSEdgeKubernetes(), "alicloud_cs_serverless_kubernetes": resourceAlicloudCSServerlessKubernetes(), @@ -1145,6 +1184,44 @@ func Provider() terraform.ResourceProvider { "alicloud_mongodb_serverless_instance": resourceAlicloudMongodbServerlessInstance(), "alicloud_ecs_session_manager_status": resourceAlicloudEcsSessionManagerStatus(), "alicloud_cddc_dedicated_host_account": resourceAlicloudCddcDedicatedHostAccount(), + "alicloud_cr_chart_namespace": resourceAlicloudCrChartNamespace(), + "alicloud_fnf_execution": resourceAlicloudFnFExecution(), + "alicloud_cr_chart_repository": resourceAlicloudCrChartRepository(), + "alicloud_mongodb_sharding_network_public_address": resourceAlicloudMongodbShardingNetworkPublicAddress(), + "alicloud_ga_acl": resourceAlicloudGaAcl(), + "alicloud_ga_acl_attachment": resourceAlicloudGaAclAttachment(), + "alicloud_ga_additional_certificate": resourceAlicloudGaAdditionalCertificate(), + "alicloud_alidns_custom_line": resourceAlicloudAlidnsCustomLine(), + "alicloud_vpc_vbr_ha": resourceAlicloudVpcVbrHa(), + "alicloud_ros_template_scratch": resourceAlicloudRosTemplateScratch(), + "alicloud_alidns_gtm_instance": resourceAlicloudAlidnsGtmInstance(), + "alicloud_vpc_bgp_group": resourceAlicloudVpcBgpGroup(), + "alicloud_ram_security_preference": resourceAlicloudRamSecurityPreference(), + "alicloud_nas_snapshot": resourceAlicloudNasSnapshot(), + "alicloud_hbr_replication_vault": resourceAlicloudHbrReplicationVault(), + "alicloud_alidns_address_pool": resourceAlicloudAlidnsAddressPool(), + "alicloud_ecs_prefix_list": resourceAlicloudEcsPrefixList(), + "alicloud_alidns_access_strategy": resourceAlicloudAlidnsAccessStrategy(), + "alicloud_alidns_monitor_config": resourceAlicloudAlidnsMonitorConfig(), + "alicloud_vpc_dhcp_options_set_attachment": resourceAlicloudVpcDhcpOptionsSetAttachement(), + "alicloud_vpc_bgp_peer": resourceAlicloudVpcBgpPeer(), + "alicloud_nas_fileset": resourceAlicloudNasFileset(), + "alicloud_nas_auto_snapshot_policy": resourceAlicloudNasAutoSnapshotPolicy(), + "alicloud_nas_lifecycle_policy": resourceAlicloudNasLifecyclePolicy(), + "alicloud_vpc_bgp_network": resourceAlicloudVpcBgpNetwork(), + "alicloud_nas_data_flow": resourceAlicloudNasDataFlow(), + "alicloud_ecs_storage_capacity_unit": resourceAlicloudEcsStorageCapacityUnit(), + "alicloud_nas_recycle_bin": resourceAlicloudNasRecycleBin(), + "alicloud_dbfs_snapshot": resourceAlicloudDbfsSnapshot(), + "alicloud_dbfs_instance_attachment": resourceAlicloudDbfsInstanceAttachment(), + "alicloud_dts_migration_job": resourceAlicloudDtsMigrationJob(), + "alicloud_dts_migration_instance": resourceAlicloudDtsMigrationInstance(), + "alicloud_mse_gateway": resourceAlicloudMseGateway(), + "alicloud_dbfs_service_linked_role": resourceAlicloudDbfsServiceLinkedRole(), + "alicloud_resource_manager_service_linked_role": resourceAlicloudResourceManagerServiceLinkedRole(), + "alicloud_mongodb_sharding_network_private_address": resourceAlicloudMongodbShardingNetworkPrivateAddress(), + "alicloud_ecp_instance": resourceAlicloudEcpInstance(), + "alicloud_dcdn_ipa_domain": resourceAlicloudDcdnIpaDomain(), }, ConfigureFunc: providerConfigure, @@ -1359,6 +1436,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { config.ServicemeshEndpoint = strings.TrimSpace(endpoints["servicemesh"].(string)) config.AcrEndpoint = strings.TrimSpace(endpoints["acr"].(string)) config.EdsuserEndpoint = strings.TrimSpace(endpoints["edsuser"].(string)) + config.GaplusEndpoint = strings.TrimSpace(endpoints["gaplus"].(string)) if endpoint, ok := endpoints["alidns"]; ok { config.AlidnsEndpoint = strings.TrimSpace(endpoint.(string)) } else { @@ -1667,6 +1745,8 @@ func init() { "acr_endpoint": "Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom acr endpoints.", "edsuser_endpoint": "Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom edsuser endpoints.", + + "gaplus_endpoint": "Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom gaplus endpoints.", } } @@ -1711,6 +1791,13 @@ func endpointsSchema() *schema.Schema { Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "gaplus": { + Type: schema.TypeString, + Optional: true, + Default: "", + Description: descriptions["gaplus_endpoint"], + }, + "edsuser": { Type: schema.TypeString, Optional: true, @@ -2518,6 +2605,7 @@ func endpointsToHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", m["servicemesh"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["acr"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["edsuser"].(string))) + buf.WriteString(fmt.Sprintf("%s-", m["gaplus"].(string))) return hashcode.String(buf.String()) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_actiontrail_trail.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_actiontrail_trail.go index 410be0694e3..54ee6ce9f27 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_actiontrail_trail.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_actiontrail_trail.go @@ -203,6 +203,10 @@ func resourceAlicloudActiontrailTrailRead(d *schema.ResourceData, meta interface func resourceAlicloudActiontrailTrailUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) actiontrailService := ActiontrailService{client} + conn, err := client.NewActiontrailClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -255,10 +259,6 @@ func resourceAlicloudActiontrailTrailUpdate(d *schema.ResourceData, meta interfa } action := "UpdateTrail" - conn, err := client.NewActiontrailClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-07-06"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -295,10 +295,6 @@ func resourceAlicloudActiontrailTrailUpdate(d *schema.ResourceData, meta interfa "Name": d.Id(), } action := "StopLogging" - conn, err := client.NewActiontrailClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2020-07-06"), StringPointer("AK"), request, nil, &util.RuntimeOptions{}) @@ -325,10 +321,6 @@ func resourceAlicloudActiontrailTrailUpdate(d *schema.ResourceData, meta interfa "Name": d.Id(), } action := "StartLogging" - conn, err := client.NewActiontrailClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-07-06"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_health_check_template.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_health_check_template.go index e7648a054f7..90f8243dac4 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_health_check_template.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_health_check_template.go @@ -251,6 +251,10 @@ func resourceAlicloudAlbHealthCheckTemplateRead(d *schema.ResourceData, meta int } func resourceAlicloudAlbHealthCheckTemplateUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewAlbClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -333,10 +337,6 @@ func resourceAlicloudAlbHealthCheckTemplateUpdate(d *schema.ResourceData, meta i request["DryRun"] = v } action := "UpdateHealthCheckTemplateAttribute" - conn, err := client.NewAlbClient() - if err != nil { - return WrapError(err) - } request["ClientToken"] = buildClientToken("UpdateHealthCheckTemplateAttribute") runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_listener.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_listener.go index 88b0a95bdad..8d4e6bffbf5 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_listener.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_listener.go @@ -993,7 +993,7 @@ func resourceAlicloudAlbListenerDelete(d *schema.ResourceData, meta interface{}) err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-06-16"), StringPointer("AK"), nil, request, &runtime) if err != nil { - if IsExpectedErrors(err, []string{"IdempotenceProcessing", "IncorrectBusinessStatus.LoadBalancer", "SystemBusy", "Throttling", "-22031"}) || NeedRetry(err) { + if IsExpectedErrors(err, []string{"IdempotenceProcessing", "ResourceInConfiguring.Listener", "IncorrectBusinessStatus.LoadBalancer", "SystemBusy", "Throttling", "-22031"}) || NeedRetry(err) { wait() return resource.RetryableError(err) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_load_balancer.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_load_balancer.go index d9981d32d28..264fe0baf91 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_load_balancer.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_load_balancer.go @@ -147,6 +147,10 @@ func resourceAlicloudAlbLoadBalancer() *schema.Resource { }, ForceNew: true, }, + "dns_name": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -289,6 +293,7 @@ func resourceAlicloudAlbLoadBalancerRead(d *schema.ResourceData, meta interface{ d.Set("zone_mappings", zoneMappingsMaps) } + d.Set("dns_name", object["DNSName"]) return nil } func resourceAlicloudAlbLoadBalancerUpdate(d *schema.ResourceData, meta interface{}) error { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_security_policy.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_security_policy.go index 7e2c5190c8a..ba034ab4133 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_security_policy.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alb_security_policy.go @@ -124,6 +124,10 @@ func resourceAlicloudAlbSecurityPolicyRead(d *schema.ResourceData, meta interfac func resourceAlicloudAlbSecurityPolicyUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) albService := AlbService{client} + conn, err := client.NewAlbClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -146,10 +150,6 @@ func resourceAlicloudAlbSecurityPolicyUpdate(d *schema.ResourceData, meta interf request["ResourceType"] = "securitypolicy" if update { action := "MoveResourceGroup" - conn, err := client.NewAlbClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-06-16"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -195,10 +195,6 @@ func resourceAlicloudAlbSecurityPolicyUpdate(d *schema.ResourceData, meta interf updateSecurityPolicyAttributeReq["Ciphers"] = v } action := "UpdateSecurityPolicyAttribute" - conn, err := client.NewAlbClient() - if err != nil { - return WrapError(err) - } request["ClientToken"] = buildClientToken("UpdateSecurityPolicyAttribute") runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_access_strategy.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_access_strategy.go new file mode 100644 index 00000000000..e7f2529e40d --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_access_strategy.go @@ -0,0 +1,538 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudAlidnsAccessStrategy() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudAlidnsAccessStrategyCreate, + Read: resourceAlicloudAlidnsAccessStrategyRead, + Update: resourceAlicloudAlidnsAccessStrategyUpdate, + Delete: resourceAlicloudAlidnsAccessStrategyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "access_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"AUTO", "DEFAULT", "FAILOVER"}, false), + }, + "default_addr_pool_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"IPV4", "IPV6", "DOMAIN"}, false), + }, + "lines": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "line_code": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "default_addr_pools": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "addr_pool_id": { + Type: schema.TypeString, + Required: true, + }, + "lba_weight": { + Type: schema.TypeInt, + Optional: true, + }, + }, + }, + }, + "default_latency_optimization": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"OPEN", "CLOSE"}, false), + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if v, ok := d.GetOk("strategy_mode"); ok && v.(string) == "LATENCY" { + return false + } + return true + }, + }, + "default_lba_strategy": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"ALL_RR", "RATIO"}, false), + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if v, ok := d.GetOk("strategy_mode"); ok && v.(string) == "GEO" { + return false + } + return true + }, + }, + "default_max_return_addr_num": { + Type: schema.TypeInt, + Optional: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if v, ok := d.GetOk("strategy_mode"); ok && v.(string) == "LATENCY" { + return false + } + return true + }, + }, + "default_min_available_addr_num": { + Type: schema.TypeInt, + Required: true, + }, + "failover_addr_pool_type": { + Type: schema.TypeString, + Optional: true, + }, + "failover_addr_pools": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "addr_pool_id": { + Type: schema.TypeString, + Optional: true, + }, + "lba_weight": { + Type: schema.TypeInt, + Optional: true, + }, + }, + }, + }, + "failover_latency_optimization": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"OPEN", "CLOSE"}, false), + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if v, ok := d.GetOk("strategy_mode"); ok && v.(string) == "LATENCY" { + return false + } + return true + }, + }, + "failover_lba_strategy": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"ALL_RR", "RATIO"}, false), + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if v, ok := d.GetOk("strategy_mode"); ok && v.(string) == "GEO" { + return false + } + return true + }, + }, + "failover_max_return_addr_num": { + Type: schema.TypeInt, + Optional: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if v, ok := d.GetOk("strategy_mode"); ok && v.(string) == "LATENCY" { + return false + } + return true + }, + }, + "failover_min_available_addr_num": { + Type: schema.TypeInt, + Optional: true, + }, + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "lang": { + Type: schema.TypeString, + Optional: true, + }, + "strategy_mode": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"GEO", "LATENCY"}, false), + }, + "strategy_name": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + +func resourceAlicloudAlidnsAccessStrategyCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AddDnsGtmAccessStrategy" + request := make(map[string]interface{}) + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + + request["DefaultAddrPoolType"] = d.Get("default_addr_pool_type") + if v, ok := d.GetOk("default_latency_optimization"); ok { + request["DefaultLatencyOptimization"] = v + } + if v, ok := d.GetOk("default_lba_strategy"); ok { + request["DefaultLbaStrategy"] = v + } + if v, ok := d.GetOk("default_max_return_addr_num"); ok { + request["DefaultMaxReturnAddrNum"] = v + } + request["DefaultMinAvailableAddrNum"] = d.Get("default_min_available_addr_num") + if v, ok := d.GetOk("lines"); ok { + lines := make([]interface{}, 0) + for _, line := range v.(*schema.Set).List() { + lineArg := line.(map[string]interface{}) + if v, ok := lineArg["line_code"]; ok && fmt.Sprint(v) != "" { + lines = append(lines, v) + } + } + request["Lines"] = convertListToJsonString(lines) + } + if v, ok := d.GetOk("failover_addr_pools"); ok { + failoverAddrPoolMaps := make([]map[string]interface{}, 0) + for _, failoverAddrPool := range v.(*schema.Set).List() { + failoverAddrPoolArg := failoverAddrPool.(map[string]interface{}) + failoverAddrPoolMap := map[string]interface{}{} + failoverAddrPoolMap["Id"] = failoverAddrPoolArg["addr_pool_id"] + if v, ok := failoverAddrPoolArg["lba_weight"]; ok && fmt.Sprint(v) != "0" { + failoverAddrPoolMap["LbaWeight"] = v + } + failoverAddrPoolMaps = append(failoverAddrPoolMaps, failoverAddrPoolMap) + } + request["FailoverAddrPool"] = failoverAddrPoolMaps + } + if v, ok := d.GetOk("default_addr_pools"); ok { + defaultAddrPoolMaps := make([]map[string]interface{}, 0) + for _, defaultAddrPool := range v.(*schema.Set).List() { + defaultAddrPoolArg := defaultAddrPool.(map[string]interface{}) + defaultAddrPoolMap := map[string]interface{}{} + defaultAddrPoolMap["Id"] = defaultAddrPoolArg["addr_pool_id"] + if v, ok := defaultAddrPoolArg["lba_weight"]; ok && fmt.Sprint(v) != "0" { + defaultAddrPoolMap["LbaWeight"] = v + } + defaultAddrPoolMaps = append(defaultAddrPoolMaps, defaultAddrPoolMap) + } + request["DefaultAddrPool"] = defaultAddrPoolMaps + } + if v, ok := d.GetOk("failover_addr_pool_type"); ok { + request["FailoverAddrPoolType"] = v + } + if v, ok := d.GetOk("failover_latency_optimization"); ok { + request["FailoverLatencyOptimization"] = v + } + if v, ok := d.GetOk("failover_lba_strategy"); ok { + request["FailoverLbaStrategy"] = v + } + if v, ok := d.GetOk("failover_max_return_addr_num"); ok { + request["FailoverMaxReturnAddrNum"] = v + } + if v, ok := d.GetOk("failover_min_available_addr_num"); ok { + request["FailoverMinAvailableAddrNum"] = v + } + request["InstanceId"] = d.Get("instance_id") + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + request["StrategyMode"] = d.Get("strategy_mode") + request["StrategyName"] = d.Get("strategy_name") + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_alidns_access_strategy", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["StrategyId"])) + + return resourceAlicloudAlidnsAccessStrategyRead(d, meta) +} +func resourceAlicloudAlidnsAccessStrategyRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + alidnsService := AlidnsService{client} + object, err := alidnsService.DescribeAlidnsAccessStrategy(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_alidns_access_strategy alidnsService.DescribeAlidnsAccessStrategy Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("default_addr_pool_type", object["DefaultAddrPoolType"]) + if defaultAddrPoolsMap, ok := object["DefaultAddrPools"].(map[string]interface{}); ok && defaultAddrPoolsMap != nil { + if defaultAddrPoolList, ok := defaultAddrPoolsMap["DefaultAddrPool"]; ok && defaultAddrPoolList != nil { + defaultAddrPoolsMaps := make([]map[string]interface{}, 0) + for _, defaultAddrPoolListItem := range defaultAddrPoolList.([]interface{}) { + if v, ok := defaultAddrPoolListItem.(map[string]interface{}); ok { + defaultAddrPoolListItemMap := make(map[string]interface{}, 0) + defaultAddrPoolListItemMap["addr_pool_id"] = v["Id"] + defaultAddrPoolListItemMap["lba_weight"] = v["LbaWeight"] + defaultAddrPoolsMaps = append(defaultAddrPoolsMaps, defaultAddrPoolListItemMap) + } + } + d.Set("default_addr_pools", defaultAddrPoolsMaps) + } + } + + d.Set("default_latency_optimization", object["DefaultLatencyOptimization"]) + d.Set("default_lba_strategy", object["DefaultLbaStrategy"]) + if v, ok := object["DefaultMaxReturnAddrNum"]; ok { + d.Set("default_max_return_addr_num", formatInt(v)) + } + if v, ok := object["DefaultMinAvailableAddrNum"]; ok { + d.Set("default_min_available_addr_num", formatInt(v)) + } + d.Set("failover_addr_pool_type", object["FailoverAddrPoolType"]) + if failoverAddrPoolsMap, ok := object["FailoverAddrPools"].(map[string]interface{}); ok && failoverAddrPoolsMap != nil { + if failoverAddrPoolList, ok := failoverAddrPoolsMap["FailoverAddrPool"]; ok && failoverAddrPoolList != nil { + failoverAddrPoolsMaps := make([]map[string]interface{}, 0) + for _, failoverAddrPoolListItem := range failoverAddrPoolList.([]interface{}) { + if v, ok := failoverAddrPoolListItem.(map[string]interface{}); ok { + failoverAddrPoolListItemMap := make(map[string]interface{}, 0) + failoverAddrPoolListItemMap["addr_pool_id"] = v["Id"] + failoverAddrPoolListItemMap["lba_weight"] = v["LbaWeight"] + failoverAddrPoolsMaps = append(failoverAddrPoolsMaps, failoverAddrPoolListItemMap) + } + } + d.Set("failover_addr_pools", failoverAddrPoolsMaps) + } + } + if LinesMap, ok := object["Lines"].(map[string]interface{}); ok && LinesMap != nil { + if LineList, ok := LinesMap["Line"]; ok && LineList != nil { + LinesMaps := make([]map[string]interface{}, 0) + for _, lineListItem := range LineList.([]interface{}) { + if v, ok := lineListItem.(map[string]interface{}); ok { + lineListItemMap := make(map[string]interface{}, 0) + lineListItemMap["line_code"] = v["LineCode"] + LinesMaps = append(LinesMaps, lineListItemMap) + } + } + d.Set("lines", LinesMaps) + } + } + + d.Set("failover_latency_optimization", object["FailoverLatencyOptimization"]) + d.Set("failover_lba_strategy", object["FailoverLbaStrategy"]) + if v, ok := object["FailoverMaxReturnAddrNum"]; ok { + d.Set("failover_max_return_addr_num", formatInt(v)) + } + if v, ok := object["FailoverMinAvailableAddrNum"]; ok { + d.Set("failover_min_available_addr_num", formatInt(v)) + } + d.Set("instance_id", object["InstanceId"]) + d.Set("strategy_mode", object["StrategyMode"]) + d.Set("strategy_name", object["StrategyName"]) + d.Set("access_mode", object["AccessMode"]) + return nil +} +func resourceAlicloudAlidnsAccessStrategyUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + + update := false + request := map[string]interface{}{ + "StrategyId": d.Id(), + } + if d.HasChange("access_mode") { + update = true + if v, ok := d.GetOk("access_mode"); ok { + request["AccessMode"] = v + } + } + if d.HasChange("default_addr_pool_type") { + update = true + } + request["DefaultAddrPoolType"] = d.Get("default_addr_pool_type") + if d.HasChange("lines") { + update = true + } + if v, ok := d.GetOk("lines"); ok { + lines := make([]interface{}, 0) + for _, line := range v.(*schema.Set).List() { + lineArg := line.(map[string]interface{}) + if v, ok := lineArg["line_code"]; ok && fmt.Sprint(v) != "" { + lines = append(lines, v) + } + } + request["Lines"] = convertListToJsonString(lines) + } + + if d.HasChange("default_min_available_addr_num") { + update = true + } + request["DefaultMinAvailableAddrNum"] = d.Get("default_min_available_addr_num") + + if d.HasChange("strategy_name") { + update = true + } + request["StrategyName"] = d.Get("strategy_name") + if d.HasChange("default_latency_optimization") { + update = true + } + if v, ok := d.GetOk("default_latency_optimization"); ok { + request["DefaultLatencyOptimization"] = v + } + if d.HasChange("default_lba_strategy") { + update = true + } + if v, ok := d.GetOk("default_lba_strategy"); ok { + request["DefaultLbaStrategy"] = v + } + if d.HasChange("default_max_return_addr_num") { + update = true + } + if v, ok := d.GetOk("default_max_return_addr_num"); ok { + request["DefaultMaxReturnAddrNum"] = v + } + if d.HasChange("failover_addr_pool_type") { + update = true + } + if v, ok := d.GetOk("failover_addr_pool_type"); ok { + request["FailoverAddrPoolType"] = v + } + if d.HasChange("failover_latency_optimization") { + update = true + } + if v, ok := d.GetOk("failover_latency_optimization"); ok { + request["FailoverLatencyOptimization"] = v + } + if d.HasChange("failover_lba_strategy") { + update = true + } + if v, ok := d.GetOk("failover_lba_strategy"); ok { + request["FailoverLbaStrategy"] = v + } + if d.HasChange("failover_max_return_addr_num") { + update = true + } + if v, ok := d.GetOk("failover_max_return_addr_num"); ok { + request["FailoverMaxReturnAddrNum"] = v + } + if d.HasChange("failover_min_available_addr_num") { + update = true + } + if v, ok := d.GetOk("failover_min_available_addr_num"); ok { + request["FailoverMinAvailableAddrNum"] = v + } + if d.HasChange("default_addr_pools") { + update = true + } + if v, ok := d.GetOk("default_addr_pools"); ok { + defaultAddrPoolMaps := make([]map[string]interface{}, 0) + for _, defaultAddrPool := range v.(*schema.Set).List() { + defaultAddrPoolArg := defaultAddrPool.(map[string]interface{}) + defaultAddrPoolMap := map[string]interface{}{} + defaultAddrPoolMap["Id"] = defaultAddrPoolArg["addr_pool_id"] + if v, ok := defaultAddrPoolArg["lba_weight"]; ok && fmt.Sprint(v) != "0" { + defaultAddrPoolMap["LbaWeight"] = v + } + defaultAddrPoolMaps = append(defaultAddrPoolMaps, defaultAddrPoolMap) + } + request["DefaultAddrPool"] = defaultAddrPoolMaps + } + if d.HasChange("failover_addr_pools") { + update = true + } + if v, ok := d.GetOk("failover_addr_pools"); ok { + failoverAddrPoolMaps := make([]map[string]interface{}, 0) + for _, failoverAddrPool := range v.(*schema.Set).List() { + failoverAddrPoolArg := failoverAddrPool.(map[string]interface{}) + failoverAddrPoolMap := map[string]interface{}{} + failoverAddrPoolMap["Id"] = failoverAddrPoolArg["addr_pool_id"] + if v, ok := failoverAddrPoolArg["lba_weight"]; ok && fmt.Sprint(v) != "0" { + failoverAddrPoolMap["LbaWeight"] = v + } + failoverAddrPoolMaps = append(failoverAddrPoolMaps, failoverAddrPoolMap) + } + request["FailoverAddrPool"] = failoverAddrPoolMaps + } + if update { + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + action := "UpdateDnsGtmAccessStrategy" + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + return resourceAlicloudAlidnsAccessStrategyRead(d, meta) +} +func resourceAlicloudAlidnsAccessStrategyDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteDnsGtmAccessStrategy" + var response map[string]interface{} + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "StrategyId": d.Id(), + } + + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_address_pool.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_address_pool.go new file mode 100644 index 00000000000..a9590751640 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_address_pool.go @@ -0,0 +1,241 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudAlidnsAddressPool() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudAlidnsAddressPoolCreate, + Read: resourceAlicloudAlidnsAddressPoolRead, + Update: resourceAlicloudAlidnsAddressPoolUpdate, + Delete: resourceAlicloudAlidnsAddressPoolDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "address": { + Type: schema.TypeSet, + Required: true, + MaxItems: 20, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "address": { + Type: schema.TypeString, + Required: true, + }, + "attribute_info": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.ValidateJsonString, + }, + "lba_weight": { + Type: schema.TypeInt, + Optional: true, + }, + "mode": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"SMART", "ONLINE", "OFFLINE"}, false), + }, + "remark": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "address_pool_name": { + Type: schema.TypeString, + Required: true, + }, + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "lba_strategy": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"ALL_RR", "RATIO"}, false), + }, + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"IPV4", "IPV6", "DOMAIN"}, false), + }, + }, + } +} + +func resourceAlicloudAlidnsAddressPoolCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AddDnsGtmAddressPool" + request := make(map[string]interface{}) + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + + request["Name"] = d.Get("address_pool_name") + request["InstanceId"] = d.Get("instance_id") + request["LbaStrategy"] = d.Get("lba_strategy") + if v, ok := d.GetOk("address"); ok { + addressMaps := make([]map[string]interface{}, 0) + for _, address := range v.(*schema.Set).List() { + addressArg := address.(map[string]interface{}) + addressMap := map[string]interface{}{} + addressMap["Addr"] = addressArg["address"] + addressMap["AttributeInfo"] = addressArg["attribute_info"] + if v, ok := addressArg["remark"]; ok { + addressMap["Remark"] = v + } + if v, ok := addressArg["lba_weight"]; ok && fmt.Sprint(v) != "0" { + addressMap["LbaWeight"] = v + } + addressMap["Mode"] = addressArg["mode"] + addressMaps = append(addressMaps, addressMap) + } + request["Addr"] = addressMaps + } + request["Type"] = d.Get("type") + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_alidns_address_pool", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["AddrPoolId"])) + + return resourceAlicloudAlidnsAddressPoolRead(d, meta) +} +func resourceAlicloudAlidnsAddressPoolRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + alidnsService := AlidnsService{client} + object, err := alidnsService.DescribeAlidnsAddressPool(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_alidns_address_pool alidnsService.DescribeAlidnsAddressPool Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("address_pool_name", object["Name"]) + d.Set("lba_strategy", object["LbaStrategy"]) + d.Set("type", object["Type"]) + + return nil +} +func resourceAlicloudAlidnsAddressPoolUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + update := false + request := map[string]interface{}{ + "AddrPoolId": d.Id(), + } + if d.HasChange("lba_strategy") { + update = true + } + request["LbaStrategy"] = d.Get("lba_strategy") + if d.HasChange("address_pool_name") { + update = true + request["Name"] = d.Get("address_pool_name") + } + if d.HasChange("address") { + update = true + } + if v, ok := d.GetOk("address"); ok { + addressMaps := make([]map[string]interface{}, 0) + for _, address := range v.(*schema.Set).List() { + addressArg := address.(map[string]interface{}) + addressMap := map[string]interface{}{} + addressMap["Addr"] = addressArg["address"] + addressMap["AttributeInfo"] = addressArg["attribute_info"] + if v, ok := addressArg["remark"]; ok { + addressMap["Remark"] = v + } + if v, ok := addressArg["lba_weight"]; ok && fmt.Sprint(v) != "0" { + addressMap["LbaWeight"] = v + } + addressMap["Mode"] = addressArg["mode"] + addressMaps = append(addressMaps, addressMap) + } + request["Addr"] = addressMaps + } + if update { + action := "UpdateDnsGtmAddressPool" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + return resourceAlicloudAlidnsAddressPoolRead(d, meta) +} +func resourceAlicloudAlidnsAddressPoolDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteDnsGtmAddressPool" + var response map[string]interface{} + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "AddrPoolId": d.Id(), + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_custom_line.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_custom_line.go new file mode 100644 index 00000000000..3b1a5de0fd4 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_custom_line.go @@ -0,0 +1,209 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudAlidnsCustomLine() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudAlidnsCustomLineCreate, + Read: resourceAlicloudAlidnsCustomLineRead, + Update: resourceAlicloudAlidnsCustomLineUpdate, + Delete: resourceAlicloudAlidnsCustomLineDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "custom_line_name": { + Type: schema.TypeString, + Required: true, + }, + "domain_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ip_segment_list": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "end_ip": { + Type: schema.TypeString, + Required: true, + }, + "start_ip": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "lang": { + Type: schema.TypeString, + Optional: true, + }, + }, + } +} + +func resourceAlicloudAlidnsCustomLineCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AddCustomLine" + request := make(map[string]interface{}) + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + for index, ipSegment := range d.Get("ip_segment_list").(*schema.Set).List() { + ipSegmentArg := ipSegment.(map[string]interface{}) + request[fmt.Sprintf("IpSegment.%d.EndIp", index+1)] = ipSegmentArg["end_ip"] + request[fmt.Sprintf("IpSegment.%d.StartIp", index+1)] = ipSegmentArg["start_ip"] + } + + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + + request["DomainName"] = d.Get("domain_name") + request["LineName"] = d.Get("custom_line_name") + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_alidns_custom_line", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["LineId"])) + + return resourceAlicloudAlidnsCustomLineRead(d, meta) +} +func resourceAlicloudAlidnsCustomLineRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + alidnsService := AlidnsService{client} + object, err := alidnsService.DescribeAlidnsCustomLine(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_alidns_custom_line alidnsService.DescribeAlidnsCustomLine Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("custom_line_name", object["Name"]) + d.Set("domain_name", object["DomainName"]) + if ipSegmentList, ok := object["IpSegmentList"]; ok { + ipSegments := make([]map[string]interface{}, 0) + for _, ipSegmentListItem := range ipSegmentList.([]interface{}) { + ipSegmentMap := ipSegmentListItem.(map[string]interface{}) + ipSegmentArg := make(map[string]interface{}, 0) + ipSegmentArg["end_ip"] = ipSegmentMap["EndIp"] + ipSegmentArg["start_ip"] = ipSegmentMap["StartIp"] + ipSegments = append(ipSegments, ipSegmentArg) + } + d.Set("ip_segment_list", ipSegments) + } + return nil +} +func resourceAlicloudAlidnsCustomLineUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + update := false + request := map[string]interface{}{ + "LineId": d.Id(), + } + if d.HasChange("custom_line_name") { + update = true + if v, ok := d.GetOk("custom_line_name"); ok { + request["LineName"] = v + } + } + + if d.HasChange("ip_segment_list") { + update = true + for index, ipSegment := range d.Get("ip_segment_list").(*schema.Set).List() { + ipSegmentArg := ipSegment.(map[string]interface{}) + request[fmt.Sprintf("IpSegment.%d.EndIp", index+1)] = ipSegmentArg["end_ip"] + request[fmt.Sprintf("IpSegment.%d.StartIp", index+1)] = ipSegmentArg["start_ip"] + } + } + + if update { + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + action := "UpdateCustomLine" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + return resourceAlicloudAlidnsCustomLineRead(d, meta) +} +func resourceAlicloudAlidnsCustomLineDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteCustomLines" + var response map[string]interface{} + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "LineIds": d.Id(), + } + + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_gtm_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_gtm_instance.go new file mode 100644 index 00000000000..51e08b02418 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_gtm_instance.go @@ -0,0 +1,478 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudAlidnsGtmInstance() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudAlidnsGtmInstanceCreate, + Read: resourceAlicloudAlidnsGtmInstanceRead, + Update: resourceAlicloudAlidnsGtmInstanceUpdate, + Delete: resourceAlicloudAlidnsGtmInstanceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "alert_config": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "dingtalk_notice": { + Type: schema.TypeBool, + Optional: true, + }, + "email_notice": { + Type: schema.TypeBool, + Optional: true, + }, + "notice_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"ADDR_RESUME", "ADDR_ALERT", "ADDR_POOL_GROUP_UNAVAILABLE", "ADDR_POOL_GROUP_AVAILABLE", "ACCESS_STRATEGY_POOL_GROUP_SWITCH", "MONITOR_NODE_IP_CHANGE"}, false), + }, + "sms_notice": { + Type: schema.TypeBool, + Optional: true, + }, + }, + }, + }, + "alert_group": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "cname_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"PUBLIC"}, false), + }, + "force_update": { + Type: schema.TypeBool, + Optional: true, + }, + "instance_name": { + Type: schema.TypeString, + Required: true, + }, + "lang": { + Type: schema.TypeString, + Optional: true, + }, + "payment_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Subscription"}, false), + }, + "period": { + Type: schema.TypeInt, + Required: true, + }, + "renew_period": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return fmt.Sprint(d.Get("renewal_status")) == "ManualRenewal" + }, + }, + "renewal_status": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"AutoRenewal", "ManualRenewal"}, false), + }, + "package_edition": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"standard", "ultimate"}, false), + }, + "health_check_task_count": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(0, 100000), + }, + "sms_notification_count": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(0, 100000), + }, + "strategy_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"GEO", "LATENCY"}, false), + }, + "public_cname_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"CUSTOM", "SYSTEM_ASSIGN"}, false), + }, + "public_rr": { + Type: schema.TypeString, + Optional: true, + Computed: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return fmt.Sprint(d.Get("public_cname_mode")) == "SYSTEM_ASSIGN" + }, + }, + "public_user_domain_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "public_zone_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return fmt.Sprint(d.Get("public_cname_mode")) == "SYSTEM_ASSIGN" + }, + }, + "resource_group_id": { + Type: schema.TypeString, + Optional: true, + }, + "ttl": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntInSlice([]int{60, 120, 300, 600}), + }, + }, + } +} + +func resourceAlicloudAlidnsGtmInstanceCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateInstance" + request := make(map[string]interface{}) + conn, err := client.NewBssopenapiClient() + if err != nil { + return WrapError(err) + } + request["SubscriptionType"] = d.Get("payment_type") + if v, ok := d.GetOk("period"); ok { + request["Period"] = v + } + request["ProductCode"] = "dns" + request["ProductType"] = "dns_gtm_public_cn" + if v, ok := d.GetOk("renew_period"); ok { + request["RenewPeriod"] = v + } + if v, ok := d.GetOk("renewal_status"); ok { + request["RenewalStatus"] = v + } + parameters := []map[string]string{ + { + "Code": "PackageEdition", + "Value": fmt.Sprint(d.Get("package_edition")), + }, + { + "Code": "HealthcheckTaskCount", + "Value": fmt.Sprint(d.Get("health_check_task_count")), + }, + { + "Code": "SmsNotificationCount", + "Value": fmt.Sprint(d.Get("sms_notification_count")), + }, + } + + request["Parameter"] = parameters + request["ClientToken"] = buildClientToken("CreateInstance") + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-12-14"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + if IsExpectedErrors(err, []string{"NotApplicable"}) { + request["ProductType"] = "dns_gtm_public_intl" + conn.Endpoint = String(connectivity.BssOpenAPIEndpointInternational) + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_alidns_gtm_instance", action, AlibabaCloudSdkGoERROR) + } + + if fmt.Sprint(response["Code"]) != "Success" { + return WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + responseData := response["Data"].(map[string]interface{}) + d.SetId(fmt.Sprint(responseData["InstanceId"])) + return resourceAlicloudAlidnsGtmInstanceUpdate(d, meta) +} +func resourceAlicloudAlidnsGtmInstanceRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + alidnsService := AlidnsService{client} + object, err := alidnsService.DescribeAlidnsGtmInstance(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_alidns_gtm_instance alidnsService.DescribeAlidnsGtmInstance Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + + d.Set("resource_group_id", object["ResourceGroupId"]) + d.Set("payment_type", object["PaymentType"]) + d.Set("package_edition", object["VersionCode"]) + if config, ok := object["Config"].(map[string]interface{}); ok { + d.Set("cname_type", config["CnameType"]) + d.Set("instance_name", config["InstanceName"]) + d.Set("strategy_mode", config["StrategyMode"]) + d.Set("public_cname_mode", config["PublicCnameMode"]) + d.Set("public_rr", config["PublicRr"]) + d.Set("public_user_domain_name", config["PublicUserDomainName"]) + d.Set("public_zone_name", config["PubicZoneName"]) + if v, ok := config["Ttl"]; ok { + d.Set("ttl", formatInt(v)) + } + + v, err := convertJsonStringToList(config["AlertGroup"].(string)) + if err != nil { + return WrapError(err) + } else { + d.Set("alert_group", v) + } + + if alertConfigsList, ok := config["AlertConfig"]; ok { + alertConfigsArg := alertConfigsList.(map[string]interface{}) + if alertConfigConfig, ok := alertConfigsArg["AlertConfig"]; ok { + alertConfigConfigArgs := alertConfigConfig.([]interface{}) + alertConfigsMaps := make([]map[string]interface{}, 0) + for _, alertConfigMapArgitem := range alertConfigConfigArgs { + alertConfigMapArg := alertConfigMapArgitem.(map[string]interface{}) + alertConfigsMap := map[string]interface{}{} + alertConfigsMap["sms_notice"] = alertConfigMapArg["SmsNotice"] + alertConfigsMap["notice_type"] = alertConfigMapArg["NoticeType"] + alertConfigsMap["email_notice"] = alertConfigMapArg["EmailNotice"] + alertConfigsMap["dingtalk_notice"] = alertConfigMapArg["DingtalkNotice"] + alertConfigsMaps = append(alertConfigsMaps, alertConfigsMap) + } + d.Set("alert_config", alertConfigsMaps) + } + } + } + return nil +} +func resourceAlicloudAlidnsGtmInstanceUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + d.Partial(true) + + update := false + request := map[string]interface{}{ + "ResourceId": d.Id(), + } + if d.HasChange("resource_group_id") { + update = true + if v, ok := d.GetOk("resource_group_id"); ok { + request["NewResourceGroupId"] = v + } + } + if update { + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + action := "MoveGtmResourceGroup" + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("resource_group_id") + } + update = false + switchDnsGtmInstanceStrategyModeRequest := map[string]interface{}{ + "InstanceId": d.Id(), + } + if d.HasChange("strategy_mode") { + update = true + if v, ok := d.GetOk("strategy_mode"); ok { + switchDnsGtmInstanceStrategyModeRequest["StrategyMode"] = v + } + } + if update { + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + action := "SwitchDnsGtmInstanceStrategyMode" + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, switchDnsGtmInstanceStrategyModeRequest, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("strategy_mode") + } + update = false + updateDnsGtmInstanceGlobalConfigReq := map[string]interface{}{ + "InstanceId": d.Id(), + } + if d.HasChange("alert_config") { + update = true + alertConfigMaps := make([]map[string]interface{}, 0) + if v, ok := d.GetOk("alert_config"); ok { + for _, alertConfig := range v.(*schema.Set).List() { + alertConfigArg := alertConfig.(map[string]interface{}) + alertConfigMap := map[string]interface{}{} + alertConfigMap["SmsNotice"] = alertConfigArg["sms_notice"] + alertConfigMap["NoticeType"] = alertConfigArg["notice_type"] + alertConfigMap["EmailNotice"] = alertConfigArg["email_notice"] + alertConfigMap["DingtalkNotice"] = alertConfigArg["dingtalk_notice"] + alertConfigMaps = append(alertConfigMaps, alertConfigMap) + } + updateDnsGtmInstanceGlobalConfigReq["AlertConfig"] = alertConfigMaps + } + + } + if d.HasChange("alert_group") { + update = true + if v, ok := d.GetOk("alert_group"); ok { + updateDnsGtmInstanceGlobalConfigReq["AlertGroup"] = convertListToJsonString(v.(*schema.Set).List()) + } + } + if d.HasChange("instance_name") { + update = true + } + if v, ok := d.GetOk("instance_name"); ok { + updateDnsGtmInstanceGlobalConfigReq["InstanceName"] = v + } + if d.HasChange("ttl") { + update = true + if v, ok := d.GetOk("ttl"); ok { + updateDnsGtmInstanceGlobalConfigReq["Ttl"] = v + } + } + if d.HasChange("public_cname_mode") { + update = true + if v, ok := d.GetOk("public_cname_mode"); ok { + updateDnsGtmInstanceGlobalConfigReq["PublicCnameMode"] = v + } + } + if d.HasChange("public_rr") { + update = true + if v, ok := d.GetOk("public_rr"); ok { + updateDnsGtmInstanceGlobalConfigReq["PublicRr"] = v + } + } + if d.HasChange("public_user_domain_name") { + update = true + if v, ok := d.GetOk("public_user_domain_name"); ok { + updateDnsGtmInstanceGlobalConfigReq["PublicUserDomainName"] = v + } + } + if d.HasChange("public_zone_name") { + update = true + if v, ok := d.GetOk("public_zone_name"); ok { + updateDnsGtmInstanceGlobalConfigReq["PublicZoneName"] = v + } + } + if d.HasChange("cname_type") { + update = true + if v, ok := d.GetOk("cname_type"); ok { + updateDnsGtmInstanceGlobalConfigReq["CnameType"] = v + } + } + if update { + if v, ok := d.GetOkExists("force_update"); ok { + updateDnsGtmInstanceGlobalConfigReq["ForceUpdate"] = v + } + if v, ok := d.GetOk("lang"); ok { + updateDnsGtmInstanceGlobalConfigReq["Lang"] = v + } + action := "UpdateDnsGtmInstanceGlobalConfig" + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, updateDnsGtmInstanceGlobalConfigReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, updateDnsGtmInstanceGlobalConfigReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("alert_config") + d.SetPartial("alert_group") + d.SetPartial("cname_type") + d.SetPartial("instance_name") + d.SetPartial("public_cname_mode") + d.SetPartial("public_rr") + d.SetPartial("public_user_domain_name") + d.SetPartial("public_zone_name") + d.SetPartial("ttl") + } + d.Partial(false) + return resourceAlicloudAlidnsGtmInstanceRead(d, meta) +} +func resourceAlicloudAlidnsGtmInstanceDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[WARN] Cannot destroy resourceAlicloudAlidnsGtmInstance. Terraform will remove this resource from the state file, however resources may remain.") + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_monitor_config.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_monitor_config.go new file mode 100644 index 00000000000..21fcb63ed1b --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alidns_monitor_config.go @@ -0,0 +1,234 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudAlidnsMonitorConfig() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudAlidnsMonitorConfigCreate, + Read: resourceAlicloudAlidnsMonitorConfigRead, + Update: resourceAlicloudAlidnsMonitorConfigUpdate, + Delete: resourceAlicloudAlidnsMonitorConfigDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "addr_pool_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "evaluation_count": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntInSlice([]int{1, 2, 3}), + }, + "interval": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntInSlice([]int{60}), + }, + "isp_city_node": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "city_code": { + Type: schema.TypeString, + Required: true, + }, + "isp_code": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "lang": { + Type: schema.TypeString, + Optional: true, + }, + "monitor_extend_info": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.ValidateJsonString, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + equal, _ := compareJsonTemplateAreEquivalent(old, new) + return equal + }, + }, + "protocol_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"HTTP", "HTTPS", "PING", "TCP"}, false), + }, + "timeout": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntInSlice([]int{2000, 3000, 5000, 10000}), + }, + }, + } +} + +func resourceAlicloudAlidnsMonitorConfigCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AddDnsGtmMonitor" + request := make(map[string]interface{}) + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + request["AddrPoolId"] = d.Get("addr_pool_id") + request["EvaluationCount"] = d.Get("evaluation_count") + request["Interval"] = d.Get("interval") + if v, ok := d.GetOk("isp_city_node"); ok { + for i, ispCityNode := range v.(*schema.Set).List() { + ispCityNodeArg := ispCityNode.(map[string]interface{}) + request[fmt.Sprintf("IspCityNode.%d.CityCode", i+1)] = ispCityNodeArg["city_code"] + request[fmt.Sprintf("IspCityNode.%d.IspCode", i+1)] = ispCityNodeArg["isp_code"] + } + } + + if v, ok := d.GetOk("lang"); ok { + request["Lang"] = v + } + request["MonitorExtendInfo"] = d.Get("monitor_extend_info") + request["ProtocolType"] = d.Get("protocol_type") + request["Timeout"] = d.Get("timeout") + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_alidns_monitor_config", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["MonitorConfigId"])) + return resourceAlicloudAlidnsMonitorConfigRead(d, meta) +} +func resourceAlicloudAlidnsMonitorConfigRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + alidnsService := AlidnsService{client} + object, err := alidnsService.DescribeAlidnsMonitorConfig(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_alidns_monitor_config alidnsService.DescribeAlidnsMonitorConfig Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + if v, ok := object["EvaluationCount"]; ok { + d.Set("evaluation_count", formatInt(v)) + } + if v, ok := object["Interval"]; ok { + d.Set("interval", formatInt(v)) + } + d.Set("monitor_extend_info", object["MonitorExtendInfo"]) + d.Set("protocol_type", object["ProtocolType"]) + if v, ok := object["Timeout"]; ok { + d.Set("timeout", formatInt(v)) + } + if ispCityNodesList, ok := object["IspCityNodes"]; ok { + ispCityNodesArg := ispCityNodesList.(map[string]interface{}) + if ispCityNodeConfig, ok := ispCityNodesArg["IspCityNode"]; ok { + ispCityNodeConfigArgs := ispCityNodeConfig.([]interface{}) + ispCityNodesMaps := make([]map[string]interface{}, 0) + for _, ispCityNodeMapArgitem := range ispCityNodeConfigArgs { + ispCityNodeMapArg := ispCityNodeMapArgitem.(map[string]interface{}) + ispCityNodesMap := map[string]interface{}{} + ispCityNodesMap["city_code"] = ispCityNodeMapArg["CityCode"] + ispCityNodesMap["isp_code"] = ispCityNodeMapArg["IspCode"] + ispCityNodesMaps = append(ispCityNodesMaps, ispCityNodesMap) + } + d.Set("isp_city_node", ispCityNodesMaps) + } + } + return nil +} +func resourceAlicloudAlidnsMonitorConfigUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + update := false + request := map[string]interface{}{ + "MonitorConfigId": d.Id(), + } + if d.HasChange("isp_city_node") { + update = true + } + if v, ok := d.GetOk("isp_city_node"); ok { + for i, ispCityNode := range v.(*schema.Set).List() { + ispCityNodeArg := ispCityNode.(map[string]interface{}) + request[fmt.Sprintf("IspCityNode.%d.CityCode", i+1)] = ispCityNodeArg["city_code"] + request[fmt.Sprintf("IspCityNode.%d.IspCode", i+1)] = ispCityNodeArg["isp_code"] + } + } + if d.HasChange("monitor_extend_info") { + update = true + } + request["MonitorExtendInfo"] = d.Get("monitor_extend_info") + if d.HasChange("protocol_type") { + update = true + } + request["ProtocolType"] = d.Get("protocol_type") + if d.HasChange("evaluation_count") { + update = true + request["EvaluationCount"] = d.Get("evaluation_count") + } + if d.HasChange("interval") { + update = true + request["Interval"] = d.Get("interval") + } + if d.HasChange("timeout") { + update = true + request["Timeout"] = d.Get("timeout") + } + if update { + action := "UpdateDnsGtmMonitor" + conn, err := client.NewAlidnsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + return resourceAlicloudAlidnsMonitorConfigRead(d, meta) +} +func resourceAlicloudAlidnsMonitorConfigDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[WARN] Cannot destroy resourceAlicloudAlidnsMonitorConfig. Terraform will remove this resource from the state file, however resources may remain.") + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alikafka_consumer_group.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alikafka_consumer_group.go index be499a306d8..e511edf83ac 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alikafka_consumer_group.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_alikafka_consumer_group.go @@ -1,9 +1,12 @@ package alicloud import ( + "fmt" + "log" "time" - "github.com/aliyun/alibaba-cloud-sdk-go/services/alikafka" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" @@ -32,120 +35,130 @@ func resourceAlicloudAlikafkaConsumerGroup() *schema.Resource { ForceNew: true, ValidateFunc: validation.StringLenBetween(1, 64), }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, "tags": tagsSchema(), }, } } func resourceAlicloudAlikafkaConsumerGroupCreate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*connectivity.AliyunClient) - alikafkaService := AlikafkaService{client} - - instanceId := d.Get("instance_id").(string) - regionId := client.RegionId - consumerId := d.Get("consumer_id").(string) - - request := alikafka.CreateCreateConsumerGroupRequest() - request.InstanceId = instanceId - request.RegionId = regionId - request.ConsumerId = consumerId - - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - raw, err := alikafkaService.client.WithAlikafkaClient(func(alikafkaClient *alikafka.Client) (interface{}, error) { - return alikafkaClient.CreateConsumerGroup(request) - }) + var response map[string]interface{} + action := "CreateConsumerGroup" + request := make(map[string]interface{}) + conn, err := client.NewAlikafkaClient() + if err != nil { + return WrapError(err) + } + request["ConsumerId"] = d.Get("consumer_id") + request["InstanceId"] = d.Get("instance_id") + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("description"); ok { + request["Remark"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-16"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) if err != nil { - if IsExpectedErrors(err, []string{ThrottlingUser}) { - time.Sleep(10 * time.Second) + if NeedRetry(err) { + wait() return resource.RetryableError(err) } return resource.NonRetryableError(err) } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) return nil }) - + addDebug(action, response, request) if err != nil { - return WrapErrorf(err, DefaultErrorMsg, "alicloud_alikafka_consumer_group", request.GetActionName(), AlibabaCloudSdkGoERROR) + return WrapErrorf(err, DefaultErrorMsg, "alicloud_alikafka_consumer_group", action, AlibabaCloudSdkGoERROR) + } + if fmt.Sprint(response["Success"]) == "false" { + return WrapError(fmt.Errorf("%s failed, response: %v", action, response)) } - d.SetId(instanceId + ":" + consumerId) + d.SetId(fmt.Sprint(request["InstanceId"], ":", request["ConsumerId"])) + return resourceAlicloudAlikafkaConsumerGroupUpdate(d, meta) } func resourceAlicloudAlikafkaConsumerGroupRead(d *schema.ResourceData, meta interface{}) error { - client := meta.(*connectivity.AliyunClient) alikafkaService := AlikafkaService{client} - - object, err := alikafkaService.DescribeAlikafkaConsumerGroup(d.Id()) + object, err := alikafkaService.DescribeAliKafkaConsumerGroup(d.Id()) if err != nil { - // Handle exceptions if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_ali_kafka_consumer_group alikafkaService.DescribeAliKafkaConsumerGroup Failed!!! %s", err) d.SetId("") return nil } return WrapError(err) } - - d.Set("instance_id", object.InstanceId) - d.Set("consumer_id", object.ConsumerId) - - tags, err := alikafkaService.DescribeTags(d.Id(), nil, TagResourceConsumerGroup) + parts, err := ParseResourceId(d.Id(), 2) if err != nil { return WrapError(err) } - d.Set("tags", alikafkaService.tagsToMap(tags)) + d.Set("consumer_id", parts[1]) + d.Set("instance_id", parts[0]) + d.Set("description", object["Remark"]) + if v, ok := object["Tags"].(map[string]interface{}); ok { + d.Set("tags", tagsToMap(v["TagVO"])) + } return nil } func resourceAlicloudAlikafkaConsumerGroupUpdate(d *schema.ResourceData, meta interface{}) error { - client := meta.(*connectivity.AliyunClient) alikafkaService := AlikafkaService{client} - if err := alikafkaService.setInstanceTags(d, TagResourceConsumerGroup); err != nil { - return WrapError(err) + if d.HasChange("tags") { + if err := alikafkaService.SetResourceTags(d, "CONSUMERGROUP"); err != nil { + return WrapError(err) + } + d.SetPartial("tags") } return resourceAlicloudAlikafkaConsumerGroupRead(d, meta) } func resourceAlicloudAlikafkaConsumerGroupDelete(d *schema.ResourceData, meta interface{}) error { - client := meta.(*connectivity.AliyunClient) - alikafkaService := AlikafkaService{client} - parts, err := ParseResourceId(d.Id(), 2) if err != nil { return WrapError(err) } - instanceId := parts[0] - consumerId := parts[1] - - request := alikafka.CreateDeleteConsumerGroupRequest() - request.ConsumerId = consumerId - request.InstanceId = instanceId - request.RegionId = client.RegionId + action := "DeleteConsumerGroup" + var response map[string]interface{} + conn, err := client.NewAlikafkaClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "ConsumerId": parts[1], + "InstanceId": parts[0], + } - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - raw, err := alikafkaService.client.WithAlikafkaClient(func(alikafkaClient *alikafka.Client) (interface{}, error) { - return alikafkaClient.DeleteConsumerGroup(request) - }) + request["RegionId"] = client.RegionId + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-16"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) if err != nil { - if IsExpectedErrors(err, []string{ThrottlingUser, "ONS_SYSTEM_FLOW_CONTROL"}) { - time.Sleep(10 * time.Second) + if IsExpectedErrors(err, []string{ThrottlingUser, "ONS_SYSTEM_FLOW_CONTROL"}) || NeedRetry(err) { + wait() return resource.RetryableError(err) } return resource.NonRetryableError(err) } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) return nil }) - + addDebug(action, response, request) if err != nil { - return WrapErrorf(err, DefaultErrorMsg, d.Id(), request.GetActionName(), AlibabaCloudSdkGoERROR) + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) } - - return WrapError(alikafkaService.WaitForAlikafkaConsumerGroup(d.Id(), Deleted, DefaultTimeoutMedium)) + if fmt.Sprint(response["Success"]) == "false" { + return WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + return nil } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_amqp_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_amqp_instance.go index 5c924123878..95d01148912 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_amqp_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_amqp_instance.go @@ -27,6 +27,7 @@ func resourceAlicloudAmqpInstance() *schema.Resource { Schema: map[string]*schema.Schema{ "instance_name": { Type: schema.TypeString, + Computed: true, Optional: true, }, "instance_type": { @@ -254,7 +255,7 @@ func resourceAlicloudAmqpInstanceRead(d *schema.ResourceData, meta interface{}) d.Set("status", object["Status"]) d.Set("support_eip", object["SupportEIP"]) bssOpenApiService := BssOpenApiService{client} - queryAvailableInstancesObject, err := bssOpenApiService.QueryAvailableInstances(d.Id(), "ons", "ons_onsproxy_pre") + queryAvailableInstancesObject, err := bssOpenApiService.QueryAvailableInstances(d.Id(), "ons", "ons_onsproxy_pre", "ons_onsproxy_public_intl") if err != nil { return WrapError(err) } @@ -268,6 +269,10 @@ func resourceAlicloudAmqpInstanceRead(d *schema.ResourceData, meta interface{}) } func resourceAlicloudAmqpInstanceUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewBssopenapiClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -312,27 +317,26 @@ func resourceAlicloudAmqpInstanceUpdate(d *schema.ResourceData, meta interface{} setRenewalReq := map[string]interface{}{ "InstanceIDs": d.Id(), } + if !d.IsNewResource() && d.HasChange("renewal_status") { update = true } if v, ok := d.GetOk("renewal_status"); ok { setRenewalReq["RenewalStatus"] = v } + if !d.IsNewResource() && d.HasChange("renewal_duration") { + update = true + } + if v, ok := d.GetOk("renewal_duration"); ok { + setRenewalReq["RenewalPeriod"] = v + } + if !d.IsNewResource() && d.HasChange("payment_type") { update = true setRenewalReq["SubscriptionType"] = d.Get("payment_type") } setRenewalReq["ProductCode"] = "ons" setRenewalReq["ProductType"] = "ons_onsproxy_pre" - if !d.IsNewResource() && d.HasChange("renewal_duration") { - update = true - if v, ok := d.GetOk("renewal_duration"); ok { - setRenewalReq["RenewalPeriod"] = v - } else if v, ok := d.GetOk("renewal_status"); ok && v.(string) == "AutoRenewal" { - return WrapError(fmt.Errorf("attribute '%s' is required when '%s' is %v ", "renewal_duration", "renewal_status", d.Get("renewal_status"))) - } - setRenewalReq["RenewalStatus"] = d.Get("renewal_status") - } if d.HasChange("renewal_duration_unit") { update = true if v, ok := d.GetOk("renewal_duration_unit"); ok { @@ -344,10 +348,6 @@ func resourceAlicloudAmqpInstanceUpdate(d *schema.ResourceData, meta interface{} } if update { action := "SetRenewal" - conn, err := client.NewBssopenapiClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-12-14"), StringPointer("AK"), nil, setRenewalReq, &util.RuntimeOptions{}) @@ -358,6 +358,7 @@ func resourceAlicloudAmqpInstanceUpdate(d *schema.ResourceData, meta interface{} } if IsExpectedErrors(err, []string{"NotApplicable"}) { conn.Endpoint = String(connectivity.BssOpenAPIEndpointInternational) + setRenewalReq["ProductType"] = "ons_onsproxy_public_intl" return resource.RetryableError(err) } return resource.NonRetryableError(err) @@ -432,10 +433,6 @@ func resourceAlicloudAmqpInstanceUpdate(d *schema.ResourceData, meta interface{} modifyInstanceReq["ModifyType"] = v } action := "ModifyInstance" - conn, err := client.NewBssopenapiClient() - if err != nil { - return WrapError(err) - } request["ClientToken"] = buildClientToken("ModifyInstance") runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) @@ -449,6 +446,7 @@ func resourceAlicloudAmqpInstanceUpdate(d *schema.ResourceData, meta interface{} } if IsExpectedErrors(err, []string{"NotApplicable"}) { conn.Endpoint = String(connectivity.BssOpenAPIEndpointInternational) + modifyInstanceReq["ProductType"] = "ons_onsproxy_public_intl" return resource.RetryableError(err) } return resource.NonRetryableError(err) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_alert_contact.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_alert_contact.go index 893e7d303a4..1d7813fa24d 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_alert_contact.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_alert_contact.go @@ -124,6 +124,10 @@ func resourceAlicloudArmsAlertContactRead(d *schema.ResourceData, meta interface } func resourceAlicloudArmsAlertContactUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewArmsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -174,10 +178,6 @@ func resourceAlicloudArmsAlertContactUpdate(d *schema.ResourceData, meta interfa } if update { action := "UpdateAlertContact" - conn, err := client.NewArmsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-08-08"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_alert_contact_group.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_alert_contact_group.go index 93eab2fae8e..1043fc529ab 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_alert_contact_group.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_alert_contact_group.go @@ -95,6 +95,10 @@ func resourceAlicloudArmsAlertContactGroupRead(d *schema.ResourceData, meta inte } func resourceAlicloudArmsAlertContactGroupUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewArmsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -113,10 +117,6 @@ func resourceAlicloudArmsAlertContactGroupUpdate(d *schema.ResourceData, meta in } if update { action := "UpdateAlertContactGroup" - conn, err := client.NewArmsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-08-08"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_prometheus_alert_rule.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_prometheus_alert_rule.go index d4d97046866..e54d5a8e9d0 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_prometheus_alert_rule.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_arms_prometheus_alert_rule.go @@ -98,7 +98,6 @@ func resourceAlicloudArmsPrometheusAlertRule() *schema.Resource { "status": { Type: schema.TypeInt, Computed: true, - ForceNew: true, }, "type": { Type: schema.TypeString, @@ -106,6 +105,10 @@ func resourceAlicloudArmsPrometheusAlertRule() *schema.Resource { ForceNew: true, Computed: true, }, + "prometheus_alert_rule_id": { + Type: schema.TypeInt, + Computed: true, + }, }, } } @@ -243,6 +246,10 @@ func resourceAlicloudArmsPrometheusAlertRuleRead(d *schema.ResourceData, meta in } func resourceAlicloudArmsPrometheusAlertRuleUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewArmsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} parts, err := ParseResourceId(d.Id(), 2) if err != nil { @@ -316,10 +323,6 @@ func resourceAlicloudArmsPrometheusAlertRuleUpdate(d *schema.ResourceData, meta if update { action := "UpdatePrometheusAlertRule" - conn, err := client.NewArmsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-08-08"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_host.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_host.go index b5cb64011ce..a06e2288432 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_host.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_host.go @@ -158,6 +158,10 @@ func resourceAlicloudBastionhostHostRead(d *schema.ResourceData, meta interface{ func resourceAlicloudBastionhostHostUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) var response map[string]interface{} + conn, err := client.NewBastionhostClient() + if err != nil { + return WrapError(err) + } parts, err := ParseResourceId(d.Id(), 2) if err != nil { return WrapError(err) @@ -176,10 +180,6 @@ func resourceAlicloudBastionhostHostUpdate(d *schema.ResourceData, meta interfac request["RegionId"] = client.RegionId if update { action := "ModifyHostsActiveAddressType" - conn, err := client.NewBastionhostClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-12-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -232,10 +232,6 @@ func resourceAlicloudBastionhostHostUpdate(d *schema.ResourceData, meta interfac modifyHostReq["RegionId"] = client.RegionId if update { action := "ModifyHost" - conn, err := client.NewBastionhostClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-12-09"), StringPointer("AK"), nil, modifyHostReq, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_host_account.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_host_account.go index 86003dca9e4..97f21677c52 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_host_account.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_host_account.go @@ -147,6 +147,10 @@ func resourceAlicloudBastionhostHostAccountRead(d *schema.ResourceData, meta int func resourceAlicloudBastionhostHostAccountUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) var response map[string]interface{} + conn, err := client.NewBastionhostClient() + if err != nil { + return WrapError(err) + } parts, err := ParseResourceId(d.Id(), 2) if err != nil { return WrapError(err) @@ -181,10 +185,6 @@ func resourceAlicloudBastionhostHostAccountUpdate(d *schema.ResourceData, meta i request["RegionId"] = client.RegionId if update { action := "ModifyHostAccount" - conn, err := client.NewBastionhostClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-12-09"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_instance.go index 3a4044fe183..e0566bf85ad 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_bastionhost_instance.go @@ -5,11 +5,11 @@ import ( "strconv" "time" + log "github.com/sirupsen/logrus" + util "github.com/alibabacloud-go/tea-utils/service" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/aliyun/alibaba-cloud-sdk-go/services/yundun_bastionhost" - "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" @@ -271,25 +271,6 @@ func resourceAlicloudBastionhostInstanceUpdate(d *schema.ResourceData, meta inte } func resourceAlicloudBastionhostInstanceDelete(d *schema.ResourceData, meta interface{}) error { - client := meta.(*connectivity.AliyunClient) - bastionhostService := YundunBastionhostService{client} - request := yundun_bastionhost.CreateRefundInstanceRequest() - request.InstanceId = d.Id() - - raw, err := bastionhostService.client.WithBastionhostClient(func(BastionhostClient *yundun_bastionhost.Client) (interface{}, error) { - return BastionhostClient.RefundInstance(request) - }) - - if err != nil { - return WrapErrorf(err, DefaultErrorMsg, d.Id(), request.GetActionName(), AlibabaCloudSdkGoERROR) - } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) - // Wait for the release procedure of cloud resource dependencies. Instance can not be fetched through api as soon as release has - // been invoked, however the resources have not been fully destroyed yet. Therefore, a certain amount time of waiting - // is quite necessary (conservative estimation cloud be less then 3 minutes) - stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, bastionhostService.BastionhostInstanceRefreshFunc(d.Id(), []string{})) - if _, err := stateConf.WaitForState(); err != nil { - return WrapErrorf(err, IdMsg, d.Id()) - } + log.Printf("[WARN] Cannot destroy resourceBastionhostInstance. Terraform will remove this resource from the state file, however resources may remain.") return nil } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_bandwidth_package.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_bandwidth_package.go index d5d0d766629..43ef0971fce 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_bandwidth_package.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_bandwidth_package.go @@ -314,6 +314,10 @@ func resourceAlicloudCenBandwidthPackageUpdate(d *schema.ResourceData, meta inte return resourceAlicloudCenBandwidthPackageRead(d, meta) } func resourceAlicloudCenBandwidthPackageDelete(d *schema.ResourceData, meta interface{}) error { + if d.Get("payment_type").(string) == "PrePaid" { + log.Printf("[WARN] Cannot destroy resource Alicloud Resource Cen BandwidthPackage. Terraform will remove this resource from the state file, however resources may remain.") + return nil + } client := meta.(*connectivity.AliyunClient) request := cbn.CreateDeleteCenBandwidthPackageRequest() request.CenBandwidthPackageId = d.Id() diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_instance.go index 02f8fe3c033..25ea46529d8 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_instance.go @@ -130,6 +130,10 @@ func resourceAlicloudCenInstanceRead(d *schema.ResourceData, meta interface{}) e func resourceAlicloudCenInstanceUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) cbnService := CbnService{client} + conn, err := client.NewCbnClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -165,10 +169,6 @@ func resourceAlicloudCenInstanceUpdate(d *schema.ResourceData, meta interface{}) } if update { action := "ModifyCenAttribute" - conn, err := client.NewCbnClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-12"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router.go index 4495455a013..0aa027e7a37 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router.go @@ -143,6 +143,10 @@ func resourceAlicloudCenTransitRouterRead(d *schema.ResourceData, meta interface func resourceAlicloudCenTransitRouterUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) cbnService := CbnService{client} + conn, err := client.NewCbnClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false parts, err1 := ParseResourceId(d.Id(), 2) @@ -166,10 +170,6 @@ func resourceAlicloudCenTransitRouterUpdate(d *schema.ResourceData, meta interfa request["DryRun"] = d.Get("dry_run") } action := "UpdateTransitRouter" - conn, err := client.NewCbnClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-12"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_peer_attachment.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_peer_attachment.go index 0c4b30efbbf..4117807b309 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_peer_attachment.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_peer_attachment.go @@ -36,6 +36,11 @@ func resourceAlicloudCenTransitRouterPeerAttachment() *schema.Resource { Type: schema.TypeInt, Optional: true, }, + "bandwidth_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"BandwidthPackage", "DataTransfer"}, false), + }, "cen_bandwidth_package_id": { Type: schema.TypeString, Optional: true, @@ -155,6 +160,9 @@ func resourceAlicloudCenTransitRouterPeerAttachmentCreate(d *schema.ResourceData request["TransitRouterId"] = v } + if v, ok := d.GetOk("bandwidth_type"); ok { + request["BandwidthType"] = v + } request["ClientToken"] = buildClientToken("CreateTransitRouterPeerAttachment") runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) @@ -202,6 +210,7 @@ func resourceAlicloudCenTransitRouterPeerAttachmentRead(d *schema.ResourceData, d.Set("transit_router_attachment_id", parts[1]) d.Set("auto_publish_route_enabled", object["AutoPublishRouteEnabled"]) d.Set("bandwidth", formatInt(object["Bandwidth"])) + d.Set("bandwidth_type", object["BandwidthType"]) d.Set("cen_bandwidth_package_id", object["CenBandwidthPackageId"]) d.Set("peer_transit_router_id", object["PeerTransitRouterId"]) d.Set("peer_transit_router_region_id", object["PeerTransitRouterRegionId"]) @@ -215,6 +224,10 @@ func resourceAlicloudCenTransitRouterPeerAttachmentRead(d *schema.ResourceData, func resourceAlicloudCenTransitRouterPeerAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) cbnService := CbnService{client} + conn, err := client.NewCbnClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false parts, err1 := ParseResourceId(d.Id(), 2) @@ -249,10 +262,6 @@ func resourceAlicloudCenTransitRouterPeerAttachmentUpdate(d *schema.ResourceData request["DryRun"] = d.Get("dry_run") } action := "UpdateTransitRouterPeerAttachmentAttribute" - conn, err := client.NewCbnClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-12"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_route_table.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_route_table.go index c9d5a52a833..a45baea5865 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_route_table.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_route_table.go @@ -135,6 +135,10 @@ func resourceAlicloudCenTransitRouterRouteTableRead(d *schema.ResourceData, meta func resourceAlicloudCenTransitRouterRouteTableUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) cbnService := CbnService{client} + conn, err := client.NewCbnClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} parts, err1 := ParseResourceId(d.Id(), 2) if err1 != nil { @@ -157,10 +161,6 @@ func resourceAlicloudCenTransitRouterRouteTableUpdate(d *schema.ResourceData, me request["DryRun"] = d.Get("dry_run") } action := "UpdateTransitRouterRouteTable" - conn, err := client.NewCbnClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-12"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_vbr_attachment.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_vbr_attachment.go index 688e8490f14..62b7a4ddccc 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_vbr_attachment.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_vbr_attachment.go @@ -198,6 +198,10 @@ func resourceAlicloudCenTransitRouterVbrAttachmentRead(d *schema.ResourceData, m func resourceAlicloudCenTransitRouterVbrAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) cbnService := CbnService{client} + conn, err := client.NewCbnClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} parts, err1 := ParseResourceId(d.Id(), 2) if err1 != nil { @@ -228,10 +232,6 @@ func resourceAlicloudCenTransitRouterVbrAttachmentUpdate(d *schema.ResourceData, request["DryRun"] = d.Get("dry_run") } action := "UpdateTransitRouterVbrAttachmentAttribute" - conn, err := client.NewCbnClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-12"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_vpc_attachment.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_vpc_attachment.go index 854c6a76825..5656b8f30d9 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_vpc_attachment.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cen_transit_router_vpc_attachment.go @@ -239,6 +239,10 @@ func resourceAlicloudCenTransitRouterVpcAttachmentRead(d *schema.ResourceData, m func resourceAlicloudCenTransitRouterVpcAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) cbnService := CbnService{client} + conn, err := client.NewCbnClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false parts, err1 := ParseResourceId(d.Id(), 2) @@ -265,10 +269,6 @@ func resourceAlicloudCenTransitRouterVpcAttachmentUpdate(d *schema.ResourceData, request["DryRun"] = d.Get("dry_run") } action := "UpdateTransitRouterVpcAttachmentAttribute" - conn, err := client.NewCbnClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-12"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_click_house_db_cluster.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_click_house_db_cluster.go index 6cc9fea3a87..976adecf769 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_click_house_db_cluster.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_click_house_db_cluster.go @@ -40,6 +40,7 @@ func resourceAlicloudClickHouseDbCluster() *schema.Resource { "db_cluster_ip_array_attribute": { Type: schema.TypeString, Optional: true, + Removed: "Field 'db_cluster_ip_array_attribute' has been removed from provider", }, "db_cluster_ip_array_name": { Type: schema.TypeString, @@ -249,7 +250,7 @@ func resourceAlicloudClickHouseDbClusterRead(d *schema.ResourceData, meta interf dBClusterAccessWhiteListMaps := make([]map[string]interface{}, 0) for _, iPArrayListItem := range iPArrayList.([]interface{}) { if v, ok := iPArrayListItem.(map[string]interface{}); ok { - if v["DBClusterIPArrayName"].(string) == "default" { + if v["DBClusterIPArrayName"].(string) == "default" || v["DBClusterIPArrayName"].(string) == "dms" { continue } iPArrayListItemMap := make(map[string]interface{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_firewall_control_policy.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_firewall_control_policy.go index 27bcfcbdb33..81665760f76 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_firewall_control_policy.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_firewall_control_policy.go @@ -215,6 +215,10 @@ func resourceAlicloudCloudFirewallControlPolicyRead(d *schema.ResourceData, meta } func resourceAlicloudCloudFirewallControlPolicyUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewCloudfwClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} parts, err := ParseResourceId(d.Id(), 2) if err != nil { @@ -282,10 +286,6 @@ func resourceAlicloudCloudFirewallControlPolicyUpdate(d *schema.ResourceData, me request["SourceIp"] = v } action := "ModifyControlPolicy" - conn, err := client.NewCloudfwClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-12-07"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_access_configuration.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_access_configuration.go index 6cb0fe477fb..e27bb74e01f 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_access_configuration.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_access_configuration.go @@ -22,6 +22,11 @@ func resourceAlicloudCloudSsoAccessConfiguration() *schema.Resource { Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Update: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + }, Schema: map[string]*schema.Schema{ "access_configuration_id": { Type: schema.TypeString, @@ -31,7 +36,7 @@ func resourceAlicloudCloudSsoAccessConfiguration() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-z0-9-]{1,64}$`), "The name of the resource. The name must be 2 to 64 characters in length and can contain lower case letters, digits, and hyphens (-)."), + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-z0-9-]{1,32}$`), "The name of the resource. The name can be up to `32` characters long and can contain letters, digits, and hyphens (-)"), }, "description": { Type: schema.TypeString, @@ -58,9 +63,8 @@ func resourceAlicloudCloudSsoAccessConfiguration() *schema.Resource { Sensitive: true, }, "permission_policy_name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-z0-9-]{1,32}$`), "The name of the resource. The name must be 1 to 32 characters in length and can contain letters, digits, and hyphens (-)."), + Type: schema.TypeString, + Required: true, }, "permission_policy_type": { Type: schema.TypeString, diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_group.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_group.go index b3f4b3a0599..c7cd7bf2d8e 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_group.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_group.go @@ -41,7 +41,7 @@ func resourceAlicloudCloudSsoGroup() *schema.Resource { "group_name": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[\w-.]{1,128}$`), "The name of the resource. The name must be 1 to 128 characters in length and can contain letters, digits, underscores (_), and hyphens (-)."), + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[\w-.]{1,128}$`), "The name of the resource. The name must be 1 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-)."), }, }, } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_user.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_user.go index f6b35e85cee..5afb52bb27f 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_user.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_sso_user.go @@ -66,7 +66,7 @@ func resourceAlicloudCloudSsoUser() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[\w-.@]{1,64}$`), "The name of the resource. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-)."), + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[\w-.@]{1,64}$`), "The name of the resource. The name must be 1 to 64 characters in length and can contain letters, digits, at signs (@), periods (.), underscores (_), and hyphens (-)."), }, }, } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_storage_gateway_gateway.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_storage_gateway_gateway.go index 473eb13ef56..a5f34abd3bd 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_storage_gateway_gateway.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cloud_storage_gateway_gateway.go @@ -114,7 +114,6 @@ func resourceAlicloudCloudStorageGatewayGatewayCreate(d *schema.ResourceData, me } request["Location"] = d.Get("location") request["Name"] = d.Get("gateway_name") - fmt.Sprintf("gateway_name = %d\n", request["Name"]) if v, ok := d.GetOk("payment_type"); ok { request["PostPaid"] = convertCsgGatewayPaymentTypeReq(v.(string)) } @@ -454,6 +453,8 @@ func convertCsgGatewayPaymentTypeResp(source interface{}) interface{} { switch source { case true: return "PayAsYouGo" + case false: + return "Subscription" } return source } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cr_chart_namespace.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cr_chart_namespace.go new file mode 100644 index 00000000000..9db101ee403 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cr_chart_namespace.go @@ -0,0 +1,195 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudCrChartNamespace() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudCrChartNamespaceCreate, + Read: resourceAlicloudCrChartNamespaceRead, + Update: resourceAlicloudCrChartNamespaceUpdate, + Delete: resourceAlicloudCrChartNamespaceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "auto_create_repo": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "default_repo_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"PRIVATE", "PUBLIC"}, false), + }, + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "namespace_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAlicloudCrChartNamespaceCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateChartNamespace" + request := make(map[string]interface{}) + conn, err := client.NewAcrClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOkExists("auto_create_repo"); ok { + request["AutoCreateRepo"] = v + } + if v, ok := d.GetOk("default_repo_type"); ok { + request["DefaultRepoType"] = v + } + request["InstanceId"] = d.Get("instance_id") + request["NamespaceName"] = d.Get("namespace_name") + request["RegionId"] = client.RegionId + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_cr_chart_namespace", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["InstanceId"], ":", request["NamespaceName"])) + return resourceAlicloudCrChartNamespaceRead(d, meta) +} +func resourceAlicloudCrChartNamespaceRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + crService := CrService{client} + object, err := crService.DescribeCrChartNamespace(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_cr_chart_namespace crService.DescribeCrChartNamespace Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + d.Set("instance_id", parts[0]) + d.Set("namespace_name", parts[1]) + d.Set("auto_create_repo", object["AutoCreateRepo"]) + d.Set("default_repo_type", object["DefaultRepoType"]) + return nil +} +func resourceAlicloudCrChartNamespaceUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + conn, err := client.NewAcrClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + update := false + request := map[string]interface{}{ + "InstanceId": parts[0], + "NamespaceName": parts[1], + } + request["RegionId"] = client.RegionId + if d.HasChange("auto_create_repo") { + update = true + if v, ok := d.GetOkExists("auto_create_repo"); ok { + request["AutoCreateRepo"] = v + } + } + if d.HasChange("default_repo_type") { + update = true + if v, ok := d.GetOk("default_repo_type"); ok { + request["DefaultRepoType"] = v + } + } + if update { + action := "UpdateChartNamespace" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + return resourceAlicloudCrChartNamespaceRead(d, meta) +} +func resourceAlicloudCrChartNamespaceDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + action := "DeleteChartNamespace" + var response map[string]interface{} + conn, err := client.NewAcrClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "InstanceId": parts[0], + "NamespaceName": parts[1], + } + + request["RegionId"] = client.RegionId + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cr_chart_repository.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cr_chart_repository.go new file mode 100644 index 00000000000..a8db9e5302b --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cr_chart_repository.go @@ -0,0 +1,204 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudCrChartRepository() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudCrChartRepositoryCreate, + Read: resourceAlicloudCrChartRepositoryRead, + Update: resourceAlicloudCrChartRepositoryUpdate, + Delete: resourceAlicloudCrChartRepositoryDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "repo_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "repo_namespace_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "repo_type": { + Type: schema.TypeString, + Computed: true, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"PRIVATE", "PUBLIC"}, false), + }, + "summary": { + Type: schema.TypeString, + Optional: true, + }, + }, + } +} + +func resourceAlicloudCrChartRepositoryCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateChartRepository" + request := make(map[string]interface{}) + conn, err := client.NewAcrClient() + if err != nil { + return WrapError(err) + } + request["InstanceId"] = d.Get("instance_id") + request["RepoName"] = d.Get("repo_name") + request["RepoNamespaceName"] = d.Get("repo_namespace_name") + if v, ok := d.GetOk("repo_type"); ok { + request["RepoType"] = v + } + if v, ok := d.GetOk("summary"); ok { + request["Summary"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_cr_chart_repository", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["InstanceId"], ":", request["RepoNamespaceName"], ":", request["RepoName"])) + + return resourceAlicloudCrChartRepositoryRead(d, meta) +} +func resourceAlicloudCrChartRepositoryRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + crService := CrService{client} + object, err := crService.DescribeCrChartRepository(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_cr_chart_repository crService.DescribeCrChartRepository Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + parts, err := ParseResourceId(d.Id(), 3) + if err != nil { + return WrapError(err) + } + d.Set("repo_name", parts[2]) + d.Set("repo_namespace_name", parts[1]) + d.Set("instance_id", parts[0]) + d.Set("repo_type", object["RepoType"]) + d.Set("summary", object["Summary"]) + return nil +} +func resourceAlicloudCrChartRepositoryUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + conn, err := client.NewAcrClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + parts, err := ParseResourceId(d.Id(), 3) + if err != nil { + return WrapError(err) + } + update := false + request := map[string]interface{}{ + "RepoName": parts[2], + "RepoNamespaceName": parts[1], + "InstanceId": parts[0], + } + + if d.HasChange("repo_type") { + update = true + } + if v, ok := d.GetOk("repo_type"); ok { + request["RepoType"] = v + } + if d.HasChange("summary") { + update = true + if v, ok := d.GetOk("summary"); ok { + request["Summary"] = v + } + } + if update { + action := "UpdateChartRepository" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + return resourceAlicloudCrChartRepositoryRead(d, meta) +} +func resourceAlicloudCrChartRepositoryDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + parts, err := ParseResourceId(d.Id(), 3) + if err != nil { + return WrapError(err) + } + action := "DeleteChartRepository" + var response map[string]interface{} + conn, err := client.NewAcrClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "RepoName": parts[2], + "RepoNamespaceName": parts[1], + "InstanceId": parts[0], + } + + request["InstanceId"] = d.Get("instance_id") + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cr_endpoint_acl_policy.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cr_endpoint_acl_policy.go index c5c9683ca7d..43f0f0d196c 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cr_endpoint_acl_policy.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cr_endpoint_acl_policy.go @@ -20,6 +20,10 @@ func resourceAlicloudCrEndpointAclPolicy() *schema.Resource { Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, Schema: map[string]*schema.Schema{ "description": { Type: schema.TypeString, @@ -75,7 +79,7 @@ func resourceAlicloudCrEndpointAclPolicyCreate(d *schema.ResourceData, meta inte err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) if err != nil { - if NeedRetry(err) { + if IsExpectedErrors(err, []string{"SLB_SERVICE_ERROR"}) || NeedRetry(err) { wait() return resource.RetryableError(err) } @@ -139,7 +143,7 @@ func resourceAlicloudCrEndpointAclPolicyDelete(d *schema.ResourceData, meta inte err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) if err != nil { - if NeedRetry(err) { + if IsExpectedErrors(err, []string{"SLB_SERVICE_ERROR"}) || NeedRetry(err) { wait() return resource.RetryableError(err) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cs_kubernetes_addon.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cs_kubernetes_addon.go new file mode 100644 index 00000000000..5a5e5f633a8 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cs_kubernetes_addon.go @@ -0,0 +1,178 @@ +package alicloud + +import ( + "fmt" + "time" + + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +const ResourceAlicloudCSKubernetesAddon = "resourceAlicloudCSKubernetesAddon" + +func resourceAlicloudCSKubernetesAddon() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudCSKubernetesAddonCreate, + Read: resourceAlicloudCSKubernetesAddonRead, + Update: resourceAlicloudCSKubernetesAddonUpdate, + Delete: resourceAlicloudCSKubernetesAddonDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "cluster_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "version": { + Type: schema.TypeString, + Required: true, + }, + "next_version": { + Type: schema.TypeString, + Computed: true, + }, + "can_upgrade": { + Type: schema.TypeBool, + Computed: true, + }, + "required": { + Type: schema.TypeBool, + Computed: true, + }, + }, + } +} + +func resourceAlicloudCSKubernetesAddonRead(d *schema.ResourceData, meta interface{}) error { + client, err := meta.(*connectivity.AliyunClient).NewRoaCsClient() + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "InitializeClient", err) + } + csClient := CsClient{client} + + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + + addon, err := csClient.DescribeCsKubernetesAddon(d.Id()) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "DescribeCsKubernetesAddon", err) + } + + d.Set("cluster_id", parts[0]) + d.Set("name", addon.ComponentName) + d.Set("version", addon.Version) + d.Set("next_version", addon.NextVersion) + d.Set("can_upgrade", addon.CanUpgrade) + d.Set("required", addon.Required) + + return nil +} + +func resourceAlicloudCSKubernetesAddonCreate(d *schema.ResourceData, meta interface{}) error { + clusterId := d.Get("cluster_id").(string) + name := d.Get("name").(string) + version := d.Get("version").(string) + + client, err := meta.(*connectivity.AliyunClient).NewRoaCsClient() + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "InitializeClient", err) + } + csClient := CsClient{client} + + status, err := csClient.DescribeCsKubernetesAddonStatus(clusterId, name) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "DescribeCsKubernetesAddonStatus", err) + } + + changed := false + + if status.Version == "" { + // Addon not installed + changed = true + err := csClient.installAddon(d) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "installAddon", err) + } + } else if status.Version != "" && status.Version != version { + // Addon has been installed + changed = true + err := csClient.upgradeAddon(d) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "upgradeAddon", err) + } + } + + d.SetId(fmt.Sprintf("%s%s%s", clusterId, COLON_SEPARATED, name)) + + stateConf := BuildStateConf([]string{"running", "Upgrading", "Pause"}, []string{"Success"}, d.Timeout(schema.TimeoutCreate), 10*time.Second, csClient.CsKubernetesAddonStateRefreshFunc(clusterId, name, []string{"Failed", "Canceled"})) + if changed { + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "WaitForSuccessAfterCreate", d.Id()) + } + } + return resourceAlicloudCSKubernetesAddonRead(d, meta) +} + +func resourceAlicloudCSKubernetesAddonUpdate(d *schema.ResourceData, meta interface{}) error { + client, err := meta.(*connectivity.AliyunClient).NewRoaCsClient() + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "InitializeClient", err) + } + csClient := CsClient{client} + + if d.HasChange("version") { + clusterId := d.Get("cluster_id").(string) + name := d.Get("name").(string) + + err := csClient.upgradeAddon(d) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "upgradeAddon", err) + } + + stateConf := BuildStateConf([]string{"running", "Upgrading", "Pause"}, []string{"Success"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, csClient.CsKubernetesAddonStateRefreshFunc(clusterId, name, []string{"Failed", "Canceled"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "WaitForSuccessAfterUpdate", d.Id()) + } + } + + return resourceAlicloudCSKubernetesAddonRead(d, meta) +} + +func resourceAlicloudCSKubernetesAddonDelete(d *schema.ResourceData, meta interface{}) error { + clusterId := d.Get("cluster_id").(string) + name := d.Get("name").(string) + + client, err := meta.(*connectivity.AliyunClient).NewRoaCsClient() + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "InitializeClient", err) + } + csClient := CsClient{client} + + err = csClient.uninstallAddon(d) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "uninstallAddon", err) + } + + stateConf := BuildStateConf([]string{"running", "Upgrading", "Pause"}, []string{"Success"}, d.Timeout(schema.TimeoutDelete), 10*time.Second, csClient.CsKubernetesAddonStateRefreshFunc(clusterId, name, []string{"Failed", "Canceled"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "WaitForSuccessAfterDelete", d.Id()) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cs_kubernetes_node_pool.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cs_kubernetes_node_pool.go index 9093c029fc5..6ff891a4fee 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cs_kubernetes_node_pool.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_cs_kubernetes_node_pool.go @@ -49,7 +49,14 @@ func resourceAlicloudCSKubernetesNodePool() *schema.Resource { Type: schema.TypeInt, Optional: true, Computed: true, - ConflictsWith: []string{"instances"}, + ConflictsWith: []string{"instances", "desired_size"}, + Deprecated: "Field 'node_count' has been deprecated from provider version 1.158.0. New field 'desired_size' instead.", + }, + "desired_size": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ConflictsWith: []string{"instances", "node_count"}, }, "vpc_id": { Type: schema.TypeString, @@ -301,7 +308,6 @@ func resourceAlicloudCSKubernetesNodePool() *schema.Resource { "scaling_config": { Type: schema.TypeList, Optional: true, - Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -396,7 +402,7 @@ func resourceAlicloudCSKubernetesNodePool() *schema.Resource { Type: schema.TypeString, }, MaxItems: 100, - ConflictsWith: []string{"node_count", "scaling_config"}, + ConflictsWith: []string{"node_count", "scaling_config", "desired_size"}, }, "keep_instance_name": { Type: schema.TypeBool, @@ -435,6 +441,12 @@ func resourceAlicloudCSKubernetesNodePool() *schema.Resource { Computed: true, ForceNew: true, }, + "deployment_set_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, }, } } @@ -513,7 +525,6 @@ func resourceAlicloudCSNodePoolUpdate(d *schema.ResourceData, meta interface{}) if d.HasChange("node_count") { oldV, newV := d.GetChange("node_count") - oldValue, ok := oldV.(int) if ok != true { return WrapErrorf(fmt.Errorf("node_count old value can not be parsed"), "parseError %d", oldValue) @@ -569,14 +580,22 @@ func resourceAlicloudCSNodePoolUpdate(d *schema.ResourceData, meta interface{}) } } + if d.HasChange("desired_size") { + update = true + size := int64(d.Get("desired_size").(int)) + args.ScalingGroup.DesiredSize = &size + } + + if v, ok := d.GetOk("install_cloud_monitor"); ok && v != nil { + args.CmsEnabled = v.(bool) + } if d.HasChange("install_cloud_monitor") { update = true args.CmsEnabled = d.Get("install_cloud_monitor").(bool) } - if d.HasChange("unschedulable") { - update = true - args.Unschedulable = d.Get("unschedulable").(bool) + if v, ok := d.GetOk("unschedulable"); ok { + args.Unschedulable = v.(bool) } if d.HasChange("instance_types") { @@ -647,6 +666,14 @@ func resourceAlicloudCSNodePoolUpdate(d *schema.ResourceData, meta interface{}) args.KubernetesConfig.NodeNameMode = d.Get("node_name_mode").(string) } + if v, ok := d.GetOk("user_data"); ok && v != nil { + _, base64DecodeError := base64.StdEncoding.DecodeString(v.(string)) + if base64DecodeError == nil { + args.KubernetesConfig.UserData = v.(string) + } else { + args.KubernetesConfig.UserData = base64.StdEncoding.EncodeToString([]byte(v.(string))) + } + } if d.HasChange("user_data") { update = true if v := d.Get("user_data").(string); v != "" { @@ -659,6 +686,9 @@ func resourceAlicloudCSNodePoolUpdate(d *schema.ResourceData, meta interface{}) } } + if v, ok := d.GetOk("scaling_config"); ok && v != nil { + args.AutoScaling = setAutoScalingConfig(v.([]interface{})) + } if d.HasChange("scaling_config") { update = true if v, ok := d.GetOk("scaling_config"); ok { @@ -722,7 +752,7 @@ func resourceAlicloudCSNodePoolUpdate(d *schema.ResourceData, meta interface{}) addDebug("UpdateKubernetesNodePool", resoponse, resizeRequestMap) } - stateConf := BuildStateConf([]string{"scaling", "updating"}, []string{"active"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, csService.CsKubernetesNodePoolStateRefreshFunc(d.Id(), []string{"deleting", "failed"})) + stateConf := BuildStateConf([]string{"scaling", "updating", "removing"}, []string{"active"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, csService.CsKubernetesNodePoolStateRefreshFunc(d.Id(), []string{"deleting", "failed"})) if _, err := stateConf.WaitForState(); err != nil { return WrapErrorf(err, IdMsg, d.Id()) @@ -755,7 +785,7 @@ func resourceAlicloudCSNodePoolUpdate(d *schema.ResourceData, meta interface{}) return resource.NonRetryableError(err) } - if nodePoolDetail.TotalNodes != d.Get("node_count").(int) { + if nodePoolDetail.TotalNodes != d.Get("node_count").(int) && nodePoolDetail.TotalNodes != d.Get("desired_size").(int) { time.Sleep(20 * time.Second) return resource.RetryableError(Error("[ERROR] The number of nodes is inconsistent %s", d.Id())) } @@ -808,6 +838,12 @@ func resourceAlicloudCSNodePoolRead(d *schema.ResourceData, meta interface{}) er d.Set("security_group_ids", object.ScalingGroup.SecurityGroupIds) d.Set("runtime_name", object.Runtime) d.Set("runtime_version", object.RuntimeVersion) + d.Set("deployment_set_id", object.DeploymentSetId) + + if object.DesiredSize != nil { + d.Set("desired_size", *object.DesiredSize) + } + if object.InstanceChargeType == "PrePaid" { d.Set("period", object.Period) d.Set("period_unit", object.PeriodUnit) @@ -941,7 +977,6 @@ func buildNodePoolArgs(d *schema.ResourceData, meta interface{}) (*cs.CreateNode creationArgs := &cs.CreateNodePoolRequest{ RegionId: common.Region(client.RegionId), - Count: int64(d.Get("node_count").(int)), NodePoolInfo: cs.NodePoolInfo{ Name: d.Get("name").(string), NodePoolType: "ess", // hard code the type @@ -963,6 +998,15 @@ func buildNodePoolArgs(d *schema.ResourceData, meta interface{}) (*cs.CreateNode }, } + if v, ok := d.GetOkExists("node_count"); ok { + creationArgs.Count = int64(v.(int)) + } + + if v, ok := d.GetOkExists("desired_size"); ok { + size := int64(v.(int)) + creationArgs.DesiredSize = &size + } + setNodePoolDataDisks(&creationArgs.ScalingGroup, d) setNodePoolTags(&creationArgs.ScalingGroup, d) setNodePoolTaints(&creationArgs.KubernetesConfig, d) @@ -978,6 +1022,10 @@ func buildNodePoolArgs(d *schema.ResourceData, meta interface{}) (*cs.CreateNode } } + if v, ok := d.GetOk("deployment_set_id"); ok { + creationArgs.DeploymentSetId = v.(string) + } + if v, ok := d.GetOk("install_cloud_monitor"); ok { creationArgs.CmsEnabled = v.(bool) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_db_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_db_instance.go index d1c0e0e5c22..a8a750413a0 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_db_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_db_instance.go @@ -2,6 +2,7 @@ package alicloud import ( "fmt" + "log" "strings" "time" @@ -216,6 +217,53 @@ func resourceAlicloudDBInstance() *schema.Resource { Optional: true, Computed: true, }, + "pg_hba_conf": { + Type: schema.TypeSet, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + }, + "mask": { + Type: schema.TypeString, + Optional: true, + // if attribute contains Optional feature, need to add Default: "", otherwise when terraform plan is executed, unmodified items wil detect differences. + Default: "", + }, + "database": { + Type: schema.TypeString, + Required: true, + }, + "priority_id": { + Type: schema.TypeInt, + Required: true, + }, + "address": { + Type: schema.TypeString, + Required: true, + }, + "user": { + Type: schema.TypeString, + Required: true, + }, + "method": { + Type: schema.TypeString, + Required: true, + }, + "option": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + }, + }, + Optional: true, + Computed: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return d.Get("engine").(string) != string(PostgreSQL) + }, + }, "force_restart": { Type: schema.TypeBool, Optional: true, @@ -450,7 +498,12 @@ func resourceAlicloudDBInstanceUpdate(d *schema.ResourceData, meta interface{}) return WrapError(err) } } - + if d.HasChange("pg_hba_conf") { + err := rdsService.ModifyPgHbaConfig(d, "pg_hba_conf") + if err != nil { + return WrapError(err) + } + } if err := rdsService.setInstanceTags(d); err != nil { return WrapError(err) } @@ -1279,6 +1332,11 @@ func resourceAlicloudDBInstanceRead(d *schema.ResourceData, meta interface{}) er if err = rdsService.RefreshParameters(d, "parameters"); err != nil { return WrapError(err) } + if instance["Engine"].(string) == string(PostgreSQL) && instance["DBInstanceStorageType"].(string) != "local_ssd" { + if err = rdsService.RefreshPgHbaConf(d, "pg_hba_conf"); err != nil { + return WrapError(err) + } + } if err = rdsService.SetTimeZone(d); err != nil { return WrapError(err) } @@ -1364,7 +1422,8 @@ func resourceAlicloudDBInstanceDelete(d *schema.ResourceData, meta interface{}) return WrapError(err) } if PayType(instance["PayType"].(string)) == Prepaid { - return WrapError(Error("At present, 'Prepaid' instance cannot be deleted and must wait it to be expired and release it automatically.")) + log.Printf("[WARN] Cannot destroy Subscription resource: alicloud_db_instance. Terraform will remove this resource from the state file, however resources may remain.") + return nil } action := "DeleteDBInstance" request := map[string]interface{}{ diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_instance.go index b6606032fc3..df0ba58ec71 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_instance.go @@ -27,14 +27,6 @@ func resourceAlicloudDbfsInstance() *schema.Resource { Delete: schema.DefaultTimeout(5 * time.Minute), }, Schema: map[string]*schema.Schema{ - "attach_mode": { - Type: schema.TypeString, - Optional: true, - }, - "attach_point": { - Type: schema.TypeString, - Optional: true, - }, "category": { Type: schema.TypeString, Optional: true, @@ -47,8 +39,9 @@ func resourceAlicloudDbfsInstance() *schema.Resource { Optional: true, }, "ecs_list": { - Type: schema.TypeSet, - Optional: true, + Type: schema.TypeSet, + Optional: true, + Deprecated: "Field 'ecs_list' has been deprecated from provider version 1.156.0 and it will be removed in the future version. Please use the new resource 'alicloud_dbfs_instance_attachment' to attach ECS and DBFS.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "ecs_id": { @@ -102,10 +95,6 @@ func resourceAlicloudDbfsInstance() *schema.Resource { Computed: true, }, "tags": tagsSchema(), - "used_scene": { - Type: schema.TypeString, - Optional: true, - }, "zone_id": { Type: schema.TypeString, Required: true, @@ -149,9 +138,6 @@ func resourceAlicloudDbfsInstanceCreate(d *schema.ResourceData, meta interface{} if v, ok := d.GetOk("snapshot_id"); ok { request["SnapshotId"] = v } - if v, ok := d.GetOk("used_scene"); ok { - request["UsedScene"] = v - } request["ZoneId"] = d.Get("zone_id") request["ClientToken"] = buildClientToken("CreateDbfs") runtime := util.RuntimeOptions{} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_instance_attachment.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_instance_attachment.go new file mode 100644 index 00000000000..38eb44dd5d2 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_instance_attachment.go @@ -0,0 +1,155 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudDbfsInstanceAttachment() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudDbfsInstanceAttachmentCreate, + Read: resourceAlicloudDbfsInstanceAttachmentRead, + Delete: resourceAlicloudDbfsInstanceAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "ecs_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAlicloudDbfsInstanceAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AttachDbfs" + request := make(map[string]interface{}) + conn, err := client.NewDbfsClient() + if err != nil { + return WrapError(err) + } + request["ECSInstanceId"] = d.Get("ecs_id") + request["FsId"] = d.Get("instance_id") + + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-04-18"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_dbfs_instance_attachment", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["FsId"], ":", request["ECSInstanceId"])) + dbfsService := DbfsService{client} + stateConf := BuildStateConf([]string{}, []string{"attached"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, dbfsService.DbfsInstanceStateRefreshFunc(fmt.Sprint(request["FsId"]), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudDbfsInstanceAttachmentRead(d, meta) +} +func resourceAlicloudDbfsInstanceAttachmentRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dbfsService := DbfsService{client} + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + object, err := dbfsService.DescribeDbfsInstanceAttachment(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_dbfs_instance_attachment dbfsService.DescribeDbfsInstanceAttachment Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("status", object["Status"]) + d.Set("instance_id", object["FsId"]) + if ecsListList, ok := object["EcsList"]; ok && ecsListList != nil { + for _, ecsListListItem := range ecsListList.([]interface{}) { + if ecsListListItemMap, ok := ecsListListItem.(map[string]interface{}); ok { + if ok && ecsListListItemMap["EcsId"] == parts[1] { + d.Set("ecs_id", ecsListListItemMap["EcsId"]) + break + } + } + } + } + return nil +} + +func resourceAlicloudDbfsInstanceAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dbfsService := DbfsService{client} + action := "DetachDbfs" + var response map[string]interface{} + conn, err := client.NewDbfsClient() + if err != nil { + return WrapError(err) + } + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "FsId": parts[0], + "ECSInstanceId": parts[1], + } + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-04-18"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"unattached"}, d.Timeout(schema.TimeoutDelete), 5*time.Second, dbfsService.DbfsInstanceStateRefreshFunc(parts[0], []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_service_linked_role.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_service_linked_role.go new file mode 100644 index 00000000000..e75557aa79d --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_service_linked_role.go @@ -0,0 +1,120 @@ +package alicloud + +import ( + "log" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudDbfsServiceLinkedRole() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudDbfsServiceLinkedRoleCreate, + Read: resourceAlicloudDbfsServiceLinkedRoleRead, + Delete: resourceAlicloudDbfsServiceLinkedRoleDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "product_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + "AliyunServiceRoleForDbfs", + }, false), + }, + "status": { + Type: schema.TypeBool, + Computed: true, + }, + }, + } +} +func resourceAlicloudDbfsServiceLinkedRoleCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateServiceLinkedRole" + request := map[string]interface{}{} + conn, err := client.NewDbfsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 5*time.Second) + request["ClientToken"] = buildClientToken("CreateServiceLinkedRole") + err = resource.Retry(3*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-04-18"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + d.SetId(d.Get("product_name").(string)) + if err != nil { + if IsExpectedErrors(err, []string{"EntityAlreadyExist.Role"}) { + return resourceAlicloudDbfsServiceLinkedRoleRead(d, meta) + } + return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_dbfs_service_linked_role", action, AlibabaCloudSdkGoERROR) + } + return resourceAlicloudDbfsServiceLinkedRoleRead(d, meta) +} + +func resourceAlicloudDbfsServiceLinkedRoleRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dbfsService := DbfsService{client} + object, err := dbfsService.DescribeDbfsServiceLinkedRole(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_dbfs_event_bus dbfsService.DescribeDbfsServiceLinkedRole Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("product_name", d.Id()) + d.Set("status", object["DbfsLinkedRole"]) + return nil +} + +func resourceAlicloudDbfsServiceLinkedRoleDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteServiceLinkedRole" + var response map[string]interface{} + conn, err := client.NewResourcemanagerClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "RoleName": d.Id(), + } + wait := incrementalWait(3*time.Second, 0*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-03-31"), StringPointer("AK"), request, nil, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"EntityNotExist.Role"}) { + return nil + } + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_snapshot.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_snapshot.go new file mode 100644 index 00000000000..55bd0ef9dd6 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dbfs_snapshot.go @@ -0,0 +1,178 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudDbfsSnapshot() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudDbfsSnapshotCreate, + Read: resourceAlicloudDbfsSnapshotRead, + Update: resourceAlicloudDbfsSnapshotUpdate, + Delete: resourceAlicloudDbfsSnapshotDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(1 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.All(validation.StringLenBetween(2, 256), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It must be `2` to `256` characters in length and cannot start with `https://` or `https://`.")), + }, + "force": { + Type: schema.TypeBool, + Optional: true, + }, + "instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "retention_days": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 65536), + }, + "snapshot_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.All(validation.StringMatch(regexp.MustCompile(`^[a-zA-Z][A-Za-z0-9:_-]{1,127}$`), "The name must be `2` to `128` characters in length and can contain digits, colons (:), underscores (_), and hyphens (-)."), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)|(^auto.*)`), "It must cannot start with `https://`, `https://` and `auto`.")), + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudDbfsSnapshotCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateSnapshot" + request := make(map[string]interface{}) + conn, err := client.NewDbfsClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + request["FsId"] = d.Get("instance_id") + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("retention_days"); ok { + request["RetentionDays"] = v + } + if v, ok := d.GetOk("snapshot_name"); ok { + request["SnapshotName"] = v + } + request["ClientToken"] = buildClientToken("CreateSnapshot") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-04-18"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_dbfs_snapshot", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["SnapshotId"])) + dbfsService := DbfsService{client} + stateConf := BuildStateConf([]string{}, []string{"accomplished"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, dbfsService.DbfsSnapshotStateRefreshFunc(d.Id(), []string{"failed"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudDbfsSnapshotRead(d, meta) +} +func resourceAlicloudDbfsSnapshotRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dbfsService := DbfsService{client} + object, err := dbfsService.DescribeDbfsSnapshot(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_dbfs_snapshot dbfsService.DescribeDbfsSnapshot Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("description", object["Description"]) + if v, ok := object["RetentionDays"]; ok && fmt.Sprint(v) != "0" { + d.Set("retention_days", formatInt(v)) + } + d.Set("snapshot_name", object["SnapshotName"]) + d.Set("status", object["Status"]) + d.Set("instance_id", object["SourceFsId"]) + return nil +} +func resourceAlicloudDbfsSnapshotUpdate(d *schema.ResourceData, meta interface{}) error { + log.Println(fmt.Sprintf("[WARNING] The resouce has not update operation.")) + return resourceAlicloudDbfsSnapshotRead(d, meta) +} +func resourceAlicloudDbfsSnapshotDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dbfsService := DbfsService{client} + action := "DeleteSnapshot" + var response map[string]interface{} + conn, err := client.NewDbfsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "SnapshotId": d.Id(), + } + + if v, ok := d.GetOkExists("force"); ok { + request["Force"] = v + } + request["RegionId"] = client.RegionId + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-04-18"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, dbfsService.DbfsSnapshotStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dcdn_domain.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dcdn_domain.go index e1084730c3c..84327332b66 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dcdn_domain.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dcdn_domain.go @@ -455,6 +455,10 @@ func resourceAlicloudDcdnDomainUpdate(d *schema.ResourceData, meta interface{}) } } d.Partial(false) + stateConf := BuildStateConf([]string{}, []string{"online"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, dcdnService.DcdnDomainStateRefreshFunc(d.Id(), []string{"check_failed", "configure_failed"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } return resourceAlicloudDcdnDomainRead(d, meta) } func resourceAlicloudDcdnDomainDelete(d *schema.ResourceData, meta interface{}) error { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dcdn_ipa_domain.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dcdn_ipa_domain.go new file mode 100644 index 00000000000..6e46687f847 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dcdn_ipa_domain.go @@ -0,0 +1,326 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudDcdnIpaDomain() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudDcdnIpaDomainCreate, + Read: resourceAlicloudDcdnIpaDomainRead, + Update: resourceAlicloudDcdnIpaDomainUpdate, + Delete: resourceAlicloudDcdnIpaDomainDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "domain_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "resource_group_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"domestic", "global", "overseas"}, false), + }, + "sources": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "content": { + Type: schema.TypeString, + Required: true, + }, + "port": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(0, 65535), + }, + "priority": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"20", "30"}, false), + }, + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"ipaddr", "domain"}, false), + }, + "weight": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(0, 100), + }, + }, + }, + }, + "status": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"offline", "online"}, false), + }, + }, + } +} + +func resourceAlicloudDcdnIpaDomainCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dcdnService := DcdnService{client} + var response map[string]interface{} + action := "AddDcdnIpaDomain" + request := make(map[string]interface{}) + conn, err := client.NewDcdnClient() + if err != nil { + return WrapError(err) + } + request["DomainName"] = d.Get("domain_name") + if v, ok := d.GetOk("resource_group_id"); ok { + request["ResourceGroupId"] = v + } + if v, ok := d.GetOk("scope"); ok { + request["Scope"] = v + } + sources, err := dcdnService.convertSourcesToString(d.Get("sources").(*schema.Set).List()) + if err != nil { + return WrapError(err) + } + request["Sources"] = sources + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_dcdn_ipa_domain", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["DomainName"])) + stateConf := BuildStateConf([]string{}, []string{"online"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, dcdnService.DcdnIpaDomainStateRefreshFunc(d.Id(), []string{"check_failed", "configure_failed"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudDcdnIpaDomainRead(d, meta) +} +func resourceAlicloudDcdnIpaDomainRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dcdnService := DcdnService{client} + object, err := dcdnService.DescribeDcdnIpaDomain(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_dcdn_ipa_domain dcdnService.DescribeDcdnIpaDomain Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + + d.Set("domain_name", d.Id()) + d.Set("resource_group_id", object["ResourceGroupId"]) + d.Set("scope", object["Scope"]) + if v, ok := object["Sources"]; ok { + sources := v.(map[string]interface{}) + if sources, ok := sources["Source"]; ok { + sourceMap := sources.([]interface{}) + sourceMaps := make([]map[string]interface{}, 0) + for _, val := range sourceMap { + item := val.(map[string]interface{}) + temp := map[string]interface{}{ + "content": item["Content"], + "port": formatInt(item["Port"]), + "priority": item["Priority"], + "type": item["Type"], + "weight": formatInt(item["Weight"]), + } + sourceMaps = append(sourceMaps, temp) + } + d.Set("sources", sourceMaps) + } + } + d.Set("status", object["DomainStatus"]) + return nil +} +func resourceAlicloudDcdnIpaDomainUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dcdnService := DcdnService{client} + conn, err := client.NewDcdnClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + update := false + request := map[string]interface{}{ + "DomainName": d.Id(), + } + d.Partial(true) + if d.HasChange("resource_group_id") { + update = true + if v, ok := d.GetOk("resource_group_id"); ok { + request["ResourceGroupId"] = v + } + } + if d.HasChange("sources") { + update = true + sources, err := dcdnService.convertSourcesToString(d.Get("sources").(*schema.Set).List()) + if err != nil { + return WrapError(err) + } + request["Sources"] = sources + } + if update { + action := "UpdateDcdnIpaDomain" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"online"}, d.Timeout(schema.TimeoutUpdate), 3*time.Second, dcdnService.DcdnIpaDomainStateRefreshFunc(d.Id(), []string{"configure_failed"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("resource_group_id") + d.SetPartial("sources") + } + + if d.HasChange("status") { + object, err := dcdnService.DescribeDcdnIpaDomain(d.Id()) + if err != nil { + return WrapError(err) + } + target := d.Get("status").(string) + if object["DomainStatus"].(string) != target { + if target == "offline" { + request := map[string]interface{}{ + "DomainName": d.Id(), + } + action := "StopDcdnIpaDomain" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + return nil + }) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"offline"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, dcdnService.DcdnIpaDomainStateRefreshFunc(d.Id(), []string{"configure_failed", "check_failed"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + if target == "online" { + request := map[string]interface{}{ + "DomainName": d.Id(), + } + action := "StartDcdnIpaDomain" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + return nil + }) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"online"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, dcdnService.DcdnIpaDomainStateRefreshFunc(d.Id(), []string{"configure_failed", "check_failed"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + d.SetPartial("status") + } + } + d.Partial(false) + return resourceAlicloudDcdnIpaDomainRead(d, meta) +} +func resourceAlicloudDcdnIpaDomainDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dcdnService := DcdnService{client} + action := "DeleteDcdnIpaDomain" + var response map[string]interface{} + conn, err := client.NewDcdnClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "DomainName": d.Id(), + } + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 3*time.Second, dcdnService.DcdnIpaDomainStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_drds_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_drds_instance.go index a976210c8c1..0d28899254e 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_drds_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_drds_instance.go @@ -57,7 +57,7 @@ func resourceAlicloudDRDSInstance() *schema.Resource { "instance_series": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.StringInSlice([]string{"drds.sn1.4c8g", "drds.sn1.8c16g", "drds.sn1.16c32g", "drds.sn1.32c64g"}, false), + ValidateFunc: validation.StringInSlice([]string{"drds.sn1.4c8g", "drds.sn1.8c16g", "drds.sn1.16c32g", "drds.sn1.32c64g", "drds.sn2.4c16g", "drds.sn2.8c32g", "drds.sn2.16c64g"}, false), ForceNew: true, }, }, diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_migration_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_migration_instance.go new file mode 100644 index 00000000000..750276e5ad3 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_migration_instance.go @@ -0,0 +1,242 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudDtsMigrationInstance() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudDtsMigrationInstanceCreate, + Read: resourceAlicloudDtsMigrationInstanceRead, + Update: resourceAlicloudDtsMigrationInstanceUpdate, + Delete: resourceAlicloudDtsMigrationInstanceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "compute_unit": { + Type: schema.TypeInt, + Optional: true, + }, + "database_count": { + Type: schema.TypeInt, + Optional: true, + }, + "sync_architecture": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"oneway"}, false), + }, + "destination_endpoint_engine_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"MySQL", "PolarDB", "polardb_o", "polardb_pg", "Redis", "DRDS", "PostgreSQL", "odps", "oracle", "mongodb", "tidb", "ADS", "ADB30", "Greenplum", "MSSQL", "kafka", "DataHub", "clickhouse", "DB2", "as400", "Tablestore"}, false), + }, + "destination_endpoint_region": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "source_endpoint_engine_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"MySQL", "PolarDB", "polardb_o", "polardb_pg", "Redis", "DRDS", "PostgreSQL", "odps", "oracle", "mongodb", "tidb", "ADS", "ADB30", "Greenplum", "MSSQL", "kafka", "DataHub", "clickhouse", "DB2", "as400", "Tablestore"}, false), + }, + "source_endpoint_region": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "instance_class": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"xxlarge", "xlarge", "large", "medium", "small"}, false), + }, + "payment_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"PayAsYouGo"}, false), + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "dts_instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), + }, + } +} + +func resourceAlicloudDtsMigrationInstanceCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateDtsInstance" + request := make(map[string]interface{}) + conn, err := client.NewDtsClient() + if err != nil { + return WrapError(err) + } + + request["AutoPay"] = false + request["AutoStart"] = true + request["InstanceClass"] = "small" + if v, ok := d.GetOk("instance_class"); ok { + request["InstanceClass"] = v + } + if v, ok := d.GetOk("compute_unit"); ok { + request["ComputeUnit"] = v + } + if v, ok := d.GetOk("database_count"); ok { + request["DatabaseCount"] = v + } + if v, ok := d.GetOk("destination_endpoint_engine_name"); ok { + request["DestinationEndpointEngineName"] = v + } + if v, ok := d.GetOk("destination_endpoint_region"); ok { + request["DestinationRegion"] = v + } + if v, ok := d.GetOk("payment_type"); ok { + request["PayType"] = convertDtsMigrationInstancePaymentTypeRequest(v.(string)) + } + + request["Quantity"] = 1 + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("source_endpoint_engine_name"); ok { + request["SourceEndpointEngineName"] = v + } + if v, ok := d.GetOk("source_endpoint_region"); ok { + request["SourceRegion"] = v + } + if v, ok := d.GetOk("sync_architecture"); ok { + request["SyncArchitecture"] = v + } + request["Type"] = "MIGRATION" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-01-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_dts_migration_instance", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["InstanceId"])) + + return resourceAlicloudDtsMigrationInstanceUpdate(d, meta) +} +func resourceAlicloudDtsMigrationInstanceRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dtsService := DtsService{client} + object, err := dtsService.DescribeDtsMigrationInstance(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_dts_migration_instance dtsService.DescribeDtsMigrationInstance Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + if v, ok := object["DestinationEndpoint"].(map[string]interface{}); ok { + d.Set("destination_endpoint_engine_name", v["EngineName"]) + d.Set("destination_endpoint_region", v["Region"]) + } + d.Set("instance_class", object["DtsJobClass"]) + d.Set("payment_type", convertDtsMigrationInstancePaymentTypeResponse(object["PayType"])) + if v, ok := object["SourceEndpoint"].(map[string]interface{}); ok { + d.Set("source_endpoint_engine_name", v["EngineName"]) + d.Set("source_endpoint_region", v["Region"]) + } + d.Set("status", object["Status"]) + d.Set("dts_instance_id", object["DtsInstanceID"]) + listTagResourcesObject, err := dtsService.ListTagResources(d.Id(), "ALIYUN::DTS::INSTANCE") + if err != nil { + return WrapError(err) + } + d.Set("tags", tagsToMap(listTagResourcesObject)) + return nil +} +func resourceAlicloudDtsMigrationInstanceUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dtsService := DtsService{client} + d.Partial(false) + + if d.HasChange("tags") { + if err := dtsService.SetResourceTags(d, "ALIYUN::DTS::INSTANCE"); err != nil { + return WrapError(err) + } + d.SetPartial("tags") + } + return resourceAlicloudDtsMigrationInstanceRead(d, meta) +} +func resourceAlicloudDtsMigrationInstanceDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteMigrationJob" + var response map[string]interface{} + conn, err := client.NewDtsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "MigrationJobId": d.Id(), + } + + request["RegionId"] = client.RegionId + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-01-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"Forbidden.InstanceNotFound", "InvalidJobId"}) { + return nil + } + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} +func convertDtsMigrationInstancePaymentTypeRequest(source interface{}) interface{} { + switch source { + case "PayAsYouGo": + return "PostPaid" + } + return source +} +func convertDtsMigrationInstancePaymentTypeResponse(source interface{}) interface{} { + switch source { + case "PostPaid": + return "PayAsYouGo" + } + return source +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_migration_job.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_migration_job.go new file mode 100644 index 00000000000..bb26d02a0b9 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_migration_job.go @@ -0,0 +1,477 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudDtsMigrationJob() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudDtsMigrationJobCreate, + Read: resourceAlicloudDtsMigrationJobRead, + Update: resourceAlicloudDtsMigrationJobUpdate, + Delete: resourceAlicloudDtsMigrationJobDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "dts_instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "data_initialization": { + Type: schema.TypeBool, + Required: true, + ForceNew: true, + }, + "data_synchronization": { + Type: schema.TypeBool, + Required: true, + ForceNew: true, + }, + "db_list": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "dts_job_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + "destination_endpoint_instance_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"RDS", "PolarDB", "POLARDBX20", "ADS", "MONGODB", "GREENPLUM", "DATAHUB", "OTHER", "ECS", "EXPRESS", "CEN", "DG"}, false), + }, + + "destination_endpoint_engine_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"ADS", "ADB30", "AS400", "DATAHUB", "DB2", "GREENPLUM", "KAFKA", "MONGODB", "MSSQL", "MySQL", "ORACLE", "PolarDB", "POLARDBX20", "POLARDB_O", "PostgreSQL"}, false), + }, + "destination_endpoint_instance_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "destination_endpoint_region": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "destination_endpoint_ip": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "destination_endpoint_port": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "destination_endpoint_database_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "destination_endpoint_user_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "destination_endpoint_password": { + Type: schema.TypeString, + Optional: true, + }, + "destination_endpoint_oracle_sid": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "source_endpoint_instance_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"CEN", "DG", "DISTRIBUTED_DMSLOGICDB", "ECS", "EXPRESS", "MONGODB", "OTHER", "PolarDB", "POLARDBX20", "RDS"}, false), + }, + "source_endpoint_instance_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "source_endpoint_engine_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"AS400", "DB2", "DMSPOLARDB", "HBASE", "MONGODB", "MSSQL", "MySQL", "ORACLE", "PolarDB", "POLARDBX20", "POLARDB_O", "POSTGRESQL", "TERADATA"}, false), + }, + "source_endpoint_region": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "source_endpoint_ip": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "source_endpoint_port": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "source_endpoint_oracle_sid": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "source_endpoint_database_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "source_endpoint_user_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "source_endpoint_password": { + Type: schema.TypeString, + Optional: true, + }, + "source_endpoint_owner_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "source_endpoint_role": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "structure_initialization": { + Type: schema.TypeBool, + Required: true, + ForceNew: true, + }, + "checkpoint": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "instance_class": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"xxlarge", "xlarge", "large", "medium", "small"}, false), + }, + "status": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"Suspending", "Migrating"}, false), + }, + }, + } +} + +func resourceAlicloudDtsMigrationJobCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "ConfigureDtsJob" + request := make(map[string]interface{}) + conn, err := client.NewDtsClient() + if err != nil { + return WrapError(err) + } + + if v, ok := d.GetOk("dts_job_name"); ok { + request["DtsJobName"] = v + } + if v, ok := d.GetOk("checkpoint"); ok { + request["Checkpoint"] = v + } + + request["DtsInstanceId"] = d.Get("dts_instance_id") + request["DataInitialization"] = d.Get("data_initialization") + request["DataSynchronization"] = d.Get("data_synchronization") + request["StructureInitialization"] = d.Get("structure_initialization") + request["DbList"] = d.Get("db_list") + + request["DestinationEndpointInstanceType"] = d.Get("destination_endpoint_instance_type") + request["DestinationEndpointEngineName"] = d.Get("destination_endpoint_engine_name") + if v, ok := d.GetOk("destination_endpoint_instance_id"); ok { + request["DestinationEndpointInstanceID"] = v + } + if v, ok := d.GetOk("destination_endpoint_region"); ok { + request["DestinationEndpointRegion"] = v + } + if v, ok := d.GetOk("destination_endpoint_ip"); ok { + request["DestinationEndpointIP"] = v + } + if v, ok := d.GetOk("destination_endpoint_port"); ok { + request["DestinationEndpointPort"] = v + } + if v, ok := d.GetOk("destination_endpoint_database_name"); ok { + request["DestinationEndpointDataBaseName"] = v + } + if v, ok := d.GetOk("destination_endpoint_user_name"); ok { + request["DestinationEndpointUserName"] = v + } + if v, ok := d.GetOk("destination_endpoint_password"); ok { + request["DestinationEndpointPassword"] = v + } + if v, ok := d.GetOk("destination_endpoint_oracle_sid"); ok { + request["DestinationEndpointOracleSID"] = v + } + + request["SourceEndpointInstanceType"] = d.Get("source_endpoint_instance_type") + request["SourceEndpointEngineName"] = d.Get("source_endpoint_engine_name") + if v, ok := d.GetOk("source_endpoint_instance_id"); ok { + request["SourceEndpointInstanceID"] = v + } + if v, ok := d.GetOk("source_endpoint_region"); ok { + request["SourceEndpointRegion"] = v + } + if v, ok := d.GetOk("source_endpoint_ip"); ok { + request["SourceEndpointIP"] = v + } + if v, ok := d.GetOk("source_endpoint_port"); ok { + request["SourceEndpointPort"] = v + } + if v, ok := d.GetOk("source_endpoint_oracle_sid"); ok { + request["SourceEndpointOracleSID"] = v + } + if v, ok := d.GetOk("source_endpoint_database_name"); ok { + request["SourceEndpointDatabaseName"] = v + } + if v, ok := d.GetOk("source_endpoint_password"); ok { + request["SourceEndpointPassword"] = v + } + if v, ok := d.GetOk("source_endpoint_user_name"); ok { + request["SourceEndpointUserName"] = v + } + if v, ok := d.GetOk("source_endpoint_owner_id"); ok { + request["SourceEndpointOwnerID"] = v + } + if v, ok := d.GetOk("source_endpoint_role"); ok { + request["SourceEndpointRole"] = v + } + + request["PayType"] = convertDtsMigrationJobPaymentTypeRequest(d.Get("payment_type")) + request["JobType"] = "MIGRATION" + request["RegionId"] = client.RegionId + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-01-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_dts_migration_instance", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["DtsJobId"])) + dtsService := DtsService{client} + stateConf := BuildStateConf([]string{}, []string{"PreCheckPass", "Migrating", "PrecheckFailed"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, dtsService.DtsMigrationJobStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudDtsMigrationJobUpdate(d, meta) +} +func resourceAlicloudDtsMigrationJobRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dtsService := DtsService{client} + object, err := dtsService.DescribeDtsMigrationJob(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_dts_migration_job dtsService.DescribeDtsMigrationJob Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("checkpoint", fmt.Sprint(object["Checkpoint"])) + if v, ok := object["MigrationMode"].(map[string]interface{}); ok { + d.Set("data_initialization", v["DataInitialization"]) + d.Set("data_synchronization", v["DataSynchronization"]) + d.Set("structure_initialization", v["StructureInitialization"]) + + } + d.Set("db_list", object["DbObject"]) + if v, ok := object["DestinationEndpoint"].(map[string]interface{}); ok { + d.Set("destination_endpoint_database_name", v["DatabaseName"]) + d.Set("destination_endpoint_engine_name", v["EngineName"]) + d.Set("destination_endpoint_ip", v["Ip"]) + d.Set("destination_endpoint_instance_id", v["InstanceID"]) + d.Set("destination_endpoint_instance_type", v["InstanceType"]) + d.Set("destination_endpoint_oracle_sid", v["OracleSID"]) + d.Set("destination_endpoint_port", v["Port"]) + d.Set("destination_endpoint_region", v["Region"]) + d.Set("destination_endpoint_user_name", v["UserName"]) + } + d.Set("dts_instance_id", object["DtsInstanceID"]) + d.Set("dts_job_name", object["DtsJobName"]) + d.Set("payment_type", convertDtsMigrationJobPaymentTypeResponse(object["PayType"])) + if v, ok := object["SourceEndpoint"].(map[string]interface{}); ok { + d.Set("source_endpoint_database_name", v["DatabaseName"]) + d.Set("source_endpoint_engine_name", v["EngineName"]) + d.Set("source_endpoint_ip", v["Ip"]) + d.Set("source_endpoint_instance_id", v["InstanceID"]) + d.Set("source_endpoint_instance_type", v["InstanceType"]) + d.Set("source_endpoint_oracle_sid", v["OracleSID"]) + d.Set("source_endpoint_owner_id", v["AliyunUid"]) + d.Set("source_endpoint_port", v["Port"]) + d.Set("source_endpoint_region", v["Region"]) + d.Set("source_endpoint_role", v["RoleName"]) + d.Set("source_endpoint_user_name", v["UserName"]) + } + d.Set("status", object["Status"]) + return nil +} +func resourceAlicloudDtsMigrationJobUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + dtsService := DtsService{client} + var response map[string]interface{} + d.Partial(false) + + if d.HasChange("status") { + object, err := dtsService.DescribeDtsMigrationJob(d.Id()) + if err != nil { + return WrapError(err) + } + target := d.Get("status").(string) + if object["Status"].(string) != target { + if target == "Migrating" { + request := map[string]interface{}{ + "DtsJobId": d.Id(), + } + request["RegionId"] = client.RegionId + action := "StartDtsJob" + conn, err := client.NewDtsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-01-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + + } + if target == "Suspending" { + request := map[string]interface{}{ + "DtsJobId": d.Id(), + } + request["RegionId"] = client.RegionId + action := "SuspendDtsJob" + conn, err := client.NewDtsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-01-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + d.SetPartial("status") + } + } + return resourceAlicloudDtsMigrationJobRead(d, meta) +} +func resourceAlicloudDtsMigrationJobDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteDtsJob" + var response map[string]interface{} + conn, err := client.NewDtsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "DtsJobId": d.Id(), + } + + request["RegionId"] = client.RegionId + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-01-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"Forbidden.InstanceNotFound", "InvalidJobId"}) { + return nil + } + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} +func convertDtsMigrationJobPaymentTypeRequest(source interface{}) interface{} { + switch source { + case "PayAsYouGo": + return "PostPaid" + } + return source +} +func convertDtsMigrationJobPaymentTypeResponse(source interface{}) interface{} { + switch source { + case "PostPaid": + return "PayAsYouGo" + } + return source +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_synchronization_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_synchronization_instance.go index 3e1c000fe13..2625581d342 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_synchronization_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_synchronization_instance.go @@ -65,7 +65,7 @@ func resourceAlicloudDtsSynchronizationInstance() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.StringInSlice([]string{"xxlarge", "xlarge", "large", "medium", "small"}, false), + ValidateFunc: validation.StringInSlice([]string{"xxlarge", "xlarge", "large", "medium", "small", "micro"}, false), }, "payment_type": { Type: schema.TypeString, diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_synchronization_job.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_synchronization_job.go index ab4e4e571d0..7e71df585c8 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_synchronization_job.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_dts_synchronization_job.go @@ -590,7 +590,7 @@ func resourceAlicloudDtsSynchronizationJobUpdate(d *schema.ResourceData, meta in } func resourceAlicloudDtsSynchronizationJobDelete(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) - action := "ResetDtsJob" + action := "DeleteDtsJob" var response map[string]interface{} conn, err := client.NewDtsClient() if err != nil { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_command.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_command.go index a4f19abb8fc..eebcbf0c4fb 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_command.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_command.go @@ -98,7 +98,7 @@ func resourceAlicloudEcdCommandCreate(d *schema.ResourceData, meta interface{}) if _, err := stateConf.WaitForState(); err != nil { return WrapErrorf(err, IdMsg, d.Id()) } - return resourceAlicloudEcdCommandUpdate(d, meta) + return resourceAlicloudEcdCommandRead(d, meta) } func resourceAlicloudEcdCommandRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_image.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_image.go index 8a7559dfa13..99fac801dbd 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_image.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_image.go @@ -109,6 +109,10 @@ func resourceAlicloudEcdImageRead(d *schema.ResourceData, meta interface{}) erro func resourceAlicloudEcdImageUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) var response map[string]interface{} + conn, err := client.NewGwsecdClient() + if err != nil { + return WrapError(err) + } update := false request := map[string]interface{}{ "ImageId": d.Id(), @@ -128,10 +132,6 @@ func resourceAlicloudEcdImageUpdate(d *schema.ResourceData, meta interface{}) er } if update { action := "ModifyImageAttribute" - conn, err := client.NewGwsecdClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-09-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_nas_file_system.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_nas_file_system.go index 307060d2b35..39c08cc45c1 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_nas_file_system.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_nas_file_system.go @@ -130,6 +130,10 @@ func resourceAlicloudEcdNasFileSystemRead(d *schema.ResourceData, meta interface func resourceAlicloudEcdNasFileSystemUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) ecdService := EcdService{client} + conn, err := client.NewGwsecdClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -143,10 +147,6 @@ func resourceAlicloudEcdNasFileSystemUpdate(d *schema.ResourceData, meta interfa } if update { action := "ResetNASDefaultMountTarget" - conn, err := client.NewGwsecdClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-09-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_simple_office_site.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_simple_office_site.go index 32b7230d440..c8be4267cf4 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_simple_office_site.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_simple_office_site.go @@ -179,6 +179,10 @@ func resourceAlicloudEcdSimpleOfficeSiteRead(d *schema.ResourceData, meta interf } func resourceAlicloudEcdSimpleOfficeSiteUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewGwsecdClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) update := false @@ -194,10 +198,6 @@ func resourceAlicloudEcdSimpleOfficeSiteUpdate(d *schema.ResourceData, meta inte if update { request["RegionId"] = client.RegionId action := "ModifyOfficeSiteCrossDesktopAccess" - conn, err := client.NewGwsecdClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-09-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -230,10 +230,6 @@ func resourceAlicloudEcdSimpleOfficeSiteUpdate(d *schema.ResourceData, meta inte if update { request["RegionId"] = client.RegionId action := "ModifyOfficeSiteMfaEnabled" - conn, err := client.NewGwsecdClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-09-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -266,10 +262,6 @@ func resourceAlicloudEcdSimpleOfficeSiteUpdate(d *schema.ResourceData, meta inte } if update { action := "SetOfficeSiteSsoStatus" - conn, err := client.NewGwsecdClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-09-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -308,10 +300,6 @@ func resourceAlicloudEcdSimpleOfficeSiteUpdate(d *schema.ResourceData, meta inte if update { request["RegionId"] = client.RegionId action := "ModifyOfficeSiteAttribute" - conn, err := client.NewGwsecdClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-09-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_user.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_user.go index 9db0fc30515..54aebc10652 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_user.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecd_user.go @@ -131,6 +131,10 @@ func resourceAlicloudEcdUserRead(d *schema.ResourceData, meta interface{}) error } func resourceAlicloudEcdUserUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewEdsuserClient() + if err != nil { + return WrapError(err) + } edsUserService := EdsUserService{client} var response map[string]interface{} d.Partial(true) @@ -146,12 +150,7 @@ func resourceAlicloudEcdUserUpdate(d *schema.ResourceData, meta interface{}) err request := map[string]interface{}{ "Users": []string{d.Id()}, } - action := "UnlockUsers" - conn, err := client.NewEdsuserClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2021-03-08"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -177,12 +176,7 @@ func resourceAlicloudEcdUserUpdate(d *schema.ResourceData, meta interface{}) err request := map[string]interface{}{ "Users": []string{d.Id()}, } - action := "LockUsers" - conn, err := client.NewEdsuserClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2021-03-08"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_eci_image_cache.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_eci_image_cache.go index 87f7d0fa080..b2e58da528b 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_eci_image_cache.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_eci_image_cache.go @@ -153,7 +153,7 @@ func resourceAlicloudEciImageCacheCreate(d *schema.ResourceData, meta interface{ addDebug(request.GetActionName(), raw) response, _ := raw.(*eci.CreateImageCacheResponse) d.SetId(fmt.Sprintf("%v", response.ImageCacheId)) - stateConf := BuildStateConf([]string{}, []string{"Ready"}, d.Timeout(schema.TimeoutCreate), 10*time.Second, eciService.EciImageCacheStateRefreshFunc(d.Id(), []string{"Failed"})) + stateConf := BuildStateConf([]string{"Preparing", "Creating"}, []string{"Ready"}, d.Timeout(schema.TimeoutCreate), 10*time.Second, eciService.EciImageCacheStateRefreshFunc(d.Id(), []string{"Failed"})) if _, err := stateConf.WaitForState(); err != nil { return WrapErrorf(err, IdMsg, d.Id()) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecp_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecp_instance.go new file mode 100644 index 00000000000..b20dfd32202 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecp_instance.go @@ -0,0 +1,418 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudEcpInstance() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudEcpInstanceCreate, + Read: resourceAlicloudEcpInstanceRead, + Update: resourceAlicloudEcpInstanceUpdate, + Delete: resourceAlicloudEcpInstanceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(3 * time.Minute), + Update: schema.DefaultTimeout(3 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "auto_pay": { + Type: schema.TypeBool, + Optional: true, + }, + "auto_renew": { + Type: schema.TypeBool, + Optional: true, + }, + "payment_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"PayAsYouGo", "Subscription"}, false), + }, + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.All(validation.StringLenBetween(2, 256), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It must be `2` to `256` characters in length and cannot start with `https://` or `https://`.")), + }, + "eip_bandwidth": { + Type: schema.TypeInt, + Optional: true, + }, + "force": { + Type: schema.TypeBool, + Optional: true, + }, + "image_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "instance_name": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.All(validation.StringLenBetween(2, 128), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It must be `2` to `256` characters in length and cannot start with `https://` or `https://`.")), + }, + "instance_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "key_pair_name": { + Type: schema.TypeString, + Optional: true, + }, + "period": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.IntInSlice([]int{1, 2, 3, 4, 5}), + }, + "period_unit": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"Year", "Month"}, false), + }, + "resolution": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "security_group_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"Running", "Stopped"}, false), + }, + "vswitch_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vnc_password": { + Type: schema.TypeString, + Sensitive: true, + Optional: true, + }, + }, + } +} + +func resourceAlicloudEcpInstanceCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "RunInstances" + request := make(map[string]interface{}) + conn, err := client.NewCloudphoneClient() + if err != nil { + return WrapError(err) + } + request["Amount"] = 1 + if v, ok := d.GetOkExists("auto_pay"); ok { + request["AutoPay"] = v + } + if v, ok := d.GetOkExists("auto_renew"); ok { + request["AutoRenew"] = v + } + if v, ok := d.GetOk("payment_type"); ok { + request["ChargeType"] = convertEcpSyncPaymentTypeRequest(v.(string)) + } + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + if v, ok := d.GetOk("eip_bandwidth"); ok { + request["EipBandwidth"] = v + } + request["ImageId"] = d.Get("image_id") + if v, ok := d.GetOk("instance_name"); ok { + request["InstanceName"] = v + } + request["InstanceType"] = d.Get("instance_type") + if v, ok := d.GetOk("key_pair_name"); ok { + request["KeyPairName"] = v + } + if v, ok := d.GetOk("period"); ok { + request["Period"] = v + } + if v, ok := d.GetOk("period_unit"); ok { + request["PeriodUnit"] = v + } + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("resolution"); ok { + request["Resolution"] = v + } + request["SecurityGroupId"] = d.Get("security_group_id") + request["VSwitchId"] = d.Get("vswitch_id") + request["ClientToken"] = buildClientToken("RunInstances") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_ecp_instance", action, AlibabaCloudSdkGoERROR) + } + responseInstanceIds := response["InstanceIds"].(map[string]interface{}) + cloudphoneService := CloudphoneService{client} + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, cloudphoneService.EcpInstanceStateRefreshFunc(fmt.Sprint(responseInstanceIds["InstanceId"].([]interface{})[0]), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetId(fmt.Sprint(responseInstanceIds["InstanceId"].([]interface{})[0])) + return resourceAlicloudEcpInstanceUpdate(d, meta) +} +func resourceAlicloudEcpInstanceRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + cloudphoneService := CloudphoneService{client} + object, err := cloudphoneService.DescribeEcpInstance(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_ecp_instance cloudphoneService.DescribeEcpInstance Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("description", object["Description"]) + d.Set("image_id", object["ImageId"]) + d.Set("instance_name", object["InstanceName"]) + d.Set("instance_type", object["InstanceType"]) + d.Set("payment_type", convertEcpSyncPaymentTypeResponse(object["ChargeType"])) + d.Set("key_pair_name", object["KeyPairName"]) + d.Set("resolution", object["Resolution"]) + d.Set("security_group_id", object["SecurityGroupId"]) + d.Set("status", object["Status"]) + d.Set("vswitch_id", object["VpcAttributes"].(map[string]interface{})["VSwitchId"]) + return nil +} +func resourceAlicloudEcpInstanceUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + cloudphoneService := CloudphoneService{client} + var response map[string]interface{} + d.Partial(true) + update := false + request := map[string]interface{}{ + "InstanceId": d.Id(), + } + request["RegionId"] = client.RegionId + if !d.IsNewResource() && d.HasChange("description") { + update = true + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + } + if !d.IsNewResource() && d.HasChange("instance_name") { + update = true + if v, ok := d.GetOk("instance_name"); ok { + request["InstanceName"] = v + } + } + if !d.IsNewResource() && d.HasChange("key_pair_name") { + update = true + if v, ok := d.GetOk("key_pair_name"); ok { + request["KeyPairName"] = v + } + } + if d.HasChange("vnc_password") { + update = true + if v, ok := d.GetOk("vnc_password"); ok { + request["VncPassword"] = v + } + } + if update { + action := "UpdateInstanceAttribute" + conn, err := client.NewCloudphoneClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + + d.SetPartial("description") + d.SetPartial("instance_name") + d.SetPartial("key_pair_name") + d.SetPartial("vnc_password") + } + + if d.HasChange("status") { + object, err := cloudphoneService.DescribeEcpInstance(d.Id()) + + if err != nil { + return WrapError(err) + } + target := d.Get("status").(string) + if object["Status"].(string) != "Running" { + if target == "Running" { + request := map[string]interface{}{ + "InstanceId": []string{d.Id()}, + } + request["RegionId"] = client.RegionId + action := "StartInstances" + conn, err := client.NewCloudphoneClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, cloudphoneService.EcpInstanceStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + + } + if object["Status"].(string) != "Stopped" { + if target == "Stopped" { + request := map[string]interface{}{ + "InstanceId": []string{d.Id()}, + } + request["RegionId"] = client.RegionId + if v, ok := d.GetOkExists("force"); ok { + request["Force"] = v + } + action := "StopInstances" + conn, err := client.NewCloudphoneClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"Stopped"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, cloudphoneService.EcpInstanceStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + d.SetPartial("status") + } + } + d.Partial(false) + return resourceAlicloudEcpInstanceRead(d, meta) +} +func resourceAlicloudEcpInstanceDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteInstances" + var response map[string]interface{} + conn, err := client.NewCloudphoneClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "InstanceId": []string{d.Id()}, + } + + if v, ok := d.GetOkExists("force"); ok { + request["Force"] = v + } + request["RegionId"] = client.RegionId + + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"CloudPhoneInstances.NotFound"}) { + return nil + } + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} + +func convertEcpSyncPaymentTypeResponse(source interface{}) interface{} { + switch source { + case "PostPaid": + return "PayAsYouGo" + case "PrePaid": + return "Subscription" + } + return source +} +func convertEcpSyncPaymentTypeRequest(source interface{}) interface{} { + switch source { + case "PayAsYouGo": + return "PostPaid" + case "Subscription": + return "PrePaid" + } + return source +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecp_key_pair.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecp_key_pair.go index 80b65c00245..54843a4e536 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecp_key_pair.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecp_key_pair.go @@ -104,7 +104,7 @@ func resourceAlicloudEcpKeyPairDelete(d *schema.ResourceData, meta interface{}) err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) if err != nil { - if NeedRetry(err) { + if NeedRetry(err) || IsExpectedErrors(err, []string{"KeyPair.WithInstance"}) { wait() return resource.RetryableError(err) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_auto_snapshot_policy.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_auto_snapshot_policy.go index eb580202f0b..86bdf891996 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_auto_snapshot_policy.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_auto_snapshot_policy.go @@ -179,6 +179,10 @@ func resourceAlicloudEcsAutoSnapshotPolicyRead(d *schema.ResourceData, meta inte func resourceAlicloudEcsAutoSnapshotPolicyUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) ecsService := EcsService{client} + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -223,10 +227,6 @@ func resourceAlicloudEcsAutoSnapshotPolicyUpdate(d *schema.ResourceData, meta in } if update { action := "ModifyAutoSnapshotPolicyEx" - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_dedicated_host.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_dedicated_host.go index 5e124a11368..21d334b7de9 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_dedicated_host.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_dedicated_host.go @@ -43,6 +43,7 @@ func resourceAlicloudEcsDedicatedHost() *schema.Resource { "auto_release_time": { Type: schema.TypeString, Optional: true, + Computed: true, }, "auto_renew": { Type: schema.TypeBool, @@ -112,8 +113,8 @@ func resourceAlicloudEcsDedicatedHost() *schema.Resource { "payment_type": { Type: schema.TypeString, Optional: true, + Computed: true, ValidateFunc: validation.StringInSlice([]string{"PostPaid", "PrePaid"}, false), - Default: "PostPaid", }, "resource_group_id": { Type: schema.TypeString, @@ -275,7 +276,6 @@ func resourceAlicloudEcsDedicatedHostRead(d *schema.ResourceData, meta interface d.Set("dedicated_host_name", object["DedicatedHostName"]) d.Set("dedicated_host_type", object["DedicatedHostType"]) d.Set("description", object["Description"]) - d.Set("expired_time", object["ExpiredTime"]) networkAttributesSli := make([]map[string]interface{}, 0) if len(object["NetworkAttributes"].(map[string]interface{})) > 0 { @@ -545,6 +545,10 @@ func resourceAlicloudEcsDedicatedHostUpdate(d *schema.ResourceData, meta interfa return resourceAlicloudEcsDedicatedHostRead(d, meta) } func resourceAlicloudEcsDedicatedHostDelete(d *schema.ResourceData, meta interface{}) error { + if d.Get("payment_type").(string) == "PrePaid" { + log.Printf("[WARN] Cannot destroy Subscription resource: alicloud_ecs_dedicated_host. Terraform will remove this resource from the state file, however resources may remain.") + return nil + } client := meta.(*connectivity.AliyunClient) action := "ReleaseDedicatedHost" var response map[string]interface{} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_dedicated_host_cluster.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_dedicated_host_cluster.go index d24c5d8ea17..278d18b0dc7 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_dedicated_host_cluster.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_dedicated_host_cluster.go @@ -120,6 +120,10 @@ func resourceAlicloudEcsDedicatedHostClusterRead(d *schema.ResourceData, meta in func resourceAlicloudEcsDedicatedHostClusterUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) ecsService := EcsService{client} + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -146,10 +150,6 @@ func resourceAlicloudEcsDedicatedHostClusterUpdate(d *schema.ResourceData, meta } if update { action := "ModifyDedicatedHostClusterAttribute" - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_deployment_set.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_deployment_set.go index 07984910a64..f24ec8ba916 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_deployment_set.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_deployment_set.go @@ -134,6 +134,10 @@ func resourceAlicloudEcsDeploymentSetRead(d *schema.ResourceData, meta interface } func resourceAlicloudEcsDeploymentSetUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -154,10 +158,6 @@ func resourceAlicloudEcsDeploymentSetUpdate(d *schema.ResourceData, meta interfa } if update { action := "ModifyDeploymentSetAttribute" - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_hpc_cluster.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_hpc_cluster.go index 5d37ad59bce..e5810fee205 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_hpc_cluster.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_hpc_cluster.go @@ -77,6 +77,10 @@ func resourceAlicloudEcsHpcClusterRead(d *schema.ResourceData, meta interface{}) } func resourceAlicloudEcsHpcClusterUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -93,10 +97,6 @@ func resourceAlicloudEcsHpcClusterUpdate(d *schema.ResourceData, meta interface{ } if update { action := "ModifyHpcClusterAttribute" - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) request["ClientToken"] = buildClientToken("ModifyHpcClusterAttribute") diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_key_pair.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_key_pair.go index db0ffb26897..b6730fe9072 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_key_pair.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_key_pair.go @@ -136,8 +136,16 @@ func resourceAlicloudEcsKeyPairCreate(d *schema.ResourceData, meta interface{}) d.SetId(fmt.Sprint(response["KeyPairName"])) if file, ok := d.GetOk("key_file"); ok { - ioutil.WriteFile(file.(string), []byte(response["PrivateKeyBody"].(string)), 0600) - os.Chmod(file.(string), 0400) + if v, exist := response["PrivateKeyBody"]; exist { + err := ioutil.WriteFile(file.(string), []byte(v.(string)), 0600) + if err != nil { + return WrapError(err) + } + err = os.Chmod(file.(string), 0400) + if err != nil { + return WrapError(err) + } + } } return resourceAlicloudEcsKeyPairRead(d, meta) @@ -170,6 +178,10 @@ func resourceAlicloudEcsKeyPairRead(d *schema.ResourceData, meta interface{}) er func resourceAlicloudEcsKeyPairUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) ecsService := EcsService{client} + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -191,10 +203,6 @@ func resourceAlicloudEcsKeyPairUpdate(d *schema.ResourceData, meta interface{}) request["ResourceType"] = "keypair" if update { action := "JoinResourceGroup" - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_launch_template.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_launch_template.go index c6553ec9813..b6755c4f85a 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_launch_template.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_launch_template.go @@ -328,10 +328,12 @@ func resourceAlicloudEcsLaunchTemplate() *schema.Resource { "vpc_id": { Type: schema.TypeString, Optional: true, + Computed: true, }, "zone_id": { Type: schema.TypeString, Optional: true, + Computed: true, }, "system_disk_category": { Type: schema.TypeString, diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_prefix_list.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_prefix_list.go new file mode 100644 index 00000000000..3ab64dc491b --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_prefix_list.go @@ -0,0 +1,248 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudEcsPrefixList() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudEcsPrefixListCreate, + Read: resourceAlicloudEcsPrefixListRead, + Update: resourceAlicloudEcsPrefixListUpdate, + Delete: resourceAlicloudEcsPrefixListDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"IPv4", "IPv6"}, false), + }, + "max_entries": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 200), + }, + "entry": { + Type: schema.TypeSet, + Required: true, + MaxItems: 200, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cidr": { + Type: schema.TypeString, + Optional: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "prefix_list_name": { + Type: schema.TypeString, + Required: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + }, + } +} + +func resourceAlicloudEcsPrefixListCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreatePrefixList" + request := make(map[string]interface{}) + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } + + request["AddressFamily"] = d.Get("address_family") + request["MaxEntries"] = d.Get("max_entries") + request["PrefixListName"] = d.Get("prefix_list_name") + request["RegionId"] = client.RegionId + request["ClientToken"] = buildClientToken("CreatePrefixList") + + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + + if v, ok := d.GetOk("entry"); ok { + for entryPtr, entry := range v.(*schema.Set).List() { + entryArg := entry.(map[string]interface{}) + request["Entry."+fmt.Sprint(entryPtr+1)+".Cidr"] = entryArg["cidr"] + request["Entry."+fmt.Sprint(entryPtr+1)+".Description"] = entryArg["description"] + } + } + + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_ecs_prefix_list", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["PrefixListId"])) + + return resourceAlicloudEcsPrefixListRead(d, meta) +} +func resourceAlicloudEcsPrefixListRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + ecsService := EcsService{client} + object, err := ecsService.DescribeEcsPrefixList(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_ecs_prefix_list ecsService.DescribeEcsPrefixList Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("address_family", object["AddressFamily"]) + d.Set("description", object["Description"]) + if entryMap, ok := object["Entries"].(map[string]interface{}); ok && entryMap != nil { + if entryList, ok := entryMap["Entry"]; ok && entryList != nil { + entryMaps := make([]map[string]interface{}, 0) + for _, entryListItem := range entryList.([]interface{}) { + if entryListItemMap, ok := entryListItem.(map[string]interface{}); ok { + res := make(map[string]interface{}, 0) + res["cidr"] = entryListItemMap["Cidr"] + res["description"] = entryListItemMap["Description"] + entryMaps = append(entryMaps, res) + } + } + d.Set("entry", entryMaps) + } + } + + if v, ok := object["MaxEntries"]; ok && fmt.Sprint(v) != "0" { + d.Set("max_entries", formatInt(v)) + } + d.Set("prefix_list_name", object["PrefixListName"]) + return nil +} +func resourceAlicloudEcsPrefixListUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + update := false + + request := map[string]interface{}{ + "PrefixListId": d.Id(), + } + request["RegionId"] = client.RegionId + + if d.HasChange("prefix_list_name") { + update = true + request["PrefixListName"] = d.Get("prefix_list_name") + } + + if d.HasChange("description") { + update = true + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + } + + if d.HasChange("entry") { + update = true + oraw, nraw := d.GetChange("entry") + remove := oraw.(*schema.Set).Difference(nraw.(*schema.Set)).List() + if len(remove) != 0 { + for entryPtr, entry := range remove { + entryArg := entry.(map[string]interface{}) + request["RemoveEntry."+fmt.Sprint(entryPtr+1)+".Cidr"] = entryArg["cidr"] + } + } + added := nraw.(*schema.Set).Difference(oraw.(*schema.Set)).List() + if len(added) != 0 { + for entryPtr, entry := range added { + entryArg := entry.(map[string]interface{}) + request["AddEntry."+fmt.Sprint(entryPtr+1)+".Cidr"] = entryArg["cidr"] + request["AddEntry."+fmt.Sprint(entryPtr+1)+".Description"] = entryArg["description"] + } + } + } + if update { + action := "ModifyPrefixList" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + return resourceAlicloudEcsPrefixListRead(d, meta) +} +func resourceAlicloudEcsPrefixListDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeletePrefixList" + var response map[string]interface{} + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "PrefixListId": d.Id(), + } + + request["RegionId"] = client.RegionId + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_snapshot.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_snapshot.go index 19ce67a95c0..195c1b078d3 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_snapshot.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_snapshot.go @@ -188,6 +188,10 @@ func resourceAlicloudEcsSnapshotRead(d *schema.ResourceData, meta interface{}) e func resourceAlicloudEcsSnapshotUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) ecsService := EcsService{client} + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -219,10 +223,6 @@ func resourceAlicloudEcsSnapshotUpdate(d *schema.ResourceData, meta interface{}) } if update { action := "ModifySnapshotAttribute" - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_storage_capacity_unit.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_storage_capacity_unit.go new file mode 100644 index 00000000000..8087761c0b4 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ecs_storage_capacity_unit.go @@ -0,0 +1,198 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudEcsStorageCapacityUnit() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudEcsStorageCapacityUnitCreate, + Read: resourceAlicloudEcsStorageCapacityUnitRead, + Update: resourceAlicloudEcsStorageCapacityUnitUpdate, + Delete: resourceAlicloudEcsStorageCapacityUnitDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "capacity": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntInSlice([]int{20, 40, 100, 200, 500, 1024, 2048, 5120, 10240, 20480, 51200}), + }, + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.All(validation.StringLenBetween(2, 256), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It cannot begin with \"http://\", \"https://\".")), + }, + "period": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntInSlice([]int{1, 2, 3, 5, 6}), + Computed: true, + }, + "period_unit": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"Month", "Year"}, false), + Computed: true, + }, + "start_time": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "storage_capacity_unit_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.All(validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It cannot begin with 'http://', 'https://'."), validation.StringMatch(regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9:_-]{1,127}$`), `The name must start with a letter. It must be 2 to 128 characters in length. It can contain digits, colons (:), underscores (_), and hyphens (-).`)), + }, + }, + } +} + +func resourceAlicloudEcsStorageCapacityUnitCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "PurchaseStorageCapacityUnit" + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } + request := make(map[string]interface{}) + request["Amount"] = 1 + request["Capacity"] = d.Get("capacity") + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + if v, ok := d.GetOk("period"); ok { + request["Period"] = v + } + if v, ok := d.GetOk("period_unit"); ok { + request["PeriodUnit"] = v + } + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("start_time"); ok { + request["StartTime"] = v + } + if v, ok := d.GetOk("storage_capacity_unit_name"); ok { + request["Name"] = v + } + request["ClientToken"] = buildClientToken("PurchaseStorageCapacityUnit") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_ecs_storage_capacity_unit", action, AlibabaCloudSdkGoERROR) + } + responseStorageCapacityUnitIds := response["StorageCapacityUnitIds"].(map[string]interface{}) + d.SetId(fmt.Sprint(responseStorageCapacityUnitIds["StorageCapacityUnitId"].([]interface{})[0])) + ecsService := EcsService{client} + stateConf := BuildStateConf([]string{}, []string{"Active"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, ecsService.EcsStorageCapacityUnitStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudEcsStorageCapacityUnitRead(d, meta) +} +func resourceAlicloudEcsStorageCapacityUnitRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + ecsService := EcsService{client} + object, err := ecsService.DescribeEcsStorageCapacityUnit(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_ecs_storage_capacity_unit ecsService.DescribeEcsStorageCapacityUnit Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + if v, ok := object["Capacity"]; ok && fmt.Sprint(v) != "0" { + d.Set("capacity", formatInt(v)) + } + d.Set("description", object["Description"]) + d.Set("start_time", object["StartTime"]) + d.Set("status", object["Status"]) + d.Set("storage_capacity_unit_name", object["Name"]) + return nil +} +func resourceAlicloudEcsStorageCapacityUnitUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + update := false + request := map[string]interface{}{ + "StorageCapacityUnitId": d.Id(), + } + request["RegionId"] = client.RegionId + if d.HasChange("description") { + update = true + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + } + if d.HasChange("storage_capacity_unit_name") { + update = true + if v, ok := d.GetOk("storage_capacity_unit_name"); ok { + request["Name"] = v + } + } + if update { + action := "ModifyStorageCapacityUnitAttribute" + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + return resourceAlicloudEcsStorageCapacityUnitRead(d, meta) +} +func resourceAlicloudEcsStorageCapacityUnitDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[WARN] Cannot destroy resourceAlicloudEcsStorageCapacityUnit. Terraform will remove this resource from the state file, however resources may remain.") + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_edas_k8s_application.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_edas_k8s_application.go index 72d3a489062..ba5e5951bdb 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_edas_k8s_application.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_edas_k8s_application.go @@ -32,6 +32,7 @@ func resourceAlicloudEdasK8sApplication() *schema.Resource { Schema: map[string]*schema.Schema{ "application_name": { Type: schema.TypeString, + ForceNew: true, Required: true, }, "cluster_id": { @@ -80,19 +81,23 @@ func resourceAlicloudEdasK8sApplication() *schema.Resource { "internet_slb_id": { Optional: true, Type: schema.TypeString, + ForceNew: true, }, "internet_slb_protocol": { Optional: true, Type: schema.TypeString, + ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"TCP", "HTTP", "HTTPS"}, false), }, "internet_slb_port": { Type: schema.TypeInt, + ForceNew: true, Optional: true, }, "internet_target_port": { Type: schema.TypeInt, Optional: true, + ForceNew: true, }, "envs": { Type: schema.TypeMap, @@ -161,7 +166,7 @@ func resourceAlicloudEdasK8sApplication() *schema.Resource { "package_version": { Type: schema.TypeString, Optional: true, - Default: strconv.FormatInt(time.Now().Unix(), 10), + Computed: true, }, "jdk": { Type: schema.TypeString, @@ -213,6 +218,8 @@ func resourceAlicloudEdasK8sApplicationCreate(d *schema.ResourceData, meta inter } if v, ok := d.GetOk("package_version"); ok { request.PackageVersion = v.(string) + } else { + request.PackageVersion = strconv.FormatInt(time.Now().Unix(), 10) } if v, ok := d.GetOk("jdk"); !ok { return WrapError(Error("jdk is needed for creating non-image k8s application")) @@ -466,7 +473,12 @@ func resourceAlicloudEdasK8sApplicationUpdate(d *schema.ResourceData, meta inter if len(request.PackageUrl) == 0 { return WrapError(Error("package_url is needed for creating fatjar k8s application")) } - request.PackageVersion = d.Get("package_version").(string) + + if v, ok := d.GetOk("package_version"); ok { + request.PackageVersion = v.(string) + } else { + request.PackageVersion = strconv.FormatInt(time.Now().Unix(), 10) + } if d.HasChange("jdk") { partialKeys = append(partialKeys, "jdk") diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_eip_association.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_eip_association.go index be6bed4f127..a2d87325396 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_eip_association.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_eip_association.go @@ -171,7 +171,7 @@ func resourceAliyunEipAssociationDelete(d *schema.ResourceData, meta interface{} }) if err != nil { if IsExpectedErrors(err, []string{"IncorrectInstanceStatus", "IncorrectHaVipStatus", "TaskConflict", - "InvalidIpStatus.HasBeenUsedBySnatTable", "InvalidIpStatus.HasBeenUsedByForwardEntry"}) { + "InvalidIpStatus.HasBeenUsedBySnatTable", "InvalidIpStatus.HasBeenUsedByForwardEntry", "InvalidStatus.EniStatusNotSupport"}) { return resource.RetryableError(err) } return resource.NonRetryableError(err) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ess_alb_server_group_attachment.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ess_alb_server_group_attachment.go new file mode 100644 index 00000000000..ebd0e95d2ad --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ess_alb_server_group_attachment.go @@ -0,0 +1,148 @@ +package alicloud + +import ( + "fmt" + "strconv" + "time" + + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/services/ess" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudEssAlbServerGroupAttachment() *schema.Resource { + return &schema.Resource{ + Create: resourceAliyunEssAlbServerGroupAttachmentCreate, + Read: resourceAliyunEssAlbServerGroupAttachmentRead, + Update: resourceAliyunEssAlbServerGroupAttachmentUpdate, + Delete: resourceAliyunEssAlbServerGroupAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "scaling_group_id": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "alb_server_group_id": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "port": { + Type: schema.TypeInt, + ForceNew: true, + Required: true, + }, + "weight": { + Type: schema.TypeInt, + ForceNew: true, + Required: true, + }, + "force_attach": { + Type: schema.TypeBool, + Optional: true, + }, + }, + } +} + +func resourceAliyunEssAlbServerGroupAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + scalingGroupId := d.Get("scaling_group_id").(string) + albServerGroupId := d.Get("alb_server_group_id").(string) + port := strconv.Itoa(formatInt(d.Get("port"))) + + client := meta.(*connectivity.AliyunClient) + request := ess.CreateAttachAlbServerGroupsRequest() + request.RegionId = client.RegionId + request.ScalingGroupId = scalingGroupId + request.ForceAttach = requests.NewBoolean(d.Get("force_attach").(bool)) + attachScalingGroupAlbServerGroups := make([]ess.AttachAlbServerGroupsAlbServerGroup, 0) + attachScalingGroupAlbServerGroups = append(attachScalingGroupAlbServerGroups, ess.AttachAlbServerGroupsAlbServerGroup{ + AlbServerGroupId: albServerGroupId, + Port: port, + Weight: strconv.Itoa(formatInt(d.Get("weight"))), + }) + request.AlbServerGroup = &attachScalingGroupAlbServerGroups + raw, err := client.WithEssClient(func(essClient *ess.Client) (interface{}, error) { + return essClient.AttachAlbServerGroups(request) + }) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), request.GetActionName(), AlibabaCloudSdkGoERROR) + } + addDebug(request.GetActionName(), raw, request.RpcRequest, request) + + response, _ := raw.(*ess.AttachAlbServerGroupsResponse) + + essService := EssService{client} + stateConf := BuildStateConf([]string{}, []string{"Successful"}, d.Timeout(schema.TimeoutCreate), 1*time.Minute, essService.ActivityStateRefreshFunc(response.ScalingActivityId, []string{"Failed", "Rejected"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + d.SetId(fmt.Sprint(scalingGroupId, ":", albServerGroupId, ":", port)) + return nil +} + +func resourceAliyunEssAlbServerGroupAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { + return WrapErrorf(Error("alb_server_group_attachment not support modify operation"), DefaultErrorMsg, "alicloud_ess_alb_server_groups", "Modify", AlibabaCloudSdkGoERROR) +} + +func resourceAliyunEssAlbServerGroupAttachmentRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + essService := EssService{client} + strs, _ := ParseResourceId(d.Id(), 3) + scalingGroupId, albServerGroupId, port := strs[0], strs[1], strs[2] + + object, err := essService.DescribeEssScalingGroup(scalingGroupId) + if err != nil { + return WrapError(err) + } + + for _, v := range object.AlbServerGroups.AlbServerGroup { + if v.AlbServerGroupId == albServerGroupId && v.Port == formatInt(port) { + d.Set("scaling_group_id", object.ScalingGroupId) + d.Set("alb_server_group_id", v.AlbServerGroupId) + d.Set("weight", v.Weight) + d.Set("port", v.Port) + return nil + } + } + return WrapErrorf(Error(GetNotFoundMessage("AlbServerGroup", d.Id())), NotFoundMsg, ProviderERROR) +} + +func resourceAliyunEssAlbServerGroupAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + request := ess.CreateDetachAlbServerGroupsRequest() + request.RegionId = client.RegionId + strs, _ := ParseResourceId(d.Id(), 3) + scalingGroupId, albServerGroupId, port := strs[0], strs[1], strs[2] + + request.ScalingGroupId = scalingGroupId + request.ForceDetach = requests.NewBoolean(d.Get("force_attach").(bool)) + detachScalingGroupAlbServerGroups := make([]ess.DetachAlbServerGroupsAlbServerGroup, 0) + detachScalingGroupAlbServerGroups = append(detachScalingGroupAlbServerGroups, ess.DetachAlbServerGroupsAlbServerGroup{ + AlbServerGroupId: albServerGroupId, + Port: port, + }) + request.AlbServerGroup = &detachScalingGroupAlbServerGroups + raw, err := client.WithEssClient(func(essClient *ess.Client) (interface{}, error) { + return essClient.DetachAlbServerGroups(request) + }) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), request.GetActionName(), AlibabaCloudSdkGoERROR) + } + addDebug(request.GetActionName(), raw, request.RpcRequest, request) + + response, _ := raw.(*ess.DetachAlbServerGroupsResponse) + + essService := EssService{client} + stateConf := BuildStateConf([]string{}, []string{"Successful"}, d.Timeout(schema.TimeoutCreate), 1*time.Minute, essService.ActivityStateRefreshFunc(response.ScalingActivityId, []string{"Failed", "Rejected"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ess_scalingconfiguration.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ess_scaling_configuration.go similarity index 94% rename from terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ess_scalingconfiguration.go rename to terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ess_scaling_configuration.go index 38c41c53fb2..e3ff801998b 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ess_scalingconfiguration.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ess_scaling_configuration.go @@ -291,6 +291,26 @@ func resourceAlicloudEssScalingConfiguration() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "spot_strategy": { + Type: schema.TypeString, + Optional: true, + }, + "spot_price_limit": { + Optional: true, + Type: schema.TypeSet, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "instance_type": { + Type: schema.TypeString, + Optional: true, + }, + "price_limit": { + Type: schema.TypeFloat, + Optional: true, + }, + }, + }, + }, }, } } @@ -527,6 +547,28 @@ func modifyEssScalingConfiguration(d *schema.ResourceData, meta interface{}) err d.SetPartial("host_name") } + if d.HasChange("spot_strategy") { + request.SpotStrategy = d.Get("spot_strategy").(string) + d.SetPartial("spot_strategy") + } + + if d.HasChange("spot_price_limit") { + v, ok := d.GetOk("spot_price_limit") + if ok { + spotPriceLimits := make([]ess.ModifyScalingConfigurationSpotPriceLimit, 0) + for _, e := range v.(*schema.Set).List() { + pack := e.(map[string]interface{}) + l := ess.ModifyScalingConfigurationSpotPriceLimit{ + InstanceType: pack["instance_type"].(string), + PriceLimit: strconv.FormatFloat(pack["price_limit"].(float64), 'f', 2, 64), + } + spotPriceLimits = append(spotPriceLimits, l) + } + request.SpotPriceLimit = &spotPriceLimits + } + d.SetPartial("spot_price_limit") + } + if d.HasChange("tags") { if v, ok := d.GetOk("tags"); ok { tags := "{" @@ -689,6 +731,8 @@ func resourceAliyunEssScalingConfigurationRead(d *schema.ResourceData, meta inte d.Set("password_inherit", object.PasswordInherit) d.Set("resource_group_id", object.ResourceGroupId) d.Set("host_name", object.HostName) + d.Set("spot_strategy", object.SpotStrategy) + d.Set("spot_price_limit", essService.flattenSpotPriceLimitMappings(object.SpotPriceLimit.SpotPriceModel)) if sg, ok := d.GetOk("security_group_id"); ok && sg.(string) != "" { d.Set("security_group_id", object.SecurityGroupId) @@ -960,6 +1004,24 @@ func buildAlicloudEssScalingConfigurationArgs(d *schema.ResourceData, meta inter request.HostName = v.(string) } + if v, ok := d.GetOk("spot_strategy"); ok && v.(string) != "" { + request.SpotStrategy = v.(string) + } + + v, ok := d.GetOk("spot_price_limit") + if ok { + spotPriceLimits := make([]ess.CreateScalingConfigurationSpotPriceLimit, 0) + for _, e := range v.(*schema.Set).List() { + pack := e.(map[string]interface{}) + l := ess.CreateScalingConfigurationSpotPriceLimit{ + InstanceType: pack["instance_type"].(string), + PriceLimit: strconv.FormatFloat(pack["price_limit"].(float64), 'f', 2, 64), + } + spotPriceLimits = append(spotPriceLimits, l) + } + request.SpotPriceLimit = &spotPriceLimits + } + return request, nil } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_fnf_execution.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_fnf_execution.go new file mode 100644 index 00000000000..049a9bf56a4 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_fnf_execution.go @@ -0,0 +1,180 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudFnFExecution() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudFnFExecutionCreate, + Read: resourceAlicloudFnFExecutionRead, + Update: resourceAlicloudFnFExecutionUpdate, + Delete: resourceAlicloudFnFExecutionDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Update: schema.DefaultTimeout(5 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "execution_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "flow_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "input": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.ValidateJsonString, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + equal, _ := compareJsonTemplateAreEquivalent(old, new) + return equal + }, + }, + "status": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"Stopped"}, false), + }, + }, + } +} + +func resourceAlicloudFnFExecutionCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "StartExecution" + request := make(map[string]interface{}) + conn, err := client.NewFnfClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("execution_name"); ok { + request["ExecutionName"] = v + } + request["FlowName"] = d.Get("flow_name") + if v, ok := d.GetOk("input"); ok { + request["Input"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-03-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_fnf_execution", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["FlowName"], ":", request["ExecutionName"])) + fnfService := FnfService{client} + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, fnfService.FnFExecutionStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudFnFExecutionUpdate(d, meta) +} +func resourceAlicloudFnFExecutionRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + fnfService := FnfService{client} + object, err := fnfService.DescribeFnFExecution(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_fnf_execution fnfService.DescribeFnFExecution Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + d.Set("execution_name", parts[1]) + d.Set("flow_name", parts[0]) + d.Set("input", object["Input"]) + d.Set("status", object["Status"]) + return nil +} +func resourceAlicloudFnFExecutionUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + fnfService := FnfService{client} + var response map[string]interface{} + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + d.Partial(true) + + if d.HasChange("status") { + object, err := fnfService.DescribeFnFExecution(d.Id()) + if err != nil { + return WrapError(err) + } + target := d.Get("status").(string) + if object["Status"].(string) != target { + if target == "Stopped" { + request := map[string]interface{}{ + "ExecutionName": parts[1], + "FlowName": parts[0], + } + action := "StopExecution" + conn, err := client.NewFnfClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-03-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"Stopped"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, fnfService.FnFExecutionStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + d.SetPartial("status") + } + } + d.Partial(false) + return resourceAlicloudFnFExecutionRead(d, meta) +} +func resourceAlicloudFnFExecutionDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[WARN] Cannot destroy resourceAlicloudFnFExecution. Terraform will remove this resource from the state file, however resources may remain.") + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_forward_entry.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_forward_entry.go index feea591d712..b6c9e5213e1 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_forward_entry.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_forward_entry.go @@ -171,6 +171,10 @@ func resourceAlicloudForwardEntryUpdate(d *schema.ResourceData, meta interface{} client := meta.(*connectivity.AliyunClient) vpcService := VpcService{client} var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } if !strings.Contains(d.Id(), COLON_SEPARATED) { d.SetId(d.Get("forward_table_id").(string) + COLON_SEPARATED + d.Id()) } @@ -217,10 +221,6 @@ func resourceAlicloudForwardEntryUpdate(d *schema.ResourceData, meta interface{} request["PortBreak"] = d.Get("port_break") } action := "ModifyForwardEntry" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_accelerator.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_accelerator.go index b4792de3e5c..7007a4326ee 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_accelerator.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_accelerator.go @@ -47,6 +47,12 @@ func resourceAlicloudGaAccelerator() *schema.Resource { Required: true, ValidateFunc: validation.IntBetween(1, 9), }, + "pricing_cycle": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"Month", "Year"}, false), + }, "renewal_status": { Type: schema.TypeString, Optional: true, @@ -88,7 +94,11 @@ func resourceAlicloudGaAcceleratorCreate(d *schema.ResourceData, meta interface{ request["AutoUseCoupon"] = v } request["Duration"] = d.Get("duration") - request["PricingCycle"] = "Month" + if v, ok := d.GetOk("pricing_cycle"); ok { + request["PricingCycle"] = v + } else { + request["PricingCycle"] = "Month" + } request["RegionId"] = client.RegionId request["Spec"] = d.Get("spec") runtime := util.RuntimeOptions{} @@ -139,7 +149,10 @@ func resourceAlicloudGaAcceleratorUpdate(d *schema.ResourceData, meta interface{ gaService := GaService{client} var response map[string]interface{} d.Partial(true) - + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } update := false request := map[string]interface{}{ "AcceleratorId": d.Id(), @@ -159,10 +172,6 @@ func resourceAlicloudGaAcceleratorUpdate(d *schema.ResourceData, meta interface{ } if update { action := "UpdateAcceleratorAutoRenewAttribute" - conn, err := client.NewGaplusClient() - if err != nil { - return WrapError(err) - } request["ClientToken"] = buildClientToken("UpdateAcceleratorAutoRenewAttribute") runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) @@ -212,10 +221,6 @@ func resourceAlicloudGaAcceleratorUpdate(d *schema.ResourceData, meta interface{ updateAcceleratorReq["AutoUseCoupon"] = v } action := "UpdateAccelerator" - conn, err := client.NewGaplusClient() - if err != nil { - return WrapError(err) - } runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) request["ClientToken"] = buildClientToken("UpdateAccelerator") diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_acl.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_acl.go new file mode 100644 index 00000000000..91aa2d81e5d --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_acl.go @@ -0,0 +1,344 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudGaAcl() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudGaAclCreate, + Read: resourceAlicloudGaAclRead, + Update: resourceAlicloudGaAclUpdate, + Delete: resourceAlicloudGaAclDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + Update: schema.DefaultTimeout(5 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "acl_entries": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "entry": { + Type: schema.TypeString, + Optional: true, + }, + "entry_description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[A-Za-z0-9._/-]{1,256}$`), "The description of the IP entry. The description must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_)."), + }, + }, + }, + }, + "acl_name": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z][A-Za-z0-9._-]{2,128}$`), "The name must be `2` to `128` characters in length, and can contain letters, digits, periods (.), hyphens (-) and underscores (_). It must start with a letter."), + }, + "address_ip_version": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"IPv4", "IPv6"}, false), + }, + "dry_run": { + Type: schema.TypeBool, + Optional: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudGaAclCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateAcl" + request := make(map[string]interface{}) + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + if m, ok := d.GetOk("acl_entries"); ok { + for k, aclEntries := range m.(*schema.Set).List() { + aclEntriesArg := aclEntries.(map[string]interface{}) + request[fmt.Sprintf("AclEntries.%d.Entry", k+1)] = aclEntriesArg["entry"].(string) + request[fmt.Sprintf("AclEntries.%d.EntryDescription", k+1)] = aclEntriesArg["entry_description"].(string) + } + } + if v, ok := d.GetOk("acl_name"); ok { + request["AclName"] = v + } + request["AddressIPVersion"] = d.Get("address_ip_version") + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + request["RegionId"] = client.RegionId + request["ClientToken"] = buildClientToken("CreateAcl") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_ga_acl", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["AclId"])) + gaService := GaService{client} + stateConf := BuildStateConf([]string{}, []string{"active"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, gaService.GaAclStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudGaAclRead(d, meta) +} +func resourceAlicloudGaAclRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + gaService := GaService{client} + object, err := gaService.DescribeGaAcl(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_ga_acl gaService.DescribeGaAcl Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + if v, ok := object["AclEntries"].([]interface{}); ok { + aclEntries := make([]map[string]interface{}, 0) + for _, val := range v { + item := val.(map[string]interface{}) + temp := map[string]interface{}{ + "entry": item["Entry"], + "entry_description": item["EntryDescription"], + } + aclEntries = append(aclEntries, temp) + } + if err := d.Set("acl_entries", aclEntries); err != nil { + return WrapError(err) + } + } + + d.Set("acl_name", object["AclName"]) + d.Set("address_ip_version", object["AddressIPVersion"]) + d.Set("status", object["AclStatus"]) + return nil +} +func resourceAlicloudGaAclUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + gaService := GaService{client} + var response map[string]interface{} + d.Partial(true) + + update := false + request := map[string]interface{}{ + "AclId": d.Id(), + } + if d.HasChange("acl_name") { + update = true + } + if v, ok := d.GetOk("acl_name"); ok { + request["AclName"] = v + } + request["RegionId"] = client.RegionId + if update { + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + action := "UpdateAclAttribute" + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + request["ClientToken"] = buildClientToken("UpdateAclAttribute") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 20*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if IsExpectedErrors(err, []string{"StateError.Acl"}) || NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("acl_name") + } + + if d.HasChange("acl_entries") { + oraw, nraw := d.GetChange("acl_entries") + remove := oraw.(*schema.Set).Difference(nraw.(*schema.Set)).List() + create := nraw.(*schema.Set).Difference(oraw.(*schema.Set)).List() + + if len(remove) > 0 { + removeEntriesFromAclReq := map[string]interface{}{ + "AclId": d.Id(), + } + for k, aclEntries := range remove { + aclEntriesArg := aclEntries.(map[string]interface{}) + removeEntriesFromAclReq[fmt.Sprintf("AclEntries.%d.Entry", k+1)] = aclEntriesArg["entry"].(string) + } + removeEntriesFromAclReq["RegionId"] = client.RegionId + + if v, ok := d.GetOkExists("dry_run"); ok { + removeEntriesFromAclReq["DryRun"] = v + } + action := "RemoveEntriesFromAcl" + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + request["ClientToken"] = buildClientToken("RemoveEntriesFromAcl") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 20*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, removeEntriesFromAclReq, &runtime) + if err != nil { + if IsExpectedErrors(err, []string{"StateError.Acl"}) || NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, removeEntriesFromAclReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"active"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, gaService.GaAclStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + + if len(create) > 0 { + addEntriesToAclReq := map[string]interface{}{ + "AclId": d.Id(), + } + for k, aclEntries := range create { + aclEntriesArg := aclEntries.(map[string]interface{}) + addEntriesToAclReq[fmt.Sprintf("AclEntries.%d.Entry", k+1)] = aclEntriesArg["entry"].(string) + addEntriesToAclReq[fmt.Sprintf("AclEntries.%d.EntryDescription", k+1)] = aclEntriesArg["entry_description"].(string) + } + addEntriesToAclReq["RegionId"] = client.RegionId + if v, ok := d.GetOkExists("dry_run"); ok { + addEntriesToAclReq["DryRun"] = v + } + action := "AddEntriesToAcl" + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + request["ClientToken"] = buildClientToken("AddEntriesToAcl") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 20*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, addEntriesToAclReq, &runtime) + if err != nil { + if IsExpectedErrors(err, []string{"StateError.Acl"}) || NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, addEntriesToAclReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"active"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, gaService.GaAclStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + + d.SetPartial("acl_entries") + } + + d.Partial(false) + return resourceAlicloudGaAclRead(d, meta) +} +func resourceAlicloudGaAclDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + gaService := GaService{client} + action := "DeleteAcl" + var response map[string]interface{} + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "AclId": d.Id(), + } + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + request["RegionId"] = client.RegionId + request["ClientToken"] = buildClientToken("DeleteAcl") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 20*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if IsExpectedErrors(err, []string{"StateError.Acl"}) || NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"NotExist.Acl"}) { + return nil + } + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, gaService.GaAclStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_acl_attachment.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_acl_attachment.go new file mode 100644 index 00000000000..6b877f0d6b3 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_acl_attachment.go @@ -0,0 +1,174 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudGaAclAttachment() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudGaAclAttachmentCreate, + Read: resourceAlicloudGaAclAttachmentRead, + Update: resourceAlicloudGaAclAttachmentUpdate, + Delete: resourceAlicloudGaAclAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "acl_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "acl_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"black", "white"}, false), + }, + "dry_run": { + Type: schema.TypeBool, + Optional: true, + }, + "listener_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudGaAclAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AssociateAclsWithListener" + request := make(map[string]interface{}) + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + request["AclIds.1"] = d.Get("acl_id") + request["AclType"] = d.Get("acl_type") + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + request["ListenerId"] = d.Get("listener_id") + request["RegionId"] = client.RegionId + request["ClientToken"] = buildClientToken("AssociateAclsWithListener") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_ga_acl_attachment", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["ListenerId"], ":", d.Get("acl_id"))) + gaService := GaService{client} + stateConf := BuildStateConf([]string{}, []string{"Associated"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, gaService.GaAclAttachmentStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudGaAclAttachmentRead(d, meta) +} +func resourceAlicloudGaAclAttachmentRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + gaService := GaService{client} + object, err := gaService.DescribeGaAclAttachment(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_ga_acl_attachment gaService.DescribeGaAclAttachment Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + d.Set("acl_id", parts[1]) + d.Set("listener_id", parts[0]) + d.Set("acl_type", object["AclType"]) + d.Set("status", object["Status"]) + return nil +} +func resourceAlicloudGaAclAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { + log.Println(fmt.Sprintf("[WARNING] The resouce has not update operation.")) + return resourceAlicloudGaAclAttachmentRead(d, meta) +} +func resourceAlicloudGaAclAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + gaService := GaService{client} + action := "DissociateAclsFromListener" + var response map[string]interface{} + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "ListenerId": parts[0], + } + + request["AclIds.1"] = parts[1] + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + request["RegionId"] = client.RegionId + request["ClientToken"] = buildClientToken("DissociateAclsFromListener") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, gaService.GaAclAttachmentStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_additional_certificate.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_additional_certificate.go new file mode 100644 index 00000000000..65d85ee8efd --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_additional_certificate.go @@ -0,0 +1,145 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudGaAdditionalCertificate() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudGaAdditionalCertificateCreate, + Read: resourceAlicloudGaAdditionalCertificateRead, + Delete: resourceAlicloudGaAdditionalCertificateDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "accelerator_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "certificate_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "domain": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "listener_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAlicloudGaAdditionalCertificateCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AssociateAdditionalCertificatesWithListener" + request := make(map[string]interface{}) + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + request["AcceleratorId"] = d.Get("accelerator_id") + request["Certificates.1.Domain"] = d.Get("domain") + request["Certificates.1.Id"] = d.Get("certificate_id") + request["ListenerId"] = d.Get("listener_id") + request["RegionId"] = client.RegionId + request["ClientToken"] = buildClientToken("AssociateAdditionalCertificatesWithListener") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_ga_additional_certificate", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["AcceleratorId"], ":", request["ListenerId"], ":", request["Certificates.1.Domain"])) + return resourceAlicloudGaAdditionalCertificateRead(d, meta) +} +func resourceAlicloudGaAdditionalCertificateRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + gaService := GaService{client} + object, err := gaService.DescribeGaAdditionalCertificate(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_ga_additional_certificate gaService.DescribeGaAdditionalCertificate Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + parts, err := ParseResourceId(d.Id(), 3) + if err != nil { + return WrapError(err) + } + d.Set("accelerator_id", parts[0]) + d.Set("domain", parts[2]) + d.Set("listener_id", parts[1]) + d.Set("certificate_id", object["CertificateId"]) + return nil +} +func resourceAlicloudGaAdditionalCertificateDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + parts, err := ParseResourceId(d.Id(), 3) + if err != nil { + return WrapError(err) + } + action := "DissociateAdditionalCertificatesFromListener" + var response map[string]interface{} + conn, err := client.NewGaplusClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "AcceleratorId": parts[0], + "ListenerId": parts[1], + } + + request["Domains.1"] = parts[2] + request["RegionId"] = client.RegionId + request["ClientToken"] = buildClientToken("DissociateAdditionalCertificatesFromListener") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_bandwidth_package_attachment.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_bandwidth_package_attachment.go index f738be81dc5..2da3b87fd8f 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_bandwidth_package_attachment.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ga_bandwidth_package_attachment.go @@ -149,7 +149,7 @@ func resourceAlicloudGaBandwidthPackageAttachmentDelete(d *schema.ResourceData, return nil }) if err != nil { - if IsExpectedErrors(err, []string{"NotExist.BandwidthPackage"}) { + if IsExpectedErrors(err, []string{"NotExist.BandwidthPackage", "Exist.EndpointGroup"}) { return nil } return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_gpdb_elastic_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_gpdb_elastic_instance.go index 5e4676d2332..e19616032d9 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_gpdb_elastic_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_gpdb_elastic_instance.go @@ -74,12 +74,19 @@ func resourceAlicloudGpdbElasticInstance() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{"2C16G", "4C32G", "16C128G"}, false), + ValidateFunc: validation.StringInSlice([]string{"2C16G", "4C32G", "16C128G", "2C8G", "4C16G", "8C32G", "16C64G"}, false), }, "db_instance_description": { Type: schema.TypeString, Optional: true, }, + "db_instance_category": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"Basic", "HighAvailability"}, false), + }, "instance_network_type": { Type: schema.TypeString, Optional: true, @@ -106,6 +113,17 @@ func resourceAlicloudGpdbElasticInstance() *schema.Resource { ValidateFunc: validation.IntBetween(1, 12), DiffSuppressFunc: PostPaidDiffSuppressFunc, }, + "encryption_key": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "encryption_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "tags": tagsSchema(), "status": { Type: schema.TypeString, Computed: true, @@ -162,6 +180,15 @@ func resourceAlicloudGpdbElasticInstanceCreate(d *schema.ResourceData, meta inte if v, ok := d.GetOk("zone_id"); ok { request["ZoneId"] = v } + if v, ok := d.GetOk("db_instance_category"); ok { + request["DBInstanceCategory"] = v + } + if v, ok := d.GetOk("encryption_key"); ok { + request["EncryptionKey"] = v + } + if v, ok := d.GetOk("encryption_type"); ok { + request["EncryptionType"] = v + } vswitchId := Trim(d.Get("vswitch_id").(string)) if vswitchId != "" { @@ -222,14 +249,22 @@ func resourceAlicloudGpdbElasticInstanceRead(d *schema.ResourceData, meta interf d.Set("seg_storage_type", instance["StorageType"]) d.Set("seg_node_num", instance["SegNodeNum"]) d.Set("storage_size", instance["StorageSize"]) - d.Set("payment_type", convertGpdbInstancePaymentTypeResponse(instance["PayType"].(string))) - d.Set("instance_spec", convertDBInstanceClassToInstanceSpec(instance["DBInstanceClass"].(string))) d.Set("status", instance["DBInstanceStatus"]) d.Set("db_instance_description", instance["DBInstanceDescription"]) d.Set("instance_network_type", instance["InstanceNetworkType"]) d.Set("vswitch_id", instance["VSwitchId"]) d.Set("zone_id", instance["ZoneId"]) d.Set("connection_string", instance["ConnectionString"]) + d.Set("db_instance_category", instance["DBInstanceCategory"]) + d.Set("encryption_key", instance["EncryptionKey"]) + d.Set("encryption_type", instance["EncryptionType"]) + d.Set("tags", tagsToMap(instance["Tags"])) + d.Set("instance_spec", fmt.Sprintf("%dC%dG", formatInt(instance["CpuCores"]), formatInt(instance["MemorySize"]))) + + if v, exist := instance["PayType"]; exist { + d.Set("payment_type", convertGpdbInstancePaymentTypeResponse(v.(string))) + } + securityIps, err := gpdbService.DescribeGpdbSecurityIps(d.Id()) if err != nil { return WrapError(err) @@ -246,6 +281,12 @@ func resourceAlicloudGpdbElasticInstanceUpdate(d *schema.ResourceData, meta inte if err != nil { return WrapError(err) } + if d.HasChange("tags") { + if err := gpdbService.SetResourceTags(d, "ALIYUN::GPDB::INSTANCE"); err != nil { + return WrapError(err) + } + d.SetPartial("tags") + } if d.HasChange("db_instance_description") { action := "ModifyDBInstanceDescription" request := map[string]interface{}{ diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_havip.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_havip.go index b8d48c6773a..cb06a17b5cd 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_havip.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_havip.go @@ -125,6 +125,10 @@ func resourceAlicloudHavipRead(d *schema.ResourceData, meta interface{}) error { func resourceAlicloudHavipUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } update := false request := map[string]interface{}{ "HaVipId": d.Id(), @@ -140,10 +144,6 @@ func resourceAlicloudHavipUpdate(d *schema.ResourceData, meta interface{}) error } if update { action := "ModifyHaVipAttribute" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_nas_backup_plan.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_nas_backup_plan.go index fcfd2337105..5e103fc7df8 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_nas_backup_plan.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_nas_backup_plan.go @@ -36,27 +36,16 @@ func resourceAlicloudHbrNasBackupPlan() *schema.Resource { Optional: true, }, "create_time": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "detail": { - Type: schema.TypeString, - Optional: true, - }, - "exclude": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + Deprecated: "Field 'create_time' has been deprecated from provider version 1.153.0.", }, "file_system_id": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "include": { - Type: schema.TypeString, - Optional: true, - }, "nas_backup_plan_name": { Type: schema.TypeString, Required: true, @@ -74,15 +63,6 @@ func resourceAlicloudHbrNasBackupPlan() *schema.Resource { Type: schema.TypeString, Required: true, }, - "speed_limit": { - Type: schema.TypeString, - Optional: true, - }, - "update_paths": { - Type: schema.TypeBool, - Optional: true, - Deprecated: "Attribute update_paths has been deprecated in v1.139.0+ and you do not need to set it anymore.", - }, "schedule": { Type: schema.TypeString, Required: true, @@ -109,18 +89,9 @@ func resourceAlicloudHbrNasBackupPlanCreate(d *schema.ResourceData, meta interfa if v, ok := d.GetOk("create_time"); ok { request["CreateTime"] = ConvertNasFileSystemStringToUnix(v.(string)) } - if v, ok := d.GetOk("detail"); ok { - request["Detail"] = v - } - if v, ok := d.GetOk("exclude"); ok { - request["Exclude"] = v - } if v, ok := d.GetOk("file_system_id"); ok { request["FileSystemId"] = v } - if v, ok := d.GetOk("include"); ok { - request["Include"] = v - } request["PlanName"] = d.Get("nas_backup_plan_name") if v, ok := d.GetOk("options"); ok { request["Options"] = v @@ -130,9 +101,6 @@ func resourceAlicloudHbrNasBackupPlanCreate(d *schema.ResourceData, meta interfa } request["Schedule"] = d.Get("schedule") request["SourceType"] = "NAS" - if v, ok := d.GetOk("speed_limit"); ok { - request["SpeedLimit"] = v - } if v, ok := d.GetOk("vault_id"); ok { request["VaultId"] = v } @@ -230,18 +198,6 @@ func resourceAlicloudHbrNasBackupPlanUpdate(d *schema.ResourceData, meta interfa } request["SourceType"] = "NAS" if update { - if v, ok := d.GetOk("detail"); ok { - request["Detail"] = v - } - if v, ok := d.GetOk("exclude"); ok { - request["Exclude"] = v - } - if v, ok := d.GetOk("include"); ok { - request["Include"] = v - } - if v, ok := d.GetOk("speed_limit"); ok { - request["SpeedLimit"] = v - } action := "UpdateBackupPlan" conn, err := client.NewHbrClient() if err != nil { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_replication_vault.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_replication_vault.go new file mode 100644 index 00000000000..42722eb95fb --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_replication_vault.go @@ -0,0 +1,201 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudHbrReplicationVault() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudHbrReplicationVaultCreate, + Read: resourceAlicloudHbrReplicationVaultRead, + Update: resourceAlicloudHbrReplicationVaultUpdate, + Delete: resourceAlicloudHbrReplicationVaultDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 255), + }, + "replication_source_region_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "replication_source_vault_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "vault_name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 64), + }, + "vault_storage_class": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"STANDARD"}, false), + }, + }, + } +} + +func resourceAlicloudHbrReplicationVaultCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateReplicationVault" + request := make(map[string]interface{}) + conn, err := client.NewHbrClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + request["VaultRegionId"] = client.RegionId + request["ReplicationSourceRegionId"] = d.Get("replication_source_region_id") + request["ReplicationSourceVaultId"] = d.Get("replication_source_vault_id") + request["VaultName"] = d.Get("vault_name") + if v, ok := d.GetOk("vault_storage_class"); ok { + request["VaultStorageClass"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-08"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_hbr_replication_vault", action, AlibabaCloudSdkGoERROR) + } + if fmt.Sprint(response["Success"]) == "false" { + return WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + + d.SetId(fmt.Sprint(response["VaultId"])) + + return resourceAlicloudHbrReplicationVaultRead(d, meta) +} +func resourceAlicloudHbrReplicationVaultRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + hbrService := HbrService{client} + object, err := hbrService.DescribeHbrReplicationVault(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_hbr_replication_vault hbrService.DescribeHbrReplicationVault Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("description", object["Description"]) + d.Set("replication_source_region_id", object["ReplicationSourceRegionId"]) + d.Set("replication_source_vault_id", object["ReplicationSourceVaultId"]) + d.Set("status", object["Status"]) + d.Set("vault_name", object["VaultName"]) + d.Set("vault_region_id", object["VaultRegionId"]) + d.Set("vault_storage_class", object["VaultStorageClass"]) + return nil +} +func resourceAlicloudHbrReplicationVaultUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + update := false + request := map[string]interface{}{ + "VaultId": d.Id(), + } + if d.HasChange("description") { + update = true + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + } + if d.HasChange("vault_name") { + update = true + request["VaultName"] = d.Get("vault_name") + } + if update { + action := "UpdateVault" + conn, err := client.NewHbrClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-08"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + if fmt.Sprint(response["Success"]) == "false" { + return WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + } + return resourceAlicloudHbrReplicationVaultRead(d, meta) +} +func resourceAlicloudHbrReplicationVaultDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteVault" + var response map[string]interface{} + conn, err := client.NewHbrClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "VaultId": d.Id(), + } + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-08"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + if fmt.Sprint(response["Success"]) == "false" { + return WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_vault.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_vault.go index 9c2d4155de7..e0838c483da 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_vault.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_hbr_vault.go @@ -184,7 +184,7 @@ func resourceAlicloudHbrVaultDelete(d *schema.ResourceData, meta interface{}) er err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-08"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) if err != nil { - if NeedRetry(err) { + if IsExpectedErrors(err, []string{"CannotDeleteReplicationSourceVault"}) || NeedRetry(err) { wait() return resource.RetryableError(err) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_instance.go index cd28c47f730..0e200a0bb85 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_instance.go @@ -426,6 +426,14 @@ func resourceAliyunInstance() *schema.Resource { Computed: true, ConflictsWith: []string{"secondary_private_ips"}, }, + "deployment_set_id": { + Type: schema.TypeString, + Optional: true, + }, + "deployment_set_group_no": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -492,6 +500,7 @@ func resourceAliyunInstanceRead(d *schema.ResourceData, meta interface{}) error d.SetId("") return nil } + return WrapError(err) } var disk ecs.Disk @@ -534,6 +543,8 @@ func resourceAliyunInstanceRead(d *schema.ResourceData, meta interface{}) error d.Set("auto_release_time", instance.AutoReleaseTime) d.Set("tags", ecsService.tagsToMap(instance.Tags.Tag)) d.Set("hpc_cluster_id", instance.HpcClusterId) + d.Set("deployment_set_id", instance.DeploymentSetId) + d.Set("deployment_set_group_no", instance.DeploymentSetGroupNo) if len(instance.PublicIpAddress.IpAddress) > 0 { d.Set("public_ip", instance.PublicIpAddress.IpAddress[0]) } else { @@ -657,7 +668,10 @@ func resourceAliyunInstanceRead(d *schema.ResourceData, meta interface{}) error func resourceAliyunInstanceUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) ecsService := EcsService{client} - + conn, err := client.NewEcsClient() + if err != nil { + return WrapError(err) + } d.Partial(true) if !d.IsNewResource() { @@ -675,10 +689,6 @@ func resourceAliyunInstanceUpdate(d *schema.ResourceData, meta interface{}) erro "RegionId": client.RegionId, "ResourceGroupId": d.Get("resource_group_id"), } - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } response, err := conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) if err != nil { return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) @@ -947,10 +957,6 @@ func resourceAliyunInstanceUpdate(d *schema.ResourceData, meta interface{}) erro request[fmt.Sprintf("PrivateIpAddress.%d", index+1)] = val } - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -980,10 +986,6 @@ func resourceAliyunInstanceUpdate(d *schema.ResourceData, meta interface{}) erro for index, val := range create { request[fmt.Sprintf("PrivateIpAddress.%d", index+1)] = val } - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -1033,10 +1035,6 @@ func resourceAliyunInstanceUpdate(d *schema.ResourceData, meta interface{}) erro "ClientToken": buildClientToken(action), "SecondaryPrivateIpAddressCount": diff, } - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -1066,11 +1064,6 @@ func resourceAliyunInstanceUpdate(d *schema.ResourceData, meta interface{}) erro for index, val := range privateIpList[:diff] { request[fmt.Sprintf("PrivateIpAddress.%d", index+1)] = val } - - conn, err := client.NewEcsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -1091,7 +1084,35 @@ func resourceAliyunInstanceUpdate(d *schema.ResourceData, meta interface{}) erro d.SetPartial("secondary_private_ip_address_count") } } - + } + if !d.IsNewResource() && d.HasChange("deployment_set_id") { + action := "ModifyInstanceDeployment" + var response map[string]interface{} + request := map[string]interface{}{ + "RegionId": client.RegionId, + "InstanceId": d.Id(), + "ClientToken": buildClientToken(action), + } + if v, ok := d.GetOk("deployment_set_id"); ok { + request["DeploymentSetId"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("deployment_set_id") } d.Partial(false) @@ -1348,6 +1369,10 @@ func buildAliyunInstanceArgs(d *schema.ResourceData, meta interface{}) (*ecs.Run request.HpcClusterId = v.(string) } + if v, ok := d.GetOk("deployment_set_id"); ok { + request.DeploymentSetId = v.(string) + } + return request, nil } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_kms_key.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_kms_key.go index 610d10c4126..69ea1805e29 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_kms_key.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_kms_key.go @@ -227,6 +227,10 @@ func resourceAlicloudKmsKeyRead(d *schema.ResourceData, meta interface{}) error func resourceAlicloudKmsKeyUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) kmsService := KmsService{client} + conn, err := client.NewKmsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -236,10 +240,6 @@ func resourceAlicloudKmsKeyUpdate(d *schema.ResourceData, meta interface{}) erro } request["Description"] = d.Get("description") action := "UpdateKeyDescription" - conn, err := client.NewKmsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-01-20"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -272,10 +272,6 @@ func resourceAlicloudKmsKeyUpdate(d *schema.ResourceData, meta interface{}) erro } if update { action := "UpdateRotationPolicy" - conn, err := client.NewKmsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-01-20"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -320,10 +316,6 @@ func resourceAlicloudKmsKeyUpdate(d *schema.ResourceData, meta interface{}) erro "KeyId": d.Id(), } action := "DisableKey" - conn, err := client.NewKmsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-01-20"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -346,10 +338,6 @@ func resourceAlicloudKmsKeyUpdate(d *schema.ResourceData, meta interface{}) erro "KeyId": d.Id(), } action := "EnableKey" - conn, err := client.NewKmsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-01-20"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_kvstore_audit_log_config.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_kvstore_audit_log_config.go index a1808859b6f..a4d8cd61501 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_kvstore_audit_log_config.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_kvstore_audit_log_config.go @@ -123,6 +123,10 @@ func resourceAlicloudKvstoreAuditLogConfigRead(d *schema.ResourceData, meta inte func resourceAlicloudKvstoreAuditLogConfigUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) rKvstoreService := RKvstoreService{client} + conn, err := client.NewRedisaClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -144,10 +148,6 @@ func resourceAlicloudKvstoreAuditLogConfigUpdate(d *schema.ResourceData, meta in } if update { action := "ModifyAuditLogConfig" - conn, err := client.NewRedisaClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_log_project.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_log_project.go index 0c8da6dc68a..c2a9d7aa585 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_log_project.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_log_project.go @@ -103,7 +103,7 @@ func buildTags(projectName string, tags map[string]interface{}) *sls.ResourceTag slsTags := []sls.ResourceTag{} for key, value := range tags { - tag := sls.ResourceTag{key, value.(string)} + tag := sls.ResourceTag{Key: key, Value: value.(string)} slsTags = append(slsTags, tag) } projectTags := sls.NewProjectTags(projectName, slsTags) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_account.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_account.go index c3b7bb9af7b..62d255a42a8 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_account.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_account.go @@ -87,7 +87,7 @@ func resourceAlicloudMongodbAccountCreate(d *schema.ResourceData, meta interface } d.SetId(fmt.Sprint(request["DBInstanceId"], ":", request["AccountName"])) MongoDBService := MongoDBService{client} - stateConf := BuildStateConf([]string{}, []string{"Available"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, MongoDBService.MongodbAccountStateRefreshFunc(d.Id(), []string{})) + stateConf := BuildStateConf([]string{}, []string{"Available"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, MongoDBService.MongodbAccountStateRefreshFunc(d.Id(), []string{})) if _, err := stateConf.WaitForState(); err != nil { return WrapErrorf(err, IdMsg, d.Id()) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_serverless_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_serverless_instance.go index fd2c94231c8..6e6b7adc76b 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_serverless_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_serverless_instance.go @@ -257,10 +257,7 @@ func resourceAlicloudMongodbServerlessInstanceRead(d *schema.ResourceData, meta securityIpGroupMaps = append(securityIpGroupMaps, iPArrayListItemMap) } } - err = d.Set("security_ip_groups", securityIpGroupMaps) - if err != nil { - panic(err) - } + d.Set("security_ip_groups", securityIpGroupMaps) } } return nil diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_sharding_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_sharding_instance.go index d7dc0690ba8..9ddbdbd1f5d 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_sharding_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_sharding_instance.go @@ -271,7 +271,7 @@ func buildMongoDBShardingCreateRequest(d *schema.ResourceData, meta interface{}) } class := item["node_class"].(string) nodeStorage := item["node_storage"].(int) - replicaSets = append(replicaSets, dds.CreateShardingDBInstanceReplicaSet{strconv.Itoa(readonlyReplicas), strconv.Itoa(nodeStorage), class}) + replicaSets = append(replicaSets, dds.CreateShardingDBInstanceReplicaSet{ReadonlyReplicas: strconv.Itoa(readonlyReplicas), Storage: strconv.Itoa(nodeStorage), Class: class}) } request.ReplicaSet = &replicaSets } @@ -282,12 +282,12 @@ func buildMongoDBShardingCreateRequest(d *schema.ResourceData, meta interface{}) for _, rew := range mongoList.([]interface{}) { item := rew.(map[string]interface{}) class := item["node_class"].(string) - mongos = append(mongos, dds.CreateShardingDBInstanceMongos{class}) + mongos = append(mongos, dds.CreateShardingDBInstanceMongos{Class: class}) } request.Mongos = &mongos } - request.ConfigServer = &[]dds.CreateShardingDBInstanceConfigServer{{"20", "dds.cs.mid"}} + request.ConfigServer = &[]dds.CreateShardingDBInstanceConfigServer{{Storage: "20", Class: "dds.cs.mid"}} request.NetworkType = string(Classic) vswitchId := Trim(d.Get("vswitch_id").(string)) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_sharding_network_private_address.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_sharding_network_private_address.go new file mode 100644 index 00000000000..9d8cc87165e --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_sharding_network_private_address.go @@ -0,0 +1,226 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudMongodbShardingNetworkPrivateAddress() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudMongodbShardingNetworkPrivateAddressCreate, + Read: resourceAlicloudMongodbShardingNetworkPrivateAddressRead, + Update: resourceAlicloudMongodbShardingNetworkPrivateAddressUpdate, + Delete: resourceAlicloudMongodbShardingNetworkPrivateAddressDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "account_name": { + Type: schema.TypeString, + Optional: true, + }, + "zone_id": { + Type: schema.TypeString, + Required: true, + }, + "account_password": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[\w!@#$%^&*()_+=]{6,32}$`), "The account password must be 6 to 32 characters in length, and can contain letters, digits, and special characters(!@#$%^&*()_+-=)."), + }, + "db_instance_id": { + Type: schema.TypeString, + Required: true, + }, + "node_id": { + Type: schema.TypeString, + Required: true, + }, + "network_address": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "expired_time": { + Type: schema.TypeString, + Computed: true, + }, + "ip_address": { + Type: schema.TypeString, + Computed: true, + }, + "network_address": { + Type: schema.TypeString, + Computed: true, + }, + "network_type": { + Type: schema.TypeString, + Computed: true, + }, + "node_id": { + Type: schema.TypeString, + Computed: true, + }, + "node_type": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeString, + Computed: true, + }, + "role": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func resourceAlicloudMongodbShardingNetworkPrivateAddressCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AllocateNodePrivateNetworkAddress" + request := make(map[string]interface{}) + conn, err := client.NewDdsClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("account_name"); ok { + request["AccountName"] = v + } + if v, ok := d.GetOk("account_password"); ok { + request["AccountPassword"] = v + } + request["DBInstanceId"] = d.Get("db_instance_id") + request["NodeId"] = d.Get("node_id") + request["RegionId"] = client.RegionId + request["ZoneId"] = d.Get("zone_id") + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_mongodb_sharding_network_private_address", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["DBInstanceId"], ":", request["NodeId"])) + ddsService := MongoDBService{client} + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutCreate), 5*time.Minute, ddsService.RdsMongodbDBInstanceStateRefreshFunc(fmt.Sprint(request["DBInstanceId"]), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapError(err) + } + + return resourceAlicloudMongodbShardingNetworkPrivateAddressRead(d, meta) +} +func resourceAlicloudMongodbShardingNetworkPrivateAddressRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + MongoDBService := MongoDBService{client} + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + object, err := MongoDBService.DescribeMongodbShardingNetworkPrivateAddress(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_mongodb_sharding_network_private_address MongoDBService.DescribeMongodbShardingNetworkPrivateAddress Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("db_instance_id", parts[0]) + d.Set("node_id", parts[1]) + s := make([]map[string]interface{}, 0) + for _, item := range object["NetworkAddress"].([]map[string]interface{}) { + mapping := map[string]interface{}{ + "expired_time": item["ExpiredTime"], + "ip_address": item["IPAddress"], + "network_address": item["NetworkAddress"], + "network_type": item["NetworkType"], + "node_type": item["NodeType"], + "port": item["Port"], + "role": item["Role"], + "vpc_id": item["VPCId"], + "vswitch_id": item["VswitchId"], + "node_id": item["NodeId"], + } + s = append(s, mapping) + } + d.Set("network_address", s) + return nil +} +func resourceAlicloudMongodbShardingNetworkPrivateAddressUpdate(d *schema.ResourceData, meta interface{}) error { + log.Println(fmt.Sprintf("[WARNING] The resouce has not update operation.")) + return resourceAlicloudMongodbShardingNetworkPrivateAddressRead(d, meta) +} +func resourceAlicloudMongodbShardingNetworkPrivateAddressDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + action := "ReleaseNodePrivateNetworkAddress" + var response map[string]interface{} + conn, err := client.NewDdsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "DBInstanceId": parts[0], + "NodeId": parts[1], + } + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + ddsService := MongoDBService{client} + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutCreate), 5*time.Minute, ddsService.RdsMongodbDBInstanceStateRefreshFunc(fmt.Sprint(parts[0]), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapError(err) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_sharding_network_public_address.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_sharding_network_public_address.go new file mode 100644 index 00000000000..4ac1a1aab3c --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_sharding_network_public_address.go @@ -0,0 +1,210 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudMongodbShardingNetworkPublicAddress() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudMongodbShardingNetworkPublicAddressCreate, + Read: resourceAlicloudMongodbShardingNetworkPublicAddressRead, + Delete: resourceAlicloudMongodbShardingNetworkPublicAddressDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "db_instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "node_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "network_address": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "expired_time": { + Type: schema.TypeString, + Computed: true, + }, + "ip_address": { + Type: schema.TypeString, + Computed: true, + }, + "network_address": { + Type: schema.TypeString, + Computed: true, + }, + "network_type": { + Type: schema.TypeString, + Computed: true, + }, + "node_id": { + Type: schema.TypeString, + Computed: true, + }, + "node_type": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeString, + Computed: true, + }, + "role": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func resourceAlicloudMongodbShardingNetworkPublicAddressCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AllocatePublicNetworkAddress" + request := make(map[string]interface{}) + conn, err := client.NewDdsClient() + if err != nil { + return WrapError(err) + } + request["DBInstanceId"] = d.Get("db_instance_id") + request["NodeId"] = d.Get("node_id") + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_mongodb_sharding_network_public_address", action, AlibabaCloudSdkGoERROR) + } + d.SetId(fmt.Sprint(request["DBInstanceId"], ":", request["NodeId"])) + + MongoDBService := MongoDBService{client} + nodeType, err := MongoDBService.DescribeShardingNodeType(d.Id()) + if err != nil { + return WrapError(err) + } + + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, MongoDBService.MongodbShardingNetworkPublicAddressStateRefreshFunc(d.Id(), nodeType, []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudMongodbShardingNetworkPublicAddressRead(d, meta) +} +func resourceAlicloudMongodbShardingNetworkPublicAddressRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + MongoDBService := MongoDBService{client} + object, err := MongoDBService.DescribeMongodbShardingNetworkPublicAddress(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_mongodb_sharding_network_public_address MongoDBService.DescribeMongodbShardingNetworkPublicAddress Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + d.Set("db_instance_id", parts[0]) + d.Set("node_id", parts[1]) + s := make([]map[string]interface{}, 0) + for _, item := range object["NetworkAddress"].([]map[string]interface{}) { + mapping := map[string]interface{}{ + "expired_time": item["ExpiredTime"], + "ip_address": item["IPAddress"], + "network_address": item["NetworkAddress"], + "network_type": item["NetworkType"], + "node_type": item["NodeType"], + "port": item["Port"], + "role": item["Role"], + "vpc_id": item["VPCId"], + "vswitch_id": item["VswitchId"], + "node_id": parts[1], + } + s = append(s, mapping) + } + d.Set("network_address", s) + return nil +} +func resourceAlicloudMongodbShardingNetworkPublicAddressDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + action := "ReleasePublicNetworkAddress" + var response map[string]interface{} + conn, err := client.NewDdsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "DBInstanceId": parts[0], + "NodeId": parts[1], + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-12-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + MongoDBService := MongoDBService{client} + nodeType, err := MongoDBService.DescribeShardingNodeType(d.Id()) + if err != nil { + return WrapError(err) + } + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutDelete), 5*time.Second, MongoDBService.MongodbShardingNetworkPublicAddressStateRefreshFunc(d.Id(), nodeType, []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mse_gateway.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mse_gateway.go new file mode 100644 index 00000000000..2439df582a3 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_mse_gateway.go @@ -0,0 +1,315 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudMseGateway() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudMseGatewayCreate, + Read: resourceAlicloudMseGatewayRead, + Update: resourceAlicloudMseGatewayUpdate, + Delete: resourceAlicloudMseGatewayDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "backup_vswitch_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "enterprise_security_group": { + Type: schema.TypeBool, + Optional: true, + }, + "gateway_name": { + Type: schema.TypeString, + Optional: true, + }, + "internet_slb_spec": { + Type: schema.TypeString, + Optional: true, + }, + "replica": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 30), + }, + "slb_spec": { + Type: schema.TypeString, + Optional: true, + }, + "spec": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"MSE_GTW_16_32_200_c", "MSE_GTW_2_4_200_c", "MSE_GTW_4_8_200_c", "MSE_GTW_8_16_200_c"}, false), + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "delete_slb": { + Type: schema.TypeBool, + Optional: true, + }, + "slb_list": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "associate_id": { + Type: schema.TypeString, + Computed: true, + }, + "slb_id": { + Type: schema.TypeString, + Computed: true, + }, + "slb_ip": { + Type: schema.TypeString, + Computed: true, + }, + "slb_port": { + Type: schema.TypeString, + Computed: true, + }, + "type": { + Type: schema.TypeString, + Computed: true, + }, + "gmt_create": { + Type: schema.TypeString, + Computed: true, + }, + "gateway_slb_mode": { + Type: schema.TypeString, + Computed: true, + }, + "gateway_slb_status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func resourceAlicloudMseGatewayCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AddGateway" + request := make(map[string]interface{}) + conn, err := client.NewMseClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("backup_vswitch_id"); ok { + request["VSwitchId2"] = v + } + if v, ok := d.GetOkExists("enterprise_security_group"); ok { + request["EnterpriseSecurityGroup"] = v + } + if v, ok := d.GetOk("gateway_name"); ok { + request["Name"] = v + } + request["Region"] = client.RegionId + request["Replica"] = d.Get("replica") + if v, ok := d.GetOk("slb_spec"); ok { + request["SlbSpec"] = v + } + if v, ok := d.GetOk("internet_slb_spec"); ok { + request["InternetSlbSpec"] = v + } + request["Spec"] = d.Get("spec") + + request["VSwitchId"] = d.Get("vswitch_id") + request["Vpc"] = d.Get("vpc_id") + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-05-31"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_mse_gateway", action, AlibabaCloudSdkGoERROR) + } + if fmt.Sprint(response["Code"]) != "200" || fmt.Sprint(response["Success"]) == "false" { + return WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + responseData := response["Data"].(map[string]interface{}) + d.SetId(fmt.Sprint(responseData["GatewayUniqueId"])) + mseService := MseService{client} + stateConf := BuildStateConf([]string{}, []string{"2"}, d.Timeout(schema.TimeoutCreate), 10*time.Second, mseService.MseGatewayStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudMseGatewayRead(d, meta) +} +func resourceAlicloudMseGatewayRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + mseService := MseService{client} + object, err := mseService.DescribeMseGateway(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_mse_gateway mseService.DescribeMseGateway Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("backup_vswitch_id", object["Vswitch2"]) + d.Set("gateway_name", object["Name"]) + d.Set("replica", formatInt(object["Replica"])) + d.Set("spec", object["Spec"]) + d.Set("status", fmt.Sprint(formatInt(object["Status"]))) + d.Set("vswitch_id", object["Vswitch"]) + d.Set("vpc_id", object["Vpc"]) + + slbListObject, err := mseService.ListGatewaySlb(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_mse_gateway mseService.ListGatewaySlb Failed!!! %s", err) + return nil + } + return WrapError(err) + } + slbList := slbListObject["SlbList"] + + slbMapList := make([]map[string]interface{}, 0) + if v, ok := slbList.([]interface{}); ok && len(v) > 0 { + for _, slb := range v { + slbMap := slb.(map[string]interface{}) + mapping := map[string]interface{}{ + "associate_id": slbMap["Id"], + "slb_id": slbMap["SlbId"], + "slb_ip": slbMap["SlbIp"], + "slb_port": slbMap["SlbPort"], + "type": slbMap["Type"], + "gmt_create": slbMap["GmtCreate"], + "gateway_slb_mode": slbMap["GatewaySlbMode"], + "gateway_slb_status": slbMap["GatewaySlbStatus"], + } + slbMapList = append(slbMapList, mapping) + } + } + d.Set("slb_list", slbMapList) + + return nil +} +func resourceAlicloudMseGatewayUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + request := map[string]interface{}{ + "GatewayUniqueId": d.Id(), + } + var response map[string]interface{} + if d.HasChange("gateway_name") { + if v, ok := d.GetOk("gateway_name"); ok { + request["Name"] = v + } + } + action := "UpdateGatewayName" + conn, err := client.NewMseClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2019-05-31"), StringPointer("AK"), request, nil, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + if fmt.Sprint(response["Success"]) == "false" { + return WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + return resourceAlicloudMseGatewayRead(d, meta) +} +func resourceAlicloudMseGatewayDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteGateway" + var response map[string]interface{} + conn, err := client.NewMseClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "GatewayUniqueId": d.Id(), + } + + if v, ok := d.GetOkExists("delete_slb"); ok { + request["DeleteSlb"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2019-05-31"), StringPointer("AK"), request, nil, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + if IsExpectedErrorCodes(fmt.Sprint(response["Code"]), []string{"404"}) { + return nil + } + if fmt.Sprint(response["Success"]) == "false" { + return WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + mseService := MseService{client} + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 10*time.Second, mseService.MseGatewayStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_access_group.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_access_group.go index 1aca2344ab5..a3be12976a4 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_access_group.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_access_group.go @@ -154,6 +154,10 @@ func resourceAlicloudNasAccessGroupRead(d *schema.ResourceData, meta interface{} } func resourceAlicloudNasAccessGroupUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} if len(strings.Split(d.Id(), ":")) != 2 { d.SetId(fmt.Sprintf("%v:%v", d.Id(), "standard")) @@ -169,10 +173,6 @@ func resourceAlicloudNasAccessGroupUpdate(d *schema.ResourceData, meta interface } request["Description"] = d.Get("description") action := "ModifyAccessGroup" - conn, err := client.NewNasClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_access_rule.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_access_rule.go index 668960ff7ba..298e7a9b3cd 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_access_rule.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_access_rule.go @@ -101,6 +101,10 @@ func resourceAlicloudNasAccessRuleCreate(d *schema.ResourceData, meta interface{ func resourceAlicloudNasAccessRuleUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} parts, err := ParseResourceId(d.Id(), 2) if err != nil { @@ -136,10 +140,6 @@ func resourceAlicloudNasAccessRuleUpdate(d *schema.ResourceData, meta interface{ if update { action := "ModifyAccessRule" - conn, err := client.NewNasClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_auto_snapshot_policy.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_auto_snapshot_policy.go new file mode 100644 index 00000000000..6cf5ad2c544 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_auto_snapshot_policy.go @@ -0,0 +1,222 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "strings" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudNasAutoSnapshotPolicy() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudNasAutoSnapshotPolicyCreate, + Read: resourceAlicloudNasAutoSnapshotPolicyRead, + Update: resourceAlicloudNasAutoSnapshotPolicyUpdate, + Delete: resourceAlicloudNasAutoSnapshotPolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(1 * time.Minute), + Delete: schema.DefaultTimeout(1 * time.Minute), + Update: schema.DefaultTimeout(1 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "auto_snapshot_policy_name": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.All(validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It cannot begin with 'http://', 'https://'."), validation.StringMatch(regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9:_-]{1,127}$`), `The name must start with a letter. It must be 2 to 128 characters in length. It can contain digits, colons (:), underscores (_), and hyphens (-).`)), + }, + "repeat_weekdays": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "retention_days": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ValidateFunc: validation.Any(validation.IntInSlice([]int{-1}), validation.IntBetween(1, 65536)), + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "time_points": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + } +} + +func resourceAlicloudNasAutoSnapshotPolicyCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateAutoSnapshotPolicy" + request := make(map[string]interface{}) + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("auto_snapshot_policy_name"); ok { + request["AutoSnapshotPolicyName"] = v + } + request["FileSystemType"] = "extreme" + request["RepeatWeekdays"] = convertListToCommaSeparate(d.Get("repeat_weekdays").(*schema.Set).List()) + if v, ok := d.GetOk("retention_days"); ok { + request["RetentionDays"] = v + } + request["TimePoints"] = convertListToCommaSeparate(d.Get("time_points").(*schema.Set).List()) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_nas_auto_snapshot_policy", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["AutoSnapshotPolicyId"])) + nasService := NasService{client} + stateConf := BuildStateConf([]string{}, []string{"Available"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, nasService.NasAutoSnapshotPolicyStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudNasAutoSnapshotPolicyRead(d, meta) +} +func resourceAlicloudNasAutoSnapshotPolicyRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + object, err := nasService.DescribeNasAutoSnapshotPolicy(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_nas_auto_snapshot_policy nasService.DescribeNasAutoSnapshotPolicy Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("auto_snapshot_policy_name", object["AutoSnapshotPolicyName"]) + d.Set("repeat_weekdays", strings.Split(object["RepeatWeekdays"].(string), ",")) + d.Set("retention_days", formatInt(object["RetentionDays"])) + d.Set("status", object["Status"]) + d.Set("time_points", strings.Split(object["TimePoints"].(string), ",")) + return nil +} +func resourceAlicloudNasAutoSnapshotPolicyUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + update := false + request := map[string]interface{}{ + "AutoSnapshotPolicyId": d.Id(), + } + if d.HasChange("auto_snapshot_policy_name") { + update = true + if v, ok := d.GetOk("auto_snapshot_policy_name"); ok { + request["AutoSnapshotPolicyName"] = v + } + } + if d.HasChange("repeat_weekdays") { + update = true + request["RepeatWeekdays"] = convertListToCommaSeparate(d.Get("repeat_weekdays").(*schema.Set).List()) + } + if d.HasChange("retention_days") { + update = true + if v, ok := d.GetOk("retention_days"); ok { + request["RetentionDays"] = v + } + } + if d.HasChange("time_points") { + update = true + request["TimePoints"] = convertListToCommaSeparate(d.Get("time_points").(*schema.Set).List()) + } + if update { + action := "ModifyAutoSnapshotPolicy" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"Available"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, nasService.NasAutoSnapshotPolicyStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + return resourceAlicloudNasAutoSnapshotPolicyRead(d, meta) +} +func resourceAlicloudNasAutoSnapshotPolicyDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + action := "DeleteAutoSnapshotPolicy" + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "AutoSnapshotPolicyId": d.Id(), + } + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidLifecyclePolicy.NotFound"}) { + return nil + } + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, nasService.NasAutoSnapshotPolicyStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_data_flow.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_data_flow.go new file mode 100644 index 00000000000..5de51ffaea4 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_data_flow.go @@ -0,0 +1,339 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudNasDataFlow() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudNasDataFlowCreate, + Read: resourceAlicloudNasDataFlowRead, + Update: resourceAlicloudNasDataFlowUpdate, + Delete: resourceAlicloudNasDataFlowDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "data_flow_id": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.All(validation.StringLenBetween(2, 256), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It cannot begin with \"http://\", \"https://\".")), + }, + "dry_run": { + Type: schema.TypeBool, + Optional: true, + }, + "file_system_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "fset_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "source_security_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"SSL", "NONE"}, false), + }, + "source_storage": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"Running", "Stopped"}, false), + }, + "throughput": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntInSlice([]int{600, 1200, 1500}), + }, + }, + } +} + +func resourceAlicloudNasDataFlowCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateDataFlow" + request := make(map[string]interface{}) + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + request["FileSystemId"] = d.Get("file_system_id") + request["FsetId"] = d.Get("fset_id") + if v, ok := d.GetOk("source_security_type"); ok { + request["SourceSecurityType"] = v + } + request["SourceStorage"] = d.Get("source_storage") + request["Throughput"] = d.Get("throughput") + request["ClientToken"] = buildClientToken("CreateDataFlow") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_nas_data_flow", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["FileSystemId"], ":", response["DataFlowId"])) + nasService := NasService{client} + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, nasService.NasDataFlowStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudNasDataFlowRead(d, meta) +} +func resourceAlicloudNasDataFlowRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + object, err := nasService.DescribeNasDataFlow(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_nas_data_flow nasService.DescribeNasDataFlow Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("data_flow_id", object["DataFlowId"]) + d.Set("file_system_id", object["FileSystemId"]) + d.Set("description", object["Description"]) + d.Set("fset_id", object["FsetId"]) + d.Set("source_security_type", object["SourceSecurityType"]) + d.Set("source_storage", object["SourceStorage"]) + d.Set("status", object["Status"]) + d.Set("throughput", formatInt(object["Throughput"])) + return nil +} +func resourceAlicloudNasDataFlowUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + d.Partial(true) + + update := false + modifyDataFlowReq := map[string]interface{}{ + "DataFlowId": parts[1], + "FileSystemId": parts[0], + } + if d.HasChange("description") { + update = true + if v, ok := d.GetOk("description"); ok { + modifyDataFlowReq["Description"] = v + } + } + if d.HasChange("throughput") { + update = true + modifyDataFlowReq["Throughput"] = d.Get("throughput") + } + if update { + if v, ok := d.GetOkExists("dry_run"); ok { + modifyDataFlowReq["DryRun"] = v + } + action := "ModifyDataFlow" + modifyDataFlowReq["ClientToken"] = buildClientToken("ModifyDataFlow") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, modifyDataFlowReq, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDataFlowReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, nasService.NasDataFlowStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("description") + d.SetPartial("throughput") + } + + if d.HasChange("status") { + object, err := nasService.DescribeNasDataFlow(d.Id()) + if err != nil { + return WrapError(err) + } + target := d.Get("status").(string) + if object["Status"].(string) != target { + if target == "Running" { + request := map[string]interface{}{ + "DataFlowId": parts[1], + "FileSystemId": parts[0], + } + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + action := "StartDataFlow" + request["ClientToken"] = buildClientToken("StartDataFlow") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, nasService.NasDataFlowStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + if target == "Stopped" { + request := map[string]interface{}{ + "DataFlowId": parts[1], + "FileSystemId": parts[0], + } + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + action := "StopDataFlow" + request["ClientToken"] = buildClientToken("StopDataFlow") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"Stopped"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, nasService.NasDataFlowStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + d.SetPartial("status") + } + } + d.Partial(false) + return resourceAlicloudNasDataFlowRead(d, meta) +} +func resourceAlicloudNasDataFlowDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + action := "DeleteDataFlow" + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "DataFlowId": parts[1], + "FileSystemId": parts[0], + } + + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + request["ClientToken"] = buildClientToken("DeleteDataFlow") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + nasService := NasService{client} + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, nasService.NasDataFlowStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_file_system.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_file_system.go index 5c1379f3749..552b4daa89a 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_file_system.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_file_system.go @@ -21,7 +21,11 @@ func resourceAlicloudNasFileSystem() *schema.Resource { Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, - + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, Schema: map[string]*schema.Schema{ "storage_type": { Type: schema.TypeString, @@ -32,6 +36,8 @@ func resourceAlicloudNasFileSystem() *schema.Resource { "Performance", "standard", "advance", + "advance_100", + "advance_200", }, false), }, "protocol_type": { @@ -41,8 +47,17 @@ func resourceAlicloudNasFileSystem() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ "NFS", "SMB", + "cpfs", }, false), }, + "vpc_id": { + Type: schema.TypeString, + Optional: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Optional: true, + }, "description": { Type: schema.TypeString, Optional: true, @@ -59,7 +74,7 @@ func resourceAlicloudNasFileSystem() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{"extreme", "standard"}, false), + ValidateFunc: validation.StringInSlice([]string{"extreme", "standard", "cpfs"}, false), Default: "standard", }, "capacity": { @@ -78,6 +93,7 @@ func resourceAlicloudNasFileSystem() *schema.Resource { Optional: true, Computed: true, }, + "tags": tagsSchema(), }, } } @@ -91,7 +107,7 @@ func resourceAlicloudNasFileSystemCreate(d *schema.ResourceData, meta interface{ if err != nil { return WrapError(err) } - request["RegiondId"] = client.RegionId + request["RegionId"] = client.RegionId request["ProtocolType"] = d.Get("protocol_type") if v, ok := d.GetOk("file_system_type"); ok { request["FileSystemType"] = v @@ -107,6 +123,12 @@ func resourceAlicloudNasFileSystemCreate(d *schema.ResourceData, meta interface{ if v, ok := d.GetOk("kms_key_id"); ok { request["KmsKeyId"] = v } + if v, ok := d.GetOk("vpc_id"); ok { + request["VpcId"] = v + } + if v, ok := d.GetOk("vswitch_id"); ok { + request["VSwitchId"] = v + } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { @@ -126,10 +148,10 @@ func resourceAlicloudNasFileSystemCreate(d *schema.ResourceData, meta interface{ } d.SetId(fmt.Sprint(response["FileSystemId"])) - // Creating an extreme filesystem is asynchronous, so you need to block and wait until the creation is complete - if d.Get("file_system_type") == "extreme" { + // Creating an extreme/cpfs filesystem is asynchronous, so you need to block and wait until the creation is complete + if d.Get("file_system_type") == "extreme" || d.Get("file_system_type") == "cpfs" { nasService := NasService{client} - stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutRead), 3*time.Second, nasService.DescribeNasFileSystemStateRefreshFunc(d.Id(), "Pending", []string{"Stopped", "Stopping", "Deleting"})) + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutCreate), 3*time.Second, nasService.DescribeNasFileSystemStateRefreshFunc(d.Id(), "Pending", []string{"Stopped", "Stopping", "Deleting"})) if _, err := stateConf.WaitForState(); err != nil { return WrapErrorf(err, IdMsg, d.Id()) } @@ -139,18 +161,28 @@ func resourceAlicloudNasFileSystemCreate(d *schema.ResourceData, meta interface{ func resourceAlicloudNasFileSystemUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} request := map[string]interface{}{ "RegionId": client.RegionId, "FileSystemId": d.Id(), } + d.Partial(true) + + if d.HasChange("tags") { + if err := nasService.SetResourceTags(d, "filesystem"); err != nil { + return WrapError(err) + } + d.SetPartial("tags") + } + if d.HasChange("description") { request["Description"] = d.Get("description") action := "ModifyFileSystem" - conn, err := client.NewNasClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -167,7 +199,9 @@ func resourceAlicloudNasFileSystemUpdate(d *schema.ResourceData, meta interface{ if err != nil { return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) } + d.SetPartial("description") } + d.Partial(false) return resourceAlicloudNasFileSystemRead(d, meta) } @@ -192,6 +226,9 @@ func resourceAlicloudNasFileSystemRead(d *schema.ResourceData, meta interface{}) d.Set("capacity", object["Capacity"]) d.Set("zone_id", object["ZoneId"]) d.Set("kms_key_id", object["KMSKeyId"]) + + tagResp, _ := nasService.ListTagResources(d.Id(), "filesystem") + d.Set("tags", tagsToMap(tagResp)) return nil } @@ -226,5 +263,13 @@ func resourceAlicloudNasFileSystemDelete(d *schema.ResourceData, meta interface{ } return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) } + + if d.Get("file_system_type") == "cpfs" { + nasService := NasService{client} + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 3*time.Second, nasService.DescribeNasFileSystemStateRefreshFunc(d.Id(), "Running", []string{"Pending"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } return nil } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_fileset.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_fileset.go new file mode 100644 index 00000000000..89aa1c6de5a --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_fileset.go @@ -0,0 +1,222 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudNasFileset() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudNasFilesetCreate, + Read: resourceAlicloudNasFilesetRead, + Update: resourceAlicloudNasFilesetUpdate, + Delete: resourceAlicloudNasFilesetDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(2 * time.Minute), + Delete: schema.DefaultTimeout(2 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.All(validation.StringLenBetween(2, 128), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It cannot begin with \"http://\", \"https://\".")), + }, + "dry_run": { + Type: schema.TypeBool, + Optional: true, + }, + "file_system_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "file_system_path": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "fileset_id": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudNasFilesetCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateFileset" + request := make(map[string]interface{}) + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + request["FileSystemId"] = d.Get("file_system_id") + request["FileSystemPath"] = d.Get("file_system_path") + request["ClientToken"] = buildClientToken("CreateFileset") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_nas_fileset", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["FileSystemId"], ":", response["FsetId"])) + nasService := NasService{client} + stateConf := BuildStateConf([]string{}, []string{"CREATED"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, nasService.NasFilesetStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudNasFilesetRead(d, meta) +} +func resourceAlicloudNasFilesetRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + object, err := nasService.DescribeNasFileset(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_nas_fileset nasService.DescribeNasFileset Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + d.Set("file_system_id", parts[0]) + d.Set("fileset_id", parts[1]) + d.Set("description", object["Description"]) + d.Set("file_system_path", object["FileSystemPath"]) + d.Set("status", object["Status"]) + return nil +} +func resourceAlicloudNasFilesetUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "FileSystemId": parts[0], + "FsetId": parts[1], + } + if d.HasChange("description") { + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + } + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + action := "ModifyFileset" + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + request["ClientToken"] = buildClientToken("ModifyFileset") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return resourceAlicloudNasFilesetRead(d, meta) +} +func resourceAlicloudNasFilesetDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + action := "DeleteFileset" + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "FileSystemId": parts[0], + "FsetId": parts[1], + } + + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + request["ClientToken"] = buildClientToken("DeleteFileset") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + nasService := NasService{client} + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutCreate), 5*time.Second, nasService.NasFilesetStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_lifecycle_policy.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_lifecycle_policy.go new file mode 100644 index 00000000000..45fe7ebac44 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_lifecycle_policy.go @@ -0,0 +1,190 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudNasLifecyclePolicy() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudNasLifecyclePolicyCreate, + Read: resourceAlicloudNasLifecyclePolicyRead, + Update: resourceAlicloudNasLifecyclePolicyUpdate, + Delete: resourceAlicloudNasLifecyclePolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "file_system_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "lifecycle_policy_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "lifecycle_rule_name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"DEFAULT_ATIME_14", "DEFAULT_ATIME_30", "DEFAULT_ATIME_60", "DEFAULT_ATIME_90"}, false), + }, + "paths": { + Type: schema.TypeList, + Required: true, + MaxItems: 10, + Elem: &schema.Schema{Type: schema.TypeString}, + ForceNew: true, + }, + "storage_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"InfrequentAccess"}, false), + }, + }, + } +} + +func resourceAlicloudNasLifecyclePolicyCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateLifecyclePolicy" + request := make(map[string]interface{}) + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + request["FileSystemId"] = d.Get("file_system_id") + request["LifecyclePolicyName"] = d.Get("lifecycle_policy_name") + request["LifecycleRuleName"] = d.Get("lifecycle_rule_name") + request["Paths"] = d.Get("paths") + request["StorageType"] = d.Get("storage_type") + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_nas_lifecycle_policy", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["FileSystemId"], ":", request["LifecyclePolicyName"])) + + return resourceAlicloudNasLifecyclePolicyRead(d, meta) +} +func resourceAlicloudNasLifecyclePolicyRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + object, err := nasService.DescribeNasLifecyclePolicy(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_nas_lifecycle_policy nasService.DescribeNasLifecyclePolicy Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("file_system_id", object["FileSystemId"]) + d.Set("lifecycle_policy_name", object["LifecyclePolicyName"]) + d.Set("lifecycle_rule_name", object["LifecycleRuleName"]) + d.Set("paths", object["Paths"]) + d.Set("storage_type", object["StorageType"]) + return nil +} +func resourceAlicloudNasLifecyclePolicyUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + update := false + request := map[string]interface{}{ + "FileSystemId": parts[0], + "LifecyclePolicyName": parts[1], + } + + request["LifecycleRuleName"] = d.Get("lifecycle_rule_name") + if d.HasChange("lifecycle_rule_name") { + update = true + } + if update { + action := "ModifyLifecyclePolicy" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + return resourceAlicloudNasLifecyclePolicyRead(d, meta) +} +func resourceAlicloudNasLifecyclePolicyDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + action := "DeleteLifecyclePolicy" + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "FileSystemId": parts[0], + "LifecyclePolicyName": parts[1], + } + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidFileSystem.NotFound", "InvalidLifecyclePolicy.NotFound"}) { + return nil + } + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_mount_target.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_mount_target.go index d8916962345..b3a7f780371 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_mount_target.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_mount_target.go @@ -23,7 +23,8 @@ func resourceAlicloudNasMountTarget() *schema.Resource { State: schema.ImportStatePassthrough, }, Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(5 * time.Minute), + Create: schema.DefaultTimeout(40 * time.Minute), + Delete: schema.DefaultTimeout(40 * time.Minute), }, Schema: map[string]*schema.Schema{ "access_group_name": { @@ -104,7 +105,7 @@ func resourceAlicloudNasMountTargetCreate(d *schema.ResourceData, meta interface } d.SetId(fmt.Sprint(request["FileSystemId"], ":", response["MountTargetDomain"])) - stateConf := BuildStateConf([]string{}, []string{"Active"}, d.Timeout(schema.TimeoutCreate), 10*time.Second, nasService.NasMountTargetStateRefreshFunc(d.Id(), []string{"Inactive"})) + stateConf := BuildStateConf([]string{}, []string{"Active"}, d.Timeout(schema.TimeoutCreate), 10*time.Second, nasService.NasMountTargetStateRefreshFunc(d.Id(), []string{})) if _, err := stateConf.WaitForState(); err != nil { return WrapErrorf(err, IdMsg, d.Id()) } @@ -138,6 +139,10 @@ func resourceAlicloudNasMountTargetRead(d *schema.ResourceData, meta interface{} } func resourceAlicloudNasMountTargetUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} if len(strings.Split(d.Id(), ":")) != 2 { d.SetId(fmt.Sprintf("%v:%v", strings.Split(d.Id(), "-")[0], d.Id())) @@ -161,10 +166,6 @@ func resourceAlicloudNasMountTargetUpdate(d *schema.ResourceData, meta interface } if update { action := "ModifyMountTarget" - conn, err := client.NewNasClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -223,5 +224,10 @@ func resourceAlicloudNasMountTargetDelete(d *schema.ResourceData, meta interface } return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) } + nasService := NasService{client} + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 10*time.Second, nasService.NasMountTargetStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } return nil } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_recycle_bin.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_recycle_bin.go new file mode 100644 index 00000000000..d6b234a722d --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_recycle_bin.go @@ -0,0 +1,159 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudNasRecycleBin() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudNasRecycleBinCreate, + Read: resourceAlicloudNasRecycleBinRead, + Update: resourceAlicloudNasRecycleBinUpdate, + Delete: resourceAlicloudNasRecycleBinDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "file_system_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "reserved_days": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ValidateFunc: validation.IntBetween(1, 180), + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudNasRecycleBinCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "EnableRecycleBin" + request := make(map[string]interface{}) + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + request["FileSystemId"] = d.Get("file_system_id") + if v, ok := d.GetOk("reserved_days"); ok { + request["ReservedDays"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_nas_recycle_bin", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["FileSystemId"])) + + return resourceAlicloudNasRecycleBinRead(d, meta) +} +func resourceAlicloudNasRecycleBinRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + object, err := nasService.DescribeNasRecycleBin(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_nas_recycle_bin nasService.DescribeNasRecycleBin Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + + d.Set("file_system_id", d.Id()) + d.Set("reserved_days", formatInt(object["ReservedDays"])) + d.Set("status", object["Status"]) + return nil +} +func resourceAlicloudNasRecycleBinUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + request := map[string]interface{}{ + "FileSystemId": d.Id(), + } + var response map[string]interface{} + if d.HasChange("reserved_days") { + if v, ok := d.GetOk("reserved_days"); ok { + request["ReservedDays"] = v + } + } + action := "UpdateRecycleBinAttribute" + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2017-06-26"), StringPointer("AK"), request, nil, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return resourceAlicloudNasRecycleBinRead(d, meta) +} +func resourceAlicloudNasRecycleBinDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DisableAndCleanRecycleBin" + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "FileSystemId": d.Id(), + } + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2017-06-26"), StringPointer("AK"), request, nil, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_snapshot.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_snapshot.go new file mode 100644 index 00000000000..4d6091f2ec2 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nas_snapshot.go @@ -0,0 +1,163 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudNasSnapshot() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudNasSnapshotCreate, + Read: resourceAlicloudNasSnapshotRead, + Delete: resourceAlicloudNasSnapshotDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.All(validation.StringLenBetween(2, 256), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It must be `2` to `256` characters in length and cannot start with `https://` or `https://`.")), + }, + "file_system_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "retention_days": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + "snapshot_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.All(validation.StringLenBetween(2, 128), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It must be `2` to `128` characters in length and must start with a letter, but cannot start with `https://` or `https://`.")), + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudNasSnapshotCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateSnapshot" + request := make(map[string]interface{}) + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + request["FileSystemId"] = d.Get("file_system_id") + if v, ok := d.GetOk("retention_days"); ok { + request["RetentionDays"] = v + } + if v, ok := d.GetOk("snapshot_name"); ok { + request["SnapshotName"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_nas_snapshot", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["SnapshotId"])) + nasService := NasService{client} + stateConf := BuildStateConf([]string{}, []string{"accomplished"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, nasService.NasSnapshotStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudNasSnapshotRead(d, meta) +} +func resourceAlicloudNasSnapshotRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + object, err := nasService.DescribeNasSnapshot(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_nas_snapshot nasService.DescribeNasSnapshot Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("description", object["Description"]) + if v, ok := object["RetentionDays"]; ok && fmt.Sprint(v) != "0" { + d.Set("retention_days", formatInt(v)) + } + d.Set("snapshot_name", object["SnapshotName"]) + d.Set("file_system_id", object["SourceFileSystemId"]) + d.Set("status", object["Status"]) + return nil +} +func resourceAlicloudNasSnapshotDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + nasService := NasService{client} + action := "DeleteSnapshot" + var response map[string]interface{} + conn, err := client.NewNasClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "SnapshotId": d.Id(), + } + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidFileSystem.NotFound"}) { + return nil + } + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, nasService.NasSnapshotStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nat_gateway.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nat_gateway.go index 73d1f9f9dff..2871785978d 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nat_gateway.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_nat_gateway.go @@ -488,6 +488,10 @@ func resourceAlicloudNatGatewayUpdate(d *schema.ResourceData, meta interface{}) return resourceAlicloudNatGatewayRead(d, meta) } func resourceAlicloudNatGatewayDelete(d *schema.ResourceData, meta interface{}) error { + if d.Get("payment_type").(string) == "Subscription" || d.Get("instance_charge_type").(string) == "Prepaid" { + log.Printf("[WARN] Cannot destroy Subscription resource: alicloud_nat_gateway. Terraform will remove this resource from the state file, however resources may remain.") + return nil + } client := meta.(*connectivity.AliyunClient) vpcService := VpcService{client} action := "DeleteNatGateway" diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_application.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_application.go index 1e0e1343f8d..943f0cf5b1a 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_application.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_application.go @@ -32,6 +32,7 @@ func resourceAlicloudOosApplication() *schema.Resource { "resource_group_id": { Type: schema.TypeString, Optional: true, + Computed: true, ForceNew: true, }, "tags": tagsSchema(), @@ -107,6 +108,10 @@ func resourceAlicloudOosApplicationRead(d *schema.ResourceData, meta interface{} } func resourceAlicloudOosApplicationUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewOosClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -131,10 +136,6 @@ func resourceAlicloudOosApplicationUpdate(d *schema.ResourceData, meta interface } if update { action := "UpdateApplication" - conn, err := client.NewOosClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-06-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_parameter.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_parameter.go index 40c75f67c6d..310ae529c1d 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_parameter.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_parameter.go @@ -143,6 +143,10 @@ func resourceAlicloudOosParameterRead(d *schema.ResourceData, meta interface{}) } func resourceAlicloudOosParameterUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewOosClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -176,10 +180,6 @@ func resourceAlicloudOosParameterUpdate(d *schema.ResourceData, meta interface{} } if update { action := "UpdateParameter" - conn, err := client.NewOosClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-06-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_patch_baseline.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_patch_baseline.go index a779ebfdf2c..19c0247b86f 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_patch_baseline.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_patch_baseline.go @@ -111,6 +111,10 @@ func resourceAlicloudOosPatchBaselineRead(d *schema.ResourceData, meta interface } func resourceAlicloudOosPatchBaselineUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewOosClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -128,10 +132,6 @@ func resourceAlicloudOosPatchBaselineUpdate(d *schema.ResourceData, meta interfa } if update { action := "UpdatePatchBaseline" - conn, err := client.NewOosClient() - if err != nil { - return WrapError(err) - } request["ClientToken"] = buildClientToken("UpdatePatchBaseline") runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_secret_parameter.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_secret_parameter.go index b6fc453737f..7137330d2c3 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_secret_parameter.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_secret_parameter.go @@ -153,6 +153,10 @@ func resourceAlicloudOosSecretParameterRead(d *schema.ResourceData, meta interfa } func resourceAlicloudOosSecretParameterUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewOosClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -187,10 +191,6 @@ func resourceAlicloudOosSecretParameterUpdate(d *schema.ResourceData, meta inter } if update { action := "UpdateSecretParameter" - conn, err := client.NewOosClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-06-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_service_setting.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_service_setting.go index fbf614ebc93..2334edf147c 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_service_setting.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_service_setting.go @@ -133,6 +133,10 @@ func resourceAlicloudOosServiceSettingRead(d *schema.ResourceData, meta interfac } func resourceAlicloudOosServiceSettingUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewOosClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{} @@ -168,10 +172,6 @@ func resourceAlicloudOosServiceSettingUpdate(d *schema.ResourceData, meta interf } if update { action := "SetServiceSettings" - conn, err := client.NewOosClient() - if err != nil { - return WrapError(err) - } request["RegionId"] = client.RegionId wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_state_configuration.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_state_configuration.go index 3a45c8e4669..f021ef79ba4 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_state_configuration.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_state_configuration.go @@ -165,6 +165,10 @@ func resourceAlicloudOosStateConfigurationRead(d *schema.ResourceData, meta inte } func resourceAlicloudOosStateConfigurationUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewOosClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -219,10 +223,6 @@ func resourceAlicloudOosStateConfigurationUpdate(d *schema.ResourceData, meta in } if update { action := "UpdateStateConfiguration" - conn, err := client.NewOosClient() - if err != nil { - return WrapError(err) - } request["ClientToken"] = buildClientToken("UpdateStateConfiguration") runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_template.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_template.go index 8efcbc60859..bb1389f8920 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_template.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_oos_template.go @@ -170,6 +170,10 @@ func resourceAlicloudOosTemplateRead(d *schema.ResourceData, meta interface{}) e } func resourceAlicloudOosTemplateUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewOosClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -194,10 +198,6 @@ func resourceAlicloudOosTemplateUpdate(d *schema.ResourceData, meta interface{}) } if update { action := "UpdateTemplate" - conn, err := client.NewOosClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-06-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_endpoint.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_endpoint.go index 5d818eaac26..c106dca29ed 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_endpoint.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_endpoint.go @@ -159,6 +159,10 @@ func resourceAlicloudPvtzEndpointRead(d *schema.ResourceData, meta interface{}) } func resourceAlicloudPvtzEndpointUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewPvtzClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} request := map[string]interface{}{ "EndpointId": d.Id(), @@ -185,10 +189,6 @@ func resourceAlicloudPvtzEndpointUpdate(d *schema.ResourceData, meta interface{} request["Lang"] = "en" if update { action := "UpdateResolverEndpoint" - conn, err := client.NewPvtzClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_rule.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_rule.go index 01ba51e87e0..97b4ea01b7e 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_rule.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_rule.go @@ -137,6 +137,10 @@ func resourceAlicloudPvtzRuleRead(d *schema.ResourceData, meta interface{}) erro } func resourceAlicloudPvtzRuleUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewPvtzClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -160,10 +164,6 @@ func resourceAlicloudPvtzRuleUpdate(d *schema.ResourceData, meta interface{}) er if update { request["Lang"] = "en" action := "UpdateResolverRule" - conn, err := client.NewPvtzClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_rule_attachment.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_rule_attachment.go index e48fdcebf84..f3d011c1831 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_rule_attachment.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_pvtz_rule_attachment.go @@ -115,6 +115,10 @@ func resourceAlicloudPvtzRuleAttachmentRead(d *schema.ResourceData, meta interfa } func resourceAlicloudPvtzRuleAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewPvtzClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -133,10 +137,6 @@ func resourceAlicloudPvtzRuleAttachmentUpdate(d *schema.ResourceData, meta inter if update { request["Lang"] = "en" action := "BindResolverRuleVpc" - conn, err := client.NewPvtzClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-01"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ram_saml_provider.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ram_saml_provider.go index 4b7dec45c85..ed33eb137c2 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ram_saml_provider.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ram_saml_provider.go @@ -110,6 +110,10 @@ func resourceAlicloudRamSamlProviderRead(d *schema.ResourceData, meta interface{ } func resourceAlicloudRamSamlProviderUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewImsClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -125,10 +129,6 @@ func resourceAlicloudRamSamlProviderUpdate(d *schema.ResourceData, meta interfac } if update { action := "UpdateSAMLProvider" - conn, err := client.NewImsClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ram_security_preference.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ram_security_preference.go new file mode 100644 index 00000000000..cc5a970afdf --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ram_security_preference.go @@ -0,0 +1,209 @@ +package alicloud + +import ( + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudRamSecurityPreference() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudRamSecurityPreferenceCreate, + Read: resourceAlicloudRamSecurityPreferenceRead, + Update: resourceAlicloudRamSecurityPreferenceUpdate, + Delete: resourceAlicloudRamSecurityPreferenceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "enable_save_mfa_ticket": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "allow_user_to_change_password": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "allow_user_to_manage_access_keys": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "allow_user_to_manage_mfa_devices": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "login_session_duration": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "login_network_masks": { + Type: schema.TypeString, + Optional: true, + }, + "enforce_mfa_for_login": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + }, + } +} + +func resourceAlicloudRamSecurityPreferenceCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "SetSecurityPreference" + request := make(map[string]interface{}) + conn, err := client.NewImsClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOkExists("allow_user_to_change_password"); ok { + request["AllowUserToChangePassword"] = v + } + if v, ok := d.GetOkExists("allow_user_to_manage_access_keys"); ok { + request["AllowUserToManageAccessKeys"] = v + } + if v, ok := d.GetOkExists("allow_user_to_manage_mfa_devices"); ok { + request["AllowUserToManageMFADevices"] = v + } + if v, ok := d.GetOkExists("enable_save_mfa_ticket"); ok { + request["EnableSaveMFATicket"] = v + } + if v, ok := d.GetOk("login_network_masks"); ok { + request["LoginNetworkMasks"] = v + } + if v, ok := d.GetOk("login_session_duration"); ok { + request["LoginSessionDuration"] = v + } + if v, ok := d.GetOk("enforce_mfa_for_login"); ok { + request["EnforceMFAForLogin"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_ram_security_preference", action, AlibabaCloudSdkGoERROR) + } + + d.SetId("RamSecurityPreference") + + return resourceAlicloudRamSecurityPreferenceRead(d, meta) +} +func resourceAlicloudRamSecurityPreferenceRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + ramService := RamService{client} + object, err := ramService.DescribeRamSecurityPreference(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_ram_security_preference ramService.DescribeRamSecurityPreference Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + if v, exist := object["AccessKeyPreference"].(map[string]interface{}); exist { + d.Set("allow_user_to_manage_access_keys", v["AllowUserToManageAccessKeys"]) + } + if v, exist := object["LoginProfilePreference"].(map[string]interface{}); exist { + d.Set("allow_user_to_change_password", v["AllowUserToChangePassword"]) + d.Set("enable_save_mfa_ticket", v["EnableSaveMFATicket"]) + d.Set("login_network_masks", v["LoginNetworkMasks"]) + d.Set("login_session_duration", v["LoginSessionDuration"]) + d.Set("enforce_mfa_for_login", v["EnforceMFAForLogin"]) + } + + if v, exist := object["MFAPreference"].(map[string]interface{}); exist { + d.Set("allow_user_to_manage_mfa_devices", v["AllowUserToManageMFADevices"]) + } + + return nil +} +func resourceAlicloudRamSecurityPreferenceUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + conn, err := client.NewImsClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + update := false + request := map[string]interface{}{} + + if d.HasChange("allow_user_to_change_password") { + update = true + } + request["AllowUserToChangePassword"] = d.Get("allow_user_to_change_password") + + if d.HasChange("allow_user_to_manage_access_keys") { + update = true + } + request["AllowUserToManageAccessKeys"] = d.Get("allow_user_to_manage_access_keys") + + if d.HasChange("allow_user_to_manage_mfa_devices") { + update = true + } + request["AllowUserToManageMFADevices"] = d.Get("allow_user_to_manage_mfa_devices") + + if d.HasChange("enable_save_mfa_ticket") { + update = true + } + request["EnableSaveMFATicket"] = d.Get("enable_save_mfa_ticket") + + if d.HasChange("login_network_masks") { + update = true + } + request["LoginNetworkMasks"] = d.Get("login_network_masks") + if d.HasChange("login_session_duration") { + update = true + } + request["LoginSessionDuration"] = d.Get("login_session_duration") + + if d.HasChange("enforce_mfa_for_login") { + update = true + } + request["EnforceMFAForLogin"] = d.Get("enforce_mfa_for_login") + + if update { + action := "SetSecurityPreference" + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + return resourceAlicloudRamSecurityPreferenceRead(d, meta) +} +func resourceAlicloudRamSecurityPreferenceDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[WARN] Cannot destroy resourceAlicloudRamSecurityPreference. Terraform will remove this resource from the state file, however resources may remain.") + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_account.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_account.go index 52e396d625e..96d9f74cf70 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_account.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_account.go @@ -366,7 +366,7 @@ func resourceAlicloudRdsAccountDelete(d *schema.ResourceData, meta interface{}) err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) if err != nil { - if NeedRetry(err) { + if NeedRetry(err) && IsExpectedErrors(err, []string{"InternalError", "OperationDenied.DBClusterStatus", "OperationDenied.DBInstanceStatus", "OperationDenied.DBStatus"}) { wait() return resource.RetryableError(err) } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_backup.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_backup.go new file mode 100644 index 00000000000..f153cac0bb4 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_backup.go @@ -0,0 +1,179 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudRdsBackup() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudRdsBackupCreate, + Read: resourceAlicloudRdsBackupRead, + Update: resourceAlicloudRdsBackupUpdate, + Delete: resourceAlicloudRdsBackupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "backup_method": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "backup_strategy": { + Type: schema.TypeString, + Optional: true, + }, + "backup_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "db_instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "db_name": { + Type: schema.TypeString, + Optional: true, + }, + "backup_id": { + Type: schema.TypeString, + Computed: true, + }, + "remove_from_state": { + Type: schema.TypeBool, + Optional: true, + }, + "store_status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudRdsBackupCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rdsService := RdsService{client} + var response map[string]interface{} + action := "CreateBackup" + request := make(map[string]interface{}) + request["SourceIp"] = client.SourceIp + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("backup_method"); ok { + request["BackupMethod"] = v + } + if v, ok := d.GetOk("backup_strategy"); ok { + request["BackupStrategy"] = v + } + if v, ok := d.GetOk("backup_type"); ok { + request["BackupType"] = v + } + request["DBInstanceId"] = d.Get("db_instance_id") + if v, ok := d.GetOk("db_name"); ok { + request["DBName"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_rds_backup", action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"Finished"}, d.Timeout(schema.TimeoutCreate), 20*time.Second, rdsService.RdsBackupStateRefreshFunc(d.Get("db_instance_id").(string), response["BackupJobId"].(string), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + // Wait one minute because the query API(DescribeBackups) has not been synchronized when the backup status is Finished + time.Sleep(1 * time.Minute) + object, err := rdsService.DescribeBackupTasks(d.Get("db_instance_id").(string), response["BackupJobId"].(string)) + d.SetId(fmt.Sprint(request["DBInstanceId"], ":", object["BackupId"].(string))) + return resourceAlicloudRdsBackupRead(d, meta) +} + +func resourceAlicloudRdsBackupRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rdsService := RdsService{client} + object, err := rdsService.DescribeRdsBackup(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_rds_backup rdsService.DescribeRdsBackup Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + + d.Set("backup_method", object["BackupMethod"]) + d.Set("backup_type", object["BackupType"]) + d.Set("db_instance_id", object["DBInstanceId"]) + d.Set("backup_id", object["BackupId"]) + d.Set("store_status", object["StoreStatus"]) + return nil +} +func resourceAlicloudRdsBackupUpdate(d *schema.ResourceData, meta interface{}) error { + log.Println(fmt.Sprintf("[WARNING] The resouce has not update operation.")) + return resourceAlicloudRdsBackupRead(d, meta) +} +func resourceAlicloudRdsBackupDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteBackup" + parts, err := ParseResourceId(d.Id(), 2) + if d.Get("store_status").(string) == "Disabled" { + if !d.Get("remove_from_state").(bool) { + return WrapError(Error("the resource can not be deleted at this time and you can set remove_from_state to true to remove it.")) + } else { + return nil + } + } + var response map[string]interface{} + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "BackupId": parts[1], + "DBInstanceId": parts[0], + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_clone_db_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_clone_db_instance.go new file mode 100644 index 00000000000..3654091dbc1 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_clone_db_instance.go @@ -0,0 +1,1163 @@ +package alicloud + +import ( + "fmt" + "log" + "strings" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudRdsCloneDbInstance() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudRdsCloneDbInstanceCreate, + Read: resourceAlicloudRdsCloneDbInstanceRead, + Update: resourceAlicloudRdsCloneDbInstanceUpdate, + Delete: resourceAlicloudRdsCloneDbInstanceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(300 * time.Minute), + Update: schema.DefaultTimeout(30 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "acl": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"cert", "perfer", "verify-ca", "verify-full"}, false), + Computed: true, + }, + "auto_upgrade_minor_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"Auto", "Manual"}, false), + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return d.Get("engine").(string) != "MySQL" + }, + }, + "backup_id": { + Type: schema.TypeString, + Optional: true, + }, + "backup_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"FullBackup", "IncrementalBackup"}, false), + }, + "ca_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"aliyun", "custom"}, false), + Computed: true, + }, + "category": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"AlwaysOn", "Basic", "Finance", "HighAvailability"}, false), + }, + "certificate": { + Type: schema.TypeString, + Optional: true, + }, + "client_ca_enabled": { + Type: schema.TypeInt, + Optional: true, + }, + "client_ca_cert": { + Type: schema.TypeString, + Optional: true, + }, + "client_cert_revocation_list": { + Type: schema.TypeString, + Optional: true, + }, + "client_crl_enabled": { + Type: schema.TypeInt, + Optional: true, + }, + "connection_string": { + Type: schema.TypeString, + Computed: true, + }, + "connection_string_prefix": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(8, 64), + }, + "db_instance_class": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "db_instance_description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(2, 256), + }, + "db_instance_storage": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "db_instance_storage_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"cloud_essd", "cloud_essd2", "cloud_essd3", "cloud_ssd", "local_ssd"}, false), + }, + "db_name": { + Type: schema.TypeString, + Optional: true, + }, + "db_names": { + Type: schema.TypeString, + Optional: true, + }, + "dedicated_host_group_id": { + Type: schema.TypeString, + Optional: true, + }, + "direction": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"Auto", "Down", "TempUpgrade", "Up"}, false), + }, + "effective_time": { + Type: schema.TypeString, + Optional: true, + }, + "encryption_key": { + Type: schema.TypeString, + Optional: true, + }, + "engine": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "engine_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "pg_hba_conf": { + Type: schema.TypeSet, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + }, + "mask": { + Type: schema.TypeString, + Optional: true, + // if attribute contains Optional feature, need to add Default: "", otherwise when terraform plan is executed, unmodified items wil detect differences. + Default: "", + }, + "database": { + Type: schema.TypeString, + Required: true, + }, + "priority_id": { + Type: schema.TypeInt, + Required: true, + }, + "address": { + Type: schema.TypeString, + Required: true, + }, + "user": { + Type: schema.TypeString, + Required: true, + }, + "method": { + Type: schema.TypeString, + Required: true, + }, + "option": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + }, + }, + Optional: true, + Computed: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return d.Get("engine").(string) != string(PostgreSQL) + }, + }, + "force_restart": { + Type: schema.TypeBool, + Optional: true, + }, + "ha_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"RPO", "RTO"}, false), + }, + "instance_network_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Classic", "VPC"}, false), + Computed: true, + }, + "maintain_time": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "password": { + Type: schema.TypeString, + Optional: true, + }, + "payment_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"PayAsYouGo", "Subscription"}, false), + }, + "period": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"Month", "Year"}, false), + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return d.Get("payment_type").(string) != "Subscription" + }, + }, + "port": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "private_ip_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + }, + "released_keep_policy": { + Type: schema.TypeString, + Optional: true, + }, + "replication_acl": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"cert", "perfer", "verify-ca", "verify-full"}, false), + Computed: true, + }, + "resource_group_id": { + Type: schema.TypeString, + Optional: true, + }, + "restore_table": { + Type: schema.TypeString, + Optional: true, + }, + "restore_time": { + Type: schema.TypeString, + Optional: true, + }, + "role_arn": { + Type: schema.TypeString, + Optional: true, + }, + "security_ips": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + Optional: true, + }, + "server_cert": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "server_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "source_biz": { + Type: schema.TypeString, + Optional: true, + }, + "source_db_instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ssl_enabled": { + Type: schema.TypeInt, + ValidateFunc: validation.IntInSlice([]int{0, 1}), + Optional: true, + Computed: true, + }, + "switch_time": { + Type: schema.TypeString, + Optional: true, + }, + "sync_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"Async", "Semi-sync", "Sync"}, false), + }, + "tde_status": { + Type: schema.TypeString, + Optional: true, + }, + "table_meta": { + Type: schema.TypeString, + Optional: true, + }, + "used_time": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntInSlice([]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36}), + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return d.Get("payment_type").(string) != "Subscription" + }, + }, + "vpc_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "zone_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "parameters": { + Type: schema.TypeSet, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + Set: parameterToHash, + Optional: true, + Computed: true, + }, + }, + } +} + +func resourceAlicloudRdsCloneDbInstanceCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rdsService := RdsService{client} + var response map[string]interface{} + action := "CloneDBInstance" + request := make(map[string]interface{}) + request["SourceIp"] = client.SourceIp + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("backup_id"); ok { + request["BackupId"] = v + } + if v, ok := d.GetOk("backup_type"); ok { + request["BackupType"] = v + } + if v, ok := d.GetOk("category"); ok { + request["Category"] = v + } + if v, ok := d.GetOk("db_instance_class"); ok { + request["DBInstanceClass"] = v + } + if v, ok := d.GetOk("db_instance_storage"); ok { + request["DBInstanceStorage"] = v + } + request["DBInstanceStorageType"] = d.Get("db_instance_storage_type") + if v, ok := d.GetOk("db_names"); ok { + request["DbNames"] = v + } + if v, ok := d.GetOk("dedicated_host_group_id"); ok { + request["DedicatedHostGroupId"] = v + } + if v, ok := d.GetOk("instance_network_type"); ok { + request["InstanceNetworkType"] = v + } + request["PayType"] = convertRdsInstancePaymentTypeRequest(d.Get("payment_type")) + if v, ok := d.GetOk("period"); ok { + request["Period"] = v + } + if v, ok := d.GetOk("private_ip_address"); ok { + request["PrivateIpAddress"] = v + } + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("restore_table"); ok { + request["RestoreTable"] = v + } + if v, ok := d.GetOk("restore_time"); ok { + request["RestoreTime"] = v + } + request["DBInstanceId"] = d.Get("source_db_instance_id") + if v, ok := d.GetOk("table_meta"); ok { + request["TableMeta"] = v + } + if v, ok := d.GetOk("used_time"); ok { + request["UsedTime"] = v + } + if v, ok := d.GetOk("zone_id"); ok { + request["ZoneId"] = v + } + if v, ok := d.GetOk("vpc_id"); ok { + request["VPCId"] = v + } + if v, ok := d.GetOk("vswitch_id"); ok { + request["VSwitchId"] = v + } + wait := incrementalWait(3*time.Second, 5*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if IsExpectedErrors(err, []string{"undefined"}) || NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_rds_clone_db_instance", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["DBInstanceId"])) + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{"Creating"}, []string{"Running"}, d.Timeout(schema.TimeoutCreate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudRdsCloneDbInstanceUpdate(d, meta) +} +func resourceAlicloudRdsCloneDbInstanceRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rdsService := RdsService{client} + object, err := rdsService.DescribeRdsCloneDbInstance(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_rds_clone_db_instance rdsService.DescribeRdsCloneDbInstance Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("auto_upgrade_minor_version", object["AutoUpgradeMinorVersion"]) + d.Set("category", object["Category"]) + d.Set("db_instance_class", object["DBInstanceClass"]) + d.Set("db_instance_description", object["DBInstanceDescription"]) + if v, ok := object["DBInstanceStorage"]; ok && fmt.Sprint(v) != "0" { + d.Set("db_instance_storage", formatInt(v)) + } + d.Set("db_instance_storage_type", object["DBInstanceStorageType"]) + d.Set("dedicated_host_group_id", object["DedicatedHostGroupId"]) + d.Set("engine", object["Engine"]) + d.Set("engine_version", object["EngineVersion"]) + d.Set("instance_network_type", object["InstanceNetworkType"]) + d.Set("maintain_time", object["MaintainTime"]) + d.Set("vswitch_id", object["VSwitchId"]) + d.Set("zone_id", object["ZoneId"]) + d.Set("payment_type", convertRdsInstancePaymentTypeResponse(object["PayType"])) + d.Set("port", object["Port"]) + d.Set("connection_string", object["ConnectionString"]) + + if err = rdsService.RefreshParameters(d, "parameters"); err != nil { + return WrapError(err) + } + if object["Engine"].(string) == string(PostgreSQL) && object["DBInstanceStorageType"].(string) != "local_ssd" { + if err = rdsService.RefreshPgHbaConf(d, "pg_hba_conf"); err != nil { + return WrapError(err) + } + } + describeDBInstanceHAConfigObject, err := rdsService.DescribeDBInstanceHAConfig(d.Id()) + if err != nil { + return WrapError(err) + } + d.Set("sync_mode", describeDBInstanceHAConfigObject["SyncMode"]) + d.Set("ha_mode", describeDBInstanceHAConfigObject["HAMode"]) + dbInstanceIpArrayName := "default" + describeDBInstanceIPArrayListObject, err := rdsService.GetSecurityIps(d.Id(), dbInstanceIpArrayName) + if err != nil { + return WrapError(err) + } + + d.Set("security_ips", describeDBInstanceIPArrayListObject) + describeDBInstanceNetInfoObject, err := rdsService.DescribeDBInstanceNetInfo(d.Id()) + if err != nil { + return WrapError(err) + } + + d.Set("private_ip_address", describeDBInstanceNetInfoObject[0].(map[string]interface{})["IPAddress"]) + + describeDBInstanceSSLObject, err := rdsService.DescribeDBInstanceSSL(d.Id()) + if err != nil { + return WrapError(err) + } + d.Set("acl", describeDBInstanceSSLObject["ACL"]) + d.Set("ca_type", describeDBInstanceSSLObject["CAType"]) + d.Set("client_ca_cert", describeDBInstanceSSLObject["ClientCACert"]) + d.Set("client_cert_revocation_list", describeDBInstanceSSLObject["ClientCertRevocationList"]) + d.Set("replication_acl", describeDBInstanceSSLObject["ReplicationACL"]) + d.Set("server_cert", describeDBInstanceSSLObject["ServerCert"]) + d.Set("server_key", describeDBInstanceSSLObject["ServerKey"]) + if v, ok := describeDBInstanceSSLObject["SSLEnabled"]; ok && v.(string) != "" { + sslEnabled := 0 + if v == "on" { + sslEnabled = 1 + } + d.Set("ssl_enabled'", sslEnabled) + } + return nil +} +func resourceAlicloudRdsCloneDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rdsService := RdsService{client} + var response map[string]interface{} + d.Partial(true) + + if d.HasChange("parameters") { + if err := rdsService.ModifyParameters(d, "parameters"); err != nil { + return WrapError(err) + } + } + if d.HasChange("pg_hba_conf") { + err := rdsService.ModifyPgHbaConfig(d, "pg_hba_conf") + if err != nil { + return WrapError(err) + } + } + update := false + request := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("auto_upgrade_minor_version") { + update = true + } + if v, ok := d.GetOk("auto_upgrade_minor_version"); ok { + request["AutoUpgradeMinorVersion"] = v + } + if update { + action := "ModifyDBInstanceAutoUpgradeMinorVersion" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + request["ClientToken"] = buildClientToken("ModifyDBInstanceAutoUpgradeMinorVersion") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("auto_upgrade_minor_version") + } + update = false + modifyDBInstanceDescriptionReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("db_instance_description") { + update = true + } + if v, ok := d.GetOk("db_instance_description"); ok { + modifyDBInstanceDescriptionReq["DBInstanceDescription"] = v + } + if update { + action := "ModifyDBInstanceDescription" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceDescriptionReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceDescriptionReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("db_instance_description") + } + update = false + modifyDBInstanceMaintainTimeReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("maintain_time") { + update = true + } + if v, ok := d.GetOk("maintain_time"); ok { + modifyDBInstanceMaintainTimeReq["MaintainTime"] = v + } + if update { + action := "ModifyDBInstanceMaintainTime" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + request["ClientToken"] = buildClientToken("ModifyDBInstanceMaintainTime") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceMaintainTimeReq, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceMaintainTimeReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("maintain_time") + } + update = false + modifyDBInstanceHAConfigReq := map[string]interface{}{ + "DbInstanceId": d.Id(), + } + if d.HasChange("sync_mode") { + update = true + } + if d.HasChange("ha_mode") { + update = true + } + if update { + if v, ok := d.GetOk("sync_mode"); ok { + modifyDBInstanceHAConfigReq["SyncMode"] = v + } + if v, ok := d.GetOk("ha_mode"); ok { + modifyDBInstanceHAConfigReq["HAMode"] = v + } + action := "ModifyDBInstanceHAConfig" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceHAConfigReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceHAConfigReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("sync_mode") + } + update = false + switchDBInstanceVpcReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if !d.IsNewResource() && d.HasChange("private_ip_address") { + update = true + if v, ok := d.GetOk("private_ip_address"); ok { + switchDBInstanceVpcReq["PrivateIpAddress"] = v + } + } + if !d.IsNewResource() && d.HasChange("vpc_id") { + update = true + if v, ok := d.GetOk("vpc_id"); ok { + switchDBInstanceVpcReq["VPCId"] = v + } + } + if !d.IsNewResource() && d.HasChange("vswitch_id") { + update = true + if v, ok := d.GetOk("vswitch_id"); ok { + switchDBInstanceVpcReq["VSwitchId"] = v + } + } + if update { + action := "SwitchDBInstanceVpc" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, switchDBInstanceVpcReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, switchDBInstanceVpcReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("private_ip_address") + d.SetPartial("vpc_id") + d.SetPartial("vswitch_id") + } + update = false + modifyDBInstanceConnectionStringReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("port") { + update = true + } + if d.HasChange("connection_string_prefix") { + update = true + } + if v, ok := d.GetOk("connection_string"); ok { + modifyDBInstanceConnectionStringReq["CurrentConnectionString"] = v + } + if update { + if v, ok := d.GetOk("connection_string_prefix"); ok { + modifyDBInstanceConnectionStringReq["ConnectionStringPrefix"] = v + } + if v, ok := d.GetOk("port"); ok { + modifyDBInstanceConnectionStringReq["Port"] = v + } + action := "ModifyDBInstanceConnectionString" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceConnectionStringReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceConnectionStringReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("connection_string") + } + update = false + modifyDBInstanceTDEReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("encryption_key") { + update = true + if v, ok := d.GetOk("encryption_key"); ok { + modifyDBInstanceTDEReq["EncryptionKey"] = v + } + } + if update { + if v, ok := d.GetOk("tde_status"); ok { + modifyDBInstanceTDEReq["TDEStatus"] = v + } + if v, ok := d.GetOk("certificate"); ok { + modifyDBInstanceTDEReq["Certificate"] = v + } + if v, ok := d.GetOk("db_name"); ok { + modifyDBInstanceTDEReq["DBName"] = v + } + if v, ok := d.GetOk("password"); ok { + modifyDBInstanceTDEReq["PassWord"] = v + } + if v, ok := d.GetOk("private_key"); ok { + modifyDBInstanceTDEReq["PrivateKey"] = v + } + if v, ok := d.GetOk("role_arn"); ok { + modifyDBInstanceTDEReq["RoleArn"] = v + } + action := "ModifyDBInstanceTDE" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceTDEReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceTDEReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("encryption_key") + } + update = false + modifySecurityIpsReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("security_ips") { + update = true + ipList := expandStringList(d.Get("security_ips").(*schema.Set).List()) + ipstr := strings.Join(ipList[:], COMMA_SEPARATED) + // default disable connect from outside + if ipstr == "" { + ipstr = LOCAL_HOST_IP + } + modifySecurityIpsReq["SecurityIps"] = ipstr + } + if update { + action := "ModifySecurityIps" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifySecurityIpsReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifySecurityIpsReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("security_ips") + } + update = false + modifyDBInstanceSSLReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + + if v, ok := d.GetOk("connection_string"); ok { + modifyDBInstanceSSLReq["ConnectionString"] = v + } + if d.HasChange("acl") { + update = true + if v, ok := d.GetOk("acl"); ok { + modifyDBInstanceSSLReq["ACL"] = v + } + } + if d.HasChange("ca_type") { + update = true + if v, ok := d.GetOk("ca_type"); ok { + modifyDBInstanceSSLReq["CAType"] = v + } + } + if d.HasChange("client_ca_cert") { + update = true + if v, ok := d.GetOk("client_ca_cert"); ok { + modifyDBInstanceSSLReq["ClientCACert"] = v + } + } + if d.HasChange("client_cert_revocation_list") { + update = true + if v, ok := d.GetOk("client_cert_revocation_list"); ok { + modifyDBInstanceSSLReq["ClientCertRevocationList"] = v + } + } + if d.HasChange("replication_acl") { + update = true + if v, ok := d.GetOk("replication_acl"); ok { + modifyDBInstanceSSLReq["ReplicationACL"] = v + } + } + if d.HasChange("server_cert") { + update = true + if v, ok := d.GetOk("server_cert"); ok { + modifyDBInstanceSSLReq["ServerCert"] = v + } + } + if d.HasChange("server_key") { + update = true + if v, ok := d.GetOk("server_key"); ok { + modifyDBInstanceSSLReq["ServerKey"] = v + } + } + if d.HasChange("client_ca_enabled") { + update = true + if v, ok := d.GetOk("client_ca_enabled"); ok { + modifyDBInstanceSSLReq["ClientCAEnabled"] = v + } + } + if d.HasChange("client_crl_enabled") { + update = true + if v, ok := d.GetOk("client_crl_enabled"); ok { + modifyDBInstanceSSLReq["ClientCrlEnabled"] = v + } + } + if d.HasChange("ssl_enabled") { + update = true + if v, ok := d.GetOk("ssl_enabled"); ok { + modifyDBInstanceSSLReq["SSLEnabled"] = v + } + } + if update { + action := "ModifyDBInstanceSSL" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceSSLReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceSSLReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("connection_string") + d.SetPartial("acl") + d.SetPartial("ca_type") + d.SetPartial("client_ca_cert") + d.SetPartial("client_cert_revocation_list") + d.SetPartial("replication_acl") + d.SetPartial("server_cert") + d.SetPartial("server_key") + d.SetPartial("ssl_enabled") + } + update = false + modifyDBInstanceSpecReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if !d.IsNewResource() && d.HasChange("payment_type") { + update = true + } + if v, ok := d.GetOk("payment_type"); ok { + modifyDBInstanceSpecReq["PayType"] = convertRdsInstancePaymentTypeRequest(v) + } + if !d.IsNewResource() && d.HasChange("db_instance_class") { + update = true + if v, ok := d.GetOk("db_instance_class"); ok { + modifyDBInstanceSpecReq["DBInstanceClass"] = v + } + } + if !d.IsNewResource() && d.HasChange("db_instance_storage") { + update = true + if v, ok := d.GetOk("db_instance_storage"); ok { + modifyDBInstanceSpecReq["DBInstanceStorage"] = v + } + } + if !d.IsNewResource() && d.HasChange("db_instance_storage_type") { + update = true + modifyDBInstanceSpecReq["DBInstanceStorageType"] = d.Get("db_instance_storage_type") + } + if !d.IsNewResource() && d.HasChange("dedicated_host_group_id") { + update = true + if v, ok := d.GetOk("dedicated_host_group_id"); ok { + modifyDBInstanceSpecReq["DedicatedHostGroupId"] = v + } + } + if d.HasChange("engine_version") { + update = true + if v, ok := d.GetOk("engine_version"); ok { + modifyDBInstanceSpecReq["EngineVersion"] = v + } + } + if !d.IsNewResource() && d.HasChange("zone_id") { + update = true + if v, ok := d.GetOk("zone_id"); ok { + modifyDBInstanceSpecReq["ZoneId"] = v + } + } + if update { + if v, ok := d.GetOk("direction"); ok { + modifyDBInstanceSpecReq["Direction"] = v + } + if v, ok := d.GetOk("effective_time"); ok { + modifyDBInstanceSpecReq["EffectiveTime"] = v + } + if v, ok := d.GetOk("resource_group_id"); ok { + modifyDBInstanceSpecReq["ResourceGroupId"] = v + } + if v, ok := d.GetOk("source_biz"); ok { + modifyDBInstanceSpecReq["SourceBiz"] = v + } + if v, ok := d.GetOk("switch_time"); ok { + modifyDBInstanceSpecReq["SwitchTime"] = v + } + if v, ok := d.GetOk("used_time"); ok { + modifyDBInstanceSpecReq["UsedTime"] = v + } + action := "ModifyDBInstanceSpec" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceSpecReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceSpecReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("db_instance_class") + d.SetPartial("db_instance_storage") + d.SetPartial("db_instance_storage_type") + d.SetPartial("dedicated_host_group_id") + d.SetPartial("engine_version") + d.SetPartial("zone_id") + } + d.Partial(false) + return resourceAlicloudRdsCloneDbInstanceRead(d, meta) +} +func resourceAlicloudRdsCloneDbInstanceDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteDBInstance" + var response map[string]interface{} + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + + request[""] = client.RegionId + if v, ok := d.GetOk("released_keep_policy"); ok { + request["ReleasedKeepPolicy"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} + +func convertRdsInstancePaymentTypeRequest(source interface{}) interface{} { + switch source { + case "PayAsYouGo": + return "Postpaid" + case "Subscription": + return "Prepaid" + } + return source +} +func convertRdsInstancePaymentTypeResponse(source interface{}) interface{} { + switch source { + case "Postpaid": + return "PayAsYouGo" + case "Prepaid": + return "Subscription" + } + return source +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_upgrade_db_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_upgrade_db_instance.go new file mode 100644 index 00000000000..fb071321915 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_rds_upgrade_db_instance.go @@ -0,0 +1,1134 @@ +package alicloud + +import ( + "fmt" + "log" + "strings" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudRdsUpgradeDbInstance() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudRdsUpgradeDbInstanceCreate, + Read: resourceAlicloudRdsUpgradeDbInstanceRead, + Update: resourceAlicloudRdsUpgradeDbInstanceUpdate, + Delete: resourceAlicloudRdsUpgradeDbInstanceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(300 * time.Minute), + Update: schema.DefaultTimeout(30 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "acl": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"cert", "perfer", "verify-ca", "verify-full"}, false), + Computed: true, + }, + "auto_upgrade_minor_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"Auto", "Manual"}, false), + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return d.Get("engine").(string) != "MySQL" + }, + }, + "ca_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"aliyun", "custom"}, false), + Computed: true, + }, + "certificate": { + Type: schema.TypeString, + Optional: true, + }, + "client_ca_enabled": { + Type: schema.TypeInt, + Optional: true, + }, + "client_ca_cert": { + Type: schema.TypeString, + Optional: true, + }, + "client_cert_revocation_list": { + Type: schema.TypeString, + Optional: true, + }, + "client_crl_enabled": { + Type: schema.TypeInt, + Optional: true, + }, + "connection_string": { + Type: schema.TypeString, + Computed: true, + }, + "connection_string_prefix": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(8, 64), + }, + "db_instance_class": { + Type: schema.TypeString, + Required: true, + }, + "db_instance_description": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringLenBetween(2, 256), + }, + "db_instance_storage": { + Type: schema.TypeInt, + Required: true, + }, + "db_instance_storage_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"cloud_essd", "cloud_essd2", "cloud_essd3", "cloud_ssd", "local_ssd"}, false), + }, + "db_name": { + Type: schema.TypeString, + Optional: true, + }, + "dedicated_host_group_id": { + Type: schema.TypeString, + Optional: true, + }, + "direction": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"Auto", "Down", "TempUpgrade", "Up"}, false), + }, + "effective_time": { + Type: schema.TypeString, + Optional: true, + }, + "encryption_key": { + Type: schema.TypeString, + Optional: true, + }, + "engine": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "engine_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "pg_hba_conf": { + Type: schema.TypeSet, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + }, + "mask": { + Type: schema.TypeString, + Optional: true, + // if attribute contains Optional feature, need to add Default: "", otherwise when terraform plan is executed, unmodified items wil detect differences. + Default: "", + }, + "database": { + Type: schema.TypeString, + Required: true, + }, + "priority_id": { + Type: schema.TypeInt, + Required: true, + }, + "address": { + Type: schema.TypeString, + Required: true, + }, + "user": { + Type: schema.TypeString, + Required: true, + }, + "method": { + Type: schema.TypeString, + Required: true, + }, + "option": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + }, + }, + Optional: true, + Computed: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return d.Get("engine").(string) != string(PostgreSQL) + }, + }, + "force_restart": { + Type: schema.TypeBool, + Optional: true, + }, + "ha_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"RPO", "RTO"}, false), + }, + "instance_network_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"Classic", "VPC"}, false), + }, + "maintain_time": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "password": { + Type: schema.TypeString, + Optional: true, + }, + "payment_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"PayAsYouGo", "Subscription"}, false), + }, + "port": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "private_ip_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + }, + "released_keep_policy": { + Type: schema.TypeString, + Optional: true, + }, + "replication_acl": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"cert", "perfer", "verify-ca", "verify-full"}, false), + Computed: true, + }, + "resource_group_id": { + Type: schema.TypeString, + Optional: true, + }, + "role_arn": { + Type: schema.TypeString, + Optional: true, + }, + "security_ips": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + Optional: true, + }, + "server_cert": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "server_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "source_biz": { + Type: schema.TypeString, + Optional: true, + }, + "source_db_instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ssl_enabled": { + Type: schema.TypeInt, + ValidateFunc: validation.IntInSlice([]int{0, 1}), + Optional: true, + Computed: true, + }, + "switch_time": { + Type: schema.TypeString, + Optional: true, + }, + "sync_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"Async", "Semi-sync", "Sync"}, false), + }, + "tde_status": { + Type: schema.TypeString, + Optional: true, + }, + "vpc_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vswitch_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "zone_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "zone_id_slave_1": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "switch_time_mode": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"Immediate", "MaintainTime"}, false), + }, + "switch_over": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false), + }, + "collect_stat_mode": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"Before", "After"}, false), + }, + "target_major_version": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "parameters": { + Type: schema.TypeSet, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + Set: parameterToHash, + Optional: true, + Computed: true, + }, + }, + } +} + +func resourceAlicloudRdsUpgradeDbInstanceCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rdsService := RdsService{client} + conn, err := client.NewRdsClient() + action := "UpgradeDBInstanceMajorVersionPrecheck" + request := map[string]interface{}{ + "RegionId": client.RegionId, + "DBInstanceId": d.Get("source_db_instance_id"), + "SourceIp": client.SourceIp, + } + if v, ok := d.GetOk("target_major_version"); ok && v.(string) != "" { + request["TargetMajorVersion"] = v + } + var response map[string]interface{} + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + addDebug(action, response, request) + stateConf := BuildStateConf([]string{}, []string{"Success"}, d.Timeout(schema.TimeoutCreate), 3*time.Second, rdsService.RdsUpgradeMajorVersionRefreshFunc(d.Get("source_db_instance_id").(string), formatInt(response["TaskId"]), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + action = "UpgradeDBInstanceMajorVersion" + request = make(map[string]interface{}) + request["SourceIp"] = client.SourceIp + + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("db_instance_class"); ok { + request["DBInstanceClass"] = v + } + if v, ok := d.GetOk("db_instance_storage"); ok { + request["DBInstanceStorage"] = v + } + request["PayType"] = convertRdsInstancePaymentTypeRequest(d.Get("payment_type")) + if v, ok := d.GetOk("instance_network_type"); ok { + request["InstanceNetworkType"] = v + } + if v, ok := d.GetOk("switch_time_mode"); ok { + request["SwitchTimeMode"] = v + } + if v, ok := d.GetOk("switch_over"); ok { + request["SwitchOver"] = v + } + if v, ok := d.GetOk("collect_stat_mode"); ok { + request["CollectStatMode"] = v + } + if v, ok := d.GetOk("target_major_version"); ok { + request["TargetMajorVersion"] = v + } + request["DBInstanceId"] = d.Get("source_db_instance_id") + if v, ok := d.GetOk("vpc_id"); ok { + request["VPCId"] = v + } + if v, ok := d.GetOk("vswitch_id"); ok { + request["VSwitchId"] = v + } + if v, ok := d.GetOk("private_ip_address"); ok { + request["PrivateIpAddress"] = v + } + request["DBInstanceStorageType"] = d.Get("db_instance_storage_type") + if v, ok := d.GetOk("zone_id"); ok { + request["ZoneId"] = v + } + if v, ok := d.GetOk("zone_id_slave_1"); ok { + request["ZoneIdSlave1"] = v + } + wait = incrementalWait(3*time.Second, 5*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_rds_upgrade_db_instance", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["DBInstanceId"])) + // wait instance status change from Creating to running + stateConf = BuildStateConf([]string{"Creating"}, []string{"Running"}, d.Timeout(schema.TimeoutCreate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudRdsUpgradeDbInstanceUpdate(d, meta) +} +func resourceAlicloudRdsUpgradeDbInstanceRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rdsService := RdsService{client} + object, err := rdsService.DescribeRdsCloneDbInstance(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_rds_upgrade_db_instance rdsService.DescribeRdsCloneDbInstance Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("auto_upgrade_minor_version", object["AutoUpgradeMinorVersion"]) + d.Set("db_instance_class", object["DBInstanceClass"]) + d.Set("db_instance_description", object["DBInstanceDescription"]) + if v, ok := object["DBInstanceStorage"]; ok && fmt.Sprint(v) != "0" { + d.Set("db_instance_storage", formatInt(v)) + } + d.Set("db_instance_storage_type", object["DBInstanceStorageType"]) + d.Set("dedicated_host_group_id", object["DedicatedHostGroupId"]) + d.Set("engine", object["Engine"]) + d.Set("engine_version", object["EngineVersion"]) + d.Set("instance_network_type", object["InstanceNetworkType"]) + d.Set("maintain_time", object["MaintainTime"]) + d.Set("vpc_id", object["VpcId"]) + d.Set("vswitch_id", object["VSwitchId"]) + d.Set("zone_id", object["ZoneId"]) + if len(object["SlaveZones"].(map[string]interface{})["SlaveZone"].([]interface{})) > 0 { + d.Set("zone_id_slave_1", object["SlaveZones"].(map[string]interface{})["SlaveZone"].([]interface{})[0].(map[string]interface{})["ZoneId"]) + } + d.Set("payment_type", convertRdsInstancePaymentTypeResponse(object["PayType"])) + d.Set("port", object["Port"]) + d.Set("connection_string", object["ConnectionString"]) + + if err = rdsService.RefreshParameters(d, "parameters"); err != nil { + return WrapError(err) + } + if object["Engine"].(string) == string(PostgreSQL) && object["DBInstanceStorageType"].(string) != "local_ssd" { + if err = rdsService.RefreshPgHbaConf(d, "pg_hba_conf"); err != nil { + return WrapError(err) + } + } + describeDBInstanceHAConfigObject, err := rdsService.DescribeDBInstanceHAConfig(d.Id()) + if err != nil { + return WrapError(err) + } + d.Set("sync_mode", describeDBInstanceHAConfigObject["SyncMode"]) + d.Set("ha_mode", describeDBInstanceHAConfigObject["HAMode"]) + dbInstanceIpArrayName := "default" + describeDBInstanceIPArrayListObject, err := rdsService.GetSecurityIps(d.Id(), dbInstanceIpArrayName) + if err != nil { + return WrapError(err) + } + + d.Set("security_ips", describeDBInstanceIPArrayListObject) + describeDBInstanceNetInfoObject, err := rdsService.DescribeDBInstanceNetInfo(d.Id()) + if err != nil { + return WrapError(err) + } + + d.Set("private_ip_address", describeDBInstanceNetInfoObject[0].(map[string]interface{})["IPAddress"]) + + describeDBInstanceSSLObject, err := rdsService.DescribeDBInstanceSSL(d.Id()) + if err != nil { + return WrapError(err) + } + d.Set("acl", describeDBInstanceSSLObject["ACL"]) + d.Set("ca_type", describeDBInstanceSSLObject["CAType"]) + d.Set("client_ca_cert", describeDBInstanceSSLObject["ClientCACert"]) + d.Set("client_cert_revocation_list", describeDBInstanceSSLObject["ClientCertRevocationList"]) + d.Set("replication_acl", describeDBInstanceSSLObject["ReplicationACL"]) + d.Set("server_cert", describeDBInstanceSSLObject["ServerCert"]) + d.Set("server_key", describeDBInstanceSSLObject["ServerKey"]) + if v, ok := describeDBInstanceSSLObject["SSLEnabled"]; ok && v.(string) != "" { + sslEnabled := 0 + if v == "on" { + sslEnabled = 1 + } + d.Set("ssl_enabled'", sslEnabled) + } + return nil +} +func resourceAlicloudRdsUpgradeDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rdsService := RdsService{client} + var response map[string]interface{} + d.Partial(true) + + if d.HasChange("parameters") { + if err := rdsService.ModifyParameters(d, "parameters"); err != nil { + return WrapError(err) + } + } + if d.HasChange("pg_hba_conf") { + err := rdsService.ModifyPgHbaConfig(d, "pg_hba_conf") + if err != nil { + return WrapError(err) + } + } + update := false + request := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("auto_upgrade_minor_version") { + update = true + } + if v, ok := d.GetOk("auto_upgrade_minor_version"); ok { + request["AutoUpgradeMinorVersion"] = v + } + if update { + action := "ModifyDBInstanceAutoUpgradeMinorVersion" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + request["ClientToken"] = buildClientToken("ModifyDBInstanceAutoUpgradeMinorVersion") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("auto_upgrade_minor_version") + } + update = false + modifyDBInstanceDescriptionReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("db_instance_description") { + update = true + } + if v, ok := d.GetOk("db_instance_description"); ok { + modifyDBInstanceDescriptionReq["DBInstanceDescription"] = v + } + if update { + action := "ModifyDBInstanceDescription" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceDescriptionReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceDescriptionReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("db_instance_description") + } + update = false + modifyDBInstanceMaintainTimeReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("maintain_time") { + update = true + } + if v, ok := d.GetOk("maintain_time"); ok { + modifyDBInstanceMaintainTimeReq["MaintainTime"] = v + } + if update { + action := "ModifyDBInstanceMaintainTime" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + request["ClientToken"] = buildClientToken("ModifyDBInstanceMaintainTime") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceMaintainTimeReq, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceMaintainTimeReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("maintain_time") + } + update = false + modifyDBInstanceHAConfigReq := map[string]interface{}{ + "DbInstanceId": d.Id(), + } + if d.HasChange("sync_mode") { + update = true + } + if d.HasChange("ha_mode") { + update = true + } + if update { + if v, ok := d.GetOk("sync_mode"); ok { + modifyDBInstanceHAConfigReq["SyncMode"] = v + } + if v, ok := d.GetOk("ha_mode"); ok { + modifyDBInstanceHAConfigReq["HAMode"] = v + } + action := "ModifyDBInstanceHAConfig" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceHAConfigReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceHAConfigReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("sync_mode") + } + update = false + switchDBInstanceVpcReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if !d.IsNewResource() && d.HasChange("private_ip_address") { + update = true + if v, ok := d.GetOk("private_ip_address"); ok { + switchDBInstanceVpcReq["PrivateIpAddress"] = v + } + } + if !d.IsNewResource() && d.HasChange("vpc_id") { + update = true + if v, ok := d.GetOk("vpc_id"); ok { + switchDBInstanceVpcReq["VPCId"] = v + } + } + if !d.IsNewResource() && d.HasChange("vswitch_id") { + update = true + if v, ok := d.GetOk("vswitch_id"); ok { + switchDBInstanceVpcReq["VSwitchId"] = v + } + } + if update { + action := "SwitchDBInstanceVpc" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, switchDBInstanceVpcReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, switchDBInstanceVpcReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("private_ip_address") + d.SetPartial("vpc_id") + d.SetPartial("vswitch_id") + } + update = false + modifyDBInstanceConnectionStringReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("port") { + update = true + } + if d.HasChange("connection_string_prefix") { + update = true + } + if v, ok := d.GetOk("connection_string"); ok { + modifyDBInstanceConnectionStringReq["CurrentConnectionString"] = v + } + if update { + if v, ok := d.GetOk("connection_string_prefix"); ok { + modifyDBInstanceConnectionStringReq["ConnectionStringPrefix"] = v + } + if v, ok := d.GetOk("port"); ok { + modifyDBInstanceConnectionStringReq["Port"] = v + } + action := "ModifyDBInstanceConnectionString" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceConnectionStringReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceConnectionStringReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("connection_string") + } + update = false + modifyDBInstanceTDEReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("encryption_key") { + update = true + if v, ok := d.GetOk("encryption_key"); ok { + modifyDBInstanceTDEReq["EncryptionKey"] = v + } + } + if update { + if v, ok := d.GetOk("tde_status"); ok { + modifyDBInstanceTDEReq["TDEStatus"] = v + } + if v, ok := d.GetOk("certificate"); ok { + modifyDBInstanceTDEReq["Certificate"] = v + } + if v, ok := d.GetOk("db_name"); ok { + modifyDBInstanceTDEReq["DBName"] = v + } + if v, ok := d.GetOk("password"); ok { + modifyDBInstanceTDEReq["PassWord"] = v + } + if v, ok := d.GetOk("private_key"); ok { + modifyDBInstanceTDEReq["PrivateKey"] = v + } + if v, ok := d.GetOk("role_arn"); ok { + modifyDBInstanceTDEReq["RoleArn"] = v + } + action := "ModifyDBInstanceTDE" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceTDEReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceTDEReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("encryption_key") + } + update = false + modifySecurityIpsReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if d.HasChange("security_ips") { + update = true + ipList := expandStringList(d.Get("security_ips").(*schema.Set).List()) + ipstr := strings.Join(ipList[:], COMMA_SEPARATED) + if ipstr == "" { + ipstr = LOCAL_HOST_IP + } + modifySecurityIpsReq["SecurityIps"] = ipstr + } + if update { + action := "ModifySecurityIps" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifySecurityIpsReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifySecurityIpsReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + d.SetPartial("security_ips") + } + update = false + modifyDBInstanceSSLReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + + if v, ok := d.GetOk("connection_string"); ok { + modifyDBInstanceSSLReq["ConnectionString"] = v + } + if d.HasChange("acl") { + update = true + if v, ok := d.GetOk("acl"); ok { + modifyDBInstanceSSLReq["ACL"] = v + } + } + if d.HasChange("ca_type") { + update = true + if v, ok := d.GetOk("ca_type"); ok { + modifyDBInstanceSSLReq["CAType"] = v + } + } + if d.HasChange("client_ca_cert") { + update = true + if v, ok := d.GetOk("client_ca_cert"); ok { + modifyDBInstanceSSLReq["ClientCACert"] = v + } + } + if d.HasChange("client_cert_revocation_list") { + update = true + if v, ok := d.GetOk("client_cert_revocation_list"); ok { + modifyDBInstanceSSLReq["ClientCertRevocationList"] = v + } + } + if d.HasChange("replication_acl") { + update = true + if v, ok := d.GetOk("replication_acl"); ok { + modifyDBInstanceSSLReq["ReplicationACL"] = v + } + } + if d.HasChange("server_cert") { + update = true + if v, ok := d.GetOk("server_cert"); ok { + modifyDBInstanceSSLReq["ServerCert"] = v + } + } + if d.HasChange("server_key") { + update = true + if v, ok := d.GetOk("server_key"); ok { + modifyDBInstanceSSLReq["ServerKey"] = v + } + } + if d.HasChange("client_ca_enabled") { + update = true + if v, ok := d.GetOk("client_ca_enabled"); ok { + modifyDBInstanceSSLReq["ClientCAEnabled"] = v + } + } + if d.HasChange("client_crl_enabled") { + update = true + if v, ok := d.GetOk("client_crl_enabled"); ok { + modifyDBInstanceSSLReq["ClientCrlEnabled"] = v + } + } + if d.HasChange("ssl_enabled") { + update = true + if v, ok := d.GetOk("ssl_enabled"); ok { + modifyDBInstanceSSLReq["SSLEnabled"] = v + } + } + if update { + action := "ModifyDBInstanceSSL" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceSSLReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceSSLReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("connection_string") + d.SetPartial("acl") + d.SetPartial("ca_type") + d.SetPartial("client_ca_cert") + d.SetPartial("client_cert_revocation_list") + d.SetPartial("replication_acl") + d.SetPartial("server_cert") + d.SetPartial("server_key") + d.SetPartial("ssl_enabled") + } + update = false + modifyDBInstanceSpecReq := map[string]interface{}{ + "DBInstanceId": d.Id(), + } + if !d.IsNewResource() && d.HasChange("payment_type") { + update = true + } + if v, ok := d.GetOk("payment_type"); ok { + modifyDBInstanceSpecReq["PayType"] = convertRdsInstancePaymentTypeRequest(v) + } + if !d.IsNewResource() && d.HasChange("db_instance_class") { + update = true + if v, ok := d.GetOk("db_instance_class"); ok { + modifyDBInstanceSpecReq["DBInstanceClass"] = v + } + } + if !d.IsNewResource() && d.HasChange("db_instance_storage") { + update = true + if v, ok := d.GetOk("db_instance_storage"); ok { + modifyDBInstanceSpecReq["DBInstanceStorage"] = v + } + } + if !d.IsNewResource() && d.HasChange("db_instance_storage_type") { + update = true + modifyDBInstanceSpecReq["DBInstanceStorageType"] = d.Get("db_instance_storage_type") + } + if !d.IsNewResource() && d.HasChange("dedicated_host_group_id") { + update = true + if v, ok := d.GetOk("dedicated_host_group_id"); ok { + modifyDBInstanceSpecReq["DedicatedHostGroupId"] = v + } + } + if d.HasChange("engine_version") { + update = true + if v, ok := d.GetOk("engine_version"); ok { + modifyDBInstanceSpecReq["EngineVersion"] = v + } + } + if !d.IsNewResource() && d.HasChange("zone_id") { + update = true + if v, ok := d.GetOk("zone_id"); ok { + modifyDBInstanceSpecReq["ZoneId"] = v + } + } + if update { + if v, ok := d.GetOk("direction"); ok { + modifyDBInstanceSpecReq["Direction"] = v + } + if v, ok := d.GetOk("effective_time"); ok { + modifyDBInstanceSpecReq["EffectiveTime"] = v + } + if v, ok := d.GetOk("resource_group_id"); ok { + modifyDBInstanceSpecReq["ResourceGroupId"] = v + } + if v, ok := d.GetOk("source_biz"); ok { + modifyDBInstanceSpecReq["SourceBiz"] = v + } + if v, ok := d.GetOk("switch_time"); ok { + modifyDBInstanceSpecReq["SwitchTime"] = v + } + action := "ModifyDBInstanceSpec" + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, modifyDBInstanceSpecReq, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, modifyDBInstanceSpecReq) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + // wait instance status change from Creating to running + stateConf := BuildStateConf([]string{}, []string{"Running"}, d.Timeout(schema.TimeoutUpdate), 3*time.Minute, rdsService.RdsDBInstanceStateRefreshFunc(d.Id(), []string{"Deleting"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + d.SetPartial("db_instance_class") + d.SetPartial("db_instance_storage") + d.SetPartial("db_instance_storage_type") + d.SetPartial("dedicated_host_group_id") + d.SetPartial("engine_version") + d.SetPartial("zone_id") + } + d.Partial(false) + return resourceAlicloudRdsUpgradeDbInstanceRead(d, meta) +} +func resourceAlicloudRdsUpgradeDbInstanceDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DeleteDBInstance" + var response map[string]interface{} + conn, err := client.NewRdsClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "DBInstanceId": d.Id(), + "RegionId": client.RegionId, + "SourceIp": client.SourceIp, + } + if v, ok := d.GetOk("released_keep_policy"); ok { + request["ReleasedKeepPolicy"] = v + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_resource_manager_service_linked_role.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_resource_manager_service_linked_role.go new file mode 100644 index 00000000000..24488206776 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_resource_manager_service_linked_role.go @@ -0,0 +1,142 @@ +package alicloud + +import ( + "fmt" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudResourceManagerServiceLinkedRole() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudResourceManagerServiceLinkedRoleCreate, + Read: resourceAlicloudResourceManagerServiceLinkedRoleRead, + Delete: resourceAlicloudResourceManagerServiceLinkedRoleDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "service_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "custom_suffix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "role_name": { + Type: schema.TypeString, + Computed: true, + }, + "role_id": { + Type: schema.TypeString, + Computed: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudResourceManagerServiceLinkedRoleCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateServiceLinkedRole" + request := make(map[string]interface{}) + conn, err := client.NewResourcemanagerClient() + if err != nil { + return WrapError(err) + } + + request["ServiceName"] = d.Get("service_name") + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + if v, ok := d.GetOk("custom_suffix"); ok { + request["CustomSuffix"] = v + } + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-03-31"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_ram_service_linked_role", action, AlibabaCloudSdkGoERROR) + } + d.SetId(fmt.Sprint(d.Get("service_name"), ":", response["Role"].(map[string]interface{})["RoleName"])) + + return resourceAlicloudResourceManagerServiceLinkedRoleRead(d, meta) +} +func resourceAlicloudResourceManagerServiceLinkedRoleRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + ramService := RamService{client} + parts, _ := ParseResourceId(d.Id(), 2) + + object, err := ramService.DescribeRamServiceLinkedRole(d.Id()) + if err != nil { + if NotFoundError(err) { + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("role_id", object.Role.RoleId) + d.Set("role_name", object.Role.RoleName) + d.Set("arn", object.Role.Arn) + d.Set("service_name", parts[0]) + return nil + +} + +func resourceAlicloudResourceManagerServiceLinkedRoleDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "DeleteServiceLinkedRole" + request := make(map[string]interface{}) + conn, err := client.NewResourcemanagerClient() + if err != nil { + return WrapError(err) + } + parts, _ := ParseResourceId(d.Id(), 2) + request["RoleName"] = parts[1] + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-03-31"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_ram_service_linked_role", action, AlibabaCloudSdkGoERROR) + } + + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ros_stack_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ros_stack_instance.go index 6afddc527ae..f8b6dba54d6 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ros_stack_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ros_stack_instance.go @@ -170,10 +170,7 @@ func resourceAlicloudRosStackInstanceRead(d *schema.ResourceData, meta interface parameterOverridesMaps = append(parameterOverridesMaps, parameterOverridesListItemMap) } } - err := d.Set("parameter_overrides", parameterOverridesMaps) - if err != nil { - panic(err) - } + d.Set("parameter_overrides", parameterOverridesMaps) } d.Set("status", object["Status"]) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ros_template_scratch.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ros_template_scratch.go new file mode 100644 index 00000000000..e1aa67fbd5c --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_ros_template_scratch.go @@ -0,0 +1,497 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudRosTemplateScratch() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudRosTemplateScratchCreate, + Read: resourceAlicloudRosTemplateScratchRead, + Update: resourceAlicloudRosTemplateScratchUpdate, + Delete: resourceAlicloudRosTemplateScratchDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(1 * time.Minute), + Delete: schema.DefaultTimeout(1 * time.Minute), + Update: schema.DefaultTimeout(1 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + }, + "execution_mode": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"Async", "Sync"}, false), + }, + "logical_id_strategy": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"LongTypePrefixAndIndexSuffix", "LongTypePrefixAndHashSuffix", "ShortTypePrefixAndHashSuffix"}, false), + }, + "preference_parameters": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "parameter_key": { + Type: schema.TypeString, + Required: true, + }, + "parameter_value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "source_tag": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 1, + ExactlyOneOf: []string{"source_resource_group", "source_tag", "source_resources"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_tags": { + Type: schema.TypeMap, + Required: true, + }, + "resource_type_filter": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + MaxItems: 20, + }, + }, + }, + }, + "source_resource_group": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_group_id": { + Type: schema.TypeString, + Required: true, + }, + "resource_type_filter": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + MaxItems: 20, + }, + }, + }, + }, + "source_resources": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_id": { + Type: schema.TypeString, + Required: true, + }, + "resource_type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "template_scratch_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"ResourceImport", "ArchitectureReplication"}, false), + }, + }, + } +} + +func resourceAlicloudRosTemplateScratchCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateTemplateScratch" + request := make(map[string]interface{}) + conn, err := client.NewRosClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + if v, ok := d.GetOk("execution_mode"); ok { + request["ExecutionMode"] = v + } + if v, ok := d.GetOk("logical_id_strategy"); ok { + request["LogicalIdStrategy"] = v + } + if v, ok := d.GetOk("preference_parameters"); ok { + preferenceParametersMaps := make([]map[string]interface{}, 0) + for _, preferenceParameters := range v.(*schema.Set).List() { + preferenceParametersArg := preferenceParameters.(map[string]interface{}) + preferenceParametersMap := map[string]interface{}{} + preferenceParametersMap["ParameterKey"] = preferenceParametersArg["parameter_key"] + preferenceParametersMap["ParameterValue"] = preferenceParametersArg["parameter_value"] + preferenceParametersMaps = append(preferenceParametersMaps, preferenceParametersMap) + } + if v, err := convertListMapToJsonString(preferenceParametersMaps); err != nil { + return WrapError(err) + } else { + request["PreferenceParameters"] = v + } + } + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("source_resource_group"); ok { + sourceResourceGroupMap := map[string]interface{}{} + for _, sourceResourceGroup := range v.(*schema.Set).List() { + sourceResourceGroupArg := sourceResourceGroup.(map[string]interface{}) + sourceResourceGroupMap["ResourceGroupId"] = sourceResourceGroupArg["resource_group_id"] + resourceTypeFilterList := make([]string, 0) + for _, v := range sourceResourceGroupArg["resource_type_filter"].([]interface{}) { + resourceTypeFilterList = append(resourceTypeFilterList, v.(string)) + } + sourceResourceGroupMap["ResourceTypeFilter"] = resourceTypeFilterList + } + if v, err := convertMaptoJsonString(sourceResourceGroupMap); err != nil { + return WrapError(err) + } else { + request["SourceResourceGroup"] = v + } + } + if v, ok := d.GetOk("source_resources"); ok { + sourceResourcesMaps := make([]map[string]interface{}, 0) + for _, sourceResources := range v.(*schema.Set).List() { + sourceResourcesArg := sourceResources.(map[string]interface{}) + sourceResourcesMap := map[string]interface{}{} + sourceResourcesMap["ResourceId"] = sourceResourcesArg["resource_id"] + sourceResourcesMap["ResourceType"] = sourceResourcesArg["resource_type"] + sourceResourcesMaps = append(sourceResourcesMaps, sourceResourcesMap) + } + if v, err := convertListMapToJsonString(sourceResourcesMaps); err != nil { + return WrapError(err) + } else { + request["SourceResources"] = v + } + } + + if v, ok := d.GetOk("source_tag"); ok { + sourceTagMap := map[string]interface{}{} + for _, sourceResources := range v.(*schema.Set).List() { + sourceTagArg := sourceResources.(map[string]interface{}) + sourceTagMap["ResourceTags"] = sourceTagArg["resource_tags"] + resourceTypeFilterList := make([]string, 0) + for _, v := range sourceTagArg["resource_type_filter"].([]interface{}) { + resourceTypeFilterList = append(resourceTypeFilterList, v.(string)) + } + sourceTagMap["ResourceTypeFilter"] = resourceTypeFilterList + } + if v, err := convertMaptoJsonString(sourceTagMap); err != nil { + return WrapError(err) + } else { + request["SourceTag"] = v + } + } + request["TemplateScratchType"] = d.Get("template_scratch_type") + request["ClientToken"] = buildClientToken("CreateTemplateScratch") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-10"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_ros_template_scratch", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["TemplateScratchId"])) + rosService := RosService{client} + stateConf := BuildStateConf([]string{}, []string{"GENERATE_COMPLETE"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, rosService.RosTemplateScratchStateRefreshFunc(d.Id(), []string{"GENERATE_FAILED"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudRosTemplateScratchRead(d, meta) +} +func resourceAlicloudRosTemplateScratchRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rosService := RosService{client} + object, err := rosService.DescribeRosTemplateScratch(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_ros_template_scratch rosService.DescribeRosTemplateScratch Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("description", object["Description"]) + d.Set("logical_id_strategy", object["LogicalIdStrategy"]) + + if preferenceParametersList, ok := object["PreferenceParameters"]; ok && preferenceParametersList != nil { + preferenceParametersMaps := make([]map[string]interface{}, 0) + for _, preferenceParametersListItem := range preferenceParametersList.([]interface{}) { + if preferenceParametersListItemMap, ok := preferenceParametersListItem.(map[string]interface{}); ok { + if v, ok := preferenceParametersListItemMap["ParameterValue"]; ok && fmt.Sprint(v) != "" { + preferenceParametersListItemArg := make(map[string]interface{}, 0) + preferenceParametersListItemArg["parameter_key"] = preferenceParametersListItemMap["ParameterKey"] + preferenceParametersListItemArg["parameter_value"] = v + preferenceParametersMaps = append(preferenceParametersMaps, preferenceParametersListItemArg) + } + } + } + d.Set("preference_parameters", preferenceParametersMaps) + } + + sourceTagSli := make([]map[string]interface{}, 0) + if v, ok := object["SourceTag"]; ok { + if sourceTag, ok := v.(map[string]interface{}); ok && len(sourceTag) > 0 { + sourceTagMap := make(map[string]interface{}) + sourceTagMap["resource_tags"] = sourceTag["ResourceTags"] + resourceTypeFilter := make([]interface{}, 0) + if v, ok := sourceTag["ResourceTypeFilter"]; ok { + if vv, ok := v.([]interface{}); ok && len(vv) > 0 { + resourceTypeFilter = append(resourceTypeFilter, vv...) + } + } + sourceTagMap["resource_type_filter"] = resourceTypeFilter + sourceTagSli = append(sourceTagSli, sourceTagMap) + } + } + + d.Set("source_tag", sourceTagSli) + + sourceResourceGroupSli := make([]map[string]interface{}, 0) + if v, ok := object["SourceResourceGroup"]; ok { + if sourceResourceGroup, ok := v.(map[string]interface{}); ok && len(sourceResourceGroup) > 0 { + sourceResourceGroupMap := make(map[string]interface{}) + sourceResourceGroupMap["resource_group_id"] = sourceResourceGroup["ResourceGroupId"] + resourceTypeFilter := make([]interface{}, 0) + if v, ok := sourceResourceGroup["ResourceTypeFilter"]; ok { + if vv, ok := v.([]interface{}); ok && len(vv) > 0 { + resourceTypeFilter = append(resourceTypeFilter, vv...) + } + } + sourceResourceGroupMap["resource_type_filter"] = resourceTypeFilter + sourceResourceGroupSli = append(sourceResourceGroupSli, sourceResourceGroupMap) + } + } + + d.Set("source_resource_group", sourceResourceGroupSli) + if sourceResourcesList, ok := object["SourceResources"]; ok && sourceResourcesList != nil { + sourceResourcesMaps := make([]map[string]interface{}, 0) + for _, sourceResourcesListItem := range sourceResourcesList.([]interface{}) { + if sourceResourcesListItemMap, ok := sourceResourcesListItem.(map[string]interface{}); ok { + sourceResourcesListItemArg := make(map[string]interface{}, 0) + sourceResourcesListItemArg["resource_id"] = sourceResourcesListItemMap["ResourceId"] + sourceResourcesListItemArg["resource_type"] = sourceResourcesListItemMap["ResourceType"] + sourceResourcesMaps = append(sourceResourcesMaps, sourceResourcesListItemArg) + } + } + d.Set("source_resources", sourceResourcesMaps) + } + + d.Set("status", object["Status"]) + d.Set("template_scratch_type", object["TemplateScratchType"]) + return nil +} +func resourceAlicloudRosTemplateScratchUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rosService := RosService{client} + var response map[string]interface{} + update := false + request := map[string]interface{}{ + "TemplateScratchId": d.Id(), + } + request["RegionId"] = client.RegionId + if d.HasChange("description") { + update = true + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + } + if d.HasChange("logical_id_strategy") { + update = true + if v, ok := d.GetOk("logical_id_strategy"); ok { + request["LogicalIdStrategy"] = v + } + } + if d.HasChange("source_tag") { + update = true + if v, ok := d.GetOkExists("source_tag"); ok { + sourceTagMap := map[string]interface{}{} + for _, sourceResources := range v.(*schema.Set).List() { + sourceTagArg := sourceResources.(map[string]interface{}) + if len(sourceTagArg["resource_tags"].(map[string]interface{})) > 0 { + sourceTagMap["ResourceTags"] = sourceTagArg["resource_tags"] + resourceTypeFilterList := make([]string, 0) + for _, v := range sourceTagArg["resource_type_filter"].([]interface{}) { + resourceTypeFilterList = append(resourceTypeFilterList, v.(string)) + } + sourceTagMap["ResourceTypeFilter"] = resourceTypeFilterList + } + } + if v, err := convertMaptoJsonString(sourceTagMap); err != nil { + return WrapError(err) + } else { + request["SourceTag"] = v + } + } + } + + if d.HasChange("preference_parameters") { + update = true + } + if v, ok := d.GetOk("preference_parameters"); ok { + preferenceParametersMaps := make([]map[string]interface{}, 0) + for _, preferenceParameters := range v.(*schema.Set).List() { + preferenceParametersArg := preferenceParameters.(map[string]interface{}) + preferenceParametersMap := map[string]interface{}{} + preferenceParametersMap["ParameterKey"] = preferenceParametersArg["parameter_key"] + preferenceParametersMap["ParameterValue"] = preferenceParametersArg["parameter_value"] + preferenceParametersMaps = append(preferenceParametersMaps, preferenceParametersMap) + } + if v, err := convertListMapToJsonString(preferenceParametersMaps); err != nil { + return WrapError(err) + } else { + request["PreferenceParameters"] = v + } + } + + if d.HasChange("source_resource_group") { + update = true + if v, ok := d.GetOk("source_resource_group"); ok { + sourceResourceGroupMap := map[string]interface{}{} + for _, sourceResourceGroup := range v.(*schema.Set).List() { + sourceResourceGroupArg := sourceResourceGroup.(map[string]interface{}) + sourceResourceGroupMap["ResourceGroupId"] = sourceResourceGroupArg["resource_group_id"] + resourceTypeFilterList := make([]string, 0) + for _, v := range sourceResourceGroupArg["resource_type_filter"].([]interface{}) { + resourceTypeFilterList = append(resourceTypeFilterList, v.(string)) + } + sourceResourceGroupMap["ResourceTypeFilter"] = resourceTypeFilterList + } + if v, err := convertMaptoJsonString(sourceResourceGroupMap); err != nil { + return WrapError(err) + } else { + request["SourceResourceGroup"] = v + } + } + } + if d.HasChange("source_resources") { + update = true + if v, ok := d.GetOk("source_resources"); ok { + sourceResourcesMaps := make([]map[string]interface{}, 0) + for _, sourceResources := range v.(*schema.Set).List() { + sourceResourcesArg := sourceResources.(map[string]interface{}) + sourceResourcesMap := map[string]interface{}{} + sourceResourcesMap["ResourceId"] = sourceResourcesArg["resource_id"] + sourceResourcesMap["ResourceType"] = sourceResourcesArg["resource_type"] + sourceResourcesMaps = append(sourceResourcesMaps, sourceResourcesMap) + } + if v, err := convertListMapToJsonString(sourceResourcesMaps); err != nil { + return WrapError(err) + } else { + request["SourceResources"] = v + } + } + } + if update { + if v, ok := d.GetOk("execution_mode"); ok { + request["ExecutionMode"] = v + } + action := "UpdateTemplateScratch" + conn, err := client.NewRosClient() + if err != nil { + return WrapError(err) + } + request["ClientToken"] = buildClientToken("UpdateTemplateScratch") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-10"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"GENERATE_COMPLETE"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, rosService.RosTemplateScratchStateRefreshFunc(d.Id(), []string{"GENERATE_FAILED"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + return resourceAlicloudRosTemplateScratchRead(d, meta) +} +func resourceAlicloudRosTemplateScratchDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + rosService := RosService{client} + action := "DeleteTemplateScratch" + var response map[string]interface{} + conn, err := client.NewRosClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "TemplateScratchId": d.Id(), + } + request["RegionId"] = client.RegionId + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-10"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, rosService.RosTemplateScratchStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_route_table.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_route_table.go index 53e78f246f8..b2aab54dede 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_route_table.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_route_table.go @@ -136,6 +136,10 @@ func resourceAlicloudRouteTableUpdate(d *schema.ResourceData, meta interface{}) client := meta.(*connectivity.AliyunClient) vpcService := VpcService{client} var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } d.Partial(true) if d.HasChange("tags") { @@ -163,10 +167,6 @@ func resourceAlicloudRouteTableUpdate(d *schema.ResourceData, meta interface{}) } if update { action := "ModifyRouteTableAttributes" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_sae_application.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_sae_application.go index 0b22c983f08..fa585efe776 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_sae_application.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_sae_application.go @@ -1151,6 +1151,10 @@ func resourceAlicloudSaeApplicationUpdate(d *schema.ResourceData, meta interface } } d.Partial(false) + stateConf := BuildStateConf([]string{}, []string{"SUCCESS"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, saeService.SaeApplicationStateRefreshFunc(d.Id(), []string{"FAIL", "ABORT", "SYSTEM_FAIL"})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } return resourceAlicloudSaeApplicationRead(d, meta) } func resourceAlicloudSaeApplicationDelete(d *schema.ResourceData, meta interface{}) error { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_sddp_config.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_sddp_config.go index dece09b01e2..ff9ad3d8370 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_sddp_config.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_sddp_config.go @@ -85,7 +85,6 @@ func resourceAlicloudSddpConfigCreate(d *schema.ResourceData, meta interface{}) return WrapErrorf(err, DefaultErrorMsg, "alicloud_sddp_config", action, AlibabaCloudSdkGoERROR) } - fmt.Sprintf("ID = %v", request["Code"]) d.SetId(fmt.Sprint(request["Code"])) return resourceAlicloudSddpConfigRead(d, meta) @@ -110,6 +109,10 @@ func resourceAlicloudSddpConfigRead(d *schema.ResourceData, meta interface{}) er } func resourceAlicloudSddpConfigUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewSddpClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -132,10 +135,6 @@ func resourceAlicloudSddpConfigUpdate(d *schema.ResourceData, meta interface{}) } if update { action := "CreateConfig" - conn, err := client.NewSddpClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-01-03"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_security_group_rule.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_security_group_rule.go index 706ed3d79c2..cb351fa8277 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_security_group_rule.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_security_group_rule.go @@ -103,6 +103,12 @@ func resourceAliyunSecurityGroupRule() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "prefix_list_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + DiffSuppressFunc: ecsSecurityGroupRulePreFixListIdDiffSuppressFunc, + }, }, } } @@ -121,10 +127,11 @@ func resourceAliyunSecurityGroupRuleCreate(d *schema.ResourceData, meta interfac policy := d.Get("policy").(string) priority := d.Get("priority").(int) - if _, ok := d.GetOk("cidr_ip"); !ok { - if _, ok := d.GetOk("source_security_group_id"); !ok { - return WrapError(fmt.Errorf("Either 'cidr_ip' or 'source_security_group_id' must be specified.")) - } + _, cidrExist := d.GetOk("cidr_ip") + _, sourceSecurityGroupIdExist := d.GetOk("source_security_group_id") + _, prefixListIdExist := d.GetOk("prefix_list_id") + if !cidrExist && !sourceSecurityGroupIdExist && !prefixListIdExist { + return WrapError(fmt.Errorf("you must specify one of the following field: cidr_ip, source_security_group_id, prefix_list_id")) } request, err := buildAliyunSGRuleRequest(d, meta) @@ -218,10 +225,12 @@ func resourceAliyunSecurityGroupRuleRead(d *schema.ResourceData, meta interface{ d.Set("cidr_ip", object.SourceCidrIp) d.Set("source_security_group_id", object.SourceGroupId) d.Set("source_group_owner_account", object.SourceGroupOwnerAccount) + d.Set("prefix_list_id", object.SourcePrefixListId) } else { d.Set("cidr_ip", object.DestCidrIp) d.Set("source_security_group_id", object.DestGroupId) d.Set("source_group_owner_account", object.DestGroupOwnerAccount) + d.Set("prefix_list_id", object.DestPrefixListId) } return nil } @@ -374,6 +383,13 @@ func buildAliyunSGRuleRequest(d *schema.ResourceData, meta interface{}) (*reques request.QueryParams["DestCidrIp"] = v.(string) } } + if v, ok := d.GetOk("prefix_list_id"); ok { + if direction == string(DirectionIngress) { + request.QueryParams["SourcePrefixListId"] = v.(string) + } else { + request.QueryParams["DestPrefixListId"] = v.(string) + } + } var targetGroupId string if v, ok := d.GetOk("source_security_group_id"); ok { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_acl.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_acl.go index 88190b6e650..4ba6ab558e4 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_acl.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_acl.go @@ -1,13 +1,15 @@ package alicloud import ( + "fmt" "strings" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "time" - "github.com/aliyun/alibaba-cloud-sdk-go/services/slb" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" @@ -66,25 +68,41 @@ func resourceAlicloudSlbAcl() *schema.Resource { func resourceAlicloudSlbAclCreate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) - - request := slb.CreateCreateAccessControlListRequest() - request.RegionId = client.RegionId + var response map[string]interface{} + action := "CreateAccessControlList" + request := make(map[string]interface{}) + conn, err := client.NewSlbClient() + if err != nil { + return WrapError(err) + } + request["RegionId"] = client.RegionId if v := d.Get("resource_group_id").(string); v != "" { - request.ResourceGroupId = v + request["ResourceGroupId"] = v + } + request["AclName"] = strings.TrimSpace(d.Get("name").(string)) + if v, ok := d.GetOk("address_ip_version"); ok { + request["AddressIPVersion"] = v } - request.AclName = strings.TrimSpace(d.Get("name").(string)) - request.AddressIPVersion = d.Get("ip_version").(string) - raw, err := client.WithSlbClient(func(slbClient *slb.Client) (interface{}, error) { - return slbClient.CreateAccessControlList(request) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil }) + addDebug(action, response, request) + if err != nil { - return WrapErrorf(err, DefaultErrorMsg, "alicloud_slb_acl", request.GetActionName(), AlibabaCloudSdkGoERROR) + return WrapErrorf(err, DefaultErrorMsg, "alicloud_slb_acl", action, AlibabaCloudSdkGoERROR) } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) - response, _ := raw.(*slb.CreateAccessControlListResponse) - d.SetId(response.AclId) + d.SetId(fmt.Sprint(response["AclId"])) return resourceAlicloudSlbAclUpdate(d, meta) } @@ -106,12 +124,26 @@ func resourceAlicloudSlbAclRead(d *schema.ResourceData, meta interface{}) error } return WrapError(err) } - d.Set("name", object.AclName) - d.Set("resource_group_id", object.ResourceGroupId) - d.Set("ip_version", object.AddressIPVersion) + d.Set("name", object["AclName"]) + d.Set("resource_group_id", object["ResourceGroupId"]) + d.Set("ip_version", object["AddressIPVersion"]) - if err := d.Set("entry_list", slbService.FlattenSlbAclEntryMappings(object.AclEntrys.AclEntry)); err != nil { - return WrapError(err) + if aclEntrys, ok := object["AclEntrys"]; ok { + if v, ok := aclEntrys.(map[string]interface{})["AclEntry"].([]interface{}); ok { + aclEntry := make([]map[string]interface{}, 0) + for _, val := range v { + item := val.(map[string]interface{}) + temp := map[string]interface{}{ + "comment": item["AclEntryComment"], + "entry": item["AclEntryIP"], + } + + aclEntry = append(aclEntry, temp) + } + if err := d.Set("entry_list", aclEntry); err != nil { + return WrapError(err) + } + } } return nil } @@ -119,25 +151,45 @@ func resourceAlicloudSlbAclRead(d *schema.ResourceData, meta interface{}) error func resourceAlicloudSlbAclUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) slbService := SlbService{client} - + var response map[string]interface{} d.Partial(true) - if err := slbService.setInstanceTags(d, TagResourceAcl); err != nil { - return WrapError(err) + if d.HasChange("tags") { + if err := slbService.setInstanceTags(d, TagResourceAcl); err != nil { + return WrapError(err) + } + d.SetPartial("tags") } if !d.IsNewResource() && d.HasChange("name") { - request := slb.CreateSetAccessControlListAttributeRequest() - request.RegionId = client.RegionId - request.AclId = d.Id() - request.AclName = d.Get("name").(string) - raw, err := client.WithSlbClient(func(slbClient *slb.Client) (interface{}, error) { - return slbClient.SetAccessControlListAttribute(request) + request := map[string]interface{}{ + "AclId": d.Id(), + } + if v, ok := d.GetOk("name"); ok { + request["AclName"] = v + } + request["RegionId"] = client.RegionId + action := "SetAccessControlListAttribute" + conn, err := client.NewSlbClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil }) + addDebug(action, response, request) if err != nil { - return WrapErrorf(err, DefaultErrorMsg, d.Id(), request.GetActionName(), AlibabaCloudSdkGoERROR) + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) d.SetPartial("name") } @@ -149,19 +201,78 @@ func resourceAlicloudSlbAclUpdate(d *schema.ResourceData, meta interface{}) erro add := ne.Difference(oe).List() if len(remove) > 0 { - if err := slbService.SlbRemoveAccessControlListEntry(remove, d.Id()); err != nil { - return WrapError(err) + removeList := SplitSlice(remove, 50) + for _, item := range removeList { + removedRequest := map[string]interface{}{ + "AclId": d.Id(), + "RegionId": client.RegionId, + } + aclEntries, err := slbService.convertAclEntriesToString(item) + if err != nil { + return WrapError(err) + } + removedRequest["AclEntrys"] = aclEntries + action := "RemoveAccessControlListEntry" + conn, err := client.NewSlbClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-15"), StringPointer("AK"), nil, removedRequest, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, removedRequest) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } } } if len(add) > 0 { - if err := slbService.SlbAddAccessControlListEntry(add, d.Id()); err != nil { - return WrapError(err) + addList := SplitSlice(add, 50) + for _, item := range addList { + addedRequest := map[string]interface{}{ + "AclId": d.Id(), + "RegionId": client.RegionId, + } + aclEntries, err := slbService.convertAclEntriesToString(item) + if err != nil { + return WrapError(err) + } + addedRequest["AclEntrys"] = aclEntries + action := "AddAccessControlListEntry" + conn, err := client.NewSlbClient() + if err != nil { + return WrapError(err) + } + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-15"), StringPointer("AK"), nil, addedRequest, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, addedRequest) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } } } d.SetPartial("entry_list") } - d.Partial(false) return resourceAlicloudSlbAclRead(d, meta) @@ -169,29 +280,35 @@ func resourceAlicloudSlbAclUpdate(d *schema.ResourceData, meta interface{}) erro func resourceAlicloudSlbAclDelete(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) - slbService := SlbService{client} - request := slb.CreateDeleteAccessControlListRequest() - request.RegionId = client.RegionId - request.AclId = d.Id() - err := resource.Retry(3*time.Minute, func() *resource.RetryError { - raw, err := client.WithSlbClient(func(slbClient *slb.Client) (interface{}, error) { - return slbClient.DeleteAccessControlList(request) - }) + action := "DeleteAccessControlList" + var response map[string]interface{} + conn, err := client.NewSlbClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "AclId": d.Id(), + "RegionId": client.RegionId, + } + + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) if err != nil { - if IsExpectedErrors(err, []string{"AclInUsed"}) { + if NeedRetry(err) { + wait() return resource.RetryableError(err) } return resource.NonRetryableError(err) - } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) return nil }) - + addDebug(action, response, request) if err != nil { - if !IsExpectedErrors(err, []string{"AclNotExist"}) { - return WrapErrorf(err, DefaultErrorMsg, d.Id(), request.GetActionName(), AlibabaCloudSdkGoERROR) + if IsExpectedErrors(err, []string{"AclNotExist"}) { + return nil } + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) } - return WrapError(slbService.WaitForSlbAcl(d.Id(), Deleted, DefaultTimeoutMedium)) + return nil } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_ca_certificate.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_ca_certificate.go index fcbdb8ae772..1000c24a621 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_ca_certificate.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_ca_certificate.go @@ -118,6 +118,10 @@ func resourceAlicloudSlbCaCertificateRead(d *schema.ResourceData, meta interface func resourceAlicloudSlbCaCertificateUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) slbService := SlbService{client} + conn, err := client.NewSlbClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -141,10 +145,6 @@ func resourceAlicloudSlbCaCertificateUpdate(d *schema.ResourceData, meta interfa request["RegionId"] = client.RegionId if update { action := "SetCACertificateName" - conn, err := client.NewSlbClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_load_balancer.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_load_balancer.go index 2a864beefd2..0ca94e37ddd 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_load_balancer.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_load_balancer.go @@ -645,6 +645,10 @@ func resourceAlicloudSlbLoadBalancerUpdate(d *schema.ResourceData, meta interfac return resourceAlicloudSlbLoadBalancerRead(d, meta) } func resourceAlicloudSlbLoadBalancerDelete(d *schema.ResourceData, meta interface{}) error { + if d.Get("payment_type").(string) == "Subscription" || d.Get("instance_charge_type").(string) == "Prepaid" { + log.Printf("[WARN] Cannot destroy Subscription resource: alicloud_slb_load_balancer. Terraform will remove this resource from the state file, however resources may remain.") + return nil + } client := meta.(*connectivity.AliyunClient) slbService := SlbService{client} action := "DeleteLoadBalancer" diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_tls_cipher_policy.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_tls_cipher_policy.go index 7b0ed6ac6ca..60379b85e5c 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_tls_cipher_policy.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_slb_tls_cipher_policy.go @@ -98,6 +98,10 @@ func resourceAlicloudSlbTlsCipherPolicyRead(d *schema.ResourceData, meta interfa func resourceAlicloudSlbTlsCipherPolicyUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) var response map[string]interface{} + conn, err := client.NewSlbClient() + if err != nil { + return WrapError(err) + } update := false request := map[string]interface{}{ "TLSCipherPolicyId": d.Id(), @@ -117,10 +121,6 @@ func resourceAlicloudSlbTlsCipherPolicyUpdate(d *schema.ResourceData, meta inter request["TLSVersions"] = d.Get("tls_versions") if update { action := "SetTLSCipherPolicyAttribute" - conn, err := client.NewSlbClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-15"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_snat_entry.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_snat_entry.go index c73698bbcf2..44c13f08d72 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_snat_entry.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_snat_entry.go @@ -49,12 +49,14 @@ func resourceAlicloudSnatEntry() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, + Computed: true, ConflictsWith: strings.Fields("source_vswitch_id"), }, "source_vswitch_id": { Type: schema.TypeString, Optional: true, ForceNew: true, + Computed: true, ConflictsWith: strings.Fields("source_cidr"), }, "status": { @@ -94,7 +96,7 @@ func resourceAlicloudSnatEntryCreate(d *schema.ResourceData, meta interface{}) e request["ClientToken"] = buildClientToken("CreateSnatEntry") response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) if err != nil { - if IsExpectedErrors(err, []string{"EIP_NOT_IN_GATEWAY", "InternalError", "OperationFailed.Throttling", "OperationUnsupported.EipInBinding", "OperationUnsupported.EipNatBWPCheck"}) || NeedRetry(err) { + if IsExpectedErrors(err, []string{"EIP_NOT_IN_GATEWAY", "InternalError", "OperationFailed.Throttling", "OperationUnsupported.EipInBinding", "OperationUnsupported.EipNatBWPCheck", "OperationConflict"}) || NeedRetry(err) { wait() return resource.RetryableError(err) } @@ -139,11 +141,8 @@ func resourceAlicloudSnatEntryRead(d *schema.ResourceData, meta interface{}) err d.Set("snat_table_id", parts[0]) d.Set("snat_entry_name", object["SnatEntryName"]) d.Set("snat_ip", object["SnatIp"]) - if _, ok := d.GetOk("source_cidr"); ok { - d.Set("source_cidr", object["SourceCIDR"]) - } else { - d.Set("source_vswitch_id", object["SourceVSwitchId"]) - } + d.Set("source_cidr", object["SourceCIDR"]) + d.Set("source_vswitch_id", object["SourceVSwitchId"]) d.Set("status", object["Status"]) return nil } diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_bgp_group.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_bgp_group.go new file mode 100644 index 00000000000..711f3f07b1d --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_bgp_group.go @@ -0,0 +1,261 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudVpcBgpGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudVpcBgpGroupCreate, + Read: resourceAlicloudVpcBgpGroupRead, + Update: resourceAlicloudVpcBgpGroupUpdate, + Delete: resourceAlicloudVpcBgpGroupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + Update: schema.DefaultTimeout(5 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "auth_key": { + Type: schema.TypeString, + Optional: true, + }, + "bgp_group_name": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.All(validation.StringMatch(regexp.MustCompile(`^[a-zA-Z][A-Za-z0-9._-]{1,127}$`), "The name must be `2` to `128` characters in length and can contain digits, periods (.), underscores (_), and hyphens (-)."), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It cannot begin with \"http://\", \"https://\".")), + }, + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.All(validation.StringLenBetween(2, 256), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It cannot begin with \"http://\", \"https://\".")), + }, + "is_fake_asn": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "local_asn": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "peer_asn": { + Type: schema.TypeInt, + Required: true, + }, + "router_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudVpcBgpGroupCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateBgpGroup" + request := make(map[string]interface{}) + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("auth_key"); ok { + request["AuthKey"] = v + } + if v, ok := d.GetOk("bgp_group_name"); ok { + request["Name"] = v + } + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + if v, ok := d.GetOkExists("is_fake_asn"); ok { + request["IsFakeAsn"] = v + } + if v, ok := d.GetOk("local_asn"); ok { + request["LocalAsn"] = v + } + request["PeerAsn"] = d.Get("peer_asn") + request["RegionId"] = client.RegionId + request["RouterId"] = d.Get("router_id") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + request["ClientToken"] = buildClientToken("CreateBgpGroup") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_vpc_bgp_group", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["BgpGroupId"])) + vpcService := VpcService{client} + stateConf := BuildStateConf([]string{}, []string{"Available"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, vpcService.VpcBgpGroupStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudVpcBgpGroupRead(d, meta) +} +func resourceAlicloudVpcBgpGroupRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + vpcService := VpcService{client} + object, err := vpcService.DescribeVpcBgpGroup(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_vpc_bgp_group vpcService.DescribeVpcBgpGroup Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("auth_key", object["AuthKey"]) + d.Set("bgp_group_name", object["Name"]) + d.Set("description", object["Description"]) + d.Set("local_asn", formatInt(object["LocalAsn"])) + d.Set("peer_asn", formatInt(object["PeerAsn"])) + d.Set("router_id", object["RouterId"]) + d.Set("is_fake_asn", object["IsFake"]) + d.Set("status", object["Status"]) + return nil +} +func resourceAlicloudVpcBgpGroupUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + vpcService := VpcService{client} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + var response map[string]interface{} + update := false + request := map[string]interface{}{ + "BgpGroupId": d.Id(), + } + request["RegionId"] = client.RegionId + if d.HasChange("auth_key") { + update = true + if v, ok := d.GetOk("auth_key"); ok { + request["AuthKey"] = v + } + } + if d.HasChange("bgp_group_name") { + update = true + if v, ok := d.GetOk("bgp_group_name"); ok { + request["Name"] = v + } + } + if d.HasChange("description") { + update = true + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + } + if d.HasChange("local_asn") { + update = true + if v, ok := d.GetOk("local_asn"); ok { + request["LocalAsn"] = v + } + } + if d.HasChange("peer_asn") { + update = true + request["PeerAsn"] = d.Get("peer_asn") + } + if update { + if v, ok := d.GetOkExists("is_fake_asn"); ok { + request["IsFakeAsn"] = v + } + action := "ModifyBgpGroupAttribute" + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + request["ClientToken"] = buildClientToken("ModifyBgpGroupAttribute") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"Available"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, vpcService.VpcBgpGroupStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + return resourceAlicloudVpcBgpGroupRead(d, meta) +} +func resourceAlicloudVpcBgpGroupDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + vpcService := VpcService{client} + action := "DeleteBgpGroup" + var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "BgpGroupId": d.Id(), + } + + request["RegionId"] = client.RegionId + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + request["ClientToken"] = buildClientToken("DeleteBgpGroup") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, vpcService.VpcBgpGroupStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_bgp_network.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_bgp_network.go new file mode 100644 index 00000000000..e66343207f6 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_bgp_network.go @@ -0,0 +1,146 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudVpcBgpNetwork() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudVpcBgpNetworkCreate, + Read: resourceAlicloudVpcBgpNetworkRead, + Delete: resourceAlicloudVpcBgpNetworkDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(1 * time.Minute), + Delete: schema.DefaultTimeout(1 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "dst_cidr_block": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "router_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudVpcBgpNetworkCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AddBgpNetwork" + request := make(map[string]interface{}) + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + request["DstCidrBlock"] = d.Get("dst_cidr_block") + request["RegionId"] = client.RegionId + request["RouterId"] = d.Get("router_id") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + request["ClientToken"] = buildClientToken("AddBgpNetwork") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_vpc_bgp_network", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["RouterId"], ":", request["DstCidrBlock"])) + vpcService := VpcService{client} + stateConf := BuildStateConf([]string{}, []string{"Available"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, vpcService.VpcBgpNetworkStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudVpcBgpNetworkRead(d, meta) +} +func resourceAlicloudVpcBgpNetworkRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + vpcService := VpcService{client} + object, err := vpcService.DescribeVpcBgpNetwork(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_vpc_bgp_network vpcService.DescribeVpcBgpNetwork Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("dst_cidr_block", object["DstCidrBlock"]) + d.Set("router_id", object["RouterId"]) + d.Set("status", object["Status"]) + return nil +} +func resourceAlicloudVpcBgpNetworkDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + vpcService := VpcService{client} + action := "DeleteBgpNetwork" + var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "DstCidrBlock": parts[1], + "RouterId": parts[0], + } + + request["RegionId"] = client.RegionId + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + request["ClientToken"] = buildClientToken("DeleteBgpNetwork") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, vpcService.VpcBgpNetworkStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_bgp_peer.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_bgp_peer.go new file mode 100644 index 00000000000..3d0ceee4e00 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_bgp_peer.go @@ -0,0 +1,239 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAlicloudVpcBgpPeer() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudVpcBgpPeerCreate, + Read: resourceAlicloudVpcBgpPeerRead, + Update: resourceAlicloudVpcBgpPeerUpdate, + Delete: resourceAlicloudVpcBgpPeerDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + Update: schema.DefaultTimeout(5 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "bfd_multi_hop": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(1, 255), + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if v, ok := d.GetOk("enable_bfd"); ok && fmt.Sprint(v) == "true" { + return false + } + return true + }, + }, + "bgp_group_id": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "enable_bfd": { + Type: schema.TypeBool, + Optional: true, + }, + "ip_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "peer_ip_address": { + Type: schema.TypeString, + Optional: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudVpcBgpPeerCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateBgpPeer" + request := make(map[string]interface{}) + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("bfd_multi_hop"); ok { + request["BfdMultiHop"] = v + } + request["BgpGroupId"] = d.Get("bgp_group_id") + if v, ok := d.GetOkExists("enable_bfd"); ok { + request["EnableBfd"] = v + } + if v, ok := d.GetOk("ip_version"); ok { + request["IpVersion"] = v + } + if v, ok := d.GetOk("peer_ip_address"); ok { + request["PeerIpAddress"] = v + } + request["RegionId"] = client.RegionId + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + request["ClientToken"] = buildClientToken("CreateBgpPeer") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_vpc_bgp_peer", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["BgpPeerId"])) + vpcService := VpcService{client} + stateConf := BuildStateConf([]string{}, []string{"Available"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, vpcService.VpcBgpPeerStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudVpcBgpPeerRead(d, meta) +} +func resourceAlicloudVpcBgpPeerRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + vpcService := VpcService{client} + object, err := vpcService.DescribeVpcBgpPeer(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_vpc_bgp_peer vpcService.DescribeVpcBgpPeer Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + if v, ok := object["BfdMultiHop"]; ok && fmt.Sprint(v) != "0" { + d.Set("bfd_multi_hop", formatInt(v)) + } + d.Set("bgp_group_id", object["BgpGroupId"]) + d.Set("enable_bfd", object["EnableBfd"]) + d.Set("ip_version", object["IpVersion"]) + d.Set("peer_ip_address", object["PeerIpAddress"]) + d.Set("status", object["Status"]) + return nil +} +func resourceAlicloudVpcBgpPeerUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + vpcService := VpcService{client} + var response map[string]interface{} + update := false + request := map[string]interface{}{ + "BgpPeerId": d.Id(), + } + request["RegionId"] = client.RegionId + if d.HasChange("bfd_multi_hop") { + update = true + if v, ok := d.GetOk("bfd_multi_hop"); ok { + request["BfdMultiHop"] = v + } + } + if d.HasChange("enable_bfd") { + update = true + if v, ok := d.GetOkExists("enable_bfd"); ok { + request["EnableBfd"] = v + } + } + if d.HasChange("peer_ip_address") { + update = true + if v, ok := d.GetOk("peer_ip_address"); ok { + request["PeerIpAddress"] = v + } + } + if update { + action := "ModifyBgpPeerAttribute" + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { + request["ClientToken"] = buildClientToken("ModifyBgpPeerAttribute") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{"Available"}, d.Timeout(schema.TimeoutUpdate), 5*time.Second, vpcService.VpcBgpPeerStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + } + return resourceAlicloudVpcBgpPeerRead(d, meta) +} +func resourceAlicloudVpcBgpPeerDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + vpcService := VpcService{client} + action := "DeleteBgpPeer" + var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "BgpPeerId": d.Id(), + } + + request["RegionId"] = client.RegionId + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + request["ClientToken"] = buildClientToken("DeleteBgpPeer") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, vpcService.VpcBgpPeerStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_dhcp_options_set.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_dhcp_options_set.go index 2bcf881c0d9..b46066ebda0 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_dhcp_options_set.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_dhcp_options_set.go @@ -30,8 +30,9 @@ func resourceAlicloudVpcDhcpOptionsSet() *schema.Resource { }, Schema: map[string]*schema.Schema{ "associate_vpcs": { - Type: schema.TypeSet, - Optional: true, + Type: schema.TypeSet, + Optional: true, + Deprecated: "Field 'associate_vpcs' has been deprecated from provider version 1.153.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_dhcp_options_set_attachment' to attach DhcpOptionsSet and Vpc.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "vpc_id": { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_dhcp_options_set_attachment.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_dhcp_options_set_attachment.go new file mode 100644 index 00000000000..b5b4e66d036 --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_dhcp_options_set_attachment.go @@ -0,0 +1,180 @@ +package alicloud + +import ( + "fmt" + "log" + "time" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudVpcDhcpOptionsSetAttachement() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudVpcDhcpOptionsAttachmentCreate, + Read: resourceAlicloudVpcDhcpOptionsSetAttachmentRead, + Update: resourceAlicloudVpcDhcpOptionsSetAttachmentUpdate, + Delete: resourceAlicloudVpcDhcpOptionsSetAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(2 * time.Minute), + Delete: schema.DefaultTimeout(1 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "dhcp_options_set_id": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "vpc_id": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "dry_run": { + Type: schema.TypeBool, + Optional: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAlicloudVpcDhcpOptionsAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "AttachDhcpOptionsSetToVpc" + request := make(map[string]interface{}) + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + + request["RegionId"] = client.RegionId + request["DhcpOptionsSetId"] = d.Get("dhcp_options_set_id") + request["VpcId"] = d.Get("vpc_id") + request["ClientToken"] = buildClientToken(action) + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_vpc_dhcp_options_set_attachment", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(request["VpcId"], ":", request["DhcpOptionsSetId"])) + + vpcService := VpcService{client} + stateConf := BuildStateConf([]string{"Pending"}, []string{"InUse"}, d.Timeout(schema.TimeoutCreate), 3*time.Second, vpcService.DescribeVpcDhcpOptionsSetAttachmentStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return resourceAlicloudVpcDhcpOptionsSetAttachmentRead(d, meta) +} +func resourceAlicloudVpcDhcpOptionsSetAttachmentRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + vpcService := VpcService{client} + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + object, err := vpcService.DescribeVpcDhcpOptionsSetAttachment(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_vpc_dhcp_options_set_attachment vpcService.DescribeVpcDhcpOptionsSetAttachment Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + if associateVpcsList, ok := object["AssociateVpcs"]; ok { + for _, associateVpcsListItem := range associateVpcsList.([]interface{}) { + if associateVpcsListItem != nil { + associateVpcsListItemMap, ok := associateVpcsListItem.(map[string]interface{}) + if ok && associateVpcsListItemMap["VpcId"] == parts[0] { + d.Set("vpc_id", associateVpcsListItemMap["VpcId"]) + d.Set("dhcp_options_set_id", parts[1]) + d.Set("status", associateVpcsListItemMap["AssociateStatus"]) + break + } + } + } + } + return nil +} +func resourceAlicloudVpcDhcpOptionsSetAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { + log.Println(fmt.Sprintf("[WARNING] The resouce has not update operation.")) + return resourceAlicloudVpcDhcpOptionsSetAttachmentRead(d, meta) +} +func resourceAlicloudVpcDhcpOptionsSetAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + action := "DetachDhcpOptionsSetFromVpc" + var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "DhcpOptionsSetId": parts[1], + } + request["RegionId"] = client.RegionId + request["VpcId"] = d.Get("vpc_id") + request["ClientToken"] = buildClientToken(action) + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 10*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if IsExpectedErrors(err, []string{"IncorrectStatus.DhcpOptionsSet"}) || NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidDhcpOptionsSetId.NotFound"}) { + return nil + } + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + vpcService := VpcService{client} + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutCreate), 5*time.Second, vpcService.VpcDhcpOptionsSetStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_flow_log.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_flow_log.go index bc4ea02491d..9ed577ff75f 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_flow_log.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_flow_log.go @@ -146,6 +146,10 @@ func resourceAlicloudVpcFlowLogRead(d *schema.ResourceData, meta interface{}) er func resourceAlicloudVpcFlowLogUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) vpcService := VpcService{client} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -164,10 +168,6 @@ func resourceAlicloudVpcFlowLogUpdate(d *schema.ResourceData, meta interface{}) } if update { action := "ModifyFlowLogAttribute" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -200,10 +200,6 @@ func resourceAlicloudVpcFlowLogUpdate(d *schema.ResourceData, meta interface{}) } request["RegionId"] = client.RegionId action := "ActiveFlowLog" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -231,10 +227,6 @@ func resourceAlicloudVpcFlowLogUpdate(d *schema.ResourceData, meta interface{}) } request["RegionId"] = client.RegionId action := "DeactiveFlowLog" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_ipv6_gateway.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_ipv6_gateway.go index 63c44ed62cc..d51a50cba5d 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_ipv6_gateway.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_ipv6_gateway.go @@ -128,6 +128,10 @@ func resourceAlicloudVpcIpv6GatewayRead(d *schema.ResourceData, meta interface{} func resourceAlicloudVpcIpv6GatewayUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) vpcService := VpcService{client} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} d.Partial(true) @@ -144,10 +148,6 @@ func resourceAlicloudVpcIpv6GatewayUpdate(d *schema.ResourceData, meta interface } if update { action := "ModifyIpv6GatewaySpec" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) wait := incrementalWait(3*time.Second, 3*time.Second) @@ -192,10 +192,6 @@ func resourceAlicloudVpcIpv6GatewayUpdate(d *schema.ResourceData, meta interface } if update { action := "ModifyIpv6GatewayAttribute" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, modifyIpv6GatewayAttributeReq, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter.go index e5ee6af9dac..cefc6dcbcc5 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter.go @@ -118,6 +118,10 @@ func resourceAlicloudVpcTrafficMirrorFilterRead(d *schema.ResourceData, meta int func resourceAlicloudVpcTrafficMirrorFilterUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } update := false request := map[string]interface{}{ "TrafficMirrorFilterId": d.Id(), @@ -140,10 +144,6 @@ func resourceAlicloudVpcTrafficMirrorFilterUpdate(d *schema.ResourceData, meta i request["DryRun"] = v } action := "UpdateTrafficMirrorFilterAttribute" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) wait := incrementalWait(3*time.Second, 3*time.Second) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter_egress_rule.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter_egress_rule.go index f885befbf6d..bb63609848d 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter_egress_rule.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter_egress_rule.go @@ -188,6 +188,10 @@ func resourceAlicloudVpcTrafficMirrorFilterEgressRuleUpdate(d *schema.ResourceDa client := meta.(*connectivity.AliyunClient) vpcService := VpcService{client} var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } update := false parts, err := ParseResourceId(d.Id(), 2) if err != nil { @@ -244,10 +248,6 @@ func resourceAlicloudVpcTrafficMirrorFilterEgressRuleUpdate(d *schema.ResourceDa request["DryRun"] = v } action := "UpdateTrafficMirrorFilterRuleAttribute" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) wait := incrementalWait(3*time.Second, 3*time.Second) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter_ingress_rule.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter_ingress_rule.go index 62405c198f6..67f69e42235 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter_ingress_rule.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_traffic_mirror_filter_ingress_rule.go @@ -188,6 +188,10 @@ func resourceAlicloudVpcTrafficMirrorFilterIngressRuleUpdate(d *schema.ResourceD client := meta.(*connectivity.AliyunClient) vpcService := VpcService{client} var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } update := false parts, err := ParseResourceId(d.Id(), 2) if err != nil { @@ -244,10 +248,6 @@ func resourceAlicloudVpcTrafficMirrorFilterIngressRuleUpdate(d *schema.ResourceD request["DryRun"] = v } action := "UpdateTrafficMirrorFilterRuleAttribute" - conn, err := client.NewVpcClient() - if err != nil { - return WrapError(err) - } runtime := util.RuntimeOptions{} runtime.SetAutoretry(true) wait := incrementalWait(3*time.Second, 3*time.Second) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_vbr_ha.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_vbr_ha.go new file mode 100644 index 00000000000..e5bc34ce90e --- /dev/null +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpc_vbr_ha.go @@ -0,0 +1,175 @@ +package alicloud + +import ( + "fmt" + "log" + "regexp" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAlicloudVpcVbrHa() *schema.Resource { + return &schema.Resource{ + Create: resourceAlicloudVpcVbrHaCreate, + Read: resourceAlicloudVpcVbrHaRead, + Update: resourceAlicloudVpcVbrHaUpdate, + Delete: resourceAlicloudVpcVbrHaDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.All(validation.StringLenBetween(2, 256), validation.StringDoesNotMatch(regexp.MustCompile(`(^http://.*)|(^https://.*)`), "It cannot begin with \"http://\", \"https://\".")), + }, + "dry_run": { + Type: schema.TypeBool, + Optional: true, + }, + "peer_vbr_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "vbr_ha_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "vbr_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAlicloudVpcVbrHaCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + var response map[string]interface{} + action := "CreateVbrHa" + request := make(map[string]interface{}) + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + if v, ok := d.GetOk("description"); ok { + request["Description"] = v + } + if v, ok := d.GetOkExists("dry_run"); ok { + request["DryRun"] = v + } + request["PeerVbrId"] = d.Get("peer_vbr_id") + request["RegionId"] = client.RegionId + if v, ok := d.GetOk("vbr_ha_name"); ok { + request["Name"] = v + } + request["VbrId"] = d.Get("vbr_id") + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + request["ClientToken"] = buildClientToken("CreateVbrHa") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, "alicloud_vpc_vbr_ha", action, AlibabaCloudSdkGoERROR) + } + + d.SetId(fmt.Sprint(response["VbrHaId"])) + vpcService := VpcService{client} + stateConf := BuildStateConf([]string{}, []string{"Active"}, d.Timeout(schema.TimeoutCreate), 5*time.Second, vpcService.VpcVbrHaStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + + return resourceAlicloudVpcVbrHaRead(d, meta) +} +func resourceAlicloudVpcVbrHaRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + vpcService := VpcService{client} + object, err := vpcService.DescribeVpcVbrHa(d.Id()) + if err != nil { + if NotFoundError(err) { + log.Printf("[DEBUG] Resource alicloud_vpc_vbr_ha vpcService.DescribeVpcVbrHa Failed!!! %s", err) + d.SetId("") + return nil + } + return WrapError(err) + } + d.Set("description", object["Description"]) + d.Set("peer_vbr_id", object["PeerVbrId"]) + d.Set("status", object["Status"]) + d.Set("vbr_ha_name", object["Name"]) + d.Set("vbr_id", object["VbrId"]) + return nil +} +func resourceAlicloudVpcVbrHaUpdate(d *schema.ResourceData, meta interface{}) error { + log.Println(fmt.Sprintf("[WARNING] The resouce has not update operation.")) + return resourceAlicloudVpcVbrHaRead(d, meta) +} +func resourceAlicloudVpcVbrHaDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*connectivity.AliyunClient) + vpcService := VpcService{client} + action := "DeleteVbrHa" + var response map[string]interface{} + conn, err := client.NewVpcClient() + if err != nil { + return WrapError(err) + } + request := map[string]interface{}{ + "InstanceId": d.Id(), + } + + request["RegionId"] = client.RegionId + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + request["ClientToken"] = buildClientToken("DeleteVbrHa") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + stateConf := BuildStateConf([]string{}, []string{}, d.Timeout(schema.TimeoutDelete), 5*time.Second, vpcService.VpcVbrHaStateRefreshFunc(d.Id(), []string{})) + if _, err := stateConf.WaitForState(); err != nil { + return WrapErrorf(err, IdMsg, d.Id()) + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpn_connection.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpn_connection.go index 90121c2d04d..3fe641049d8 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpn_connection.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpn_connection.go @@ -104,7 +104,7 @@ func resourceAliyunVpnConnection() *schema.Resource { "ike_auth_alg": { Type: schema.TypeString, Optional: true, - Default: VPN_AUTH_SHA, + Computed: true, ValidateFunc: validation.StringInSlice([]string{VPN_AUTH_SHA, VPN_AUTH_MD5, VPN_AUTH_SHA256, VPN_AUTH_SHA386, VPN_AUTH_SHA512}, false), }, "ike_pfs": { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpn_gateway.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpn_gateway.go index 3f24dbf6f2e..a7877c54631 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpn_gateway.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_vpn_gateway.go @@ -2,10 +2,13 @@ package alicloud import ( "fmt" + "log" "strconv" "strings" "time" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/denverdino/aliyungo/common" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" @@ -13,7 +16,6 @@ import ( "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/services/vpc" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) @@ -265,6 +267,10 @@ func resourceAliyunVpnGatewayUpdate(d *schema.ResourceData, meta interface{}) er } func resourceAliyunVpnGatewayDelete(d *schema.ResourceData, meta interface{}) error { + if d.Get("instance_charge_type").(string) == "PrePaid" { + log.Printf("[WARN] Cannot destroy resource Alicloud Resource VPN Gateway. Terraform will remove this resource from the state file, however resources may remain.") + return nil + } client := meta.(*connectivity.AliyunClient) vpnGatewayService := VpnGatewayService{client} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_waf_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_waf_instance.go index 12b186ee245..73ee4a1c2c9 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_waf_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_waf_instance.go @@ -213,6 +213,10 @@ func resourceAlicloudWafInstanceRead(d *schema.ResourceData, meta interface{}) e } func resourceAlicloudWafInstanceUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewBssopenapiClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} update := false request := map[string]interface{}{ @@ -265,10 +269,6 @@ func resourceAlicloudWafInstanceUpdate(d *schema.ResourceData, meta interface{}) } if update { action := "ModifyInstance" - conn, err := client.NewBssopenapiClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 5*time.Second) err = resource.Retry(3*time.Minute, func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-12-14"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_waf_protection_module.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_waf_protection_module.go index e552d5de2f3..7b3f89948c9 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_waf_protection_module.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_waf_protection_module.go @@ -116,6 +116,10 @@ func resourceAlicloudWafProtectionModuleRead(d *schema.ResourceData, meta interf } func resourceAlicloudWafProtectionModuleUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*connectivity.AliyunClient) + conn, err := client.NewWafClient() + if err != nil { + return WrapError(err) + } var response map[string]interface{} parts, err := ParseResourceId(d.Id(), 3) if err != nil { @@ -139,10 +143,6 @@ func resourceAlicloudWafProtectionModuleUpdate(d *schema.ResourceData, meta inte if update { action := "ModifyProtectionModuleMode" - conn, err := client.NewWafClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-10"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) @@ -172,10 +172,6 @@ func resourceAlicloudWafProtectionModuleUpdate(d *schema.ResourceData, meta inte if update { action := "ModifyProtectionModuleStatus" - conn, err := client.NewWafClient() - if err != nil { - return WrapError(err) - } wait := incrementalWait(3*time.Second, 3*time.Second) err = resource.Retry(d.Timeout(schema.TimeoutUpdate), func() *resource.RetryError { response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-10"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_yundun_dbaudit_instance.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_yundun_dbaudit_instance.go index ce806b96b0e..52ae3d0b911 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_yundun_dbaudit_instance.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_yundun_dbaudit_instance.go @@ -3,12 +3,12 @@ package alicloud import ( "time" + log "github.com/sirupsen/logrus" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" - "github.com/aliyun/alibaba-cloud-sdk-go/services/yundun_dbaudit" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" "github.com/aliyun/alibaba-cloud-sdk-go/services/bssopenapi" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" @@ -48,7 +48,7 @@ func resourceAlicloudDbauditInstance() *schema.Resource { "period": { Type: schema.TypeInt, ValidateFunc: validation.IntInSlice([]int{1, 3, 6, 12, 24, 36}), - Optional: true, + Required: true, }, "vswitch_id": { Type: schema.TypeString, @@ -198,24 +198,8 @@ func resourceAlicloudDbauditInstanceUpdate(d *schema.ResourceData, meta interfac } func resourceAlicloudDbauditInstanceDelete(d *schema.ResourceData, meta interface{}) error { - client := meta.(*connectivity.AliyunClient) - dbauditService := DbauditService{client} - request := yundun_dbaudit.CreateRefundInstanceRequest() - request.InstanceId = d.Id() - - raw, err := dbauditService.client.WithDbauditClient(func(dbauditClient *yundun_dbaudit.Client) (interface{}, error) { - return dbauditClient.RefundInstance(request) - }) - - if err != nil { - return WrapErrorf(err, DefaultErrorMsg, d.Id(), request.GetActionName(), AlibabaCloudSdkGoERROR) - } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) - // Wait for the release procedure of cloud resource dependencies. Instance can not be fetched through api as soon as release has - // been invoked, however the resources have not been fully destroyed yet. Therefore, a certain amount time of waiting - // is quite necessary (conservative estimation cloud be less then 3 minutes) - time.Sleep(time.Duration(RELEASE_HANG_MINS) * time.Minute) - return WrapError(dbauditService.WaitForYundunDbauditInstance(d.Id(), Deleted, 0)) + log.Printf("[WARN] Cannot destroy resourceAlicloudDbauditInstance. Terraform will remove this resource from the state file, however resources may remain.") + return nil } func buildDbauditCreateRequest(d *schema.ResourceData, meta interface{}) *bssopenapi.CreateInstanceRequest { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_alidns.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_alidns.go index d6a90a59f8e..10b0a096212 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_alidns.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_alidns.go @@ -254,3 +254,234 @@ func (s *AlidnsService) QueryAvailableInstances(id string) (object map[string]in object = res[0].(map[string]interface{}) return object, nil } + +func (s *AlidnsService) DescribeAlidnsCustomLine(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewAlidnsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeCustomLine" + request := map[string]interface{}{ + "LineId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"DnsCustomLine.NotExists"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("Alidns::CustomLine", id)), NotFoundMsg, ProviderERROR) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *AlidnsService) DescribeCustomLine(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewAlidnsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeCustomLine" + request := map[string]interface{}{ + "LineId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"DnsCustomLine.NotExists"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("Alidns::CustomLine", id)), NotFoundMsg, ProviderERROR) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *AlidnsService) DescribeAlidnsGtmInstance(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewAlidnsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeDnsGtmInstance" + request := map[string]interface{}{ + "InstanceId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"DnsGtmInstance.NotExists"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("Alidns:GtmInstance", id)), NotFoundWithResponse, response) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *AlidnsService) DescribeAlidnsAddressPool(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewAlidnsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeDnsGtmInstanceAddressPool" + request := map[string]interface{}{ + "AddrPoolId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"DnsGtmAddrPool.NotExists"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("Alidns::AddressPool", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *AlidnsService) DescribeAlidnsAccessStrategy(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewAlidnsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeDnsGtmAccessStrategy" + request := map[string]interface{}{ + "StrategyId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"DnsGtmAccessStrategy.NotExists"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("Alidns:DnsGtmAccessStrategy", id)), NotFoundWithResponse, response) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *AlidnsService) DescribeAlidnsMonitorConfig(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewAlidnsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeDnsGtmMonitorConfig" + request := map[string]interface{}{ + "MonitorConfigId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-01-09"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_alikafka.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_alikafka.go index 8b16f1b9c8c..31eeaf005a9 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_alikafka.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_alikafka.go @@ -1,11 +1,15 @@ package alicloud import ( + "fmt" "log" "regexp" "strings" "time" + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" @@ -735,6 +739,29 @@ func (s *AlikafkaService) ignoreTag(t alikafka.TagResource) bool { return false } +func (s *AlikafkaService) tagVOTagsToMap(tags []alikafka.TagVO) map[string]string { + result := make(map[string]string) + for _, t := range tags { + if !s.tagVOIgnoreTag(t) { + result[t.Key] = t.Value + } + } + return result +} + +func (s *AlikafkaService) tagVOIgnoreTag(t alikafka.TagVO) bool { + filter := []string{"^aliyun", "^acs:", "^http://", "^https://"} + for _, v := range filter { + log.Printf("[DEBUG] Matching prefix %v with %v\n", v, t.Key) + ok, _ := regexp.MatchString(v, t.Key) + if ok { + log.Printf("[DEBUG] Found Alibaba Cloud specific t %s (val: %s), ignoring.\n", t.Key, t.Value) + return true + } + } + return false +} + func (s *AlikafkaService) diffTags(oldTags, newTags []alikafka.TagResourcesTag) ([]alikafka.TagResourcesTag, []alikafka.TagResourcesTag) { // First, we're creating everything we have create := make(map[string]interface{}) @@ -766,3 +793,172 @@ func (s *AlikafkaService) tagsFromMap(m map[string]interface{}) []alikafka.TagRe return result } + +func (s *AlikafkaService) GetAllowedIpList(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewAlikafkaClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetAllowedIpList" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "InstanceId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-16"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *AlikafkaService) SetResourceTags(d *schema.ResourceData, resourceType string) error { + if d.HasChange("tags") { + added, removed := parsingTags(d) + conn, err := s.client.NewAlikafkaClient() + if err != nil { + return WrapError(err) + } + + removedTagKeys := make([]string, 0) + for _, v := range removed { + if !ignoredTags(v, "") { + removedTagKeys = append(removedTagKeys, v) + } + } + if len(removedTagKeys) > 0 { + action := "UntagResources" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "ResourceType": resourceType, + "ResourceId.1": d.Id(), + } + for i, key := range removedTagKeys { + request[fmt.Sprintf("TagKey.%d", i+1)] = key + } + wait := incrementalWait(2*time.Second, 1*time.Second) + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + response, err := conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-16"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if IsExpectedErrors(err, []string{ThrottlingUser, "ONS_SYSTEM_FLOW_CONTROL"}) || IsThrottling(err) { + wait() + return resource.RetryableError(err) + + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + return nil + }) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + if len(added) > 0 { + action := "TagResources" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "ResourceType": resourceType, + "ResourceId.1": d.Id(), + } + count := 1 + for key, value := range added { + request[fmt.Sprintf("Tag.%d.Key", count)] = key + request[fmt.Sprintf("Tag.%d.Value", count)] = value + count++ + } + + wait := incrementalWait(2*time.Second, 1*time.Second) + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + response, err := conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-16"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if IsExpectedErrors(err, []string{ThrottlingUser, "ONS_SYSTEM_FLOW_CONTROL"}) || IsThrottling(err) { + wait() + return resource.RetryableError(err) + + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + return nil + }) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + d.SetPartial("tags") + } + return nil +} +func (s *AlikafkaService) DescribeAliKafkaConsumerGroup(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewAlikafkaClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetConsumerList" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "InstanceId": parts[0], + } + idExist := false + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-16"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + if fmt.Sprint(response["Success"]) == "false" { + return object, WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + v, err := jsonpath.Get("$.ConsumerList.ConsumerVO", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.ConsumerList.ConsumerVO", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("AliKafka", id)), NotFoundWithResponse, response) + } + for _, v := range v.([]interface{}) { + if fmt.Sprint(v.(map[string]interface{})["ConsumerId"]) == parts[1] { + idExist = true + return v.(map[string]interface{}), nil + } + } + if !idExist { + return object, WrapErrorf(Error(GetNotFoundMessage("AliKafka", id)), NotFoundWithResponse, response) + } + return object, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_bss_open_api.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_bss_open_api.go index 5133dd5a449..021d25fc7d6 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_bss_open_api.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_bss_open_api.go @@ -14,7 +14,7 @@ type BssOpenApiService struct { client *connectivity.AliyunClient } -func (s *BssOpenApiService) QueryAvailableInstances(id, productCode, productType string) (object map[string]interface{}, err error) { +func (s *BssOpenApiService) QueryAvailableInstances(id, productCode, productType, productTypeIntl string) (object map[string]interface{}, err error) { var response map[string]interface{} conn, err := s.client.NewBssopenapiClient() if err != nil { @@ -39,6 +39,9 @@ func (s *BssOpenApiService) QueryAvailableInstances(id, productCode, productType } if IsExpectedErrors(err, []string{"NotApplicable"}) { conn.Endpoint = String(connectivity.BssOpenAPIEndpointInternational) + if len(productTypeIntl) != 0 { + request["ProductType"] = productTypeIntl + } return resource.RetryableError(err) } return resource.NonRetryableError(err) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cloudphone.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cloudphone.go index 891322d2c9f..f5d60ca1992 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cloudphone.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cloudphone.go @@ -57,3 +57,109 @@ func (s *CloudphoneService) DescribeEcpKeyPair(id string) (object map[string]int object = v.([]interface{})[0].(map[string]interface{}) return object, nil } + +func (s *CloudphoneService) DescribeEcpInstance(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewCloudphoneClient() + if err != nil { + return nil, WrapError(err) + } + action := "ListInstances" + var instanceId = fmt.Sprint([]string{id}) + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "MaxResults": 1, + "InstanceId": instanceId, + } + + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, instanceId, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.Instances.Instance", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, instanceId, "$.Instances.Instance", response) + } + if len(v.([]interface{})) < 1 { + + return object, WrapErrorf(Error(GetNotFoundMessage("ECP", instanceId)), NotFoundWithResponse, response) + } else { + if fmt.Sprint([]string{fmt.Sprint(v.([]interface{})[0].(map[string]interface{})["InstanceId"])}) != instanceId { + return object, WrapErrorf(Error(GetNotFoundMessage("ECP", instanceId)), NotFoundWithResponse, response) + } + } + object = v.([]interface{})[0].(map[string]interface{}) + return object, nil +} + +func (s *CloudphoneService) EcpInstanceStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeEcpInstance(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} + +func (s *CloudphoneService) ListInstanceVncUrl(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewCloudphoneClient() + if err != nil { + return nil, WrapError(err) + } + action := "ListInstanceVncUrl" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "InstanceId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-12-30"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cr.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cr.go index bfe0abbc0a7..e61066b8183 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cr.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cr.go @@ -376,3 +376,94 @@ func (s *CrService) CrEndpointAclServiceStateRefreshFunc(id string, failStates [ return object, fmt.Sprint(object["Status"]), nil } } + +func (s *CrService) DescribeCrChartNamespace(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewAcrClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetChartNamespace" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "InstanceId": parts[0], + "NamespaceName": parts[1], + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if IsExpectedErrorCodes(fmt.Sprint(response["Code"]), []string{"CHART_NAMESPACE_NOT_EXIST"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("CR", id)), NotFoundWithResponse, response) + } + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} +func (s *CrService) DescribeCrChartRepository(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewAcrClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetChartRepository" + parts, err := ParseResourceId(id, 3) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "RepoName": parts[2], + "RepoNamespaceName": parts[1], + "InstanceId": parts[0], + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-12-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if IsExpectedErrorCodes(fmt.Sprint(response["Code"]), []string{"CHART_REPO_NOT_EXIST"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("CR", id)), NotFoundWithResponse, response) + } + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cs.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cs.go index 504bc448dc7..c4e87f10abe 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cs.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_cs.go @@ -7,6 +7,8 @@ import ( "strings" "time" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/alibabacloud-go/tea/tea" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -29,6 +31,16 @@ type CsClient struct { client *client.Client } +type Component struct { + ComponentName string `json:"component_name"` + Version string `json:"version"` + NextVersion string `json:"next_version"` + CanUpgrade bool `json:"can_upgrade"` + Required bool `json:"required"` + Status string `json:"status"` + ErrMessage string `json:"err_message"` +} + const ( COMPONENT_AUTO_SCALER = "cluster-autoscaler" COMPONENT_DEFAULT_VRESION = "v1.0.0" @@ -186,6 +198,236 @@ func (s *CsService) DescribeCsKubernetes(id string) (cluster *cs.KubernetesClust return } +// This function returns the latest addon status information +func (s *CsClient) DescribeCsKubernetesAddonStatus(clusterId string, addonName string) (*Component, error) { + result := &Component{} + + resp, err := s.client.DescribeClusterAddonsUpgradeStatus(&clusterId, &client.DescribeClusterAddonsUpgradeStatusRequest{ + ComponentIds: []*string{tea.String(addonName)}, + }) + if err != nil { + return nil, WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "DescribeClusterAddonsUpgradeStatus", err) + } + + addon, ok := resp.Body[addonName] + if !ok { + return nil, WrapErrorf(Error(ResourceNotfound), DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "DescribeClusterAddonsUpgradeStatus") + } + + addonInfo := addon.(map[string]interface{})["addon_info"] + tasks := addon.(map[string]interface{})["tasks"] + result.Version = addonInfo.(map[string]interface{})["version"].(string) + result.CanUpgrade = addon.(map[string]interface{})["can_upgrade"].(bool) + result.Status = tasks.(map[string]interface{})["status"].(string) + if message, ok := tasks.(map[string]interface{})["message"]; ok { + result.ErrMessage = message.(string) + } + + return result, nil +} + +// This function returns the latest multiple addons status information +func (s *CsClient) DescribeCsKubernetesAllAddonsStatus(clusterId string, addons []*string) (map[string]*Component, error) { + addonsStatus := make(map[string]*Component) + resp, err := s.client.DescribeClusterAddonsUpgradeStatus(&clusterId, &client.DescribeClusterAddonsUpgradeStatusRequest{ + ComponentIds: addons, + }) + if err != nil { + return nil, WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "DescribeClusterAddonsUpgradeStatus", err) + } + + for name, status := range resp.Body { + c := &Component{} + addonInfo := status.(map[string]interface{})["addon_info"] + tasks := status.(map[string]interface{})["tasks"] + c.Version = addonInfo.(map[string]interface{})["version"].(string) + c.CanUpgrade = status.(map[string]interface{})["can_upgrade"].(bool) + c.Status = tasks.(map[string]interface{})["status"].(string) + if message, ok := tasks.(map[string]interface{})["message"]; ok { + c.ErrMessage = message.(string) + } + + addonsStatus[name] = c + } + + return addonsStatus, nil +} + +// This function returns all available addons metadata of the cluster +func (s *CsClient) DescribeClusterAddonsMetadata(clusterId string) (map[string]*Component, error) { + result := make(map[string]*Component) + + resp, err := s.client.DescribeClusterAddonsVersion(&clusterId) + if err != nil { + return nil, WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "DescribeClusterAddonsVersion", err) + } + + for name, addon := range resp.Body { + fields := addon.(map[string]interface{}) + version := fields["version"].(string) + nextVersion := fields["next_version"].(string) + canUpgrade := fields["can_upgrade"].(bool) + required := fields["required"].(bool) + c := &Component{ + ComponentName: name, + Version: version, + NextVersion: nextVersion, + CanUpgrade: canUpgrade, + Required: required, + } + result[name] = c + } + + return result, nil +} + +func (s *CsClient) DescribeCsKubernetesAddon(id string) (*Component, error) { + parts, err := ParseResourceId(id, 2) + if err != nil { + return nil, WrapError(err) + } + clusterId := parts[0] + addonName := parts[1] + addonsMetadata, err := s.DescribeClusterAddonsMetadata(clusterId) + if err != nil { + return nil, err + } + + addonStatus, err := s.DescribeCsKubernetesAddonStatus(clusterId, addonName) + if err != nil { + return nil, WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "DescribeCsKubernetesAddonStatus", err) + } + + // Update some fields + if addon, existed := addonsMetadata[addonName]; existed { + addon.Version = addonStatus.Version + addon.Status = addonStatus.Status + addon.CanUpgrade = addonStatus.CanUpgrade + addon.ErrMessage = addonStatus.ErrMessage + return addon, nil + } + + return nil, WrapErrorf(Error(ResourceNotfound), DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "DescribeCsKubernetesAddon") +} + +func (s *CsClient) CsKubernetesAddonStateRefreshFunc(clusterId string, addonName string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeCsKubernetesAddonStatus(clusterId, addonName) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + for _, failState := range failStates { + if object.Status == failState { + return object, object.Status, WrapError(Error(FailedToReachTargetStatusWithResponse, object.Status, object.ErrMessage)) + } + } + return object, object.Status, nil + } +} + +func (s *CsClient) installAddon(d *schema.ResourceData) error { + clusterId := d.Get("cluster_id").(string) + + body := make([]*client.InstallClusterAddonsRequestBody, 0) + b := &client.InstallClusterAddonsRequestBody{ + Name: tea.String(d.Get("name").(string)), + Version: tea.String(d.Get("version").(string)), + } + body = append(body, b) + + creationArgs := &client.InstallClusterAddonsRequest{ + Body: body, + } + + _, err := s.client.InstallClusterAddons(&clusterId, creationArgs) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "installAddon", err) + } + + return nil +} + +func (s *CsClient) upgradeAddon(d *schema.ResourceData) error { + clusterId := d.Get("cluster_id").(string) + + body := make([]*client.UpgradeClusterAddonsRequestBody, 0) + b := &client.UpgradeClusterAddonsRequestBody{ + ComponentName: tea.String(d.Get("name").(string)), + NextVersion: tea.String(d.Get("version").(string)), + } + body = append(body, b) + + upgradeArgs := &client.UpgradeClusterAddonsRequest{ + Body: body, + } + + _, err := s.client.UpgradeClusterAddons(&clusterId, upgradeArgs) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "upgradeAddon", err) + } + + return nil +} + +func (s *CsClient) uninstallAddon(d *schema.ResourceData) error { + parts, err := ParseResourceId(d.Id(), 2) + if err != nil { + return WrapError(err) + } + clusterId := parts[0] + + body := make([]*client.UnInstallClusterAddonsRequestAddons, 0) + b := &client.UnInstallClusterAddonsRequestAddons{ + Name: tea.String(parts[1]), + } + body = append(body, b) + + uninstallArgs := &client.UnInstallClusterAddonsRequest{ + Addons: body, + } + + _, err = s.client.UnInstallClusterAddons(&clusterId, uninstallArgs) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "uninstallAddon", err) + } + + return nil +} + +// This function returns the status of all available addons of the cluster +func (s *CsClient) DescribeCsKubernetesAllAvailableAddons(clusterId string) (map[string]*Component, error) { + availableAddons, err := s.DescribeClusterAddonsMetadata(clusterId) + if err != nil { + return nil, err + } + + queryList := make([]*string, 0) + for name := range availableAddons { + queryList = append(queryList, tea.String(name)) + } + + status, err := s.DescribeCsKubernetesAllAddonsStatus(clusterId, queryList) + if err != nil { + return nil, WrapErrorf(err, DefaultErrorMsg, ResourceAlicloudCSKubernetesAddon, "DescribeCsKubernetesExistedAddons", err) + } + + for name, addon := range availableAddons { + if _, ok := status[name]; !ok { + continue + } + addon.Version = status[name].Version + addon.Status = status[name].Status + addon.CanUpgrade = status[name].CanUpgrade + addon.ErrMessage = status[name].ErrMessage + } + + return availableAddons, nil +} + func (s *CsService) DescribeCsKubernetesNodePool(id string) (nodePool *cs.NodePoolDetail, err error) { invoker := NewInvoker() var requestInfo *cs.Client diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dbfs.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dbfs.go index 0d13efb35b2..6727ce0ffc0 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dbfs.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dbfs.go @@ -70,6 +70,18 @@ func (s *DbfsService) DescribeDbfsInstance(id string) (object map[string]interfa return } +func (s *DbfsService) DescribeDbfsInstanceAttachment(id string) (object map[string]interface{}, err error) { + parts, err := ParseResourceId(id, 2) + if err != nil { + return object, WrapError(err) + } + object, err = s.DescribeDbfsInstance(parts[0]) + if err != nil { + return object, WrapError(err) + } + return object, nil +} + func (s *DbfsService) DbfsInstanceStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { return func() (interface{}, string, error) { object, err := s.DescribeDbfsInstance(id) @@ -89,3 +101,133 @@ func (s *DbfsService) DbfsInstanceStateRefreshFunc(id string, failStates []strin return object, fmt.Sprint(object["Status"]), nil } } + +func (s *DbfsService) DescribeDbfsSnapshot(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewDbfsClient() + if err != nil { + return nil, WrapError(err) + } + action := "ListSnapshot" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "PageSize": PageSizeMedium, + "PageNumber": 1, + } + idExist := false + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-04-18"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.Snapshots", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Snapshots", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("DBFS", id)), NotFoundWithResponse, response) + } + for _, v := range v.([]interface{}) { + if fmt.Sprint(v.(map[string]interface{})["SnapshotId"]) == id { + idExist = true + return v.(map[string]interface{}), nil + } + } + if len(v.([]interface{})) < request["PageSize"].(int) { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + if !idExist { + return object, WrapErrorf(Error(GetNotFoundMessage("DBFS", id)), NotFoundWithResponse, response) + } + return +} + +func (s *DbfsService) DbfsSnapshotStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeDbfsSnapshot(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} + +func (s *DbfsService) DescribeDbfsServiceLinkedRole(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewDbfsClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetServiceLinkedRole" + request := map[string]interface{}{} + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2020-04-18"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *DbfsService) DbfsServiceLinkedRoleStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeDbfsServiceLinkedRole(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["DbfsLinkedRole"]) == failState { + return object, fmt.Sprint(object["DbfsLinkedRole"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["DbfsLinkedRole"]))) + } + } + return object, fmt.Sprint(object["DbfsLinkedRole"]), nil + } +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dcdn.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dcdn.go index 32ed5d986e9..4c97f44a644 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dcdn.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dcdn.go @@ -2,6 +2,7 @@ package alicloud import ( "encoding/json" + "time" "github.com/PaesslerAG/jsonpath" util "github.com/alibabacloud-go/tea-utils/service" @@ -179,3 +180,63 @@ func (s *DcdnService) DcdnDomainConfigStateRefreshFunc(id string, failStates []s return object, object["Status"].(string), nil } } + +func (s *DcdnService) DescribeDcdnIpaDomain(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewDcdnClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeDcdnIpaDomainDetail" + request := map[string]interface{}{ + "DomainName": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2018-01-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidDomain.NotFound"}) { + err = WrapErrorf(Error(GetNotFoundMessage("DcdnIpaDomain", id)), NotFoundMsg, ProviderERROR) + return object, err + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.DomainDetail", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.DomainDetail", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *DcdnService) DcdnIpaDomainStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeDcdnIpaDomain(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if object["DomainStatus"].(string) == failState { + return object, object["DomainStatus"].(string), WrapError(Error(FailedToReachTargetStatus, object["DomainStatus"].(string))) + } + } + return object, object["DomainStatus"].(string), nil + } +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dts.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dts.go index 761062e79c0..41fcf5ea505 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dts.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_dts.go @@ -440,6 +440,9 @@ func (s *DtsService) DescribeDtsConsumerChannel(id string) (object map[string]in }) addDebug(action, response, request) if err != nil { + if IsExpectedErrors(err, []string{"Forbidden.InstanceNotFound", "InvalidJobId"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("DTS", id)), NotFoundWithResponse, response) + } return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) } v, err := jsonpath.Get("$.ConsumerChannels", response) @@ -465,3 +468,127 @@ func (s *DtsService) DescribeDtsConsumerChannel(id string) (object map[string]in } return } + +func (s *DtsService) DescribeDtsMigrationJob(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewDtsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeDtsJobs" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "DtsJobId": id, + } + request["JobType"] = "MIGRATION" + request["PageSize"] = PageSizeLarge + request["PageNumber"] = 1 + idExist := false + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-01-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"Forbidden.InstanceNotFound", "InvalidJobId"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("DTS", id)), NotFoundWithResponse, response) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.DtsJobList", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.DtsJobList", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("DTS", id)), NotFoundWithResponse, response) + } + for _, v := range v.([]interface{}) { + if fmt.Sprint(v.(map[string]interface{})["DtsJobId"]) == id { + idExist = true + return v.(map[string]interface{}), nil + } + } + if len(v.([]interface{})) < request["PageSize"].(int) { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + if !idExist { + return object, WrapErrorf(Error(GetNotFoundMessage("DTS", id)), NotFoundWithResponse, response) + } + return object, nil +} + +func (s *DtsService) DtsMigrationJobStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeDtsMigrationJob(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} + +func (s *DtsService) DescribeDtsMigrationInstance(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewDtsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeDtsJobDetail" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "DtsInstanceID": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2020-01-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"Forbidden.InstanceNotFound", "InvalidJobId"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("DTS", id)), NotFoundWithResponse, response) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + if fmt.Sprint(response["Success"]) == "false" { + return object, WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ecs.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ecs.go index dffa0a20afc..f60d2aabb61 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ecs.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ecs.go @@ -285,6 +285,50 @@ func (s *EcsService) DescribeSecurityGroup(id string) (group ecs.DescribeSecurit return *response, nil } +func (s *EcsService) DescribeSecurityGroupAttribute(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewEcsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeSecurityGroupAttribute" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "SecurityGroupId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + return nil + }) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidSecurityGroupId.NotFound"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("ECS:SecurityGroup", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + if v.(map[string]interface{})["SecurityGroupId"] != id { + err = WrapErrorf(Error(GetNotFoundMessage("Security Group", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + return + } + object = v.(map[string]interface{}) + return object, nil +} + func (s *EcsService) DescribeSecurityGroupRule(id string) (rule ecs.Permission, err error) { parts, err := ParseResourceId(id, 8) if err != nil { @@ -344,6 +388,14 @@ func (s *EcsService) DescribeAvailableResources(d *schema.ResourceData, meta int request := ecs.CreateDescribeAvailableResourceRequest() request.RegionId = s.client.RegionId request.DestinationResource = string(destination) + if destination == InstanceTypeResource { + if v, ok := d.GetOk("cpu_core_count"); ok && v.(int) > 0 { + request.Cores = requests.NewInteger(v.(int)) + } + if v, ok := d.GetOk("memory_size"); ok && v.(float64) > 0 { + request.Memory = requests.NewFloat(v.(float64)) + } + } request.IoOptimized = string(IOOptimized) if v, ok := d.GetOk("availability_zone"); ok && strings.TrimSpace(v.(string)) != "" { @@ -942,7 +994,6 @@ func (s *EcsService) WaitForNetworkInterface(id string, status Status, timeout i return WrapErrorf(err, WaitTimeoutMsg, id, GetFunc(1), timeout, object.Status, string(status), ProviderERROR) } } - return nil } func (s *EcsService) QueryPrivateIps(eniId string) ([]string, error) { @@ -2322,3 +2373,107 @@ func (s *EcsService) DescribeEcsSessionManagerStatus(id string) (object map[stri object = v.(map[string]interface{}) return object, nil } + +func (s *EcsService) DescribeEcsPrefixList(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewEcsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribePrefixListAttributes" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "PrefixListId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidPrefixListId.NotFound"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("ECS:PrefixList", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *EcsService) DescribeEcsStorageCapacityUnit(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewEcsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeStorageCapacityUnits" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "StorageCapacityUnitId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.StorageCapacityUnits.StorageCapacityUnit", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.StorageCapacityUnits.StorageCapacityUnit", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("ECS", id)), NotFoundWithResponse, response) + } else { + if fmt.Sprint(v.([]interface{})[0].(map[string]interface{})["StorageCapacityUnitId"]) != id { + return object, WrapErrorf(Error(GetNotFoundMessage("ECS", id)), NotFoundWithResponse, response) + } + } + object = v.([]interface{})[0].(map[string]interface{}) + return object, nil +} + +func (s *EcsService) EcsStorageCapacityUnitStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeEcsStorageCapacityUnit(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ess.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ess.go index 70c74737c00..3500b1660d1 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ess.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ess.go @@ -2,6 +2,7 @@ package alicloud import ( "fmt" + "strconv" "strings" "time" @@ -149,6 +150,34 @@ func (s *EssService) WaitForEssNotification(id string, status Status, timeout in } } +func (s *EssService) ActivityStateRefreshFunc(activityId string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + + request := ess.CreateDescribeScalingActivitiesRequest() + request.ScalingActivityId = &[]string{activityId} + request.RegionId = s.client.RegionId + raw, e := s.client.WithEssClient(func(essClient *ess.Client) (interface{}, error) { + return essClient.DescribeScalingActivities(request) + }) + if e != nil { + return nil, "", WrapErrorf(e, activityId, request.GetActionName(), AlibabaCloudSdkGoERROR) + } + + response, _ := raw.(*ess.DescribeScalingActivitiesResponse) + for _, v := range response.ScalingActivities.ScalingActivity { + if v.ScalingActivityId == activityId { + for _, failState := range failStates { + if fmt.Sprint(v.StatusCode) == failState { + return v, fmt.Sprint(v.StatusCode), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(v.StatusCode))) + } + } + return v, fmt.Sprint(v.StatusCode), nil + } + } + return nil, "", Error("activity not found") + } +} + func (s *EssService) DescribeEssScalingGroup(id string) (group ess.ScalingGroup, err error) { request := ess.CreateDescribeScalingGroupsRequest() request.ScalingGroupId = &[]string{id} @@ -256,6 +285,19 @@ func (s *EssService) flattenDataDiskMappings(list []ess.DataDisk) []map[string]i return result } +func (s *EssService) flattenSpotPriceLimitMappings(list []ess.SpotPriceModel) []map[string]interface{} { + result := make([]map[string]interface{}, 0, len(list)) + for _, i := range list { + p, _ := strconv.ParseFloat(strconv.FormatFloat(i.PriceLimit, 'f', 2, 64), 64) + l := map[string]interface{}{ + "instance_type": i.InstanceType, + "price_limit": p, + } + result = append(result, l) + } + return result +} + func (s *EssService) flattenVserverGroupList(vServerGroups []ess.VServerGroup) []map[string]interface{} { groups := make([]map[string]interface{}, 0, len(vServerGroups)) for _, v := range vServerGroups { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_fnf.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_fnf.go index 5b16c0946c2..7e71d9924e3 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_fnf.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_fnf.go @@ -1,9 +1,13 @@ package alicloud import ( + "fmt" + "time" + "github.com/PaesslerAG/jsonpath" util "github.com/alibabacloud-go/tea-utils/service" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) type FnfService struct { @@ -77,3 +81,112 @@ func (s *FnfService) DescribeFnfSchedule(id string) (object map[string]interface object = v.(map[string]interface{}) return object, nil } + +func (s *FnfService) DescribeFnFExecution(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewFnfClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeExecution" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "ExecutionName": parts[1], + "FlowName": parts[0], + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2019-03-15"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"FlowNotExists"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("FnF:Execution", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *FnfService) FnFExecutionStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeFnFExecution(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} +func (s *FnfService) DescribeExecution(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewFnfClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeExecution" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "ExecutionName": parts[1], + "FlowName": parts[0], + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2019-03-15"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"FlowNotExists"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("FnF:Execution", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ga.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ga.go index 4b0bd02b66a..eafedad7d68 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ga.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ga.go @@ -325,10 +325,13 @@ func (s *GaService) DescribeGaBandwidthPackageAttachment(id string) (object map[ return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) } object = v.(map[string]interface{}) - if object["BasicBandwidthPackage"] == nil || object["BasicBandwidthPackage"].(map[string]interface{})["InstanceId"] != parts[1] { - return object, WrapErrorf(Error(GetNotFoundMessage("GaBandwidthPackageAttachment", id)), NotFoundMsg, ProviderERROR) + + basic, exist1 := object["BasicBandwidthPackage"] + cross, exist2 := object["CrossDomainBandwidthPackage"] + if (exist1 && basic.(map[string]interface{})["InstanceId"] == parts[1]) || (exist2 && cross.(map[string]interface{})["InstanceId"] == parts[1]) { + return object, nil } - return object, nil + return object, WrapErrorf(Error(GetNotFoundMessage("GaBandwidthPackageAttachment", id)), NotFoundMsg, ProviderERROR) } func (s *GaService) GaEndpointGroupStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { @@ -446,3 +449,248 @@ func (s *GaService) DescribeAcceleratorAutoRenewAttribute(id string) (object map object = v.(map[string]interface{}) return object, nil } + +func (s *GaService) DescribeGaAcl(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewGaplusClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetAcl" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "AclId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"NotExist.Acl"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("Ga:Acl", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *GaService) GaAclStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeGaAcl(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["AclStatus"]) == failState { + return object, fmt.Sprint(object["AclStatus"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["AclStatus"]))) + } + } + return object, fmt.Sprint(object["AclStatus"]), nil + } +} + +func (s *GaService) GetAcl(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewGaplusClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetAcl" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "AclId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"NotExist.Acl"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("Ga:Acl", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *GaService) DescribeGaAclAttachment(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewGaplusClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeListener" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "ListenerId": parts[0], + } + idExist := false + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"NotExist.Listener"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("Ga::AclAttachment", id)), NotFoundWithResponse, response) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + resp, _ := v.(map[string]interface{}) + if v, ok := resp["RelatedAcls"].([]interface{}); ok && len(v) > 0 { + for _, aclArgs := range v { + aclArg := aclArgs.(map[string]interface{}) + if fmt.Sprint(aclArg["AclId"]) == parts[1] { + idExist = true + resp["status"] = aclArg["Status"] + return resp, nil + } + } + } + + if !idExist { + return object, WrapErrorf(Error(GetNotFoundMessage("Ga::AclAttachment", id)), NotFoundWithResponse, response) + } + return object, nil +} + +func (s *GaService) GaAclAttachmentStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeGaAclAttachment(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["status"]) == failState { + return object, fmt.Sprint(object["status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["RelatedAcls[*].Status"]))) + } + } + return object, fmt.Sprint(object["status"]), nil + } +} + +func (s *GaService) DescribeGaAdditionalCertificate(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewGaplusClient() + if err != nil { + return nil, WrapError(err) + } + action := "ListListenerCertificates" + parts, err := ParseResourceId(id, 3) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "AcceleratorId": parts[0], + "ListenerId": parts[1], + "Role": "additional", + "MaxResults": PageSizeMedium, + } + idExist := false + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-11-20"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.Certificates", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Certificates", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("Ga", id)), NotFoundWithResponse, response) + } + for _, v := range v.([]interface{}) { + if fmt.Sprint(v.(map[string]interface{})["Domain"]) == parts[2] { + idExist = true + return v.(map[string]interface{}), nil + } + } + + if nextToken, ok := response["NextToken"].(string); ok && nextToken != "" { + request["NextToken"] = nextToken + } else { + break + } + } + if !idExist { + return object, WrapErrorf(Error(GetNotFoundMessage("Ga", id)), NotFoundWithResponse, response) + } + return +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_gpdb.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_gpdb.go index b4d25c2f42d..cd1c99f173f 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_gpdb.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_gpdb.go @@ -119,6 +119,9 @@ func (s *GpdbService) DescribeGpdbSecurityIps(id string) (ips []string, err erro separator = COMMA_SEPARATED } for _, ip := range strings.Split(ipstr, COMMA_SEPARATED) { + if ip == LOCAL_HOST_IP { + continue + } ipsMap[ip] = ip } @@ -384,3 +387,131 @@ func (s *GpdbService) GpdbAccountStateRefreshFunc(id string, failStates []string return object, fmt.Sprint(object["AccountStatus"]), nil } } + +func (s *GpdbService) ListTagResources(id string, resourceType string) (object interface{}, err error) { + conn, err := s.client.NewGpdbClient() + if err != nil { + return nil, WrapError(err) + } + action := "ListTagResources" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "ResourceType": resourceType, + "ResourceId.1": id, + } + tags := make([]interface{}, 0) + var response map[string]interface{} + + for { + wait := incrementalWait(3*time.Second, 5*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err := conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-05-03"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if IsExpectedErrors(err, []string{Throttling}) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + v, err := jsonpath.Get("$.TagResources", response) + if err != nil { + return resource.NonRetryableError(WrapErrorf(err, FailedGetAttributeMsg, id, "$.TagResources", response)) + } + if v != nil { + tags = append(tags, v.([]interface{})...) + } + return nil + }) + if err != nil { + err = WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + return + } + if response["NextToken"] == nil { + break + } + request["NextToken"] = response["NextToken"] + } + + return tags, nil +} + +func (s *GpdbService) SetResourceTags(d *schema.ResourceData, resourceType string) error { + + if d.HasChange("tags") { + added, removed := parsingTags(d) + conn, err := s.client.NewGpdbClient() + if err != nil { + return WrapError(err) + } + + removedTagKeys := make([]string, 0) + for _, v := range removed { + if !ignoredTags(v, "") { + removedTagKeys = append(removedTagKeys, v) + } + } + if len(removedTagKeys) > 0 { + action := "UnTagResources" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "ResourceType": resourceType, + "ResourceId.1": d.Id(), + } + for i, key := range removedTagKeys { + request[fmt.Sprintf("TagKey.%d", i+1)] = key + } + wait := incrementalWait(2*time.Second, 1*time.Second) + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + response, err := conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-05-03"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if IsThrottling(err) { + wait() + return resource.RetryableError(err) + + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + return nil + }) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + if len(added) > 0 { + action := "TagResources" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "ResourceType": resourceType, + "ResourceId.1": d.Id(), + } + count := 1 + for key, value := range added { + request[fmt.Sprintf("Tag.%d.Key", count)] = key + request[fmt.Sprintf("Tag.%d.Value", count)] = value + count++ + } + + wait := incrementalWait(2*time.Second, 1*time.Second) + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + response, err := conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-05-03"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if IsThrottling(err) { + wait() + return resource.RetryableError(err) + + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + return nil + }) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + d.SetPartial("tags") + } + return nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_hbr.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_hbr.go index 47c3ef0400b..50b156f647e 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_hbr.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_hbr.go @@ -574,3 +574,61 @@ func (s *HbrService) DescribeHbrServerBackupPlan(id string) (object map[string]i } return } + +func (s *HbrService) DescribeHbrReplicationVault(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewHbrClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeVaults" + request := map[string]interface{}{ + "PageSize": 10, + "PageNumber": 1, + } + idExist := false + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-09-08"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + if fmt.Sprint(response["Success"]) == "false" { + return object, WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + v, err := jsonpath.Get("$.Vaults.Vault", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Vaults.Vault", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("HBR", id)), NotFoundWithResponse, response) + } + for _, v := range v.([]interface{}) { + if fmt.Sprint(v.(map[string]interface{})["VaultId"]) == id { + idExist = true + return v.(map[string]interface{}), nil + } + } + if len(v.([]interface{})) < request["PageSize"].(int) { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + if !idExist { + return object, WrapErrorf(Error(GetNotFoundMessage("HBR", id)), NotFoundWithResponse, response) + } + return +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_mongodb.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_mongodb.go index b649f9dad28..bf283342221 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_mongodb.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_mongodb.go @@ -469,6 +469,7 @@ func (s *MongoDBService) tagsFromMap(m map[string]interface{}) []dds.TagResource return result } + func (s *MongoDBService) DescribeMongodbAuditPolicy(id string) (object map[string]interface{}, err error) { var response map[string]interface{} conn, err := s.client.NewDdsClient() @@ -802,3 +803,232 @@ func (s *MongoDBService) ListTagResources(id string, resourceType string) (objec return tags, nil } + +func (s *MongoDBService) DescribeMongodbShardingNetworkPublicAddress(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewDdsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeShardingNetworkAddress" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "DBInstanceId": parts[0], + "NodeId": parts[1], + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-12-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidDBInstanceId.NotFound"}) { + return object, WrapErrorf(err, NotFoundMsg, AlibabaCloudSdkGoERROR) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.NetworkAddresses.NetworkAddress", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.NetworkAddresses.NetworkAddress", response) + } + exist := false + var networkAddress = make([]map[string]interface{}, 0) + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("MongoDB", id)), NotFoundWithResponse, response) + } else { + for _, item := range v.([]interface{}) { + if item.(map[string]interface{})["NetworkType"].(string) == "Public" { + exist = true + networkAddress = append(networkAddress, item.(map[string]interface{})) + } + } + if !exist { + return object, WrapErrorf(Error(GetNotFoundMessage("MongoDB", id)), NotFoundWithResponse, response) + } + } + object = make(map[string]interface{}, 0) + object["NetworkAddress"] = networkAddress + return object, nil +} + +func (s *MongoDBService) DescribeShardingNodeType(id string) (string, error) { + var response map[string]interface{} + conn, err := s.client.NewDdsClient() + if err != nil { + return "", WrapError(err) + } + action := "DescribeShardingNetworkAddress" + parts, err := ParseResourceId(id, 2) + if err != nil { + return "", WrapError(err) + } + request := map[string]interface{}{ + "DBInstanceId": parts[0], + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-12-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidDBInstanceId.NotFound"}) { + return "", WrapErrorf(err, NotFoundMsg, AlibabaCloudSdkGoERROR) + } + return "", WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.NetworkAddresses.NetworkAddress", response) + if err != nil { + return "", WrapErrorf(err, FailedGetAttributeMsg, id, "$.NetworkAddresses.NetworkAddress", response) + } + + var nodeType string + if len(v.([]interface{})) < 1 { + return "", WrapErrorf(Error(GetNotFoundMessage("MongoDB", id)), NotFoundWithResponse, response) + } else { + for _, item := range v.([]interface{}) { + if item.(map[string]interface{})["NodeId"].(string) == parts[1] { + nodeType = fmt.Sprint(item.(map[string]interface{})["NodeType"]) + break + } + } + } + if nodeType == "" { + return "", WrapErrorf(Error(GetNotFoundMessage("MongoDB", id)), NotFoundWithResponse, response) + } + + return nodeType, nil +} + +func (s *MongoDBService) MongodbShardingNetworkPublicAddressStateRefreshFunc(id, nodeType string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + parts, err := ParseResourceId(id, 2) + if err != nil { + return nil, "", WrapError(err) + } + object, err := s.DescribeMongodbServerlessInstance(parts[0]) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + var status string + + switch nodeType { + case "mongos": + status = fmt.Sprint(object["DBInstanceStatus"]) + case "db": + list := object["ShardList"].(map[string]interface{})["ShardAttribute"] + for _, item := range list.([]interface{}) { + mongos := item.(map[string]interface{}) + if mongos["NodeId"] == parts[1] { + status = fmt.Sprint(mongos["Status"]) + break + } + } + case "cs": + list := object["ConfigserverList"].(map[string]interface{})["ConfigserverAttribute"] + for _, item := range list.([]interface{}) { + mongos := item.(map[string]interface{}) + if mongos["NodeId"] == parts[1] { + status = fmt.Sprint(mongos["Status"]) + break + } + } + } + + for _, failState := range failStates { + if status == failState { + return object, status, WrapError(Error(FailedToReachTargetStatus, status)) + } + } + + return object, status, nil + } +} + +func (s *MongoDBService) DescribeMongodbShardingNetworkPrivateAddress(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewDdsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeShardingNetworkAddress" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "DBInstanceId": parts[0], + "NodeId": parts[1], + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2015-12-01"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidDBInstanceId.NotFound"}) { + return object, WrapErrorf(err, NotFoundMsg, AlibabaCloudSdkGoERROR) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.NetworkAddresses.NetworkAddress", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.NetworkAddresses.NetworkAddress", response) + } + exist := false + var networkAddress = make([]map[string]interface{}, 0) + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("MongoDB", id)), NotFoundWithResponse, response) + } else { + for _, item := range v.([]interface{}) { + if item.(map[string]interface{})["NetworkType"].(string) != "Public" { + exist = true + networkAddress = append(networkAddress, item.(map[string]interface{})) + } + } + if !exist { + return object, WrapErrorf(Error(GetNotFoundMessage("MongoDB", id)), NotFoundWithResponse, response) + } + } + object = make(map[string]interface{}, 0) + object["NetworkAddress"] = networkAddress + return object, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_mse.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_mse.go index 68f4298e51a..82f4949ae34 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_mse.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_mse.go @@ -1,6 +1,9 @@ package alicloud import ( + "fmt" + "time" + "github.com/PaesslerAG/jsonpath" util "github.com/alibabacloud-go/tea-utils/service" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" @@ -62,3 +65,108 @@ func (s *MseService) MseClusterStateRefreshFunc(id string, failStates []string) return object, object["InitStatus"].(string), nil } } + +func (s *MseService) DescribeMseGateway(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewMseClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetGateway" + request := map[string]interface{}{ + "GatewayUniqueId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2019-05-31"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + if IsExpectedErrorCodes(fmt.Sprint(response["Code"]), []string{"404"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("MSE:Gateway", id)), NotFoundMsg, ProviderERROR) + } + if fmt.Sprint(response["Success"]) == "false" { + return object, WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + v, err := jsonpath.Get("$.Data", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Data", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *MseService) MseGatewayStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeMseGateway(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} + +func (s *MseService) ListGatewaySlb(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewMseClient() + if err != nil { + return nil, WrapError(err) + } + action := "ListGatewaySlb" + request := map[string]interface{}{ + "GatewayUniqueId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2019-05-31"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + if IsExpectedErrorCodes(fmt.Sprint(response["Code"]), []string{"404"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("MSE:Gateway", id)), NotFoundMsg, ProviderERROR) + } + if fmt.Sprint(response["Success"]) == "false" { + return object, WrapError(fmt.Errorf("%s failed, response: %v", action, response)) + } + v, err := jsonpath.Get("$.Data", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Data", response) + } + object = make(map[string]interface{}) + object["SlbList"] = v + return object, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_nas.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_nas.go index b6456bfddde..ce1b3a623d1 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_nas.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_nas.go @@ -2,6 +2,9 @@ package alicloud import ( "fmt" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/PaesslerAG/jsonpath" util "github.com/alibabacloud-go/tea-utils/service" @@ -28,8 +31,8 @@ func (s *NasService) DescribeNasFileSystem(id string) (object map[string]interfa runtime.SetAutoretry(true) response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) if err != nil { - if IsExpectedErrors(err, []string{"InvalidFileSystem.NotFound", "Forbidden.NasNotFound", "Resource.NotFound"}) { - err = WrapErrorf(Error(GetNotFoundMessage("NasFileSystem", id)), NotFoundMsg, ProviderERROR) + if IsExpectedErrors(err, []string{"InvalidFileSystem.NotFound", "Forbidden.NasNotFound", "Resource.NotFound", "InvalidFileSystemStatus.Ordering"}) { + err = WrapErrorf(Error(GetNotFoundMessage("NasFileSystem", id)), NotFoundWithResponse, ProviderERROR) return object, err } err = WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) @@ -195,7 +198,8 @@ func (s *NasService) DescribeNasFileSystemStateRefreshFunc(id string, defaultRet return func() (interface{}, string, error) { object, err := s.DescribeNasFileSystem(id) if err != nil { - if NeedRetry(err) && IsExpectedErrors(err, []string{InvalidFileSystemStatus_Ordering}) { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. return nil, defaultRetryState, nil } return nil, "", WrapError(err) @@ -208,3 +212,540 @@ func (s *NasService) DescribeNasFileSystemStateRefreshFunc(id string, defaultRet return object, fmt.Sprint(object["Status"]), nil } } + +func (s *NasService) DescribeNasSnapshot(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewNasClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeSnapshots" + request := map[string]interface{}{ + "SnapshotIds": id, + "FileSystemType": "extreme", + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidFileSystem.NotFound"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS:Snapshot", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.Snapshots.Snapshot", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Snapshots.Snapshot", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } else { + if fmt.Sprint(v.([]interface{})[0].(map[string]interface{})["SnapshotId"]) != id { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } + } + object = v.([]interface{})[0].(map[string]interface{}) + return object, nil +} + +func (s *NasService) NasSnapshotStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeNasSnapshot(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} +func (s *NasService) DescribeNasFileset(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewNasClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeFilesets" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "FileSystemId": parts[0], + "MaxResults": 20, + } + idExist := false + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidFileSystem.NotFound"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS:Snapshot", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.Entries.Entrie", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Entries.Entrie", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } + for _, v := range v.([]interface{}) { + if fmt.Sprint(v.(map[string]interface{})["FsetId"]) == parts[1] { + idExist = true + return v.(map[string]interface{}), nil + } + } + + if nextToken, ok := response["NextToken"].(string); ok && nextToken != "" { + request["NextToken"] = nextToken + } else { + break + } + } + if !idExist { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } + return +} + +func (s *NasService) NasFilesetStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeNasFileset(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} + +func (s *NasService) ListTagResources(id string, resourceType string) (object interface{}, err error) { + conn, err := s.client.NewNasClient() + if err != nil { + return nil, WrapError(err) + } + action := "ListTagResources" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "ResourceType": resourceType, + "ResourceId.1": id, + } + tags := make([]interface{}, 0) + var response map[string]interface{} + + for { + wait := incrementalWait(3*time.Second, 5*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err := conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + v, err := jsonpath.Get("$.TagResources.TagResource", response) + if err != nil { + return resource.NonRetryableError(WrapErrorf(err, FailedGetAttributeMsg, id, "$.TagResources.TagResource", response)) + } + if v != nil { + tags = append(tags, v.([]interface{})...) + } + return nil + }) + if err != nil { + err = WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + return + } + if response["NextToken"] == nil { + break + } + request["NextToken"] = response["NextToken"] + } + + return tags, nil +} + +func (s *NasService) SetResourceTags(d *schema.ResourceData, resourceType string) error { + + if d.HasChange("tags") { + added, removed := parsingTags(d) + conn, err := s.client.NewNasClient() + if err != nil { + return WrapError(err) + } + + removedTagKeys := make([]string, 0) + for _, v := range removed { + if !ignoredTags(v, "") { + removedTagKeys = append(removedTagKeys, v) + } + } + if len(removedTagKeys) > 0 { + action := "UntagResources" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "ResourceType": resourceType, + "ResourceId.1": d.Id(), + } + for i, key := range removedTagKeys { + request[fmt.Sprintf("TagKey.%d", i+1)] = key + } + wait := incrementalWait(2*time.Second, 1*time.Second) + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + response, err := conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if IsThrottling(err) { + wait() + return resource.RetryableError(err) + + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + return nil + }) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + if len(added) > 0 { + action := "TagResources" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "ResourceType": resourceType, + "ResourceId.1": d.Id(), + } + count := 1 + for key, value := range added { + request[fmt.Sprintf("Tag.%d.Key", count)] = key + request[fmt.Sprintf("Tag.%d.Value", count)] = value + count++ + } + + wait := incrementalWait(2*time.Second, 1*time.Second) + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + response, err := conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &util.RuntimeOptions{}) + if err != nil { + if IsThrottling(err) { + wait() + return resource.RetryableError(err) + + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + return nil + }) + if err != nil { + return WrapErrorf(err, DefaultErrorMsg, d.Id(), action, AlibabaCloudSdkGoERROR) + } + } + d.SetPartial("tags") + } + return nil +} + +func (s *NasService) DescribeNasAutoSnapshotPolicy(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewNasClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeAutoSnapshotPolicies" + request := map[string]interface{}{ + "AutoSnapshotPolicyId": id, + "FileSystemType": "extreme", + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidLifecyclePolicy.NotFound"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS:AutoSnapshotPolicy", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.AutoSnapshotPolicies.AutoSnapshotPolicy", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.AutoSnapshotPolicies.AutoSnapshotPolicy", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } else { + if fmt.Sprint(v.([]interface{})[0].(map[string]interface{})["AutoSnapshotPolicyId"]) != id { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } + } + object = v.([]interface{})[0].(map[string]interface{}) + return object, nil +} + +func (s *NasService) NasAutoSnapshotPolicyStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeNasAutoSnapshotPolicy(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} + +func (s *NasService) DescribeNasLifecyclePolicy(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewNasClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeLifecyclePolicies" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "FileSystemId": parts[0], + "PageNumber": 1, + "PageSize": PageSizeMedium, + } + idExist := false + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2017-06-26"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidFileSystem.NotFound"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS:LifecyclePolicy", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.LifecyclePolicies", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.LifecyclePolicies", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } + for _, v := range v.([]interface{}) { + if fmt.Sprint(v.(map[string]interface{})["LifecyclePolicyName"]) == parts[1] { + idExist = true + return v.(map[string]interface{}), nil + } + } + if len(v.([]interface{})) < request["PageSize"].(int) { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + if !idExist { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } + return +} + +func (s *NasService) DescribeNasDataFlow(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewNasClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeDataFlows" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "FileSystemId": parts[0], + "MaxResults": 20, + } + idExist := false + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2017-06-26"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidFileSystem.NotFound"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS:DataFlow", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.DataFlowInfo.DataFlow", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.DataFlowInfo.DataFlow", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } + for _, v := range v.([]interface{}) { + if fmt.Sprint(v.(map[string]interface{})["DataFlowId"]) == parts[1] { + idExist = true + return v.(map[string]interface{}), nil + } + } + + if nextToken, ok := response["NextToken"].(string); ok && nextToken != "" { + request["NextToken"] = nextToken + } else { + break + } + } + if !idExist { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } + return +} + +func (s *NasService) NasDataFlowStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeNasDataFlow(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} +func (s *NasService) DescribeNasRecycleBin(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewNasClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetRecycleBinAttribute" + request := map[string]interface{}{ + "FileSystemId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("GET"), StringPointer("2017-06-26"), StringPointer("AK"), request, nil, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"InvalidFileSystem.NotFound"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS:RecycleBin", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.RecycleBinAttribute", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.RecycleBinAttribute", response) + } + object = v.(map[string]interface{}) + if fmt.Sprint(object["Status"]) == "Disable" { + return object, WrapErrorf(Error(GetNotFoundMessage("NAS", id)), NotFoundWithResponse, response) + } + + return object, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_polardb.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_polardb.go index e9828671882..da59c76de11 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_polardb.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_polardb.go @@ -425,7 +425,6 @@ func (s *PolarDBService) WaitForPolarDBEndpoints(d *schema.ResourceData, status } time.Sleep(DefaultIntervalShort * time.Second) } - return "", nil } func (s *PolarDBService) DescribePolarDBConnection(id string) (*polardb.Address, error) { diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ram.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ram.go index 24c90cc3468..a2cd5e9cfa9 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ram.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ram.go @@ -828,3 +828,69 @@ func (s *RamService) DescribeRamAccountPasswordPolicy(id string) (*ram.GetPasswo return response, nil } + +func (s *RamService) DescribeRamSecurityPreference(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewImsClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetSecurityPreference" + request := map[string]interface{}{} + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.SecurityPreference", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.SecurityPreference", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *RamService) DescribeRamServiceLinkedRole(id string) (*ram.GetRoleResponse, error) { + parts, _ := ParseResourceId(id, 2) + id = parts[1] + + response := &ram.GetRoleResponse{} + request := ram.CreateGetRoleRequest() + request.RegionId = s.client.RegionId + request.RoleName = id + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + raw, err := s.client.WithRamClient(func(ramClient *ram.Client) (interface{}, error) { + return ramClient.GetRole(request) + }) + if err != nil { + if IsExpectedErrors(err, []string{ThrottlingUser}) { + time.Sleep(2 * time.Second) + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + addDebug(request.GetActionName(), raw, request.RpcRequest, request) + response, _ = raw.(*ram.GetRoleResponse) + return nil + }) + if err != nil { + if IsExpectedErrors(err, []string{"EntityNotExist.Role"}) { + return response, WrapErrorf(err, NotFoundMsg, AlibabaCloudSdkGoERROR) + } + return response, WrapErrorf(err, DefaultErrorMsg, id, request.GetActionName(), AlibabaCloudSdkGoERROR) + } + return response, nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_rds.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_rds.go index 21d64052f14..8aa983ca102 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_rds.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_rds.go @@ -315,6 +315,116 @@ func (s *RdsService) RefreshParameters(d *schema.ResourceData, attribute string) return nil } +func (s *RdsService) RefreshPgHbaConf(d *schema.ResourceData, attribute string) error { + response, err := s.DescribePGHbaConfig(d.Id()) + if err != nil { + return WrapError(err) + } + runningHbaItems := make([]interface{}, 0) + if v, exist := response["RunningHbaItems"].(map[string]interface{})["HbaItem"]; exist { + runningHbaItems = v.([]interface{}) + } + + var items []map[string]interface{} + + documented, ok := d.GetOk(attribute) + if !ok { + return nil + } + + for _, item := range documented.(*schema.Set).List() { + item := item.(map[string]interface{}) + for _, item2 := range runningHbaItems { + item2 := item2.(map[string]interface{}) + if item["priority_id"] == formatInt(item2["PriorityId"]) { + mapping := map[string]interface{}{ + "type": item2["Type"], + "database": item2["Database"], + "priority_id": formatInt(item2["PriorityId"]), + "address": item2["Address"], + "user": item2["User"], + "method": item2["Method"], + } + if item2["mask"] != nil && item2["mask"] != "" { + mapping["mask"] = item2["mask"] + } + if item2["option"] != nil && item2["option"] != "" { + mapping["option"] = item2["option"] + } + items = append(items, mapping) + } + } + } + if len(items) > 0 { + if err := d.Set(attribute, items); err != nil { + return WrapError(err) + } + } + return nil +} + +func (s *RdsService) ModifyPgHbaConfig(d *schema.ResourceData, attribute string) error { + conn, err := s.client.NewRdsClient() + if err != nil { + return WrapError(err) + } + action := "ModifyPGHbaConfig" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "DBInstanceId": d.Id(), + "SourceIp": s.client.SourceIp, + } + request["OpsType"] = "update" + pgHbaConfig := d.Get("pg_hba_conf") + count := 1 + for _, i := range pgHbaConfig.(*schema.Set).List() { + i := i.(map[string]interface{}) + request[fmt.Sprint("HbaItem.", count, ".Type")] = i["type"] + if i["mask"] != nil && i["mask"] != "" { + request[fmt.Sprint("HbaItem.", count, ".Mask")] = i["mask"] + } + request[fmt.Sprint("HbaItem.", count, ".Database")] = i["database"] + request[fmt.Sprint("HbaItem.", count, ".PriorityId")] = i["priority_id"] + request[fmt.Sprint("HbaItem.", count, ".Address")] = i["address"] + request[fmt.Sprint("HbaItem.", count, ".User")] = i["user"] + request[fmt.Sprint("HbaItem.", count, ".Method")] = i["method"] + if i["option"] != nil && i["mask"] != "" { + request[fmt.Sprint("HbaItem.", count, ".Option")] = i["option"] + } + count = count + 1 + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + var response map[string]interface{} + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if IsExpectedErrors(err, []string{"InternalError"}) { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + addDebug(action, response, request) + return nil + }) + if err != nil { + return WrapError(err) + } + if err := s.WaitForDBInstance(d.Id(), Running, DefaultLongTimeout); err != nil { + return WrapError(err) + } + + desResponse, err := s.DescribePGHbaConfig(d.Id()) + if err != nil { + return WrapError(err) + } + if desResponse["LastModifyStatus"] == "failed" { + return WrapError(Error(desResponse["ModifyStatusReason"].(string))) + } + d.SetPartial(attribute) + return nil +} + func (s *RdsService) ModifyParameters(d *schema.ResourceData, attribute string) error { conn, err := s.client.NewRdsClient() if err != nil { @@ -1158,10 +1268,10 @@ func (s *RdsService) RdsDBInstanceStateRefreshFunc(id string, failStates []strin for _, failState := range failStates { if object["DBInstanceStatus"] == failState { - return object, object["DBInstanceStatus"].(string), WrapError(Error(FailedToReachTargetStatus, object["DBInstanceStatus"])) + return object, fmt.Sprint(object["DBInstanceStatus"]), WrapError(Error(FailedToReachTargetStatus, object["DBInstanceStatus"])) } } - return object, object["DBInstanceStatus"].(string), nil + return object, fmt.Sprint(object["DBInstanceStatus"]), nil } } @@ -1737,3 +1847,296 @@ func (s *RdsService) RdsAccountStateRefreshFunc(id string, failStates []string) return object, object["AccountStatus"].(string), nil } } + +func (s *RdsService) DescribeRdsBackup(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewRdsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeBackups" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "SourceIp": s.client.SourceIp, + "BackupId": parts[1], + "DBInstanceId": parts[0], + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.Items.Backup", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Items.Backup", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("RDS", id)), NotFoundWithResponse, response) + } + object = v.([]interface{})[0].(map[string]interface{}) + return object, nil +} + +func (s *RdsService) DescribeBackupTasks(id string, backupJobId string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewRdsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeBackupTasks" + request := map[string]interface{}{ + "SourceIp": s.client.SourceIp, + "DBInstanceId": id, + "BackupJobId": backupJobId, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.Items.BackupJob", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Items.BackupJob", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("RDS", id)), NotFoundWithResponse, response) + } else { + if fmt.Sprint(v.([]interface{})[0].(map[string]interface{})["BackupJobId"]) != backupJobId { + return object, WrapErrorf(Error(GetNotFoundMessage("RDS", id)), NotFoundWithResponse, response) + } + } + object = v.([]interface{})[0].(map[string]interface{}) + return object, nil +} + +func (s *RdsService) RdsBackupStateRefreshFunc(id string, backupJobId string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeBackupTasks(id, backupJobId) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if object["BackupStatus"] == failState { + return object, object["BackupStatus"].(string), WrapError(Error(FailedToReachTargetStatus, object["BackupStatus"])) + } + } + return object, object["BackupStatus"].(string), nil + } +} + +func (s *RdsService) DescribeDBInstanceHAConfig(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewRdsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeDBInstanceHAConfig" + request := map[string]interface{}{ + "SourceIp": s.client.SourceIp, + "DBInstanceId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *RdsService) DescribeRdsCloneDbInstance(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewRdsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeDBInstanceAttribute" + request := map[string]interface{}{ + "SourceIp": s.client.SourceIp, + "DBInstanceId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.Items.DBInstanceAttribute", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Items.DBInstanceAttribute", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("RDS", id)), NotFoundWithResponse, response) + } else { + if fmt.Sprint(v.([]interface{})[0].(map[string]interface{})["DBInstanceId"]) != id { + return object, WrapErrorf(Error(GetNotFoundMessage("RDS", id)), NotFoundWithResponse, response) + } + } + object = v.([]interface{})[0].(map[string]interface{}) + return object, nil +} +func (s *RdsService) DescribePGHbaConfig(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewRdsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribePGHbaConfig" + request := map[string]interface{}{ + "SourceIp": s.client.SourceIp, + "DBInstanceId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *RdsService) DescribeUpgradeMajorVersionPrecheckTask(id string, taskId int) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewRdsClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeUpgradeMajorVersionPrecheckTask" + request := map[string]interface{}{ + "SourceIp": s.client.SourceIp, + "DBInstanceId": id, + "TaskId": taskId, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-08-15"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.Items", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.Items", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("RDS", id)), NotFoundWithResponse, response) + } else { + if formatInt(v.([]interface{})[0].(map[string]interface{})["TaskId"]) != taskId { + return object, WrapErrorf(Error(GetNotFoundMessage("RDS", id)), NotFoundWithResponse, response) + } + } + object = v.([]interface{})[0].(map[string]interface{}) + return object, nil +} + +func (s *RdsService) RdsUpgradeMajorVersionRefreshFunc(id string, taskId int, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeUpgradeMajorVersionPrecheckTask(id, taskId) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if object["Result"] == failState { + return object, object["Result"].(string), WrapError(Error(FailedToReachTargetStatus, object["Result"])) + } + } + return object, object["Result"].(string), nil + } +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ros.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ros.go index 49aa9316e05..a062e156805 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ros.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_ros.go @@ -426,3 +426,63 @@ func (s *RosService) RosStackInstanceStateRefreshFunc(id string, failStates []st return object, fmt.Sprint(object["Status"]), nil } } + +func (s *RosService) DescribeRosTemplateScratch(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewRosClient() + if err != nil { + return nil, WrapError(err) + } + action := "GetTemplateScratch" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "TemplateScratchId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2019-09-10"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"TemplateScratchNotFound"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("ROS:TemplateScratch", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) + } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.TemplateScratch", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.TemplateScratch", response) + } + object = v.(map[string]interface{}) + return object, nil +} + +func (s *RosService) RosTemplateScratchStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeRosTemplateScratch(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_sae.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_sae.go index 692224fe266..e0d2217025c 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_sae.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_sae.go @@ -538,3 +538,23 @@ func (s *SaeService) UpdateSlb(d *schema.ResourceData) error { } return nil } + +func (s *SaeService) SaeApplicationStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeApplicationStatus(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil if nothing matched + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["LastChangeOrderStatus"]) == failState { + return object, fmt.Sprint(object["LastChangeOrderStatus"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["LastChangeOrderStatus"]))) + } + } + return object, fmt.Sprint(object["LastChangeOrderStatus"]), nil + } +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_slb.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_slb.go index 72baec0b5e7..91078485962 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_slb.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_slb.go @@ -202,49 +202,44 @@ func (s *SlbService) DescribeSlbListener(id string) (listener map[string]interfa return } -func (s *SlbService) DescribeSlbAcl(id string) (*slb.DescribeAccessControlListAttributeResponse, error) { - response := &slb.DescribeAccessControlListAttributeResponse{} - request := slb.CreateDescribeAccessControlListAttributeRequest() - request.RegionId = s.client.RegionId - request.AclId = id - - raw, err := s.client.WithSlbClient(func(slbClient *slb.Client) (interface{}, error) { - return slbClient.DescribeAccessControlListAttribute(request) - }) +func (s *SlbService) DescribeSlbAcl(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewSlbClient() if err != nil { - if err != nil { - if IsExpectedErrors(err, []string{"AclNotExist"}) { - return response, WrapErrorf(err, NotFoundMsg, AlibabaCloudSdkGoERROR) - } - return response, WrapErrorf(err, DefaultErrorMsg, id, request.GetActionName(), AlibabaCloudSdkGoERROR) - } + return nil, WrapError(err) } - addDebug(request.GetActionName(), raw, request.RpcRequest, request) - response, _ = raw.(*slb.DescribeAccessControlListAttributeResponse) - return response, nil -} - -func (s *SlbService) WaitForSlbAcl(id string, status Status, timeout int) error { - deadline := time.Now().Add(time.Duration(timeout) * time.Second) - for { - object, err := s.DescribeSlbAcl(id) + action := "DescribeAccessControlListAttribute" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "AclId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2014-05-15"), StringPointer("AK"), nil, request, &runtime) if err != nil { - if NotFoundError(err) { - if status == Deleted { - return nil - } - } else { - return WrapError(err) + if NeedRetry(err) { + wait() + return resource.RetryableError(err) } - } else { - return nil + return resource.NonRetryableError(err) } - - time.Sleep(DefaultIntervalShort * time.Second) - if time.Now().After(deadline) { - return WrapErrorf(err, WaitTimeoutMsg, id, GetFunc(1), timeout, object.AclId, id, ProviderERROR) + return nil + }) + addDebug(action, response, request) + if err != nil { + if IsExpectedErrors(err, []string{"AclNotExist"}) { + return object, WrapErrorf(Error(GetNotFoundMessage("SLB:Acl", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) } + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + return object, nil } func (s *SlbService) WaitForSlb(id string, status Status, timeout int) error { @@ -675,7 +670,6 @@ func (s *SlbService) WaitForSlbDomainExtension(id string, status Status, timeout return WrapErrorf(err, WaitTimeoutMsg, id, GetFunc(1), timeout, Null, string(status), ProviderERROR) } } - return nil } func (s *SlbService) setInstanceTags(d *schema.ResourceData, resourceType TagResourceType) error { @@ -824,7 +818,7 @@ func (s *SlbService) DescribeTags(resourceId string, resourceTags map[string]int return Client.ListTagResources(request) }) if err != nil { - if IsExpectedErrors(err, []string{Throttling}) { + if IsExpectedErrors(err, []string{Throttling, "Throttling.User"}) { time.Sleep(2 * time.Second) return resource.RetryableError(err) } @@ -1074,6 +1068,7 @@ func (s *SlbService) DescribeSlbCaCertificate(id string) (object map[string]inte object = v.([]interface{})[0].(map[string]interface{}) return object, nil } + func (s *SlbService) DescribeSlbTlsCipherPolicy(id string) (object map[string]interface{}, err error) { var response map[string]interface{} conn, err := s.client.NewSlbClient() @@ -1117,3 +1112,21 @@ func (s *SlbService) DescribeSlbTlsCipherPolicy(id string) (object map[string]in object = v.([]interface{})[0].(map[string]interface{}) return object, nil } + +func (s *SlbService) convertAclEntriesToString(v []interface{}) (string, error) { + arrayMaps := make([]interface{}, len(v)) + for i, vv := range v { + item := vv.(map[string]interface{}) + temp := map[string]interface{}{ + "comment": item["comment"], + "entry": item["entry"], + } + + arrayMaps[i] = temp + } + maps, err := json.Marshal(arrayMaps) + if err != nil { + return "", WrapError(err) + } + return string(maps), nil +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_vpc.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_vpc.go index 69b4d8c161e..b307fe25bbb 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_vpc.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_vpc.go @@ -2169,6 +2169,54 @@ func (s *VpcService) VpcDhcpOptionsSetStateRefreshFunc(id string, failStates []s } } +func (s *VpcService) DescribeVpcDhcpOptionsSetAttachment(id string) (object map[string]interface{}, err error) { + parts, err := ParseResourceId(id, 2) + if err != nil { + return object, WrapError(err) + } + object, err = s.DescribeVpcDhcpOptionsSet(parts[1]) + if err != nil { + return object, WrapError(err) + } + return object, nil +} + +func (s *VpcService) DescribeVpcDhcpOptionsSetAttachmentStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + parts, err := ParseResourceId(id, 2) + if err != nil { + return nil, "", WrapError(err) + } + object, err := s.DescribeVpcDhcpOptionsSetAttachment(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + status := "" + if associateVpcsList, ok := object["AssociateVpcs"]; ok { + for _, associateVpcsListItem := range associateVpcsList.([]interface{}) { + if associateVpcsListItem != nil { + associateVpcsListItemMap, ok := associateVpcsListItem.(map[string]interface{}) + if ok && associateVpcsListItemMap["VpcId"] == parts[0] { + status = associateVpcsListItemMap["AssociateStatus"].(string) + break + } + } + } + } + + for _, failState := range failStates { + if status == failState { + return object, fmt.Sprint(object["AssociateStatus"]), WrapError(Error(FailedToReachTargetStatus, status)) + } + } + return object, status, nil + } +} + func (s *VpcService) DescribeVpcNatIpCidr(id string) (object map[string]interface{}, err error) { var response map[string]interface{} conn, err := s.client.NewVpcClient() @@ -2769,3 +2817,273 @@ func (s *VpcService) DescribeVpcIpv6InternetBandwidth(id string) (object map[str object = v.([]interface{})[0].(map[string]interface{}) return object, nil } + +func (s *VpcService) DescribeVpcBgpGroup(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewVpcClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeBgpGroups" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "BgpGroupId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.BgpGroups.BgpGroup", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.BgpGroups.BgpGroup", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("VPC", id)), NotFoundWithResponse, response) + } else { + if fmt.Sprint(v.([]interface{})[0].(map[string]interface{})["BgpGroupId"]) != id { + return object, WrapErrorf(Error(GetNotFoundMessage("VPC", id)), NotFoundWithResponse, response) + } + } + object = v.([]interface{})[0].(map[string]interface{}) + return object, nil +} + +func (s *VpcService) VpcBgpGroupStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeVpcBgpGroup(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} + +func (s *VpcService) DescribeVpcVbrHa(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewVpcClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeVbrHa" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "VbrHaId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + request["ClientToken"] = buildClientToken("DescribeVbrHa") + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$", response) + } + object = v.(map[string]interface{}) + if vbrHaId, ok := object["VbrHaId"]; !ok || fmt.Sprint(vbrHaId) == "" { + return object, WrapErrorf(Error(GetNotFoundMessage("VPC", id)), NotFoundWithResponse, response) + } + return object, nil +} + +func (s *VpcService) VpcVbrHaStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeVpcVbrHa(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} + +func (s *VpcService) DescribeVpcBgpPeer(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewVpcClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeBgpPeers" + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "BgpPeerId": id, + } + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.BgpPeers.BgpPeer", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.BgpPeers.BgpPeer", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("VPC", id)), NotFoundWithResponse, response) + } else { + if fmt.Sprint(v.([]interface{})[0].(map[string]interface{})["BgpPeerId"]) != id { + return object, WrapErrorf(Error(GetNotFoundMessage("VPC", id)), NotFoundWithResponse, response) + } + } + object = v.([]interface{})[0].(map[string]interface{}) + return object, nil +} + +func (s *VpcService) VpcBgpPeerStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeVpcBgpPeer(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} +func (s *VpcService) DescribeVpcBgpNetwork(id string) (object map[string]interface{}, err error) { + var response map[string]interface{} + conn, err := s.client.NewVpcClient() + if err != nil { + return nil, WrapError(err) + } + action := "DescribeBgpNetworks" + parts, err := ParseResourceId(id, 2) + if err != nil { + err = WrapError(err) + return + } + request := map[string]interface{}{ + "RegionId": s.client.RegionId, + "RouterId": parts[0], + "PageNumber": 1, + "PageSize": PageSizeMedium, + } + idExist := false + for { + runtime := util.RuntimeOptions{} + runtime.SetAutoretry(true) + wait := incrementalWait(3*time.Second, 3*time.Second) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + response, err = conn.DoRequest(StringPointer(action), nil, StringPointer("POST"), StringPointer("2016-04-28"), StringPointer("AK"), nil, request, &runtime) + if err != nil { + if NeedRetry(err) { + wait() + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + addDebug(action, response, request) + if err != nil { + return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) + } + v, err := jsonpath.Get("$.BgpNetworks.BgpNetwork", response) + if err != nil { + return object, WrapErrorf(err, FailedGetAttributeMsg, id, "$.BgpNetworks.BgpNetwork", response) + } + if len(v.([]interface{})) < 1 { + return object, WrapErrorf(Error(GetNotFoundMessage("VPC", id)), NotFoundWithResponse, response) + } + for _, v := range v.([]interface{}) { + if fmt.Sprint(v.(map[string]interface{})["DstCidrBlock"]) == parts[1] { + idExist = true + return v.(map[string]interface{}), nil + } + } + if len(v.([]interface{})) < request["PageSize"].(int) { + break + } + request["PageNumber"] = request["PageNumber"].(int) + 1 + } + if !idExist { + return object, WrapErrorf(Error(GetNotFoundMessage("VPC", id)), NotFoundWithResponse, response) + } + return +} + +func (s *VpcService) VpcBgpNetworkStateRefreshFunc(id string, failStates []string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + object, err := s.DescribeVpcBgpNetwork(id) + if err != nil { + if NotFoundError(err) { + // Set this to nil as if we didn't find anything. + return nil, "", nil + } + return nil, "", WrapError(err) + } + + for _, failState := range failStates { + if fmt.Sprint(object["Status"]) == failState { + return object, fmt.Sprint(object["Status"]), WrapError(Error(FailedToReachTargetStatus, fmt.Sprint(object["Status"]))) + } + } + return object, fmt.Sprint(object["Status"]), nil + } +} diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_yundun_bastionhost.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_yundun_bastionhost.go index 34801a13d58..2dedc65aea3 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_yundun_bastionhost.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/service_alicloud_yundun_bastionhost.go @@ -149,7 +149,7 @@ func (s *YundunBastionhostService) UpdateInstanceSpec(schemaSpecMap map[string]s params := make([]bssopenapi.ModifyInstanceParameter, 0, len(schemaSpecMap)) for schemaName, spec := range schemaSpecMap { - params = append(params, bssopenapi.ModifyInstanceParameter{schemaName, d.Get(spec).(string)}) + params = append(params, bssopenapi.ModifyInstanceParameter{Code: schemaName, Value: d.Get(spec).(string)}) } request.Parameter = ¶ms @@ -668,7 +668,7 @@ func (s *YundunBastionhostService) DescribeBastionhostHost(id string) (object ma }) addDebug(action, response, request) if err != nil { - if IsExpectedErrors(err, []string{"Commodity.BizError.InvalidStatus", "OBJECT_NOT_FOUND"}) { + if IsExpectedErrors(err, []string{"Commodity.BizError.InvalidStatus", "OBJECT_NOT_FOUND", "HostNotFound"}) { return object, WrapErrorf(Error(GetNotFoundMessage("Bastionhost:Host", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) } return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) @@ -714,7 +714,7 @@ func (s *YundunBastionhostService) DescribeBastionhostHostAccount(id string) (ob }) addDebug(action, response, request) if err != nil { - if IsExpectedErrors(err, []string{"Commodity.BizError.InvalidStatus", "OBJECT_NOT_FOUND"}) { + if IsExpectedErrors(err, []string{"Commodity.BizError.InvalidStatus", "OBJECT_NOT_FOUND", "HostAccountNotFound"}) { return object, WrapErrorf(Error(GetNotFoundMessage("Bastionhost:HostAccount", id)), NotFoundMsg, ProviderERROR, fmt.Sprint(response["RequestId"])) } return object, WrapErrorf(err, DefaultErrorMsg, id, action, AlibabaCloudSdkGoERROR) diff --git a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/tags.go b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/tags.go index 7bdbdcf9953..ff16c1eed4e 100644 --- a/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/tags.go +++ b/terraform/providers/alicloud/vendor/github.com/aliyun/terraform-provider-alicloud/alicloud/tags.go @@ -569,13 +569,12 @@ func elasticsearchTagIgnored(tagKey, tagValue string) bool { return false } -func ignoredTags(tagKey, tagValue string) bool { +func ignoredTags(tagKey string, tagValue interface{}) bool { filter := []string{"^aliyun", "^acs:", "^http://", "^https://"} for _, v := range filter { - log.Printf("[DEBUG] Matching prefix %v with %v\n", v, tagKey) ok, _ := regexp.MatchString(v, tagKey) if ok { - log.Printf("[DEBUG] Found Alibaba Cloud specific tag %s (val: %s), ignoring.\n", tagKey, tagValue) + log.Printf("[DEBUG] Found Alibaba Cloud specific tag with key: %s and value: %s, ignoring.\n", tagKey, tagValue) return true } } diff --git a/terraform/providers/alicloud/vendor/github.com/deckarep/golang-set/.travis.yml b/terraform/providers/alicloud/vendor/github.com/deckarep/golang-set/.travis.yml deleted file mode 100644 index c760d24d1ec..00000000000 --- a/terraform/providers/alicloud/vendor/github.com/deckarep/golang-set/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: go - -go: - - 1.8 - - 1.9 - - tip - -script: - - go test -race ./... - - go test -bench=. - diff --git a/terraform/providers/alicloud/vendor/github.com/deckarep/golang-set/threadunsafe.go b/terraform/providers/alicloud/vendor/github.com/deckarep/golang-set/threadunsafe.go index 10bdd46f155..927eb23195a 100644 --- a/terraform/providers/alicloud/vendor/github.com/deckarep/golang-set/threadunsafe.go +++ b/terraform/providers/alicloud/vendor/github.com/deckarep/golang-set/threadunsafe.go @@ -76,6 +76,9 @@ func (set *threadUnsafeSet) Contains(i ...interface{}) bool { func (set *threadUnsafeSet) IsSubset(other Set) bool { _ = other.(*threadUnsafeSet) + if set.Cardinality() > other.Cardinality() { + return false + } for elem := range *set { if !other.Contains(elem) { return false diff --git a/terraform/providers/alicloud/vendor/github.com/denverdino/aliyungo/cs/node_pool.go b/terraform/providers/alicloud/vendor/github.com/denverdino/aliyungo/cs/node_pool.go index 6659f2ceb97..33dbda2c307 100644 --- a/terraform/providers/alicloud/vendor/github.com/denverdino/aliyungo/cs/node_pool.go +++ b/terraform/providers/alicloud/vendor/github.com/denverdino/aliyungo/cs/node_pool.go @@ -63,6 +63,9 @@ type ScalingGroup struct { CisEnabled *bool `json:"cis_enabled"` // ipv6 SupportIPv6 bool `json:"support_ipv6"` + // deploymentset + DeploymentSetId string `json:"deploymentset_id"` + DesiredSize *int64 `json:"desired_size,omitempty"` } type AutoScaling struct { diff --git a/terraform/providers/alicloud/vendor/modules.txt b/terraform/providers/alicloud/vendor/modules.txt index 7225c857df1..3b1483925f0 100644 --- a/terraform/providers/alicloud/vendor/modules.txt +++ b/terraform/providers/alicloud/vendor/modules.txt @@ -135,7 +135,7 @@ github.com/aliyun/credentials-go/credentials/utils # github.com/aliyun/fc-go-sdk v0.0.0-20200925033337-c013428cbe21 ## explicit github.com/aliyun/fc-go-sdk -# github.com/aliyun/terraform-provider-alicloud v1.148.0 +# github.com/aliyun/terraform-provider-alicloud v1.158.0 ## explicit; go 1.13 github.com/aliyun/terraform-provider-alicloud github.com/aliyun/terraform-provider-alicloud/alicloud @@ -205,10 +205,10 @@ github.com/cenkalti/backoff # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew -# github.com/deckarep/golang-set v1.7.1 -## explicit +# github.com/deckarep/golang-set v1.8.0 +## explicit; go 1.17 github.com/deckarep/golang-set -# github.com/denverdino/aliyungo v0.0.0-20211122042034-c78a9788662a +# github.com/denverdino/aliyungo v0.0.0-20220218034049-d2eb7f483ee8 ## explicit; go 1.15 github.com/denverdino/aliyungo/cdn github.com/denverdino/aliyungo/common