Skip to content

Commit

Permalink
quicksight extras
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Oct 9, 2024
1 parent 105506a commit 41b5bc6
Show file tree
Hide file tree
Showing 23 changed files with 369 additions and 65 deletions.
9 changes: 9 additions & 0 deletions src/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,15 @@ func AwsLookup(name string) interface{} {
"aws_m2_environment": awsM2Environment,
"aws_memorydb_user": awsMemorydbUser,
"aws_sagemaker_human_task_ui": awsSagemakerHumanTaskUi,
"aws_cloudfrontkeyvaluestore_key": awsCloudfrontkeyvaluestoreKey,
"aws_ecs_tag": awsEcsTag,
"aws_lb_trust_store": awsLbTrustStore,
"aws_lb_trust_store_revocation": awsLbTrustStoreRevocation,
"aws_quicksight_folder": awsQuicksightFolder,
"aws_quicksight_group": awsQuicksightGroup,
"aws_quicksight_group_membership": awsQuicksightGroupMembership,
"aws_quicksight_namespace": awsQuicksightNamespace,
"aws_quicksight_user": awsQuicksightUser,
}

return TFLookup[name]
Expand Down
14 changes: 2 additions & 12 deletions src/coverage/aws.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# todo aws

Resource percentage coverage 72.56
Datasource percentage coverage 99.82
Resource percentage coverage 73.18
Datasource percentage coverage 100.00

./resource.ps1 aws_amplify_backend_environment
./resource.ps1 aws_amplify_webhook
Expand Down Expand Up @@ -41,7 +41,6 @@ Datasource percentage coverage 99.82
./resource.ps1 aws_cloud9_environment_membership
./resource.ps1 aws_cloudcontrolapi_resource
./resource.ps1 aws_cloudformation_stack_instances
./resource.ps1 aws_cloudfrontkeyvaluestore_key
./resource.ps1 aws_cloudhsm_v2_cluster
./resource.ps1 aws_cloudhsm_v2_hsm
./resource.ps1 aws_cloudtrail_organization_delegated_admin_account
Expand Down Expand Up @@ -129,7 +128,6 @@ Datasource percentage coverage 99.82
./resource.ps1 aws_ec2_transit_gateway_vpc_attachment_accepter
./resource.ps1 aws_ecs_account_setting_default
./resource.ps1 aws_ecs_cluster_capacity_providers
./resource.ps1 aws_ecs_tag
./resource.ps1 aws_eip_domain_name
./resource.ps1 aws_eks_access_policy_association
./resource.ps1 aws_elasticache_reserved_cache_node
Expand Down Expand Up @@ -195,8 +193,6 @@ Datasource percentage coverage 99.82
./resource.ps1 aws_lambda_runtime_management_config
./resource.ps1 aws_lb_listener_certificate
./resource.ps1 aws_lb_ssl_negotiation_policy
./resource.ps1 aws_lb_trust_store
./resource.ps1 aws_lb_trust_store_revocation
./resource.ps1 aws_lexv2models_bot
./resource.ps1 aws_lexv2models_bot_locale
./resource.ps1 aws_lexv2models_bot_version
Expand Down Expand Up @@ -283,15 +279,10 @@ Datasource percentage coverage 99.82
./resource.ps1 aws_prometheus_workspace
./resource.ps1 aws_qldb_ledger
./resource.ps1 aws_quicksight_account_subscription
./resource.ps1 aws_quicksight_folder
./resource.ps1 aws_quicksight_folder_membership
./resource.ps1 aws_quicksight_group
./resource.ps1 aws_quicksight_group_membership
./resource.ps1 aws_quicksight_iam_policy_assignment
./resource.ps1 aws_quicksight_ingestion
./resource.ps1 aws_quicksight_namespace
./resource.ps1 aws_quicksight_template_alias
./resource.ps1 aws_quicksight_user
./resource.ps1 aws_quicksight_vpc_connection
./resource.ps1 aws_ram_resource_share_accepter
./resource.ps1 aws_ram_sharing_with_organization
Expand Down Expand Up @@ -396,4 +387,3 @@ Datasource percentage coverage 99.82
./resource.ps1 aws_wafregional_web_acl_association
./resource.ps1 aws_worklink_fleet
./resource.ps1 aws_worklink_website_certificate_authority_association
./resource.ps1 aws_route53profiles_profiles -type data
27 changes: 27 additions & 0 deletions src/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -2967,3 +2967,30 @@ var awsMemorydbUser []byte

//go:embed mapping/aws/resource/sagemaker/aws_sagemaker_human_task_ui.json
var awsSagemakerHumanTaskUi []byte

//go:embed mapping/aws/resource/cloudfront-keyvaluestore/aws_cloudfrontkeyvaluestore_key.json
var awsCloudfrontkeyvaluestoreKey []byte

//go:embed mapping/aws/resource/ecs/aws_ecs_tag.json
var awsEcsTag []byte

//go:embed mapping/aws/resource/elasticloadbalancing/aws_lb_trust_store.json
var awsLbTrustStore []byte

//go:embed mapping/aws/resource/elasticloadbalancing/aws_lb_trust_store_revocation.json
var awsLbTrustStoreRevocation []byte

//go:embed mapping/aws/resource/quicksight/aws_quicksight_folder.json
var awsQuicksightFolder []byte

//go:embed mapping/aws/resource/quicksight/aws_quicksight_group.json
var awsQuicksightGroup []byte

//go:embed mapping/aws/resource/quicksight/aws_quicksight_group_membership.json
var awsQuicksightGroupMembership []byte

//go:embed mapping/aws/resource/quicksight/aws_quicksight_namespace.json
var awsQuicksightNamespace []byte

//go:embed mapping/aws/resource/quicksight/aws_quicksight_user.json
var awsQuicksightUser []byte
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"apply": [
"cloudfront-keyvaluestore:DescribeKeyValueStore",
"cloudfront-keyvaluestore:PutKey",
"cloudfront-keyvaluestore:GetKey"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
14 changes: 14 additions & 0 deletions src/mapping/aws/resource/ecs/aws_ecs_tag.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [
"ecs:TagResource",
"ecs:UntagResource"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"apply": [
"elasticloadbalancing:CreateTrustStore",
"elasticloadbalancing:DeleteTrustStore",
"elasticloadbalancing:ModifyTrustStore"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"apply": [
"elasticloadbalancing:DeleteTrustStore"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
16 changes: 16 additions & 0 deletions src/mapping/aws/resource/quicksight/aws_quicksight_folder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"apply": [
"quicksight:CreateFolder",
"quicksight:DescribeFolder",
"quicksight:DeleteFolder",
"quicksight:UpdateFolder"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
16 changes: 16 additions & 0 deletions src/mapping/aws/resource/quicksight/aws_quicksight_group.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"apply": [
"quicksight:CreateGroup",
"quicksight:DescribeGroup",
"quicksight:DeleteGroup",
"quicksight:UpdateGroup"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"apply": [
"quicksight:DescribeGroupMembership",
"quicksight:CreateGroupMembership",
"quicksight:DeleteGroupMembership"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
14 changes: 14 additions & 0 deletions src/mapping/aws/resource/quicksight/aws_quicksight_namespace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [
"quicksight:CreateNamespace",
"quicksight:DeleteNamespace"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
17 changes: 17 additions & 0 deletions src/mapping/aws/resource/quicksight/aws_quicksight_user.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"apply": [
"quicksight:RegisterUser",
"quicksight:DescribeUser",
"quicksight:CreateUser",
"quicksight:DeleteUser",
"quicksight:UpdateUser"
],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": []
}
]
1 change: 0 additions & 1 deletion src/parse/aws-members.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@
"aws_route53_traffic_policy_document",
"aws_route53_zone",
"aws_route53_zones",
"aws_route53profiles_profiles",
"aws_route_table",
"aws_route_tables",
"aws_s3_account_public_access_block",
Expand Down
10 changes: 10 additions & 0 deletions terraform/aws/backup/aws_cloudfrontkeyvaluestore_key.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "aws_cloudfront_key_value_store" "example" {
name = "ExampleKeyValueStore"
comment = "This is an example key value store"
}

resource "aws_cloudfrontkeyvaluestore_key" "example" {
key_value_store_arn = aws_cloudfront_key_value_store.example.arn
key = "Test Key"
value = "Test Value"
}
38 changes: 38 additions & 0 deletions terraform/aws/backup/aws_ecs_tag.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
resource "aws_ecs_tag" "pike" {
resource_arn = aws_batch_compute_environment.pike.ecs_cluster_arn
key = "Name"
value = "Hello World"
}

resource "aws_batch_compute_environment" "pike" {
compute_environment_name_prefix = "pike"
service_role = "arn:aws:iam::680235478471:role/aws-service-role/batch.amazonaws.com/AWSServiceRoleForBatch"
type = "MANAGED"

compute_resources {
bid_percentage = 0
desired_vcpus = 0
instance_role = "arn:aws:iam::680235478471:instance-profile/ecsInstanceRole"
instance_type = [
"optimal",
]
max_vcpus = 256
min_vcpus = 0
security_group_ids = [
"sg-05b27cb61c9c46bd2",
]

subnets = [
"subnet-03fdfb13a135366a7",
]
tags = {
pike = "permissions"
}
type = "EC2"
}


tags = {
pike = "permissions"
}
}
4 changes: 4 additions & 0 deletions terraform/aws/backup/aws_lb_trust_store.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "aws_lb_trust_store" "pike" {
ca_certificates_bundle_s3_bucket = aws_s3_bucket.truststore.bucket
ca_certificates_bundle_s3_key = "trust"
}
9 changes: 9 additions & 0 deletions terraform/aws/backup/aws_lb_trust_store_revocation.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
resource "aws_lb_trust_store_revocation" "pike" {
trust_store_arn = aws_lb_trust_store.pike.arn

revocations_s3_bucket = aws_s3_bucket.truststore.bucket
revocations_s3_key = "trust"
}


resource "aws_s3_bucket" "truststore" {}
4 changes: 4 additions & 0 deletions terraform/aws/backup/aws_quicksight_folder.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "aws_quicksight_folder" "pike" {
folder_id = "example-id"
name = "example-name"
}
4 changes: 4 additions & 0 deletions terraform/aws/backup/aws_quicksight_group.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "aws_quicksight_group" "pike" {
group_name = "pike"
namespace = aws_quicksight_namespace.pike.namespace
}
4 changes: 4 additions & 0 deletions terraform/aws/backup/aws_quicksight_group_membership.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "aws_quicksight_group_membership" "pike" {
group_name = aws_quicksight_group.pike.group_name
member_name = "jameswoolfenden"
}
3 changes: 3 additions & 0 deletions terraform/aws/backup/aws_quicksight_namespace.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "aws_quicksight_namespace" "pike" {
namespace = "pike"
}
8 changes: 8 additions & 0 deletions terraform/aws/backup/aws_quicksight_user.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resource "aws_quicksight_user" "pike" {
session_name = "an-author"
email = "author@example.com"
namespace = aws_quicksight_namespace.pike.namespace
identity_type = "IAM"
iam_arn = "arn:aws:iam::680235478471:user/jameswoolfenden"
user_role = "AUTHOR"
}
Loading

0 comments on commit 41b5bc6

Please sign in to comment.