Skip to content

Commit 38d41e3

Browse files
committed
removed duplicate entry from names_data.hcl and semgrep fix
1 parent 753b371 commit 38d41e3

File tree

5 files changed

+15
-42
lines changed

5 files changed

+15
-42
lines changed

internal/service/odb/cloud_exadata_infrastructure.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res
9393
Computed: true,
9494
Description: "The amount of available storage, in gigabytes (GB), for the Exadata infrastructure",
9595
},
96-
"availability_zone": schema.StringAttribute{
96+
names.AttrAvailabilityZone: schema.StringAttribute{
9797
Optional: true,
9898
Computed: true,
9999
PlanModifiers: []planmodifier.String{
@@ -135,7 +135,7 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res
135135
Computed: true,
136136
Description: "The software version of the database servers (dom0) in the Exadata infrastructure",
137137
},
138-
"display_name": schema.StringAttribute{
138+
names.AttrDisplayName: schema.StringAttribute{
139139
Required: true,
140140
PlanModifiers: []planmodifier.String{
141141
stringplanmodifier.RequiresReplace(),
@@ -201,12 +201,12 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res
201201
},
202202
Description: "The model name of the Exadata infrastructure. Changing this will force terraform to create new resource",
203203
},
204-
"status": schema.StringAttribute{
204+
names.AttrStatus: schema.StringAttribute{
205205
CustomType: statusType,
206206
Computed: true,
207207
Description: "The current status of the Exadata infrastructure",
208208
},
209-
"status_reason": schema.StringAttribute{
209+
names.AttrStatusReason: schema.StringAttribute{
210210
Computed: true,
211211
Description: "Additional information about the status of the Exadata infrastructure",
212212
},
@@ -228,7 +228,7 @@ func (r *resourceCloudExadataInfrastructure) Schema(ctx context.Context, req res
228228
"total_storage_size_in_gbs": schema.Int32Attribute{
229229
Computed: true,
230230
},
231-
"created_at": schema.StringAttribute{
231+
names.AttrCreatedAt: schema.StringAttribute{
232232
Computed: true,
233233
CustomType: timetypes.RFC3339Type{},
234234
Description: "The time when the Exadata infrastructure was created.",
@@ -483,7 +483,7 @@ func (r *resourceCloudExadataInfrastructure) Delete(ctx context.Context, req res
483483
}
484484

485485
func (r *resourceCloudExadataInfrastructure) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
486-
resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)
486+
resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), req, resp)
487487
}
488488

489489
func waitCloudExadataInfrastructureCreated(ctx context.Context, conn *odb.Client, id string, timeout time.Duration) (*odbtypes.CloudExadataInfrastructure, error) {

internal/service/odb/cloud_exadata_infrastructure_data_source.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (d *dataSourceCloudExadataInfrastructure) Schema(ctx context.Context, req d
5555
Computed: true,
5656
Description: "The amount of available storage, in gigabytes (GB), for the Exadata infrastructure.",
5757
},
58-
"availability_zone": schema.StringAttribute{
58+
names.AttrAvailabilityZone: schema.StringAttribute{
5959
Computed: true,
6060
Description: "he name of the Availability Zone (AZ) where the Exadata infrastructure is located.",
6161
},
@@ -92,7 +92,7 @@ func (d *dataSourceCloudExadataInfrastructure) Schema(ctx context.Context, req d
9292
Computed: true,
9393
Description: "The version of the Exadata infrastructure.",
9494
},
95-
"display_name": schema.StringAttribute{
95+
names.AttrDisplayName: schema.StringAttribute{
9696
Computed: true,
9797
Description: "The display name of the Exadata infrastructure.",
9898
},
@@ -152,12 +152,12 @@ func (d *dataSourceCloudExadataInfrastructure) Schema(ctx context.Context, req d
152152
Computed: true,
153153
Description: "The model name of the Exadata infrastructure.",
154154
},
155-
"status": schema.StringAttribute{
155+
names.AttrStatus: schema.StringAttribute{
156156
CustomType: statusType,
157157
Computed: true,
158158
Description: "The status of the Exadata infrastructure.",
159159
},
160-
"status_reason": schema.StringAttribute{
160+
names.AttrStatusReason: schema.StringAttribute{
161161
Computed: true,
162162
Description: "Additional information about the status of the Exadata infrastructure.",
163163
},
@@ -182,7 +182,7 @@ func (d *dataSourceCloudExadataInfrastructure) Schema(ctx context.Context, req d
182182
"servers. An OCPU is a legacy physical measure of compute resources. OCPUs are\n" +
183183
"based on the physical core of a processor with hyper-threading enabled.",
184184
},
185-
"created_at": schema.StringAttribute{
185+
names.AttrCreatedAt: schema.StringAttribute{
186186
Computed: true,
187187
CustomType: timetypes.RFC3339Type{},
188188
Description: "The time when the Exadata infrastructure was created.",

internal/service/odb/cloud_exadata_infrastructure_data_source_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ func TestAccODBCloudExadataInfrastructureDataSource_basic(t *testing.T) {
4848
{
4949
Config: exaInfraDataSourceTestEntity.basicExaInfraDataSource(displayNameSuffix),
5050
Check: resource.ComposeAggregateTestCheckFunc(
51-
resource.TestCheckResourceAttrPair(exaInfraResource, "id", exaInfraDataSource, "id"),
51+
resource.TestCheckResourceAttrPair(exaInfraResource, names.AttrID, exaInfraDataSource, names.AttrID),
5252
resource.TestCheckResourceAttr(exaInfraDataSource, "shape", "Exadata.X9M"),
53-
resource.TestCheckResourceAttr(exaInfraDataSource, "status", "AVAILABLE"),
53+
resource.TestCheckResourceAttr(exaInfraDataSource, names.AttrStatus, "AVAILABLE"),
5454
resource.TestCheckResourceAttr(exaInfraDataSource, "storage_count", "3"),
5555
resource.TestCheckResourceAttr(exaInfraDataSource, "compute_count", "2"),
5656
),

internal/service/odb/cloud_exadata_infrastructure_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func TestAccODBCloudExadataInfrastructureResource_tagging(t *testing.T) {
122122
Config: exaInfraTestResource.exaDataInfraResourceBasicConfigWithTags(rName),
123123
Check: resource.ComposeAggregateTestCheckFunc(
124124
exaInfraTestResource.testAccCheckCloudExadataInfrastructureExists(ctx, resourceName, &cloudExaDataInfrastructure1),
125-
resource.TestCheckResourceAttr(resourceName, "tags.%", "1"),
125+
resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "1"),
126126
resource.TestCheckResourceAttr(resourceName, "tags.env", "dev"),
127127
),
128128
},
@@ -141,7 +141,7 @@ func TestAccODBCloudExadataInfrastructureResource_tagging(t *testing.T) {
141141
}
142142
return nil
143143
}),
144-
resource.TestCheckResourceAttr(resourceName, "tags.%", "0"),
144+
resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "0"),
145145
),
146146
},
147147
{

names/data/names_data.hcl

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9520,31 +9520,4 @@ service "evs" {
95209520
provider_package_correct = "evs"
95219521
doc_prefix = ["evs_"]
95229522
brand = "Amazon"
9523-
}
9524-
9525-
service "odb" {
9526-
sdk {
9527-
id = "ODB"
9528-
arn_namespace = "odb"
9529-
}
9530-
names {
9531-
provider_name_upper = "ODB"
9532-
human_friendly = "Oracle Database@AWS"
9533-
}
9534-
endpoint_info {
9535-
endpoint_api_call = " ListGiVersions"
9536-
endpoint_region_overrides = {
9537-
"aws" = "us-east-1"
9538-
}
9539-
}
9540-
go_packages {
9541-
v1_package = ""
9542-
v2_package = "odb"
9543-
}
9544-
resource_prefix{
9545-
correct = "aws_odb_"
9546-
}
9547-
provider_package_correct = "odb"
9548-
doc_prefix = ["odb_"]
9549-
brand = "AWS"
95509523
}

0 commit comments

Comments
 (0)