Skip to content

Commit

Permalink
missed data sources
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Apr 10, 2024
1 parent cbcf86e commit bcbac7d
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 14 deletions.
3 changes: 3 additions & 0 deletions src/aws_datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,9 @@ func AwsDataLookup(find string) interface{} {
"aws_redshift_producer_data_shares": dataAwsRedshiftProducerDataShares,
"aws_resourceexplorer2_search": dataAwsResourceexplorer2Search,
"aws_servicecatalogappregistry_application": dataAwsServicecatalogappregistryApplication,
"aws_devopsguru_notification_channel": dataAwsDevopsguruNotificationChannel,
"aws_devopsguru_resource_collection": dataAwsDevopsguruResourceCollection,
"aws_ecr_lifecycle_policy_document": placeholder,
}

return TFLookup[find]
Expand Down
18 changes: 6 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 48.74
Datasource percentage coverage 98.10
Resource percentage coverage 48.70
Datasource percentage coverage 99.43

./resource.ps1 aws_accessanalyzer_archive_rule
./resource.ps1 aws_account_region
Expand Down Expand Up @@ -134,6 +134,7 @@ Datasource percentage coverage 98.10
./resource.ps1 aws_devopsguru_event_sources_config
./resource.ps1 aws_devopsguru_notification_channel
./resource.ps1 aws_devopsguru_resource_collection
./resource.ps1 aws_devopsguru_service_integration
./resource.ps1 aws_directory_service_conditional_forwarder
./resource.ps1 aws_directory_service_radius_settings
./resource.ps1 aws_directory_service_region
Expand Down Expand Up @@ -695,13 +696,6 @@ Datasource percentage coverage 98.10
./resource.ps1 aws_worklink_website_certificate_authority_association
./resource.ps1 aws_workspaces_connection_alias
./resource.ps1 aws_workspaces_ip_group
./resource.ps1 aws_apprunner_hosted_zone_id -type data
./resource.ps1 aws_batch_job_definition -type data
./resource.ps1 aws_cognito_user_group -type data
./resource.ps1 aws_cognito_user_groups -type data
./resource.ps1 aws_db_parameter_group -type data
./resource.ps1 aws_medialive_input -type data
./resource.ps1 aws_redshift_data_shares -type data
./resource.ps1 aws_redshift_producer_data_shares -type data
./resource.ps1 aws_resourceexplorer2_search -type data
./resource.ps1 aws_servicecatalogappregistry_application -type data
./resource.ps1 aws_devopsguru_notification_channel -type data
./resource.ps1 aws_devopsguru_resource_collection -type data
./resource.ps1 aws_ecr_lifecycle_policy_document -type data
5 changes: 4 additions & 1 deletion src/coverage/azure.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# todo azure

Resource percentage coverage 4.99
Resource percentage coverage 4.98
Datasource percentage coverage 39.25

./resource.ps1 azurerm_aadb2c_directory
Expand Down Expand Up @@ -718,6 +718,8 @@ Datasource percentage coverage 39.25
./resource.ps1 azurerm_recovery_services_vault
./resource.ps1 azurerm_recovery_services_vault_resource_guard_association
./resource.ps1 azurerm_redhat_openshift_cluster
./resource.ps1 azurerm_redis_cache_access_policy
./resource.ps1 azurerm_redis_cache_access_policy_assignment
./resource.ps1 azurerm_redis_enterprise_cluster
./resource.ps1 azurerm_redis_enterprise_database
./resource.ps1 azurerm_redis_firewall_rule
Expand Down Expand Up @@ -1010,6 +1012,7 @@ Datasource percentage coverage 39.25
./resource.ps1 azurerm_windows_function_app_slot
./resource.ps1 azurerm_windows_web_app
./resource.ps1 azurerm_windows_web_app_slot
./resource.ps1 azurerm_workloads_sap_discovery_virtual_instance
./resource.ps1 azurerm_workloads_sap_single_node_virtual_instance
./resource.ps1 azurerm_workloads_sap_three_tier_virtual_instance
./resource.ps1 azurerm_aadb2c_directory -type data
Expand Down
3 changes: 3 additions & 0 deletions src/coverage/coverage_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build cover
// +build cover

package coverage

import (
Expand Down
4 changes: 3 additions & 1 deletion src/coverage/google.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# todo google

Resource percentage coverage 21.77
Datasource percentage coverage 87.73
Datasource percentage coverage 87.10

./resource.ps1 google_access_context_manager_access_level_condition
./resource.ps1 google_access_context_manager_service_perimeter_dry_run_resource
Expand Down Expand Up @@ -732,5 +732,7 @@ Datasource percentage coverage 87.73
./resource.ps1 google_scc_source_iam_policy -type data
./resource.ps1 google_secure_source_manager_instance_iam_policy -type data
./resource.ps1 google_tags_tag_key_iam_policy -type data
./resource.ps1 google_tags_tag_keys -type data
./resource.ps1 google_tags_tag_value -type data
./resource.ps1 google_tags_tag_value_iam_policy -type data
./resource.ps1 google_tags_tag_values -type data
6 changes: 6 additions & 0 deletions src/files_datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1431,3 +1431,9 @@ var dataAwsResourceexplorer2Search []byte

//go:embed mapping/aws/data/servicecatalog/aws_servicecatalogappregistry_application.json
var dataAwsServicecatalogappregistryApplication []byte

//go:embed mapping/aws/data/devopsguru/aws_devopsguru_notification_channel.json
var dataAwsDevopsguruNotificationChannel []byte

//go:embed mapping/aws/data/devopsguru/aws_devopsguru_resource_collection.json
var dataAwsDevopsguruResourceCollection []byte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"apply": [],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": [
"devops-guru:ListNotificationChannels",
"devops-guru:DescribeResourceCollectionHealth"
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"apply": [],
"attributes": {
"tags": []
},
"destroy": [],
"modify": [],
"plan": [
"devops-guru:GetResourceCollection"
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
data "aws_devopsguru_notification_channel" "pike" {
id = "channel-1234"
}

output "aws_devopsguru_notification_channel" {
value = data.aws_devopsguru_notification_channel.pike
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
data "aws_devopsguru_resource_collection" "pike" {
type = "AWS_SERVICE"
}

output "aws_devopsguru_resource_collection" {
value = data.aws_devopsguru_resource_collection.pike
}
17 changes: 17 additions & 0 deletions terraform/aws/backup/data.aws_ecr_lifecycle_policy_document.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
data "aws_ecr_lifecycle_policy_document" "pike" {
rule {
priority = 1
description = "This is a test."

selection {
tag_status = "tagged"
tag_prefix_list = ["prod"]
count_type = "imageCountMoreThan"
count_number = 100
}
}
}

output "aws_ecr_lifecycle_policy_document" {
value = data.aws_ecr_lifecycle_policy_document.pike
}

0 comments on commit bcbac7d

Please sign in to comment.