From 72b9e2ce53c7f6a8e788dae568ce9c23394ba9f1 Mon Sep 17 00:00:00 2001 From: ParthaI Date: Mon, 5 May 2025 20:50:31 +0530 Subject: [PATCH 1/5] Add table aws_codebuild_fleet --- aws/plugin.go | 1 + aws/table_aws_codebuild_fleet.go | 256 +++++++++++++++++++++++++++++ docs/tables/aws_codebuild_fleet.md | 241 +++++++++++++++++++++++++++ 3 files changed, 498 insertions(+) create mode 100644 aws/table_aws_codebuild_fleet.go create mode 100644 docs/tables/aws_codebuild_fleet.md diff --git a/aws/plugin.go b/aws/plugin.go index 5a138dd0e..7f23a4edf 100644 --- a/aws/plugin.go +++ b/aws/plugin.go @@ -154,6 +154,7 @@ func Plugin(ctx context.Context) *plugin.Plugin { "aws_codeartifact_domain": tableAwsCodeArtifactDomain(ctx), "aws_codeartifact_repository": tableAwsCodeArtifactRepository(ctx), "aws_codebuild_build": tableAwsCodeBuildBuild(ctx), + "aws_codebuild_fleet": tableAwsCodeBuildFleet(ctx), "aws_codebuild_project": tableAwsCodeBuildProject(ctx), "aws_codebuild_source_credential": tableAwsCodeBuildSourceCredential(ctx), "aws_codecommit_repository": tableAwsCodeCommitRepository(ctx), diff --git a/aws/table_aws_codebuild_fleet.go b/aws/table_aws_codebuild_fleet.go new file mode 100644 index 000000000..9e4d139fa --- /dev/null +++ b/aws/table_aws_codebuild_fleet.go @@ -0,0 +1,256 @@ +package aws + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/codebuild" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + + "github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto" + "github.com/turbot/steampipe-plugin-sdk/v5/plugin" + "github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform" +) + +//// TABLE DEFINITION + +func tableAwsCodeBuildFleet(_ context.Context) *plugin.Table { + return &plugin.Table{ + Name: "aws_codebuild_fleet", + Description: "AWS CodeBuild Fleet", + Get: &plugin.GetConfig{ + KeyColumns: plugin.SingleColumn("arn"), + IgnoreConfig: &plugin.IgnoreConfig{ + ShouldIgnoreErrorFunc: shouldIgnoreErrors([]string{"InvalidInputException", "ResourceNotFoundException"}), + }, + Hydrate: getCodeBuildFleet, + Tags: map[string]string{"service": "codebuild", "action": "BatchGetFleets"}, + }, + List: &plugin.ListConfig{ + Hydrate: listCodeBuildFleets, + Tags: map[string]string{"service": "codebuild", "action": "ListFleets"}, + }, + GetMatrixItemFunc: SupportedRegionMatrix(AWS_CODEBUILD_SERVICE_ID), + Columns: awsRegionalColumns([]*plugin.Column{ + { + Name: "name", + Description: "The name of the compute fleet.", + Type: proto.ColumnType_STRING, + }, + { + Name: "arn", + Description: "The Amazon Resource Name (ARN) of the compute fleet.", + Type: proto.ColumnType_STRING, + }, + { + Name: "base_capacity", + Description: "The base capacity of the compute fleet.", + Type: proto.ColumnType_INT, + }, + { + Name: "created", + Description: "When the compute fleet was created, expressed in Unix time format.", + Type: proto.ColumnType_TIMESTAMP, + }, + { + Name: "last_modified", + Description: "When the compute fleet's settings were last modified, expressed in Unix time format.", + Type: proto.ColumnType_TIMESTAMP, + }, + { + Name: "status", + Description: "The current status of the compute fleet.", + Type: proto.ColumnType_STRING, + }, + { + Name: "status_reason", + Description: "The reason for the current status of the compute fleet.", + Type: proto.ColumnType_STRING, + }, + { + Name: "compute_type", + Description: "The compute type of the compute fleet.", + Type: proto.ColumnType_STRING, + }, + { + Name: "compute_fleet_type", + Description: "The type of compute fleet.", + Type: proto.ColumnType_STRING, + }, + { + Name: "vpc_config", + Description: "Information about the VPC configuration that AWS CodeBuild uses to access resources in a VPC.", + Type: proto.ColumnType_JSON, + }, + { + Name: "environment_type", + Description: "The environment type of the compute fleet.", + Type: proto.ColumnType_STRING, + }, + { + Name: "current_capacity", + Description: "The current capacity of the compute fleet.", + Type: proto.ColumnType_INT, + }, + { + Name: "desired_capacity", + Description: "The desired capacity of the compute fleet.", + Type: proto.ColumnType_INT, + }, + { + Name: "max_capacity", + Description: "The maximum capacity of the compute fleet.", + Type: proto.ColumnType_INT, + }, + { + Name: "min_capacity", + Description: "The minimum capacity of the compute fleet.", + Type: proto.ColumnType_INT, + }, + { + Name: "fleet_service_role", + Description: "The service role ARN for the compute fleet.", + Type: proto.ColumnType_STRING, + }, + { + Name: "tags_src", + Description: "A list of tag key and value pairs associated with this compute fleet.", + Type: proto.ColumnType_JSON, + Transform: transform.FromField("Tags"), + }, + { + Name: "tags", + Description: "A map of tags key and value pairs associated with this compute fleet.", + Type: proto.ColumnType_JSON, + Transform: transform.From(codeBuildFleetTurbotTags), + }, + + // Standard columns + { + Name: "title", + Description: resourceInterfaceDescription("title"), + Type: proto.ColumnType_STRING, + Transform: transform.FromField("Name"), + }, + { + Name: "akas", + Description: resourceInterfaceDescription("akas"), + Type: proto.ColumnType_JSON, + Transform: transform.FromField("Arn").Transform(transform.EnsureStringArray), + }, + }), + } +} + +//// LIST FUNCTION + +func listCodeBuildFleets(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { + // Create service client + svc, err := CodeBuildClient(ctx, d) + if err != nil { + plugin.Logger(ctx).Error("aws_codebuild_fleet.listCodeBuildFleets", "connection_error", err) + return nil, err + } + + // Limiting the results + maxLimit := int32(100) + if d.QueryContext.Limit != nil { + limit := int32(*d.QueryContext.Limit) + if limit < maxLimit { + maxLimit = limit + } + } + + // Build the params + params := &codebuild.ListFleetsInput{ + MaxResults: aws.Int32(maxLimit), + } + + paginator := codebuild.NewListFleetsPaginator(svc, params, func(o *codebuild.ListFleetsPaginatorOptions) { + o.Limit = maxLimit + o.StopOnDuplicateToken = true + }) + + // List call + for paginator.HasMorePages() { + // Apply rate limiting + d.WaitForListRateLimit(ctx) + + output, err := paginator.NextPage(ctx) + if err != nil { + plugin.Logger(ctx).Error("aws_codebuild_fleet.listCodeBuildFleets", "api_error", err) + return nil, err + } + + for _, fleet := range output.Fleets { + d.StreamListItem(ctx, fleet) + + // Context can be cancelled due to manual cancellation or the limit has been hit + if d.RowsRemaining(ctx) == 0 { + return nil, nil + } + } + } + + return nil, nil +} + +//// HYDRATE FUNCTIONS + +func getCodeBuildFleet(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) { + var arn string + if h.Item != nil { + data := h.Item.(types.Fleet) + arn = *data.Arn + } else { + arn = d.EqualsQualString("arn") + } + + // Empty check + if arn == "" { + return nil, nil + } + + // Create service client + svc, err := CodeBuildClient(ctx, d) + if err != nil { + plugin.Logger(ctx).Error("aws_codebuild_fleet.getCodeBuildFleet", "connection_error", err) + return nil, err + } + + // Build the params + params := &codebuild.BatchGetFleetsInput{ + Names: []string{arn}, + } + + // Get call + data, err := svc.BatchGetFleets(ctx, params) + if err != nil { + plugin.Logger(ctx).Error("aws_codebuild_fleet.getCodeBuildFleet", "api_error", err) + return nil, err + } + + if len(data.Fleets) > 0 { + return data.Fleets[0], nil + } + + return nil, nil +} + +//// TRANSFORM FUNCTIONS + +func codeBuildFleetTurbotTags(_ context.Context, d *transform.TransformData) (interface{}, error) { + data := d.HydrateItem.(types.Fleet) + + if data.Tags == nil { + return nil, nil + } + + // Turn the tags into a map + tags := make(map[string]string) + for _, tag := range data.Tags { + tags[*tag.Key] = *tag.Value + } + + return tags, nil +} diff --git a/docs/tables/aws_codebuild_fleet.md b/docs/tables/aws_codebuild_fleet.md new file mode 100644 index 000000000..f88407dfd --- /dev/null +++ b/docs/tables/aws_codebuild_fleet.md @@ -0,0 +1,241 @@ +--- +title: "Steampipe Table: aws_codebuild_fleet - Query AWS CodeBuild Fleet using SQL" +description: "Allows users to query AWS CodeBuild Fleet resources to obtain details about compute fleets used for CodeBuild projects including capacity, status, and configuration." +folder: "CodeBuild" +--- + +# Table: aws_codebuild_fleet - Query AWS CodeBuild Fleet using SQL + +AWS CodeBuild Fleet is a feature that allows you to create and manage dedicated compute resources for your CodeBuild projects. Compute fleets enable you to provision capacity ahead of time, reducing wait times for builds and allowing for more predictable build performance. Fleets help optimize build costs and can be configured with various compute types and capacity settings. + +## Table Usage Guide + +The `aws_codebuild_fleet` table in Steampipe provides you with information about compute fleets within AWS CodeBuild service. This table allows you, as a DevOps engineer or administrator, to query fleet-specific details, including capacity configurations, status, compute types, and associated metadata. You can utilize this table to gather insights on fleets, such as their current status, capacity utilization, VPC configuration, and more. The schema outlines the various attributes of the CodeBuild fleet for you, including the fleet name, ARN, creation time, capacities, and associated tags. + +## Examples + +### Basic info for all compute fleets + +```sql+postgres +select + name, + arn, + status, + compute_type, + environment_type, + region +from + aws_codebuild_fleet; +``` + +```sql+sqlite +select + name, + arn, + status, + compute_type, + environment_type, + region +from + aws_codebuild_fleet; +``` + +### List compute fleets by status + +```sql+postgres +select + name, + status, + status_reason, + created, + region +from + aws_codebuild_fleet +where + status = 'ACTIVE'; +``` + +```sql+sqlite +select + name, + status, + status_reason, + created, + region +from + aws_codebuild_fleet +where + status = 'ACTIVE'; +``` + +### Get fleet capacity details + +```sql+postgres +select + name, + current_capacity, + desired_capacity, + min_capacity, + max_capacity, + base_capacity, + region +from + aws_codebuild_fleet +order by + current_capacity desc; +``` + +```sql+sqlite +select + name, + current_capacity, + desired_capacity, + min_capacity, + max_capacity, + base_capacity, + region +from + aws_codebuild_fleet +order by + current_capacity desc; +``` + +### Find fleets with VPC configuration + +```sql+postgres +select + name, + vpc_config ->> 'VpcId' as vpc_id, + vpc_config ->> 'Subnets' as subnets, + vpc_config ->> 'SecurityGroupIds' as security_group_ids, + region +from + aws_codebuild_fleet +where + vpc_config is not null; +``` + +```sql+sqlite +select + name, + json_extract(vpc_config, '$.VpcId') as vpc_id, + json_extract(vpc_config, '$.Subnets') as subnets, + json_extract(vpc_config, '$.SecurityGroupIds') as security_group_ids, + region +from + aws_codebuild_fleet +where + vpc_config is not null; +``` + +### Get fleets by compute type + +```sql+postgres +select + compute_type, + count(*) as fleet_count, + sum(current_capacity) as total_capacity +from + aws_codebuild_fleet +group by + compute_type +order by + total_capacity desc; +``` + +```sql+sqlite +select + compute_type, + count(*) as fleet_count, + sum(current_capacity) as total_capacity +from + aws_codebuild_fleet +group by + compute_type +order by + total_capacity desc; +``` + +### Find recently modified fleets + +```sql+postgres +select + name, + last_modified, + status, + status_reason, + region +from + aws_codebuild_fleet +where + last_modified > now() - interval '7 days' +order by + last_modified desc; +``` + +```sql+sqlite +select + name, + last_modified, + status, + status_reason, + region +from + aws_codebuild_fleet +where + last_modified > datetime('now', '-7 days') +order by + last_modified desc; +``` + +### List fleets by environment type + +```sql+postgres +select + environment_type, + count(*) as fleet_count, + array_agg(name) as fleet_names +from + aws_codebuild_fleet +group by + environment_type; +``` + +```sql+sqlite +select + environment_type, + count(*) as fleet_count, + group_concat(name) as fleet_names +from + aws_codebuild_fleet +group by + environment_type; +``` + +### Find fleets without proper tagging + +```sql+postgres +select + name, + region, + tags +from + aws_codebuild_fleet +where + tags is null + or not tags ? 'Environment' + or not tags ? 'Project'; +``` + +```sql+sqlite +select + name, + region, + tags +from + aws_codebuild_fleet +where + tags is null + or json_extract(tags, '$.Environment') is null + or json_extract(tags, '$.Project') is null; +``` From fcbe6948b8797f4fdebfa41356c34a10a6f4a499 Mon Sep 17 00:00:00 2001 From: ParthaI Date: Wed, 7 May 2025 10:50:49 +0530 Subject: [PATCH 2/5] Updated the doc and table after fully testing --- aws/table_aws_codebuild_fleet.go | 38 ++++++++++++++++++++++++++++-- docs/tables/aws_codebuild_fleet.md | 17 ++++++++++++- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/aws/table_aws_codebuild_fleet.go b/aws/table_aws_codebuild_fleet.go index 9e4d139fa..277b09364 100644 --- a/aws/table_aws_codebuild_fleet.go +++ b/aws/table_aws_codebuild_fleet.go @@ -21,7 +21,7 @@ func tableAwsCodeBuildFleet(_ context.Context) *plugin.Table { Get: &plugin.GetConfig{ KeyColumns: plugin.SingleColumn("arn"), IgnoreConfig: &plugin.IgnoreConfig{ - ShouldIgnoreErrorFunc: shouldIgnoreErrors([]string{"InvalidInputException", "ResourceNotFoundException"}), + ShouldIgnoreErrorFunc: shouldIgnoreErrors([]string{"ResourceNotFoundException"}), }, Hydrate: getCodeBuildFleet, Tags: map[string]string{"service": "codebuild", "action": "BatchGetFleets"}, @@ -29,6 +29,14 @@ func tableAwsCodeBuildFleet(_ context.Context) *plugin.Table { List: &plugin.ListConfig{ Hydrate: listCodeBuildFleets, Tags: map[string]string{"service": "codebuild", "action": "ListFleets"}, + // According to the supported endpoints listed here: https://docs.aws.amazon.com/general/latest/gr/codebuild.html, + // AWS CodeBuild is available in all regions as mentioned in the above doc. However, the specific resource type "fleet" is not supported in every region. + // If you attempt to perform the ListFleets operation in a region where fleet support is unavailable, + // the API returns an InvalidInputException with the message: + // "An error occurred (InvalidInputException) when calling the ListFleets operation: Unknown operation ListFleets" + IgnoreConfig: &plugin.IgnoreConfig{ + ShouldIgnoreErrorFunc: shouldIgnoreErrors([]string{"InvalidInputException"}), + }, }, GetMatrixItemFunc: SupportedRegionMatrix(AWS_CODEBUILD_SERVICE_ID), Columns: awsRegionalColumns([]*plugin.Column{ @@ -36,6 +44,7 @@ func tableAwsCodeBuildFleet(_ context.Context) *plugin.Table { Name: "name", Description: "The name of the compute fleet.", Type: proto.ColumnType_STRING, + Hydrate: getCodeBuildFleet, }, { Name: "arn", @@ -46,83 +55,99 @@ func tableAwsCodeBuildFleet(_ context.Context) *plugin.Table { Name: "base_capacity", Description: "The base capacity of the compute fleet.", Type: proto.ColumnType_INT, + Hydrate: getCodeBuildFleet, }, { Name: "created", Description: "When the compute fleet was created, expressed in Unix time format.", Type: proto.ColumnType_TIMESTAMP, + Hydrate: getCodeBuildFleet, }, { Name: "last_modified", Description: "When the compute fleet's settings were last modified, expressed in Unix time format.", Type: proto.ColumnType_TIMESTAMP, + Hydrate: getCodeBuildFleet, }, { Name: "status", Description: "The current status of the compute fleet.", Type: proto.ColumnType_STRING, + Hydrate: getCodeBuildFleet, }, { Name: "status_reason", Description: "The reason for the current status of the compute fleet.", Type: proto.ColumnType_STRING, + Hydrate: getCodeBuildFleet, }, { Name: "compute_type", Description: "The compute type of the compute fleet.", Type: proto.ColumnType_STRING, + Hydrate: getCodeBuildFleet, }, { Name: "compute_fleet_type", Description: "The type of compute fleet.", Type: proto.ColumnType_STRING, + Hydrate: getCodeBuildFleet, }, { Name: "vpc_config", Description: "Information about the VPC configuration that AWS CodeBuild uses to access resources in a VPC.", Type: proto.ColumnType_JSON, + Hydrate: getCodeBuildFleet, }, { Name: "environment_type", Description: "The environment type of the compute fleet.", Type: proto.ColumnType_STRING, + Hydrate: getCodeBuildFleet, }, { Name: "current_capacity", Description: "The current capacity of the compute fleet.", Type: proto.ColumnType_INT, + Hydrate: getCodeBuildFleet, }, { Name: "desired_capacity", Description: "The desired capacity of the compute fleet.", Type: proto.ColumnType_INT, + Hydrate: getCodeBuildFleet, }, { Name: "max_capacity", Description: "The maximum capacity of the compute fleet.", Type: proto.ColumnType_INT, + Hydrate: getCodeBuildFleet, }, { Name: "min_capacity", Description: "The minimum capacity of the compute fleet.", Type: proto.ColumnType_INT, + Hydrate: getCodeBuildFleet, }, { Name: "fleet_service_role", Description: "The service role ARN for the compute fleet.", Type: proto.ColumnType_STRING, + Hydrate: getCodeBuildFleet, }, { Name: "tags_src", Description: "A list of tag key and value pairs associated with this compute fleet.", Type: proto.ColumnType_JSON, Transform: transform.FromField("Tags"), + Hydrate: getCodeBuildFleet, }, { Name: "tags", Description: "A map of tags key and value pairs associated with this compute fleet.", Type: proto.ColumnType_JSON, Transform: transform.From(codeBuildFleetTurbotTags), + Hydrate: getCodeBuildFleet, }, // Standard columns @@ -152,6 +177,11 @@ func listCodeBuildFleets(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd return nil, err } + // Unsupported region check + if svc == nil { + return nil, nil + } + // Limiting the results maxLimit := int32(100) if d.QueryContext.Limit != nil { @@ -183,7 +213,7 @@ func listCodeBuildFleets(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } for _, fleet := range output.Fleets { - d.StreamListItem(ctx, fleet) + d.StreamListItem(ctx, types.Fleet{Arn: &fleet}) // Context can be cancelled due to manual cancellation or the limit has been hit if d.RowsRemaining(ctx) == 0 { @@ -218,6 +248,10 @@ func getCodeBuildFleet(ctx context.Context, d *plugin.QueryData, h *plugin.Hydra return nil, err } + if svc == nil { + return nil, nil + } + // Build the params params := &codebuild.BatchGetFleetsInput{ Names: []string{arn}, diff --git a/docs/tables/aws_codebuild_fleet.md b/docs/tables/aws_codebuild_fleet.md index f88407dfd..33f1f790b 100644 --- a/docs/tables/aws_codebuild_fleet.md +++ b/docs/tables/aws_codebuild_fleet.md @@ -14,7 +14,9 @@ The `aws_codebuild_fleet` table in Steampipe provides you with information about ## Examples -### Basic info for all compute fleets +### Basic info + +Retrieve fundamental information about all compute fleets in your AWS environment. This query helps you get a quick overview of your fleet configurations, including their names, ARNs, status, and compute specifications. ```sql+postgres select @@ -42,6 +44,8 @@ from ### List compute fleets by status +Monitor active compute fleets and their creation times. This query is useful for identifying when fleets were created and their current operational status, helping you track fleet lifecycle and troubleshoot any status-related issues. + ```sql+postgres select name, @@ -70,6 +74,8 @@ where ### Get fleet capacity details +Analyze the capacity configurations of your compute fleets. This query helps you understand your fleet's scaling capabilities by showing current, desired, minimum, maximum, and base capacities, which is essential for capacity planning and optimization. + ```sql+postgres select name, @@ -102,6 +108,8 @@ order by ### Find fleets with VPC configuration +Identify compute fleets that are configured to run within a VPC. This query is valuable for security and networking teams to ensure proper network isolation and access control for build environments. + ```sql+postgres select name, @@ -130,6 +138,8 @@ where ### Get fleets by compute type +Analyze the distribution of compute types across your fleets and their total capacity. This query helps in understanding resource allocation and identifying potential areas for optimization or consolidation. + ```sql+postgres select compute_type, @@ -158,6 +168,8 @@ order by ### Find recently modified fleets +Track recent changes to your compute fleets. This query helps in change management and auditing by showing fleets that have been modified in the last week, along with their current status and any status-related messages. + ```sql+postgres select name, @@ -190,6 +202,8 @@ order by ### List fleets by environment type +Group and analyze fleets based on their environment types. This query helps in understanding the distribution of different build environments across your fleets, which is useful for environment standardization and management. + ```sql+postgres select environment_type, @@ -213,6 +227,7 @@ group by ``` ### Find fleets without proper tagging +Identify fleets that may not comply with tagging standards. This query helps in maintaining consistent resource tagging by finding fleets that are missing required tags like 'Environment' and 'Project', which are important for resource organization and cost allocation. ```sql+postgres select From 88efc69a4ad00a22f72426ba4365ffa3fc5d97a1 Mon Sep 17 00:00:00 2001 From: Ved misra <47312748+misraved@users.noreply.github.com> Date: Wed, 21 May 2025 14:16:35 +0530 Subject: [PATCH 3/5] Update aws_codebuild_fleet.md --- docs/tables/aws_codebuild_fleet.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/docs/tables/aws_codebuild_fleet.md b/docs/tables/aws_codebuild_fleet.md index 33f1f790b..5ebf4fae1 100644 --- a/docs/tables/aws_codebuild_fleet.md +++ b/docs/tables/aws_codebuild_fleet.md @@ -15,7 +15,6 @@ The `aws_codebuild_fleet` table in Steampipe provides you with information about ## Examples ### Basic info - Retrieve fundamental information about all compute fleets in your AWS environment. This query helps you get a quick overview of your fleet configurations, including their names, ARNs, status, and compute specifications. ```sql+postgres @@ -43,7 +42,6 @@ from ``` ### List compute fleets by status - Monitor active compute fleets and their creation times. This query is useful for identifying when fleets were created and their current operational status, helping you track fleet lifecycle and troubleshoot any status-related issues. ```sql+postgres @@ -73,7 +71,6 @@ where ``` ### Get fleet capacity details - Analyze the capacity configurations of your compute fleets. This query helps you understand your fleet's scaling capabilities by showing current, desired, minimum, maximum, and base capacities, which is essential for capacity planning and optimization. ```sql+postgres @@ -107,7 +104,6 @@ order by ``` ### Find fleets with VPC configuration - Identify compute fleets that are configured to run within a VPC. This query is valuable for security and networking teams to ensure proper network isolation and access control for build environments. ```sql+postgres @@ -137,7 +133,6 @@ where ``` ### Get fleets by compute type - Analyze the distribution of compute types across your fleets and their total capacity. This query helps in understanding resource allocation and identifying potential areas for optimization or consolidation. ```sql+postgres @@ -167,7 +162,6 @@ order by ``` ### Find recently modified fleets - Track recent changes to your compute fleets. This query helps in change management and auditing by showing fleets that have been modified in the last week, along with their current status and any status-related messages. ```sql+postgres @@ -201,7 +195,6 @@ order by ``` ### List fleets by environment type - Group and analyze fleets based on their environment types. This query helps in understanding the distribution of different build environments across your fleets, which is useful for environment standardization and management. ```sql+postgres @@ -227,7 +220,7 @@ group by ``` ### Find fleets without proper tagging -Identify fleets that may not comply with tagging standards. This query helps in maintaining consistent resource tagging by finding fleets that are missing required tags like 'Environment' and 'Project', which are important for resource organization and cost allocation. +Identify fleets that may not comply with tagging standards. This query helps maintain consistent resource tagging by finding fleets that are missing required tags like 'Environment' and 'Project', which are important for resource organization and cost allocation. ```sql+postgres select From 9388e5b12acb887eb4d8c6abd8ca5a62ca79f40f Mon Sep 17 00:00:00 2001 From: Ved misra <47312748+misraved@users.noreply.github.com> Date: Wed, 21 May 2025 14:17:37 +0530 Subject: [PATCH 4/5] Update aws_codebuild_fleet.md --- docs/tables/aws_codebuild_fleet.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tables/aws_codebuild_fleet.md b/docs/tables/aws_codebuild_fleet.md index 5ebf4fae1..c37db4dca 100644 --- a/docs/tables/aws_codebuild_fleet.md +++ b/docs/tables/aws_codebuild_fleet.md @@ -1,10 +1,10 @@ --- title: "Steampipe Table: aws_codebuild_fleet - Query AWS CodeBuild Fleet using SQL" -description: "Allows users to query AWS CodeBuild Fleet resources to obtain details about compute fleets used for CodeBuild projects including capacity, status, and configuration." +description: "Allows users to query AWS CodeBuild Fleet resources to obtain details about compute fleets used for CodeBuild projects, including capacity, status, and configuration." folder: "CodeBuild" --- -# Table: aws_codebuild_fleet - Query AWS CodeBuild Fleet using SQL +# Table: aws_codebuild_fleet - Query AWS CodeBuild Fleets using SQL AWS CodeBuild Fleet is a feature that allows you to create and manage dedicated compute resources for your CodeBuild projects. Compute fleets enable you to provision capacity ahead of time, reducing wait times for builds and allowing for more predictable build performance. Fleets help optimize build costs and can be configured with various compute types and capacity settings. From fe50c065cf924f618ac1448c1f783e311f7bc5b5 Mon Sep 17 00:00:00 2001 From: Ved misra <47312748+misraved@users.noreply.github.com> Date: Wed, 21 May 2025 15:04:50 +0530 Subject: [PATCH 5/5] Update table_aws_codebuild_fleet.go --- aws/table_aws_codebuild_fleet.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/aws/table_aws_codebuild_fleet.go b/aws/table_aws_codebuild_fleet.go index 277b09364..45d9c7e3c 100644 --- a/aws/table_aws_codebuild_fleet.go +++ b/aws/table_aws_codebuild_fleet.go @@ -142,13 +142,6 @@ func tableAwsCodeBuildFleet(_ context.Context) *plugin.Table { Transform: transform.FromField("Tags"), Hydrate: getCodeBuildFleet, }, - { - Name: "tags", - Description: "A map of tags key and value pairs associated with this compute fleet.", - Type: proto.ColumnType_JSON, - Transform: transform.From(codeBuildFleetTurbotTags), - Hydrate: getCodeBuildFleet, - }, // Standard columns { @@ -163,6 +156,13 @@ func tableAwsCodeBuildFleet(_ context.Context) *plugin.Table { Type: proto.ColumnType_JSON, Transform: transform.FromField("Arn").Transform(transform.EnsureStringArray), }, + { + Name: "tags", + Description: "A map of tags key and value pairs associated with this compute fleet.", + Type: proto.ColumnType_JSON, + Transform: transform.From(codeBuildFleetTurbotTags), + Hydrate: getCodeBuildFleet, + }, }), } }