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

feat: Added lightsail disks #1240

Merged
merged 8 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -375,6 +375,8 @@ 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)
GetDisks(ctx context.Context, params *lightsail.GetDisksInput, optFns ...func(*lightsail.Options)) (*lightsail.GetDisksOutput, error)
GetDiskSnapshots(ctx context.Context, params *lightsail.GetDiskSnapshotsInput, optFns ...func(*lightsail.Options)) (*lightsail.GetDiskSnapshotsOutput, error)
}

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

# Table: aws_lightsail_disk_add_ons
Describes an add-on that is enabled for an Amazon Lightsail resource
## Columns
| Name | Type | Description |
| ------------- | ------------- | ----- |
|disk_cq_id|uuid|Unique CloudQuery ID of aws_lightsail_disks table (FK)|
|name|text|The name of the add-on|
|next_snapshot_time_of_day|text|The next daily time an automatic snapshot will be created|
|snapshot_time_of_day|text|The daily time when an automatic snapshot is created|
|status|text|The status of the add-on|
23 changes: 23 additions & 0 deletions docs/tables/aws_lightsail_disk_snapshot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# Table: aws_lightsail_disk_snapshot
Describes a block storage disk snapshot
## Columns
| Name | Type | Description |
| ------------- | ------------- | ----- |
|disk_cq_id|uuid|Unique CloudQuery ID of aws_lightsail_disks table (FK)|
|arn|text|The Amazon Resource Name (ARN) of the disk snapshot|
|created_at|timestamp without time zone|The date when the disk snapshot was created|
|from_disk_arn|text|The Amazon Resource Name (ARN) of the source disk from which the disk snapshot was created|
|from_disk_name|text|The unique name of the source disk from which the disk snapshot was created|
|from_instance_arn|text|The Amazon Resource Name (ARN) of the source instance from which the disk (system volume) snapshot was created|
|from_instance_name|text|The unique name of the source instance from which the disk (system volume) snapshot was created|
|is_from_auto_snapshot|boolean|A Boolean value indicating whether the snapshot was created from an automatic snapshot|
|location_availability_zone|text|The Availability Zone|
|location_region_name|text|The AWS Region name|
|name|text|The name of the disk snapshot (eg, my-disk-snapshot)|
|progress|text|The progress of the snapshot|
|resource_type|text|The Lightsail resource type (eg, DiskSnapshot)|
|size_in_gb|integer|The size of the disk in GB|
|state|text|The status of the disk snapshot operation|
|support_code|text|The support code|
|tags|jsonb|The tag keys and optional values for the resource|
25 changes: 25 additions & 0 deletions docs/tables/aws_lightsail_disks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# Table: aws_lightsail_disks
Describes a block storage disk
## Columns
| Name | Type | Description |
| ------------- | ------------- | ----- |
|account_id|text|The AWS Account ID of the resource.|
|region|text|The AWS Region of the resource.|
|arn|text|The Amazon Resource Name (ARN) of the disk|
|attached_to|text|The resources to which the disk is attached|
|attachment_state|text|(Deprecated) The attachment state of the disk|
|created_at|timestamp without time zone|The date when the disk was created|
|gb_in_use|integer|(Deprecated) The number of GB in use by the disk|
|iops|integer|The input/output operations per second (IOPS) of the disk|
|is_attached|boolean|A Boolean value indicating whether the disk is attached|
|is_system_disk|boolean|A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it)|
|location_availability_zone|text|The Availability Zone|
|location_region_name|text|The AWS Region name|
|name|text|The unique name of the disk|
|path|text|The disk path|
|resource_type|text|The Lightsail resource type (eg, Disk)|
|size_in_gb|integer|The size of the disk in GB|
|state|text|Describes the status of the disk|
|support_code|text|The support code|
|tags|jsonb|The tag keys and optional values for the resource|
1 change: 1 addition & 0 deletions resources/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ func Provider() *provider.Provider {
"lambda.layers": lambda.LambdaLayers(),
"lambda.runtimes": lambda.LambdaRuntimes(),
"lightsail.buckets": lightsail.Buckets(),
"lightsail.disks": lightsail.Disks(),
"lightsail.instances": lightsail.Instances(),
"mq.brokers": mq.Brokers(),
"organizations.accounts": organizations.Accounts(),
Expand Down
Loading