I have utilized @turkenh 's suggestion to use the grouping here which matches AWS Go SDK. In order to do that, I have written a small script that will print it in the format I'd like. With this script, we were able to get all cases where the calculated group differed from the group we want.
Then I added a function that is used to calculated the correct kind with manual input of word count that needs to be eliminated, called ReplaceGroupWords. In the end, we have minimized the manual input for kind and group to very few.
Description of your changes
I have utilized @turkenh 's suggestion to use the grouping here which matches AWS Go SDK. In order to do that, I have written a small script that will print it in the format I'd like. With this script, we were able to get all cases where the calculated group differed from the group we want.
Then I added a function that is used to calculated the correct kind with manual input of word count that needs to be eliminated, called
ReplaceGroupWords
. In the end, we have minimized the manual input for kind and group to very few.The most relevant commits are the first two.
Depends on https://github.com/crossplane/terrajet/pull/183 Fixes https://github.com/crossplane-contrib/provider-jet-aws/issues/133
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
I have printed all groups and kinds and manually inspected the list. Please do inspect the list to see if you can catch anything I missed.
API groups and kinds
``` accessanalyzer: Analyzer acm: Certificate CertificateValidation acmpca: Certificate CertificateAuthority CertificateAuthorityCertificate amp: Workspace amplify: App BackendEnvironment Branch DomainAssociation Webhook apigateway: APIKey Account Authorizer BasePathMapping ClientCertificate Deployment DocumentationPart DocumentationVersion DomainName GatewayResponse Integration IntegrationResponse Method MethodResponse MethodSettings Model RequestValidator Resource RestAPI RestAPIPolicy Stage UsagePlan UsagePlanKey VPCLink apigatewayv2: API APIMapping Authorizer Deployment DomainName Integration IntegrationResponse Model Route RouteResponse Stage VPCLink appautoscaling: Policy ScheduledAction Target appconfig: Application ConfigurationProfile Deployment DeploymentStrategy Environment HostedConfigurationVersion appmesh: GatewayRoute Mesh Route VirtualGateway VirtualNode VirtualRouter VirtualService apprunner: AutoScalingConfigurationVersion Connection CustomDomainAssociation Service appsync: APIKey Datasource Function GraphQLAPI Resolver athena: Database NamedQuery Workgroup autoscaling: Attachment AutoscalingGroup LaunchConfiguration LifecycleHook Notification Policy Schedule autoscalingplans: ScalingPlan backup: GlobalSettings Plan RegionSettings Selection Vault VaultNotifications VaultPolicy batch: ComputeEnvironment JobDefinition JobQueue budgets: Budget BudgetAction chime: VoiceConnector cloud9: EnvironmentEC2 cloudformation: CloudFormationType Stack StackSet StackSetInstance cloudfront: CachePolicy Distribution Function KeyGroup MonitoringSubscription OriginAccessIdentity OriginRequestPolicy PublicKey RealtimeLogConfig cloudhsmv2: Cluster HSM cloudtrail: Trail cloudwatch: CompositeAlarm Dashboard MetricAlarm MetricStream cloudwatchlogs: Definition Destination DestinationPolicy Group MetricFilter ResourcePolicy Stream SubscriptionFilter codeartifact: Domain DomainPermissionsPolicy Repository RepositoryPermissionsPolicy codebuild: Project ReportGroup SourceCredential Webhook codecommit: Repository Trigger codedeploy: App DeploymentConfig DeploymentGroup codepipeline: Codepipeline Webhook codestarconnections: Connection Host codestarnotifications: NotificationRule cognitoidentity: Pool PoolRolesAttachment cognitoidp: IdentityProvider ResourceServer UserGroup UserPool UserPoolClient UserPoolDomain UserPoolUICustomization configservice: AWSConfigurationRecorderStatus AggregateAuthorization ConfigRule ConfigurationAggregator ConfigurationRecorder ConformancePack DeliveryChannel OrganizationConformancePack OrganizationCustomRule OrganizationManagedRule RemediationConfiguration cur: ReportDefinition datapipeline: Pipeline datasync: Agent LocationEFS LocationFSXWindowsFileSystem LocationNFS LocationS3 LocationSMB Task dax: Cluster ParameterGroup SubnetGroup devicefarm: Project directconnect: BGPPeer Connection ConnectionAssociation Gateway GatewayAssociation GatewayAssociationProposal HostedPrivateVirtualInterface HostedPrivateVirtualInterfaceAccepter HostedPublicVirtualInterface HostedPublicVirtualInterfaceAccepter HostedTransitVirtualInterface HostedTransitVirtualInterfaceAccepter Lag PrivateVirtualInterface PublicVirtualInterface TransitVirtualInterface dlm: LifecyclePolicy dms: Certificate Endpoint EventSubscription ReplicationInstance ReplicationSubnetGroup ReplicationTask docdb: Cluster ClusterInstance ClusterParameterGroup ClusterSnapshot SubnetGroup ds: ConditionalForwarder Directory LogSubscription dynamodb: GlobalTable KinesisStreamingDestination Table TableItem ec2: AMI AMICopy AMIFromInstance AMILaunchPermission AvailabilityZoneGroup CapacityReservation CarrierGateway ClientVPNAuthorizationRule ClientVPNEndpoint ClientVPNNetworkAssociation ClientVPNRoute CustomerGateway DefaultNetworkACL DefaultRouteTable DefaultSecurityGroup DefaultSubnet DefaultVPC DefaultVPCDHCPOptions EBSDefaultKMSKey EBSEncryptionByDefault EBSSnapshot EBSSnapshotCopy EBSSnapshotImport EBSVolume EgressOnlyInternetGateway EIP EIPAssociation Fleet FlowLog Instance InternetGateway KeyPair LaunchTemplate LocalGatewayRoute LocalGatewayRouteTableVPCAssociation MainRouteTableAssociation ManagedPrefixList NATGateway NetworkACL NetworkACLRule NetworkInterface NetworkInterfaceAttachment NetworkInterfaceSgAttachment PlacementGroup Route RouteTable RouteTableAssociation SecurityGroup SecurityGroupRule SnapshotCreateVolumePermission SpotDatafeedSubscription SpotFleetRequest SpotInstanceRequest Subnet Tag TrafficMirrorFilter TrafficMirrorFilterRule TrafficMirrorSession TrafficMirrorTarget TransitGateway TransitGatewayPeeringAttachment TransitGatewayPeeringAttachmentAccepter TransitGatewayPrefixListReference TransitGatewayRoute TransitGatewayRouteTable TransitGatewayRouteTableAssociation TransitGatewayRouteTablePropagation TransitGatewayVPCAttachment TransitGatewayVPCAttachmentAccepter VPC VPCDHCPOptions VPCDHCPOptionsAssociation VPCEndpoint VPCEndpointConnectionNotification VPCEndpointRouteTableAssociation VPCEndpointService VPCEndpointServiceAllowedPrincipal VPCEndpointSubnetAssociation VPCIPv4CidrBlockAssociation VPCPeeringConnection VPCPeeringConnectionAccepter VPCPeeringConnectionOptions VPNConnection VPNConnectionRoute VPNGateway VPNGatewayAttachment VPNGatewayRoutePropagation VolumeAttachment ecr: LifecyclePolicy RegistryPolicy ReplicationConfiguration Repository RepositoryPolicy ecrpublic: Repository ecs: CapacityProvider Cluster Service TaskDefinition efs: AccessPoint BackupPolicy FileSystem FileSystemPolicy MountTarget eks: Addon Cluster FargateProfile IdentityProviderConfig NodeGroup elasticache: Cluster GlobalReplicationGroup ParameterGroup ReplicationGroup SecurityGroup SubnetGroup User UserGroup elasticbeanstalk: Application ApplicationVersion ConfigurationTemplate Environment elasticsearch: Domain DomainPolicy DomainSAMLOptions elastictranscoder: Pipeline Preset elb: AppCookieStickinessPolicy Attachment BackendServerPolicy ELB LBCookieStickinessPolicy LBSSLNegotiationPolicy ListenerPolicy Policy ProxyProtocolPolicy elbv2: ALBListener ALBListenerCertificate ALBListenerRule ALBTargetGroup LB LBListener LBListenerCertificate LBListenerRule LBTargetGroup LBTargetGroupAttachment emr: Cluster InstanceFleet InstanceGroup ManagedScalingPolicy SecurityConfiguration events: APIDestination Archive Bus BusPolicy Connection Permission Rule Target firehose: DeliveryStream fms: AdminAccount Policy fsx: LustreFileSystem WindowsFileSystem gamelift: Alias Build Fleet GameSessionQueue glacier: Vault VaultLock globalaccelerator: Accelerator EndpointGroup Listener glue: CatalogDatabase CatalogTable Classifier Crawler DataCatalogEncryptionSettings DevEndpoint Job MLTransform Partition Registry ResourcePolicy Schema SecurityConfiguration Trigger UserDefinedFunction Workflow guardduty: Detector Filter IPSet InviteAccepter Member OrganizationAdminAccount OrganizationConfiguration PublishingDestination Threatintelset iam: AccessKey AccountAlias AccountPasswordPolicy Group GroupMembership GroupPolicyAttachment InstanceProfile OpenIDConnectProvider Policy Role RolePolicyAttachment SAMLProvider ServerCertificate ServiceLinkedRole User UserGroupMembership UserLoginProfile UserPolicyAttachment UserSSHKey imagebuilder: Component DistributionConfiguration Image ImagePipeline ImageRecipe InfrastructureConfiguration inspector: AssessmentTarget AssessmentTemplate ResourceGroup iot: Certificate Policy PolicyAttachment RoleAlias Thing ThingPrincipalAttachment ThingType TopicRule kafka: Cluster Configuration ScramSecretAssociation kinesis: Stream StreamConsumer kinesisanalytics: Application kinesisanalyticsv2: Application ApplicationSnapshot kinesisvideo: Stream kms: Alias Ciphertext ExternalKey Grant Key lakeformation: DataLakeSettings Permissions Resource lambda: Alias CodeSigningConfig EventSourceMapping Function FunctionEventInvokeConfig LayerVersion Permission ProvisionedConcurrencyConfig lexmodels: Bot BotAlias Intent SlotType licensemanager: Association LicenseConfiguration lightsail: Domain Instance InstancePublicPorts KeyPair StaticIP StaticIPAttachment macie: MemberAccountAssociation S3BucketAssociation macie2: Account ClassificationJob CustomDataIdentifier FindingsFilter InvitationAccepter Member OrganizationAdminAccount mediaconvert: Queue mediapackage: Channel mediastore: Container ContainerPolicy mq: Broker Configuration neptune: Cluster ClusterEndpoint ClusterInstance ClusterParameterGroup ClusterSnapshot EventSubscription ParameterGroup SubnetGroup networkfirewall: Firewall FirewallPolicy LoggingConfiguration ResourcePolicy RuleGroup opsworks: Application CustomLayer GangliaLayer HAProxyLayer Instance JavaAppLayer MemcachedLayer MySQLLayer NodeJSAppLayer PHPAppLayer Permission RDSDBInstance RailsAppLayer Stack StaticWebLayer UserProfile organizations: Account DelegatedAdministrator Organization OrganizationalUnit Policy PolicyAttachment pinpoint: ADMChannel APNSChannel APNSSandboxChannel APNSVoIPChannel APNSVoIPSandboxChannel App BaiduChannel EmailChannel EventStream GCMChannel SMSChannel qldb: Ledger quicksight: Group User ram: PrincipalAssociation ResourceAssociation ResourceShare ResourceShareAccepter rds: Cluster ClusterEndpoint ClusterInstance ClusterParameterGroup ClusterRoleAssociation ClusterSnapshot EventSubscription GlobalCluster Instance InstanceRoleAssociation OptionGroup ParameterGroup Proxy ProxyDefaultTargetGroup ProxyEndpoint ProxyTarget SecurityGroup Snapshot SubnetGroup redshift: Cluster EventSubscription ParameterGroup SecurityGroup SnapshotCopyGrant SnapshotSchedule SnapshotScheduleAssociation SubnetGroup resourcegroups: Group route53: DelegationSet HealthCheck HostedZoneDNSSEC KeySigningKey QueryLog Record VPCAssociationAuthorization Zone ZoneAssociation route53resolver: DNSSECConfig Endpoint FirewallConfig FirewallDomainList FirewallRule FirewallRuleGroup FirewallRuleGroupAssociation QueryLogConfig QueryLogConfigAssociation Rule RuleAssociation s3: Bucket BucketAnalyticsConfiguration BucketInventory BucketMetric BucketNotification BucketObject BucketOwnershipControls BucketPolicy BucketPublicAccessBlock ObjectCopy s3control: AccessPoint AccountPublicAccessBlock Bucket BucketLifecycleConfiguration BucketPolicy s3outposts: Endpoint sagemaker: App AppImageConfig CodeRepository Domain Endpoint EndpointConfiguration FeatureGroup Image ImageVersion Model ModelPackageGroup NotebookInstance NotebookInstanceLifecycleConfiguration UserProfile Workforce Workteam schemas: Discoverer Registry Schema secretsmanager: Secret SecretPolicy SecretRotation SecretVersion securityhub: ActionTarget Insight InviteAccepter Member OrganizationAdminAccount OrganizationConfiguration ProductSubscription StandardsControl StandardsSubscription serverlessrepo: CloudFormationStack servicecatalog: BudgetResourceAssociation Constraint OrganizationsAccess Portfolio PortfolioShare PrincipalPortfolioAssociation Product ProductPortfolioAssociation ProvisionedProduct ProvisioningArtifact ServiceAction TagOption TagOptionResourceAssociation servicediscovery: HTTPNamespace PrivateDNSNamespace PublicDNSNamespace Service servicequotas: ServiceQuota ses: ActiveReceiptRuleSet ConfigurationSet DomainDKIM DomainIdentity DomainIdentityVerification DomainMailFrom EmailIdentity EventDestination IdentityNotificationTopic IdentityPolicy ReceiptFilter ReceiptRule ReceiptRuleSet Template sfn: Activity StateMachine shield: Protection ProtectionGroup signer: SigningJob SigningProfile SigningProfilePermission simpledb: Domain sns: PlatformApplication SMSPreferences Topic TopicPolicy TopicSubscription sqs: Queue QueuePolicy ssm: Activation Association Document MaintenanceWindow MaintenanceWindowTarget MaintenanceWindowTask Parameter PatchBaseline PatchGroup ResourceDataSync ssoadmin: AccountAssignment ManagedPolicyAttachment PermissionSet PermissionSetInlinePolicy storagegateway: Cache CachedISCSIVolume FileSystemAssociation Gateway NFSFileShare SMBFileShare StoredISCSIVolume TapePool UploadBuffer WorkingStorage swf: Domain synthetics: Canary timestreamwrite: Database Table transfer: SSHKey Server User waf: ByteMatchSet GeoMatchSet IPSet RateBasedRule RegexMatchSet RegexPatternSet Rule SQLInjectionMatchSet SizeConstraintSet WebACL XSSMatchSet wafregional: ByteMatchSet GeoMatchSet IPSet RateBasedRule RegexMatchSet RegexPatternSet Rule SQLInjectionMatchSet SizeConstraintSet WebACL WebACLAssociation XSSMatchSet wafv2: IPSet RegexPatternSet RuleGroup WebACL WebACLAssociation WebACLLoggingConfiguration worklink: Fleet WebsiteCertificateAuthorityAssociation workspaces: Directory IPGroup Workspace xray: EncryptionConfig Group SamplingRule ```