Skip to content

Commit

Permalink
s3 outposts
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Feb 10, 2025
1 parent 1a0cb7b commit ed5cbcb
Show file tree
Hide file tree
Showing 30 changed files with 336 additions and 16 deletions.
13 changes: 13 additions & 0 deletions src/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,19 @@ var tFLookup = map[string]interface{}{ //nolint:gochecknoglobals
"aws_redshiftserverless_resource_policy": awsRedshiftserverlessResourcePolicy,
"aws_redshiftserverless_snapshot": awsRedshiftserverlessSnapshot,
"aws_redshiftserverless_usage_limit": awsRedshiftserverlessUsageLimit,
"aws_route53domains_delegation_signer_record": awsRoute53DomainsDelegationSignerRecord,
"aws_route53domains_domain": awsRoute53DomainsDomain,
"aws_route53domains_registered_domain": awsRoute53DomainsRegisteredDomain,
"aws_route53profiles_resource_association": awsRoute53profilesResourceAssociation,
"aws_s3_directory_bucket": awsS3DirectoryBucket,
"aws_s3_object_copy": awsS3ObjectCopy,
"aws_s3control_access_grants_instance_resource_policy": awsS3controlAccessGrantInstanceResourcePolicy,
"aws_s3control_bucket": awsS3ControlBucket,
"aws_s3control_bucket_lifecycle_configuration": awsS3ControlBucketLifecycleAssociation,
"aws_s3control_bucket_policy": awsS3ControlBucketPolicy,
"aws_s3control_object_lambda_access_point": awsS3ControlObjectLambdaAccessPoint,
"aws_s3control_object_lambda_access_point_policy": awsS3ControlObjectLambdaAccessPointPolicy,
"aws_s3control_storage_lens_configuration": awsS3ControlStorageLensConfiguration,
}

// GetAWSPermissions for AWS resources.
Expand Down
17 changes: 2 additions & 15 deletions src/coverage/aws.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# todo aws

Resource percentage coverage 93.16
Datasource percentage coverage 99.65
Resource percentage coverage 94.04
Datasource percentage coverage 100.00

./resource.ps1 aws_cognito_managed_user_pool_client
./resource.ps1 aws_ebs_fast_snapshot_restore
Expand Down Expand Up @@ -63,20 +63,7 @@ Datasource percentage coverage 99.65
./resource.ps1 aws_rds_instance_state
./resource.ps1 aws_resiliencehub_resiliency_policy
./resource.ps1 aws_resourcegroups_resource
./resource.ps1 aws_route53domains_delegation_signer_record
./resource.ps1 aws_route53domains_domain
./resource.ps1 aws_route53domains_registered_domain
./resource.ps1 aws_route53profiles_resource_association
./resource.ps1 aws_rum_metrics_destination
./resource.ps1 aws_s3_directory_bucket
./resource.ps1 aws_s3_object_copy
./resource.ps1 aws_s3control_access_grants_instance_resource_policy
./resource.ps1 aws_s3control_bucket
./resource.ps1 aws_s3control_bucket_lifecycle_configuration
./resource.ps1 aws_s3control_bucket_policy
./resource.ps1 aws_s3control_object_lambda_access_point
./resource.ps1 aws_s3control_object_lambda_access_point_policy
./resource.ps1 aws_s3control_storage_lens_configuration
./resource.ps1 aws_securityhub_invite_accepter
./resource.ps1 aws_securityhub_member
./resource.ps1 aws_serverlessapplicationrepository_cloudformation_stack
Expand Down
39 changes: 39 additions & 0 deletions src/files_aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,42 @@ var awsRedshiftserverlessSnapshot []byte

//go:embed mapping/aws/resource/redshift-serverless/aws_redshiftserverless_usage_limit.json
var awsRedshiftserverlessUsageLimit []byte

//go:embed mapping/aws/resource/route53domains/aws_route53domains_delegation_signer_record.json
var awsRoute53DomainsDelegationSignerRecord []byte

//go:embed mapping/aws/resource/route53domains/aws_route53domains_domain.json
var awsRoute53DomainsDomain []byte

//go:embed mapping/aws/resource/route53domains/aws_route53domains_registered_domain.json
var awsRoute53DomainsRegisteredDomain []byte

//go:embed mapping/aws/resource/route53profiles/aws_route53profiles_resource_association.json
var awsRoute53profilesResourceAssociation []byte

//go:embed mapping/aws/resource/s3-express/aws_s3_directory_bucket.json
var awsS3DirectoryBucket []byte

//go:embed mapping/aws/resource/s3/aws_s3_object_copy.json
var awsS3ObjectCopy []byte

//go:embed mapping/aws/resource/s3-outposts/aws_s3control_access_grants_instance_resource_policy.json
var awsS3controlAccessGrantInstanceResourcePolicy []byte

//go:embed mapping/aws/resource/s3-outposts/aws_s3control_bucket.json
var awsS3ControlBucket []byte

//go:embed mapping/aws/resource/s3-outposts/aws_s3control_bucket_lifecycle_configuration.json
var awsS3ControlBucketLifecycleAssociation []byte

//go:embed mapping/aws/resource/s3-outposts/aws_s3control_bucket_policy.json
var awsS3ControlBucketPolicy []byte

//go:embed mapping/aws/resource/s3-outposts/aws_s3control_object_lambda_access_point.json
var awsS3ControlObjectLambdaAccessPoint []byte

//go:embed mapping/aws/resource/s3-outposts/aws_s3control_object_lambda_access_point_policy.json
var awsS3ControlObjectLambdaAccessPointPolicy []byte

//go:embed mapping/aws/resource/s3/aws_s3control_storage_lens_configuration.json
var awsS3ControlStorageLensConfiguration []byte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [
"route53domains:AssociateDelegationSignerToDomain",
"route53domains:DisassociateDelegationSignerFromDomain"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"apply": [
"route53domains:DeleteDomain",
"route53domains:UpdateDomainContact",
"route53domains:RegisterDomain",
"route53domains:EnableDomainAutoRenew",
"route53domains:UpdateDomainContactPrivacy",
"route53domains:ListTagsForDomain",
"route53domains:GetDomainDetail"
],
"attributes": {
"tags": [
"route53domains:DeleteTagsForDomain",
"route53domains:UpdateTagsForDomain"
]
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"apply": [
"route53domains:UpdateDomainContact",
"route53domains:EnableDomainAutoRenew",
"route53domains:UpdateDomainContactPrivacy",
"route53domains:ListTagsForDomain",
"route53domains:GetDomainDetail",
"route53domains:ListTagsForDomain"
],
"attributes": {
"tags": [
"route53domains:DeleteTagsForDomain",
"route53domains:UpdateTagsForDomain"
]
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"apply": [
"route53profiles:AssociateResourceToProfile",
"route53profiles:GetProfileResourceAssociation",
"route53profiles:UpdateProfileResourceAssociation",
"route53profiles:DisassociateResourceFromProfile"
],
"attributes": {
"tags": []
},
"destroy": [
"route53profiles:DisassociateResourceFromProfile",
"route53profiles:GetProfileResourceAssociation"
],
"modify": [
"route53profiles:UpdateProfileResourceAssociation",
"route53profiles:GetProfileResourceAssociation"
],
"plan": [
"route53profiles:GetProfileResourceAssociation"
]
}
]
13 changes: 13 additions & 0 deletions src/mapping/aws/resource/s3-express/aws_s3_directory_bucket.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"apply": [
"s3express:DeleteBucket",
"s3express:CreateBucket"
],
"attributes": {},
"destroy": [
"s3express:DeleteBucket"
],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [
"s3:DeleteAccessGrantsInstanceResourcePolicy",
"s3:PutAccessGrantsInstanceResourcePolicy"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
23 changes: 23 additions & 0 deletions src/mapping/aws/resource/s3-outposts/aws_s3control_bucket.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"apply": [
"s3-outposts:DeleteBucket",
"s3-outposts:CreateBucket",
"s3-outposts:GetLifecycleConfiguration",
"s3-outposts:PutLifecycleConfiguration",
"s3-outposts:PutObjectAcl",
"s3-outposts:GetBucketPolicy",
"s3-outposts:GetBucketVersioning"
],
"attributes": {
"tags": [
"s3-outposts:GetBucketTagging",
"s3-outposts:PutBucketTagging"
]
},
"destroy": [
"s3-outposts:DeleteBucket"
],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"apply": [
"s3-outposts:PutReplicationConfiguration",
"s3-outposts:PutLifecycleConfiguration",
"s3-outposts:GetLifecycleConfiguration"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"apply": [
"s3-outposts:GetBucketPolicy",
"s3-outposts:DeleteBucketPolicy",
"s3-outposts:PutBucketPolicy"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"apply": [
"s3-outposts:CreateAccessPoint",
"s3-outposts:DeleteAccessPoint",
"s3-outposts:GetAccessPoint"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"apply": [
"s3-outposts:GetAccessPointPolicy",
"s3-outposts:DeleteAccessPointPolicy",
"s3-outposts:PutAccessPointPolicy"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
24 changes: 24 additions & 0 deletions src/mapping/aws/resource/s3/aws_s3_object_copy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"apply": [
"s3:PutObject",
"s3:GetObject",
"s3:GetObjectTagging",
"s3:ListBucketVersions",
"s3:DeleteObjectVersion"
],
"attributes": {
"kms": [
"kms:DescribeKey",
"kms:Encrypt"
],
"tags": []
},
"destroy": [
"s3:ListBucketVersions",
"s3:DeleteObjectVersion"
],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [
"s3:GetStorageLensConfiguration",
"s3:PutStorageLensConfiguration"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resource "aws_route53domains_delegation_signer_record" "pike" {}
1 change: 1 addition & 0 deletions terraform/aws/backup/aws_route53domains_domain.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resource "aws_route53domains_domain" "pike" {}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resource "aws_route53domains_registered_domain" "pike" {}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resource "aws_route53profiles_resource_association" "pike" {}
3 changes: 3 additions & 0 deletions terraform/aws/backup/aws_s3_directory_bucket.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "aws_s3_directory_bucket" "pike" {
bucket = "expressbucket"
}
10 changes: 10 additions & 0 deletions terraform/aws/backup/aws_s3_object_copy.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "aws_s3_object_copy" "pike" {
bucket = "pike-680235478471"
key = "terraform.tfstate"
source = "680235478471-terraform-state/pike-aws/terraform.tfstate"
override_provider {
default_tags {
tags = {}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resource "aws_s3control_access_grants_instance_resource_policy" "pike" {}
3 changes: 3 additions & 0 deletions terraform/aws/backup/aws_s3control_bucket.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "aws_s3control_bucket" "pike" {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resource "aws_s3control_bucket_lifecycle_configuration" "pike" {}
1 change: 1 addition & 0 deletions terraform/aws/backup/aws_s3control_bucket_policy.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resource "aws_s3control_bucket_policy" "pike" {}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resource "aws_s3control_object_lambda_access_point" "pike" {}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resource "aws_s3control_object_lambda_access_point_policy" "pike" {}
19 changes: 19 additions & 0 deletions terraform/aws/backup/aws_s3control_storage_lens_configuration.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
resource "aws_s3control_storage_lens_configuration" "pike" {
config_id = "example-1"

storage_lens_configuration {
enabled = true

account_level {
activity_metrics {
enabled = true
}

bucket_level {
activity_metrics {
enabled = true
}
}
}
}
}
Loading

0 comments on commit ed5cbcb

Please sign in to comment.