Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
feat: Added lightsail buckets (#1097)
Browse files Browse the repository at this point in the history
* feat: Added Lightsail Buckets

* e2e config added

* added tags resolver

* linter, docs

* go mod tidy

* linter

* linter

* e2e fix

* mock regenerate

* Update resources/services/lightsail/gen.hcl

Co-authored-by: Herman Schaaf <hermanschaaf@gmail.com>

Co-authored-by: Herman Schaaf <hermanschaaf@gmail.com>
  • Loading branch information
amanenk and hermanschaaf authored Jul 18, 2022
1 parent 164871f commit 74b216a
Show file tree
Hide file tree
Showing 9 changed files with 865 additions and 0 deletions.
40 changes: 40 additions & 0 deletions client/mocks/mock_lightsail.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions client/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ type KmsClient interface {
//go:generate mockgen -package=mocks -destination=./mocks/mock_lightsail.go . LightsailClient
type LightsailClient interface {
GetInstances(ctx context.Context, params *lightsail.GetInstancesInput, optFns ...func(*lightsail.Options)) (*lightsail.GetInstancesOutput, error)
GetBuckets(ctx context.Context, params *lightsail.GetBucketsInput, optFns ...func(*lightsail.Options)) (*lightsail.GetBucketsOutput, error)
GetBucketAccessKeys(ctx context.Context, params *lightsail.GetBucketAccessKeysInput, optFns ...func(*lightsail.Options)) (*lightsail.GetBucketAccessKeysOutput, error)
}

//go:generate mockgen -package=mocks -destination=./mocks/mock_mq.go . MQClient
Expand Down
14 changes: 14 additions & 0 deletions docs/tables/aws_lightsail_bucket_access_keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Table: aws_lightsail_bucket_access_keys
Describes an access key for an Amazon Lightsail bucket
## Columns
| Name | Type | Description |
| ------------- | ------------- | ----- |
|bucket_cq_id|uuid|Unique CloudQuery ID of aws_lightsail_buckets table (FK)|
|access_key_id|text|The ID of the access key|
|created_at|timestamp without time zone|The timestamp when the access key was created|
|last_used_date|timestamp without time zone|The date and time when the access key was most recently used|
|last_used_region|text|The AWS Region where this access key was most recently used|
|last_used_service_name|text|The name of the AWS service with which this access key was most recently used This value is N/A if the access key has not been used|
|secret_access_key|text|The secret access key used to sign requests|
|status|text|The status of the access key|
29 changes: 29 additions & 0 deletions docs/tables/aws_lightsail_buckets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

# Table: aws_lightsail_buckets
Describes an Amazon Lightsail bucket
## Columns
| Name | Type | Description |
| ------------- | ------------- | ----- |
|account_id|text|The AWS Account ID of the resource.|
|region|text|The AWS Region of the resource.|
|able_to_update_bundle|boolean|Indicates whether the bundle that is currently applied to a bucket can be changed to another bundle|
|access_log_config_enabled|boolean|A Boolean value that indicates whether bucket access logging is enabled for the bucket|
|access_log_config_destination|text|The name of the bucket where the access logs are saved|
|access_log_config_prefix|text|The optional object prefix for the bucket access log|
|access_rules_allow_public_overrides|boolean|A Boolean value that indicates whether the access control list (ACL) permissions that are applied to individual objects override the getObject option that is currently specified|
|access_rules_get_object|text|Specifies the anonymous access to all objects in a bucket|
|arn|text|The Amazon Resource Name (ARN) of the bucket|
|bundle_id|text|The ID of the bundle currently applied to the bucket|
|created_at|timestamp without time zone|The timestamp when the distribution was created|
|location_availability_zone|text|The Availability Zone|
|location_region_name|text|The AWS Region name|
|name|text|The name of the bucket|
|object_versioning|text|Indicates whether object versioning is enabled for the bucket|
|readonly_access_accounts|text[]|An array of strings that specify the Amazon Web Services account IDs that have read-only access to the bucket|
|resource_type|text|The Lightsail resource type of the bucket (for example, Bucket)|
|resources_receiving_access|jsonb|An array of objects that describe Lightsail instances that have access to the bucket|
|state_code|text|The state code of the bucket|
|state_message|text|A message that describes the state of the bucket|
|support_code|text|The support code for a bucket|
|tags|jsonb|The tag keys and optional values for the bucket|
|url|text|The URL of the bucket|
Loading

0 comments on commit 74b216a

Please sign in to comment.