From 44bbb8772a54c1f12c60f203d91d1a5bed4df8fd Mon Sep 17 00:00:00 2001 From: youngmn <105404366+youngmn@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:09:17 +0900 Subject: [PATCH] chore(all): Delete logs that print password (#509) --- internal/service/cdss/cdss_cluster.go | 1 - internal/service/hadoop/hadoop.go | 2 -- internal/service/mongodb/mongodb.go | 2 -- internal/service/mssql/mssql.go | 2 -- internal/service/mysql/mysql.go | 2 -- internal/service/mysql/mysql_users.go | 3 --- internal/service/nasvolume/nas_volume.go | 4 ---- internal/service/postgresql/postgresql.go | 2 -- internal/service/postgresql/postgresql_users.go | 3 --- internal/service/redis/redis.go | 2 -- internal/service/ses/ses_cluster.go | 2 +- 11 files changed, 1 insertion(+), 24 deletions(-) diff --git a/internal/service/cdss/cdss_cluster.go b/internal/service/cdss/cdss_cluster.go index 7693986e6..67384fd36 100644 --- a/internal/service/cdss/cdss_cluster.go +++ b/internal/service/cdss/cdss_cluster.go @@ -241,7 +241,6 @@ func resourceNcloudCDSSClusterCreate(ctx context.Context, d *schema.ResourceData ConfigGroupNo: *GetInt32FromString(d.GetOk("config_group_no")), } - LogCommonRequest("resourceNcloudCDSSClusterCreate", reqParams) resp, _, err := config.Client.Vcdss.V1Api.ClusterCreateCDSSClusterReturnServiceGroupInstanceNoPost(ctx, reqParams) if err != nil { LogErrorResponse("resourceNcloudCDSSClusterCreate", err, reqParams) diff --git a/internal/service/hadoop/hadoop.go b/internal/service/hadoop/hadoop.go index b24363bb6..ecf247c65 100644 --- a/internal/service/hadoop/hadoop.go +++ b/internal/service/hadoop/hadoop.go @@ -551,8 +551,6 @@ func (r *hadoopResource) Create(ctx context.Context, req resource.CreateRequest, reqParams.UseDataCatalog = plan.UseDataCatalog.ValueBoolPointer() } - tflog.Info(ctx, "CreateHadoop reqParams="+common.MarshalUncheckedString(reqParams)) - response, err := r.config.Client.Vhadoop.V2Api.CreateCloudHadoopInstance(reqParams) if err != nil { resp.Diagnostics.AddError("CREATING ERROR", err.Error()) diff --git a/internal/service/mongodb/mongodb.go b/internal/service/mongodb/mongodb.go index b7b619fa8..50b7d0589 100644 --- a/internal/service/mongodb/mongodb.go +++ b/internal/service/mongodb/mongodb.go @@ -568,8 +568,6 @@ func (m *mongodbResource) Create(ctx context.Context, req resource.CreateRequest reqParams.DataStorageTypeCode = plan.DataStorageType.ValueStringPointer() } - tflog.Info(ctx, "CreateMongoDb reqParams="+common.MarshalUncheckedString(reqParams)) - response, err := m.config.Client.Vmongodb.V2Api.CreateCloudMongoDbInstance(reqParams) if err != nil { resp.Diagnostics.AddError("CREATING ERROR", err.Error()) diff --git a/internal/service/mssql/mssql.go b/internal/service/mssql/mssql.go index 16406831c..748a32c72 100644 --- a/internal/service/mssql/mssql.go +++ b/internal/service/mssql/mssql.go @@ -373,8 +373,6 @@ func (r *mssqlResource) Create(ctx context.Context, req resource.CreateRequest, reqParams.BackupTime = plan.BackupTime.ValueStringPointer() } - tflog.Info(ctx, "CreateMssql reqParams="+common.MarshalUncheckedString(reqParams)) - response, err := r.config.Client.Vmssql.V2Api.CreateCloudMssqlInstance(reqParams) if err != nil { resp.Diagnostics.AddError("CREATING ERROR", err.Error()) diff --git a/internal/service/mysql/mysql.go b/internal/service/mysql/mysql.go index d60314c21..0fdaf41eb 100644 --- a/internal/service/mysql/mysql.go +++ b/internal/service/mysql/mysql.go @@ -532,8 +532,6 @@ func (r *mysqlResource) Create(ctx context.Context, req resource.CreateRequest, } } - tflog.Info(ctx, "CreateMysql reqParams="+common.MarshalUncheckedString(reqParams)) - response, err := r.config.Client.Vmysql.V2Api.CreateCloudMysqlInstance(reqParams) if err != nil { resp.Diagnostics.AddError("CREATING ERROR", err.Error()) diff --git a/internal/service/mysql/mysql_users.go b/internal/service/mysql/mysql_users.go index c6ab1d059..62b56558b 100644 --- a/internal/service/mysql/mysql_users.go +++ b/internal/service/mysql/mysql_users.go @@ -192,8 +192,6 @@ func (r *mysqlUsersResource) Create(ctx context.Context, req resource.CreateRequ CloudMysqlUserList: convertToCloudMysqlUserParameter(plan.MysqlUserList), } - tflog.Info(ctx, "CreateMysqlUserList reqParams="+common.MarshalUncheckedString(reqParams)) - response, err := r.config.Client.Vmysql.V2Api.AddCloudMysqlUserList(reqParams) if err != nil { resp.Diagnostics.AddError("CREATING ERROR", err.Error()) @@ -271,7 +269,6 @@ func (r *mysqlUsersResource) Update(ctx context.Context, req resource.UpdateRequ CloudMysqlInstanceNo: state.ID.ValueStringPointer(), CloudMysqlUserList: convertToCloudMysqlUserParameter(plan.MysqlUserList), } - tflog.Info(ctx, "ChangecloudMysqlUserList reqParams="+common.MarshalUncheckedString(reqParams)) response, err := r.config.Client.Vmysql.V2Api.ChangeCloudMysqlUserList(reqParams) if err != nil { diff --git a/internal/service/nasvolume/nas_volume.go b/internal/service/nasvolume/nas_volume.go index ec66ecab6..65384aa5b 100644 --- a/internal/service/nasvolume/nas_volume.go +++ b/internal/service/nasvolume/nas_volume.go @@ -337,8 +337,6 @@ func createClassicNasVolume(d *schema.ResourceData, config *conn.ProviderConfig) IsReturnProtection: BoolPtrOrNil(d.GetOk("is_return_protection")), } - LogCommonRequest("createClassicNasVolume", reqParams) - resp, err := config.Client.Server.V2Api.CreateNasVolumeInstance(reqParams) if err != nil { LogErrorResponse("createClassicNasVolume", err, reqParams) @@ -364,8 +362,6 @@ func createVpcNasVolume(d *schema.ResourceData, config *conn.ProviderConfig) (*s IsReturnProtection: BoolPtrOrNil(d.GetOk("is_return_protection")), } - LogCommonRequest("createVpcNasVolume", reqParams) - resp, err := config.Client.Vnas.V2Api.CreateNasVolumeInstance(reqParams) if err != nil { LogErrorResponse("createVpcNasVolume", err, reqParams) diff --git a/internal/service/postgresql/postgresql.go b/internal/service/postgresql/postgresql.go index 2911e6262..96d6ca616 100644 --- a/internal/service/postgresql/postgresql.go +++ b/internal/service/postgresql/postgresql.go @@ -567,8 +567,6 @@ func (r *postgresqlResource) Create(ctx context.Context, req resource.CreateRequ } } - tflog.Info(ctx, "CreatePostgresql reqParams="+common.MarshalUncheckedString(reqParams)) - response, err := r.config.Client.Vpostgresql.V2Api.CreateCloudPostgresqlInstance(reqParams) if err != nil { resp.Diagnostics.AddError("CREATING ERROR", err.Error()) diff --git a/internal/service/postgresql/postgresql_users.go b/internal/service/postgresql/postgresql_users.go index edcdfeef9..9d4701d2c 100644 --- a/internal/service/postgresql/postgresql_users.go +++ b/internal/service/postgresql/postgresql_users.go @@ -180,8 +180,6 @@ func (r *postgresqlUsersResource) Create(ctx context.Context, req resource.Creat CloudPostgresqlUserList: convertToCloudPostgresqlUserParameter(plan.PostgresqlUserList), } - tflog.Info(ctx, "CreatePostgresqlUserList reqParams="+common.MarshalUncheckedString(reqParams)) - response, err := r.config.Client.Vpostgresql.V2Api.AddCloudPostgresqlUserList(reqParams) if err != nil { resp.Diagnostics.AddError("CREATING ERROR", err.Error()) @@ -260,7 +258,6 @@ func (r *postgresqlUsersResource) Update(ctx context.Context, req resource.Updat CloudPostgresqlInstanceNo: state.ID.ValueStringPointer(), CloudPostgresqlUserList: convertToCloudPostgresqlUserParameter(plan.PostgresqlUserList), } - tflog.Info(ctx, "ChangeCloudPostgresqlUserList reqParams="+common.MarshalUncheckedString(reqParams)) response, err := r.config.Client.Vpostgresql.V2Api.ChangeCloudPostgresqlUserList(reqParams) if err != nil { diff --git a/internal/service/redis/redis.go b/internal/service/redis/redis.go index bdf20e069..be91a1d76 100644 --- a/internal/service/redis/redis.go +++ b/internal/service/redis/redis.go @@ -456,8 +456,6 @@ func (r *redisResource) Create(ctx context.Context, req resource.CreateRequest, reqParams.CloudRedisUserPassword = plan.UserPassword.ValueStringPointer() } - tflog.Info(ctx, "CreateCloudRedisInstance reqParams="+common.MarshalUncheckedString(reqParams)) - response, err := r.config.Client.Vredis.V2Api.CreateCloudRedisInstance(reqParams) if err != nil { resp.Diagnostics.AddError("CREATING ERROR", err.Error()) diff --git a/internal/service/ses/ses_cluster.go b/internal/service/ses/ses_cluster.go index 51c068f3d..9bec9a4b6 100644 --- a/internal/service/ses/ses_cluster.go +++ b/internal/service/ses/ses_cluster.go @@ -314,7 +314,7 @@ func resourceNcloudSESClusterCreate(ctx context.Context, d *schema.ResourceData, MasterNodeCount: masterNodeCount, LoginKeyName: StringPtrOrNil(d.GetOk("login_key_name")), } - LogCommonRequest("resourceNcloudSESClusterCreate", reqParams) + resp, _, err := config.Client.Vses.V2Api.CreateClusterUsingPOST(ctx, *reqParams) if err != nil { LogErrorResponse("resourceNcloudSESClusterCreate", err, reqParams)