From 3c5151cef33e251668ec7b3a74fbe1dbc14604f1 Mon Sep 17 00:00:00 2001 From: WeiMengXS Date: Sun, 8 Oct 2023 15:55:12 +0800 Subject: [PATCH 1/9] feat: changelog --- ...data_source_tc_ssl_describe_certificate.go | 916 ++++++++++++++ ...source_tc_ssl_describe_certificate_test.go | 31 + .../data_source_tc_ssl_describe_companies.go | 184 +++ ...a_source_tc_ssl_describe_companies_test.go | 34 + ...describe_host_api_gateway_instance_list.go | 218 ++++ ...ibe_host_api_gateway_instance_list_test.go | 35 + ..._tc_ssl_describe_host_cdn_instance_list.go | 248 ++++ ...sl_describe_host_cdn_instance_list_test.go | 35 + ..._tc_ssl_describe_host_clb_instance_list.go | 455 +++++++ ...sl_describe_host_clb_instance_list_test.go | 33 + ..._tc_ssl_describe_host_cos_instance_list.go | 239 ++++ ...sl_describe_host_cos_instance_list_test.go | 35 + ...tc_ssl_describe_host_ddos_instance_list.go | 218 ++++ ...l_describe_host_ddos_instance_list_test.go | 34 + ...urce_tc_ssl_describe_host_deploy_record.go | 177 +++ ..._ssl_describe_host_deploy_record_detail.go | 327 +++++ ...describe_host_deploy_record_detail_test.go | 33 + ...tc_ssl_describe_host_deploy_record_test.go | 35 + ..._describe_host_lighthouse_instance_list.go | 205 +++ ...ribe_host_lighthouse_instance_list_test.go | 34 + ...tc_ssl_describe_host_live_instance_list.go | 200 +++ ...l_describe_host_live_instance_list_test.go | 34 + ..._tc_ssl_describe_host_teo_instance_list.go | 209 ++++ ...sl_describe_host_teo_instance_list_test.go | 34 + ..._tc_ssl_describe_host_tke_instance_list.go | 374 ++++++ ...sl_describe_host_tke_instance_list_test.go | 32 + ...urce_tc_ssl_describe_host_update_record.go | 191 +++ ..._ssl_describe_host_update_record_detail.go | 372 ++++++ ...describe_host_update_record_detail_test.go | 33 + ...tc_ssl_describe_host_update_record_test.go | 33 + ..._tc_ssl_describe_host_vod_instance_list.go | 191 +++ ...sl_describe_host_vod_instance_list_test.go | 35 + ..._tc_ssl_describe_host_waf_instance_list.go | 200 +++ ...sl_describe_host_waf_instance_list_test.go | 35 + ...a_source_tc_ssl_describe_manager_detail.go | 337 +++++ ...rce_tc_ssl_describe_manager_detail_test.go | 33 + .../data_source_tc_ssl_describe_managers.go | 268 ++++ ...ta_source_tc_ssl_describe_managers_test.go | 33 + tencentcloud/provider.go | 324 ++--- tencentcloud/provider_test.go | 11 + .../service_tencent_ssl_certificate.go | 1108 +++++++++++++++++ .../d/ssl_describe_certificate.html.markdown | 118 ++ .../d/ssl_describe_companies.html.markdown | 44 + ...st_api_gateway_instance_list.html.markdown | 50 + ...cribe_host_cdn_instance_list.html.markdown | 53 + ...cribe_host_clb_instance_list.html.markdown | 70 ++ ...cribe_host_cos_instance_list.html.markdown | 52 + ...ribe_host_ddos_instance_list.html.markdown | 50 + ..._describe_host_deploy_record.html.markdown | 44 + ...be_host_deploy_record_detail.html.markdown | 59 + ...ost_lighthouse_instance_list.html.markdown | 48 + ...ribe_host_live_instance_list.html.markdown | 48 + ...cribe_host_teo_instance_list.html.markdown | 49 + ...cribe_host_tke_instance_list.html.markdown | 61 + ..._describe_host_update_record.html.markdown | 44 + ...be_host_update_record_detail.html.markdown | 63 + ...cribe_host_vod_instance_list.html.markdown | 47 + ...cribe_host_waf_instance_list.html.markdown | 48 + .../ssl_describe_manager_detail.html.markdown | 60 + .../d/ssl_describe_managers.html.markdown | 53 + website/tencentcloud.erb | 57 + 61 files changed, 8588 insertions(+), 143 deletions(-) create mode 100644 tencentcloud/data_source_tc_ssl_describe_certificate.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_certificate_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_companies.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_companies_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_deploy_record.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_deploy_record_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_live_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_live_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_update_record.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_update_record_detail.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_update_record_detail_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_update_record_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_manager_detail.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_manager_detail_test.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_managers.go create mode 100644 tencentcloud/data_source_tc_ssl_describe_managers_test.go create mode 100644 website/docs/d/ssl_describe_certificate.html.markdown create mode 100644 website/docs/d/ssl_describe_companies.html.markdown create mode 100644 website/docs/d/ssl_describe_host_api_gateway_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_host_cdn_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_host_clb_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_host_cos_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_host_ddos_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_host_deploy_record.html.markdown create mode 100644 website/docs/d/ssl_describe_host_deploy_record_detail.html.markdown create mode 100644 website/docs/d/ssl_describe_host_lighthouse_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_host_live_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_host_teo_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_host_tke_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_host_update_record.html.markdown create mode 100644 website/docs/d/ssl_describe_host_update_record_detail.html.markdown create mode 100644 website/docs/d/ssl_describe_host_vod_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_host_waf_instance_list.html.markdown create mode 100644 website/docs/d/ssl_describe_manager_detail.html.markdown create mode 100644 website/docs/d/ssl_describe_managers.html.markdown diff --git a/tencentcloud/data_source_tc_ssl_describe_certificate.go b/tencentcloud/data_source_tc_ssl_describe_certificate.go new file mode 100644 index 0000000000..230b408708 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_certificate.go @@ -0,0 +1,916 @@ +/* +Use this data source to query detailed information of ssl describe_certificate + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_certificate" "describe_certificate" { + certificate_id = "8cj4g8h8" +} +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" +) + +func dataSourceTencentCloudSslDescribeCertificate() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeCertificateRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID.", + }, + "result": { + Computed: true, + Type: schema.TypeList, + Description: "result list.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "owner_uin": { + Computed: true, + Type: schema.TypeString, + Description: "Account UIN.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "project_id": { + Computed: true, + Type: schema.TypeString, + Description: "Project ID.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "from": { + Computed: true, + Type: schema.TypeString, + Description: "Certificate source: Trustasia,uploadNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "certificate_type": { + Computed: true, + Type: schema.TypeString, + Description: "Certificate type: CA = CA certificate, SVR = server certificate.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "package_type": { + Computed: true, + Type: schema.TypeString, + Description: "Types of Certificate Package: 1 = Geotrust DV SSL CA -G3, 2 = Trustasia TLS RSA CA, 3 = SecureSite Enhanced Enterprise Edition (EV Pro), 4 = SecureSite enhanced (EV), 5 = SecureSite Enterprise Professional Edition (OVPro), 6 = SecureSite Enterprise (OV), 7 = SecureSite Enterprise (OV) compatriots, 8 = Geotrust enhanced type (EV), 9 = Geotrust Enterprise (OV), 10 = Geotrust Enterprise (OV) pass,11 = Trustasia Domain Multi -domain SSL certificate, 12 = Trustasia domain model (DV) passing, 13 = Trustasia Enterprise Passing Character (OV) SSL certificate (D3), 14 = Trustasia Enterprise (OV) SSL certificate (D3), 15= Trustasia Enterprise Multi -domain name (OV) SSL certificate (D3), 16 = Trustasia enhanced (EV) SSL certificate (D3), 17 = Trustasia enhanced multi -domain name (EV) SSL certificate (D3), 18 = GlobalSign enterprise type enterprise type(OV) SSL certificate, 19 = GlobalSign Enterprise Type -type STL Certificate, 20 = GlobalSign enhanced (EV) SSL certificate, 21 = Trustasia Enterprise Tongzhi Multi -domain name (OV) SSL certificate (D3), 22 = GlobalSignignMulti -domain name (OV) SSL certificate, 23 = GlobalSign Enterprise Type -type multi -domain name (OV) SSL certificate, 24 = GlobalSign enhanced multi -domain name (EV) SSL certificate.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "product_zh_name": { + Computed: true, + Type: schema.TypeString, + Description: "Certificate issuer name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "domain": { + Computed: true, + Type: schema.TypeString, + Description: "domain name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "alias": { + Computed: true, + Type: schema.TypeString, + Description: "Remark name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "status": { + Computed: true, + Type: schema.TypeInt, + Description: "= Submitted information, to be uploaded to confirmation letter, 9 = Certificate is revoked, 10 = revoked, 11 = Re -issuance, 12 = Upload and revoke the confirmation letter.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "status_msg": { + Computed: true, + Type: schema.TypeString, + Description: "status information.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "verify_type": { + Computed: true, + Type: schema.TypeString, + Description: "Verification type: DNS_AUTO = Automatic DNS verification, DNS = manual DNS verification, file = file verification, email = email verification.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "vulnerability_status": { + Computed: true, + Type: schema.TypeString, + Description: "Vulnerability scanning status.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "cert_begin_time": { + Computed: true, + Type: schema.TypeString, + Description: "Certificate takes effect time.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "cert_end_time": { + Computed: true, + Type: schema.TypeString, + Description: "The certificate is invalid time.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "validity_period": { + Computed: true, + Type: schema.TypeString, + Description: "Validity period: unit (month).Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "insert_time": { + Computed: true, + Type: schema.TypeString, + Description: "application time.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "order_id": { + Computed: true, + Type: schema.TypeString, + Description: "Order ID.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "certificate_extra": { + Computed: true, + Type: schema.TypeList, + Description: "Certificate extension information.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "domain_number": { + Type: schema.TypeString, + Computed: true, + Description: "Certificate can be configured in the number of domain names.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "origin_certificate_id": { + Type: schema.TypeString, + Computed: true, + Description: "Original certificate ID.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "replaced_by": { + Type: schema.TypeString, + Computed: true, + Description: "Re -issue the original ID of the certificate.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "replaced_for": { + Type: schema.TypeString, + Computed: true, + Description: "Re -issue a new ID.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "renew_order": { + Type: schema.TypeString, + Computed: true, + Description: "New order certificate ID.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "s_m_cert": { + Type: schema.TypeInt, + Computed: true, + Description: "Is it a national secret certificateNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + + "dv_auth_detail": { + Computed: true, + Type: schema.TypeList, + Description: "DV certification information.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "dv_auth_key": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification key.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_value": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification value.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_domain": { + Type: schema.TypeString, + Computed: true, + Description: "DV authentication value domain name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_path": { + Type: schema.TypeString, + Computed: true, + Description: "DV authentication value path.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_key_sub_domain": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification sub -domain name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auths": { + Type: schema.TypeList, + Computed: true, + Description: "DV certification information.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "dv_auth_key": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification key.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_value": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification value.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_domain": { + Type: schema.TypeString, + Computed: true, + Description: "DV authentication value domain name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_path": { + Type: schema.TypeString, + Computed: true, + Description: "DV authentication value path.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_sub_domain": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification sub -domain name,Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_verify_type": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification type.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + }, + }, + }, + + "vulnerability_report": { + Computed: true, + Type: schema.TypeString, + Description: "Vulnerability scanning evaluation report.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "package_type_name": { + Computed: true, + Type: schema.TypeString, + Description: "Certificate type name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "status_name": { + Computed: true, + Type: schema.TypeString, + Description: "status description.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "subject_alt_name": { + Computed: true, + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: "The certificate contains multiple domain names (containing the main domain name).Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "is_vip": { + Computed: true, + Type: schema.TypeBool, + Description: "Whether it is a VIP customer.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "is_wildcard": { + Computed: true, + Type: schema.TypeBool, + Description: "Whether it is a pan -domain certificate certificate.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "is_dv": { + Computed: true, + Type: schema.TypeBool, + Description: "Whether it is the DV version.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "is_vulnerability": { + Computed: true, + Type: schema.TypeBool, + Description: "Whether the vulnerability scanning function is enabled.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "renew_able": { + Computed: true, + Type: schema.TypeBool, + Description: "Whether you can issue a certificate.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "submitted_data": { + Computed: true, + Type: schema.TypeList, + Description: "Submitted information information.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "csr_type": { + Type: schema.TypeString, + Computed: true, + Description: "CSR type, (online = online CSR, PARSE = paste CSR).Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "csr_content": { + Type: schema.TypeString, + Computed: true, + Description: "CSR content.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "certificate_domain": { + Type: schema.TypeString, + Computed: true, + Description: "Domain information.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "domain_list": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "DNS information.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "key_password": { + Type: schema.TypeString, + Computed: true, + Description: "Private key password.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "organization_name": { + Type: schema.TypeString, + Computed: true, + Description: "Enterprise or unit name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "organization_division": { + Type: schema.TypeString, + Computed: true, + Description: "department.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "organization_address": { + Type: schema.TypeString, + Computed: true, + Description: "address.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "organization_country": { + Type: schema.TypeString, + Computed: true, + Description: "nation.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "organization_city": { + Type: schema.TypeString, + Computed: true, + Description: "city.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "organization_region": { + Type: schema.TypeString, + Computed: true, + Description: "Province.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "postal_code": { + Type: schema.TypeString, + Computed: true, + Description: "Postal code.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "phone_area_code": { + Type: schema.TypeString, + Computed: true, + Description: "Local region code.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "phone_number": { + Type: schema.TypeString, + Computed: true, + Description: "Landline number.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "admin_first_name": { + Type: schema.TypeString, + Computed: true, + Description: "Administrator name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "admin_last_name": { + Type: schema.TypeString, + Computed: true, + Description: "The surname of the administrator.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "admin_phone_num": { + Type: schema.TypeString, + Computed: true, + Description: "Administrator phone number.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "admin_email": { + Type: schema.TypeString, + Computed: true, + Description: "Administrator mailbox address.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "admin_position": { + Type: schema.TypeString, + Computed: true, + Description: "Administrator position.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "contact_first_name": { + Type: schema.TypeString, + Computed: true, + Description: "Contact name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "contact_last_name": { + Type: schema.TypeString, + Computed: true, + Description: "Contact surname.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "contact_number": { + Type: schema.TypeString, + Computed: true, + Description: "Contact phone number.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "contact_email": { + Type: schema.TypeString, + Computed: true, + Description: "Contact mailbox address,Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "contact_position": { + Type: schema.TypeString, + Computed: true, + Description: "Contact position.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "verify_type": { + Type: schema.TypeString, + Computed: true, + Description: "Verification type.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + + "deployable": { + Computed: true, + Type: schema.TypeBool, + Description: "Whether it can be deployed.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "c_a_encrypt_algorithms": { + Computed: true, + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: "All encryption methods of CA certificateNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "c_a_common_names": { + Computed: true, + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: "All general names of the CA certificateNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "c_a_end_times": { + Computed: true, + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Description: "CA certificate all maturity timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "dv_revoke_auth_detail": { + Computed: true, + Type: schema.TypeList, + Description: "DV certificate revoking verification valueNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "dv_auth_key": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification key.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_value": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification value.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_domain": { + Type: schema.TypeString, + Computed: true, + Description: "DV authentication value domain name.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_path": { + Type: schema.TypeString, + Computed: true, + Description: "DV authentication value path.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_sub_domain": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification sub -domain name,Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "dv_auth_verify_type": { + Type: schema.TypeString, + Computed: true, + Description: "DV certification type.Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + }, + }}, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeCertificateRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_certificate.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + responese := ssl.DescribeCertificateResponseParams{} + CertificateId := d.Get("certificate_id").(string) + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeCertificateByID(ctx, CertificateId) + if e != nil { + return retryError(e) + } + responese = *result + return nil + }) + if err != nil { + return err + } + sslResponseMap := map[string]interface{}{} + if responese.OwnerUin != nil { + sslResponseMap["owner_uin"] = responese.OwnerUin + } + + if responese.ProjectId != nil { + sslResponseMap["project_id"] = responese.ProjectId + } + + if responese.From != nil { + sslResponseMap["from"] = responese.From + } + + if responese.CertificateType != nil { + sslResponseMap["certificate_type"] = responese.CertificateType + } + + if responese.PackageType != nil { + sslResponseMap["package_type"] = responese.PackageType + } + + if responese.ProductZhName != nil { + sslResponseMap["product_zh_name"] = responese.ProductZhName + } + + if responese.Domain != nil { + sslResponseMap["domain"] = responese.Domain + } + + if responese.Alias != nil { + sslResponseMap["alias"] = responese.Alias + } + + if responese.Status != nil { + sslResponseMap["status"] = responese.Status + } + + if responese.StatusMsg != nil { + sslResponseMap["status_msg"] = responese.StatusMsg + } + + if responese.VerifyType != nil { + sslResponseMap["verify_type"] = responese.VerifyType + } + + if responese.VulnerabilityStatus != nil { + sslResponseMap["vulnerability_status"] = responese.VulnerabilityStatus + } + + if responese.CertBeginTime != nil { + sslResponseMap["cert_begin_time"] = responese.CertBeginTime + } + + if responese.CertEndTime != nil { + sslResponseMap["cert_end_time"] = responese.CertEndTime + } + + if responese.ValidityPeriod != nil { + sslResponseMap["validity_period"] = responese.ValidityPeriod + } + + if responese.InsertTime != nil { + sslResponseMap["insert_time"] = responese.InsertTime + } + + if responese.OrderId != nil { + sslResponseMap["order_id"] = responese.OrderId + } + + if responese.CertificateExtra != nil { + certificateExtraMap := map[string]interface{}{} + + if responese.CertificateExtra.DomainNumber != nil { + certificateExtraMap["domain_number"] = responese.CertificateExtra.DomainNumber + } + + if responese.CertificateExtra.OriginCertificateId != nil { + certificateExtraMap["origin_certificate_id"] = responese.CertificateExtra.OriginCertificateId + } + + if responese.CertificateExtra.ReplacedBy != nil { + certificateExtraMap["replaced_by"] = responese.CertificateExtra.ReplacedBy + } + + if responese.CertificateExtra.ReplacedFor != nil { + certificateExtraMap["replaced_for"] = responese.CertificateExtra.ReplacedFor + } + + if responese.CertificateExtra.RenewOrder != nil { + certificateExtraMap["renew_order"] = responese.CertificateExtra.RenewOrder + } + + if responese.CertificateExtra.SMCert != nil { + certificateExtraMap["s_m_cert"] = responese.CertificateExtra.SMCert + } + + sslResponseMap["certificate_extra"] = []interface{}{certificateExtraMap} + } + + if responese.DvAuthDetail != nil { + DvAuthDetailMap := map[string]interface{}{} + + if responese.DvAuthDetail.DvAuthKey != nil { + DvAuthDetailMap["dv_auth_key"] = responese.DvAuthDetail.DvAuthKey + } + + if responese.DvAuthDetail.DvAuthValue != nil { + DvAuthDetailMap["dv_auth_value"] = responese.DvAuthDetail.DvAuthValue + } + + if responese.DvAuthDetail.DvAuthDomain != nil { + DvAuthDetailMap["dv_auth_domain"] = responese.DvAuthDetail.DvAuthDomain + } + + if responese.DvAuthDetail.DvAuthPath != nil { + DvAuthDetailMap["dv_auth_path"] = responese.DvAuthDetail.DvAuthPath + } + + if responese.DvAuthDetail.DvAuthKeySubDomain != nil { + DvAuthDetailMap["dv_auth_key_sub_domain"] = responese.DvAuthDetail.DvAuthKeySubDomain + } + + if responese.DvAuthDetail.DvAuths != nil { + dvAuthsList := []interface{}{} + for _, dvAuths := range responese.DvAuthDetail.DvAuths { + dvAuthsMap := map[string]interface{}{} + + if dvAuths.DvAuthKey != nil { + dvAuthsMap["dv_auth_key"] = dvAuths.DvAuthKey + } + + if dvAuths.DvAuthValue != nil { + dvAuthsMap["dv_auth_value"] = dvAuths.DvAuthValue + } + + if dvAuths.DvAuthDomain != nil { + dvAuthsMap["dv_auth_domain"] = dvAuths.DvAuthDomain + } + + if dvAuths.DvAuthPath != nil { + dvAuthsMap["dv_auth_path"] = dvAuths.DvAuthPath + } + + if dvAuths.DvAuthSubDomain != nil { + dvAuthsMap["dv_auth_sub_domain"] = dvAuths.DvAuthSubDomain + } + + if dvAuths.DvAuthVerifyType != nil { + dvAuthsMap["dv_auth_verify_type"] = dvAuths.DvAuthVerifyType + } + + dvAuthsList = append(dvAuthsList, dvAuthsMap) + } + + DvAuthDetailMap["dv_auths"] = []interface{}{dvAuthsList} + } + + sslResponseMap["dv_auth_detail"] = []interface{}{DvAuthDetailMap} + } + + if responese.VulnerabilityReport != nil { + sslResponseMap["vulnerability_report"] = responese.VulnerabilityReport + } + + if responese.PackageTypeName != nil { + sslResponseMap["package_type_name"] = responese.PackageTypeName + } + + if responese.StatusName != nil { + sslResponseMap["status_name"] = responese.StatusName + } + + if responese.SubjectAltName != nil { + sslResponseMap["subject_alt_name"] = responese.SubjectAltName + } + + if responese.IsVip != nil { + sslResponseMap["is_vip"] = responese.IsVip + } + + if responese.IsWildcard != nil { + sslResponseMap["is_wildcard"] = responese.IsWildcard + } + + if responese.IsDv != nil { + sslResponseMap["is_dv"] = responese.IsDv + } + + if responese.IsVulnerability != nil { + sslResponseMap["is_vulnerability"] = responese.IsVulnerability + } + + if responese.RenewAble != nil { + sslResponseMap["renew_able"] = responese.RenewAble + } + + if responese.SubmittedData != nil { + submittedDataMap := map[string]interface{}{} + + if responese.SubmittedData.CsrType != nil { + submittedDataMap["csr_type"] = responese.SubmittedData.CsrType + } + + if responese.SubmittedData.CsrContent != nil { + submittedDataMap["csr_content"] = responese.SubmittedData.CsrContent + } + + if responese.SubmittedData.CertificateDomain != nil { + submittedDataMap["certificate_domain"] = responese.SubmittedData.CertificateDomain + } + + if responese.SubmittedData.DomainList != nil { + submittedDataMap["domain_list"] = responese.SubmittedData.DomainList + } + + if responese.SubmittedData.KeyPassword != nil { + submittedDataMap["key_password"] = responese.SubmittedData.KeyPassword + } + + if responese.SubmittedData.OrganizationName != nil { + submittedDataMap["organization_name"] = responese.SubmittedData.OrganizationName + } + + if responese.SubmittedData.OrganizationDivision != nil { + submittedDataMap["organization_division"] = responese.SubmittedData.OrganizationDivision + } + + if responese.SubmittedData.OrganizationAddress != nil { + submittedDataMap["organization_address"] = responese.SubmittedData.OrganizationAddress + } + + if responese.SubmittedData.OrganizationCountry != nil { + submittedDataMap["organization_country"] = responese.SubmittedData.OrganizationCountry + } + + if responese.SubmittedData.OrganizationCity != nil { + submittedDataMap["organization_city"] = responese.SubmittedData.OrganizationCity + } + + if responese.SubmittedData.OrganizationRegion != nil { + submittedDataMap["organization_region"] = responese.SubmittedData.OrganizationRegion + } + + if responese.SubmittedData.PostalCode != nil { + submittedDataMap["postal_code"] = responese.SubmittedData.PostalCode + } + + if responese.SubmittedData.PhoneAreaCode != nil { + submittedDataMap["phone_area_code"] = responese.SubmittedData.PhoneAreaCode + } + + if responese.SubmittedData.PhoneNumber != nil { + submittedDataMap["phone_number"] = responese.SubmittedData.PhoneNumber + } + + if responese.SubmittedData.AdminFirstName != nil { + submittedDataMap["admin_first_name"] = responese.SubmittedData.AdminFirstName + } + + if responese.SubmittedData.AdminLastName != nil { + submittedDataMap["admin_last_name"] = responese.SubmittedData.AdminLastName + } + + if responese.SubmittedData.AdminPhoneNum != nil { + submittedDataMap["admin_phone_num"] = responese.SubmittedData.AdminPhoneNum + } + + if responese.SubmittedData.AdminEmail != nil { + submittedDataMap["admin_email"] = responese.SubmittedData.AdminEmail + } + + if responese.SubmittedData.AdminPosition != nil { + submittedDataMap["admin_position"] = responese.SubmittedData.AdminPosition + } + + if responese.SubmittedData.ContactFirstName != nil { + submittedDataMap["contact_first_name"] = responese.SubmittedData.ContactFirstName + } + + if responese.SubmittedData.ContactLastName != nil { + submittedDataMap["contact_last_name"] = responese.SubmittedData.ContactLastName + } + + if responese.SubmittedData.ContactNumber != nil { + submittedDataMap["contact_number"] = responese.SubmittedData.ContactNumber + } + + if responese.SubmittedData.ContactEmail != nil { + submittedDataMap["contact_email"] = responese.SubmittedData.ContactEmail + } + + if responese.SubmittedData.ContactPosition != nil { + submittedDataMap["contact_position"] = responese.SubmittedData.ContactPosition + } + + if responese.SubmittedData.VerifyType != nil { + submittedDataMap["verify_type"] = responese.SubmittedData.VerifyType + } + + sslResponseMap["submitted_data"] = []interface{}{submittedDataMap} + } + + if responese.Deployable != nil { + sslResponseMap["deployable"] = responese.Deployable + } + + if responese.CAEncryptAlgorithms != nil { + sslResponseMap["c_a_encrypt_algorithms"] = responese.CAEncryptAlgorithms + } + + if responese.CACommonNames != nil { + sslResponseMap["c_a_common_names"] = responese.CACommonNames + } + + if responese.CAEndTimes != nil { + sslResponseMap["c_a_end_times"] = responese.CAEndTimes + } + + if responese.DvRevokeAuthDetail != nil { + tmpList := []interface{}{} + for _, dvAuths := range responese.DvRevokeAuthDetail { + dvAuthsMap := map[string]interface{}{} + + if dvAuths.DvAuthKey != nil { + dvAuthsMap["dv_auth_key"] = dvAuths.DvAuthKey + } + + if dvAuths.DvAuthValue != nil { + dvAuthsMap["dv_auth_value"] = dvAuths.DvAuthValue + } + + if dvAuths.DvAuthDomain != nil { + dvAuthsMap["dv_auth_domain"] = dvAuths.DvAuthDomain + } + + if dvAuths.DvAuthPath != nil { + dvAuthsMap["dv_auth_path"] = dvAuths.DvAuthPath + } + + if dvAuths.DvAuthSubDomain != nil { + dvAuthsMap["dv_auth_sub_domain"] = dvAuths.DvAuthSubDomain + } + + if dvAuths.DvAuthVerifyType != nil { + dvAuthsMap["dv_auth_verify_type"] = dvAuths.DvAuthVerifyType + } + + tmpList = append(tmpList, dvAuthsMap) + } + + sslResponseMap["dv_revoke_auth_detail"] = tmpList + } + _ = d.Set("result", []interface{}{sslResponseMap}) + d.SetId(CertificateId) + + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), sslResponseMap); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_certificate_test.go b/tencentcloud/data_source_tc_ssl_describe_certificate_test.go new file mode 100644 index 0000000000..7850e8a8f2 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_certificate_test.go @@ -0,0 +1,31 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeCertificateDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeCertificateDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_certificate.describe_certificate"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_certificate.describe_certificate", "certificate_id", "9Bpk7XOu")), + }, + }, + }) +} + +const testAccSslDescribeCertificateDataSource = ` + +data "tencentcloud_ssl_describe_certificate" "describe_certificate" { + certificate_id = "9Bpk7XOu" +} +` diff --git a/tencentcloud/data_source_tc_ssl_describe_companies.go b/tencentcloud/data_source_tc_ssl_describe_companies.go new file mode 100644 index 0000000000..f10578e7c4 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_companies.go @@ -0,0 +1,184 @@ +/* +Use this data source to query detailed information of ssl describe_companies + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_companies" "describe_companies" { + company_id = 122 + } +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeCompanies() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeCompaniesRead, + Schema: map[string]*schema.Schema{ + "company_id": { + Optional: true, + Type: schema.TypeInt, + Description: "Company ID.", + }, + + "companies": { + Computed: true, + Type: schema.TypeList, + Description: "Company list.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "company_name": { + Type: schema.TypeString, + Computed: true, + Description: "Company Name.", + }, + "company_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Company ID.", + }, + "company_country": { + Type: schema.TypeString, + Computed: true, + Description: "Company country.", + }, + "company_province": { + Type: schema.TypeString, + Computed: true, + Description: "Province where the company is located.", + }, + "company_city": { + Type: schema.TypeString, + Computed: true, + Description: "The city where the company is.", + }, + "company_address": { + Type: schema.TypeString, + Computed: true, + Description: "Detailed address where the company is located.", + }, + "company_phone": { + Type: schema.TypeString, + Computed: true, + Description: "company phone.", + }, + "id_type": { + Type: schema.TypeString, + Computed: true, + Description: "typeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "id_number": { + Type: schema.TypeString, + Computed: true, + Description: "ID numberNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeCompaniesRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_companies.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, _ := d.GetOk("company_id"); v != nil { + paramMap["CompanyId"] = helper.IntInt64(v.(int)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var companies []*ssl.CompanyInfo + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeCompaniesByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + companies = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(companies)) + tmpList := make([]map[string]interface{}, 0, len(companies)) + + if companies != nil { + for _, companyInfo := range companies { + companyInfoMap := map[string]interface{}{} + + if companyInfo.CompanyName != nil { + companyInfoMap["company_name"] = companyInfo.CompanyName + } + + if companyInfo.CompanyId != nil { + companyInfoMap["company_id"] = companyInfo.CompanyId + } + + if companyInfo.CompanyCountry != nil { + companyInfoMap["company_country"] = companyInfo.CompanyCountry + } + + if companyInfo.CompanyProvince != nil { + companyInfoMap["company_province"] = companyInfo.CompanyProvince + } + + if companyInfo.CompanyCity != nil { + companyInfoMap["company_city"] = companyInfo.CompanyCity + } + + if companyInfo.CompanyAddress != nil { + companyInfoMap["company_address"] = companyInfo.CompanyAddress + } + + if companyInfo.CompanyPhone != nil { + companyInfoMap["company_phone"] = companyInfo.CompanyPhone + } + + if companyInfo.IdType != nil { + companyInfoMap["id_type"] = companyInfo.IdType + } + + if companyInfo.IdNumber != nil { + companyInfoMap["id_number"] = companyInfo.IdNumber + } + + ids = append(ids, helper.Int64ToStr(*companyInfo.CompanyId)) + tmpList = append(tmpList, companyInfoMap) + } + + _ = d.Set("companies", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_companies_test.go b/tencentcloud/data_source_tc_ssl_describe_companies_test.go new file mode 100644 index 0000000000..d55d3eaa6b --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_companies_test.go @@ -0,0 +1,34 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeCompaniesDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeCompaniesDataSource, + Check: resource.ComposeTestCheckFunc( + testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_companies.describe_companies"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_companies.describe_companies", "company_id", "122"), + ), + }, + }, + }) +} + +const testAccSslDescribeCompaniesDataSource = ` + +data "tencentcloud_ssl_describe_companies" "describe_companies" { + company_id = 122 +} + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list.go new file mode 100644 index 0000000000..8692b7240c --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list.go @@ -0,0 +1,218 @@ +/* +Use this data source to query detailed information of ssl describe_host_api_gateway_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_api_gateway_instance_list" "describe_host_api_gateway_instance_list" { + certificate_id = "9Bpk7XOu" + resource_type = "apiGateway" + } +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostApiGatewayInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostApiGatewayInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "resource_type": { + Required: true, + Type: schema.TypeString, + Description: "Deploy resource type.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filtering parameters; Filterkey: domainmatch.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "old_certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "Deployed certificate ID.", + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "Apigateway instance listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "service_id": { + Type: schema.TypeString, + Computed: true, + Description: "Instance ID.", + }, + "service_name": { + Type: schema.TypeString, + Computed: true, + Description: "Example name.", + }, + "domain": { + Type: schema.TypeString, + Computed: true, + Description: "domain name.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "protocol": { + Type: schema.TypeString, + Computed: true, + Description: "Use Agreement.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostApiGatewayInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_api_gateway_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("resource_type"); ok { + paramMap["ResourceType"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + if v, ok := d.GetOk("old_certificate_id"); ok { + paramMap["OldCertificateId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList []*ssl.ApiGatewayInstanceDetail + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostApiGatewayInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(instanceList)) + tmpList := make([]map[string]interface{}, 0, len(instanceList)) + + if instanceList != nil { + for _, apiGatewayInstanceDetail := range instanceList { + apiGatewayInstanceDetailMap := map[string]interface{}{} + + if apiGatewayInstanceDetail.ServiceId != nil { + apiGatewayInstanceDetailMap["service_id"] = apiGatewayInstanceDetail.ServiceId + } + + if apiGatewayInstanceDetail.ServiceName != nil { + apiGatewayInstanceDetailMap["service_name"] = apiGatewayInstanceDetail.ServiceName + } + + if apiGatewayInstanceDetail.Domain != nil { + apiGatewayInstanceDetailMap["domain"] = apiGatewayInstanceDetail.Domain + } + + if apiGatewayInstanceDetail.CertId != nil { + apiGatewayInstanceDetailMap["cert_id"] = apiGatewayInstanceDetail.CertId + } + + if apiGatewayInstanceDetail.Protocol != nil { + apiGatewayInstanceDetailMap["protocol"] = apiGatewayInstanceDetail.Protocol + } + + ids = append(ids, *apiGatewayInstanceDetail.CertId) + tmpList = append(tmpList, apiGatewayInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list_test.go new file mode 100644 index 0000000000..84bb81b475 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list_test.go @@ -0,0 +1,35 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostApiGatewayInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccStepSetRegion(t, "ap-nanjing") + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostApiGatewayInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_api_gateway_instance_list.describe_host_api_gateway_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_api_gateway_instance_list.describe_host_api_gateway_instance_list", "certificate_id", "9Bpk7XOu"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_api_gateway_instance_list.describe_host_api_gateway_instance_list", "resource_type", "apiGateway"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostApiGatewayInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_api_gateway_instance_list" "describe_host_api_gateway_instance_list" { + certificate_id = "9Bpk7XOu" + resource_type = "apiGateway" +} +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list.go new file mode 100644 index 0000000000..ddb86e44aa --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list.go @@ -0,0 +1,248 @@ +/* +Use this data source to query detailed information of ssl describe_host_cdn_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_cdn_instance_list" "describe_host_cdn_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "cdn" +} +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostCdnInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostCdnInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "resource_type": { + Required: true, + Type: schema.TypeString, + Description: "Deploy resource type.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filtering parameters; Filterkey: domainmatch.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "old_certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "Original certificate ID.", + }, + + "async_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether.", + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "CDN instance listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Computed: true, + Description: "domain name.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment certificate ID.", + }, + "status": { + Type: schema.TypeString, + Computed: true, + Description: "Domain name.", + }, + "https_billing_switch": { + Type: schema.TypeString, + Computed: true, + Description: "Domain name billing status.", + }, + }, + }, + }, + + "async_total_num": { + Computed: true, + Type: schema.TypeInt, + Description: "The total number of asynchronous refreshNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "async_offset": { + Computed: true, + Type: schema.TypeInt, + Description: "Asynchronous refresh current execution numberNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "async_cache_time": { + Computed: true, + Type: schema.TypeString, + Description: "Current cache read timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostCdnInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_cdn_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("resource_type"); ok { + paramMap["ResourceType"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + if v, ok := d.GetOk("old_certificate_id"); ok { + paramMap["OldCertificateId"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("async_cache"); v != nil { + paramMap["AsyncCache"] = helper.IntInt64(v.(int)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList *ssl.DescribeHostCdnInstanceListResponseParams + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostCdnInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(instanceList.InstanceList)) + tmpList := make([]map[string]interface{}, 0, len(instanceList.InstanceList)) + + if instanceList != nil && instanceList.InstanceList != nil { + for _, cdnInstanceDetail := range instanceList.InstanceList { + cdnInstanceDetailMap := map[string]interface{}{} + + if cdnInstanceDetail.Domain != nil { + cdnInstanceDetailMap["domain"] = cdnInstanceDetail.Domain + } + + if cdnInstanceDetail.CertId != nil { + cdnInstanceDetailMap["cert_id"] = cdnInstanceDetail.CertId + } + + if cdnInstanceDetail.Status != nil { + cdnInstanceDetailMap["status"] = cdnInstanceDetail.Status + } + + if cdnInstanceDetail.HttpsBillingSwitch != nil { + cdnInstanceDetailMap["https_billing_switch"] = cdnInstanceDetail.HttpsBillingSwitch + } + + ids = append(ids, *cdnInstanceDetail.CertId) + tmpList = append(tmpList, cdnInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + if instanceList.AsyncTotalNum != nil { + _ = d.Set("async_total_num", instanceList.AsyncTotalNum) + } + + if instanceList.AsyncOffset != nil { + _ = d.Set("async_offset", instanceList.AsyncOffset) + } + + if instanceList.AsyncCacheTime != nil { + _ = d.Set("async_cache_time", instanceList.AsyncCacheTime) + } + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list_test.go new file mode 100644 index 0000000000..c7adf9efd8 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list_test.go @@ -0,0 +1,35 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostCdnInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostCdnInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_cdn_instance_list.describe_host_cdn_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_cdn_instance_list.describe_host_cdn_instance_list", "certificate_id", "8mCN3eKd"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_cdn_instance_list.describe_host_cdn_instance_list", "resource_type", "cdn"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostCdnInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_cdn_instance_list" "describe_host_cdn_instance_list" { + certificate_id = "8mCN3eKd" + resource_type = "cdn" +} + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list.go new file mode 100644 index 0000000000..b366729fd5 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list.go @@ -0,0 +1,455 @@ +/* +Use this data source to query detailed information of ssl describe_host_clb_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_clb_instance_list" "describe_host_clb_instance_list" { + certificate_id = "8u8DII0l" +} +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostClbInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostClbInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filtering parameters; Filterkey: domainmatch.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "async_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to cache asynchronous.", + }, + + "old_certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "Original certificate ID.", + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "CLB instance listener listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "load_balancer_id": { + Type: schema.TypeString, + Computed: true, + Description: "CLB instance ID.", + }, + "load_balancer_name": { + Type: schema.TypeString, + Computed: true, + Description: "CLB instance name name.", + }, + "listeners": { + Type: schema.TypeList, + Computed: true, + Description: "CLB listener listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "listener_id": { + Type: schema.TypeString, + Computed: true, + Description: "Listener ID.", + }, + "listener_name": { + Type: schema.TypeString, + Computed: true, + Description: "Name of listeners.", + }, + "sni_switch": { + Type: schema.TypeInt, + Computed: true, + Description: "Whether to turn on SNI, 1 to open, 0 to close.", + }, + "protocol": { + Type: schema.TypeString, + Computed: true, + Description: "Type of listener protocol, https | TCP_SSL.", + }, + "certificate": { + Type: schema.TypeList, + Computed: true, + Description: "Certificate data binding of listenersNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Certificate ID.", + }, + "dns_names": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Domain name binding of certificates.", + }, + "cert_ca_id": { + Type: schema.TypeString, + Computed: true, + Description: "Root certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "s_s_l_mode": { + Type: schema.TypeString, + Computed: true, + Description: "Certificate certification mode: unidirectional unidirectional authentication, Mutual two -way certificationNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + "rules": { + Type: schema.TypeList, + Computed: true, + Description: "List of listeners' rulesNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "location_id": { + Type: schema.TypeString, + Computed: true, + Description: "Rule ID.", + }, + "domain": { + Type: schema.TypeString, + Computed: true, + Description: "Domain name binding.", + }, + "is_match": { + Type: schema.TypeBool, + Computed: true, + Description: "Whether the rules match the domain name to be bound to the certificate.", + }, + "certificate": { + Type: schema.TypeList, + Computed: true, + Description: "Certificate data that has been bound to the rulesNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Certificate ID.", + }, + "dns_names": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Domain name binding of certificates.", + }, + "cert_ca_id": { + Type: schema.TypeString, + Computed: true, + Description: "Root certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "s_s_l_mode": { + Type: schema.TypeString, + Computed: true, + Description: "Certificate certification mode: unidirectional unidirectional authentication, Mutual two -way certificationNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + "no_match_domains": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "List of non -matching fieldsNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + "no_match_domains": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "List of non -matching fieldsNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + }, + }, + }, + + "async_total_num": { + Computed: true, + Type: schema.TypeInt, + Description: "The total number of asynchronous refreshNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "async_offset": { + Computed: true, + Type: schema.TypeInt, + Description: "Asynchronous refresh current execution numberNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "async_cache_time": { + Computed: true, + Type: schema.TypeString, + Description: "Current cache read timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostClbInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_clb_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + if v, _ := d.GetOk("async_cache"); v != nil { + paramMap["AsyncCache"] = helper.IntInt64(v.(int)) + } + + if v, ok := d.GetOk("old_certificate_id"); ok { + paramMap["OldCertificateId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList *ssl.DescribeHostClbInstanceListResponseParams + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostClbInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(instanceList.InstanceList)) + tmpList := make([]map[string]interface{}, 0, len(instanceList.InstanceList)) + + if instanceList != nil && instanceList.InstanceList != nil { + for _, clbInstanceDetail := range instanceList.InstanceList { + clbInstanceDetailMap := map[string]interface{}{} + + if clbInstanceDetail.LoadBalancerId != nil { + clbInstanceDetailMap["load_balancer_id"] = clbInstanceDetail.LoadBalancerId + } + + if clbInstanceDetail.LoadBalancerName != nil { + clbInstanceDetailMap["load_balancer_name"] = clbInstanceDetail.LoadBalancerName + } + + if clbInstanceDetail.Listeners != nil { + listenersList := []interface{}{} + for _, listeners := range clbInstanceDetail.Listeners { + listenersMap := map[string]interface{}{} + + if listeners.ListenerId != nil { + listenersMap["listener_id"] = listeners.ListenerId + } + + if listeners.ListenerName != nil { + listenersMap["listener_name"] = listeners.ListenerName + } + + if listeners.SniSwitch != nil { + listenersMap["sni_switch"] = listeners.SniSwitch + } + + if listeners.Protocol != nil { + listenersMap["protocol"] = listeners.Protocol + } + + if listeners.Certificate != nil { + certificateMap := map[string]interface{}{} + + if listeners.Certificate.CertId != nil { + certificateMap["cert_id"] = listeners.Certificate.CertId + } + + if listeners.Certificate.DnsNames != nil { + certificateMap["dns_names"] = listeners.Certificate.DnsNames + } + + if listeners.Certificate.CertCaId != nil { + certificateMap["cert_ca_id"] = listeners.Certificate.CertCaId + } + + if listeners.Certificate.SSLMode != nil { + certificateMap["s_s_l_mode"] = listeners.Certificate.SSLMode + } + + listenersMap["certificate"] = []interface{}{certificateMap} + } + + if listeners.Rules != nil { + rulesList := []interface{}{} + for _, rules := range listeners.Rules { + rulesMap := map[string]interface{}{} + + if rules.LocationId != nil { + rulesMap["location_id"] = rules.LocationId + } + + if rules.Domain != nil { + rulesMap["domain"] = rules.Domain + } + + if rules.IsMatch != nil { + rulesMap["is_match"] = rules.IsMatch + } + + if rules.Certificate != nil { + certificateMap := map[string]interface{}{} + + if rules.Certificate.CertId != nil { + certificateMap["cert_id"] = rules.Certificate.CertId + } + + if rules.Certificate.DnsNames != nil { + certificateMap["dns_names"] = rules.Certificate.DnsNames + } + + if rules.Certificate.CertCaId != nil { + certificateMap["cert_ca_id"] = rules.Certificate.CertCaId + } + + if rules.Certificate.SSLMode != nil { + certificateMap["s_s_l_mode"] = rules.Certificate.SSLMode + } + + rulesMap["certificate"] = []interface{}{certificateMap} + } + + if rules.NoMatchDomains != nil { + rulesMap["no_match_domains"] = rules.NoMatchDomains + } + + rulesList = append(rulesList, rulesMap) + } + + listenersMap["rules"] = []interface{}{rulesList} + } + + if listeners.NoMatchDomains != nil { + listenersMap["no_match_domains"] = listeners.NoMatchDomains + } + + listenersList = append(listenersList, listenersMap) + } + + clbInstanceDetailMap["listeners"] = []interface{}{listenersList} + } + + ids = append(ids, *clbInstanceDetail.LoadBalancerId) + tmpList = append(tmpList, clbInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + if instanceList.AsyncTotalNum != nil { + _ = d.Set("async_total_num", instanceList.AsyncTotalNum) + } + + if instanceList.AsyncOffset != nil { + _ = d.Set("async_offset", instanceList.AsyncOffset) + } + + if instanceList.AsyncCacheTime != nil { + _ = d.Set("async_cache_time", instanceList.AsyncCacheTime) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list_test.go new file mode 100644 index 0000000000..3f69ae4975 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list_test.go @@ -0,0 +1,33 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostClbInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostClbInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_clb_instance_list.describe_host_clb_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_clb_instance_list.describe_host_clb_instance_list", "certificate_id", "9Bpk7XOu"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostClbInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_clb_instance_list" "describe_host_clb_instance_list" { + certificate_id = "9Bpk7XOu" +} + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list.go new file mode 100644 index 0000000000..f6e5b82e1b --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list.go @@ -0,0 +1,239 @@ +/* +Use this data source to query detailed information of ssl describe_host_cos_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_cos_instance_list" "describe_host_cos_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "cos" +} +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostCosInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostCosInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "resource_type": { + Required: true, + Type: schema.TypeString, + Description: "Deploy resource type cos.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filter parameters.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "COS instance listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Computed: true, + Description: "domain name.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Binded certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "status": { + Type: schema.TypeString, + Computed: true, + Description: "Enabled: domain name online statusDisabled: Domain name offline status.", + }, + "bucket": { + Type: schema.TypeString, + Computed: true, + Description: "Reserve bucket nameNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "region": { + Type: schema.TypeString, + Computed: true, + Description: "Barrel areaNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + + "async_total_num": { + Computed: true, + Type: schema.TypeInt, + Description: "The total number of asynchronous refreshNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "async_offset": { + Computed: true, + Type: schema.TypeInt, + Description: "Asynchronous refresh current execution numberNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "async_cache_time": { + Computed: true, + Type: schema.TypeString, + Description: "Current cache read timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostCosInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_cos_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("resource_type"); ok { + paramMap["ResourceType"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList *ssl.DescribeHostCosInstanceListResponseParams + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostCosInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0) + tmpList := make([]map[string]interface{}, 0) + + if instanceList != nil && instanceList.InstanceList != nil { + + for _, cosInstanceDetail := range instanceList.InstanceList { + cosInstanceDetailMap := map[string]interface{}{} + + if cosInstanceDetail.Domain != nil { + cosInstanceDetailMap["domain"] = cosInstanceDetail.Domain + } + + if cosInstanceDetail.CertId != nil { + cosInstanceDetailMap["cert_id"] = cosInstanceDetail.CertId + } + + if cosInstanceDetail.Status != nil { + cosInstanceDetailMap["status"] = cosInstanceDetail.Status + } + + if cosInstanceDetail.Bucket != nil { + cosInstanceDetailMap["bucket"] = cosInstanceDetail.Bucket + } + + if cosInstanceDetail.Region != nil { + cosInstanceDetailMap["region"] = cosInstanceDetail.Region + } + + ids = append(ids, *cosInstanceDetail.CertId) + tmpList = append(tmpList, cosInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + if instanceList != nil && instanceList.AsyncTotalNum != nil { + _ = d.Set("async_total_num", instanceList.AsyncTotalNum) + } + + if instanceList != nil && instanceList.AsyncOffset != nil { + _ = d.Set("async_offset", instanceList.AsyncOffset) + } + + if instanceList != nil && instanceList.AsyncCacheTime != nil { + _ = d.Set("async_cache_time", instanceList.AsyncCacheTime) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list_test.go new file mode 100644 index 0000000000..70c682f6a1 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list_test.go @@ -0,0 +1,35 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostCosInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostCosInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_cos_instance_list.describe_host_cos_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_cos_instance_list.describe_host_cos_instance_list", "certificate_id", "8mCN3eKd"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_cos_instance_list.describe_host_cos_instance_list", "resource_type", "cos"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostCosInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_cos_instance_list" "describe_host_cos_instance_list" { + certificate_id = "8mCN3eKd" + resource_type = "cos" +} + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list.go new file mode 100644 index 0000000000..433216d2a0 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list.go @@ -0,0 +1,218 @@ +/* +Use this data source to query detailed information of ssl describe_host_ddos_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_ddos_instance_list" "describe_host_ddos_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "ddos" +} +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostDdosInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostDdosInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "resource_type": { + Required: true, + Type: schema.TypeString, + Description: "Deploy resource type.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filtering parameters; Filterkey: domainmatch.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "old_certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "Deployed certificate ID.", + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "DDOS example listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Computed: true, + Description: "domain name.", + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + Description: "Instance ID.", + }, + "protocol": { + Type: schema.TypeString, + Computed: true, + Description: "agreement type.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "virtual_port": { + Type: schema.TypeString, + Computed: true, + Description: "Forwarding port.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostDdosInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_ddos_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("resource_type"); ok { + paramMap["ResourceType"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + if v, ok := d.GetOk("old_certificate_id"); ok { + paramMap["OldCertificateId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList []*ssl.DdosInstanceDetail + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostDdosInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(instanceList)) + tmpList := make([]map[string]interface{}, 0, len(instanceList)) + + if instanceList != nil { + for _, ddosInstanceDetail := range instanceList { + ddosInstanceDetailMap := map[string]interface{}{} + + if ddosInstanceDetail.Domain != nil { + ddosInstanceDetailMap["domain"] = ddosInstanceDetail.Domain + } + + if ddosInstanceDetail.InstanceId != nil { + ddosInstanceDetailMap["instance_id"] = ddosInstanceDetail.InstanceId + } + + if ddosInstanceDetail.Protocol != nil { + ddosInstanceDetailMap["protocol"] = ddosInstanceDetail.Protocol + } + + if ddosInstanceDetail.CertId != nil { + ddosInstanceDetailMap["cert_id"] = ddosInstanceDetail.CertId + } + + if ddosInstanceDetail.VirtualPort != nil { + ddosInstanceDetailMap["virtual_port"] = ddosInstanceDetail.VirtualPort + } + + ids = append(ids, *ddosInstanceDetail.InstanceId) + tmpList = append(tmpList, ddosInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list_test.go new file mode 100644 index 0000000000..ddf5705a28 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list_test.go @@ -0,0 +1,34 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostDdosInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostDdosInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_ddos_instance_list.describe_host_ddos_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_ddos_instance_list.describe_host_ddos_instance_list", "certificate_id", "8mCN3eKd"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_ddos_instance_list.describe_host_ddos_instance_list", "resource_type", "ddos"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostDdosInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_ddos_instance_list" "describe_host_ddos_instance_list" { + certificate_id = "8mCN3eKd" + resource_type = "ddos" +} +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_deploy_record.go b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record.go new file mode 100644 index 0000000000..eb962183d0 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record.go @@ -0,0 +1,177 @@ +/* +Use this data source to query detailed information of ssl describe_host_deploy_record + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_deploy_record" "describe_host_deploy_record" { + certificate_id = "8u8DII0l" + resource_type = "ddos" + } +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostDeployRecord() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostDeployRecordRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "resource_type": { + Optional: true, + Type: schema.TypeString, + Description: "Resource Type.", + }, + + "deploy_record_list": { + Computed: true, + Type: schema.TypeList, + Description: "Certificate deployment record listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeInt, + Computed: true, + Description: "Deployment record ID.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment certificate ID.", + }, + "resource_type": { + Type: schema.TypeString, + Computed: true, + Description: "Deploy resource type.", + }, + "region": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment.", + }, + "status": { + Type: schema.TypeInt, + Computed: true, + Description: "Deployment state.", + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment time.", + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: "Recent update time.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostDeployRecordRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_deploy_record.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("resource_type"); ok { + paramMap["ResourceType"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var deployRecordList []*ssl.DeployRecordInfo + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostDeployRecordByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + deployRecordList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(deployRecordList)) + tmpList := make([]map[string]interface{}, 0, len(deployRecordList)) + + if deployRecordList != nil { + for _, deployRecordInfo := range deployRecordList { + deployRecordInfoMap := map[string]interface{}{} + + if deployRecordInfo.Id != nil { + deployRecordInfoMap["id"] = deployRecordInfo.Id + } + + if deployRecordInfo.CertId != nil { + deployRecordInfoMap["cert_id"] = deployRecordInfo.CertId + } + + if deployRecordInfo.ResourceType != nil { + deployRecordInfoMap["resource_type"] = deployRecordInfo.ResourceType + } + + if deployRecordInfo.Region != nil { + deployRecordInfoMap["region"] = deployRecordInfo.Region + } + + if deployRecordInfo.Status != nil { + deployRecordInfoMap["status"] = deployRecordInfo.Status + } + + if deployRecordInfo.CreateTime != nil { + deployRecordInfoMap["create_time"] = deployRecordInfo.CreateTime + } + + if deployRecordInfo.UpdateTime != nil { + deployRecordInfoMap["update_time"] = deployRecordInfo.UpdateTime + } + + ids = append(ids, helper.UInt64ToStr(*deployRecordInfo.Id)) + tmpList = append(tmpList, deployRecordInfoMap) + } + + _ = d.Set("deploy_record_list", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail.go b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail.go new file mode 100644 index 0000000000..55645dc474 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail.go @@ -0,0 +1,327 @@ +/* +Use this data source to query detailed information of ssl describe_host_deploy_record_detail + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_deploy_record_detail" "describe_host_deploy_record_detail" { + deploy_record_id = "" + } +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostDeployRecordDetail() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostDeployRecordDetailRead, + Schema: map[string]*schema.Schema{ + "deploy_record_id": { + Required: true, + Type: schema.TypeString, + Description: "Deployment record ID.", + }, + + "deploy_record_detail_list": { + Computed: true, + Type: schema.TypeList, + Description: "Certificate deployment record listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeInt, + Computed: true, + Description: "Deployment record details ID.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment certificate ID.", + }, + "old_cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Original binding certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment instance ID.", + }, + "instance_name": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment example name.", + }, + "listener_id": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment monitor IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "domains": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "List of deployment domain.", + }, + "protocol": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment monitoring protocolNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "status": { + Type: schema.TypeInt, + Computed: true, + Description: "Deployment state.", + }, + "error_msg": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment error messageNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment record details Create time.", + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment record details last update time.", + }, + "listener_name": { + Type: schema.TypeString, + Computed: true, + Description: "Delicate monitor name.", + }, + "sni_switch": { + Type: schema.TypeInt, + Computed: true, + Description: "Whether to turn on SNI.", + }, + "bucket": { + Type: schema.TypeString, + Computed: true, + Description: "COS storage barrel nameNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "namespace": { + Type: schema.TypeString, + Computed: true, + Description: "Named space nameNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "secret_name": { + Type: schema.TypeString, + Computed: true, + Description: "Secret nameNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "port": { + Type: schema.TypeInt, + Computed: true, + Description: "portNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "env_id": { + Type: schema.TypeString, + Computed: true, + Description: "TCB environment IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "tcb_type": { + Type: schema.TypeString, + Computed: true, + Description: "Deployed TCB typeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "region": { + Type: schema.TypeString, + Computed: true, + Description: "Deployed TCB regionNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + + "success_total_count": { + Computed: true, + Type: schema.TypeInt, + Description: "Total successNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "failed_total_count": { + Computed: true, + Type: schema.TypeInt, + Description: "Total number of failuresNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "running_total_count": { + Computed: true, + Type: schema.TypeInt, + Description: "Total number of deploymentNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostDeployRecordDetailRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_deploy_record_detail.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("deploy_record_id"); ok { + paramMap["DeployRecordId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var deployRecordDetailList []*ssl.DeployRecordDetail + var successTotalCount, failedTotalCount, runningTotalCount *int64 + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, successTotal, failedTotal, runningTotal, e := service.DescribeSslDescribeHostDeployRecordDetailByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + deployRecordDetailList = result + successTotalCount, failedTotalCount, runningTotalCount = successTotal, failedTotal, runningTotal + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(deployRecordDetailList)) + tmpList := make([]map[string]interface{}, 0, len(deployRecordDetailList)) + + if deployRecordDetailList != nil { + for _, deployRecordDetail := range deployRecordDetailList { + deployRecordDetailMap := map[string]interface{}{} + + if deployRecordDetail.Id != nil { + deployRecordDetailMap["id"] = deployRecordDetail.Id + } + + if deployRecordDetail.CertId != nil { + deployRecordDetailMap["cert_id"] = deployRecordDetail.CertId + } + + if deployRecordDetail.OldCertId != nil { + deployRecordDetailMap["old_cert_id"] = deployRecordDetail.OldCertId + } + + if deployRecordDetail.InstanceId != nil { + deployRecordDetailMap["instance_id"] = deployRecordDetail.InstanceId + } + + if deployRecordDetail.InstanceName != nil { + deployRecordDetailMap["instance_name"] = deployRecordDetail.InstanceName + } + + if deployRecordDetail.ListenerId != nil { + deployRecordDetailMap["listener_id"] = deployRecordDetail.ListenerId + } + + if deployRecordDetail.Domains != nil { + deployRecordDetailMap["domains"] = deployRecordDetail.Domains + } + + if deployRecordDetail.Protocol != nil { + deployRecordDetailMap["protocol"] = deployRecordDetail.Protocol + } + + if deployRecordDetail.Status != nil { + deployRecordDetailMap["status"] = deployRecordDetail.Status + } + + if deployRecordDetail.ErrorMsg != nil { + deployRecordDetailMap["error_msg"] = deployRecordDetail.ErrorMsg + } + + if deployRecordDetail.CreateTime != nil { + deployRecordDetailMap["create_time"] = deployRecordDetail.CreateTime + } + + if deployRecordDetail.UpdateTime != nil { + deployRecordDetailMap["update_time"] = deployRecordDetail.UpdateTime + } + + if deployRecordDetail.ListenerName != nil { + deployRecordDetailMap["listener_name"] = deployRecordDetail.ListenerName + } + + if deployRecordDetail.SniSwitch != nil { + deployRecordDetailMap["sni_switch"] = deployRecordDetail.SniSwitch + } + + if deployRecordDetail.Bucket != nil { + deployRecordDetailMap["bucket"] = deployRecordDetail.Bucket + } + + if deployRecordDetail.Namespace != nil { + deployRecordDetailMap["namespace"] = deployRecordDetail.Namespace + } + + if deployRecordDetail.SecretName != nil { + deployRecordDetailMap["secret_name"] = deployRecordDetail.SecretName + } + + if deployRecordDetail.Port != nil { + deployRecordDetailMap["port"] = deployRecordDetail.Port + } + + if deployRecordDetail.EnvId != nil { + deployRecordDetailMap["env_id"] = deployRecordDetail.EnvId + } + + if deployRecordDetail.TCBType != nil { + deployRecordDetailMap["tcb_type"] = deployRecordDetail.TCBType + } + + if deployRecordDetail.Region != nil { + deployRecordDetailMap["region"] = deployRecordDetail.Region + } + + ids = append(ids, *deployRecordDetail.InstanceId) + tmpList = append(tmpList, deployRecordDetailMap) + } + + _ = d.Set("deploy_record_detail_list", tmpList) + } + + if successTotalCount != nil { + _ = d.Set("success_total_count", successTotalCount) + } + + if failedTotalCount != nil { + _ = d.Set("failed_total_count", failedTotalCount) + } + + if runningTotalCount != nil { + _ = d.Set("running_total_count", runningTotalCount) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail_test.go b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail_test.go new file mode 100644 index 0000000000..cade0a9a53 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail_test.go @@ -0,0 +1,33 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostDeployRecordDetailDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostDeployRecordDetailDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_deploy_record_detail.describe_host_deploy_record_detail"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_deploy_record_detail.describe_host_deploy_record_detail", "deploy_record_id", "35364"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostDeployRecordDetailDataSource = ` + +data "tencentcloud_ssl_describe_host_deploy_record_detail" "describe_host_deploy_record_detail" { + deploy_record_id = "35364" +} + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_test.go b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_test.go new file mode 100644 index 0000000000..d413a282ab --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_test.go @@ -0,0 +1,35 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostDeployRecordDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostDeployRecordDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_deploy_record.describe_host_deploy_record"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_deploy_record.describe_host_deploy_record", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_deploy_record.describe_host_deploy_record", "resource_type", "ddos"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostDeployRecordDataSource = ` + +data "tencentcloud_ssl_describe_host_deploy_record" "describe_host_deploy_record" { + certificate_id = "8hUkH3xC" + resource_type = "ddos" + } + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list.go new file mode 100644 index 0000000000..c674a6821d --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list.go @@ -0,0 +1,205 @@ +/* +Use this data source to query detailed information of ssl describe_host_lighthouse_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_lighthouse_instance_list" "describe_host_lighthouse_instance_list" { + certificate_id = "8tvMCvGF" + resource_type = "lighthouse" +} +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostLighthouseInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostLighthouseInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "resource_type": { + Required: true, + Type: schema.TypeString, + Description: "Deploy resource type Lighthous.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filter parameters.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "Lighthouse instance listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "instance_id": { + Type: schema.TypeString, + Computed: true, + Description: "Instance ID.", + }, + "instance_name": { + Type: schema.TypeString, + Computed: true, + Description: "Example name.", + }, + "ip": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "IP address.", + }, + "domain": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Optional domain name.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostLighthouseInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_lighthouse_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("resource_type"); ok { + paramMap["ResourceType"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList []*ssl.LighthouseInstanceDetail + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostLighthouseInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(instanceList)) + tmpList := make([]map[string]interface{}, 0, len(instanceList)) + + if instanceList != nil { + for _, lighthouseInstanceDetail := range instanceList { + lighthouseInstanceDetailMap := map[string]interface{}{} + + if lighthouseInstanceDetail.InstanceId != nil { + lighthouseInstanceDetailMap["instance_id"] = lighthouseInstanceDetail.InstanceId + } + + if lighthouseInstanceDetail.InstanceName != nil { + lighthouseInstanceDetailMap["instance_name"] = lighthouseInstanceDetail.InstanceName + } + + if lighthouseInstanceDetail.IP != nil { + lighthouseInstanceDetailMap["ip"] = lighthouseInstanceDetail.IP + } + + if lighthouseInstanceDetail.Domain != nil { + lighthouseInstanceDetailMap["domain"] = lighthouseInstanceDetail.Domain + } + + ids = append(ids, *lighthouseInstanceDetail.InstanceId) + tmpList = append(tmpList, lighthouseInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list_test.go new file mode 100644 index 0000000000..e2ca38b61c --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list_test.go @@ -0,0 +1,34 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostLighthouseInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostLighthouseInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_lighthouse_instance_list.describe_host_lighthouse_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_lighthouse_instance_list.describe_host_lighthouse_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_lighthouse_instance_list.describe_host_lighthouse_instance_list", "resource_type", "lighthouse"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostLighthouseInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_lighthouse_instance_list" "describe_host_lighthouse_instance_list" { + certificate_id = "8hUkH3xC" + resource_type = "lighthouse" +} +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list.go new file mode 100644 index 0000000000..2d71d4f634 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list.go @@ -0,0 +1,200 @@ +/* +Use this data source to query detailed information of ssl describe_host_live_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_live_instance_list" "describe_host_live_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "live" + } +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostLiveInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostLiveInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "resource_type": { + Required: true, + Type: schema.TypeString, + Description: "Deploy resource type.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filtering parameters; Filterkey: domainmatch.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "old_certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "Deployed certificate ID.", + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "Live instance listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Computed: true, + Description: "domain name.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Binded certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "status": { + Type: schema.TypeInt, + Computed: true, + Description: "-1: Unrelated certificate of domain name.1: The domain name HTTPS has been opened.0: The domain name HTTPS has been closed.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostLiveInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_live_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("resource_type"); ok { + paramMap["ResourceType"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + if v, ok := d.GetOk("old_certificate_id"); ok { + paramMap["OldCertificateId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList []*ssl.LiveInstanceDetail + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostLiveInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(instanceList)) + tmpList := make([]map[string]interface{}, 0, len(instanceList)) + + if instanceList != nil { + for _, liveInstanceDetail := range instanceList { + liveInstanceDetailMap := map[string]interface{}{} + + if liveInstanceDetail.Domain != nil { + liveInstanceDetailMap["domain"] = liveInstanceDetail.Domain + } + + if liveInstanceDetail.CertId != nil { + liveInstanceDetailMap["cert_id"] = liveInstanceDetail.CertId + } + + if liveInstanceDetail.Status != nil { + liveInstanceDetailMap["status"] = liveInstanceDetail.Status + } + + ids = append(ids, *liveInstanceDetail.CertId) + tmpList = append(tmpList, liveInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list_test.go new file mode 100644 index 0000000000..79f3783ac7 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list_test.go @@ -0,0 +1,34 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostLiveInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostLiveInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_live_instance_list.describe_host_live_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_live_instance_list.describe_host_live_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_live_instance_list.describe_host_live_instance_list", "resource_type", "live"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostLiveInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_live_instance_list" "describe_host_live_instance_list" { + certificate_id = "8hUkH3xC" + resource_type = "live" +} +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list.go new file mode 100644 index 0000000000..62d0a2859d --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list.go @@ -0,0 +1,209 @@ +/* +Use this data source to query detailed information of ssl describe_host_teo_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_teo_instance_list" "describe_host_teo_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "teo" +} +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostTeoInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostTeoInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "resource_type": { + Required: true, + Type: schema.TypeString, + Description: "Deploy resource type.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filtering parameters; Filterkey: domainmatch.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "old_certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "Deployed certificate ID.", + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "Teo instance listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "host": { + Type: schema.TypeString, + Computed: true, + Description: "domain name.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Certificate ID.", + }, + "zone_id": { + Type: schema.TypeString, + Computed: true, + Description: "Regional IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "status": { + Type: schema.TypeString, + Computed: true, + Description: "Domain name.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostTeoInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_teo_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("resource_type"); ok { + paramMap["ResourceType"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + if v, ok := d.GetOk("old_certificate_id"); ok { + paramMap["OldCertificateId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList []*ssl.TeoInstanceDetail + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostTeoInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(instanceList)) + tmpList := make([]map[string]interface{}, 0, len(instanceList)) + + if instanceList != nil { + for _, teoInstanceDetail := range instanceList { + teoInstanceDetailMap := map[string]interface{}{} + + if teoInstanceDetail.Host != nil { + teoInstanceDetailMap["host"] = teoInstanceDetail.Host + } + + if teoInstanceDetail.CertId != nil { + teoInstanceDetailMap["cert_id"] = teoInstanceDetail.CertId + } + + if teoInstanceDetail.ZoneId != nil { + teoInstanceDetailMap["zone_id"] = teoInstanceDetail.ZoneId + } + + if teoInstanceDetail.Status != nil { + teoInstanceDetailMap["status"] = teoInstanceDetail.Status + } + + ids = append(ids, *teoInstanceDetail.CertId) + tmpList = append(tmpList, teoInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list_test.go new file mode 100644 index 0000000000..66d034d5fa --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list_test.go @@ -0,0 +1,34 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostTeoInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostTeoInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_teo_instance_list.describe_host_teo_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_teo_instance_list.describe_host_teo_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_teo_instance_list.describe_host_teo_instance_list", "resource_type", "teo"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostTeoInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_teo_instance_list" "describe_host_teo_instance_list" { + certificate_id = "8hUkH3xC" + resource_type = "teo" +} +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list.go new file mode 100644 index 0000000000..e9ad2f667e --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list.go @@ -0,0 +1,374 @@ +/* +Use this data source to query detailed information of ssl describe_host_tke_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_tke_instance_list" "describe_host_tke_instance_list" { + certificate_id = "8u8DII0l" +} +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostTkeInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostTkeInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filtering parameters; Filterkey: domainmatch.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "async_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to cache asynchronous.", + }, + + "old_certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "Original certificate ID.", + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "CLB instance listener listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cluster_id": { + Type: schema.TypeString, + Computed: true, + Description: "Cluster ID.", + }, + "cluster_name": { + Type: schema.TypeString, + Computed: true, + Description: "Cluster name.", + }, + "namespace_list": { + Type: schema.TypeList, + Computed: true, + Description: "Cluster Naming Space List.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "namespace name.", + }, + "secret_list": { + Type: schema.TypeList, + Computed: true, + Description: "Secret list.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: "Secret name.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Certificate ID.", + }, + "ingress_list": { + Type: schema.TypeList, + Computed: true, + Description: "Ingress list.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ingress_name": { + Type: schema.TypeString, + Computed: true, + Description: "Ingress name.", + }, + "tls_domains": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "TLS domain name list.", + }, + "domains": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "Ingress domain name list.", + }, + }, + }, + }, + "no_match_domains": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "List of domain names that are not matched with the new certificateNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + }, + }, + }, + "cluster_type": { + Type: schema.TypeString, + Computed: true, + Description: "Cluster.", + }, + "cluster_version": { + Type: schema.TypeString, + Computed: true, + Description: "Cluster.", + }, + }, + }, + }, + + "async_total_num": { + Computed: true, + Type: schema.TypeInt, + Description: "The total number of asynchronous refreshNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "async_offset": { + Computed: true, + Type: schema.TypeInt, + Description: "Asynchronous refresh current execution numberNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "async_cache_time": { + Computed: true, + Type: schema.TypeString, + Description: "Current cache read timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostTkeInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_tke_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + if v, _ := d.GetOk("async_cache"); v != nil { + paramMap["AsyncCache"] = helper.IntInt64(v.(int)) + } + + if v, ok := d.GetOk("old_certificate_id"); ok { + paramMap["OldCertificateId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList []*ssl.TkeInstanceDetail + var asyncTotalNum, asyncOffset *int64 + var asyncCacheTime *string + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, total, offset, cacheTime, e := service.DescribeSslDescribeHostTkeInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + asyncTotalNum = total + asyncOffset = offset + asyncCacheTime = cacheTime + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(instanceList)) + tmpList := make([]map[string]interface{}, 0, len(instanceList)) + + if instanceList != nil { + for _, tkeInstanceDetail := range instanceList { + tkeInstanceDetailMap := map[string]interface{}{} + + if tkeInstanceDetail.ClusterId != nil { + tkeInstanceDetailMap["cluster_id"] = tkeInstanceDetail.ClusterId + } + + if tkeInstanceDetail.ClusterName != nil { + tkeInstanceDetailMap["cluster_name"] = tkeInstanceDetail.ClusterName + } + + if tkeInstanceDetail.NamespaceList != nil { + namespaceListList := []interface{}{} + for _, namespaceList := range tkeInstanceDetail.NamespaceList { + namespaceListMap := map[string]interface{}{} + + if namespaceList.Name != nil { + namespaceListMap["name"] = namespaceList.Name + } + + if namespaceList.SecretList != nil { + secretListList := []interface{}{} + for _, secretList := range namespaceList.SecretList { + secretListMap := map[string]interface{}{} + + if secretList.Name != nil { + secretListMap["name"] = secretList.Name + } + + if secretList.CertId != nil { + secretListMap["cert_id"] = secretList.CertId + } + + if secretList.IngressList != nil { + ingressListList := []interface{}{} + for _, ingressList := range secretList.IngressList { + ingressListMap := map[string]interface{}{} + + if ingressList.IngressName != nil { + ingressListMap["ingress_name"] = ingressList.IngressName + } + + if ingressList.TlsDomains != nil { + ingressListMap["tls_domains"] = ingressList.TlsDomains + } + + if ingressList.Domains != nil { + ingressListMap["domains"] = ingressList.Domains + } + + ingressListList = append(ingressListList, ingressListMap) + } + + secretListMap["ingress_list"] = []interface{}{ingressListList} + } + + if secretList.NoMatchDomains != nil { + secretListMap["no_match_domains"] = secretList.NoMatchDomains + } + + secretListList = append(secretListList, secretListMap) + } + + namespaceListMap["secret_list"] = []interface{}{secretListList} + } + + namespaceListList = append(namespaceListList, namespaceListMap) + } + + tkeInstanceDetailMap["namespace_list"] = []interface{}{namespaceListList} + } + + if tkeInstanceDetail.ClusterType != nil { + tkeInstanceDetailMap["cluster_type"] = tkeInstanceDetail.ClusterType + } + + if tkeInstanceDetail.ClusterVersion != nil { + tkeInstanceDetailMap["cluster_version"] = tkeInstanceDetail.ClusterVersion + } + + ids = append(ids, *tkeInstanceDetail.ClusterId) + tmpList = append(tmpList, tkeInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + if asyncTotalNum != nil { + _ = d.Set("async_total_num", asyncTotalNum) + } + + if asyncOffset != nil { + _ = d.Set("async_offset", asyncOffset) + } + + if asyncCacheTime != nil { + _ = d.Set("async_cache_time", asyncCacheTime) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list_test.go new file mode 100644 index 0000000000..3ef68db5fa --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list_test.go @@ -0,0 +1,32 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostTkeInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostTkeInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_tke_instance_list.describe_host_tke_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_tke_instance_list.describe_host_tke_instance_list", "certificate_id", "8hUkH3xC"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostTkeInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_tke_instance_list" "describe_host_tke_instance_list" { + certificate_id = "8hUkH3xC" +} +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_update_record.go b/tencentcloud/data_source_tc_ssl_describe_host_update_record.go new file mode 100644 index 0000000000..fb2added5c --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_update_record.go @@ -0,0 +1,191 @@ +/* +Use this data source to query detailed information of ssl describe_host_update_record + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_update_record" "describe_host_update_record" { + old_certificate_id = "8u8DII0l" + } +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostUpdateRecord() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostUpdateRecordRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "New certificate ID.", + }, + + "old_certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "Original certificate ID.", + }, + + "deploy_record_list": { + Computed: true, + Type: schema.TypeList, + Description: "Certificate deployment record listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeInt, + Computed: true, + Description: "Record ID.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "New certificate ID.", + }, + "old_cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Original certificate ID.", + }, + "resource_types": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "List of resource types.", + }, + "regions": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "List of regional deploymentNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "status": { + Type: schema.TypeInt, + Computed: true, + Description: "Deployment state.", + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment time.", + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: "Last update time.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostUpdateRecordRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_update_record.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("old_certificate_id"); ok { + paramMap["OldCertificateId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var deployRecordList []*ssl.UpdateRecordInfo + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostUpdateRecordByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + deployRecordList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(deployRecordList)) + tmpList := make([]map[string]interface{}, 0, len(deployRecordList)) + + if deployRecordList != nil { + for _, updateRecordInfo := range deployRecordList { + updateRecordInfoMap := map[string]interface{}{} + + if updateRecordInfo.Id != nil { + updateRecordInfoMap["id"] = updateRecordInfo.Id + } + + if updateRecordInfo.CertId != nil { + updateRecordInfoMap["cert_id"] = updateRecordInfo.CertId + } + + if updateRecordInfo.OldCertId != nil { + updateRecordInfoMap["old_cert_id"] = updateRecordInfo.OldCertId + } + + if updateRecordInfo.ResourceTypes != nil { + updateRecordInfoMap["resource_types"] = updateRecordInfo.ResourceTypes + } + + if updateRecordInfo.Regions != nil { + updateRecordInfoMap["regions"] = updateRecordInfo.Regions + } + + if updateRecordInfo.Status != nil { + updateRecordInfoMap["status"] = updateRecordInfo.Status + } + + if updateRecordInfo.CreateTime != nil { + updateRecordInfoMap["create_time"] = updateRecordInfo.CreateTime + } + + if updateRecordInfo.UpdateTime != nil { + updateRecordInfoMap["update_time"] = updateRecordInfo.UpdateTime + } + + ids = append(ids, helper.UInt64ToStr(*updateRecordInfo.Id)) + tmpList = append(tmpList, updateRecordInfoMap) + } + + _ = d.Set("deploy_record_list", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_update_record_detail.go b/tencentcloud/data_source_tc_ssl_describe_host_update_record_detail.go new file mode 100644 index 0000000000..201dfbe70f --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_update_record_detail.go @@ -0,0 +1,372 @@ +/* +Use this data source to query detailed information of ssl describe_host_update_record_detail + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_update_record_detail" "describe_host_update_record_detail" { + deploy_record_id = "35364" + } +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostUpdateRecordDetail() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostUpdateRecordDetailRead, + Schema: map[string]*schema.Schema{ + "deploy_record_id": { + Required: true, + Type: schema.TypeString, + Description: "One -click update record ID.", + }, + + "record_detail_list": { + Computed: true, + Type: schema.TypeList, + Description: "Certificate deployment record listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_type": { + Type: schema.TypeString, + Computed: true, + Description: "Deploy resource type.", + }, + "list": { + Type: schema.TypeList, + Computed: true, + Description: "List of deployment resources details.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeInt, + Computed: true, + Description: "Detailed record ID.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "New certificate ID.", + }, + "old_cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Old certificate ID.", + }, + "domains": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Computed: true, + Description: "List of deployment domainNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "resource_type": { + Type: schema.TypeString, + Computed: true, + Description: "Deploy resource type.", + }, + "region": { + Type: schema.TypeString, + Computed: true, + Description: "DeploymentNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "status": { + Type: schema.TypeInt, + Computed: true, + Description: "Deployment state.", + }, + "error_msg": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment error messageNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment time.", + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: "Last update time.", + }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment instance IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "instance_name": { + Type: schema.TypeString, + Computed: true, + Description: "Deployment example nameNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "listener_id": { + Type: schema.TypeString, + Computed: true, + Description: "Deploy listener ID (CLB for CLB)Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "listener_name": { + Type: schema.TypeString, + Computed: true, + Description: "Deploy listener name (CLB for CLB)Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "protocol": { + Type: schema.TypeString, + Computed: true, + Description: "protocolNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "sni_switch": { + Type: schema.TypeInt, + Computed: true, + Description: "Whether to turn on SNI (CLB dedicated)Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "bucket": { + Type: schema.TypeString, + Computed: true, + Description: "BUCKET name (COS dedicated)Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "port": { + Type: schema.TypeInt, + Computed: true, + Description: "portNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "namespace": { + Type: schema.TypeString, + Computed: true, + Description: "Naming Space (TKE)Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "secret_name": { + Type: schema.TypeString, + Computed: true, + Description: "Secret Name (TKE for TKE)Note: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "env_id": { + Type: schema.TypeString, + Computed: true, + Description: "Environment IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "t_c_b_type": { + Type: schema.TypeString, + Computed: true, + Description: "TCB deployment typeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + "total_count": { + Type: schema.TypeInt, + Computed: true, + Description: "The total number of deployment resources.", + }, + }, + }, + }, + + "success_total_count": { + Computed: true, + Type: schema.TypeInt, + Description: "Total successNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "failed_total_count": { + Computed: true, + Type: schema.TypeInt, + Description: "Total number of failuresNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "running_total_count": { + Computed: true, + Type: schema.TypeInt, + Description: "Total number of deploymentNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostUpdateRecordDetailRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_update_record_detail.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + var id string + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("deploy_record_id"); ok { + id = v.(string) + paramMap["DeployRecordId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var recordDetailList []*ssl.UpdateRecordDetails + var successTotalCount, failedTotalCount, runningTotalCount *int64 + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, successTotal, failedTotal, runningTotal, e := service.DescribeSslDescribeHostUpdateRecordDetailByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + recordDetailList = result + successTotalCount, failedTotalCount, runningTotalCount = successTotal, failedTotal, runningTotal + return nil + }) + if err != nil { + return err + } + + tmpList := make([]map[string]interface{}, 0, len(recordDetailList)) + + if recordDetailList != nil { + for _, updateRecordDetails := range recordDetailList { + updateRecordDetailsMap := map[string]interface{}{} + + if updateRecordDetails.ResourceType != nil { + updateRecordDetailsMap["resource_type"] = updateRecordDetails.ResourceType + } + + if updateRecordDetails.List != nil { + var listList []interface{} + for _, list := range updateRecordDetails.List { + listMap := map[string]interface{}{} + + if list.Id != nil { + listMap["id"] = list.Id + } + + if list.CertId != nil { + listMap["cert_id"] = list.CertId + } + + if list.OldCertId != nil { + listMap["old_cert_id"] = list.OldCertId + } + + if list.Domains != nil { + listMap["domains"] = list.Domains + } + + if list.ResourceType != nil { + listMap["resource_type"] = list.ResourceType + } + + if list.Region != nil { + listMap["region"] = list.Region + } + + if list.Status != nil { + listMap["status"] = list.Status + } + + if list.ErrorMsg != nil { + listMap["error_msg"] = list.ErrorMsg + } + + if list.CreateTime != nil { + listMap["create_time"] = list.CreateTime + } + + if list.UpdateTime != nil { + listMap["update_time"] = list.UpdateTime + } + + if list.InstanceId != nil { + listMap["instance_id"] = list.InstanceId + } + + if list.InstanceName != nil { + listMap["instance_name"] = list.InstanceName + } + + if list.ListenerId != nil { + listMap["listener_id"] = list.ListenerId + } + + if list.ListenerName != nil { + listMap["listener_name"] = list.ListenerName + } + + if list.Protocol != nil { + listMap["protocol"] = list.Protocol + } + + if list.SniSwitch != nil { + listMap["sni_switch"] = list.SniSwitch + } + + if list.Bucket != nil { + listMap["bucket"] = list.Bucket + } + + if list.Port != nil { + listMap["port"] = list.Port + } + + if list.Namespace != nil { + listMap["namespace"] = list.Namespace + } + + if list.SecretName != nil { + listMap["secret_name"] = list.SecretName + } + + if list.EnvId != nil { + listMap["env_id"] = list.EnvId + } + + if list.TCBType != nil { + listMap["t_c_b_type"] = list.TCBType + } + + listList = append(listList, listMap) + } + + updateRecordDetailsMap["list"] = listList + } + + if updateRecordDetails.TotalCount != nil { + updateRecordDetailsMap["total_count"] = updateRecordDetails.TotalCount + } + + tmpList = append(tmpList, updateRecordDetailsMap) + } + + _ = d.Set("record_detail_list", tmpList) + } + + if successTotalCount != nil { + _ = d.Set("success_total_count", successTotalCount) + } + + if failedTotalCount != nil { + _ = d.Set("failed_total_count", failedTotalCount) + } + + if runningTotalCount != nil { + _ = d.Set("running_total_count", runningTotalCount) + } + + d.SetId(id) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_update_record_detail_test.go b/tencentcloud/data_source_tc_ssl_describe_host_update_record_detail_test.go new file mode 100644 index 0000000000..8ebb680818 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_update_record_detail_test.go @@ -0,0 +1,33 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostUpdateRecordDetailDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostUpdateRecordDetailDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_update_record_detail.describe_host_update_record_detail"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_update_record_detail.describe_host_update_record_detail", "deploy_record_id", "1666"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostUpdateRecordDetailDataSource = ` + +data "tencentcloud_ssl_describe_host_update_record_detail" "describe_host_update_record_detail" { + deploy_record_id = "1666" +} + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_update_record_test.go b/tencentcloud/data_source_tc_ssl_describe_host_update_record_test.go new file mode 100644 index 0000000000..07eea45821 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_update_record_test.go @@ -0,0 +1,33 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostUpdateRecordDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostUpdateRecordDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_update_record.describe_host_update_record"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_update_record.describe_host_update_record", "old_certificate_id", "8hUkH3xC"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostUpdateRecordDataSource = ` + +data "tencentcloud_ssl_describe_host_update_record" "describe_host_update_record" { + old_certificate_id = "8hUkH3xC" + } + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list.go new file mode 100644 index 0000000000..a50ecd8879 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list.go @@ -0,0 +1,191 @@ +/* +Use this data source to query detailed information of ssl describe_host_vod_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_vod_instance_list" "describe_host_vod_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "vod" + } +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostVodInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostVodInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "resource_type": { + Required: true, + Type: schema.TypeString, + Description: "Deploy resource type VOD.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filter parameters.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "old_certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "Deployed certificate ID.", + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "VOD example listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Computed: true, + Description: "domain name.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Certificate ID.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostVodInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_vod_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("resource_type"); ok { + paramMap["ResourceType"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + if v, ok := d.GetOk("old_certificate_id"); ok { + paramMap["OldCertificateId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList []*ssl.VodInstanceDetail + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostVodInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(instanceList)) + tmpList := make([]map[string]interface{}, 0, len(instanceList)) + + if instanceList != nil { + for _, vodInstanceDetail := range instanceList { + vodInstanceDetailMap := map[string]interface{}{} + + if vodInstanceDetail.Domain != nil { + vodInstanceDetailMap["domain"] = vodInstanceDetail.Domain + } + + if vodInstanceDetail.CertId != nil { + vodInstanceDetailMap["cert_id"] = vodInstanceDetail.CertId + } + + ids = append(ids, *vodInstanceDetail.CertId) + tmpList = append(tmpList, vodInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list_test.go new file mode 100644 index 0000000000..d599537146 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list_test.go @@ -0,0 +1,35 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostVodInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostVodInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_vod_instance_list.describe_host_vod_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_vod_instance_list.describe_host_vod_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_vod_instance_list.describe_host_vod_instance_list", "resource_type", "vod"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostVodInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_vod_instance_list" "describe_host_vod_instance_list" { + certificate_id = "8hUkH3xC" + resource_type = "vod" + } + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list.go new file mode 100644 index 0000000000..ef3d978928 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list.go @@ -0,0 +1,200 @@ +/* +Use this data source to query detailed information of ssl describe_host_waf_instance_list + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_waf_instance_list" "describe_host_waf_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "waf" + } +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeHostWafInstanceList() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeHostWafInstanceListRead, + Schema: map[string]*schema.Schema{ + "certificate_id": { + Required: true, + Type: schema.TypeString, + Description: "Certificate ID to be deployed.", + }, + + "resource_type": { + Required: true, + Type: schema.TypeString, + Description: "Deploy resource type.", + }, + + "is_cache": { + Optional: true, + Type: schema.TypeInt, + Description: "Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour.", + }, + + "filters": { + Optional: true, + Type: schema.TypeList, + Description: "List of filtering parameters; Filterkey: domainmatch.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "filter_key": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter key.", + }, + "filter_value": { + Type: schema.TypeString, + Required: true, + Description: "Filter parameter value.", + }, + }, + }, + }, + + "old_certificate_id": { + Optional: true, + Type: schema.TypeString, + Description: "Deployed certificate ID.", + }, + + "instance_list": { + Computed: true, + Type: schema.TypeList, + Description: "WAF instance listNote: This field may return NULL, indicating that the valid value cannot be obtained.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "domain": { + Type: schema.TypeString, + Computed: true, + Description: "domain name.", + }, + "cert_id": { + Type: schema.TypeString, + Computed: true, + Description: "Binded certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "status": { + Type: schema.TypeInt, + Computed: true, + Description: "-1: Unrelated certificate of domain name.1: The domain name HTTPS has been opened.0: The domain name HTTPS has been closed.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeHostWafInstanceListRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_host_waf_instance_list.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + paramMap := make(map[string]interface{}) + if v, ok := d.GetOk("certificate_id"); ok { + paramMap["CertificateId"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("resource_type"); ok { + paramMap["ResourceType"] = helper.String(v.(string)) + } + + if v, _ := d.GetOk("is_cache"); v != nil { + paramMap["IsCache"] = helper.IntUint64(v.(int)) + } + + if v, ok := d.GetOk("filters"); ok { + filtersSet := v.([]interface{}) + tmpSet := make([]*ssl.Filter, 0, len(filtersSet)) + + for _, item := range filtersSet { + filter := ssl.Filter{} + filterMap := item.(map[string]interface{}) + + if v, ok := filterMap["filter_key"]; ok { + filter.FilterKey = helper.String(v.(string)) + } + if v, ok := filterMap["filter_value"]; ok { + filter.FilterValue = helper.String(v.(string)) + } + tmpSet = append(tmpSet, &filter) + } + paramMap["filters"] = tmpSet + } + + if v, ok := d.GetOk("old_certificate_id"); ok { + paramMap["OldCertificateId"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var instanceList []*ssl.LiveInstanceDetail + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeHostWafInstanceListByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + instanceList = result + return nil + }) + if err != nil { + return err + } + + ids := make([]string, 0, len(instanceList)) + tmpList := make([]map[string]interface{}, 0, len(instanceList)) + + if instanceList != nil { + for _, liveInstanceDetail := range instanceList { + liveInstanceDetailMap := map[string]interface{}{} + + if liveInstanceDetail.Domain != nil { + liveInstanceDetailMap["domain"] = liveInstanceDetail.Domain + } + + if liveInstanceDetail.CertId != nil { + liveInstanceDetailMap["cert_id"] = liveInstanceDetail.CertId + } + + if liveInstanceDetail.Status != nil { + liveInstanceDetailMap["status"] = liveInstanceDetail.Status + } + + ids = append(ids, *liveInstanceDetail.CertId) + tmpList = append(tmpList, liveInstanceDetailMap) + } + + _ = d.Set("instance_list", tmpList) + } + + d.SetId(helper.DataResourceIdsHash(ids)) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list_test.go new file mode 100644 index 0000000000..bde0fdf070 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list_test.go @@ -0,0 +1,35 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeHostWafInstanceListDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeHostWafInstanceListDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_waf_instance_list.describe_host_waf_instance_list"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_waf_instance_list.describe_host_waf_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_waf_instance_list.describe_host_waf_instance_list", "resource_type", "waf"), + ), + }, + }, + }) +} + +const testAccSslDescribeHostWafInstanceListDataSource = ` + +data "tencentcloud_ssl_describe_host_waf_instance_list" "describe_host_waf_instance_list" { + certificate_id = "8hUkH3xC" + resource_type = "waf" + } + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_manager_detail.go b/tencentcloud/data_source_tc_ssl_describe_manager_detail.go new file mode 100644 index 0000000000..83a83cfa23 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_manager_detail.go @@ -0,0 +1,337 @@ +/* +Use this data source to query detailed information of ssl describe_manager_detail + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_manager_detail" "describe_manager_detail" { + manager_id = "" +} +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeManagerDetail() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeManagerDetailRead, + Schema: map[string]*schema.Schema{ + "manager_id": { + Required: true, + Type: schema.TypeInt, + Description: "Manager ID.", + }, + + "status": { + Computed: true, + Type: schema.TypeString, + Description: "Status: Audit: OK during the review: review passed inValid: expired expiRing: is about to expire Expired: expired.", + }, + + "manager_first_name": { + Computed: true, + Type: schema.TypeString, + Description: "Manager name.", + }, + + "manager_mail": { + Computed: true, + Type: schema.TypeString, + Description: "Manager mailbox.", + }, + + "contact_first_name": { + Computed: true, + Type: schema.TypeString, + Description: "Contact name.", + }, + + "manager_last_name": { + Computed: true, + Type: schema.TypeString, + Description: "Manager name.", + }, + + "contact_position": { + Computed: true, + Type: schema.TypeString, + Description: "Contact position.", + }, + + "manager_position": { + Computed: true, + Type: schema.TypeString, + Description: "Manager position.", + }, + + "verify_time": { + Computed: true, + Type: schema.TypeString, + Description: "Verify timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "create_time": { + Computed: true, + Type: schema.TypeString, + Description: "Creation time.", + }, + + "expire_time": { + Computed: true, + Type: schema.TypeString, + Description: "Verify expiration timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + + "contact_last_name": { + Computed: true, + Type: schema.TypeString, + Description: "Contact name.", + }, + + "manager_phone": { + Computed: true, + Type: schema.TypeString, + Description: "Manager phone call.", + }, + + "contact_phone": { + Computed: true, + Type: schema.TypeString, + Description: "contact number.", + }, + + "contact_mail": { + Computed: true, + Type: schema.TypeString, + Description: "Contact mailbox.", + }, + + "manager_department": { + Computed: true, + Type: schema.TypeString, + Description: "Administrator department.", + }, + + "company_info": { + Computed: true, + Type: schema.TypeList, + Description: "Manager&#39;s company information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "company_name": { + Type: schema.TypeString, + Computed: true, + Description: "Company Name.", + }, + "company_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Company ID.", + }, + "company_country": { + Type: schema.TypeString, + Computed: true, + Description: "Company country.", + }, + "company_province": { + Type: schema.TypeString, + Computed: true, + Description: "Province where the company is located.", + }, + "company_city": { + Type: schema.TypeString, + Computed: true, + Description: "The city where the company is.", + }, + "company_address": { + Type: schema.TypeString, + Computed: true, + Description: "Detailed address where the company is located.", + }, + "company_phone": { + Type: schema.TypeString, + Computed: true, + Description: "company phone.", + }, + "id_type": { + Type: schema.TypeString, + Computed: true, + Description: "typeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "id_number": { + Type: schema.TypeString, + Computed: true, + Description: "ID numberNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + + "company_id": { + Computed: true, + Type: schema.TypeInt, + Description: "Manager Company ID.", + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeManagerDetailRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_manager_detail.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + + managerId := d.Get("manager_id") + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + var response *ssl.DescribeManagerDetailResponseParams + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeManagerDetailByFilter(ctx, helper.IntToStr(managerId.(int))) + if e != nil { + return retryError(e) + } + response = result + return nil + }) + if err != nil { + return err + } + tmpList := make([]map[string]interface{}, 1) + + if response != nil { + if response.ManagerId != nil { + _ = d.Set("manager_id", managerId) + } + + if response.Status != nil { + _ = d.Set("status", response.Status) + } + + if response.ManagerFirstName != nil { + _ = d.Set("manager_first_name", response.ManagerFirstName) + } + + if response.ManagerMail != nil { + _ = d.Set("manager_mail", response.ManagerMail) + } + + if response.ContactFirstName != nil { + _ = d.Set("contact_first_name", response.ContactFirstName) + } + + if response.ManagerLastName != nil { + _ = d.Set("manager_last_name", response.ManagerLastName) + } + + if response.ContactPosition != nil { + _ = d.Set("contact_position", response.ContactPosition) + } + + if response.ManagerPosition != nil { + _ = d.Set("manager_position", response.ManagerPosition) + } + + if response.VerifyTime != nil { + _ = d.Set("verify_time", response.VerifyTime) + } + + if response.CreateTime != nil { + _ = d.Set("create_time", response.CreateTime) + } + + if response.ExpireTime != nil { + _ = d.Set("expire_time", response.ExpireTime) + } + + if response.ContactLastName != nil { + _ = d.Set("contact_last_name", response.ContactLastName) + } + + if response.ManagerPhone != nil { + _ = d.Set("manager_phone", response.ManagerPhone) + } + + if response.ContactPhone != nil { + _ = d.Set("contact_phone", response.ContactPhone) + } + + if response.ContactMail != nil { + _ = d.Set("contact_mail", response.ContactMail) + } + + if response.ManagerDepartment != nil { + _ = d.Set("manager_department", response.ManagerDepartment) + } + + if response.CompanyInfo != nil { + companyInfoMap := map[string]interface{}{} + + if response.CompanyInfo.CompanyName != nil { + companyInfoMap["company_name"] = response.CompanyInfo.CompanyName + } + + if response.CompanyInfo.CompanyId != nil { + companyInfoMap["company_id"] = response.CompanyInfo.CompanyId + } + + if response.CompanyInfo.CompanyCountry != nil { + companyInfoMap["company_country"] = response.CompanyInfo.CompanyCountry + } + + if response.CompanyInfo.CompanyProvince != nil { + companyInfoMap["company_province"] = response.CompanyInfo.CompanyProvince + } + + if response.CompanyInfo.CompanyCity != nil { + companyInfoMap["company_city"] = response.CompanyInfo.CompanyCity + } + + if response.CompanyInfo.CompanyAddress != nil { + companyInfoMap["company_address"] = response.CompanyInfo.CompanyAddress + } + + if response.CompanyInfo.CompanyPhone != nil { + companyInfoMap["company_phone"] = response.CompanyInfo.CompanyPhone + } + + if response.CompanyInfo.IdType != nil { + companyInfoMap["id_type"] = response.CompanyInfo.IdType + } + + if response.CompanyInfo.IdNumber != nil { + companyInfoMap["id_number"] = response.CompanyInfo.IdNumber + } + tmpList = append(tmpList, companyInfoMap) + _ = d.Set("company_info", []interface{}{companyInfoMap}) + } + + if response.CompanyId != nil { + _ = d.Set("company_id", response.CompanyId) + } + } + + d.SetId(helper.IntToStr(managerId.(int))) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_manager_detail_test.go b/tencentcloud/data_source_tc_ssl_describe_manager_detail_test.go new file mode 100644 index 0000000000..b06f654857 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_manager_detail_test.go @@ -0,0 +1,33 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeManagerDetailDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeManagerDetailDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_manager_detail.describe_manager_detail"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_manager_detail.describe_manager_detail", "manager_id", "12895"), + ), + }, + }, + }) +} + +const testAccSslDescribeManagerDetailDataSource = ` + +data "tencentcloud_ssl_describe_manager_detail" "describe_manager_detail" { + manager_id = "12895" +} + +` diff --git a/tencentcloud/data_source_tc_ssl_describe_managers.go b/tencentcloud/data_source_tc_ssl_describe_managers.go new file mode 100644 index 0000000000..d82324832f --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_managers.go @@ -0,0 +1,268 @@ +/* +Use this data source to query detailed information of ssl describe_managers + +Example Usage + +```hcl +data "tencentcloud_ssl_describe_managers" "describe_managers" { + company_id = "11772" + } +``` +*/ +package tencentcloud + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + ssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" + "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper" +) + +func dataSourceTencentCloudSslDescribeManagers() *schema.Resource { + return &schema.Resource{ + Read: dataSourceTencentCloudSslDescribeManagersRead, + Schema: map[string]*schema.Schema{ + "company_id": { + Required: true, + Type: schema.TypeInt, + Description: "Company ID.", + }, + + "manager_name": { + Optional: true, + Type: schema.TypeString, + Description: "Manager&#39;s name (will be abandoned), please use Searchkey.", + }, + + "manager_mail": { + Optional: true, + Type: schema.TypeString, + Description: "Vague query manager email (will be abandoned), please use Searchkey.", + }, + + "status": { + Optional: true, + Type: schema.TypeString, + Description: "Filter according to the status of the manager, and the value is available&#39;None&#39; Unable to submit review&#39;Audit&#39;, Asian Credit Review&#39;Caaudit&#39; CA review&#39;OK&#39; has been reviewed&#39;Invalid&#39; review failed&#39;Expiring&#39; is about to expire&#39;Expired&#39; expired.", + }, + + "search_key": { + Optional: true, + Type: schema.TypeString, + Description: "Manager&#39;s surname/Manager name/mailbox/department precise matching.", + }, + + "managers": { + Computed: true, + Type: schema.TypeList, + Description: "Company Manager List.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "status": { + Type: schema.TypeString, + Computed: true, + Description: "Status: Audit: OK during the review: review passed inValid: expired expiRing: is about to expire Expired: expired.", + }, + "manager_first_name": { + Type: schema.TypeString, + Computed: true, + Description: "Manager name.", + }, + "manager_last_name": { + Type: schema.TypeString, + Computed: true, + Description: "Manager name.", + }, + "manager_position": { + Type: schema.TypeString, + Computed: true, + Description: "Manager position.", + }, + "manager_phone": { + Type: schema.TypeString, + Computed: true, + Description: "Manager phone call.", + }, + "manager_mail": { + Type: schema.TypeString, + Computed: true, + Description: "Manager mailbox.", + }, + "manager_department": { + Type: schema.TypeString, + Computed: true, + Description: "Administrator department.", + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: "Creation timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "domain_count": { + Type: schema.TypeInt, + Computed: true, + Description: "Number of administrators.", + }, + "cert_count": { + Type: schema.TypeInt, + Computed: true, + Description: "Number of administrative certificates.", + }, + "manager_id": { + Type: schema.TypeInt, + Computed: true, + Description: "Manager ID.", + }, + "expire_time": { + Type: schema.TypeString, + Computed: true, + Description: "Examine the validity expiration timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "submit_audit_time": { + Type: schema.TypeString, + Computed: true, + Description: "The last time the review timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + "verify_time": { + Type: schema.TypeString, + Computed: true, + Description: "Examination timeNote: This field may return NULL, indicating that the valid value cannot be obtained.", + }, + }, + }, + }, + + "result_output_file": { + Type: schema.TypeString, + Optional: true, + Description: "Used to save results.", + }, + }, + } +} + +func dataSourceTencentCloudSslDescribeManagersRead(d *schema.ResourceData, meta interface{}) error { + defer logElapsed("data_source.tencentcloud_ssl_describe_managers.read")() + defer inconsistentCheck(d, meta)() + + logId := getLogId(contextNil) + + ctx := context.WithValue(context.TODO(), logIdKey, logId) + var companyId string + paramMap := make(map[string]interface{}) + if v, _ := d.GetOk("company_id"); v != nil { + companyId = helper.IntToStr(v.(int)) + paramMap["CompanyId"] = helper.IntInt64(v.(int)) + } + + if v, ok := d.GetOk("manager_name"); ok { + paramMap["ManagerName"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("manager_mail"); ok { + paramMap["ManagerMail"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("status"); ok { + paramMap["Status"] = helper.String(v.(string)) + } + + if v, ok := d.GetOk("search_key"); ok { + paramMap["SearchKey"] = helper.String(v.(string)) + } + + service := SslService{client: meta.(*TencentCloudClient).apiV3Conn} + + var managers []*ssl.ManagerInfo + + err := resource.Retry(readRetryTimeout, func() *resource.RetryError { + result, e := service.DescribeSslDescribeManagersByFilter(ctx, paramMap) + if e != nil { + return retryError(e) + } + managers = result + return nil + }) + if err != nil { + return err + } + + tmpList := make([]map[string]interface{}, 0, len(managers)) + + if managers != nil { + for _, managerInfo := range managers { + managerInfoMap := map[string]interface{}{} + + if managerInfo.Status != nil { + managerInfoMap["status"] = managerInfo.Status + } + + if managerInfo.ManagerFirstName != nil { + managerInfoMap["manager_first_name"] = managerInfo.ManagerFirstName + } + + if managerInfo.ManagerLastName != nil { + managerInfoMap["manager_last_name"] = managerInfo.ManagerLastName + } + + if managerInfo.ManagerPosition != nil { + managerInfoMap["manager_position"] = managerInfo.ManagerPosition + } + + if managerInfo.ManagerPhone != nil { + managerInfoMap["manager_phone"] = managerInfo.ManagerPhone + } + + if managerInfo.ManagerMail != nil { + managerInfoMap["manager_mail"] = managerInfo.ManagerMail + } + + if managerInfo.ManagerDepartment != nil { + managerInfoMap["manager_department"] = managerInfo.ManagerDepartment + } + + if managerInfo.CreateTime != nil { + managerInfoMap["create_time"] = managerInfo.CreateTime + } + + if managerInfo.DomainCount != nil { + managerInfoMap["domain_count"] = managerInfo.DomainCount + } + + if managerInfo.CertCount != nil { + managerInfoMap["cert_count"] = managerInfo.CertCount + } + + if managerInfo.ManagerId != nil { + managerInfoMap["manager_id"] = managerInfo.ManagerId + } + + if managerInfo.ExpireTime != nil { + managerInfoMap["expire_time"] = managerInfo.ExpireTime + } + + if managerInfo.SubmitAuditTime != nil { + managerInfoMap["submit_audit_time"] = managerInfo.SubmitAuditTime + } + + if managerInfo.VerifyTime != nil { + managerInfoMap["verify_time"] = managerInfo.VerifyTime + } + + tmpList = append(tmpList, managerInfoMap) + } + + _ = d.Set("managers", tmpList) + } + + d.SetId(companyId) + output3, ok := d.GetOk("result_output_file") + if ok && output3.(string) != "" { + if e := writeToFile(output3.(string), tmpList); e != nil { + return e + } + } + return nil +} diff --git a/tencentcloud/data_source_tc_ssl_describe_managers_test.go b/tencentcloud/data_source_tc_ssl_describe_managers_test.go new file mode 100644 index 0000000000..5d0f01aaf7 --- /dev/null +++ b/tencentcloud/data_source_tc_ssl_describe_managers_test.go @@ -0,0 +1,33 @@ +package tencentcloud + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccTencentCloudSslDescribeManagersDataSource_basic(t *testing.T) { + t.Parallel() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheckCommon(t, ACCOUNT_TYPE_SSL) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccSslDescribeManagersDataSource, + Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_managers.describe_managers"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_managers.describe_managers", "company_id", "11772"), + ), + }, + }, + }) +} + +const testAccSslDescribeManagersDataSource = ` + +data "tencentcloud_ssl_describe_managers" "describe_managers" { + company_id = "11772" + } + +` diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 3dc5b0328d..77ab7994bb 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -897,6 +897,25 @@ SQLServer SSL Certificates Data Source tencentcloud_ssl_certificates + tencentcloud_ssl_describe_certificate + tencentcloud_ssl_describe_companies + tencentcloud_ssl_describe_host_api_gateway_instance_list + tencentcloud_ssl_describe_host_cdn_instance_list + tencentcloud_ssl_describe_host_clb_instance_list + tencentcloud_ssl_describe_host_cos_instance_list + tencentcloud_ssl_describe_host_ddos_instance_list + tencentcloud_ssl_describe_host_lighthouse_instance_list + tencentcloud_ssl_describe_host_live_instance_list + tencentcloud_ssl_describe_host_teo_instance_list + tencentcloud_ssl_describe_host_tke_instance_list + tencentcloud_ssl_describe_host_vod_instance_list + tencentcloud_ssl_describe_host_waf_instance_list + tencentcloud_ssl_describe_host_deploy_record + tencentcloud_ssl_describe_host_deploy_record_detail + tencentcloud_ssl_describe_host_update_record + tencentcloud_ssl_describe_host_update_record_detail + tencentcloud_ssl_describe_managers + tencentcloud_ssl_describe_manager_detail Resource tencentcloud_ssl_certificate @@ -2075,143 +2094,162 @@ func Provider() *schema.Provider { "tencentcloud_gaap_proxy_group_statistics": dataSourceTencentCloudGaapProxyGroupStatistics(), "tencentcloud_gaap_proxy_statistics": dataSourceTencentCloudGaapProxyStatistics(), "tencentcloud_gaap_real_servers_status": dataSourceTencentCloudGaapRealServersStatus(), - "tencentcloud_ssl_certificates": dataSourceTencentCloudSslCertificates(), - "tencentcloud_cam_roles": dataSourceTencentCloudCamRoles(), - "tencentcloud_cam_users": dataSourceTencentCloudCamUsers(), - "tencentcloud_cam_groups": dataSourceTencentCloudCamGroups(), - "tencentcloud_cam_group_memberships": dataSourceTencentCloudCamGroupMemberships(), - "tencentcloud_cam_policies": dataSourceTencentCloudCamPolicies(), - "tencentcloud_cam_role_policy_attachments": dataSourceTencentCloudCamRolePolicyAttachments(), - "tencentcloud_cam_user_policy_attachments": dataSourceTencentCloudCamUserPolicyAttachments(), - "tencentcloud_cam_group_policy_attachments": dataSourceTencentCloudCamGroupPolicyAttachments(), - "tencentcloud_cam_saml_providers": dataSourceTencentCloudCamSAMLProviders(), - "tencentcloud_user_info": datasourceTencentCloudUserInfo(), - "tencentcloud_cdn_domains": dataSourceTencentCloudCdnDomains(), - "tencentcloud_cdn_domain_verifier": dataSourceTencentCloudCdnDomainVerifyRecord(), - "tencentcloud_scf_functions": dataSourceTencentCloudScfFunctions(), - "tencentcloud_scf_namespaces": dataSourceTencentCloudScfNamespaces(), - "tencentcloud_scf_account_info": dataSourceTencentCloudScfAccountInfo(), - "tencentcloud_scf_async_event_management": dataSourceTencentCloudScfAsyncEventManagement(), - "tencentcloud_scf_triggers": dataSourceTencentCloudScfTriggers(), - "tencentcloud_scf_async_event_status": dataSourceTencentCloudScfAsyncEventStatus(), - "tencentcloud_scf_function_address": dataSourceTencentCloudScfFunctionAddress(), - "tencentcloud_scf_request_status": dataSourceTencentCloudScfRequestStatus(), - "tencentcloud_scf_function_aliases": dataSourceTencentCloudScfFunctionAliases(), - "tencentcloud_scf_layer_versions": dataSourceTencentCloudScfLayerVersions(), - "tencentcloud_scf_layers": dataSourceTencentCloudScfLayers(), - "tencentcloud_scf_function_versions": dataSourceTencentCloudScfFunctionVersions(), - "tencentcloud_scf_logs": dataSourceTencentCloudScfLogs(), - "tencentcloud_tcaplus_clusters": dataSourceTencentCloudTcaplusClusters(), - "tencentcloud_tcaplus_tablegroups": dataSourceTencentCloudTcaplusTableGroups(), - "tencentcloud_tcaplus_tables": dataSourceTencentCloudTcaplusTables(), - "tencentcloud_tcaplus_idls": dataSourceTencentCloudTcaplusIdls(), - "tencentcloud_monitor_policy_conditions": dataSourceTencentMonitorPolicyConditions(), - "tencentcloud_monitor_data": dataSourceTencentMonitorData(), - "tencentcloud_monitor_product_event": dataSourceTencentMonitorProductEvent(), - "tencentcloud_monitor_binding_objects": dataSourceTencentMonitorBindingObjects(), - "tencentcloud_monitor_policy_groups": dataSourceTencentMonitorPolicyGroups(), - "tencentcloud_monitor_product_namespace": dataSourceTencentMonitorProductNamespace(), - "tencentcloud_monitor_alarm_notices": dataSourceTencentMonitorAlarmNotices(), - "tencentcloud_elasticsearch_instances": dataSourceTencentCloudElasticsearchInstances(), - "tencentcloud_postgresql_instances": dataSourceTencentCloudPostgresqlInstances(), - "tencentcloud_postgresql_specinfos": dataSourceTencentCloudPostgresqlSpecinfos(), - "tencentcloud_postgresql_xlogs": datasourceTencentCloudPostgresqlXlogs(), - "tencentcloud_postgresql_parameter_templates": dataSourceTencentCloudPostgresqlParameterTemplates(), - "tencentcloud_postgresql_readonly_groups": dataSourceTencentCloudPostgresqlReadonlyGroups(), - "tencentcloud_postgresql_base_backups": dataSourceTencentCloudPostgresqlBaseBackups(), - "tencentcloud_postgresql_log_backups": dataSourceTencentCloudPostgresqlLogBackups(), - "tencentcloud_postgresql_backup_download_urls": dataSourceTencentCloudPostgresqlBackupDownloadUrls(), - "tencentcloud_postgresql_db_instance_classes": dataSourceTencentCloudPostgresqlDbInstanceClasses(), - "tencentcloud_postgresql_default_parameters": dataSourceTencentCloudPostgresqlDefaultParameters(), - "tencentcloud_postgresql_recovery_time": dataSourceTencentCloudPostgresqlRecoveryTime(), - "tencentcloud_postgresql_regions": dataSourceTencentCloudPostgresqlRegions(), - "tencentcloud_postgresql_db_instance_versions": dataSourceTencentCloudPostgresqlDbInstanceVersions(), - "tencentcloud_postgresql_zones": dataSourceTencentCloudPostgresqlZones(), - "tencentcloud_sqlserver_zone_config": dataSourceTencentSqlserverZoneConfig(), - "tencentcloud_sqlserver_instances": dataSourceTencentCloudSqlserverInstances(), - "tencentcloud_sqlserver_backups": dataSourceTencentCloudSqlserverBackups(), - "tencentcloud_sqlserver_dbs": dataSourceTencentSqlserverDBs(), - "tencentcloud_sqlserver_accounts": dataSourceTencentCloudSqlserverAccounts(), - "tencentcloud_sqlserver_account_db_attachments": dataSourceTencentCloudSqlserverAccountDBAttachments(), - "tencentcloud_sqlserver_readonly_groups": dataSourceTencentCloudSqlserverReadonlyGroups(), - "tencentcloud_sqlserver_backup_commands": dataSourceTencentCloudSqlserverBackupCommands(), - "tencentcloud_sqlserver_backup_by_flow_id": dataSourceTencentCloudSqlserverBackupByFlowId(), - "tencentcloud_sqlserver_backup_upload_size": dataSourceTencentCloudSqlserverBackupUploadSize(), - "tencentcloud_sqlserver_cross_region_zone": dataSourceTencentCloudSqlserverCrossRegionZone(), - "tencentcloud_sqlserver_db_charsets": dataSourceTencentCloudSqlserverDBCharsets(), - "tencentcloud_ckafka_users": dataSourceTencentCloudCkafkaUsers(), - "tencentcloud_ckafka_acls": dataSourceTencentCloudCkafkaAcls(), - "tencentcloud_ckafka_topics": dataSourceTencentCloudCkafkaTopics(), - "tencentcloud_ckafka_instances": dataSourceTencentCloudCkafkaInstances(), - "tencentcloud_ckafka_connect_resource": dataSourceTencentCloudCkafkaConnectResource(), - "tencentcloud_ckafka_region": dataSourceTencentCloudCkafkaRegion(), - "tencentcloud_ckafka_datahub_topic": dataSourceTencentCloudCkafkaDatahubTopic(), - "tencentcloud_ckafka_datahub_group_offsets": dataSourceTencentCloudCkafkaDatahubGroupOffsets(), - "tencentcloud_ckafka_datahub_task": dataSourceTencentCloudCkafkaDatahubTask(), - "tencentcloud_ckafka_group": dataSourceTencentCloudCkafkaGroup(), - "tencentcloud_ckafka_group_offsets": dataSourceTencentCloudCkafkaGroupOffsets(), - "tencentcloud_ckafka_group_info": dataSourceTencentCloudCkafkaGroupInfo(), - "tencentcloud_ckafka_task_status": dataSourceTencentCloudCkafkaTaskStatus(), - "tencentcloud_ckafka_topic_flow_ranking": dataSourceTencentCloudCkafkaTopicFlowRanking(), - "tencentcloud_ckafka_topic_produce_connection": dataSourceTencentCloudCkafkaTopicProduceConnection(), - "tencentcloud_ckafka_topic_subscribe_group": dataSourceTencentCloudCkafkaTopicSubscribeGroup(), - "tencentcloud_ckafka_topic_sync_replica": dataSourceTencentCloudCkafkaTopicSyncReplica(), - "tencentcloud_ckafka_zone": dataSourceTencentCloudCkafkaZone(), - "tencentcloud_audit_cos_regions": dataSourceTencentCloudAuditCosRegions(), - "tencentcloud_audit_key_alias": dataSourceTencentCloudAuditKeyAlias(), - "tencentcloud_audits": dataSourceTencentCloudAudits(), - "tencentcloud_cynosdb_clusters": dataSourceTencentCloudCynosdbClusters(), - "tencentcloud_cynosdb_instances": dataSourceTencentCloudCynosdbInstances(), - "tencentcloud_cynosdb_zone_config": dataSourceTencentCynosdbZoneConfig(), - "tencentcloud_cynosdb_instance_slow_queries": dataSourceTencentCloudCynosdbInstanceSlowQueries(), - "tencentcloud_vod_adaptive_dynamic_streaming_templates": dataSourceTencentCloudVodAdaptiveDynamicStreamingTemplates(), - "tencentcloud_vod_image_sprite_templates": dataSourceTencentCloudVodImageSpriteTemplates(), - "tencentcloud_vod_procedure_templates": dataSourceTencentCloudVodProcedureTemplates(), - "tencentcloud_vod_snapshot_by_time_offset_templates": dataSourceTencentCloudVodSnapshotByTimeOffsetTemplates(), - "tencentcloud_vod_super_player_configs": dataSourceTencentCloudVodSuperPlayerConfigs(), - "tencentcloud_sqlserver_publish_subscribes": dataSourceTencentSqlserverPublishSubscribes(), - "tencentcloud_sqlserver_instance_param_records": dataSourceTencentCloudSqlserverInstanceParamRecords(), - "tencentcloud_sqlserver_project_security_groups": dataSourceTencentCloudSqlserverProjectSecurityGroups(), - "tencentcloud_sqlserver_regions": dataSourceTencentCloudSqlserverRegions(), - "tencentcloud_sqlserver_rollback_time": dataSourceTencentCloudSqlserverRollbackTime(), - "tencentcloud_sqlserver_slowlogs": dataSourceTencentCloudSqlserverSlowlogs(), - "tencentcloud_sqlserver_upload_backup_info": dataSourceTencentCloudSqlserverUploadBackupInfo(), - "tencentcloud_sqlserver_upload_incremental_info": dataSourceTencentCloudSqlserverUploadIncrementalInfo(), - "tencentcloud_api_gateway_usage_plans": dataSourceTencentCloudAPIGatewayUsagePlans(), - "tencentcloud_api_gateway_ip_strategies": dataSourceTencentCloudAPIGatewayIpStrategy(), - "tencentcloud_api_gateway_customer_domains": dataSourceTencentCloudAPIGatewayCustomerDomains(), - "tencentcloud_api_gateway_usage_plan_environments": dataSourceTencentCloudAPIGatewayUsagePlanEnvironments(), - "tencentcloud_api_gateway_throttling_services": dataSourceTencentCloudAPIGatewayThrottlingServices(), - "tencentcloud_api_gateway_throttling_apis": dataSourceTencentCloudAPIGatewayThrottlingApis(), - "tencentcloud_api_gateway_apis": dataSourceTencentCloudAPIGatewayAPIs(), - "tencentcloud_api_gateway_services": dataSourceTencentCloudAPIGatewayServices(), - "tencentcloud_api_gateway_api_keys": dataSourceTencentCloudAPIGatewayAPIKeys(), - "tencentcloud_api_gateway_plugins": dataSourceTencentCloudAPIGatewayPlugins(), - "tencentcloud_api_gateway_upstreams": dataSourceTencentCloudAPIGatewayUpstreams(), - "tencentcloud_api_gateway_api_usage_plans": dataSourceTencentCloudAPIGatewayApiUsagePlans(), - "tencentcloud_api_gateway_api_app_service": dataSourceTencentCloudAPIGatewayApiAppService(), - "tencentcloud_sqlserver_basic_instances": dataSourceTencentCloudSqlserverBasicInstances(), - "tencentcloud_sqlserver_query_xevent": dataSourceTencentCloudSqlserverQueryXevent(), - "tencentcloud_sqlserver_ins_attribute": dataSourceTencentCloudSqlserverInsAttribute(), - "tencentcloud_tcr_instances": dataSourceTencentCloudTCRInstances(), - "tencentcloud_tcr_namespaces": dataSourceTencentCloudTCRNamespaces(), - "tencentcloud_tcr_tokens": dataSourceTencentCloudTCRTokens(), - "tencentcloud_tcr_vpc_attachments": dataSourceTencentCloudTCRVPCAttachments(), - "tencentcloud_tcr_repositories": dataSourceTencentCloudTCRRepositories(), - "tencentcloud_tcr_webhook_trigger_logs": dataSourceTencentCloudTcrWebhookTriggerLogs(), - "tencentcloud_tcr_images": dataSourceTencentCloudTcrImages(), - "tencentcloud_tcr_image_manifests": dataSourceTencentCloudTcrImageManifests(), - "tencentcloud_tcr_tag_retention_execution_tasks": dataSourceTencentCloudTcrTagRetentionExecutionTasks(), - "tencentcloud_tcr_tag_retention_executions": dataSourceTencentCloudTcrTagRetentionExecutions(), - "tencentcloud_tcr_replication_instance_create_tasks": dataSourceTencentCloudTcrReplicationInstanceCreateTasks(), - "tencentcloud_tcr_replication_instance_sync_status": dataSourceTencentCloudTcrReplicationInstanceSyncStatus(), - "tencentcloud_address_templates": dataSourceTencentCloudAddressTemplates(), - "tencentcloud_address_template_groups": dataSourceTencentCloudAddressTemplateGroups(), - "tencentcloud_protocol_templates": dataSourceTencentCloudProtocolTemplates(), - "tencentcloud_protocol_template_groups": dataSourceTencentCloudProtocolTemplateGroups(), - "tencentcloud_kms_keys": dataSourceTencentCloudKmsKeys(), - "tencentcloud_kms_public_key": dataSourceTencentCloudKmsPublicKey(), - "tencentcloud_kms_get_parameters_for_import": dataSourceTencentCloudKmsGetParametersForImport(), + "tencentcloud_ssl_certificates": dataSourceTencentCloudSslCertificates(), + "tencentcloud_ssl_describe_certificate": dataSourceTencentCloudSslDescribeCertificate(), + "tencentcloud_ssl_describe_companies": dataSourceTencentCloudSslDescribeCompanies(), + "tencentcloud_ssl_describe_host_api_gateway_instance_list": dataSourceTencentCloudSslDescribeHostApiGatewayInstanceList(), + "tencentcloud_ssl_describe_host_cdn_instance_list": dataSourceTencentCloudSslDescribeHostCdnInstanceList(), + "tencentcloud_ssl_describe_host_clb_instance_list": dataSourceTencentCloudSslDescribeHostClbInstanceList(), + "tencentcloud_ssl_describe_host_cos_instance_list": dataSourceTencentCloudSslDescribeHostCosInstanceList(), + "tencentcloud_ssl_describe_host_ddos_instance_list": dataSourceTencentCloudSslDescribeHostDdosInstanceList(), + "tencentcloud_ssl_describe_host_lighthouse_instance_list": dataSourceTencentCloudSslDescribeHostLighthouseInstanceList(), + "tencentcloud_ssl_describe_host_live_instance_list": dataSourceTencentCloudSslDescribeHostLiveInstanceList(), + "tencentcloud_ssl_describe_host_teo_instance_list": dataSourceTencentCloudSslDescribeHostTeoInstanceList(), + "tencentcloud_ssl_describe_host_tke_instance_list": dataSourceTencentCloudSslDescribeHostTkeInstanceList(), + "tencentcloud_ssl_describe_host_update_record": dataSourceTencentCloudSslDescribeHostUpdateRecord(), + "tencentcloud_ssl_describe_host_update_record_detail": dataSourceTencentCloudSslDescribeHostUpdateRecordDetail(), + "tencentcloud_ssl_describe_host_vod_instance_list": dataSourceTencentCloudSslDescribeHostVodInstanceList(), + "tencentcloud_ssl_describe_host_waf_instance_list": dataSourceTencentCloudSslDescribeHostWafInstanceList(), + "tencentcloud_ssl_describe_manager_detail": dataSourceTencentCloudSslDescribeManagerDetail(), + "tencentcloud_ssl_describe_managers": dataSourceTencentCloudSslDescribeManagers(), + "tencentcloud_ssl_describe_host_deploy_record": dataSourceTencentCloudSslDescribeHostDeployRecord(), + "tencentcloud_ssl_describe_host_deploy_record_detail": dataSourceTencentCloudSslDescribeHostDeployRecordDetail(), + "tencentcloud_cam_roles": dataSourceTencentCloudCamRoles(), + "tencentcloud_cam_users": dataSourceTencentCloudCamUsers(), + "tencentcloud_cam_groups": dataSourceTencentCloudCamGroups(), + "tencentcloud_cam_group_memberships": dataSourceTencentCloudCamGroupMemberships(), + "tencentcloud_cam_policies": dataSourceTencentCloudCamPolicies(), + "tencentcloud_cam_role_policy_attachments": dataSourceTencentCloudCamRolePolicyAttachments(), + "tencentcloud_cam_user_policy_attachments": dataSourceTencentCloudCamUserPolicyAttachments(), + "tencentcloud_cam_group_policy_attachments": dataSourceTencentCloudCamGroupPolicyAttachments(), + "tencentcloud_cam_saml_providers": dataSourceTencentCloudCamSAMLProviders(), + "tencentcloud_user_info": datasourceTencentCloudUserInfo(), + "tencentcloud_cdn_domains": dataSourceTencentCloudCdnDomains(), + "tencentcloud_cdn_domain_verifier": dataSourceTencentCloudCdnDomainVerifyRecord(), + "tencentcloud_scf_functions": dataSourceTencentCloudScfFunctions(), + "tencentcloud_scf_namespaces": dataSourceTencentCloudScfNamespaces(), + "tencentcloud_scf_account_info": dataSourceTencentCloudScfAccountInfo(), + "tencentcloud_scf_async_event_management": dataSourceTencentCloudScfAsyncEventManagement(), + "tencentcloud_scf_triggers": dataSourceTencentCloudScfTriggers(), + "tencentcloud_scf_async_event_status": dataSourceTencentCloudScfAsyncEventStatus(), + "tencentcloud_scf_function_address": dataSourceTencentCloudScfFunctionAddress(), + "tencentcloud_scf_request_status": dataSourceTencentCloudScfRequestStatus(), + "tencentcloud_scf_function_aliases": dataSourceTencentCloudScfFunctionAliases(), + "tencentcloud_scf_layer_versions": dataSourceTencentCloudScfLayerVersions(), + "tencentcloud_scf_layers": dataSourceTencentCloudScfLayers(), + "tencentcloud_scf_function_versions": dataSourceTencentCloudScfFunctionVersions(), + "tencentcloud_scf_logs": dataSourceTencentCloudScfLogs(), + "tencentcloud_tcaplus_clusters": dataSourceTencentCloudTcaplusClusters(), + "tencentcloud_tcaplus_tablegroups": dataSourceTencentCloudTcaplusTableGroups(), + "tencentcloud_tcaplus_tables": dataSourceTencentCloudTcaplusTables(), + "tencentcloud_tcaplus_idls": dataSourceTencentCloudTcaplusIdls(), + "tencentcloud_monitor_policy_conditions": dataSourceTencentMonitorPolicyConditions(), + "tencentcloud_monitor_data": dataSourceTencentMonitorData(), + "tencentcloud_monitor_product_event": dataSourceTencentMonitorProductEvent(), + "tencentcloud_monitor_binding_objects": dataSourceTencentMonitorBindingObjects(), + "tencentcloud_monitor_policy_groups": dataSourceTencentMonitorPolicyGroups(), + "tencentcloud_monitor_product_namespace": dataSourceTencentMonitorProductNamespace(), + "tencentcloud_monitor_alarm_notices": dataSourceTencentMonitorAlarmNotices(), + "tencentcloud_elasticsearch_instances": dataSourceTencentCloudElasticsearchInstances(), + "tencentcloud_postgresql_instances": dataSourceTencentCloudPostgresqlInstances(), + "tencentcloud_postgresql_specinfos": dataSourceTencentCloudPostgresqlSpecinfos(), + "tencentcloud_postgresql_xlogs": datasourceTencentCloudPostgresqlXlogs(), + "tencentcloud_postgresql_parameter_templates": dataSourceTencentCloudPostgresqlParameterTemplates(), + "tencentcloud_postgresql_readonly_groups": dataSourceTencentCloudPostgresqlReadonlyGroups(), + "tencentcloud_postgresql_base_backups": dataSourceTencentCloudPostgresqlBaseBackups(), + "tencentcloud_postgresql_log_backups": dataSourceTencentCloudPostgresqlLogBackups(), + "tencentcloud_postgresql_backup_download_urls": dataSourceTencentCloudPostgresqlBackupDownloadUrls(), + "tencentcloud_postgresql_db_instance_classes": dataSourceTencentCloudPostgresqlDbInstanceClasses(), + "tencentcloud_postgresql_default_parameters": dataSourceTencentCloudPostgresqlDefaultParameters(), + "tencentcloud_postgresql_recovery_time": dataSourceTencentCloudPostgresqlRecoveryTime(), + "tencentcloud_postgresql_regions": dataSourceTencentCloudPostgresqlRegions(), + "tencentcloud_postgresql_db_instance_versions": dataSourceTencentCloudPostgresqlDbInstanceVersions(), + "tencentcloud_postgresql_zones": dataSourceTencentCloudPostgresqlZones(), + "tencentcloud_sqlserver_zone_config": dataSourceTencentSqlserverZoneConfig(), + "tencentcloud_sqlserver_instances": dataSourceTencentCloudSqlserverInstances(), + "tencentcloud_sqlserver_backups": dataSourceTencentCloudSqlserverBackups(), + "tencentcloud_sqlserver_dbs": dataSourceTencentSqlserverDBs(), + "tencentcloud_sqlserver_accounts": dataSourceTencentCloudSqlserverAccounts(), + "tencentcloud_sqlserver_account_db_attachments": dataSourceTencentCloudSqlserverAccountDBAttachments(), + "tencentcloud_sqlserver_readonly_groups": dataSourceTencentCloudSqlserverReadonlyGroups(), + "tencentcloud_sqlserver_backup_commands": dataSourceTencentCloudSqlserverBackupCommands(), + "tencentcloud_sqlserver_backup_by_flow_id": dataSourceTencentCloudSqlserverBackupByFlowId(), + "tencentcloud_sqlserver_backup_upload_size": dataSourceTencentCloudSqlserverBackupUploadSize(), + "tencentcloud_sqlserver_cross_region_zone": dataSourceTencentCloudSqlserverCrossRegionZone(), + "tencentcloud_sqlserver_db_charsets": dataSourceTencentCloudSqlserverDBCharsets(), + "tencentcloud_ckafka_users": dataSourceTencentCloudCkafkaUsers(), + "tencentcloud_ckafka_acls": dataSourceTencentCloudCkafkaAcls(), + "tencentcloud_ckafka_topics": dataSourceTencentCloudCkafkaTopics(), + "tencentcloud_ckafka_instances": dataSourceTencentCloudCkafkaInstances(), + "tencentcloud_ckafka_connect_resource": dataSourceTencentCloudCkafkaConnectResource(), + "tencentcloud_ckafka_region": dataSourceTencentCloudCkafkaRegion(), + "tencentcloud_ckafka_datahub_topic": dataSourceTencentCloudCkafkaDatahubTopic(), + "tencentcloud_ckafka_datahub_group_offsets": dataSourceTencentCloudCkafkaDatahubGroupOffsets(), + "tencentcloud_ckafka_datahub_task": dataSourceTencentCloudCkafkaDatahubTask(), + "tencentcloud_ckafka_group": dataSourceTencentCloudCkafkaGroup(), + "tencentcloud_ckafka_group_offsets": dataSourceTencentCloudCkafkaGroupOffsets(), + "tencentcloud_ckafka_group_info": dataSourceTencentCloudCkafkaGroupInfo(), + "tencentcloud_ckafka_task_status": dataSourceTencentCloudCkafkaTaskStatus(), + "tencentcloud_ckafka_topic_flow_ranking": dataSourceTencentCloudCkafkaTopicFlowRanking(), + "tencentcloud_ckafka_topic_produce_connection": dataSourceTencentCloudCkafkaTopicProduceConnection(), + "tencentcloud_ckafka_topic_subscribe_group": dataSourceTencentCloudCkafkaTopicSubscribeGroup(), + "tencentcloud_ckafka_topic_sync_replica": dataSourceTencentCloudCkafkaTopicSyncReplica(), + "tencentcloud_ckafka_zone": dataSourceTencentCloudCkafkaZone(), + "tencentcloud_audit_cos_regions": dataSourceTencentCloudAuditCosRegions(), + "tencentcloud_audit_key_alias": dataSourceTencentCloudAuditKeyAlias(), + "tencentcloud_audits": dataSourceTencentCloudAudits(), + "tencentcloud_cynosdb_clusters": dataSourceTencentCloudCynosdbClusters(), + "tencentcloud_cynosdb_instances": dataSourceTencentCloudCynosdbInstances(), + "tencentcloud_cynosdb_zone_config": dataSourceTencentCynosdbZoneConfig(), + "tencentcloud_cynosdb_instance_slow_queries": dataSourceTencentCloudCynosdbInstanceSlowQueries(), + "tencentcloud_vod_adaptive_dynamic_streaming_templates": dataSourceTencentCloudVodAdaptiveDynamicStreamingTemplates(), + "tencentcloud_vod_image_sprite_templates": dataSourceTencentCloudVodImageSpriteTemplates(), + "tencentcloud_vod_procedure_templates": dataSourceTencentCloudVodProcedureTemplates(), + "tencentcloud_vod_snapshot_by_time_offset_templates": dataSourceTencentCloudVodSnapshotByTimeOffsetTemplates(), + "tencentcloud_vod_super_player_configs": dataSourceTencentCloudVodSuperPlayerConfigs(), + "tencentcloud_sqlserver_publish_subscribes": dataSourceTencentSqlserverPublishSubscribes(), + "tencentcloud_sqlserver_instance_param_records": dataSourceTencentCloudSqlserverInstanceParamRecords(), + "tencentcloud_sqlserver_project_security_groups": dataSourceTencentCloudSqlserverProjectSecurityGroups(), + "tencentcloud_sqlserver_regions": dataSourceTencentCloudSqlserverRegions(), + "tencentcloud_sqlserver_rollback_time": dataSourceTencentCloudSqlserverRollbackTime(), + "tencentcloud_sqlserver_slowlogs": dataSourceTencentCloudSqlserverSlowlogs(), + "tencentcloud_sqlserver_upload_backup_info": dataSourceTencentCloudSqlserverUploadBackupInfo(), + "tencentcloud_sqlserver_upload_incremental_info": dataSourceTencentCloudSqlserverUploadIncrementalInfo(), + "tencentcloud_api_gateway_usage_plans": dataSourceTencentCloudAPIGatewayUsagePlans(), + "tencentcloud_api_gateway_ip_strategies": dataSourceTencentCloudAPIGatewayIpStrategy(), + "tencentcloud_api_gateway_customer_domains": dataSourceTencentCloudAPIGatewayCustomerDomains(), + "tencentcloud_api_gateway_usage_plan_environments": dataSourceTencentCloudAPIGatewayUsagePlanEnvironments(), + "tencentcloud_api_gateway_throttling_services": dataSourceTencentCloudAPIGatewayThrottlingServices(), + "tencentcloud_api_gateway_throttling_apis": dataSourceTencentCloudAPIGatewayThrottlingApis(), + "tencentcloud_api_gateway_apis": dataSourceTencentCloudAPIGatewayAPIs(), + "tencentcloud_api_gateway_services": dataSourceTencentCloudAPIGatewayServices(), + "tencentcloud_api_gateway_api_keys": dataSourceTencentCloudAPIGatewayAPIKeys(), + "tencentcloud_api_gateway_plugins": dataSourceTencentCloudAPIGatewayPlugins(), + "tencentcloud_api_gateway_upstreams": dataSourceTencentCloudAPIGatewayUpstreams(), + "tencentcloud_api_gateway_api_usage_plans": dataSourceTencentCloudAPIGatewayApiUsagePlans(), + "tencentcloud_api_gateway_api_app_service": dataSourceTencentCloudAPIGatewayApiAppService(), + "tencentcloud_sqlserver_basic_instances": dataSourceTencentCloudSqlserverBasicInstances(), + "tencentcloud_sqlserver_query_xevent": dataSourceTencentCloudSqlserverQueryXevent(), + "tencentcloud_sqlserver_ins_attribute": dataSourceTencentCloudSqlserverInsAttribute(), + "tencentcloud_tcr_instances": dataSourceTencentCloudTCRInstances(), + "tencentcloud_tcr_namespaces": dataSourceTencentCloudTCRNamespaces(), + "tencentcloud_tcr_tokens": dataSourceTencentCloudTCRTokens(), + "tencentcloud_tcr_vpc_attachments": dataSourceTencentCloudTCRVPCAttachments(), + "tencentcloud_tcr_repositories": dataSourceTencentCloudTCRRepositories(), + "tencentcloud_tcr_webhook_trigger_logs": dataSourceTencentCloudTcrWebhookTriggerLogs(), + "tencentcloud_tcr_images": dataSourceTencentCloudTcrImages(), + "tencentcloud_tcr_image_manifests": dataSourceTencentCloudTcrImageManifests(), + "tencentcloud_tcr_tag_retention_execution_tasks": dataSourceTencentCloudTcrTagRetentionExecutionTasks(), + "tencentcloud_tcr_tag_retention_executions": dataSourceTencentCloudTcrTagRetentionExecutions(), + "tencentcloud_tcr_replication_instance_create_tasks": dataSourceTencentCloudTcrReplicationInstanceCreateTasks(), + "tencentcloud_tcr_replication_instance_sync_status": dataSourceTencentCloudTcrReplicationInstanceSyncStatus(), + "tencentcloud_address_templates": dataSourceTencentCloudAddressTemplates(), + "tencentcloud_address_template_groups": dataSourceTencentCloudAddressTemplateGroups(), + "tencentcloud_protocol_templates": dataSourceTencentCloudProtocolTemplates(), + "tencentcloud_protocol_template_groups": dataSourceTencentCloudProtocolTemplateGroups(), + "tencentcloud_kms_keys": dataSourceTencentCloudKmsKeys(), + "tencentcloud_kms_public_key": dataSourceTencentCloudKmsPublicKey(), + "tencentcloud_kms_get_parameters_for_import": dataSourceTencentCloudKmsGetParametersForImport(), "tencentcloud_kms_describe_keys": dataSourceTencentCloudKmsDescribeKeys(), "tencentcloud_kms_white_box_key_details": dataSourceTencentCloudKmsWhiteBoxKeyDetails(), "tencentcloud_kms_list_keys": dataSourceTencentCloudKmsListKeys(), @@ -2449,12 +2487,12 @@ func Provider() *schema.Provider { "tencentcloud_cfw_vpc_fw_switches": dataSourceTencentCloudCfwVpcFwSwitches(), "tencentcloud_cfw_edge_fw_switches": dataSourceTencentCloudCfwEdgeFwSwitches(), "tencentcloud_cwp_machines_simple": dataSourceTencentCloudCwpMachinesSimple(), - "tencentcloud_ses_receivers": dataSourceTencentCloudSesReceivers(), - "tencentcloud_ses_send_tasks": dataSourceTencentCloudSesSendTasks(), - "tencentcloud_ses_email_identities": dataSourceTencentCloudSesEmailIdentities(), - "tencentcloud_ses_black_email_address": dataSourceTencentCloudSesBlackEmailAddress(), - "tencentcloud_ses_statistics_report": dataSourceTencentCloudSesStatisticsReport(), - "tencentcloud_ses_send_email_status": dataSourceTencentCloudSesSendEmailStatus(), + "tencentcloud_ses_receivers": dataSourceTencentCloudSesReceivers(), + "tencentcloud_ses_send_tasks": dataSourceTencentCloudSesSendTasks(), + "tencentcloud_ses_email_identities": dataSourceTencentCloudSesEmailIdentities(), + "tencentcloud_ses_black_email_address": dataSourceTencentCloudSesBlackEmailAddress(), + "tencentcloud_ses_statistics_report": dataSourceTencentCloudSesStatisticsReport(), + "tencentcloud_ses_send_email_status": dataSourceTencentCloudSesSendEmailStatus(), "tencentcloud_organization_org_financial_by_member": dataSourceTencentCloudOrganizationOrgFinancialByMember(), "tencentcloud_organization_org_auth_node": dataSourceTencentCloudOrganizationOrgAuthNode(), }, diff --git a/tencentcloud/provider_test.go b/tencentcloud/provider_test.go index 775dbb3762..8022bc0c65 100644 --- a/tencentcloud/provider_test.go +++ b/tencentcloud/provider_test.go @@ -25,6 +25,7 @@ const ( ACCOUNT_TYPE_SMS = "SMS" ACCOUNT_TYPE_SES = "SES" ACCOUNT_TYPE_TSF = "TSF" + ACCOUNT_TYPE_SSL = "SSL" INTERNATIONAL_PROVIDER_SECRET_ID = "TENCENTCLOUD_SECRET_ID_INTERNATIONAL" INTERNATIONAL_PROVIDER_SECRET_KEY = "TENCENTCLOUD_SECRET_KEY_INTERNATIONAL" PREPAY_PROVIDER_SECRET_ID = "TENCENTCLOUD_SECRET_ID_PREPAY" @@ -39,6 +40,8 @@ const ( SMS_PROVIDER_SECRET_KEY = "TENCENTCLOUD_SECRET_KEY_SMS" TSF_PROVIDER_SECRET_ID = "TENCENTCLOUD_SECRET_ID_TSF" TSF_PROVIDER_SECRET_KEY = "TENCENTCLOUD_SECRET_KEY_TSF" + SSL_PROVIDER_SECRET_ID = "TENCENTCLOUD_SECRET_ID_SSL" + SSL_PROVIDER_SECRET_KEY = "TENCENTCLOUD_SECRET_KEY_SSL" ) func init() { @@ -154,6 +157,14 @@ func testAccPreCheckCommon(t *testing.T, accountType string) { } os.Setenv(PROVIDER_SECRET_ID, secretId) os.Setenv(PROVIDER_SECRET_KEY, secretKey) + case accountType == ACCOUNT_TYPE_SSL: + secretId := os.Getenv(SSL_PROVIDER_SECRET_ID) + secretKey := os.Getenv(SSL_PROVIDER_SECRET_KEY) + if secretId == "" || secretKey == "" { + t.Fatalf("%v and %v must be set for acceptance tests\n", TSF_PROVIDER_SECRET_ID, TSF_PROVIDER_SECRET_KEY) + } + os.Setenv(PROVIDER_SECRET_ID, secretId) + os.Setenv(PROVIDER_SECRET_KEY, secretKey) default: if v := os.Getenv(PROVIDER_SECRET_ID); v == "" { t.Fatalf("%v must be set for acceptance tests\n", PROVIDER_SECRET_ID) diff --git a/tencentcloud/service_tencent_ssl_certificate.go b/tencentcloud/service_tencent_ssl_certificate.go index 9eedb677fa..6be7c3f549 100644 --- a/tencentcloud/service_tencent_ssl_certificate.go +++ b/tencentcloud/service_tencent_ssl_certificate.go @@ -377,3 +377,1111 @@ func (me *SSLService) getCertificateStatus(ctx context.Context, certificateId st return *describeResponse.Response.Status, nil } +func (me *SslService) DescribeSslDescribeCertificateByID(ctx context.Context, certificateId string) (describeCertificate *ssl.DescribeCertificateResponseParams, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeCertificateRequest() + ) + request.CertificateId = &certificateId + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseSSLCertificateClient().DescribeCertificate(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || response.Response == nil { + return + } + + describeCertificate = response.Response + return +} +func (me *SslService) DescribeSslDescribeCertificateBindResourceTaskDetailByFilter(ctx context.Context, param map[string]interface{}) (describeCertificateBindResourceTaskDetail *ssl.DescribeCertificateBindResourceTaskDetailResponseParams, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeCertificateBindResourceTaskDetailRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "TaskId" { + request.TaskId = v.(*string) + } + if k == "ResourceTypes" { + request.ResourceTypes = v.([]*string) + } + if k == "Regions" { + request.Regions = v.([]*string) + } + } + + ratelimit.Check(request.GetAction()) + + var offset, limit = 0, 20 + + for { + request.Offset = helper.String(helper.IntToStr(offset)) + request.Limit = helper.String(helper.IntToStr(limit)) + response, err := me.client.UseSSLCertificateClient().DescribeCertificateBindResourceTaskDetail(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || response.Response == nil || checkResult(1, response.Response) { + break + } + + describeCertificateBindResourceTaskDetail.CLB = append(describeCertificateBindResourceTaskDetail.CLB, response.Response.CLB...) + describeCertificateBindResourceTaskDetail.CDN = append(describeCertificateBindResourceTaskDetail.CDN, response.Response.CDN...) + describeCertificateBindResourceTaskDetail.WAF = append(describeCertificateBindResourceTaskDetail.WAF, response.Response.WAF...) + describeCertificateBindResourceTaskDetail.DDOS = append(describeCertificateBindResourceTaskDetail.DDOS, response.Response.DDOS...) + describeCertificateBindResourceTaskDetail.LIVE = append(describeCertificateBindResourceTaskDetail.LIVE, response.Response.LIVE...) + describeCertificateBindResourceTaskDetail.VOD = append(describeCertificateBindResourceTaskDetail.VOD, response.Response.VOD...) + describeCertificateBindResourceTaskDetail.TKE = append(describeCertificateBindResourceTaskDetail.TKE, response.Response.TKE...) + describeCertificateBindResourceTaskDetail.APIGATEWAY = append(describeCertificateBindResourceTaskDetail.APIGATEWAY, response.Response.APIGATEWAY...) + describeCertificateBindResourceTaskDetail.TCB = append(describeCertificateBindResourceTaskDetail.TCB, response.Response.TCB...) + describeCertificateBindResourceTaskDetail.TEO = append(describeCertificateBindResourceTaskDetail.TEO, response.Response.TEO...) + + if checkResult(limit, response.Response) { + break + } + + offset += limit + } + return +} +func checkResult(num int, result *ssl.DescribeCertificateBindResourceTaskDetailResponseParams) bool { + return len(result.CLB) < num && len(result.CDN) < num && + len(result.WAF) < num && len(result.DDOS) < num && + len(result.LIVE) < num && len(result.VOD) < num && + len(result.TKE) < num && len(result.APIGATEWAY) < num && + len(result.TCB) < num && len(result.TEO) < num +} + +func (me *SslService) DescribeSslDescribeCompaniesByFilter(ctx context.Context, param map[string]interface{}) (describeCompanies []*ssl.CompanyInfo, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeCompaniesRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CompanyId" { + request.CompanyId = v.(*int64) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset int64 = 0 + limit int64 = 20 + ) + for { + request.Offset = &offset + request.Limit = &limit + response, err := me.client.UseSSLCertificateClient().DescribeCompanies(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || response.Response == nil || len(response.Response.Companies) < 1 { + break + } + describeCompanies = append(describeCompanies, response.Response.Companies...) + if len(response.Response.Companies) < int(limit) { + break + } + + offset += limit + } + + return +} +func (me *SslService) DescribeSslDescribeHostApiGatewayInstanceListByFilter(ctx context.Context, param map[string]interface{}) (describeHostApiGatewayInstanceList []*ssl.ApiGatewayInstanceDetail, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostApiGatewayInstanceListRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "ResourceType" { + request.ResourceType = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + if k == "OldCertificateId" { + request.OldCertificateId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseSSLCertificateClient().DescribeHostApiGatewayInstanceList(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + return + } + + describeHostApiGatewayInstanceList = response.Response.InstanceList + return +} +func (me *SslService) DescribeSslDescribeHostCdnInstanceListByFilter(ctx context.Context, param map[string]interface{}) (describeHostCdnInstanceList *ssl.DescribeHostCdnInstanceListResponseParams, err error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostCdnInstanceListRequest() + response = ssl.NewDescribeHostCdnInstanceListResponse() + ) + + defer func() { + if err != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), err.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "ResourceType" { + request.ResourceType = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + if k == "OldCertificateId" { + request.OldCertificateId = v.(*string) + } + if k == "AsyncCache" { + request.AsyncCache = v.(*int64) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset uint64 = 0 + limit uint64 = 20 + list []*ssl.CdnInstanceDetail + ) + + for { + request.Offset = &offset + request.Limit = &limit + response, err = me.client.UseSSLCertificateClient().DescribeHostCdnInstanceList(request) + if err != nil { + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + break + } + list = append(list, response.Response.InstanceList...) + if len(response.Response.InstanceList) < int(limit) { + break + } + offset += limit + } + + if response == nil || response.Response == nil || response.Response.InstanceList == nil { + return + } + + describeHostCdnInstanceList = &ssl.DescribeHostCdnInstanceListResponseParams{ + InstanceList: list, + } + if response.Response.AsyncOffset != nil { + describeHostCdnInstanceList.AsyncOffset = response.Response.AsyncOffset + } + if response.Response.AsyncCacheTime != nil { + describeHostCdnInstanceList.AsyncCacheTime = response.Response.AsyncCacheTime + } + if response.Response.AsyncTotalNum != nil { + describeHostCdnInstanceList.AsyncOffset = response.Response.AsyncTotalNum + } + + return +} +func (me *SslService) DescribeSslDescribeHostClbInstanceListByFilter(ctx context.Context, param map[string]interface{}) (describeHostClbInstanceList *ssl.DescribeHostClbInstanceListResponseParams, err error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostClbInstanceListRequest() + response = ssl.NewDescribeHostClbInstanceListResponse() + ) + + defer func() { + if err != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), err.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + if k == "AsyncCache" { + request.AsyncCache = v.(*int64) + } + if k == "OldCertificateId" { + request.OldCertificateId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset uint64 = 0 + limit uint64 = 20 + list []*ssl.ClbInstanceDetail + ) + for { + request.Offset = &offset + request.Limit = &limit + response, err = me.client.UseSSLCertificateClient().DescribeHostClbInstanceList(request) + if err != nil { + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + break + } + list = append(list, response.Response.InstanceList...) + if len(response.Response.InstanceList) < int(limit) { + break + } + + offset += limit + } + if response == nil || response.Response == nil || response.Response.InstanceList == nil { + return + } + + describeHostClbInstanceList = &ssl.DescribeHostClbInstanceListResponseParams{ + InstanceList: list, + } + if response.Response.AsyncOffset != nil { + describeHostClbInstanceList.AsyncOffset = response.Response.AsyncOffset + } + if response.Response.AsyncCacheTime != nil { + describeHostClbInstanceList.AsyncCacheTime = response.Response.AsyncCacheTime + } + if response.Response.AsyncTotalNum != nil { + describeHostClbInstanceList.AsyncOffset = response.Response.AsyncTotalNum + } + + return +} +func (me *SslService) DescribeSslDescribeHostCosInstanceListByFilter(ctx context.Context, param map[string]interface{}) (describeHostCosInstanceList *ssl.DescribeHostCosInstanceListResponseParams, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostCosInstanceListRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "ResourceType" { + request.ResourceType = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + } + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseSSLCertificateClient().DescribeHostCosInstanceList(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + return + } + + describeHostCosInstanceList = &ssl.DescribeHostCosInstanceListResponseParams{ + InstanceList: response.Response.InstanceList, + } + if response.Response.AsyncOffset != nil { + describeHostCosInstanceList.AsyncOffset = response.Response.AsyncOffset + } + if response.Response.AsyncCacheTime != nil { + describeHostCosInstanceList.AsyncCacheTime = response.Response.AsyncCacheTime + } + if response.Response.AsyncTotalNum != nil { + describeHostCosInstanceList.AsyncOffset = response.Response.AsyncTotalNum + } + return +} +func (me *SslService) DescribeSslDescribeHostDdosInstanceListByFilter(ctx context.Context, param map[string]interface{}) (describeHostDdosInstanceList []*ssl.DdosInstanceDetail, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostDdosInstanceListRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "ResourceType" { + request.ResourceType = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + if k == "OldCertificateId" { + request.OldCertificateId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseSSLCertificateClient().DescribeHostDdosInstanceList(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + return + } + describeHostDdosInstanceList = response.Response.InstanceList + return +} +func (me *SslService) DescribeSslDescribeHostDeployRecordByFilter(ctx context.Context, param map[string]interface{}) (describeHostDeployRecord []*ssl.DeployRecordInfo, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostDeployRecordRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "ResourceType" { + request.ResourceType = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset uint64 = 0 + limit uint64 = 20 + ) + for { + request.Offset = &offset + request.Limit = &limit + response, err := me.client.UseSSLCertificateClient().DescribeHostDeployRecord(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.DeployRecordList) < 1 { + break + } + describeHostDeployRecord = append(describeHostDeployRecord, response.Response.DeployRecordList...) + if len(response.Response.DeployRecordList) < int(limit) { + break + } + + offset += limit + } + + return +} +func (me *SslService) DescribeSslDescribeHostDeployRecordDetailByFilter( + ctx context.Context, param map[string]interface{}) ( + describeHostDeployRecordDetail []*ssl.DeployRecordDetail, + successTotalCount *int64, failedTotalCount *int64, runningTotalCount *int64, + errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostDeployRecordDetailRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "DeployRecordId" { + request.DeployRecordId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset uint64 = 0 + limit uint64 = 20 + ) + for { + request.Offset = &offset + request.Limit = &limit + response, err := me.client.UseSSLCertificateClient().DescribeHostDeployRecordDetail(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.DeployRecordDetailList) < 1 { + break + } + describeHostDeployRecordDetail = append(describeHostDeployRecordDetail, response.Response.DeployRecordDetailList...) + if response.Response != nil { + if response.Response.SuccessTotalCount != nil { + successTotalCount = response.Response.SuccessTotalCount + } + if response.Response.SuccessTotalCount != nil { + failedTotalCount = response.Response.FailedTotalCount + } + if response.Response.SuccessTotalCount != nil { + runningTotalCount = response.Response.SuccessTotalCount + } + } + if len(response.Response.DeployRecordDetailList) < int(limit) { + break + } + + offset += limit + } + + return +} +func (me *SslService) DescribeSslDescribeHostLighthouseInstanceListByFilter(ctx context.Context, param map[string]interface{}) (describeHostLighthouseInstanceList []*ssl.LighthouseInstanceDetail, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostLighthouseInstanceListRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "ResourceType" { + request.ResourceType = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + } + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseSSLCertificateClient().DescribeHostLighthouseInstanceList(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + return + } + describeHostLighthouseInstanceList = response.Response.InstanceList + return +} +func (me *SslService) DescribeSslDescribeHostLiveInstanceListByFilter(ctx context.Context, param map[string]interface{}) (describeHostLiveInstanceList []*ssl.LiveInstanceDetail, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostLiveInstanceListRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "ResourceType" { + request.ResourceType = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + if k == "OldCertificateId" { + request.OldCertificateId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseSSLCertificateClient().DescribeHostLiveInstanceList(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + return + } + describeHostLiveInstanceList = response.Response.InstanceList + + return +} +func (me *SslService) DescribeSslDescribeHostTeoInstanceListByFilter(ctx context.Context, param map[string]interface{}) (describeHostTeoInstanceList []*ssl.TeoInstanceDetail, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostTeoInstanceListRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "ResourceType" { + request.ResourceType = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + if k == "OldCertificateId" { + request.OldCertificateId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset uint64 = 0 + limit uint64 = 20 + ) + for { + request.Offset = &offset + request.Limit = &limit + response, err := me.client.UseSSLCertificateClient().DescribeHostTeoInstanceList(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + break + } + describeHostTeoInstanceList = append(describeHostTeoInstanceList, response.Response.InstanceList...) + if len(response.Response.InstanceList) < int(limit) { + break + } + + offset += limit + } + + return +} +func (me *SslService) DescribeSslDescribeHostTkeInstanceListByFilter( + ctx context.Context, param map[string]interface{}) ( + describeHostTkeInstanceList []*ssl.TkeInstanceDetail, + asyncTotalNum *int64, asyncOffset *int64, asyncCacheTime *string, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostTkeInstanceListRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + if k == "AsyncCache" { + request.AsyncCache = v.(*int64) + } + if k == "OldCertificateId" { + request.OldCertificateId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset uint64 = 0 + limit uint64 = 20 + ) + for { + request.Offset = &offset + request.Limit = &limit + response, err := me.client.UseSSLCertificateClient().DescribeHostTkeInstanceList(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + break + } + describeHostTkeInstanceList = append(describeHostTkeInstanceList, response.Response.InstanceList...) + if response.Response != nil { + if response.Response.AsyncTotalNum != nil { + asyncTotalNum = response.Response.AsyncTotalNum + } + if response.Response.AsyncOffset != nil { + asyncOffset = response.Response.AsyncOffset + } + if response.Response.AsyncCacheTime != nil { + asyncCacheTime = response.Response.AsyncCacheTime + } + } + if len(response.Response.InstanceList) < int(limit) { + break + } + + offset += limit + } + + return +} + +func (me *SslService) DescribeSslDescribeHostUpdateRecordByFilter(ctx context.Context, param map[string]interface{}) (describeHostUpdateRecord []*ssl.UpdateRecordInfo, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostUpdateRecordRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "OldCertificateId" { + request.OldCertificateId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset uint64 = 0 + limit uint64 = 20 + ) + for { + request.Offset = &offset + request.Limit = &limit + response, err := me.client.UseSSLCertificateClient().DescribeHostUpdateRecord(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.DeployRecordList) < 1 { + break + } + describeHostUpdateRecord = append(describeHostUpdateRecord, response.Response.DeployRecordList...) + if len(response.Response.DeployRecordList) < int(limit) { + break + } + + offset += limit + } + + return +} + +func (me *SslService) DescribeSslDescribeHostUpdateRecordDetailByFilter( + ctx context.Context, param map[string]interface{}) ( + describeHostUpdateRecordDetail []*ssl.UpdateRecordDetails, + successTotalCount *int64, failedTotalCount *int64, runningTotalCount *int64, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostUpdateRecordDetailRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "DeployRecordId" { + request.DeployRecordId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset int64 = 0 + limit int64 = 20 + ) + for { + request.Offset = helper.Int64ToStrPoint(offset) + request.Limit = helper.Int64ToStrPoint(limit) + response, err := me.client.UseSSLCertificateClient().DescribeHostUpdateRecordDetail(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.RecordDetailList) < 1 { + break + } + describeHostUpdateRecordDetail = append(describeHostUpdateRecordDetail, response.Response.RecordDetailList...) + if response.Response != nil { + if response.Response.SuccessTotalCount != nil { + successTotalCount = response.Response.SuccessTotalCount + } + if response.Response.SuccessTotalCount != nil { + failedTotalCount = response.Response.FailedTotalCount + } + if response.Response.SuccessTotalCount != nil { + runningTotalCount = response.Response.SuccessTotalCount + } + } + if len(response.Response.RecordDetailList) < int(limit) { + break + } + offset += limit + } + + return +} + +func (me *SslService) DescribeSslDescribeHostVodInstanceListByFilter(ctx context.Context, param map[string]interface{}) (describeHostVodInstanceList []*ssl.VodInstanceDetail, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostVodInstanceListRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "ResourceType" { + request.ResourceType = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + if k == "OldCertificateId" { + request.OldCertificateId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseSSLCertificateClient().DescribeHostVodInstanceList(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + return + } + + describeHostVodInstanceList = response.Response.InstanceList + return +} + +func (me *SslService) DescribeSslDescribeHostWafInstanceListByFilter(ctx context.Context, param map[string]interface{}) (describeHostWafInstanceList []*ssl.LiveInstanceDetail, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeHostWafInstanceListRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CertificateId" { + request.CertificateId = v.(*string) + } + if k == "ResourceType" { + request.ResourceType = v.(*string) + } + if k == "IsCache" { + request.IsCache = v.(*uint64) + } + if k == "Filters" { + request.Filters = v.([]*ssl.Filter) + } + if k == "OldCertificateId" { + request.OldCertificateId = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseSSLCertificateClient().DescribeHostWafInstanceList(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.InstanceList) < 1 { + return + } + + describeHostWafInstanceList = response.Response.InstanceList + return +} + +func (me *SslService) DescribeSslDescribeManagerDetailByFilter(ctx context.Context, managerId string) (describeManagerDetailResponse *ssl.DescribeManagerDetailResponseParams, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeManagerDetailRequest() + ) + request.ManagerId = helper.StrToInt64Point(managerId) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseSSLCertificateClient().DescribeManagerDetail(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || response.Response == nil { + return + } + + describeManagerDetailResponse = response.Response + return +} + +func (me *SslService) DescribeSslDescribeManagersByFilter(ctx context.Context, param map[string]interface{}) (describeManagers []*ssl.ManagerInfo, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeManagersRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "CompanyId" { + request.CompanyId = v.(*int64) + } + if k == "ManagerName" { + request.ManagerName = v.(*string) + } + if k == "ManagerMail" { + request.ManagerMail = v.(*string) + } + if k == "Status" { + request.Status = v.(*string) + } + if k == "SearchKey" { + request.SearchKey = v.(*string) + } + } + + ratelimit.Check(request.GetAction()) + + var ( + offset int64 = 0 + limit int64 = 20 + ) + for { + request.Offset = &offset + request.Limit = &limit + response, err := me.client.UseSSLCertificateClient().DescribeManagers(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || len(response.Response.Managers) < 1 { + break + } + describeManagers = append(describeManagers, response.Response.Managers...) + if len(response.Response.Managers) < int(limit) { + break + } + + offset += limit + } + + return +} + +func (me *SslService) DescribeSslDescribeCertificateBindResourceTaskResultByFilter(ctx context.Context, param map[string]interface{}) (describeCertificateBindResourceTaskResult []*ssl.SyncTaskBindResourceResult, errRet error) { + var ( + logId = getLogId(ctx) + request = ssl.NewDescribeCertificateBindResourceTaskResultRequest() + ) + + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n", logId, request.GetAction(), request.ToJsonString(), errRet.Error()) + } + }() + + for k, v := range param { + if k == "TaskIds" { + request.TaskIds = v.([]*string) + } + } + + ratelimit.Check(request.GetAction()) + + response, err := me.client.UseSSLCertificateClient().DescribeCertificateBindResourceTaskResult(request) + if err != nil { + errRet = err + return + } + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString()) + + if response == nil || response.Response == nil { + return + } + describeCertificateBindResourceTaskResult = response.Response.SyncTaskBindResourceResult + + return +} diff --git a/website/docs/d/ssl_describe_certificate.html.markdown b/website/docs/d/ssl_describe_certificate.html.markdown new file mode 100644 index 0000000000..9eb0215e39 --- /dev/null +++ b/website/docs/d/ssl_describe_certificate.html.markdown @@ -0,0 +1,118 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_certificate" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_certificate" +description: |- + Use this data source to query detailed information of ssl describe_certificate +--- + +# tencentcloud_ssl_describe_certificate + +Use this data source to query detailed information of ssl describe_certificate + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_certificate" "describe_certificate" { + certificate_id = "8cj4g8h8" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `result` - result list. + * `alias` - Remark name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `c_a_common_names` - All general names of the CA certificateNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `c_a_encrypt_algorithms` - All encryption methods of CA certificateNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `c_a_end_times` - CA certificate all maturity timeNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_begin_time` - Certificate takes effect time.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_end_time` - The certificate is invalid time.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `certificate_extra` - Certificate extension information.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain_number` - Certificate can be configured in the number of domain names.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `origin_certificate_id` - Original certificate ID.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `renew_order` - New order certificate ID.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `replaced_by` - Re -issue the original ID of the certificate.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `replaced_for` - Re -issue a new ID.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `s_m_cert` - Is it a national secret certificateNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `certificate_type` - Certificate type: CA = CA certificate, SVR = server certificate.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `deployable` - Whether it can be deployed.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain` - domain name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_detail` - DV certification information.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_domain` - DV authentication value domain name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_key_sub_domain` - DV certification sub -domain name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_key` - DV certification key.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_path` - DV authentication value path.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_value` - DV certification value.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auths` - DV certification information.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_domain` - DV authentication value domain name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_key` - DV certification key.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_path` - DV authentication value path.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_sub_domain` - DV certification sub -domain name,Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_value` - DV certification value.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_verify_type` - DV certification type.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_revoke_auth_detail` - DV certificate revoking verification valueNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_domain` - DV authentication value domain name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_key` - DV certification key.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_path` - DV authentication value path.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_sub_domain` - DV certification sub -domain name,Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_value` - DV certification value.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `dv_auth_verify_type` - DV certification type.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `from` - Certificate source: Trustasia,uploadNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `insert_time` - application time.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `is_dv` - Whether it is the DV version.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `is_vip` - Whether it is a VIP customer.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `is_vulnerability` - Whether the vulnerability scanning function is enabled.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `is_wildcard` - Whether it is a pan -domain certificate certificate.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `order_id` - Order ID.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `owner_uin` - Account UIN.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `package_type_name` - Certificate type name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `package_type` - Types of Certificate Package: 1 = Geotrust DV SSL CA -G3, 2 = Trustasia TLS RSA CA, 3 = SecureSite Enhanced Enterprise Edition (EV Pro), 4 = SecureSite enhanced (EV), 5 = SecureSite Enterprise Professional Edition (OVPro), 6 = SecureSite Enterprise (OV), 7 = SecureSite Enterprise (OV) compatriots, 8 = Geotrust enhanced type (EV), 9 = Geotrust Enterprise (OV), 10 = Geotrust Enterprise (OV) pass,11 = Trustasia Domain Multi -domain SSL certificate, 12 = Trustasia domain model (DV) passing, 13 = Trustasia Enterprise Passing Character (OV) SSL certificate (D3), 14 = Trustasia Enterprise (OV) SSL certificate (D3), 15= Trustasia Enterprise Multi -domain name (OV) SSL certificate (D3), 16 = Trustasia enhanced (EV) SSL certificate (D3), 17 = Trustasia enhanced multi -domain name (EV) SSL certificate (D3), 18 = GlobalSign enterprise type enterprise type(OV) SSL certificate, 19 = GlobalSign Enterprise Type -type STL Certificate, 20 = GlobalSign enhanced (EV) SSL certificate, 21 = Trustasia Enterprise Tongzhi Multi -domain name (OV) SSL certificate (D3), 22 = GlobalSignignMulti -domain name (OV) SSL certificate, 23 = GlobalSign Enterprise Type -type multi -domain name (OV) SSL certificate, 24 = GlobalSign enhanced multi -domain name (EV) SSL certificate.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `product_zh_name` - Certificate issuer name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `project_id` - Project ID.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `renew_able` - Whether you can issue a certificate.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `status_msg` - status information.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `status_name` - status description.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `status` - = Submitted information, to be uploaded to confirmation letter, 9 = Certificate is revoked, 10 = revoked, 11 = Re -issuance, 12 = Upload and revoke the confirmation letter.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `subject_alt_name` - The certificate contains multiple domain names (containing the main domain name).Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `submitted_data` - Submitted information information.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `admin_email` - Administrator mailbox address.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `admin_first_name` - Administrator name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `admin_last_name` - The surname of the administrator.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `admin_phone_num` - Administrator phone number.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `admin_position` - Administrator position.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `certificate_domain` - Domain information.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `contact_email` - Contact mailbox address,Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `contact_first_name` - Contact name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `contact_last_name` - Contact surname.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `contact_number` - Contact phone number.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `contact_position` - Contact position.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `csr_content` - CSR content.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `csr_type` - CSR type, (online = online CSR, PARSE = paste CSR).Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain_list` - DNS information.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `key_password` - Private key password.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `organization_address` - address.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `organization_city` - city.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `organization_country` - nation.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `organization_division` - department.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `organization_name` - Enterprise or unit name.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `organization_region` - Province.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `phone_area_code` - Local region code.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `phone_number` - Landline number.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `postal_code` - Postal code.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `verify_type` - Verification type.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `validity_period` - Validity period: unit (month).Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `verify_type` - Verification type: DNS_AUTO = Automatic DNS verification, DNS = manual DNS verification, file = file verification, email = email verification.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `vulnerability_report` - Vulnerability scanning evaluation report.Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `vulnerability_status` - Vulnerability scanning status.Note: This field may return NULL, indicating that the valid value cannot be obtained. + + diff --git a/website/docs/d/ssl_describe_companies.html.markdown b/website/docs/d/ssl_describe_companies.html.markdown new file mode 100644 index 0000000000..244cfe9ec0 --- /dev/null +++ b/website/docs/d/ssl_describe_companies.html.markdown @@ -0,0 +1,44 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_companies" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_companies" +description: |- + Use this data source to query detailed information of ssl describe_companies +--- + +# tencentcloud_ssl_describe_companies + +Use this data source to query detailed information of ssl describe_companies + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_companies" "describe_companies" { + company_id = 122 +} +``` + +## Argument Reference + +The following arguments are supported: + +* `company_id` - (Optional, Int) Company ID. +* `result_output_file` - (Optional, String) Used to save results. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `companies` - Company list. + * `company_address` - Detailed address where the company is located. + * `company_city` - The city where the company is. + * `company_country` - Company country. + * `company_id` - Company ID. + * `company_name` - Company Name. + * `company_phone` - company phone. + * `company_province` - Province where the company is located. + * `id_number` - ID numberNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `id_type` - typeNote: This field may return NULL, indicating that the valid value cannot be obtained. + + diff --git a/website/docs/d/ssl_describe_host_api_gateway_instance_list.html.markdown b/website/docs/d/ssl_describe_host_api_gateway_instance_list.html.markdown new file mode 100644 index 0000000000..4fdedc0a47 --- /dev/null +++ b/website/docs/d/ssl_describe_host_api_gateway_instance_list.html.markdown @@ -0,0 +1,50 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_api_gateway_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_api_gateway_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_api_gateway_instance_list +--- + +# tencentcloud_ssl_describe_host_api_gateway_instance_list + +Use this data source to query detailed information of ssl describe_host_api_gateway_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_api_gateway_instance_list" "describe_host_api_gateway_instance_list" { + certificate_id = "9Bpk7XOu" + resource_type = "apiGateway" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `resource_type` - (Required, String) Deploy resource type. +* `filters` - (Optional, List) List of filtering parameters; Filterkey: domainmatch. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `old_certificate_id` - (Optional, String) Deployed certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `instance_list` - Apigateway instance listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain` - domain name. + * `protocol` - Use Agreement. + * `service_id` - Instance ID. + * `service_name` - Example name. + + diff --git a/website/docs/d/ssl_describe_host_cdn_instance_list.html.markdown b/website/docs/d/ssl_describe_host_cdn_instance_list.html.markdown new file mode 100644 index 0000000000..c34af687cc --- /dev/null +++ b/website/docs/d/ssl_describe_host_cdn_instance_list.html.markdown @@ -0,0 +1,53 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_cdn_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_cdn_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_cdn_instance_list +--- + +# tencentcloud_ssl_describe_host_cdn_instance_list + +Use this data source to query detailed information of ssl describe_host_cdn_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_cdn_instance_list" "describe_host_cdn_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "cdn" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `resource_type` - (Required, String) Deploy resource type. +* `async_cache` - (Optional, Int) Whether. +* `filters` - (Optional, List) List of filtering parameters; Filterkey: domainmatch. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `old_certificate_id` - (Optional, String) Original certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `async_cache_time` - Current cache read timeNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `async_offset` - Asynchronous refresh current execution numberNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `async_total_num` - The total number of asynchronous refreshNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `instance_list` - CDN instance listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Deployment certificate ID. + * `domain` - domain name. + * `https_billing_switch` - Domain name billing status. + * `status` - Domain name. + + diff --git a/website/docs/d/ssl_describe_host_clb_instance_list.html.markdown b/website/docs/d/ssl_describe_host_clb_instance_list.html.markdown new file mode 100644 index 0000000000..183a0131da --- /dev/null +++ b/website/docs/d/ssl_describe_host_clb_instance_list.html.markdown @@ -0,0 +1,70 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_clb_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_clb_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_clb_instance_list +--- + +# tencentcloud_ssl_describe_host_clb_instance_list + +Use this data source to query detailed information of ssl describe_host_clb_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_clb_instance_list" "describe_host_clb_instance_list" { + certificate_id = "8u8DII0l" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `async_cache` - (Optional, Int) Whether to cache asynchronous. +* `filters` - (Optional, List) List of filtering parameters; Filterkey: domainmatch. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `old_certificate_id` - (Optional, String) Original certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `async_cache_time` - Current cache read timeNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `async_offset` - Asynchronous refresh current execution numberNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `async_total_num` - The total number of asynchronous refreshNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `instance_list` - CLB instance listener listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `listeners` - CLB listener listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `certificate` - Certificate data binding of listenersNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_ca_id` - Root certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Certificate ID. + * `dns_names` - Domain name binding of certificates. + * `s_s_l_mode` - Certificate certification mode: unidirectional unidirectional authentication, Mutual two -way certificationNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `listener_id` - Listener ID. + * `listener_name` - Name of listeners. + * `no_match_domains` - List of non -matching fieldsNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `protocol` - Type of listener protocol, https | TCP_SSL. + * `rules` - List of listeners' rulesNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `certificate` - Certificate data that has been bound to the rulesNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_ca_id` - Root certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Certificate ID. + * `dns_names` - Domain name binding of certificates. + * `s_s_l_mode` - Certificate certification mode: unidirectional unidirectional authentication, Mutual two -way certificationNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain` - Domain name binding. + * `is_match` - Whether the rules match the domain name to be bound to the certificate. + * `location_id` - Rule ID. + * `no_match_domains` - List of non -matching fieldsNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `sni_switch` - Whether to turn on SNI, 1 to open, 0 to close. + * `load_balancer_id` - CLB instance ID. + * `load_balancer_name` - CLB instance name name. + + diff --git a/website/docs/d/ssl_describe_host_cos_instance_list.html.markdown b/website/docs/d/ssl_describe_host_cos_instance_list.html.markdown new file mode 100644 index 0000000000..bebe91f3aa --- /dev/null +++ b/website/docs/d/ssl_describe_host_cos_instance_list.html.markdown @@ -0,0 +1,52 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_cos_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_cos_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_cos_instance_list +--- + +# tencentcloud_ssl_describe_host_cos_instance_list + +Use this data source to query detailed information of ssl describe_host_cos_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_cos_instance_list" "describe_host_cos_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "cos" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `resource_type` - (Required, String) Deploy resource type cos. +* `filters` - (Optional, List) List of filter parameters. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `async_cache_time` - Current cache read timeNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `async_offset` - Asynchronous refresh current execution numberNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `async_total_num` - The total number of asynchronous refreshNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `instance_list` - COS instance listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `bucket` - Reserve bucket nameNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Binded certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain` - domain name. + * `region` - Barrel areaNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `status` - Enabled: domain name online statusDisabled: Domain name offline status. + + diff --git a/website/docs/d/ssl_describe_host_ddos_instance_list.html.markdown b/website/docs/d/ssl_describe_host_ddos_instance_list.html.markdown new file mode 100644 index 0000000000..1a17609027 --- /dev/null +++ b/website/docs/d/ssl_describe_host_ddos_instance_list.html.markdown @@ -0,0 +1,50 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_ddos_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_ddos_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_ddos_instance_list +--- + +# tencentcloud_ssl_describe_host_ddos_instance_list + +Use this data source to query detailed information of ssl describe_host_ddos_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_ddos_instance_list" "describe_host_ddos_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "ddos" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `resource_type` - (Required, String) Deploy resource type. +* `filters` - (Optional, List) List of filtering parameters; Filterkey: domainmatch. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `old_certificate_id` - (Optional, String) Deployed certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `instance_list` - DDOS example listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain` - domain name. + * `instance_id` - Instance ID. + * `protocol` - agreement type. + * `virtual_port` - Forwarding port. + + diff --git a/website/docs/d/ssl_describe_host_deploy_record.html.markdown b/website/docs/d/ssl_describe_host_deploy_record.html.markdown new file mode 100644 index 0000000000..afe8856baa --- /dev/null +++ b/website/docs/d/ssl_describe_host_deploy_record.html.markdown @@ -0,0 +1,44 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_deploy_record" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_deploy_record" +description: |- + Use this data source to query detailed information of ssl describe_host_deploy_record +--- + +# tencentcloud_ssl_describe_host_deploy_record + +Use this data source to query detailed information of ssl describe_host_deploy_record + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_deploy_record" "describe_host_deploy_record" { + certificate_id = "8u8DII0l" + resource_type = "ddos" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `resource_type` - (Optional, String) Resource Type. +* `result_output_file` - (Optional, String) Used to save results. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `deploy_record_list` - Certificate deployment record listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Deployment certificate ID. + * `create_time` - Deployment time. + * `id` - Deployment record ID. + * `region` - Deployment. + * `resource_type` - Deploy resource type. + * `status` - Deployment state. + * `update_time` - Recent update time. + + diff --git a/website/docs/d/ssl_describe_host_deploy_record_detail.html.markdown b/website/docs/d/ssl_describe_host_deploy_record_detail.html.markdown new file mode 100644 index 0000000000..61a49c97b8 --- /dev/null +++ b/website/docs/d/ssl_describe_host_deploy_record_detail.html.markdown @@ -0,0 +1,59 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_deploy_record_detail" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_deploy_record_detail" +description: |- + Use this data source to query detailed information of ssl describe_host_deploy_record_detail +--- + +# tencentcloud_ssl_describe_host_deploy_record_detail + +Use this data source to query detailed information of ssl describe_host_deploy_record_detail + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_deploy_record_detail" "describe_host_deploy_record_detail" { + deploy_record_id = "" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `deploy_record_id` - (Required, String) Deployment record ID. +* `result_output_file` - (Optional, String) Used to save results. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `deploy_record_detail_list` - Certificate deployment record listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `bucket` - COS storage barrel nameNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Deployment certificate ID. + * `create_time` - Deployment record details Create time. + * `domains` - List of deployment domain. + * `env_id` - TCB environment IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `error_msg` - Deployment error messageNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `id` - Deployment record details ID. + * `instance_id` - Deployment instance ID. + * `instance_name` - Deployment example name. + * `listener_id` - Deployment monitor IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `listener_name` - Delicate monitor name. + * `namespace` - Named space nameNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `old_cert_id` - Original binding certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `port` - portNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `protocol` - Deployment monitoring protocolNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `region` - Deployed TCB regionNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `secret_name` - Secret nameNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `sni_switch` - Whether to turn on SNI. + * `status` - Deployment state. + * `tcb_type` - Deployed TCB typeNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `update_time` - Deployment record details last update time. +* `failed_total_count` - Total number of failuresNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `running_total_count` - Total number of deploymentNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `success_total_count` - Total successNote: This field may return NULL, indicating that the valid value cannot be obtained. + + diff --git a/website/docs/d/ssl_describe_host_lighthouse_instance_list.html.markdown b/website/docs/d/ssl_describe_host_lighthouse_instance_list.html.markdown new file mode 100644 index 0000000000..50773c6141 --- /dev/null +++ b/website/docs/d/ssl_describe_host_lighthouse_instance_list.html.markdown @@ -0,0 +1,48 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_lighthouse_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_lighthouse_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_lighthouse_instance_list +--- + +# tencentcloud_ssl_describe_host_lighthouse_instance_list + +Use this data source to query detailed information of ssl describe_host_lighthouse_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_lighthouse_instance_list" "describe_host_lighthouse_instance_list" { + certificate_id = "8tvMCvGF" + resource_type = "lighthouse" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `resource_type` - (Required, String) Deploy resource type Lighthous. +* `filters` - (Optional, List) List of filter parameters. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `instance_list` - Lighthouse instance listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain` - Optional domain name. + * `instance_id` - Instance ID. + * `instance_name` - Example name. + * `ip` - IP address. + + diff --git a/website/docs/d/ssl_describe_host_live_instance_list.html.markdown b/website/docs/d/ssl_describe_host_live_instance_list.html.markdown new file mode 100644 index 0000000000..e1660853c6 --- /dev/null +++ b/website/docs/d/ssl_describe_host_live_instance_list.html.markdown @@ -0,0 +1,48 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_live_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_live_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_live_instance_list +--- + +# tencentcloud_ssl_describe_host_live_instance_list + +Use this data source to query detailed information of ssl describe_host_live_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_live_instance_list" "describe_host_live_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "live" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `resource_type` - (Required, String) Deploy resource type. +* `filters` - (Optional, List) List of filtering parameters; Filterkey: domainmatch. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `old_certificate_id` - (Optional, String) Deployed certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `instance_list` - Live instance listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Binded certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain` - domain name. + * `status` - -1: Unrelated certificate of domain name.1: The domain name HTTPS has been opened.0: The domain name HTTPS has been closed. + + diff --git a/website/docs/d/ssl_describe_host_teo_instance_list.html.markdown b/website/docs/d/ssl_describe_host_teo_instance_list.html.markdown new file mode 100644 index 0000000000..739cde1950 --- /dev/null +++ b/website/docs/d/ssl_describe_host_teo_instance_list.html.markdown @@ -0,0 +1,49 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_teo_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_teo_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_teo_instance_list +--- + +# tencentcloud_ssl_describe_host_teo_instance_list + +Use this data source to query detailed information of ssl describe_host_teo_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_teo_instance_list" "describe_host_teo_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "teo" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `resource_type` - (Required, String) Deploy resource type. +* `filters` - (Optional, List) List of filtering parameters; Filterkey: domainmatch. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `old_certificate_id` - (Optional, String) Deployed certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `instance_list` - Teo instance listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Certificate ID. + * `host` - domain name. + * `status` - Domain name. + * `zone_id` - Regional IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + + diff --git a/website/docs/d/ssl_describe_host_tke_instance_list.html.markdown b/website/docs/d/ssl_describe_host_tke_instance_list.html.markdown new file mode 100644 index 0000000000..08856096df --- /dev/null +++ b/website/docs/d/ssl_describe_host_tke_instance_list.html.markdown @@ -0,0 +1,61 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_tke_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_tke_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_tke_instance_list +--- + +# tencentcloud_ssl_describe_host_tke_instance_list + +Use this data source to query detailed information of ssl describe_host_tke_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_tke_instance_list" "describe_host_tke_instance_list" { + certificate_id = "8u8DII0l" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `async_cache` - (Optional, Int) Whether to cache asynchronous. +* `filters` - (Optional, List) List of filtering parameters; Filterkey: domainmatch. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `old_certificate_id` - (Optional, String) Original certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `async_cache_time` - Current cache read timeNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `async_offset` - Asynchronous refresh current execution numberNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `async_total_num` - The total number of asynchronous refreshNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `instance_list` - CLB instance listener listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cluster_id` - Cluster ID. + * `cluster_name` - Cluster name. + * `cluster_type` - Cluster. + * `cluster_version` - Cluster. + * `namespace_list` - Cluster Naming Space List. + * `name` - namespace name. + * `secret_list` - Secret list. + * `cert_id` - Certificate ID. + * `ingress_list` - Ingress list. + * `domains` - Ingress domain name list. + * `ingress_name` - Ingress name. + * `tls_domains` - TLS domain name list. + * `name` - Secret name. + * `no_match_domains` - List of domain names that are not matched with the new certificateNote: This field may return NULL, indicating that the valid value cannot be obtained. + + diff --git a/website/docs/d/ssl_describe_host_update_record.html.markdown b/website/docs/d/ssl_describe_host_update_record.html.markdown new file mode 100644 index 0000000000..162493b194 --- /dev/null +++ b/website/docs/d/ssl_describe_host_update_record.html.markdown @@ -0,0 +1,44 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_update_record" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_update_record" +description: |- + Use this data source to query detailed information of ssl describe_host_update_record +--- + +# tencentcloud_ssl_describe_host_update_record + +Use this data source to query detailed information of ssl describe_host_update_record + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_update_record" "describe_host_update_record" { + old_certificate_id = "8u8DII0l" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Optional, String) New certificate ID. +* `old_certificate_id` - (Optional, String) Original certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `deploy_record_list` - Certificate deployment record listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - New certificate ID. + * `create_time` - Deployment time. + * `id` - Record ID. + * `old_cert_id` - Original certificate ID. + * `regions` - List of regional deploymentNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `resource_types` - List of resource types. + * `status` - Deployment state. + * `update_time` - Last update time. + + diff --git a/website/docs/d/ssl_describe_host_update_record_detail.html.markdown b/website/docs/d/ssl_describe_host_update_record_detail.html.markdown new file mode 100644 index 0000000000..b210d41ad3 --- /dev/null +++ b/website/docs/d/ssl_describe_host_update_record_detail.html.markdown @@ -0,0 +1,63 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_update_record_detail" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_update_record_detail" +description: |- + Use this data source to query detailed information of ssl describe_host_update_record_detail +--- + +# tencentcloud_ssl_describe_host_update_record_detail + +Use this data source to query detailed information of ssl describe_host_update_record_detail + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_update_record_detail" "describe_host_update_record_detail" { + deploy_record_id = "35364" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `deploy_record_id` - (Required, String) One -click update record ID. +* `result_output_file` - (Optional, String) Used to save results. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `failed_total_count` - Total number of failuresNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `record_detail_list` - Certificate deployment record listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `list` - List of deployment resources details. + * `bucket` - BUCKET name (COS dedicated)Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - New certificate ID. + * `create_time` - Deployment time. + * `domains` - List of deployment domainNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `env_id` - Environment IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `error_msg` - Deployment error messageNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `id` - Detailed record ID. + * `instance_id` - Deployment instance IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `instance_name` - Deployment example nameNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `listener_id` - Deploy listener ID (CLB for CLB)Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `listener_name` - Deploy listener name (CLB for CLB)Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `namespace` - Naming Space (TKE)Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `old_cert_id` - Old certificate ID. + * `port` - portNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `protocol` - protocolNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `region` - DeploymentNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `resource_type` - Deploy resource type. + * `secret_name` - Secret Name (TKE for TKE)Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `sni_switch` - Whether to turn on SNI (CLB dedicated)Note: This field may return NULL, indicating that the valid value cannot be obtained. + * `status` - Deployment state. + * `t_c_b_type` - TCB deployment typeNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `update_time` - Last update time. + * `resource_type` - Deploy resource type. + * `total_count` - The total number of deployment resources. +* `running_total_count` - Total number of deploymentNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `success_total_count` - Total successNote: This field may return NULL, indicating that the valid value cannot be obtained. + + diff --git a/website/docs/d/ssl_describe_host_vod_instance_list.html.markdown b/website/docs/d/ssl_describe_host_vod_instance_list.html.markdown new file mode 100644 index 0000000000..7fe30bf616 --- /dev/null +++ b/website/docs/d/ssl_describe_host_vod_instance_list.html.markdown @@ -0,0 +1,47 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_vod_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_vod_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_vod_instance_list +--- + +# tencentcloud_ssl_describe_host_vod_instance_list + +Use this data source to query detailed information of ssl describe_host_vod_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_vod_instance_list" "describe_host_vod_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "vod" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `resource_type` - (Required, String) Deploy resource type VOD. +* `filters` - (Optional, List) List of filter parameters. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `old_certificate_id` - (Optional, String) Deployed certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `instance_list` - VOD example listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Certificate ID. + * `domain` - domain name. + + diff --git a/website/docs/d/ssl_describe_host_waf_instance_list.html.markdown b/website/docs/d/ssl_describe_host_waf_instance_list.html.markdown new file mode 100644 index 0000000000..d125c5a251 --- /dev/null +++ b/website/docs/d/ssl_describe_host_waf_instance_list.html.markdown @@ -0,0 +1,48 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_host_waf_instance_list" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_host_waf_instance_list" +description: |- + Use this data source to query detailed information of ssl describe_host_waf_instance_list +--- + +# tencentcloud_ssl_describe_host_waf_instance_list + +Use this data source to query detailed information of ssl describe_host_waf_instance_list + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_host_waf_instance_list" "describe_host_waf_instance_list" { + certificate_id = "8u8DII0l" + resource_type = "waf" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `certificate_id` - (Required, String) Certificate ID to be deployed. +* `resource_type` - (Required, String) Deploy resource type. +* `filters` - (Optional, List) List of filtering parameters; Filterkey: domainmatch. +* `is_cache` - (Optional, Int) Whether to query the cache, 1: Yes; 0: No, the default is the query cache, the cache is half an hour. +* `old_certificate_id` - (Optional, String) Deployed certificate ID. +* `result_output_file` - (Optional, String) Used to save results. + +The `filters` object supports the following: + +* `filter_key` - (Required, String) Filter parameter key. +* `filter_value` - (Required, String) Filter parameter value. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `instance_list` - WAF instance listNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `cert_id` - Binded certificate IDNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain` - domain name. + * `status` - -1: Unrelated certificate of domain name.1: The domain name HTTPS has been opened.0: The domain name HTTPS has been closed. + + diff --git a/website/docs/d/ssl_describe_manager_detail.html.markdown b/website/docs/d/ssl_describe_manager_detail.html.markdown new file mode 100644 index 0000000000..9c17e78fa0 --- /dev/null +++ b/website/docs/d/ssl_describe_manager_detail.html.markdown @@ -0,0 +1,60 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_manager_detail" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_manager_detail" +description: |- + Use this data source to query detailed information of ssl describe_manager_detail +--- + +# tencentcloud_ssl_describe_manager_detail + +Use this data source to query detailed information of ssl describe_manager_detail + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_manager_detail" "describe_manager_detail" { + manager_id = "" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `manager_id` - (Required, Int) Manager ID. +* `result_output_file` - (Optional, String) Used to save results. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `company_id` - Manager Company ID. +* `company_info` - Manager&#39;s company information. + * `company_address` - Detailed address where the company is located. + * `company_city` - The city where the company is. + * `company_country` - Company country. + * `company_id` - Company ID. + * `company_name` - Company Name. + * `company_phone` - company phone. + * `company_province` - Province where the company is located. + * `id_number` - ID numberNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `id_type` - typeNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `contact_first_name` - Contact name. +* `contact_last_name` - Contact name. +* `contact_mail` - Contact mailbox. +* `contact_phone` - contact number. +* `contact_position` - Contact position. +* `create_time` - Creation time. +* `expire_time` - Verify expiration timeNote: This field may return NULL, indicating that the valid value cannot be obtained. +* `manager_department` - Administrator department. +* `manager_first_name` - Manager name. +* `manager_last_name` - Manager name. +* `manager_mail` - Manager mailbox. +* `manager_phone` - Manager phone call. +* `manager_position` - Manager position. +* `status` - Status: Audit: OK during the review: review passed inValid: expired expiRing: is about to expire Expired: expired. +* `verify_time` - Verify timeNote: This field may return NULL, indicating that the valid value cannot be obtained. + + diff --git a/website/docs/d/ssl_describe_managers.html.markdown b/website/docs/d/ssl_describe_managers.html.markdown new file mode 100644 index 0000000000..0c028058f2 --- /dev/null +++ b/website/docs/d/ssl_describe_managers.html.markdown @@ -0,0 +1,53 @@ +--- +subcategory: "SSL Certificates" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_ssl_describe_managers" +sidebar_current: "docs-tencentcloud-datasource-ssl_describe_managers" +description: |- + Use this data source to query detailed information of ssl describe_managers +--- + +# tencentcloud_ssl_describe_managers + +Use this data source to query detailed information of ssl describe_managers + +## Example Usage + +```hcl +data "tencentcloud_ssl_describe_managers" "describe_managers" { + company_id = "11772" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `company_id` - (Required, Int) Company ID. +* `manager_mail` - (Optional, String) Vague query manager email (will be abandoned), please use Searchkey. +* `manager_name` - (Optional, String) Manager&#39;s name (will be abandoned), please use Searchkey. +* `result_output_file` - (Optional, String) Used to save results. +* `search_key` - (Optional, String) Manager&#39;s surname/Manager name/mailbox/department precise matching. +* `status` - (Optional, String) Filter according to the status of the manager, and the value is available&#39;None&#39; Unable to submit review&#39;Audit&#39;, Asian Credit Review&#39;Caaudit&#39; CA review&#39;OK&#39; has been reviewed&#39;Invalid&#39; review failed&#39;Expiring&#39; is about to expire&#39;Expired&#39; expired. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `managers` - Company Manager List. + * `cert_count` - Number of administrative certificates. + * `create_time` - Creation timeNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `domain_count` - Number of administrators. + * `expire_time` - Examine the validity expiration timeNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `manager_department` - Administrator department. + * `manager_first_name` - Manager name. + * `manager_id` - Manager ID. + * `manager_last_name` - Manager name. + * `manager_mail` - Manager mailbox. + * `manager_phone` - Manager phone call. + * `manager_position` - Manager position. + * `status` - Status: Audit: OK during the review: review passed inValid: expired expiRing: is about to expire Expired: expired. + * `submit_audit_time` - The last time the review timeNote: This field may return NULL, indicating that the valid value cannot be obtained. + * `verify_time` - Examination timeNote: This field may return NULL, indicating that the valid value cannot be obtained. + + diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index b146f1aee5..b87c6184e1 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -2560,6 +2560,63 @@
  • tencentcloud_ssl_certificates
  • +
  • + tencentcloud_ssl_describe_certificate +
  • +
  • + tencentcloud_ssl_describe_companies +
  • +
  • + tencentcloud_ssl_describe_host_api_gateway_instance_list +
  • +
  • + tencentcloud_ssl_describe_host_cdn_instance_list +
  • +
  • + tencentcloud_ssl_describe_host_clb_instance_list +
  • +
  • + tencentcloud_ssl_describe_host_cos_instance_list +
  • +
  • + tencentcloud_ssl_describe_host_ddos_instance_list +
  • +
  • + tencentcloud_ssl_describe_host_deploy_record +
  • +
  • + tencentcloud_ssl_describe_host_deploy_record_detail +
  • +
  • + tencentcloud_ssl_describe_host_lighthouse_instance_list +
  • +
  • + tencentcloud_ssl_describe_host_live_instance_list +
  • +
  • + tencentcloud_ssl_describe_host_teo_instance_list +
  • +
  • + tencentcloud_ssl_describe_host_tke_instance_list +
  • +
  • + tencentcloud_ssl_describe_host_update_record +
  • +
  • + tencentcloud_ssl_describe_host_update_record_detail +
  • +
  • + tencentcloud_ssl_describe_host_vod_instance_list +
  • +
  • + tencentcloud_ssl_describe_host_waf_instance_list +
  • +
  • + tencentcloud_ssl_describe_manager_detail +
  • +
  • + tencentcloud_ssl_describe_managers +
  • From 37228f039146b833eb0ff70c3af4b49c2529c4f1 Mon Sep 17 00:00:00 2001 From: WeiMengXS Date: Sun, 8 Oct 2023 15:57:24 +0800 Subject: [PATCH 2/9] feat: changelog --- .changelog/2173.txt | 75 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .changelog/2173.txt diff --git a/.changelog/2173.txt b/.changelog/2173.txt new file mode 100644 index 0000000000..a1bfc91358 --- /dev/null +++ b/.changelog/2173.txt @@ -0,0 +1,75 @@ +```release-note:new-data-source +tencentcloud_ssl_describe_certificate +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_companies +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_api_gateway_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_cdn_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_clb_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_cos_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_ddos_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_deploy_record +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_deploy_record_detail +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_lighthouse_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_live_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_teo_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_tke_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_update_record +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_update_record_detail +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_vod_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_host_waf_instance_list +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_managers +``` + +```release-note:new-data-source +tencentcloud_ssl_describe_manager_detail +``` \ No newline at end of file From d4a5e830251f5a69d9882a6a1fd20c49250b2e22 Mon Sep 17 00:00:00 2001 From: WeiMengXS Date: Sun, 8 Oct 2023 16:29:10 +0800 Subject: [PATCH 3/9] feat: operation --- tencentcloud/provider_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tencentcloud/provider_test.go b/tencentcloud/provider_test.go index 8022bc0c65..14222e9c03 100644 --- a/tencentcloud/provider_test.go +++ b/tencentcloud/provider_test.go @@ -161,7 +161,7 @@ func testAccPreCheckCommon(t *testing.T, accountType string) { secretId := os.Getenv(SSL_PROVIDER_SECRET_ID) secretKey := os.Getenv(SSL_PROVIDER_SECRET_KEY) if secretId == "" || secretKey == "" { - t.Fatalf("%v and %v must be set for acceptance tests\n", TSF_PROVIDER_SECRET_ID, TSF_PROVIDER_SECRET_KEY) + t.Fatalf("%v and %v must be set for acceptance tests\n", SSL_PROVIDER_SECRET_ID, SSL_PROVIDER_SECRET_KEY) } os.Setenv(PROVIDER_SECRET_ID, secretId) os.Setenv(PROVIDER_SECRET_KEY, secretKey) From abd68a8d1d9aa77a42017e63069862c85d06f159 Mon Sep 17 00:00:00 2001 From: WeiMengXS Date: Sun, 8 Oct 2023 16:51:55 +0800 Subject: [PATCH 4/9] feat: e2e --- ...urce_tc_ssl_describe_host_lighthouse_instance_list_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list_test.go index e2ca38b61c..72b4d68590 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list_test.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list_test.go @@ -17,7 +17,7 @@ func TestAccTencentCloudSslDescribeHostLighthouseInstanceListDataSource_basic(t { Config: testAccSslDescribeHostLighthouseInstanceListDataSource, Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_lighthouse_instance_list.describe_host_lighthouse_instance_list"), - resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_lighthouse_instance_list.describe_host_lighthouse_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_lighthouse_instance_list.describe_host_lighthouse_instance_list", "certificate_id", "9D3mK31W"), resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_lighthouse_instance_list.describe_host_lighthouse_instance_list", "resource_type", "lighthouse"), ), }, @@ -28,7 +28,7 @@ func TestAccTencentCloudSslDescribeHostLighthouseInstanceListDataSource_basic(t const testAccSslDescribeHostLighthouseInstanceListDataSource = ` data "tencentcloud_ssl_describe_host_lighthouse_instance_list" "describe_host_lighthouse_instance_list" { - certificate_id = "8hUkH3xC" + certificate_id = "9D3mK31W" resource_type = "lighthouse" } ` From f939c144b0a20d64ea442915548437a514766869 Mon Sep 17 00:00:00 2001 From: WeiMengXS Date: Sun, 8 Oct 2023 16:52:44 +0800 Subject: [PATCH 5/9] feat: e2e --- .../data_source_tc_ssl_describe_host_deploy_record_test.go | 4 ++-- ...ata_source_tc_ssl_describe_host_live_instance_list_test.go | 4 ++-- ...data_source_tc_ssl_describe_host_teo_instance_list_test.go | 4 ++-- ...data_source_tc_ssl_describe_host_tke_instance_list_test.go | 4 ++-- .../data_source_tc_ssl_describe_host_update_record_test.go | 4 ++-- ...data_source_tc_ssl_describe_host_vod_instance_list_test.go | 4 ++-- ...data_source_tc_ssl_describe_host_waf_instance_list_test.go | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_test.go b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_test.go index d413a282ab..b56b576cec 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_test.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_test.go @@ -17,7 +17,7 @@ func TestAccTencentCloudSslDescribeHostDeployRecordDataSource_basic(t *testing.T { Config: testAccSslDescribeHostDeployRecordDataSource, Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_deploy_record.describe_host_deploy_record"), - resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_deploy_record.describe_host_deploy_record", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_deploy_record.describe_host_deploy_record", "certificate_id", "9D3qRt7r"), resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_deploy_record.describe_host_deploy_record", "resource_type", "ddos"), ), }, @@ -28,7 +28,7 @@ func TestAccTencentCloudSslDescribeHostDeployRecordDataSource_basic(t *testing.T const testAccSslDescribeHostDeployRecordDataSource = ` data "tencentcloud_ssl_describe_host_deploy_record" "describe_host_deploy_record" { - certificate_id = "8hUkH3xC" + certificate_id = "9D3qRt7r" resource_type = "ddos" } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list_test.go index 79f3783ac7..baeb54e455 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list_test.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list_test.go @@ -17,7 +17,7 @@ func TestAccTencentCloudSslDescribeHostLiveInstanceListDataSource_basic(t *testi { Config: testAccSslDescribeHostLiveInstanceListDataSource, Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_live_instance_list.describe_host_live_instance_list"), - resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_live_instance_list.describe_host_live_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_live_instance_list.describe_host_live_instance_list", "certificate_id", "9D3qRt7r"), resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_live_instance_list.describe_host_live_instance_list", "resource_type", "live"), ), }, @@ -28,7 +28,7 @@ func TestAccTencentCloudSslDescribeHostLiveInstanceListDataSource_basic(t *testi const testAccSslDescribeHostLiveInstanceListDataSource = ` data "tencentcloud_ssl_describe_host_live_instance_list" "describe_host_live_instance_list" { - certificate_id = "8hUkH3xC" + certificate_id = "9D3qRt7r" resource_type = "live" } ` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list_test.go index 66d034d5fa..0075dc0784 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list_test.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list_test.go @@ -17,7 +17,7 @@ func TestAccTencentCloudSslDescribeHostTeoInstanceListDataSource_basic(t *testin { Config: testAccSslDescribeHostTeoInstanceListDataSource, Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_teo_instance_list.describe_host_teo_instance_list"), - resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_teo_instance_list.describe_host_teo_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_teo_instance_list.describe_host_teo_instance_list", "certificate_id", "9D3qRt7r"), resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_teo_instance_list.describe_host_teo_instance_list", "resource_type", "teo"), ), }, @@ -28,7 +28,7 @@ func TestAccTencentCloudSslDescribeHostTeoInstanceListDataSource_basic(t *testin const testAccSslDescribeHostTeoInstanceListDataSource = ` data "tencentcloud_ssl_describe_host_teo_instance_list" "describe_host_teo_instance_list" { - certificate_id = "8hUkH3xC" + certificate_id = "9D3qRt7r" resource_type = "teo" } ` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list_test.go index 3ef68db5fa..0e1ebf18e4 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list_test.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list_test.go @@ -17,7 +17,7 @@ func TestAccTencentCloudSslDescribeHostTkeInstanceListDataSource_basic(t *testin { Config: testAccSslDescribeHostTkeInstanceListDataSource, Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_tke_instance_list.describe_host_tke_instance_list"), - resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_tke_instance_list.describe_host_tke_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_tke_instance_list.describe_host_tke_instance_list", "certificate_id", "9D3qRt7r"), ), }, }, @@ -27,6 +27,6 @@ func TestAccTencentCloudSslDescribeHostTkeInstanceListDataSource_basic(t *testin const testAccSslDescribeHostTkeInstanceListDataSource = ` data "tencentcloud_ssl_describe_host_tke_instance_list" "describe_host_tke_instance_list" { - certificate_id = "8hUkH3xC" + certificate_id = "9D3qRt7r" } ` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_update_record_test.go b/tencentcloud/data_source_tc_ssl_describe_host_update_record_test.go index 07eea45821..78b70790d6 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_update_record_test.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_update_record_test.go @@ -17,7 +17,7 @@ func TestAccTencentCloudSslDescribeHostUpdateRecordDataSource_basic(t *testing.T { Config: testAccSslDescribeHostUpdateRecordDataSource, Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_update_record.describe_host_update_record"), - resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_update_record.describe_host_update_record", "old_certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_update_record.describe_host_update_record", "old_certificate_id", "9D3qRt7r"), ), }, }, @@ -27,7 +27,7 @@ func TestAccTencentCloudSslDescribeHostUpdateRecordDataSource_basic(t *testing.T const testAccSslDescribeHostUpdateRecordDataSource = ` data "tencentcloud_ssl_describe_host_update_record" "describe_host_update_record" { - old_certificate_id = "8hUkH3xC" + old_certificate_id = "9D3qRt7r" } ` diff --git a/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list_test.go index d599537146..eadfd6ff6e 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list_test.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list_test.go @@ -17,7 +17,7 @@ func TestAccTencentCloudSslDescribeHostVodInstanceListDataSource_basic(t *testin { Config: testAccSslDescribeHostVodInstanceListDataSource, Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_vod_instance_list.describe_host_vod_instance_list"), - resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_vod_instance_list.describe_host_vod_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_vod_instance_list.describe_host_vod_instance_list", "certificate_id", "9D3qRt7r"), resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_vod_instance_list.describe_host_vod_instance_list", "resource_type", "vod"), ), }, @@ -28,7 +28,7 @@ func TestAccTencentCloudSslDescribeHostVodInstanceListDataSource_basic(t *testin const testAccSslDescribeHostVodInstanceListDataSource = ` data "tencentcloud_ssl_describe_host_vod_instance_list" "describe_host_vod_instance_list" { - certificate_id = "8hUkH3xC" + certificate_id = "9D3qRt7r" resource_type = "vod" } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list_test.go b/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list_test.go index bde0fdf070..891dc9d72f 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list_test.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list_test.go @@ -17,7 +17,7 @@ func TestAccTencentCloudSslDescribeHostWafInstanceListDataSource_basic(t *testin { Config: testAccSslDescribeHostWafInstanceListDataSource, Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_ssl_describe_host_waf_instance_list.describe_host_waf_instance_list"), - resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_waf_instance_list.describe_host_waf_instance_list", "certificate_id", "8hUkH3xC"), + resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_waf_instance_list.describe_host_waf_instance_list", "certificate_id", "9D3qRt7r"), resource.TestCheckResourceAttr("data.tencentcloud_ssl_describe_host_waf_instance_list.describe_host_waf_instance_list", "resource_type", "waf"), ), }, @@ -28,7 +28,7 @@ func TestAccTencentCloudSslDescribeHostWafInstanceListDataSource_basic(t *testin const testAccSslDescribeHostWafInstanceListDataSource = ` data "tencentcloud_ssl_describe_host_waf_instance_list" "describe_host_waf_instance_list" { - certificate_id = "8hUkH3xC" + certificate_id = "9D3qRt7r" resource_type = "waf" } From 7d5d542dbdd4f602ced68120953d83f6aa83502d Mon Sep 17 00:00:00 2001 From: WeiMengXS Date: Wed, 11 Oct 2023 18:01:40 +0800 Subject: [PATCH 6/9] fix: output name --- tencentcloud/data_source_tc_ssl_describe_certificate.go | 6 +++--- tencentcloud/data_source_tc_ssl_describe_companies.go | 6 +++--- ...source_tc_ssl_describe_host_api_gateway_instance_list.go | 6 +++--- .../data_source_tc_ssl_describe_host_cdn_instance_list.go | 6 +++--- .../data_source_tc_ssl_describe_host_clb_instance_list.go | 6 +++--- .../data_source_tc_ssl_describe_host_cos_instance_list.go | 6 +++--- .../data_source_tc_ssl_describe_host_ddos_instance_list.go | 6 +++--- .../data_source_tc_ssl_describe_host_deploy_record.go | 6 +++--- ...data_source_tc_ssl_describe_host_deploy_record_detail.go | 6 +++--- ..._source_tc_ssl_describe_host_lighthouse_instance_list.go | 6 +++--- .../data_source_tc_ssl_describe_host_live_instance_list.go | 6 +++--- .../data_source_tc_ssl_describe_host_teo_instance_list.go | 6 +++--- .../data_source_tc_ssl_describe_host_tke_instance_list.go | 6 +++--- .../data_source_tc_ssl_describe_host_update_record.go | 6 +++--- ...data_source_tc_ssl_describe_host_update_record_detail.go | 6 +++--- .../data_source_tc_ssl_describe_host_vod_instance_list.go | 6 +++--- .../data_source_tc_ssl_describe_host_waf_instance_list.go | 6 +++--- tencentcloud/data_source_tc_ssl_describe_manager_detail.go | 6 +++--- tencentcloud/data_source_tc_ssl_describe_managers.go | 6 +++--- 19 files changed, 57 insertions(+), 57 deletions(-) diff --git a/tencentcloud/data_source_tc_ssl_describe_certificate.go b/tencentcloud/data_source_tc_ssl_describe_certificate.go index 230b408708..9464dc31b1 100644 --- a/tencentcloud/data_source_tc_ssl_describe_certificate.go +++ b/tencentcloud/data_source_tc_ssl_describe_certificate.go @@ -906,9 +906,9 @@ func dataSourceTencentCloudSslDescribeCertificateRead(d *schema.ResourceData, me _ = d.Set("result", []interface{}{sslResponseMap}) d.SetId(CertificateId) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), sslResponseMap); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), sslResponseMap); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_companies.go b/tencentcloud/data_source_tc_ssl_describe_companies.go index f10578e7c4..b7c06a9eda 100644 --- a/tencentcloud/data_source_tc_ssl_describe_companies.go +++ b/tencentcloud/data_source_tc_ssl_describe_companies.go @@ -174,9 +174,9 @@ func dataSourceTencentCloudSslDescribeCompaniesRead(d *schema.ResourceData, meta } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list.go index 8692b7240c..0aaa67e8dd 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_api_gateway_instance_list.go @@ -208,9 +208,9 @@ func dataSourceTencentCloudSslDescribeHostApiGatewayInstanceListRead(d *schema.R } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list.go index ddb86e44aa..aa6919292d 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_cdn_instance_list.go @@ -238,9 +238,9 @@ func dataSourceTencentCloudSslDescribeHostCdnInstanceListRead(d *schema.Resource _ = d.Set("async_cache_time", instanceList.AsyncCacheTime) } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list.go index b366729fd5..d97cd107ca 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_clb_instance_list.go @@ -445,9 +445,9 @@ func dataSourceTencentCloudSslDescribeHostClbInstanceListRead(d *schema.Resource } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list.go index f6e5b82e1b..32fcfac506 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_cos_instance_list.go @@ -229,9 +229,9 @@ func dataSourceTencentCloudSslDescribeHostCosInstanceListRead(d *schema.Resource } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list.go index 433216d2a0..208b43125c 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_ddos_instance_list.go @@ -208,9 +208,9 @@ func dataSourceTencentCloudSslDescribeHostDdosInstanceListRead(d *schema.Resourc } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_deploy_record.go b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record.go index eb962183d0..b73406be60 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_deploy_record.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record.go @@ -167,9 +167,9 @@ func dataSourceTencentCloudSslDescribeHostDeployRecordRead(d *schema.ResourceDat } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail.go b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail.go index 55645dc474..bc91f301fa 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_deploy_record_detail.go @@ -317,9 +317,9 @@ func dataSourceTencentCloudSslDescribeHostDeployRecordDetailRead(d *schema.Resou } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list.go index c674a6821d..525248fc90 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_lighthouse_instance_list.go @@ -195,9 +195,9 @@ func dataSourceTencentCloudSslDescribeHostLighthouseInstanceListRead(d *schema.R } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list.go index 2d71d4f634..b779f3d454 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_live_instance_list.go @@ -190,9 +190,9 @@ func dataSourceTencentCloudSslDescribeHostLiveInstanceListRead(d *schema.Resourc } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list.go index 62d0a2859d..be37c18223 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_teo_instance_list.go @@ -199,9 +199,9 @@ func dataSourceTencentCloudSslDescribeHostTeoInstanceListRead(d *schema.Resource } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list.go index e9ad2f667e..0b38fc1254 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_tke_instance_list.go @@ -364,9 +364,9 @@ func dataSourceTencentCloudSslDescribeHostTkeInstanceListRead(d *schema.Resource } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_update_record.go b/tencentcloud/data_source_tc_ssl_describe_host_update_record.go index fb2added5c..a046e6073f 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_update_record.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_update_record.go @@ -181,9 +181,9 @@ func dataSourceTencentCloudSslDescribeHostUpdateRecordRead(d *schema.ResourceDat } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_update_record_detail.go b/tencentcloud/data_source_tc_ssl_describe_host_update_record_detail.go index 201dfbe70f..3185ac7ac0 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_update_record_detail.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_update_record_detail.go @@ -362,9 +362,9 @@ func dataSourceTencentCloudSslDescribeHostUpdateRecordDetailRead(d *schema.Resou } d.SetId(id) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list.go index a50ecd8879..a7bac4eae2 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_vod_instance_list.go @@ -181,9 +181,9 @@ func dataSourceTencentCloudSslDescribeHostVodInstanceListRead(d *schema.Resource } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list.go b/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list.go index ef3d978928..9483cfc0c1 100644 --- a/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list.go +++ b/tencentcloud/data_source_tc_ssl_describe_host_waf_instance_list.go @@ -190,9 +190,9 @@ func dataSourceTencentCloudSslDescribeHostWafInstanceListRead(d *schema.Resource } d.SetId(helper.DataResourceIdsHash(ids)) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_manager_detail.go b/tencentcloud/data_source_tc_ssl_describe_manager_detail.go index 83a83cfa23..027a18edc4 100644 --- a/tencentcloud/data_source_tc_ssl_describe_manager_detail.go +++ b/tencentcloud/data_source_tc_ssl_describe_manager_detail.go @@ -327,9 +327,9 @@ func dataSourceTencentCloudSslDescribeManagerDetailRead(d *schema.ResourceData, } d.SetId(helper.IntToStr(managerId.(int))) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } diff --git a/tencentcloud/data_source_tc_ssl_describe_managers.go b/tencentcloud/data_source_tc_ssl_describe_managers.go index d82324832f..7ab89526c9 100644 --- a/tencentcloud/data_source_tc_ssl_describe_managers.go +++ b/tencentcloud/data_source_tc_ssl_describe_managers.go @@ -258,9 +258,9 @@ func dataSourceTencentCloudSslDescribeManagersRead(d *schema.ResourceData, meta } d.SetId(companyId) - output3, ok := d.GetOk("result_output_file") - if ok && output3.(string) != "" { - if e := writeToFile(output3.(string), tmpList); e != nil { + output, ok := d.GetOk("result_output_file") + if ok && output.(string) != "" { + if e := writeToFile(output.(string), tmpList); e != nil { return e } } From 05538fd0c3f38812a9d06d1165396fcc14b83115 Mon Sep 17 00:00:00 2001 From: WeiMengXS Date: Wed, 11 Oct 2023 18:17:58 +0800 Subject: [PATCH 7/9] fix: test --- tencentcloud/provider.go | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 77ab7994bb..56ad3042dd 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -1408,9 +1408,9 @@ Tencent Cloud Organization (TCO) tencentcloud_organization_org_auth_node tencentcloud_organization_org_financial_by_member Resource + tencentcloud_organization_instance tencentcloud_organization_org_node tencentcloud_organization_org_member - tencentcloud_organization_instance tencentcloud_organization_org_member_email tencentcloud_organization_org_member_auth_identity_attachment tencentcloud_organization_policy_sub_account_attachment @@ -2083,17 +2083,17 @@ func Provider() *schema.Provider { "tencentcloud_gaap_security_rules": dataSourceTencentCloudGaapSecurityRules(), "tencentcloud_gaap_certificates": dataSourceTencentCloudGaapCertificates(), "tencentcloud_gaap_domain_error_pages": dataSourceTencentCloudGaapDomainErrorPageInfoList(), - "tencentcloud_gaap_access_regions": dataSourceTencentCloudGaapAccessRegions(), - "tencentcloud_gaap_access_regions_by_dest_region": dataSourceTencentCloudGaapAccessRegionsByDestRegion(), - "tencentcloud_gaap_black_header": dataSourceTencentCloudGaapBlackHeader(), - "tencentcloud_gaap_country_area_mapping": dataSourceTencentCloudGaapCountryAreaMapping(), - "tencentcloud_gaap_custom_header": dataSourceTencentCloudGaapCustomHeader(), - "tencentcloud_gaap_dest_regions": dataSourceTencentCloudGaapDestRegions(), - "tencentcloud_gaap_proxy_detail": dataSourceTencentCloudGaapProxyDetail(), - "tencentcloud_gaap_proxy_groups": dataSourceTencentCloudGaapProxyGroups(), - "tencentcloud_gaap_proxy_group_statistics": dataSourceTencentCloudGaapProxyGroupStatistics(), - "tencentcloud_gaap_proxy_statistics": dataSourceTencentCloudGaapProxyStatistics(), - "tencentcloud_gaap_real_servers_status": dataSourceTencentCloudGaapRealServersStatus(), + "tencentcloud_gaap_access_regions": dataSourceTencentCloudGaapAccessRegions(), + "tencentcloud_gaap_access_regions_by_dest_region": dataSourceTencentCloudGaapAccessRegionsByDestRegion(), + "tencentcloud_gaap_black_header": dataSourceTencentCloudGaapBlackHeader(), + "tencentcloud_gaap_country_area_mapping": dataSourceTencentCloudGaapCountryAreaMapping(), + "tencentcloud_gaap_custom_header": dataSourceTencentCloudGaapCustomHeader(), + "tencentcloud_gaap_dest_regions": dataSourceTencentCloudGaapDestRegions(), + "tencentcloud_gaap_proxy_detail": dataSourceTencentCloudGaapProxyDetail(), + "tencentcloud_gaap_proxy_groups": dataSourceTencentCloudGaapProxyGroups(), + "tencentcloud_gaap_proxy_group_statistics": dataSourceTencentCloudGaapProxyGroupStatistics(), + "tencentcloud_gaap_proxy_statistics": dataSourceTencentCloudGaapProxyStatistics(), + "tencentcloud_gaap_real_servers_status": dataSourceTencentCloudGaapRealServersStatus(), "tencentcloud_ssl_certificates": dataSourceTencentCloudSslCertificates(), "tencentcloud_ssl_describe_certificate": dataSourceTencentCloudSslDescribeCertificate(), "tencentcloud_ssl_describe_companies": dataSourceTencentCloudSslDescribeCompanies(), @@ -2250,16 +2250,16 @@ func Provider() *schema.Provider { "tencentcloud_kms_keys": dataSourceTencentCloudKmsKeys(), "tencentcloud_kms_public_key": dataSourceTencentCloudKmsPublicKey(), "tencentcloud_kms_get_parameters_for_import": dataSourceTencentCloudKmsGetParametersForImport(), - "tencentcloud_kms_describe_keys": dataSourceTencentCloudKmsDescribeKeys(), - "tencentcloud_kms_white_box_key_details": dataSourceTencentCloudKmsWhiteBoxKeyDetails(), - "tencentcloud_kms_list_keys": dataSourceTencentCloudKmsListKeys(), + "tencentcloud_kms_describe_keys": dataSourceTencentCloudKmsDescribeKeys(), + "tencentcloud_kms_white_box_key_details": dataSourceTencentCloudKmsWhiteBoxKeyDetails(), + "tencentcloud_kms_list_keys": dataSourceTencentCloudKmsListKeys(), "tencentcloud_ssm_products": dataSourceTencentCloudSsmProducts(), "tencentcloud_ssm_secrets": dataSourceTencentCloudSsmSecrets(), "tencentcloud_ssm_secret_versions": dataSourceTencentCloudSsmSecretVersions(), - "tencentcloud_ssm_rotation_detail": dataSourceTencentCloudSsmRotationDetail(), - "tencentcloud_ssm_rotation_history": dataSourceTencentCloudSsmRotationHistory(), - "tencentcloud_ssm_service_status": dataSourceTencentCloudSsmServiceStatus(), - "tencentcloud_ssm_ssh_key_pair_value": dataSourceTencentCloudSsmSshKeyPairValue(), + "tencentcloud_ssm_rotation_detail": dataSourceTencentCloudSsmRotationDetail(), + "tencentcloud_ssm_rotation_history": dataSourceTencentCloudSsmRotationHistory(), + "tencentcloud_ssm_service_status": dataSourceTencentCloudSsmServiceStatus(), + "tencentcloud_ssm_ssh_key_pair_value": dataSourceTencentCloudSsmSshKeyPairValue(), "tencentcloud_cdh_instances": dataSourceTencentCloudCdhInstances(), "tencentcloud_dayu_eip": dataSourceTencentCloudDayuEip(), "tencentcloud_teo_zone_available_plans": dataSourceTencentCloudTeoZoneAvailablePlans(), @@ -2304,12 +2304,12 @@ func Provider() *schema.Provider { "tencentcloud_mariadb_sale_info": dataSourceTencentCloudMariadbSaleInfo(), "tencentcloud_mariadb_slow_logs": dataSourceTencentCloudMariadbSlowLogs(), "tencentcloud_mariadb_upgrade_price": dataSourceTencentCloudMariadbUpgradePrice(), - "tencentcloud_mps_schedules": dataSourceTencentCloudMpsSchedules(), + "tencentcloud_mps_schedules": dataSourceTencentCloudMpsSchedules(), "tencentcloud_tdcpg_clusters": dataSourceTencentCloudTdcpgClusters(), "tencentcloud_tdcpg_instances": dataSourceTencentCloudTdcpgInstances(), "tencentcloud_cat_probe_data": dataSourceTencentCloudCatProbeData(), "tencentcloud_cat_node": dataSourceTencentCloudCatNode(), - "tencentcloud_cat_metric_data": dataSourceTencentCloudCatMetricData(), + "tencentcloud_cat_metric_data": dataSourceTencentCloudCatMetricData(), "tencentcloud_rum_project": dataSourceTencentCloudRumProject(), "tencentcloud_rum_offline_log_config": dataSourceTencentCloudRumOfflineLogConfig(), "tencentcloud_rum_whitelist": dataSourceTencentCloudRumWhitelist(), @@ -2464,10 +2464,10 @@ func Provider() *schema.Provider { "tencentcloud_eb_search": dataSourceTencentCloudEbSearch(), "tencentcloud_eb_bus": dataSourceTencentCloudEbBus(), "tencentcloud_eb_event_rules": dataSourceTencentCloudEbEventRules(), - "tencentcloud_eb_platform_event_names": dataSourceTencentCloudEbPlatformEventNames(), - "tencentcloud_eb_platform_event_patterns": dataSourceTencentCloudEbPlatformEventPatterns(), - "tencentcloud_eb_platform_products": dataSourceTencentCloudEbPlatformProducts(), - "tencentcloud_eb_plateform_event_template": dataSourceTencentCloudEbPlateformEventTemplate(), + "tencentcloud_eb_platform_event_names": dataSourceTencentCloudEbPlatformEventNames(), + "tencentcloud_eb_platform_event_patterns": dataSourceTencentCloudEbPlatformEventPatterns(), + "tencentcloud_eb_platform_products": dataSourceTencentCloudEbPlatformProducts(), + "tencentcloud_eb_plateform_event_template": dataSourceTencentCloudEbPlateformEventTemplate(), "tencentcloud_wedata_rule_templates": dataSourceTencentCloudWedataRuleTemplates(), "tencentcloud_private_dns_records": dataSourceTencentCloudPrivateDnsRecords(), "tencentcloud_waf_ciphers": dataSourceTencentCloudWafCiphers(), @@ -2486,7 +2486,7 @@ func Provider() *schema.Provider { "tencentcloud_cfw_nat_fw_switches": dataSourceTencentCloudCfwNatFwSwitches(), "tencentcloud_cfw_vpc_fw_switches": dataSourceTencentCloudCfwVpcFwSwitches(), "tencentcloud_cfw_edge_fw_switches": dataSourceTencentCloudCfwEdgeFwSwitches(), - "tencentcloud_cwp_machines_simple": dataSourceTencentCloudCwpMachinesSimple(), + "tencentcloud_cwp_machines_simple": dataSourceTencentCloudCwpMachinesSimple(), "tencentcloud_ses_receivers": dataSourceTencentCloudSesReceivers(), "tencentcloud_ses_send_tasks": dataSourceTencentCloudSesSendTasks(), "tencentcloud_ses_email_identities": dataSourceTencentCloudSesEmailIdentities(), From 2d628ade65bbda2bfc38b85111e05c30dc65a09e Mon Sep 17 00:00:00 2001 From: WeiMengXS Date: Wed, 11 Oct 2023 19:20:51 +0800 Subject: [PATCH 8/9] fix: fmt --- tencentcloud/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 56ad3042dd..7d4797fd89 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -2494,7 +2494,7 @@ func Provider() *schema.Provider { "tencentcloud_ses_statistics_report": dataSourceTencentCloudSesStatisticsReport(), "tencentcloud_ses_send_email_status": dataSourceTencentCloudSesSendEmailStatus(), "tencentcloud_organization_org_financial_by_member": dataSourceTencentCloudOrganizationOrgFinancialByMember(), - "tencentcloud_organization_org_auth_node": dataSourceTencentCloudOrganizationOrgAuthNode(), + "tencentcloud_organization_org_auth_node": dataSourceTencentCloudOrganizationOrgAuthNode(), }, ResourcesMap: map[string]*schema.Resource{ From 03f39a01bee7e40918eb9b53630e16c2a6c8dd13 Mon Sep 17 00:00:00 2001 From: WeiMengXS Date: Wed, 11 Oct 2023 19:38:12 +0800 Subject: [PATCH 9/9] fix: fmt --- tencentcloud/provider.go | 822 +++++++++++++++++++-------------------- 1 file changed, 411 insertions(+), 411 deletions(-) diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 7d4797fd89..0d35ebac6c 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -1896,193 +1896,193 @@ func Provider() *schema.Provider { }, DataSourcesMap: map[string]*schema.Resource{ - "tencentcloud_availability_regions": dataSourceTencentCloudAvailabilityRegions(), - "tencentcloud_emr": dataSourceTencentCloudEmr(), - "tencentcloud_emr_nodes": dataSourceTencentCloudEmrNodes(), - "tencentcloud_availability_zones": dataSourceTencentCloudAvailabilityZones(), - "tencentcloud_availability_zones_by_product": dataSourceTencentCloudAvailabilityZonesByProduct(), - "tencentcloud_projects": dataSourceTencentCloudProjects(), - "tencentcloud_instances": dataSourceTencentCloudInstances(), - "tencentcloud_instances_set": dataSourceTencentCloudInstancesSet(), - "tencentcloud_reserved_instances": dataSourceTencentCloudReservedInstances(), - "tencentcloud_placement_groups": dataSourceTencentCloudPlacementGroups(), - "tencentcloud_key_pairs": dataSourceTencentCloudKeyPairs(), - "tencentcloud_image": dataSourceTencentCloudImage(), - "tencentcloud_images": dataSourceTencentCloudImages(), - "tencentcloud_instance_types": dataSourceInstanceTypes(), - "tencentcloud_reserved_instance_configs": dataSourceTencentCloudReservedInstanceConfigs(), - "tencentcloud_vpc_instances": dataSourceTencentCloudVpcInstances(), - "tencentcloud_vpc_subnets": dataSourceTencentCloudVpcSubnets(), - "tencentcloud_vpc_route_tables": dataSourceTencentCloudVpcRouteTables(), - "tencentcloud_vpc": dataSourceTencentCloudVpc(), - "tencentcloud_vpc_acls": dataSourceTencentCloudVpcAcls(), - "tencentcloud_vpc_bandwidth_package_quota": dataSourceTencentCloudVpcBandwidthPackageQuota(), - "tencentcloud_vpc_bandwidth_package_bill_usage": dataSourceTencentCloudVpcBandwidthPackageBillUsage(), - "tencentcloud_vpc_account_attributes": dataSourceTencentCloudVpcAccountAttributes(), - "tencentcloud_vpc_classic_link_instances": dataSourceTencentCloudVpcClassicLinkInstances(), - "tencentcloud_vpc_gateway_flow_monitor_detail": dataSourceTencentCloudVpcGatewayFlowMonitorDetail(), - "tencentcloud_vpc_gateway_flow_qos": dataSourceTencentCloudVpcGatewayFlowQos(), - "tencentcloud_vpc_cvm_instances": dataSourceTencentCloudVpcCvmInstances(), - "tencentcloud_vpc_net_detect_states": dataSourceTencentCloudVpcNetDetectStates(), - "tencentcloud_vpc_network_interface_limit": dataSourceTencentCloudVpcNetworkInterfaceLimit(), - "tencentcloud_vpc_private_ip_addresses": dataSourceTencentCloudVpcPrivateIpAddresses(), - "tencentcloud_vpc_product_quota": dataSourceTencentCloudVpcProductQuota(), - "tencentcloud_vpc_resource_dashboard": dataSourceTencentCloudVpcResourceDashboard(), - "tencentcloud_vpc_route_conflicts": dataSourceTencentCloudVpcRouteConflicts(), - "tencentcloud_vpc_security_group_limits": dataSourceTencentCloudVpcSecurityGroupLimits(), - "tencentcloud_vpc_security_group_references": dataSourceTencentCloudVpcSecurityGroupReferences(), - "tencentcloud_vpc_sg_snapshot_file_content": dataSourceTencentCloudVpcSgSnapshotFileContent(), - "tencentcloud_vpc_snapshot_files": dataSourceTencentCloudVpcSnapshotFiles(), - "tencentcloud_vpc_subnet_resource_dashboard": dataSourceTencentCloudVpcSubnetResourceDashboard(), - "tencentcloud_vpc_template_limits": dataSourceTencentCloudVpcTemplateLimits(), - "tencentcloud_vpc_limits": dataSourceTencentCloudVpcLimits(), - "tencentcloud_vpc_used_ip_address": dataSourceTencentCloudVpcUsedIpAddress(), - "tencentcloud_vpc_net_detect_state_check": dataSourceTencentCloudVpcNetDetectStateCheck(), - "tencentcloud_subnet": dataSourceTencentCloudSubnet(), - "tencentcloud_route_table": dataSourceTencentCloudRouteTable(), - "tencentcloud_domains": dataSourceTencentCloudDomains(), - "tencentcloud_eip": dataSourceTencentCloudEip(), - "tencentcloud_eips": dataSourceTencentCloudEips(), - "tencentcloud_eip_address_quota": dataSourceTencentCloudEipAddressQuota(), - "tencentcloud_eip_network_account_type": dataSourceTencentCloudEipNetworkAccountType(), - "tencentcloud_enis": dataSourceTencentCloudEnis(), - "tencentcloud_nats": dataSourceTencentCloudNats(), - "tencentcloud_dnats": dataSourceTencentCloudDnats(), - "tencentcloud_nat_gateways": dataSourceTencentCloudNatGateways(), - "tencentcloud_nat_gateway_snats": dataSourceTencentCloudNatGatewaySnats(), - "tencentcloud_nat_dc_route": dataSourceTencentCloudNatDcRoute(), - "tencentcloud_vpn_customer_gateways": dataSourceTencentCloudVpnCustomerGateways(), - "tencentcloud_vpn_gateways": dataSourceTencentCloudVpnGateways(), - "tencentcloud_vpn_gateway_routes": dataSourceTencentCloudVpnGatewayRoutes(), - "tencentcloud_vpn_connections": dataSourceTencentCloudVpnConnections(), - "tencentcloud_vpn_customer_gateway_vendors": dataSourceTencentCloudVpnCustomerGatewayVendors(), - "tencentcloud_vpn_default_health_check_ip": dataSourceTencentCloudVpnDefaultHealthCheckIp(), - "tencentcloud_ha_vips": dataSourceTencentCloudHaVips(), - "tencentcloud_ha_vip_eip_attachments": dataSourceTencentCloudHaVipEipAttachments(), - "tencentcloud_ccn_instances": dataSourceTencentCloudCcnInstances(), - "tencentcloud_ccn_bandwidth_limits": dataSourceTencentCloudCcnBandwidthLimits(), - "tencentcloud_ccn_cross_border_compliance": dataSourceTencentCloudCcnCrossBorderCompliance(), - "tencentcloud_ccn_tenant_instances": dataSourceTencentCloudCcnTenantInstance(), - "tencentcloud_ccn_cross_border_flow_monitor": dataSourceTencentCloudCcnCrossBorderFlowMonitor(), - "tencentcloud_ccn_cross_border_region_bandwidth_limits": dataSourceTencentCloudCcnCrossBorderRegionBandwidthLimits(), - "tencentcloud_dc_instances": dataSourceTencentCloudDcInstances(), - "tencentcloud_dc_access_points": dataSourceTencentCloudDcAccessPoints(), - "tencentcloud_dc_internet_address_quota": dataSourceTencentCloudDcInternetAddressQuota(), - "tencentcloud_dc_internet_address_statistics": dataSourceTencentCloudDcInternetAddressStatistics(), - "tencentcloud_dc_public_direct_connect_tunnel_routes": dataSourceTencentCloudDcPublicDirectConnectTunnelRoutes(), - "tencentcloud_dcx_instances": dataSourceTencentCloudDcxInstances(), - "tencentcloud_dc_gateway_instances": dataSourceTencentCloudDcGatewayInstances(), - "tencentcloud_dc_gateway_ccn_routes": dataSourceTencentCloudDcGatewayCCNRoutes(), - "tencentcloud_security_group": dataSourceTencentCloudSecurityGroup(), - "tencentcloud_security_groups": dataSourceTencentCloudSecurityGroups(), - "tencentcloud_kubernetes_clusters": dataSourceTencentCloudKubernetesClusters(), - "tencentcloud_kubernetes_charts": dataSourceTencentCloudKubernetesCharts(), - "tencentcloud_kubernetes_cluster_levels": datasourceTencentCloudKubernetesClusterLevels(), - "tencentcloud_kubernetes_cluster_common_names": datasourceTencentCloudKubernetesClusterCommonNames(), - "tencentcloud_kubernetes_cluster_authentication_options": dataSourceTencentCloudKubernetesClusterAuthenticationOptions(), - "tencentcloud_kubernetes_available_cluster_versions": dataSourceTencentCloudKubernetesAvailableClusterVersions(), - "tencentcloud_eks_clusters": dataSourceTencentCloudEKSClusters(), - "tencentcloud_eks_cluster_credential": datasourceTencentCloudEksClusterCredential(), - "tencentcloud_container_clusters": dataSourceTencentCloudContainerClusters(), - "tencentcloud_container_cluster_instances": dataSourceTencentCloudContainerClusterInstances(), - "tencentcloud_mysql_backup_list": dataSourceTencentMysqlBackupList(), - "tencentcloud_mysql_zone_config": dataSourceTencentMysqlZoneConfig(), - "tencentcloud_mysql_parameter_list": dataSourceTencentCloudMysqlParameterList(), - "tencentcloud_mysql_default_params": datasourceTencentCloudMysqlDefaultParams(), - "tencentcloud_mysql_instance": dataSourceTencentCloudMysqlInstance(), - "tencentcloud_mysql_backup_overview": dataSourceTencentCloudMysqlBackupOverview(), - "tencentcloud_mysql_backup_summaries": dataSourceTencentCloudMysqlBackupSummaries(), - "tencentcloud_mysql_bin_log": dataSourceTencentCloudMysqlBinLog(), - "tencentcloud_mysql_binlog_backup_overview": dataSourceTencentCloudMysqlBinlogBackupOverview(), - "tencentcloud_mysql_clone_list": dataSourceTencentCloudMysqlCloneList(), - "tencentcloud_mysql_data_backup_overview": dataSourceTencentCloudMysqlDataBackupOverview(), - "tencentcloud_mysql_db_features": dataSourceTencentCloudMysqlDbFeatures(), - "tencentcloud_mysql_inst_tables": dataSourceTencentCloudMysqlInstTables(), - "tencentcloud_mysql_instance_charset": dataSourceTencentCloudMysqlInstanceCharset(), - "tencentcloud_mysql_instance_info": dataSourceTencentCloudMysqlInstanceInfo(), - "tencentcloud_mysql_instance_param_record": dataSourceTencentCloudMysqlInstanceParamRecord(), - "tencentcloud_mysql_instance_reboot_time": dataSourceTencentCloudMysqlInstanceRebootTime(), - "tencentcloud_mysql_proxy_custom": dataSourceTencentCloudMysqlProxyCustom(), - "tencentcloud_mysql_rollback_range_time": dataSourceTencentCloudMysqlRollbackRangeTime(), - "tencentcloud_mysql_slow_log": dataSourceTencentCloudMysqlSlowLog(), - "tencentcloud_mysql_slow_log_data": dataSourceTencentCloudMysqlSlowLogData(), - "tencentcloud_mysql_supported_privileges": dataSourceTencentCloudMysqlSupportedPrivileges(), - "tencentcloud_mysql_switch_record": dataSourceTencentCloudMysqlSwitchRecord(), - "tencentcloud_mysql_user_task": dataSourceTencentCloudMysqlUserTask(), - "tencentcloud_mysql_databases": dataSourceTencentCloudMysqlDatabases(), - "tencentcloud_mysql_error_log": dataSourceTencentCloudMysqlErrorLog(), - "tencentcloud_mysql_project_security_group": dataSourceTencentCloudMysqlProjectSecurityGroup(), - "tencentcloud_mysql_ro_min_scale": dataSourceTencentCloudMysqlRoMinScale(), - "tencentcloud_cos_bucket_object": dataSourceTencentCloudCosBucketObject(), - "tencentcloud_cos_buckets": dataSourceTencentCloudCosBuckets(), - "tencentcloud_cos_batchs": dataSourceTencentCloudCosBatchs(), - "tencentcloud_cos_bucket_inventorys": dataSourceTencentCloudCosBucketInventorys(), - "tencentcloud_cos_bucket_multipart_uploads": dataSourceTencentCloudCosBucketMultipartUploads(), - "tencentcloud_cfs_file_systems": dataSourceTencentCloudCfsFileSystems(), - "tencentcloud_cfs_access_groups": dataSourceTencentCloudCfsAccessGroups(), - "tencentcloud_cfs_access_rules": dataSourceTencentCloudCfsAccessRules(), - "tencentcloud_cfs_mount_targets": dataSourceTencentCloudCfsMountTargets(), - "tencentcloud_cfs_file_system_clients": dataSourceTencentCloudCfsFileSystemClients(), - "tencentcloud_cfs_available_zone": dataSourceTencentCloudCfsAvailableZone(), - "tencentcloud_redis_zone_config": dataSourceTencentRedisZoneConfig(), - "tencentcloud_redis_instances": dataSourceTencentRedisInstances(), - "tencentcloud_redis_backup": dataSourceTencentCloudRedisBackup(), - "tencentcloud_redis_backup_download_info": dataSourceTencentCloudRedisBackupDownloadInfo(), - "tencentcloud_redis_param_records": dataSourceTencentCloudRedisRecordsParam(), - "tencentcloud_redis_instance_shards": dataSourceTencentCloudRedisInstanceShards(), - "tencentcloud_redis_instance_zone_info": dataSourceTencentCloudRedisInstanceZoneInfo(), - "tencentcloud_redis_instance_task_list": dataSourceTencentCloudRedisInstanceTaskList(), - "tencentcloud_redis_instance_node_info": dataSourceTencentCloudRedisInstanceNodeInfo(), - "tencentcloud_as_scaling_configs": dataSourceTencentCloudAsScalingConfigs(), - "tencentcloud_as_scaling_groups": dataSourceTencentCloudAsScalingGroups(), - "tencentcloud_as_scaling_policies": dataSourceTencentCloudAsScalingPolicies(), - "tencentcloud_cbs_storages": dataSourceTencentCloudCbsStorages(), - "tencentcloud_cbs_storages_set": dataSourceTencentCloudCbsStoragesSet(), - "tencentcloud_cbs_snapshots": dataSourceTencentCloudCbsSnapshots(), - "tencentcloud_cbs_snapshot_policies": dataSourceTencentCloudCbsSnapshotPolicies(), - "tencentcloud_clb_instances": dataSourceTencentCloudClbInstances(), - "tencentcloud_clb_listeners": dataSourceTencentCloudClbListeners(), - "tencentcloud_clb_listener_rules": dataSourceTencentCloudClbListenerRules(), - "tencentcloud_clb_attachments": dataSourceTencentCloudClbServerAttachments(), - "tencentcloud_clb_redirections": dataSourceTencentCloudClbRedirections(), - "tencentcloud_clb_target_groups": dataSourceTencentCloudClbTargetGroups(), - "tencentcloud_clb_cluster_resources": dataSourceTencentCloudClbClusterResources(), - "tencentcloud_clb_cross_targets": dataSourceTencentCloudClbCrossTargets(), - "tencentcloud_clb_exclusive_clusters": dataSourceTencentCloudClbExclusiveClusters(), - "tencentcloud_clb_idle_instances": dataSourceTencentCloudClbIdleInstances(), - "tencentcloud_clb_listeners_by_targets": dataSourceTencentCloudClbListenersByTargets(), - "tencentcloud_clb_instance_by_cert_id": dataSourceTencentCloudClbInstanceByCertId(), - "tencentcloud_clb_instance_traffic": dataSourceTencentCloudClbInstanceTraffic(), - "tencentcloud_clb_instance_detail": dataSourceTencentCloudClbInstanceDetail(), - "tencentcloud_clb_resources": dataSourceTencentCloudClbResources(), - "tencentcloud_clb_target_group_list": dataSourceTencentCloudClbTargetGroupList(), - "tencentcloud_clb_target_health": dataSourceTencentCloudClbTargetHealth(), - "tencentcloud_mongodb_zone_config": dataSourceTencentCloudMongodbZoneConfig(), - "tencentcloud_mongodb_instances": dataSourceTencentCloudMongodbInstances(), - "tencentcloud_mongodb_instance_backups": dataSourceTencentCloudMongodbInstanceBackups(), - "tencentcloud_mongodb_instance_connections": dataSourceTencentCloudMongodbInstanceConnections(), - "tencentcloud_mongodb_instance_current_op": dataSourceTencentCloudMongodbInstanceCurrentOp(), - "tencentcloud_mongodb_instance_params": dataSourceTencentCloudMongodbInstanceParams(), - "tencentcloud_mongodb_instance_slow_log": dataSourceTencentCloudMongodbInstanceSlowLog(), - "tencentcloud_dayu_cc_https_policies": dataSourceTencentCloudDayuCCHttpsPolicies(), - "tencentcloud_dayu_cc_http_policies": dataSourceTencentCloudDayuCCHttpPolicies(), - "tencentcloud_dayu_ddos_policies": dataSourceTencentCloudDayuDdosPolicies(), - "tencentcloud_dayu_ddos_policy_cases": dataSourceTencentCloudDayuDdosPolicyCases(), - "tencentcloud_dayu_ddos_policy_attachments": dataSourceTencentCloudDayuDdosPolicyAttachments(), - "tencentcloud_dayu_l4_rules": dataSourceTencentCloudDayuL4Rules(), - "tencentcloud_dayu_l4_rules_v2": dataSourceTencentCloudDayuL4RulesV2(), - "tencentcloud_dayu_l7_rules": dataSourceTencentCloudDayuL7Rules(), - "tencentcloud_dayu_l7_rules_v2": dataSourceTencentCloudDayuL7RulesV2(), - "tencentcloud_gaap_proxies": dataSourceTencentCloudGaapProxies(), - "tencentcloud_gaap_realservers": dataSourceTencentCloudGaapRealservers(), - "tencentcloud_gaap_layer4_listeners": dataSourceTencentCloudGaapLayer4Listeners(), - "tencentcloud_gaap_layer7_listeners": dataSourceTencentCloudGaapLayer7Listeners(), - "tencentcloud_gaap_http_domains": dataSourceTencentCloudGaapHttpDomains(), - "tencentcloud_gaap_http_rules": dataSourceTencentCloudGaapHttpRules(), - "tencentcloud_gaap_security_policies": dataSourceTencentCloudGaapSecurityPolices(), - "tencentcloud_gaap_security_rules": dataSourceTencentCloudGaapSecurityRules(), - "tencentcloud_gaap_certificates": dataSourceTencentCloudGaapCertificates(), - "tencentcloud_gaap_domain_error_pages": dataSourceTencentCloudGaapDomainErrorPageInfoList(), + "tencentcloud_availability_regions": dataSourceTencentCloudAvailabilityRegions(), + "tencentcloud_emr": dataSourceTencentCloudEmr(), + "tencentcloud_emr_nodes": dataSourceTencentCloudEmrNodes(), + "tencentcloud_availability_zones": dataSourceTencentCloudAvailabilityZones(), + "tencentcloud_availability_zones_by_product": dataSourceTencentCloudAvailabilityZonesByProduct(), + "tencentcloud_projects": dataSourceTencentCloudProjects(), + "tencentcloud_instances": dataSourceTencentCloudInstances(), + "tencentcloud_instances_set": dataSourceTencentCloudInstancesSet(), + "tencentcloud_reserved_instances": dataSourceTencentCloudReservedInstances(), + "tencentcloud_placement_groups": dataSourceTencentCloudPlacementGroups(), + "tencentcloud_key_pairs": dataSourceTencentCloudKeyPairs(), + "tencentcloud_image": dataSourceTencentCloudImage(), + "tencentcloud_images": dataSourceTencentCloudImages(), + "tencentcloud_instance_types": dataSourceInstanceTypes(), + "tencentcloud_reserved_instance_configs": dataSourceTencentCloudReservedInstanceConfigs(), + "tencentcloud_vpc_instances": dataSourceTencentCloudVpcInstances(), + "tencentcloud_vpc_subnets": dataSourceTencentCloudVpcSubnets(), + "tencentcloud_vpc_route_tables": dataSourceTencentCloudVpcRouteTables(), + "tencentcloud_vpc": dataSourceTencentCloudVpc(), + "tencentcloud_vpc_acls": dataSourceTencentCloudVpcAcls(), + "tencentcloud_vpc_bandwidth_package_quota": dataSourceTencentCloudVpcBandwidthPackageQuota(), + "tencentcloud_vpc_bandwidth_package_bill_usage": dataSourceTencentCloudVpcBandwidthPackageBillUsage(), + "tencentcloud_vpc_account_attributes": dataSourceTencentCloudVpcAccountAttributes(), + "tencentcloud_vpc_classic_link_instances": dataSourceTencentCloudVpcClassicLinkInstances(), + "tencentcloud_vpc_gateway_flow_monitor_detail": dataSourceTencentCloudVpcGatewayFlowMonitorDetail(), + "tencentcloud_vpc_gateway_flow_qos": dataSourceTencentCloudVpcGatewayFlowQos(), + "tencentcloud_vpc_cvm_instances": dataSourceTencentCloudVpcCvmInstances(), + "tencentcloud_vpc_net_detect_states": dataSourceTencentCloudVpcNetDetectStates(), + "tencentcloud_vpc_network_interface_limit": dataSourceTencentCloudVpcNetworkInterfaceLimit(), + "tencentcloud_vpc_private_ip_addresses": dataSourceTencentCloudVpcPrivateIpAddresses(), + "tencentcloud_vpc_product_quota": dataSourceTencentCloudVpcProductQuota(), + "tencentcloud_vpc_resource_dashboard": dataSourceTencentCloudVpcResourceDashboard(), + "tencentcloud_vpc_route_conflicts": dataSourceTencentCloudVpcRouteConflicts(), + "tencentcloud_vpc_security_group_limits": dataSourceTencentCloudVpcSecurityGroupLimits(), + "tencentcloud_vpc_security_group_references": dataSourceTencentCloudVpcSecurityGroupReferences(), + "tencentcloud_vpc_sg_snapshot_file_content": dataSourceTencentCloudVpcSgSnapshotFileContent(), + "tencentcloud_vpc_snapshot_files": dataSourceTencentCloudVpcSnapshotFiles(), + "tencentcloud_vpc_subnet_resource_dashboard": dataSourceTencentCloudVpcSubnetResourceDashboard(), + "tencentcloud_vpc_template_limits": dataSourceTencentCloudVpcTemplateLimits(), + "tencentcloud_vpc_limits": dataSourceTencentCloudVpcLimits(), + "tencentcloud_vpc_used_ip_address": dataSourceTencentCloudVpcUsedIpAddress(), + "tencentcloud_vpc_net_detect_state_check": dataSourceTencentCloudVpcNetDetectStateCheck(), + "tencentcloud_subnet": dataSourceTencentCloudSubnet(), + "tencentcloud_route_table": dataSourceTencentCloudRouteTable(), + "tencentcloud_domains": dataSourceTencentCloudDomains(), + "tencentcloud_eip": dataSourceTencentCloudEip(), + "tencentcloud_eips": dataSourceTencentCloudEips(), + "tencentcloud_eip_address_quota": dataSourceTencentCloudEipAddressQuota(), + "tencentcloud_eip_network_account_type": dataSourceTencentCloudEipNetworkAccountType(), + "tencentcloud_enis": dataSourceTencentCloudEnis(), + "tencentcloud_nats": dataSourceTencentCloudNats(), + "tencentcloud_dnats": dataSourceTencentCloudDnats(), + "tencentcloud_nat_gateways": dataSourceTencentCloudNatGateways(), + "tencentcloud_nat_gateway_snats": dataSourceTencentCloudNatGatewaySnats(), + "tencentcloud_nat_dc_route": dataSourceTencentCloudNatDcRoute(), + "tencentcloud_vpn_customer_gateways": dataSourceTencentCloudVpnCustomerGateways(), + "tencentcloud_vpn_gateways": dataSourceTencentCloudVpnGateways(), + "tencentcloud_vpn_gateway_routes": dataSourceTencentCloudVpnGatewayRoutes(), + "tencentcloud_vpn_connections": dataSourceTencentCloudVpnConnections(), + "tencentcloud_vpn_customer_gateway_vendors": dataSourceTencentCloudVpnCustomerGatewayVendors(), + "tencentcloud_vpn_default_health_check_ip": dataSourceTencentCloudVpnDefaultHealthCheckIp(), + "tencentcloud_ha_vips": dataSourceTencentCloudHaVips(), + "tencentcloud_ha_vip_eip_attachments": dataSourceTencentCloudHaVipEipAttachments(), + "tencentcloud_ccn_instances": dataSourceTencentCloudCcnInstances(), + "tencentcloud_ccn_bandwidth_limits": dataSourceTencentCloudCcnBandwidthLimits(), + "tencentcloud_ccn_cross_border_compliance": dataSourceTencentCloudCcnCrossBorderCompliance(), + "tencentcloud_ccn_tenant_instances": dataSourceTencentCloudCcnTenantInstance(), + "tencentcloud_ccn_cross_border_flow_monitor": dataSourceTencentCloudCcnCrossBorderFlowMonitor(), + "tencentcloud_ccn_cross_border_region_bandwidth_limits": dataSourceTencentCloudCcnCrossBorderRegionBandwidthLimits(), + "tencentcloud_dc_instances": dataSourceTencentCloudDcInstances(), + "tencentcloud_dc_access_points": dataSourceTencentCloudDcAccessPoints(), + "tencentcloud_dc_internet_address_quota": dataSourceTencentCloudDcInternetAddressQuota(), + "tencentcloud_dc_internet_address_statistics": dataSourceTencentCloudDcInternetAddressStatistics(), + "tencentcloud_dc_public_direct_connect_tunnel_routes": dataSourceTencentCloudDcPublicDirectConnectTunnelRoutes(), + "tencentcloud_dcx_instances": dataSourceTencentCloudDcxInstances(), + "tencentcloud_dc_gateway_instances": dataSourceTencentCloudDcGatewayInstances(), + "tencentcloud_dc_gateway_ccn_routes": dataSourceTencentCloudDcGatewayCCNRoutes(), + "tencentcloud_security_group": dataSourceTencentCloudSecurityGroup(), + "tencentcloud_security_groups": dataSourceTencentCloudSecurityGroups(), + "tencentcloud_kubernetes_clusters": dataSourceTencentCloudKubernetesClusters(), + "tencentcloud_kubernetes_charts": dataSourceTencentCloudKubernetesCharts(), + "tencentcloud_kubernetes_cluster_levels": datasourceTencentCloudKubernetesClusterLevels(), + "tencentcloud_kubernetes_cluster_common_names": datasourceTencentCloudKubernetesClusterCommonNames(), + "tencentcloud_kubernetes_cluster_authentication_options": dataSourceTencentCloudKubernetesClusterAuthenticationOptions(), + "tencentcloud_kubernetes_available_cluster_versions": dataSourceTencentCloudKubernetesAvailableClusterVersions(), + "tencentcloud_eks_clusters": dataSourceTencentCloudEKSClusters(), + "tencentcloud_eks_cluster_credential": datasourceTencentCloudEksClusterCredential(), + "tencentcloud_container_clusters": dataSourceTencentCloudContainerClusters(), + "tencentcloud_container_cluster_instances": dataSourceTencentCloudContainerClusterInstances(), + "tencentcloud_mysql_backup_list": dataSourceTencentMysqlBackupList(), + "tencentcloud_mysql_zone_config": dataSourceTencentMysqlZoneConfig(), + "tencentcloud_mysql_parameter_list": dataSourceTencentCloudMysqlParameterList(), + "tencentcloud_mysql_default_params": datasourceTencentCloudMysqlDefaultParams(), + "tencentcloud_mysql_instance": dataSourceTencentCloudMysqlInstance(), + "tencentcloud_mysql_backup_overview": dataSourceTencentCloudMysqlBackupOverview(), + "tencentcloud_mysql_backup_summaries": dataSourceTencentCloudMysqlBackupSummaries(), + "tencentcloud_mysql_bin_log": dataSourceTencentCloudMysqlBinLog(), + "tencentcloud_mysql_binlog_backup_overview": dataSourceTencentCloudMysqlBinlogBackupOverview(), + "tencentcloud_mysql_clone_list": dataSourceTencentCloudMysqlCloneList(), + "tencentcloud_mysql_data_backup_overview": dataSourceTencentCloudMysqlDataBackupOverview(), + "tencentcloud_mysql_db_features": dataSourceTencentCloudMysqlDbFeatures(), + "tencentcloud_mysql_inst_tables": dataSourceTencentCloudMysqlInstTables(), + "tencentcloud_mysql_instance_charset": dataSourceTencentCloudMysqlInstanceCharset(), + "tencentcloud_mysql_instance_info": dataSourceTencentCloudMysqlInstanceInfo(), + "tencentcloud_mysql_instance_param_record": dataSourceTencentCloudMysqlInstanceParamRecord(), + "tencentcloud_mysql_instance_reboot_time": dataSourceTencentCloudMysqlInstanceRebootTime(), + "tencentcloud_mysql_proxy_custom": dataSourceTencentCloudMysqlProxyCustom(), + "tencentcloud_mysql_rollback_range_time": dataSourceTencentCloudMysqlRollbackRangeTime(), + "tencentcloud_mysql_slow_log": dataSourceTencentCloudMysqlSlowLog(), + "tencentcloud_mysql_slow_log_data": dataSourceTencentCloudMysqlSlowLogData(), + "tencentcloud_mysql_supported_privileges": dataSourceTencentCloudMysqlSupportedPrivileges(), + "tencentcloud_mysql_switch_record": dataSourceTencentCloudMysqlSwitchRecord(), + "tencentcloud_mysql_user_task": dataSourceTencentCloudMysqlUserTask(), + "tencentcloud_mysql_databases": dataSourceTencentCloudMysqlDatabases(), + "tencentcloud_mysql_error_log": dataSourceTencentCloudMysqlErrorLog(), + "tencentcloud_mysql_project_security_group": dataSourceTencentCloudMysqlProjectSecurityGroup(), + "tencentcloud_mysql_ro_min_scale": dataSourceTencentCloudMysqlRoMinScale(), + "tencentcloud_cos_bucket_object": dataSourceTencentCloudCosBucketObject(), + "tencentcloud_cos_buckets": dataSourceTencentCloudCosBuckets(), + "tencentcloud_cos_batchs": dataSourceTencentCloudCosBatchs(), + "tencentcloud_cos_bucket_inventorys": dataSourceTencentCloudCosBucketInventorys(), + "tencentcloud_cos_bucket_multipart_uploads": dataSourceTencentCloudCosBucketMultipartUploads(), + "tencentcloud_cfs_file_systems": dataSourceTencentCloudCfsFileSystems(), + "tencentcloud_cfs_access_groups": dataSourceTencentCloudCfsAccessGroups(), + "tencentcloud_cfs_access_rules": dataSourceTencentCloudCfsAccessRules(), + "tencentcloud_cfs_mount_targets": dataSourceTencentCloudCfsMountTargets(), + "tencentcloud_cfs_file_system_clients": dataSourceTencentCloudCfsFileSystemClients(), + "tencentcloud_cfs_available_zone": dataSourceTencentCloudCfsAvailableZone(), + "tencentcloud_redis_zone_config": dataSourceTencentRedisZoneConfig(), + "tencentcloud_redis_instances": dataSourceTencentRedisInstances(), + "tencentcloud_redis_backup": dataSourceTencentCloudRedisBackup(), + "tencentcloud_redis_backup_download_info": dataSourceTencentCloudRedisBackupDownloadInfo(), + "tencentcloud_redis_param_records": dataSourceTencentCloudRedisRecordsParam(), + "tencentcloud_redis_instance_shards": dataSourceTencentCloudRedisInstanceShards(), + "tencentcloud_redis_instance_zone_info": dataSourceTencentCloudRedisInstanceZoneInfo(), + "tencentcloud_redis_instance_task_list": dataSourceTencentCloudRedisInstanceTaskList(), + "tencentcloud_redis_instance_node_info": dataSourceTencentCloudRedisInstanceNodeInfo(), + "tencentcloud_as_scaling_configs": dataSourceTencentCloudAsScalingConfigs(), + "tencentcloud_as_scaling_groups": dataSourceTencentCloudAsScalingGroups(), + "tencentcloud_as_scaling_policies": dataSourceTencentCloudAsScalingPolicies(), + "tencentcloud_cbs_storages": dataSourceTencentCloudCbsStorages(), + "tencentcloud_cbs_storages_set": dataSourceTencentCloudCbsStoragesSet(), + "tencentcloud_cbs_snapshots": dataSourceTencentCloudCbsSnapshots(), + "tencentcloud_cbs_snapshot_policies": dataSourceTencentCloudCbsSnapshotPolicies(), + "tencentcloud_clb_instances": dataSourceTencentCloudClbInstances(), + "tencentcloud_clb_listeners": dataSourceTencentCloudClbListeners(), + "tencentcloud_clb_listener_rules": dataSourceTencentCloudClbListenerRules(), + "tencentcloud_clb_attachments": dataSourceTencentCloudClbServerAttachments(), + "tencentcloud_clb_redirections": dataSourceTencentCloudClbRedirections(), + "tencentcloud_clb_target_groups": dataSourceTencentCloudClbTargetGroups(), + "tencentcloud_clb_cluster_resources": dataSourceTencentCloudClbClusterResources(), + "tencentcloud_clb_cross_targets": dataSourceTencentCloudClbCrossTargets(), + "tencentcloud_clb_exclusive_clusters": dataSourceTencentCloudClbExclusiveClusters(), + "tencentcloud_clb_idle_instances": dataSourceTencentCloudClbIdleInstances(), + "tencentcloud_clb_listeners_by_targets": dataSourceTencentCloudClbListenersByTargets(), + "tencentcloud_clb_instance_by_cert_id": dataSourceTencentCloudClbInstanceByCertId(), + "tencentcloud_clb_instance_traffic": dataSourceTencentCloudClbInstanceTraffic(), + "tencentcloud_clb_instance_detail": dataSourceTencentCloudClbInstanceDetail(), + "tencentcloud_clb_resources": dataSourceTencentCloudClbResources(), + "tencentcloud_clb_target_group_list": dataSourceTencentCloudClbTargetGroupList(), + "tencentcloud_clb_target_health": dataSourceTencentCloudClbTargetHealth(), + "tencentcloud_mongodb_zone_config": dataSourceTencentCloudMongodbZoneConfig(), + "tencentcloud_mongodb_instances": dataSourceTencentCloudMongodbInstances(), + "tencentcloud_mongodb_instance_backups": dataSourceTencentCloudMongodbInstanceBackups(), + "tencentcloud_mongodb_instance_connections": dataSourceTencentCloudMongodbInstanceConnections(), + "tencentcloud_mongodb_instance_current_op": dataSourceTencentCloudMongodbInstanceCurrentOp(), + "tencentcloud_mongodb_instance_params": dataSourceTencentCloudMongodbInstanceParams(), + "tencentcloud_mongodb_instance_slow_log": dataSourceTencentCloudMongodbInstanceSlowLog(), + "tencentcloud_dayu_cc_https_policies": dataSourceTencentCloudDayuCCHttpsPolicies(), + "tencentcloud_dayu_cc_http_policies": dataSourceTencentCloudDayuCCHttpPolicies(), + "tencentcloud_dayu_ddos_policies": dataSourceTencentCloudDayuDdosPolicies(), + "tencentcloud_dayu_ddos_policy_cases": dataSourceTencentCloudDayuDdosPolicyCases(), + "tencentcloud_dayu_ddos_policy_attachments": dataSourceTencentCloudDayuDdosPolicyAttachments(), + "tencentcloud_dayu_l4_rules": dataSourceTencentCloudDayuL4Rules(), + "tencentcloud_dayu_l4_rules_v2": dataSourceTencentCloudDayuL4RulesV2(), + "tencentcloud_dayu_l7_rules": dataSourceTencentCloudDayuL7Rules(), + "tencentcloud_dayu_l7_rules_v2": dataSourceTencentCloudDayuL7RulesV2(), + "tencentcloud_gaap_proxies": dataSourceTencentCloudGaapProxies(), + "tencentcloud_gaap_realservers": dataSourceTencentCloudGaapRealservers(), + "tencentcloud_gaap_layer4_listeners": dataSourceTencentCloudGaapLayer4Listeners(), + "tencentcloud_gaap_layer7_listeners": dataSourceTencentCloudGaapLayer7Listeners(), + "tencentcloud_gaap_http_domains": dataSourceTencentCloudGaapHttpDomains(), + "tencentcloud_gaap_http_rules": dataSourceTencentCloudGaapHttpRules(), + "tencentcloud_gaap_security_policies": dataSourceTencentCloudGaapSecurityPolices(), + "tencentcloud_gaap_security_rules": dataSourceTencentCloudGaapSecurityRules(), + "tencentcloud_gaap_certificates": dataSourceTencentCloudGaapCertificates(), + "tencentcloud_gaap_domain_error_pages": dataSourceTencentCloudGaapDomainErrorPageInfoList(), "tencentcloud_gaap_access_regions": dataSourceTencentCloudGaapAccessRegions(), "tencentcloud_gaap_access_regions_by_dest_region": dataSourceTencentCloudGaapAccessRegionsByDestRegion(), "tencentcloud_gaap_black_header": dataSourceTencentCloudGaapBlackHeader(), @@ -2253,239 +2253,239 @@ func Provider() *schema.Provider { "tencentcloud_kms_describe_keys": dataSourceTencentCloudKmsDescribeKeys(), "tencentcloud_kms_white_box_key_details": dataSourceTencentCloudKmsWhiteBoxKeyDetails(), "tencentcloud_kms_list_keys": dataSourceTencentCloudKmsListKeys(), - "tencentcloud_ssm_products": dataSourceTencentCloudSsmProducts(), - "tencentcloud_ssm_secrets": dataSourceTencentCloudSsmSecrets(), - "tencentcloud_ssm_secret_versions": dataSourceTencentCloudSsmSecretVersions(), + "tencentcloud_ssm_products": dataSourceTencentCloudSsmProducts(), + "tencentcloud_ssm_secrets": dataSourceTencentCloudSsmSecrets(), + "tencentcloud_ssm_secret_versions": dataSourceTencentCloudSsmSecretVersions(), "tencentcloud_ssm_rotation_detail": dataSourceTencentCloudSsmRotationDetail(), "tencentcloud_ssm_rotation_history": dataSourceTencentCloudSsmRotationHistory(), "tencentcloud_ssm_service_status": dataSourceTencentCloudSsmServiceStatus(), "tencentcloud_ssm_ssh_key_pair_value": dataSourceTencentCloudSsmSshKeyPairValue(), - "tencentcloud_cdh_instances": dataSourceTencentCloudCdhInstances(), - "tencentcloud_dayu_eip": dataSourceTencentCloudDayuEip(), - "tencentcloud_teo_zone_available_plans": dataSourceTencentCloudTeoZoneAvailablePlans(), - "tencentcloud_teo_rule_engine_settings": dataSourceTencentCloudTeoRuleEngineSettings(), - "tencentcloud_sts_caller_identity": dataSourceTencentCloudStsCallerIdentity(), - "tencentcloud_dcdb_instances": dataSourceTencentCloudDcdbInstances(), - "tencentcloud_dcdb_accounts": dataSourceTencentCloudDcdbAccounts(), - "tencentcloud_dcdb_databases": dataSourceTencentCloudDcdbDatabases(), - "tencentcloud_dcdb_parameters": dataSourceTencentCloudDcdbParameters(), - "tencentcloud_dcdb_shards": dataSourceTencentCloudDcdbShards(), - "tencentcloud_dcdb_security_groups": dataSourceTencentCloudDcdbSecurityGroups(), - "tencentcloud_dcdb_database_objects": dataSourceTencentCloudDcdbDatabaseObjects(), - "tencentcloud_dcdb_database_tables": dataSourceTencentCloudDcdbDatabaseTables(), - "tencentcloud_dcdb_file_download_url": dataSourceTencentCloudDcdbFileDownloadUrl(), - "tencentcloud_dcdb_log_files": dataSourceTencentCloudDcdbLogFiles(), - "tencentcloud_dcdb_instance_node_info": dataSourceTencentCloudDcdbInstanceNodeInfo(), - "tencentcloud_dcdb_orders": dataSourceTencentCloudDcdbOrders(), - "tencentcloud_dcdb_price": dataSourceTencentCloudDcdbPrice(), - "tencentcloud_dcdb_project_security_groups": dataSourceTencentCloudDcdbProjectSecurityGroups(), - "tencentcloud_dcdb_projects": dataSourceTencentCloudDcdbProjects(), - "tencentcloud_dcdb_renewal_price": dataSourceTencentCloudDcdbRenewalPrice(), - "tencentcloud_dcdb_sale_info": dataSourceTencentCloudDcdbSaleInfo(), - "tencentcloud_dcdb_shard_spec": dataSourceTencentCloudDcdbShardSpec(), - "tencentcloud_dcdb_slow_logs": dataSourceTencentCloudDcdbSlowLogs(), - "tencentcloud_dcdb_upgrade_price": dataSourceTencentCloudDcdbUpgradePrice(), - "tencentcloud_mariadb_db_instances": dataSourceTencentCloudMariadbDbInstances(), - "tencentcloud_mariadb_accounts": dataSourceTencentCloudMariadbAccounts(), - "tencentcloud_mariadb_security_groups": dataSourceTencentCloudMariadbSecurityGroups(), - "tencentcloud_mariadb_database_objects": dataSourceTencentCloudMariadbDatabaseObjects(), - "tencentcloud_mariadb_databases": dataSourceTencentCloudMariadbDatabases(), - "tencentcloud_mariadb_database_table": dataSourceTencentCloudMariadbDatabaseTable(), - "tencentcloud_mariadb_dcn_detail": dataSourceTencentCloudMariadbDcnDetail(), - "tencentcloud_mariadb_file_download_url": dataSourceTencentCloudMariadbFileDownloadUrl(), - "tencentcloud_mariadb_flow": dataSourceTencentCloudMariadbFlow(), - "tencentcloud_mariadb_instance_node_info": dataSourceTencentCloudMariadbInstanceNodeInfo(), - "tencentcloud_mariadb_instance_specs": dataSourceTencentCloudMariadbInstanceSpecs(), - "tencentcloud_mariadb_log_files": dataSourceTencentCloudMariadbLogFiles(), - "tencentcloud_mariadb_orders": dataSourceTencentCloudMariadbOrders(), - "tencentcloud_mariadb_price": dataSourceTencentCloudMariadbPrice(), - "tencentcloud_mariadb_project_security_groups": dataSourceTencentCloudMariadbProjectSecurityGroups(), - "tencentcloud_mariadb_renewal_price": dataSourceTencentCloudMariadbRenewalPrice(), - "tencentcloud_mariadb_sale_info": dataSourceTencentCloudMariadbSaleInfo(), - "tencentcloud_mariadb_slow_logs": dataSourceTencentCloudMariadbSlowLogs(), - "tencentcloud_mariadb_upgrade_price": dataSourceTencentCloudMariadbUpgradePrice(), + "tencentcloud_cdh_instances": dataSourceTencentCloudCdhInstances(), + "tencentcloud_dayu_eip": dataSourceTencentCloudDayuEip(), + "tencentcloud_teo_zone_available_plans": dataSourceTencentCloudTeoZoneAvailablePlans(), + "tencentcloud_teo_rule_engine_settings": dataSourceTencentCloudTeoRuleEngineSettings(), + "tencentcloud_sts_caller_identity": dataSourceTencentCloudStsCallerIdentity(), + "tencentcloud_dcdb_instances": dataSourceTencentCloudDcdbInstances(), + "tencentcloud_dcdb_accounts": dataSourceTencentCloudDcdbAccounts(), + "tencentcloud_dcdb_databases": dataSourceTencentCloudDcdbDatabases(), + "tencentcloud_dcdb_parameters": dataSourceTencentCloudDcdbParameters(), + "tencentcloud_dcdb_shards": dataSourceTencentCloudDcdbShards(), + "tencentcloud_dcdb_security_groups": dataSourceTencentCloudDcdbSecurityGroups(), + "tencentcloud_dcdb_database_objects": dataSourceTencentCloudDcdbDatabaseObjects(), + "tencentcloud_dcdb_database_tables": dataSourceTencentCloudDcdbDatabaseTables(), + "tencentcloud_dcdb_file_download_url": dataSourceTencentCloudDcdbFileDownloadUrl(), + "tencentcloud_dcdb_log_files": dataSourceTencentCloudDcdbLogFiles(), + "tencentcloud_dcdb_instance_node_info": dataSourceTencentCloudDcdbInstanceNodeInfo(), + "tencentcloud_dcdb_orders": dataSourceTencentCloudDcdbOrders(), + "tencentcloud_dcdb_price": dataSourceTencentCloudDcdbPrice(), + "tencentcloud_dcdb_project_security_groups": dataSourceTencentCloudDcdbProjectSecurityGroups(), + "tencentcloud_dcdb_projects": dataSourceTencentCloudDcdbProjects(), + "tencentcloud_dcdb_renewal_price": dataSourceTencentCloudDcdbRenewalPrice(), + "tencentcloud_dcdb_sale_info": dataSourceTencentCloudDcdbSaleInfo(), + "tencentcloud_dcdb_shard_spec": dataSourceTencentCloudDcdbShardSpec(), + "tencentcloud_dcdb_slow_logs": dataSourceTencentCloudDcdbSlowLogs(), + "tencentcloud_dcdb_upgrade_price": dataSourceTencentCloudDcdbUpgradePrice(), + "tencentcloud_mariadb_db_instances": dataSourceTencentCloudMariadbDbInstances(), + "tencentcloud_mariadb_accounts": dataSourceTencentCloudMariadbAccounts(), + "tencentcloud_mariadb_security_groups": dataSourceTencentCloudMariadbSecurityGroups(), + "tencentcloud_mariadb_database_objects": dataSourceTencentCloudMariadbDatabaseObjects(), + "tencentcloud_mariadb_databases": dataSourceTencentCloudMariadbDatabases(), + "tencentcloud_mariadb_database_table": dataSourceTencentCloudMariadbDatabaseTable(), + "tencentcloud_mariadb_dcn_detail": dataSourceTencentCloudMariadbDcnDetail(), + "tencentcloud_mariadb_file_download_url": dataSourceTencentCloudMariadbFileDownloadUrl(), + "tencentcloud_mariadb_flow": dataSourceTencentCloudMariadbFlow(), + "tencentcloud_mariadb_instance_node_info": dataSourceTencentCloudMariadbInstanceNodeInfo(), + "tencentcloud_mariadb_instance_specs": dataSourceTencentCloudMariadbInstanceSpecs(), + "tencentcloud_mariadb_log_files": dataSourceTencentCloudMariadbLogFiles(), + "tencentcloud_mariadb_orders": dataSourceTencentCloudMariadbOrders(), + "tencentcloud_mariadb_price": dataSourceTencentCloudMariadbPrice(), + "tencentcloud_mariadb_project_security_groups": dataSourceTencentCloudMariadbProjectSecurityGroups(), + "tencentcloud_mariadb_renewal_price": dataSourceTencentCloudMariadbRenewalPrice(), + "tencentcloud_mariadb_sale_info": dataSourceTencentCloudMariadbSaleInfo(), + "tencentcloud_mariadb_slow_logs": dataSourceTencentCloudMariadbSlowLogs(), + "tencentcloud_mariadb_upgrade_price": dataSourceTencentCloudMariadbUpgradePrice(), "tencentcloud_mps_schedules": dataSourceTencentCloudMpsSchedules(), - "tencentcloud_tdcpg_clusters": dataSourceTencentCloudTdcpgClusters(), - "tencentcloud_tdcpg_instances": dataSourceTencentCloudTdcpgInstances(), - "tencentcloud_cat_probe_data": dataSourceTencentCloudCatProbeData(), - "tencentcloud_cat_node": dataSourceTencentCloudCatNode(), + "tencentcloud_tdcpg_clusters": dataSourceTencentCloudTdcpgClusters(), + "tencentcloud_tdcpg_instances": dataSourceTencentCloudTdcpgInstances(), + "tencentcloud_cat_probe_data": dataSourceTencentCloudCatProbeData(), + "tencentcloud_cat_node": dataSourceTencentCloudCatNode(), "tencentcloud_cat_metric_data": dataSourceTencentCloudCatMetricData(), - "tencentcloud_rum_project": dataSourceTencentCloudRumProject(), - "tencentcloud_rum_offline_log_config": dataSourceTencentCloudRumOfflineLogConfig(), - "tencentcloud_rum_whitelist": dataSourceTencentCloudRumWhitelist(), - "tencentcloud_rum_taw_instance": dataSourceTencentCloudRumTawInstance(), - "tencentcloud_dnspod_records": dataSourceTencentCloudDnspodRecords(), - "tencentcloud_tat_command": dataSourceTencentCloudTatCommand(), - "tencentcloud_tat_invoker": dataSourceTencentCloudTatInvoker(), - "tencentcloud_tat_invoker_records": dataSourceTencentCloudTatInvokerRecords(), - "tencentcloud_tat_agent": dataSourceTencentCloudTatAgent(), - "tencentcloud_tat_invocation_task": dataSourceTencentCloudTatInvocationTask(), - "tencentcloud_dbbrain_sql_filters": dataSourceTencentCloudDbbrainSqlFilters(), - "tencentcloud_dbbrain_security_audit_log_export_tasks": dataSourceTencentCloudDbbrainSecurityAuditLogExportTasks(), - "tencentcloud_dbbrain_diag_event": dataSourceTencentCloudDbbrainDiagEvent(), - "tencentcloud_dbbrain_diag_events": dataSourceTencentCloudDbbrainDiagEvents(), - "tencentcloud_dbbrain_diag_history": dataSourceTencentCloudDbbrainDiagHistory(), - "tencentcloud_dbbrain_security_audit_log_download_urls": dataSourceTencentCloudDbbrainSecurityAuditLogDownloadUrls(), - "tencentcloud_dbbrain_slow_log_time_series_stats": dataSourceTencentCloudDbbrainSlowLogTimeSeriesStats(), - "tencentcloud_dbbrain_slow_log_top_sqls": dataSourceTencentCloudDbbrainSlowLogTopSqls(), - "tencentcloud_dbbrain_slow_log_user_host_stats": dataSourceTencentCloudDbbrainSlowLogUserHostStats(), - "tencentcloud_dbbrain_slow_log_user_sql_advice": dataSourceTencentCloudDbbrainSlowLogUserSqlAdvice(), - "tencentcloud_dbbrain_slow_logs": dataSourceTencentCloudDbbrainSlowLogs(), - "tencentcloud_dbbrain_health_scores": dataSourceTencentCloudDbbrainHealthScores(), - "tencentcloud_dbbrain_sql_templates": dataSourceTencentCloudDbbrainSqlTemplates(), - "tencentcloud_dbbrain_db_space_status": dataSourceTencentCloudDbbrainDbSpaceStatus(), - "tencentcloud_dbbrain_top_space_schemas": dataSourceTencentCloudDbbrainTopSpaceSchemas(), - "tencentcloud_dbbrain_top_space_tables": dataSourceTencentCloudDbbrainTopSpaceTables(), - "tencentcloud_dbbrain_top_space_schema_time_series": dataSourceTencentCloudDbbrainTopSpaceSchemaTimeSeries(), - "tencentcloud_dbbrain_top_space_table_time_series": dataSourceTencentCloudDbbrainTopSpaceTableTimeSeries(), - "tencentcloud_dbbrain_diag_db_instances": dataSourceTencentCloudDbbrainDiagDbInstances(), - "tencentcloud_dbbrain_mysql_process_list": dataSourceTencentCloudDbbrainMysqlProcessList(), - "tencentcloud_dbbrain_no_primary_key_tables": dataSourceTencentCloudDbbrainNoPrimaryKeyTables(), - "tencentcloud_dbbrain_redis_top_big_keys": dataSourceTencentCloudDbbrainRedisTopBigKeys(), - "tencentcloud_dbbrain_redis_top_key_prefix_list": dataSourceTencentCloudDbbrainRedisTopKeyPrefixList(), - "tencentcloud_dts_sync_jobs": dataSourceTencentCloudDtsSyncJobs(), - "tencentcloud_dts_compare_tasks": dataSourceTencentCloudDtsCompareTasks(), - "tencentcloud_dts_migrate_jobs": dataSourceTencentCloudDtsMigrateJobs(), - "tencentcloud_dts_migrate_db_instances": dataSourceTencentCloudDtsMigrateDbInstances(), - "tencentcloud_tdmq_rocketmq_cluster": dataSourceTencentCloudTdmqRocketmqCluster(), - "tencentcloud_tdmq_rocketmq_namespace": dataSourceTencentCloudTdmqRocketmqNamespace(), - "tencentcloud_tdmq_rocketmq_topic": dataSourceTencentCloudTdmqRocketmqTopic(), - "tencentcloud_tdmq_rocketmq_role": dataSourceTencentCloudTdmqRocketmqRole(), - "tencentcloud_tdmq_rocketmq_group": dataSourceTencentCloudTdmqRocketmqGroup(), - "tencentcloud_tdmq_environment_attributes": dataSourceTencentCloudTdmqEnvironmentAttributes(), - "tencentcloud_tdmq_publisher_summary": dataSourceTencentCloudTdmqPublisherSummary(), - "tencentcloud_tdmq_publishers": dataSourceTencentCloudTdmqPublishers(), - "tencentcloud_tdmq_rabbitmq_node_list": dataSourceTencentCloudTdmqRabbitmqNodeList(), - "tencentcloud_tdmq_rabbitmq_vip_instance": dataSourceTencentCloudTdmqRabbitmqVipInstance(), - "tencentcloud_tdmq_vip_instance": dataSourceTencentCloudTdmqVipInstance(), - "tencentcloud_tdmq_rocketmq_messages": dataSourceTencentCloudTdmqRocketmqMessages(), - "tencentcloud_tdmq_pro_instances": dataSourceTencentCloudTdmqProInstances(), - "tencentcloud_tdmq_pro_instance_detail": dataSourceTencentCloudTdmqProInstanceDetail(), - "tencentcloud_tcmq_queue": dataSourceTencentCloudTcmqQueue(), - "tencentcloud_tcmq_topic": dataSourceTencentCloudTcmqTopic(), - "tencentcloud_tcmq_subscribe": dataSourceTencentCloudTcmqSubscribe(), - "tencentcloud_as_instances": dataSourceTencentCloudAsInstances(), - "tencentcloud_as_advices": dataSourceTencentCloudAsAdvices(), - "tencentcloud_as_limits": dataSourceTencentCloudAsLimits(), - "tencentcloud_as_last_activity": dataSourceTencentCloudAsLastActivity(), - "tencentcloud_cynosdb_accounts": dataSourceTencentCloudCynosdbAccounts(), - "tencentcloud_cynosdb_cluster_instance_groups": dataSourceTencentCloudCynosdbClusterInstanceGroups(), - "tencentcloud_cynosdb_cluster_params": dataSourceTencentCloudCynosdbClusterParams(), - "tencentcloud_cynosdb_param_templates": dataSourceTencentCloudCynosdbParamTemplates(), - "tencentcloud_cynosdb_zone": dataSourceTencentCloudCynosdbZone(), - "tencentcloud_cvm_instances_modification": dataSourceTencentCloudCvmInstancesModification(), - "tencentcloud_cynosdb_audit_logs": dataSourceTencentCloudCynosdbAuditLogs(), - "tencentcloud_cynosdb_backup_download_url": dataSourceTencentCloudCynosdbBackupDownloadUrl(), - "tencentcloud_cynosdb_binlog_download_url": dataSourceTencentCloudCynosdbBinlogDownloadUrl(), - "tencentcloud_cynosdb_cluster_detail_databases": dataSourceTencentCloudCynosdbClusterDetailDatabases(), - "tencentcloud_cynosdb_cluster_param_logs": dataSourceTencentCloudCynosdbClusterParamLogs(), - "tencentcloud_cynosdb_cluster": dataSourceTencentCloudCynosdbCluster(), - "tencentcloud_cynosdb_describe_instance_slow_queries": dataSourceTencentCloudCynosdbDescribeInstanceSlowQueries(), - "tencentcloud_cynosdb_describe_instance_error_logs": dataSourceTencentCloudCynosdbDescribeInstanceErrorLogs(), - "tencentcloud_cynosdb_account_all_grant_privileges": dataSourceTencentCloudCynosdbAccountAllGrantPrivileges(), - "tencentcloud_cynosdb_resource_package_list": dataSourceTencentCloudCynosdbResourcePackageList(), - "tencentcloud_cynosdb_project_security_groups": dataSourceTencentCloudCynosdbProjectSecurityGroups(), - "tencentcloud_cynosdb_resource_package_sale_specs": dataSourceTencentCloudCynosdbResourcePackageSaleSpecs(), - "tencentcloud_cynosdb_rollback_time_range": dataSourceTencentCloudCynosdbRollbackTimeRange(), - "tencentcloud_cynosdb_proxy_node": dataSourceTencentCloudCynosdbProxyNode(), - "tencentcloud_cynosdb_proxy_version": dataSourceTencentCloudCynosdbProxyVersion(), - "tencentcloud_css_domains": dataSourceTencentCloudCssDomains(), - "tencentcloud_chdfs_access_groups": dataSourceTencentCloudChdfsAccessGroups(), - "tencentcloud_chdfs_mount_points": dataSourceTencentCloudChdfsMountPoints(), - "tencentcloud_chdfs_file_systems": dataSourceTencentCloudChdfsFileSystems(), - "tencentcloud_tcm_mesh": dataSourceTencentCloudTcmMesh(), - "tencentcloud_lighthouse_firewall_rules_template": dataSourceTencentCloudLighthouseFirewallRulesTemplate(), - "tencentcloud_cvm_instance_vnc_url": dataSourceTencentCloudCvmInstanceVncUrl(), - "tencentcloud_cvm_disaster_recover_group_quota": dataSourceTencentCloudCvmDisasterRecoverGroupQuota(), - "tencentcloud_cvm_chc_hosts": dataSourceTencentCloudCvmChcHosts(), - "tencentcloud_cvm_chc_denied_actions": dataSourceTencentCloudCvmChcDeniedActions(), - "tencentcloud_cvm_image_quota": dataSourceTencentCloudCvmImageQuota(), - "tencentcloud_cvm_import_image_os": dataSourceTencentCloudCvmImportImageOs(), - "tencentcloud_tsf_application": dataSourceTencentCloudTsfApplication(), - "tencentcloud_tsf_application_config": dataSourceTencentCloudTsfApplicationConfig(), - "tencentcloud_tsf_application_file_config": dataSourceTencentCloudTsfApplicationFileConfig(), - "tencentcloud_tsf_application_public_config": dataSourceTencentCloudTsfApplicationPublicConfig(), - "tencentcloud_cvm_image_share_permission": dataSourceTencentCloudCvmImageSharePermission(), - "tencentcloud_tsf_cluster": dataSourceTencentCloudTsfCluster(), - "tencentcloud_tsf_microservice": dataSourceTencentCloudTsfMicroservice(), - "tencentcloud_tsf_unit_rules": dataSourceTencentCloudTsfUnitRules(), - "tencentcloud_tsf_config_summary": dataSourceTencentCloudTsfConfigSummary(), - "tencentcloud_tsf_delivery_config_by_group_id": dataSourceTencentCloudTsfDeliveryConfigByGroupId(), - "tencentcloud_tsf_delivery_configs": dataSourceTencentCloudTsfDeliveryConfigs(), - "tencentcloud_tsf_public_config_summary": dataSourceTencentCloudTsfPublicConfigSummary(), - "tencentcloud_tsf_api_group": dataSourceTencentCloudTsfApiGroup(), - "tencentcloud_tsf_application_attribute": dataSourceTencentCloudTsfApplicationAttribute(), - "tencentcloud_tsf_business_log_configs": dataSourceTencentCloudTsfBusinessLogConfigs(), - "tencentcloud_tsf_api_detail": dataSourceTencentCloudTsfApiDetail(), - "tencentcloud_tsf_microservice_api_version": dataSourceTencentCloudTsfMicroserviceApiVersion(), - "tencentcloud_tsf_repository": dataSourceTencentCloudTsfRepository(), - "tencentcloud_tsf_pod_instances": dataSourceTencentCloudTsfPodInstances(), - "tencentcloud_tsf_gateway_all_group_apis": dataSourceTencentCloudTsfGatewayAllGroupApis(), - "tencentcloud_tsf_group_gateways": dataSourceTencentCloudTsfGroupGateways(), - "tencentcloud_tsf_usable_unit_namespaces": dataSourceTencentCloudTsfUsableUnitNamespaces(), - "tencentcloud_tsf_group_instances": dataSourceTencentCloudTsfGroupInstances(), - "tencentcloud_tsf_group_config_release": dataSourceTencentCloudTsfGroupConfigRelease(), - "tencentcloud_tsf_container_group": dataSourceTencentCloudTsfContainerGroup(), - "tencentcloud_tsf_groups": dataSourceTencentCloudTsfGroups(), - "tencentcloud_tsf_ms_api_list": dataSourceTencentCloudTsfMsApiList(), - "tencentcloud_lighthouse_bundle": dataSourceTencentCloudLighthouseBundle(), - "tencentcloud_api_gateway_api_docs": dataSourceTencentCloudAPIGatewayAPIDocs(), - "tencentcloud_api_gateway_api_apps": dataSourceTencentCloudAPIGatewayAPIApps(), - "tencentcloud_tse_access_address": dataSourceTencentCloudTseAccessAddress(), - "tencentcloud_tse_nacos_replicas": dataSourceTencentCloudTseNacosReplicas(), - "tencentcloud_tse_nacos_server_interfaces": dataSourceTencentCloudTseNacosServerInterfaces(), - "tencentcloud_tse_zookeeper_replicas": dataSourceTencentCloudTseZookeeperReplicas(), - "tencentcloud_tse_zookeeper_server_interfaces": dataSourceTencentCloudTseZookeeperServerInterfaces(), - "tencentcloud_tse_groups": dataSourceTencentCloudTseGroups(), - "tencentcloud_tse_gateways": dataSourceTencentCloudTseGateways(), - "tencentcloud_tse_gateway_nodes": dataSourceTencentCloudTseGatewayNodes(), - "tencentcloud_tse_gateway_routes": dataSourceTencentCloudTseGatewayRoutes(), - "tencentcloud_tse_gateway_canary_rules": dataSourceTencentCloudTseGatewayCanaryRules(), - "tencentcloud_tse_gateway_services": dataSourceTencentCloudTseGatewayServices(), - "tencentcloud_tse_gateway_certificates": dataSourceTencentCloudTseGatewayCertificates(), - "tencentcloud_lighthouse_modify_instance_bundle": dataSourceTencentCloudLighthouseModifyInstanceBundle(), - "tencentcloud_lighthouse_zone": dataSourceTencentCloudLighthouseZone(), - "tencentcloud_lighthouse_scene": dataSourceTencentCloudLighthouseScene(), - "tencentcloud_lighthouse_all_scene": dataSourceTencentCloudLighthouseAllScene(), - "tencentcloud_lighthouse_reset_instance_blueprint": dataSourceTencentCloudLighthouseResetInstanceBlueprint(), - "tencentcloud_lighthouse_region": dataSourceTencentCloudLighthouseRegion(), - "tencentcloud_lighthouse_instance_vnc_url": dataSourceTencentCloudLighthouseInstanceVncUrl(), - "tencentcloud_lighthouse_instance_traffic_package": dataSourceTencentCloudLighthouseInstanceTrafficPackage(), - "tencentcloud_lighthouse_instance_disk_num": dataSourceTencentCloudLighthouseInstanceDiskNum(), - "tencentcloud_lighthouse_instance_blueprint": dataSourceTencentCloudLighthouseInstanceBlueprint(), - "tencentcloud_lighthouse_disk_config": dataSourceTencentCloudLighthouseDiskConfig(), - "tencentcloud_lighthouse_disks": dataSourceTencentCloudLighthouseInstanceDisks(), - "tencentcloud_clickhouse_backup_jobs": dataSourceTencentCloudClickhouseBackupJobs(), - "tencentcloud_clickhouse_backup_job_detail": dataSourceTencentCloudClickhouseBackupJobDetail(), - "tencentcloud_clickhouse_backup_tables": dataSourceTencentCloudClickhouseBackupTables(), - "tencentcloud_cls_shipper_tasks": dataSourceTencentCloudClsShipperTasks(), - "tencentcloud_cls_machines": dataSourceTencentCloudClsMachines(), - "tencentcloud_cls_machine_group_configs": dataSourceTencentCloudClsMachineGroupConfigs(), - "tencentcloud_eb_search": dataSourceTencentCloudEbSearch(), - "tencentcloud_eb_bus": dataSourceTencentCloudEbBus(), - "tencentcloud_eb_event_rules": dataSourceTencentCloudEbEventRules(), + "tencentcloud_rum_project": dataSourceTencentCloudRumProject(), + "tencentcloud_rum_offline_log_config": dataSourceTencentCloudRumOfflineLogConfig(), + "tencentcloud_rum_whitelist": dataSourceTencentCloudRumWhitelist(), + "tencentcloud_rum_taw_instance": dataSourceTencentCloudRumTawInstance(), + "tencentcloud_dnspod_records": dataSourceTencentCloudDnspodRecords(), + "tencentcloud_tat_command": dataSourceTencentCloudTatCommand(), + "tencentcloud_tat_invoker": dataSourceTencentCloudTatInvoker(), + "tencentcloud_tat_invoker_records": dataSourceTencentCloudTatInvokerRecords(), + "tencentcloud_tat_agent": dataSourceTencentCloudTatAgent(), + "tencentcloud_tat_invocation_task": dataSourceTencentCloudTatInvocationTask(), + "tencentcloud_dbbrain_sql_filters": dataSourceTencentCloudDbbrainSqlFilters(), + "tencentcloud_dbbrain_security_audit_log_export_tasks": dataSourceTencentCloudDbbrainSecurityAuditLogExportTasks(), + "tencentcloud_dbbrain_diag_event": dataSourceTencentCloudDbbrainDiagEvent(), + "tencentcloud_dbbrain_diag_events": dataSourceTencentCloudDbbrainDiagEvents(), + "tencentcloud_dbbrain_diag_history": dataSourceTencentCloudDbbrainDiagHistory(), + "tencentcloud_dbbrain_security_audit_log_download_urls": dataSourceTencentCloudDbbrainSecurityAuditLogDownloadUrls(), + "tencentcloud_dbbrain_slow_log_time_series_stats": dataSourceTencentCloudDbbrainSlowLogTimeSeriesStats(), + "tencentcloud_dbbrain_slow_log_top_sqls": dataSourceTencentCloudDbbrainSlowLogTopSqls(), + "tencentcloud_dbbrain_slow_log_user_host_stats": dataSourceTencentCloudDbbrainSlowLogUserHostStats(), + "tencentcloud_dbbrain_slow_log_user_sql_advice": dataSourceTencentCloudDbbrainSlowLogUserSqlAdvice(), + "tencentcloud_dbbrain_slow_logs": dataSourceTencentCloudDbbrainSlowLogs(), + "tencentcloud_dbbrain_health_scores": dataSourceTencentCloudDbbrainHealthScores(), + "tencentcloud_dbbrain_sql_templates": dataSourceTencentCloudDbbrainSqlTemplates(), + "tencentcloud_dbbrain_db_space_status": dataSourceTencentCloudDbbrainDbSpaceStatus(), + "tencentcloud_dbbrain_top_space_schemas": dataSourceTencentCloudDbbrainTopSpaceSchemas(), + "tencentcloud_dbbrain_top_space_tables": dataSourceTencentCloudDbbrainTopSpaceTables(), + "tencentcloud_dbbrain_top_space_schema_time_series": dataSourceTencentCloudDbbrainTopSpaceSchemaTimeSeries(), + "tencentcloud_dbbrain_top_space_table_time_series": dataSourceTencentCloudDbbrainTopSpaceTableTimeSeries(), + "tencentcloud_dbbrain_diag_db_instances": dataSourceTencentCloudDbbrainDiagDbInstances(), + "tencentcloud_dbbrain_mysql_process_list": dataSourceTencentCloudDbbrainMysqlProcessList(), + "tencentcloud_dbbrain_no_primary_key_tables": dataSourceTencentCloudDbbrainNoPrimaryKeyTables(), + "tencentcloud_dbbrain_redis_top_big_keys": dataSourceTencentCloudDbbrainRedisTopBigKeys(), + "tencentcloud_dbbrain_redis_top_key_prefix_list": dataSourceTencentCloudDbbrainRedisTopKeyPrefixList(), + "tencentcloud_dts_sync_jobs": dataSourceTencentCloudDtsSyncJobs(), + "tencentcloud_dts_compare_tasks": dataSourceTencentCloudDtsCompareTasks(), + "tencentcloud_dts_migrate_jobs": dataSourceTencentCloudDtsMigrateJobs(), + "tencentcloud_dts_migrate_db_instances": dataSourceTencentCloudDtsMigrateDbInstances(), + "tencentcloud_tdmq_rocketmq_cluster": dataSourceTencentCloudTdmqRocketmqCluster(), + "tencentcloud_tdmq_rocketmq_namespace": dataSourceTencentCloudTdmqRocketmqNamespace(), + "tencentcloud_tdmq_rocketmq_topic": dataSourceTencentCloudTdmqRocketmqTopic(), + "tencentcloud_tdmq_rocketmq_role": dataSourceTencentCloudTdmqRocketmqRole(), + "tencentcloud_tdmq_rocketmq_group": dataSourceTencentCloudTdmqRocketmqGroup(), + "tencentcloud_tdmq_environment_attributes": dataSourceTencentCloudTdmqEnvironmentAttributes(), + "tencentcloud_tdmq_publisher_summary": dataSourceTencentCloudTdmqPublisherSummary(), + "tencentcloud_tdmq_publishers": dataSourceTencentCloudTdmqPublishers(), + "tencentcloud_tdmq_rabbitmq_node_list": dataSourceTencentCloudTdmqRabbitmqNodeList(), + "tencentcloud_tdmq_rabbitmq_vip_instance": dataSourceTencentCloudTdmqRabbitmqVipInstance(), + "tencentcloud_tdmq_vip_instance": dataSourceTencentCloudTdmqVipInstance(), + "tencentcloud_tdmq_rocketmq_messages": dataSourceTencentCloudTdmqRocketmqMessages(), + "tencentcloud_tdmq_pro_instances": dataSourceTencentCloudTdmqProInstances(), + "tencentcloud_tdmq_pro_instance_detail": dataSourceTencentCloudTdmqProInstanceDetail(), + "tencentcloud_tcmq_queue": dataSourceTencentCloudTcmqQueue(), + "tencentcloud_tcmq_topic": dataSourceTencentCloudTcmqTopic(), + "tencentcloud_tcmq_subscribe": dataSourceTencentCloudTcmqSubscribe(), + "tencentcloud_as_instances": dataSourceTencentCloudAsInstances(), + "tencentcloud_as_advices": dataSourceTencentCloudAsAdvices(), + "tencentcloud_as_limits": dataSourceTencentCloudAsLimits(), + "tencentcloud_as_last_activity": dataSourceTencentCloudAsLastActivity(), + "tencentcloud_cynosdb_accounts": dataSourceTencentCloudCynosdbAccounts(), + "tencentcloud_cynosdb_cluster_instance_groups": dataSourceTencentCloudCynosdbClusterInstanceGroups(), + "tencentcloud_cynosdb_cluster_params": dataSourceTencentCloudCynosdbClusterParams(), + "tencentcloud_cynosdb_param_templates": dataSourceTencentCloudCynosdbParamTemplates(), + "tencentcloud_cynosdb_zone": dataSourceTencentCloudCynosdbZone(), + "tencentcloud_cvm_instances_modification": dataSourceTencentCloudCvmInstancesModification(), + "tencentcloud_cynosdb_audit_logs": dataSourceTencentCloudCynosdbAuditLogs(), + "tencentcloud_cynosdb_backup_download_url": dataSourceTencentCloudCynosdbBackupDownloadUrl(), + "tencentcloud_cynosdb_binlog_download_url": dataSourceTencentCloudCynosdbBinlogDownloadUrl(), + "tencentcloud_cynosdb_cluster_detail_databases": dataSourceTencentCloudCynosdbClusterDetailDatabases(), + "tencentcloud_cynosdb_cluster_param_logs": dataSourceTencentCloudCynosdbClusterParamLogs(), + "tencentcloud_cynosdb_cluster": dataSourceTencentCloudCynosdbCluster(), + "tencentcloud_cynosdb_describe_instance_slow_queries": dataSourceTencentCloudCynosdbDescribeInstanceSlowQueries(), + "tencentcloud_cynosdb_describe_instance_error_logs": dataSourceTencentCloudCynosdbDescribeInstanceErrorLogs(), + "tencentcloud_cynosdb_account_all_grant_privileges": dataSourceTencentCloudCynosdbAccountAllGrantPrivileges(), + "tencentcloud_cynosdb_resource_package_list": dataSourceTencentCloudCynosdbResourcePackageList(), + "tencentcloud_cynosdb_project_security_groups": dataSourceTencentCloudCynosdbProjectSecurityGroups(), + "tencentcloud_cynosdb_resource_package_sale_specs": dataSourceTencentCloudCynosdbResourcePackageSaleSpecs(), + "tencentcloud_cynosdb_rollback_time_range": dataSourceTencentCloudCynosdbRollbackTimeRange(), + "tencentcloud_cynosdb_proxy_node": dataSourceTencentCloudCynosdbProxyNode(), + "tencentcloud_cynosdb_proxy_version": dataSourceTencentCloudCynosdbProxyVersion(), + "tencentcloud_css_domains": dataSourceTencentCloudCssDomains(), + "tencentcloud_chdfs_access_groups": dataSourceTencentCloudChdfsAccessGroups(), + "tencentcloud_chdfs_mount_points": dataSourceTencentCloudChdfsMountPoints(), + "tencentcloud_chdfs_file_systems": dataSourceTencentCloudChdfsFileSystems(), + "tencentcloud_tcm_mesh": dataSourceTencentCloudTcmMesh(), + "tencentcloud_lighthouse_firewall_rules_template": dataSourceTencentCloudLighthouseFirewallRulesTemplate(), + "tencentcloud_cvm_instance_vnc_url": dataSourceTencentCloudCvmInstanceVncUrl(), + "tencentcloud_cvm_disaster_recover_group_quota": dataSourceTencentCloudCvmDisasterRecoverGroupQuota(), + "tencentcloud_cvm_chc_hosts": dataSourceTencentCloudCvmChcHosts(), + "tencentcloud_cvm_chc_denied_actions": dataSourceTencentCloudCvmChcDeniedActions(), + "tencentcloud_cvm_image_quota": dataSourceTencentCloudCvmImageQuota(), + "tencentcloud_cvm_import_image_os": dataSourceTencentCloudCvmImportImageOs(), + "tencentcloud_tsf_application": dataSourceTencentCloudTsfApplication(), + "tencentcloud_tsf_application_config": dataSourceTencentCloudTsfApplicationConfig(), + "tencentcloud_tsf_application_file_config": dataSourceTencentCloudTsfApplicationFileConfig(), + "tencentcloud_tsf_application_public_config": dataSourceTencentCloudTsfApplicationPublicConfig(), + "tencentcloud_cvm_image_share_permission": dataSourceTencentCloudCvmImageSharePermission(), + "tencentcloud_tsf_cluster": dataSourceTencentCloudTsfCluster(), + "tencentcloud_tsf_microservice": dataSourceTencentCloudTsfMicroservice(), + "tencentcloud_tsf_unit_rules": dataSourceTencentCloudTsfUnitRules(), + "tencentcloud_tsf_config_summary": dataSourceTencentCloudTsfConfigSummary(), + "tencentcloud_tsf_delivery_config_by_group_id": dataSourceTencentCloudTsfDeliveryConfigByGroupId(), + "tencentcloud_tsf_delivery_configs": dataSourceTencentCloudTsfDeliveryConfigs(), + "tencentcloud_tsf_public_config_summary": dataSourceTencentCloudTsfPublicConfigSummary(), + "tencentcloud_tsf_api_group": dataSourceTencentCloudTsfApiGroup(), + "tencentcloud_tsf_application_attribute": dataSourceTencentCloudTsfApplicationAttribute(), + "tencentcloud_tsf_business_log_configs": dataSourceTencentCloudTsfBusinessLogConfigs(), + "tencentcloud_tsf_api_detail": dataSourceTencentCloudTsfApiDetail(), + "tencentcloud_tsf_microservice_api_version": dataSourceTencentCloudTsfMicroserviceApiVersion(), + "tencentcloud_tsf_repository": dataSourceTencentCloudTsfRepository(), + "tencentcloud_tsf_pod_instances": dataSourceTencentCloudTsfPodInstances(), + "tencentcloud_tsf_gateway_all_group_apis": dataSourceTencentCloudTsfGatewayAllGroupApis(), + "tencentcloud_tsf_group_gateways": dataSourceTencentCloudTsfGroupGateways(), + "tencentcloud_tsf_usable_unit_namespaces": dataSourceTencentCloudTsfUsableUnitNamespaces(), + "tencentcloud_tsf_group_instances": dataSourceTencentCloudTsfGroupInstances(), + "tencentcloud_tsf_group_config_release": dataSourceTencentCloudTsfGroupConfigRelease(), + "tencentcloud_tsf_container_group": dataSourceTencentCloudTsfContainerGroup(), + "tencentcloud_tsf_groups": dataSourceTencentCloudTsfGroups(), + "tencentcloud_tsf_ms_api_list": dataSourceTencentCloudTsfMsApiList(), + "tencentcloud_lighthouse_bundle": dataSourceTencentCloudLighthouseBundle(), + "tencentcloud_api_gateway_api_docs": dataSourceTencentCloudAPIGatewayAPIDocs(), + "tencentcloud_api_gateway_api_apps": dataSourceTencentCloudAPIGatewayAPIApps(), + "tencentcloud_tse_access_address": dataSourceTencentCloudTseAccessAddress(), + "tencentcloud_tse_nacos_replicas": dataSourceTencentCloudTseNacosReplicas(), + "tencentcloud_tse_nacos_server_interfaces": dataSourceTencentCloudTseNacosServerInterfaces(), + "tencentcloud_tse_zookeeper_replicas": dataSourceTencentCloudTseZookeeperReplicas(), + "tencentcloud_tse_zookeeper_server_interfaces": dataSourceTencentCloudTseZookeeperServerInterfaces(), + "tencentcloud_tse_groups": dataSourceTencentCloudTseGroups(), + "tencentcloud_tse_gateways": dataSourceTencentCloudTseGateways(), + "tencentcloud_tse_gateway_nodes": dataSourceTencentCloudTseGatewayNodes(), + "tencentcloud_tse_gateway_routes": dataSourceTencentCloudTseGatewayRoutes(), + "tencentcloud_tse_gateway_canary_rules": dataSourceTencentCloudTseGatewayCanaryRules(), + "tencentcloud_tse_gateway_services": dataSourceTencentCloudTseGatewayServices(), + "tencentcloud_tse_gateway_certificates": dataSourceTencentCloudTseGatewayCertificates(), + "tencentcloud_lighthouse_modify_instance_bundle": dataSourceTencentCloudLighthouseModifyInstanceBundle(), + "tencentcloud_lighthouse_zone": dataSourceTencentCloudLighthouseZone(), + "tencentcloud_lighthouse_scene": dataSourceTencentCloudLighthouseScene(), + "tencentcloud_lighthouse_all_scene": dataSourceTencentCloudLighthouseAllScene(), + "tencentcloud_lighthouse_reset_instance_blueprint": dataSourceTencentCloudLighthouseResetInstanceBlueprint(), + "tencentcloud_lighthouse_region": dataSourceTencentCloudLighthouseRegion(), + "tencentcloud_lighthouse_instance_vnc_url": dataSourceTencentCloudLighthouseInstanceVncUrl(), + "tencentcloud_lighthouse_instance_traffic_package": dataSourceTencentCloudLighthouseInstanceTrafficPackage(), + "tencentcloud_lighthouse_instance_disk_num": dataSourceTencentCloudLighthouseInstanceDiskNum(), + "tencentcloud_lighthouse_instance_blueprint": dataSourceTencentCloudLighthouseInstanceBlueprint(), + "tencentcloud_lighthouse_disk_config": dataSourceTencentCloudLighthouseDiskConfig(), + "tencentcloud_lighthouse_disks": dataSourceTencentCloudLighthouseInstanceDisks(), + "tencentcloud_clickhouse_backup_jobs": dataSourceTencentCloudClickhouseBackupJobs(), + "tencentcloud_clickhouse_backup_job_detail": dataSourceTencentCloudClickhouseBackupJobDetail(), + "tencentcloud_clickhouse_backup_tables": dataSourceTencentCloudClickhouseBackupTables(), + "tencentcloud_cls_shipper_tasks": dataSourceTencentCloudClsShipperTasks(), + "tencentcloud_cls_machines": dataSourceTencentCloudClsMachines(), + "tencentcloud_cls_machine_group_configs": dataSourceTencentCloudClsMachineGroupConfigs(), + "tencentcloud_eb_search": dataSourceTencentCloudEbSearch(), + "tencentcloud_eb_bus": dataSourceTencentCloudEbBus(), + "tencentcloud_eb_event_rules": dataSourceTencentCloudEbEventRules(), "tencentcloud_eb_platform_event_names": dataSourceTencentCloudEbPlatformEventNames(), "tencentcloud_eb_platform_event_patterns": dataSourceTencentCloudEbPlatformEventPatterns(), "tencentcloud_eb_platform_products": dataSourceTencentCloudEbPlatformProducts(), "tencentcloud_eb_plateform_event_template": dataSourceTencentCloudEbPlateformEventTemplate(), - "tencentcloud_wedata_rule_templates": dataSourceTencentCloudWedataRuleTemplates(), - "tencentcloud_private_dns_records": dataSourceTencentCloudPrivateDnsRecords(), - "tencentcloud_waf_ciphers": dataSourceTencentCloudWafCiphers(), - "tencentcloud_waf_tls_versions": dataSourceTencentCloudWafTlsVersions(), - "tencentcloud_waf_domains": dataSourceTencentCloudWafDomains(), - "tencentcloud_waf_find_domains": dataSourceTencentCloudWafFindDomains(), - "tencentcloud_waf_waf_infos": dataSourceTencentCloudWafWafInfos(), - "tencentcloud_waf_ports": dataSourceTencentCloudWafPorts(), - "tencentcloud_waf_user_domains": dataSourceTencentCloudWafUserDomains(), - "tencentcloud_waf_attack_log_histogram": dataSourceTencentCloudWafAttackLogHistogram(), - "tencentcloud_waf_attack_log_list": dataSourceTencentCloudWafAttackLogList(), - "tencentcloud_waf_attack_overview": dataSourceTencentCloudWafAttackOverview(), - "tencentcloud_waf_attack_total_count": dataSourceTencentCloudWafAttackTotalCount(), - "tencentcloud_waf_peak_points": dataSourceTencentCloudWafPeakPoints(), - "tencentcloud_waf_instance_qps_limit": dataSourceTencentCloudWafInstanceQpsLimit(), - "tencentcloud_cfw_nat_fw_switches": dataSourceTencentCloudCfwNatFwSwitches(), - "tencentcloud_cfw_vpc_fw_switches": dataSourceTencentCloudCfwVpcFwSwitches(), - "tencentcloud_cfw_edge_fw_switches": dataSourceTencentCloudCfwEdgeFwSwitches(), + "tencentcloud_wedata_rule_templates": dataSourceTencentCloudWedataRuleTemplates(), + "tencentcloud_private_dns_records": dataSourceTencentCloudPrivateDnsRecords(), + "tencentcloud_waf_ciphers": dataSourceTencentCloudWafCiphers(), + "tencentcloud_waf_tls_versions": dataSourceTencentCloudWafTlsVersions(), + "tencentcloud_waf_domains": dataSourceTencentCloudWafDomains(), + "tencentcloud_waf_find_domains": dataSourceTencentCloudWafFindDomains(), + "tencentcloud_waf_waf_infos": dataSourceTencentCloudWafWafInfos(), + "tencentcloud_waf_ports": dataSourceTencentCloudWafPorts(), + "tencentcloud_waf_user_domains": dataSourceTencentCloudWafUserDomains(), + "tencentcloud_waf_attack_log_histogram": dataSourceTencentCloudWafAttackLogHistogram(), + "tencentcloud_waf_attack_log_list": dataSourceTencentCloudWafAttackLogList(), + "tencentcloud_waf_attack_overview": dataSourceTencentCloudWafAttackOverview(), + "tencentcloud_waf_attack_total_count": dataSourceTencentCloudWafAttackTotalCount(), + "tencentcloud_waf_peak_points": dataSourceTencentCloudWafPeakPoints(), + "tencentcloud_waf_instance_qps_limit": dataSourceTencentCloudWafInstanceQpsLimit(), + "tencentcloud_cfw_nat_fw_switches": dataSourceTencentCloudCfwNatFwSwitches(), + "tencentcloud_cfw_vpc_fw_switches": dataSourceTencentCloudCfwVpcFwSwitches(), + "tencentcloud_cfw_edge_fw_switches": dataSourceTencentCloudCfwEdgeFwSwitches(), "tencentcloud_cwp_machines_simple": dataSourceTencentCloudCwpMachinesSimple(), "tencentcloud_ses_receivers": dataSourceTencentCloudSesReceivers(), "tencentcloud_ses_send_tasks": dataSourceTencentCloudSesSendTasks(), @@ -2493,7 +2493,7 @@ func Provider() *schema.Provider { "tencentcloud_ses_black_email_address": dataSourceTencentCloudSesBlackEmailAddress(), "tencentcloud_ses_statistics_report": dataSourceTencentCloudSesStatisticsReport(), "tencentcloud_ses_send_email_status": dataSourceTencentCloudSesSendEmailStatus(), - "tencentcloud_organization_org_financial_by_member": dataSourceTencentCloudOrganizationOrgFinancialByMember(), + "tencentcloud_organization_org_financial_by_member": dataSourceTencentCloudOrganizationOrgFinancialByMember(), "tencentcloud_organization_org_auth_node": dataSourceTencentCloudOrganizationOrgAuthNode(), },