-
Notifications
You must be signed in to change notification settings - Fork 121
/
externalname.go
3201 lines (2978 loc) · 173 KB
/
externalname.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: CC0-1.0
package config
import (
"context"
"fmt"
"strings"
"github.com/crossplane/crossplane-runtime/pkg/errors"
"github.com/crossplane/upjet/pkg/config"
"github.com/upbound/provider-aws/config/common"
)
// TerraformPluginFrameworkExternalNameConfigs contains all external
// name configurations belonging to Terraform Plugin Framework
// resources to be reconciled under the no-fork architecture for this
// provider.
var TerraformPluginFrameworkExternalNameConfigs = map[string]config.ExternalName{
// ec2
//
// Imported by using the id: sgr-02108b27edd666983
"aws_vpc_security_group_egress_rule": vpcSecurityGroupRule(),
// Imported by using the id: sgr-02108b27edd666983
"aws_vpc_security_group_ingress_rule": vpcSecurityGroupRule(),
// cognito
//
// us-west-2_abc123/3ho4ek12345678909nh3fmhpko
"aws_cognito_user_pool_client": cognitoUserPoolClient(),
// simpledb
//
// SimpleDB Domains can be imported using the name
"aws_simpledb_domain": config.NameAsIdentifier,
// appconfig
//
// AppConfig Environments can be imported by using the environment ID and application ID separated by a colon (:)
// terraform-plugin-framework
"aws_appconfig_environment": appConfigEnvironment(),
// eks
//
// PodIdentityAssociation can be imported using the association ID by passing spec.forProvider.clusterName field
"aws_eks_pod_identity_association": eksPodIdentityAssociation(),
// mq
//
// admin
"aws_mq_user": mqUser(),
// opensearchserverless
//
// AccessPolicy can be imported using the policy name
"aws_opensearchserverless_access_policy": config.NameAsIdentifier,
// Collection can be imported using the AWS-assigned collection ID. i.e. ch9rq91uv4yd8rff1f39
"aws_opensearchserverless_collection": opensearchserverlessCollection(),
// LifecyclePolicy can be imported using the policy name
"aws_opensearchserverless_lifecycle_policy": config.NameAsIdentifier,
// SecurityConfig can be imported using the AWS-assigned security config ID
"aws_opensearchserverless_security_config": config.TemplatedStringAsIdentifier("name", "{{ .parameters.type }}/{{ .setup.client_metadata.account_id }}/{{ .external_name }}"),
// SecurityPolicy can be imported using the policy name
"aws_opensearchserverless_security_policy": config.NameAsIdentifier,
// VPCEndpoint can be imported using the AWS-assigned VPC Endpoint ID, i.e. vpce-0a957ae9ed5aee308
"aws_opensearchserverless_vpc_endpoint": opensearchserverlessVpcEndpoint(),
}
// TerraformPluginSDKExternalNameConfigs contains all external name configurations
// belonging to Terraform Plugin SDKv2 resources to be reconciled
// under the no-fork architecture for this provider.
var TerraformPluginSDKExternalNameConfigs = map[string]config.ExternalName{
// ACM
// Imported using ARN that has a random substring:
// arn:aws:acm:eu-central-1:123456789012:certificate/7e7a28d2-163f-4b8f-b9cd-822f96c08d6a
"aws_acm_certificate": config.IdentifierFromProvider,
// No import documented, but https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate_validation#id
"aws_acm_certificate_validation": config.IdentifierFromProvider,
// ACM PCA
// aws_acmpca_certificate can not be imported at this time.
"aws_acmpca_certificate": config.IdentifierFromProvider,
// Imported using ARN that has a random substring:
// // arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012
"aws_acmpca_certificate_authority": config.IdentifierFromProvider,
// No doc on import, but resource is getting CA ARN:
// arn:aws:acm-pca:eu-central-1:609897127049:certificate-authority/ba0c7989-9641-4f36-a033-dee60121d595
"aws_acmpca_certificate_authority_certificate": config.IdentifierFromProvider,
// No import
"aws_acmpca_permission": config.IdentifierFromProvider,
// aws_acmpca_policy can be imported using the resource_arn value
// Example: arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012
"aws_acmpca_policy": config.IdentifierFromProvider,
// amp
//
// ID is a random UUID.
"aws_prometheus_workspace": config.IdentifierFromProvider,
"aws_prometheus_rule_group_namespace": config.TemplatedStringAsIdentifier("name", "arn:aws:aps:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:rulegroupsnamespace/{{ .parameters.workspace_id }}/{{ .external_name }}"),
// Uses the ID of workspace, workspace_id parameter.
"aws_prometheus_alert_manager_definition": config.IdentifierFromProvider,
// apigatewayv2
//
"aws_apigatewayv2_api": config.IdentifierFromProvider,
// Case4: Imported by using the API mapping identifier and domain name.
"aws_apigatewayv2_api_mapping": config.IdentifierFromProvider,
// Case4: Imported by using the API identifier and authorizer identifier.
"aws_apigatewayv2_authorizer": config.IdentifierFromProvider,
// Case4: Imported by using the API identifier and deployment identifier.
"aws_apigatewayv2_deployment": config.IdentifierFromProvider,
"aws_apigatewayv2_domain_name": config.ParameterAsIdentifier("domain_name"),
// Case4: Imported by using the API identifier and integration identifier.
"aws_apigatewayv2_integration": config.IdentifierFromProvider,
// Case4: Imported by using the API identifier, integration identifier and
// integration response identifier.
"aws_apigatewayv2_integration_response": config.IdentifierFromProvider,
// Case4: Imported by using the API identifier and model identifier.
"aws_apigatewayv2_model": config.IdentifierFromProvider,
// Case4: Imported by using the API identifier and route identifier.
"aws_apigatewayv2_route": config.IdentifierFromProvider,
// Case4: Imported by using the API identifier, route identifier and route
// response identifier.
"aws_apigatewayv2_route_response": config.IdentifierFromProvider,
// Imported by using the API identifier and stage name.
"aws_apigatewayv2_stage": config.NameAsIdentifier,
// aws_apigatewayv2_vpc_link can be imported by using the VPC Link id
"aws_apigatewayv2_vpc_link": config.IdentifierFromProvider,
// autoscaling
//
"aws_autoscaling_group": config.NameAsIdentifier,
// No terraform import.
"aws_autoscaling_attachment": config.IdentifierFromProvider,
// DynamoDB Table Items can be imported using the name
"aws_dynamodb_table_item": config.IdentifierFromProvider,
// DynamoDB contributor insights
"aws_dynamodb_contributor_insights": config.IdentifierFromProvider,
// Dynamodb Kinesis streaming destinations are imported using "table_name,stream_arn"
"aws_dynamodb_kinesis_streaming_destination": config.IdentifierFromProvider,
// cloudtrail
//
// Cloudtrails can be imported using the name arn:aws:cloudtrail:us-west-1:153891904029:trail/foobar
"aws_cloudtrail": config.TemplatedStringAsIdentifier("name", "arn:aws:cloudtrail:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:trail/{{ .external_name }}"),
// Event data stores can be imported using their arn
"aws_cloudtrail_event_data_store": config.IdentifierFromProvider,
// cognitoidentity
//
// us-west-2_abc123
"aws_cognito_identity_pool": config.IdentifierFromProvider,
// us-west-2:b64805ad-cb56-40ba-9ffc-f5d8207e6d42
"aws_cognito_identity_pool_roles_attachment": config.IdentifierFromProvider,
// us-west-2_abc123:CorpAD
"aws_cognito_identity_pool_provider_principal_tag": config.IdentifierFromProvider,
// cognitoidp
//
// us-west-2_abc123
"aws_cognito_user_pool": config.IdentifierFromProvider,
// auth.example.org
"aws_cognito_user_pool_domain": config.IdentifierFromProvider,
// us-west-2_ZCTarbt5C,12bu4fuk3mlgqa2rtrujgp6egq
"aws_cognito_user_pool_ui_customization": config.IdentifierFromProvider,
// Cognito User Groups can be imported using the user_pool_id/name attributes concatenated:
// us-east-1_vG78M4goG/user-group
// Following configuration does not work: FormattedIdentifierUserDefinedNameLast("name", "/", "user_pool_id")
// As it fails with a user group not found sync error
// TODO: check if this is due to any diff between Terraform import & apply
// implementations. Currently, the API is not normalized.
"aws_cognito_user_group": config.IdentifierFromProvider,
// us-west-2_abc123|https://example.com
"aws_cognito_resource_server": config.IdentifierFromProvider,
// us-west-2_abc123:CorpAD
"aws_cognito_identity_provider": config.IdentifierFromProvider,
// user_pool_id/name: us-east-1_vG78M4goG/user
"aws_cognito_user": config.TemplatedStringAsIdentifier("username", "{{ .parameters.user_pool_id }}/{{ .external_name }}"),
// no doc
"aws_cognito_user_in_group": config.IdentifierFromProvider,
// Cognito Risk Configurations can be imported using the id
"aws_cognito_risk_configuration": config.IdentifierFromProvider,
// ebs
//
// EBS Volumes can be imported using the id: vol-049df61146c4d7901
"aws_ebs_volume": config.IdentifierFromProvider,
// EBS Snapshot can be imported using the id
"aws_ebs_snapshot": config.IdentifierFromProvider,
// No import
"aws_ebs_snapshot_copy": config.IdentifierFromProvider,
// No import
"aws_ebs_snapshot_import": config.IdentifierFromProvider,
// ec2
//
// Instances can be imported using the id: i-12345678
"aws_instance": config.IdentifierFromProvider,
// No terraform import.
"aws_eip": config.IdentifierFromProvider,
// aws_ec2_tag can be imported by using the EC2 resource identifier and key, separated by a comma (,)
"aws_ec2_tag": config.TemplatedStringAsIdentifier("", "{{ .parameters.resource_id }},{{ .parameters.key }}"),
// Imported by using the EC2 Transit Gateway identifier: tgw-12345678
"aws_ec2_transit_gateway": config.IdentifierFromProvider,
// Imported by using the EC2 Transit Gateway Route Table, an underscore,
// and the destination CIDR: tgw-rtb-12345678_0.0.0.0/0
"aws_ec2_transit_gateway_route": FormattedIdentifierFromProvider("_", "transit_gateway_route_table_id", "destination_cidr_block"),
// Imported by using the EC2 Transit Gateway Route Table identifier:
// tgw-rtb-12345678
"aws_ec2_transit_gateway_route_table": config.IdentifierFromProvider,
// Imported by using the EC2 Transit Gateway Route Table identifier, an
// underscore, and the EC2 Transit Gateway Attachment identifier, e.g.,
// tgw-rtb-12345678_tgw-attach-87654321
"aws_ec2_transit_gateway_route_table_association": FormattedIdentifierFromProvider("_", "transit_gateway_route_table_id", "transit_gateway_attachment_id"),
// Imported by using the EC2 Transit Gateway Attachment identifier:
// tgw-attach-12345678
"aws_ec2_transit_gateway_vpc_attachment": config.IdentifierFromProvider,
// Imported by using the EC2 Transit Gateway Attachment identifier: tgw-attach-12345678
"aws_ec2_transit_gateway_vpc_attachment_accepter": config.IdentifierFromProvider,
// Imported using the id: lt-12345678
"aws_launch_template": config.IdentifierFromProvider,
// Launch configurations can be imported using the name
"aws_launch_configuration": config.NameAsIdentifier,
// Imported using the id: vpc-23123
"aws_vpc": config.IdentifierFromProvider,
// Imported using the vpc endpoint id: vpce-3ecf2a57
"aws_vpc_endpoint": config.IdentifierFromProvider,
// Imported using the subnet id: subnet-9d4a7b6c
"aws_subnet": config.IdentifierFromProvider,
// Imported using the id: eni-e5aa89a3
"aws_network_interface": config.IdentifierFromProvider,
// Imported using the id: sg-903004f8
"aws_security_group": config.IdentifierFromProvider,
// Imported using a very complex format:
// https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule
"aws_security_group_rule": config.IdentifierFromProvider,
// Imported by using the VPC CIDR Association ID: vpc-cidr-assoc-xxxxxxxx
"aws_vpc_ipv4_cidr_block_association": config.IdentifierFromProvider,
// Imported using the vpc peering id: pcx-111aaa111
"aws_vpc_peering_connection": config.IdentifierFromProvider,
// Imported using the vpc peering id: pcx-111aaa111
"aws_vpc_peering_connection_options": config.IdentifierFromProvider,
// Imported using the peering connection id: pcx-12345678
"aws_vpc_peering_connection_accepter": config.IdentifierFromProvider,
// Imported using the following format: ROUTETABLEID_DESTINATION
"aws_route": route(),
// Imported using id: rtb-4e616f6d69
"aws_route_table": config.IdentifierFromProvider,
// Imported using the associated resource ID and Route Table ID separated
// by a forward slash (/)
"aws_route_table_association": config.IdentifierFromProvider,
// No import.
"aws_main_route_table_association": config.IdentifierFromProvider,
// No import
"aws_ec2_transit_gateway_multicast_group_member": config.IdentifierFromProvider,
// No import
"aws_ec2_transit_gateway_multicast_group_source": config.IdentifierFromProvider,
// Imported by using the EC2 Transit Gateway Route Table identifier, an
// underscore, and the EC2 Transit Gateway Attachment identifier:
// tgw-rtb-12345678_tgw-attach-87654321
"aws_ec2_transit_gateway_route_table_propagation": FormattedIdentifierFromProvider("_", "transit_gateway_route_table_id", "transit_gateway_attachment_id"),
// Imported using the id: igw-c0a643a9
"aws_internet_gateway": config.IdentifierFromProvider,
// NAT Gateways can be imported using the id
"aws_nat_gateway": config.IdentifierFromProvider,
// aws_ec2_transit_gateway_multicast_domain can be imported by using the EC2 Transit Gateway Multicast Domain identifier
"aws_ec2_transit_gateway_multicast_domain": config.IdentifierFromProvider,
// No import
"aws_ec2_transit_gateway_multicast_domain_association": config.IdentifierFromProvider,
// aws_ec2_transit_gateway_peering_attachment can be imported by using the EC2 Transit Gateway Attachment identifier
"aws_ec2_transit_gateway_peering_attachment": config.IdentifierFromProvider,
// Prefix List Entries can be imported using the prefix_list_id and cidr separated by a ,
"aws_ec2_managed_prefix_list_entry": FormattedIdentifierFromProvider(",", "prefix_list_id", "cidr"),
// Prefix Lists can be imported using the id
"aws_ec2_managed_prefix_list": config.IdentifierFromProvider,
// aws_ec2_transit_gateway_prefix_list_reference can be imported by using the EC2 Transit Gateway Route Table identifier and EC2 Prefix List identifier, separated by an underscore (_
"aws_ec2_transit_gateway_prefix_list_reference": FormattedIdentifierFromProvider("_", "transit_gateway_route_table_id", "prefix_list_id"),
// Egress-only Internet gateways can be imported using the id
"aws_egress_only_internet_gateway": config.IdentifierFromProvider,
// EIP Assocations can be imported using their association ID.
"aws_eip_association": config.IdentifierFromProvider,
// Flow Logs can be imported using the id
"aws_flow_log": config.IdentifierFromProvider,
// Key Pairs can be imported using the key_name
"aws_key_pair": config.ParameterAsIdentifier("key_name"),
// Network ACLs can be imported using the id
"aws_network_acl": config.IdentifierFromProvider,
// No import
"aws_network_interface_attachment": config.IdentifierFromProvider,
// No import
"aws_network_interface_sg_attachment": config.IdentifierFromProvider,
// Individual rules can be imported using NETWORK_ACL_ID:RULE_NUMBER:PROTOCOL:EGRESS
"aws_network_acl_rule": config.IdentifierFromProvider,
// No import
"aws_spot_instance_request": config.IdentifierFromProvider,
// Spot Fleet Requests can be imported using id
"aws_spot_fleet_request": config.IdentifierFromProvider,
// EBS Volume Attachments can be imported using DEVICE_NAME:VOLUME_ID:INSTANCE_ID
"aws_volume_attachment": config.IdentifierFromProvider,
// VPC DHCP Options can be imported using the dhcp options id
"aws_vpc_dhcp_options": config.IdentifierFromProvider,
// DHCP associations can be imported by providing the VPC ID associated with the options
// terraform import aws_vpc_dhcp_options_association.imported vpc-0f001273ec18911b1
"aws_vpc_dhcp_options_association": config.IdentifierFromProvider,
// VPC Endpoint Services can be imported using the VPC endpoint service id
"aws_vpc_endpoint_service": config.IdentifierFromProvider,
// VPC Endpoint connection notifications can be imported using the VPC endpoint connection notification id
"aws_vpc_endpoint_connection_notification": config.IdentifierFromProvider,
// VPC Endpoint Route Table Associations can be imported using vpc_endpoint_id together with route_table_id
"aws_vpc_endpoint_route_table_association": FormattedIdentifierFromProvider("/", "vpc_endpoint_id", "route_table_id"),
// Placement groups can be imported using the name
"aws_placement_group": config.NameAsIdentifier,
// A Spot Datafeed Subscription can be imported using the word spot-datafeed-subscription
"aws_spot_datafeed_subscription": config.IdentifierFromProvider,
// No import
"aws_vpc_endpoint_service_allowed_principal": config.IdentifierFromProvider,
// VPC Endpoint Subnet Associations can be imported using vpc_endpoint_id together with subnet_id
"aws_vpc_endpoint_subnet_association": FormattedIdentifierFromProvider("/", "vpc_endpoint_id", "subnet_id"),
// VPC Endpoint security group Associations can be imported using vpc_endpoint_id together with security_group_id
"aws_vpc_endpoint_security_group_association": config.IdentifierFromProvider,
// Default VPC route tables can be imported using the vpc_id
"aws_default_route_table": config.IdentifierFromProvider,
// Hosts can be imported using the host id
"aws_ec2_host": config.IdentifierFromProvider,
// Default VPCs can be imported using the vpc id
"aws_default_vpc": config.IdentifierFromProvider,
// Subnets can be imported using the subnet id
"aws_default_subnet": config.IdentifierFromProvider,
// VPC DHCP Options can be imported using the dhcp options id
"aws_default_vpc_dhcp_options": config.IdentifierFromProvider,
// The EBS default KMS CMK can be imported with the KMS key ARN
"aws_ebs_default_kms_key": config.IdentifierFromProvider,
// Default EBS encryption state can be imported
"aws_ebs_encryption_by_default": config.IdentifierFromProvider,
// EC2 Availability Zone Groups can be imported using the group name
"aws_ec2_availability_zone_group": config.ParameterAsIdentifier("group_name"),
// Capacity Reservations can be imported using the id
"aws_ec2_capacity_reservation": config.IdentifierFromProvider,
// aws_ec2_carrier_gateway can be imported using the carrier gateway's ID
"aws_ec2_carrier_gateway": config.IdentifierFromProvider,
// Serial console access state can be imported
"aws_ec2_serial_console_access": config.IdentifierFromProvider,
// Existing CIDR reservations can be imported using SUBNET_ID:RESERVATION_ID
"aws_ec2_subnet_cidr_reservation": config.IdentifierFromProvider,
// Traffic mirror filter can be imported using the id
"aws_ec2_traffic_mirror_filter": config.IdentifierFromProvider,
// Traffic mirror rules can be imported using the traffic_mirror_filter_id and id separated by :
"aws_ec2_traffic_mirror_filter_rule": config.IdentifierFromProvider,
// Traffic mirror targets can be imported using the id
"aws_ec2_transit_gateway_connect": config.IdentifierFromProvider,
// Network Insights Paths can be imported using the id
"aws_ec2_network_insights_path": config.IdentifierFromProvider,
// aws_ec2_transit_gateway_peering_attachment_accepter can be imported by using the EC2 Transit Gateway Attachment identifier
"aws_ec2_transit_gateway_peering_attachment_accepter": config.IdentifierFromProvider,
// No import
"aws_snapshot_create_volume_permission": config.IdentifierFromProvider,
// Customer Gateways can be imported using the id
"aws_customer_gateway": config.IdentifierFromProvider,
// Default Network ACLs can be imported using the id
"aws_default_network_acl": config.IdentifierFromProvider,
// IPAMs can be imported using the ipam pool id
"aws_vpc_ipam_pool": config.IdentifierFromProvider,
// IPAMs can be imported using the scope_id
"aws_vpc_ipam_scope": config.IdentifierFromProvider,
// IPAMs can be imported using the ipam id
"aws_vpc_ipam": config.IdentifierFromProvider,
// IPAMs can be imported using the ipam id
"aws_vpc_ipam_pool_cidr": config.IdentifierFromProvider,
// IPAMs can be imported using the allocation id
"aws_vpc_ipam_pool_cidr_allocation": config.IdentifierFromProvider,
// aws_ami can be imported using the ID of the AMI
"aws_ami": config.IdentifierFromProvider,
// No import
"aws_ami_copy": config.IdentifierFromProvider,
// AMI Launch Permissions can be imported using [ACCOUNT-ID|GROUP-NAME|ORGANIZATION-ARN|ORGANIZATIONAL-UNIT-ARN]/IMAGE-ID
"aws_ami_launch_permission": config.IdentifierFromProvider,
// VPN Connections can be imported using the vpn connection id
"aws_vpn_connection": config.IdentifierFromProvider,
// No import
"aws_vpn_connection_route": config.IdentifierFromProvider,
// VPN Gateways can be imported using the vpn gateway id
"aws_vpn_gateway": config.IdentifierFromProvider,
// No import
"aws_vpn_gateway_attachment": config.IdentifierFromProvider,
// No import
"aws_vpn_gateway_route_propagation": config.IdentifierFromProvider,
// Security Groups can be imported using the security group id
"aws_default_security_group": config.IdentifierFromProvider,
// aws_ec2_transit_gateway_connect_peer can be imported by using the EC2 Transit Gateway Connect Peer identifier
"aws_ec2_transit_gateway_connect_peer": config.IdentifierFromProvider,
// aws_ec2_instance_state can be imported by using the instance_id attribute
"aws_ec2_instance_state": config.IdentifierFromProvider,
// Network Insights Analyses can be imported using the id
"aws_ec2_network_insights_analysis": config.IdentifierFromProvider,
// aws_ec2_transit_gateway_policy_table can be imported by using the EC2 Transit Gateway Policy Table identifier
"aws_ec2_transit_gateway_policy_table": config.IdentifierFromProvider,
// ecr
//
"aws_ecr_repository": config.NameAsIdentifier,
// Imported using the name of the repository.
"aws_ecr_lifecycle_policy": config.IdentifierFromProvider,
// Use the ecr_repository_prefix to import a Pull Through Cache Rule.
"aws_ecr_pull_through_cache_rule": config.IdentifierFromProvider,
// Imported using the registry id, which is not a parameter at all.
"aws_ecr_registry_policy": config.IdentifierFromProvider,
// Imported using the registry id, which is not a parameter at all.
"aws_ecr_registry_scanning_configuration": config.IdentifierFromProvider,
// Imported using the registry id, which is not a parameter at all.
"aws_ecr_replication_configuration": config.IdentifierFromProvider,
// Imported using the parameter called repository but this is not the name
// of the resource, only a configuration/reference.
"aws_ecr_repository_policy": config.IdentifierFromProvider,
// ecrpublic
//
"aws_ecrpublic_repository": config.ParameterAsIdentifier("repository_name"),
// Imported using the repository name.
"aws_ecrpublic_repository_policy": config.IdentifierFromProvider,
// ecs
//
"aws_ecs_cluster": config.TemplatedStringAsIdentifier("name", "arn:aws:ecs:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:cluster/{{ .external_name }}"),
"aws_ecs_service": config.NameAsIdentifier,
"aws_ecs_capacity_provider": config.TemplatedStringAsIdentifier("name", "arn:aws:ecs:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:capacity-provider/{{ .external_name }}"),
// Imported using ARN that has a random substring, revision at the end:
// arn:aws:ecs:us-east-1:012345678910:task-definition/mytaskfamily:123
"aws_ecs_task_definition": config.IdentifierFromProvider,
// ECS Account Setting defaults can be imported using the name
"aws_ecs_account_setting_default": config.IdentifierFromProvider,
// ECS cluster capacity providers can be imported using the cluster_name attribute
"aws_ecs_cluster_capacity_providers": config.IdentifierFromProvider,
// eks
//
"aws_eks_cluster": config.NameAsIdentifier,
// Imported using the cluster_name and node_group_name separated by a
// colon (:): my_cluster:my_node_group
"aws_eks_node_group": config.TemplatedStringAsIdentifier("node_group_name", "{{ .parameters.cluster_name }}:{{ .external_name }}"),
// my_cluster:my_eks_addon
// "aws_eks_addon": config.TemplatedStringAsIdentifier("addon_name", "{{ .parameters.cluster_name }}:{{ .external_name }}"),
"aws_eks_addon": FormattedIdentifierFromProvider(":", "cluster_name", "addon_name"),
// my_cluster:my_fargate_profile
"aws_eks_fargate_profile": FormattedIdentifierUserDefinedNameLast("fargate_profile_name", ":", "cluster_name"),
// It has a complex config, adding empty entry here just to enable it.
"aws_eks_identity_provider_config": eksOIDCIdentityProvider(),
// elasticache
//
"aws_elasticache_parameter_group": config.IdentifierFromProvider,
"aws_elasticache_subnet_group": config.NameAsIdentifier,
"aws_elasticache_cluster": config.ParameterAsIdentifier("cluster_id"),
"aws_elasticache_replication_group": config.ParameterAsIdentifier("replication_group_id"),
"aws_elasticache_user": config.ParameterAsIdentifier("user_id"),
"aws_elasticache_user_group": config.ParameterAsIdentifier("user_group_id"),
// elasticloadbalancing
//
// arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188
"aws_lb": config.IdentifierFromProvider,
// arn:aws:elasticloadbalancing:us-west-2:187416307283:listener/app/front-end-alb/8e4497da625e2d8a/9ab28ade35828f96
"aws_lb_listener": config.IdentifierFromProvider,
// arn:aws:elasticloadbalancing:us-west-2:187416307283:targetgroup/app-front-end/20cfe21448b66314
"aws_lb_target_group": config.IdentifierFromProvider,
// No import.
"aws_lb_target_group_attachment": config.IdentifierFromProvider,
// dynamodb
//
// DynamoDB table replicas can be imported using the table-name:main-region
"aws_dynamodb_table_replica": config.IdentifierFromProvider,
// efs
//
// EFS Replication Configurations can be imported using the file system ID of either the source or destination file system
"aws_efs_replication_configuration": config.IdentifierFromProvider,
// emrserverless
//
// EMR Severless applications can be imported using the id
"aws_emrserverless_application": config.IdentifierFromProvider,
// globalaccelerator
//
// arn:aws:globalaccelerator::111111111111:accelerator/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
"aws_globalaccelerator_accelerator": config.IdentifierFromProvider,
// arn:aws:globalaccelerator::111111111111:accelerator/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/listener/xxxxxxx/endpoint-group/xxxxxxxx
"aws_globalaccelerator_endpoint_group": config.IdentifierFromProvider,
// arn:aws:globalaccelerator::111111111111:accelerator/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/listener/xxxxxxxx
"aws_globalaccelerator_listener": config.IdentifierFromProvider,
// glue
//
// Imported using "name".
"aws_glue_workflow": config.NameAsIdentifier,
// Imported using "name".
"aws_glue_trigger": config.NameAsIdentifier,
"aws_glue_user_defined_function": config.TemplatedStringAsIdentifier("name", "{{ .parameters.catalog_id }}:{{ .parameters.database_name }}:{{ .external_name }}"),
// "aws_glue_security_configuration": config.NameAsIdentifier,
// Imported using the account ID: 12356789012
"aws_glue_resource_policy": config.IdentifierFromProvider,
"aws_glue_catalog_database": config.TemplatedStringAsIdentifier("name", "{{ .parameters.catalog_id }}:{{ .external_name }}"),
"aws_glue_catalog_table": config.TemplatedStringAsIdentifier("name", "{{ .parameters.catalog_id }}:{{ .parameters.database_name }}:{{ .external_name }}"),
"aws_glue_classifier": config.NameAsIdentifier,
// Imported as CATALOG_ID:name 123456789012:MyConnection
"aws_glue_connection": config.TemplatedStringAsIdentifier("name", "{{ .parameters.catalog_id }}:{{ .external_name }}"),
"aws_glue_crawler": config.NameAsIdentifier,
// Imported using CATALOG-ID (AWS account ID if not custom), e.g., 123456789012
"aws_glue_data_catalog_encryption_settings": config.IdentifierFromProvider,
// "aws_glue_dev_endpoint": config.NameAsIdentifier,
"aws_glue_job": config.NameAsIdentifier,
// Imported using id, e.g., tfm-c2cafbe83b1c575f49eaca9939220e2fcd58e2d5
// "aws_glue_ml_transform": config.IdentifierFromProvider,
// It has no naming argument, imported with their catalog ID (usually
// AWS account ID), database name, table name and partition values e.g.,
// 123456789012:MyDatabase:MyTable:val1#val2
// "aws_glue_partition": config.IdentifierFromProvider,
// Documentation does not match schema where there are multiple indexes
// each with their own name.
// "aws_glue_partition_index": config.IdentifierFromProvider,
// Imported using ARN: arn:aws:glue:us-west-2:123456789012:registry/example
"aws_glue_registry": config.TemplatedStringAsIdentifier("registry_name", "arn:aws:glue:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:registry/{{ .external_name }}"),
// Glue Registries can be imported using arn
// Example: arn:aws:glue:us-west-2:123456789012:schema/example/example
"aws_glue_schema": config.IdentifierFromProvider,
// Imported using "name".
"aws_glue_security_configuration": config.NameAsIdentifier,
// iam
//
// AKIA1234567890
"aws_iam_access_key": config.IdentifierFromProvider,
"aws_iam_instance_profile": config.NameAsIdentifier,
// arn:aws:iam::123456789012:policy/UsersManageOwnCredentials
"aws_iam_policy": iamPolicy(),
"aws_iam_user": config.NameAsIdentifier,
"aws_iam_group": config.NameAsIdentifier,
"aws_iam_role": config.NameAsIdentifier,
"aws_iam_role_policy": config.TemplatedStringAsIdentifier("name", "{{ .parameters.role }}:{{ .external_name }}"),
// Imported using the role name and policy arn separated by /
// test-role/arn:aws:iam::xxxxxxxxxxxx:policy/test-policy
"aws_iam_role_policy_attachment": config.IdentifierFromProvider,
// Imported using the user name and policy arn separated by /
// test-user/arn:aws:iam::xxxxxxxxxxxx:policy/test-policy
"aws_iam_user_policy_attachment": config.IdentifierFromProvider,
// Imported using the group name and policy arn separated by /
// test-group/arn:aws:iam::xxxxxxxxxxxx:policy/test-policy
"aws_iam_group_policy_attachment": config.IdentifierFromProvider,
// Imported using the user name and group names separated by /
// user1/group1/group2
"aws_iam_user_group_membership": iamUserGroupMembership(),
// arn:aws:iam::123456789012:oidc-provider/accounts.google.com
"aws_iam_openid_connect_provider": config.IdentifierFromProvider,
// The current Account Alias can be imported using the account_alias
"aws_iam_account_alias": config.ParameterAsIdentifier("account_alias"),
// IAM Account Password Policy can be imported using the word iam-account-password-policy
"aws_iam_account_password_policy": config.IdentifierFromProvider,
// No import
"aws_iam_group_membership": config.IdentifierFromProvider,
// IAM SAML Providers can be imported using the arn
"aws_iam_saml_provider": config.TemplatedStringAsIdentifier("name", "arn:aws:iam::{{ .setup.client_metadata.account_id }}:saml-provider/{{ .external_name }}"),
// IAM Server Certificates can be imported using the name
"aws_iam_server_certificate": config.NameAsIdentifier,
// IAM service-linked roles can be imported using role ARN that contains the
// service name.
"aws_iam_service_linked_role": config.IdentifierFromProvider,
// IAM Service Specific Credentials can be imported using the service_name:user_name:service_specific_credential_id
"aws_iam_service_specific_credential": config.IdentifierFromProvider,
// IAM Signing Certificates can be imported using the id
"aws_iam_signing_certificate": config.IdentifierFromProvider,
// IAM User Login Profiles can be imported without password information support via the IAM User name
"aws_iam_user_login_profile": config.IdentifierFromProvider,
// SSH public keys can be imported using the username, ssh_public_key_id, and encoding
"aws_iam_user_ssh_key": config.IdentifierFromProvider,
// IAM Virtual MFA Devices can be imported using the arn
"aws_iam_virtual_mfa_device": config.IdentifierFromProvider,
// kms
//
// 1234abcd-12ab-34cd-56ef-1234567890ab
"aws_kms_key": config.IdentifierFromProvider,
// KMS aliases are imported using "alias/" + name
"aws_kms_alias": kmsAlias(),
// No import
"aws_kms_ciphertext": config.IdentifierFromProvider,
// KMS External Keys can be imported using the id
"aws_kms_external_key": config.IdentifierFromProvider,
// KMS Grants can be imported using the Key ID and Grant ID separated by a colon (:)
"aws_kms_grant": config.IdentifierFromProvider,
// KMS multi-Region replica keys can be imported using the id
"aws_kms_replica_external_key": config.IdentifierFromProvider,
// KMS multi-Region replica keys can be imported using the id
"aws_kms_replica_key": config.IdentifierFromProvider,
// mq
//
// a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
"aws_mq_broker": config.IdentifierFromProvider,
// c-0187d1eb-88c8-475a-9b79-16ef5a10c94f
"aws_mq_configuration": config.IdentifierFromProvider,
// neptune
//
"aws_neptune_cluster": config.ParameterAsIdentifier("cluster_identifier"),
// my_cluster:my_cluster_endpoint
"aws_neptune_cluster_endpoint": FormattedIdentifierUserDefinedNameLast("cluster_endpoint_identifier", ":", "cluster_identifier"),
"aws_neptune_cluster_instance": config.ParameterAsIdentifier("identifier"),
"aws_neptune_cluster_parameter_group": config.NameAsIdentifier,
"aws_neptune_cluster_snapshot": config.ParameterAsIdentifier("db_cluster_snapshot_identifier"),
"aws_neptune_event_subscription": config.NameAsIdentifier,
"aws_neptune_parameter_group": config.NameAsIdentifier,
"aws_neptune_subnet_group": config.NameAsIdentifier,
// aws_neptune_global_cluster can be imported by using the Global Cluster identifier
"aws_neptune_global_cluster": config.ParameterAsIdentifier("global_cluster_identifier"),
// rds
//
"aws_rds_cluster": config.ParameterAsIdentifier("cluster_identifier"),
"aws_db_instance": config.IdentifierFromProvider,
"aws_db_parameter_group": config.NameAsIdentifier,
"aws_db_subnet_group": config.NameAsIdentifier,
// aws_db_instance_role_association can be imported using the DB Instance Identifier and IAM Role ARN separated by a comma
// $ terraform import aws_db_instance_role_association.example my-db-instance,arn:aws:iam::123456789012:role/my-role
"aws_db_instance_role_association": config.IdentifierFromProvider,
// DB Option groups can be imported using the name
"aws_db_option_group": config.NameAsIdentifier,
// DB proxies can be imported using the name
"aws_db_proxy": config.NameAsIdentifier,
// DB proxy default target groups can be imported using the db_proxy_name
"aws_db_proxy_default_target_group": config.IdentifierFromProvider,
// DB proxy endpoints can be imported using the DB-PROXY-NAME/DB-PROXY-ENDPOINT-NAME
"aws_db_proxy_endpoint": config.TemplatedStringAsIdentifier("db_proxy_endpoint_name", "{{ .external_name }}/{{ .parameters.db_proxy_name }}"),
// RDS DB Proxy Targets can be imported using the db_proxy_name, target_group_name, target type (e.g., RDS_INSTANCE or TRACKED_CLUSTER), and resource identifier separated by forward slashes (/)
"aws_db_proxy_target": config.IdentifierFromProvider,
// NOTE(turkenf): The resource aws_db_security_group is deprecated,
// Please see: https://github.com/upbound/provider-aws/issues/696
// aws_db_snapshot can be imported by using the snapshot identifier
"aws_db_snapshot": config.ParameterAsIdentifier("db_snapshot_identifier"),
// RDS Aurora Cluster Database Activity Streams can be imported using the resource_arn
"aws_rds_cluster_activity_stream": config.IdentifierFromProvider,
// RDS Clusters Endpoint can be imported using the cluster_endpoint_identifier
"aws_rds_cluster_endpoint": config.ParameterAsIdentifier("cluster_endpoint_identifier"),
// RDS Cluster Instances can be imported using the identifier
"aws_rds_cluster_instance": config.ParameterAsIdentifier("identifier"),
// RDS Cluster Parameter Groups can be imported using the name
"aws_rds_cluster_parameter_group": config.NameAsIdentifier,
// aws_rds_cluster_role_association can be imported using the DB Cluster Identifier and IAM Role ARN separated by a comma (,)
// $ terraform import aws_rds_cluster_role_association.example my-db-cluster,arn:aws:iam::123456789012:role/my-role
"aws_rds_cluster_role_association": FormattedIdentifierFromProvider(",", "db_cluster_identifier", "role_arn"),
// aws_rds_global_cluster can be imported by using the RDS Global Cluster identifie
"aws_rds_global_cluster": config.ParameterAsIdentifier("global_cluster_identifier"),
// aws_db_cluster_snapshot can be imported by using the cluster snapshot identifier
"aws_db_cluster_snapshot": config.IdentifierFromProvider,
// DB Event Subscriptions can be imported using the name
"aws_db_event_subscription": config.NameAsIdentifier,
// RDS instance automated backups replication can be imported using the arn
"aws_db_instance_automated_backups_replication": config.IdentifierFromProvider,
// aws_db_snapshot_copy can be imported by using the snapshot identifier
"aws_db_snapshot_copy": config.IdentifierFromProvider,
// route53
//
// N1PA6795SAMPLE
"aws_route53_delegation_set": config.IdentifierFromProvider,
// abcdef11-2222-3333-4444-555555fedcba
"aws_route53_health_check": config.IdentifierFromProvider,
// Z1D633PJN98FT9
"aws_route53_hosted_zone_dnssec": config.IdentifierFromProvider,
// Imported by using the Route 53 Hosted Zone identifier and KMS Key
// identifier, separated by a comma (,), e.g., Z1D633PJN98FT9,example
// disabled until it's successfully tested
// "aws_route53_key_signing_key": FormattedIdentifierUserDefinedNameLast("name", ",", "hosted_zone_id"),
// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// disabled until it's successfully tested
// "aws_route53_query_log": config.IdentifierFromProvider,
// Imported using ID of the record, which is the zone identifier, record
// name, and record type, separated by underscores (_)
// Z4KAPRWWNC7JR_dev.example.com_NS
"aws_route53_record": config.IdentifierFromProvider,
// Z123456ABCDEFG:vpc-12345678
"aws_route53_vpc_association_authorization": FormattedIdentifierFromProvider(":", "zone_id", "vpc_id"),
// Z1D633PJN98FT9
"aws_route53_zone": config.IdentifierFromProvider,
// Z123456ABCDEFG:vpc-12345678
// "aws_route53_zone_association": FormattedIdentifierFromProvider(":", "zone_id", "vpc_id"),
"aws_route53_zone_association": FormattedIdentifierFromProvider(":", "zone_id", "vpc_id"),
// Imported using the id and version, e.g.,
// 01a52019-d16f-422a-ae72-c306d2b6df7e/1
"aws_route53_traffic_policy": config.IdentifierFromProvider,
// df579d9a-6396-410e-ac22-e7ad60cf9e7e
"aws_route53_traffic_policy_instance": config.IdentifierFromProvider,
// route53resolver
//
// rdsc-be1866ecc1683e95
// disabled until it's successfully tested
// "aws_route53_resolver_dnssec_config": config.IdentifierFromProvider,
// rslvr-in-abcdef01234567890
"aws_route53_resolver_endpoint": config.IdentifierFromProvider,
// rdsc-be1866ecc1683e95
// disabled until it's successfully tested
// "aws_route53_resolver_firewall_config": config.IdentifierFromProvider,
// rslvr-fdl-0123456789abcdef
// disabled until it's successfully tested
// "aws_route53_resolver_firewall_domain_list": config.IdentifierFromProvider,
// Imported using the Route 53 Resolver DNS Firewall rule group ID and
// domain list ID separated by ':', e.g.,
// rslvr-frg-0123456789abcdef:rslvr-fdl-0123456789abcdef
// disabled until it's successfully tested
// "aws_route53_resolver_firewall_rule": config.IdentifierFromProvider,
// rslvr-frg-0123456789abcdef
// disabled until it's successfully tested
// "aws_route53_resolver_firewall_rule_group": config.IdentifierFromProvider,
// rslvr-frgassoc-0123456789abcdef
// disabled until it's successfully tested
// "aws_route53_resolver_firewall_rule_group_association": config.IdentifierFromProvider,
// rqlc-92edc3b1838248bf
// disabled until it's successfully tested
// "aws_route53_resolver_query_log_config": config.IdentifierFromProvider,
// rqlca-b320624fef3c4d70
// disabled until it's successfully tested
// "aws_route53_resolver_query_log_config_association": config.IdentifierFromProvider,
// rslvr-rr-0123456789abcdef0
"aws_route53_resolver_rule": config.IdentifierFromProvider,
// rslvr-rrassoc-97242eaf88example
"aws_route53_resolver_rule_association": config.IdentifierFromProvider,
// Route 53 Resolver configs can be imported using the Route 53 Resolver config ID
"aws_route53_resolver_config": config.IdentifierFromProvider,
// s3
//
// S3 bucket can be imported using the bucket
"aws_s3_bucket": config.ParameterAsIdentifier("bucket"),
// the S3 bucket accelerate configuration resource should be imported using the bucket
"aws_s3_bucket_object_lock_configuration": config.IdentifierFromProvider,
// the S3 bucket accelerate configuration resource should be imported using the bucket
"aws_s3_bucket_accelerate_configuration": config.IdentifierFromProvider,
// the S3 bucket ACL resource should be imported using the bucket
"aws_s3_bucket_acl": config.IdentifierFromProvider,
// S3 bucket analytics configurations can be imported using bucket:analytics
"aws_s3_bucket_analytics_configuration": FormattedIdentifierFromProvider(":", "bucket", "name"),
// The S3 bucket CORS configuration resource should be imported using the bucket
"aws_s3_bucket_cors_configuration": config.IdentifierFromProvider,
// S3 bucket intelligent tiering configurations can be imported using bucket:name
// $ terraform import aws_s3_bucket_intelligent_tiering_configuration.my-bucket-entire-bucket my-bucket:EntireBucket
"aws_s3_bucket_intelligent_tiering_configuration": FormattedIdentifierFromProvider(":", "bucket", "name"),
// S3 bucket inventory configurations can be imported using bucket:inventory
// $ terraform import aws_s3_bucket_inventory.my-bucket-entire-bucket my-bucket:EntireBucket
"aws_s3_bucket_inventory": FormattedIdentifierFromProvider(":", "bucket", "name"),
// The S3 bucket lifecycle configuration resource should be imported using the bucket
"aws_s3_bucket_lifecycle_configuration": config.IdentifierFromProvider,
// The S3 bucket logging resource should be imported using the bucket
"aws_s3_bucket_logging": config.IdentifierFromProvider,
// S3 bucket metric configurations can be imported using bucket:metric
"aws_s3_bucket_metric": FormattedIdentifierFromProvider(":", "bucket", "name"),
// S3 bucket notification can be imported using the bucket
"aws_s3_bucket_notification": config.IdentifierFromProvider,
// Objects can be imported using the id. The id is the bucket name and the key together
"aws_s3_bucket_object": config.IdentifierFromProvider,
// S3 Bucket Ownership Controls can be imported using S3 Bucket name
"aws_s3_bucket_ownership_controls": config.IdentifierFromProvider,
// S3 bucket policies can be imported using the bucket name
"aws_s3_bucket_policy": config.IdentifierFromProvider,
// aws_s3_bucket_public_access_block can be imported by using the bucket name
"aws_s3_bucket_public_access_block": config.IdentifierFromProvider,
// S3 bucket replication configuration can be imported using the bucket
"aws_s3_bucket_replication_configuration": config.IdentifierFromProvider,
// The S3 bucket request payment configuration resource should be imported using the bucket
"aws_s3_bucket_request_payment_configuration": config.IdentifierFromProvider,
// The S3 server-side encryption configuration resource should be imported using the bucket
"aws_s3_bucket_server_side_encryption_configuration": config.IdentifierFromProvider,
// The S3 bucket versioning resource should be imported using the bucket
"aws_s3_bucket_versioning": config.IdentifierFromProvider,
// The S3 bucket website configuration resource should be imported using the bucket
"aws_s3_bucket_website_configuration": config.IdentifierFromProvider,
// Objects can be imported using the id. The id is the bucket name and the key together
// $ terraform import aws_s3_object.object some-bucket-name/some/key.txt
"aws_s3_object": FormattedIdentifierFromProvider("/", "bucket", "key"),
// No import
// TODO: For now API is not normalized. While testing resource we can check the actual ID and normalize the API.
"aws_s3_object_copy": config.IdentifierFromProvider,
// cloudfront
//
// Cloudfront Cache Policies can be imported using the id
"aws_cloudfront_cache_policy": config.IdentifierFromProvider,
// Cloudfront Distributions can be imported using the id
"aws_cloudfront_distribution": config.IdentifierFromProvider,
// Cloudfront Field Level Encryption Config can be imported using the id
"aws_cloudfront_field_level_encryption_config": config.IdentifierFromProvider,
// Cloudfront Field Level Encryption Profile can be imported using the id
"aws_cloudfront_field_level_encryption_profile": config.IdentifierFromProvider,
// CloudFront Functions can be imported using the name
"aws_cloudfront_function": config.NameAsIdentifier,
// CloudFront Key Group can be imported using the id
"aws_cloudfront_key_group": config.IdentifierFromProvider,
// CloudFront monitoring subscription can be imported using the id
"aws_cloudfront_monitoring_subscription": config.IdentifierFromProvider,
// Cloudfront Origin Access Identities can be imported using the id
"aws_cloudfront_origin_access_identity": config.IdentifierFromProvider,
// No import documented, but https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_origin_request_policy#name
"aws_cloudfront_origin_request_policy": config.NameAsIdentifier,
// CloudFront Public Key can be imported using the id
"aws_cloudfront_public_key": config.IdentifierFromProvider,
// CloudFront real-time log configurations can be imported using the ARN,
// $ terraform import aws_cloudfront_realtime_log_config.example arn:aws:cloudfront::111122223333:realtime-log-config/ExampleNameForRealtimeLogConfig
"aws_cloudfront_realtime_log_config": config.IdentifierFromProvider,
// Cloudfront Response Headers Policies can be imported using the id
"aws_cloudfront_response_headers_policy": config.IdentifierFromProvider,
// CloudFront Origin Access Control can be imported using the id
"aws_cloudfront_origin_access_control": config.IdentifierFromProvider,
// resource groups
// Resource groups can be imported using the name
"aws_resourcegroups_group": config.NameAsIdentifier,
// docdb
//
// DocDB Clusters can be imported using the cluster_identifier
"aws_docdb_cluster": config.ParameterAsIdentifier("cluster_identifier"),
// aws_docdb_global_cluster can be imported by using the Global Cluster id
"aws_docdb_global_cluster": config.IdentifierFromProvider,
// DocDB Cluster Instances can be imported using the identifier
"aws_docdb_cluster_instance": config.ParameterAsIdentifier("identifier"),
// DocumentDB Subnet groups can be imported using the name
"aws_docdb_subnet_group": config.NameAsIdentifier,
// DocumentDB Cluster Parameter Groups can be imported using the name
"aws_docdb_cluster_parameter_group": config.NameAsIdentifier,
// aws_docdb_cluster_snapshot can be imported by using the cluster snapshot identifier
"aws_docdb_cluster_snapshot": config.ParameterAsIdentifier("db_cluster_snapshot_identifier"),
// DocDB Event Subscriptions can be imported using the name
"aws_docdb_event_subscription": config.NameAsIdentifier,
// efs
//
// The EFS file systems can be imported using the id
"aws_efs_file_system": config.IdentifierFromProvider,
// The EFS mount targets can be imported using the id
"aws_efs_mount_target": config.IdentifierFromProvider,
// The EFS access points can be imported using the id
"aws_efs_access_point": config.IdentifierFromProvider,
// The EFS backup policies can be imported using the id
"aws_efs_backup_policy": config.IdentifierFromProvider,
// The EFS file system policies can be imported using the id
"aws_efs_file_system_policy": config.IdentifierFromProvider,
// servicediscovery
//
// Service Discovery Private DNS Namespace can be imported using the namespace ID and VPC ID: 0123456789:vpc-123345
"aws_service_discovery_private_dns_namespace": config.IdentifierFromProvider,
// Service Discovery Public DNS Namespace can be imported using the namespace ID
"aws_service_discovery_public_dns_namespace": config.IdentifierFromProvider,
// Service Discovery HTTP Namespace can be imported using the namespace ID,
"aws_service_discovery_http_namespace": config.IdentifierFromProvider,
// Service Discovery Service can be imported using the service ID
"aws_service_discovery_service": config.IdentifierFromProvider,
// sqs
//
// SQS Queues can be imported using the queue url / id
"aws_sqs_queue": config.IdentifierFromProvider,
// SQS Queue Policies can be imported using the queue URL
// e.g. https://queue.amazonaws.com/0123456789012/myqueue
"aws_sqs_queue_policy": config.IdentifierFromProvider,
// secretsmanager
//
// It be imported by using the secret Amazon Resource Name (ARN)
// However, the real ID of the Secret has an Amazon-assigned random suffix,
// i.e. if you name it with `example`, the real ID is
// arn:aws:secretsmanager:us-west-1:609897127049:secret:example-VaznFM
"aws_secretsmanager_secret": config.IdentifierFromProvider,
// It uses ARN of secret and a randomly assigned ID.
"aws_secretsmanager_secret_version": config.IdentifierFromProvider,
// It uses its own secret_id parameter.
"aws_secretsmanager_secret_rotation": config.IdentifierFromProvider,
// It uses its own secert_arn parameter.
"aws_secretsmanager_secret_policy": config.IdentifierFromProvider,
// transfer
//
// Transfer Servers can be imported using the id
"aws_transfer_server": config.IdentifierFromProvider,
// Transfer Users can be imported using the server_id and user_name separated by /
"aws_transfer_user": FormattedIdentifierUserDefinedNameLast("user_name", "/", "server_id"),
// Transfer SSH Public Key can be imported using the server_id and user_name and ssh_public_key_id separated by /
// Example: s-12345678/test-username/key-12345
"aws_transfer_ssh_key": config.IdentifierFromProvider,
// Transfer Workflows can be imported using the worflow_idgit
"aws_transfer_workflow": config.IdentifierFromProvider,
// dynamodb
//
// DynamoDB tables can be imported using the name
"aws_dynamodb_table": config.NameAsIdentifier,
// DynamoDB Global Tables can be imported using the global table name
"aws_dynamodb_global_table": config.NameAsIdentifier,
// aws_dynamodb_tag can be imported by using the DynamoDB resource identifier and key, separated by a comma (,)
"aws_dynamodb_tag": config.TemplatedStringAsIdentifier("", "{{ .parameters.resource_arn }},{{ .parameters.key }}"),
// sns
//
// SNS Topics can be imported using the topic arn
"aws_sns_topic": config.TemplatedStringAsIdentifier("name", "arn:aws:sns:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:{{ .external_name }}"),
// SNS Topic Subscriptions can be imported using the subscription arn that
// contains a random substring in the end.
"aws_sns_topic_subscription": config.IdentifierFromProvider,
// backup
//
// Backup Framework can be imported using the id which corresponds to the name of the Backup Framework
"aws_backup_framework": config.IdentifierFromProvider,
// Backup Global Settings can be imported using the id
"aws_backup_global_settings": config.IdentifierFromProvider,
// Backup Plan can be imported using the id
"aws_backup_plan": config.IdentifierFromProvider,
// Backup vault can be imported using the name
"aws_backup_vault": config.NameAsIdentifier,
// Backup Region Settings can be imported using the region
"aws_backup_region_settings": config.IdentifierFromProvider,
// Backup Report Plan can be imported using the id which corresponds to the name of the Backup Report Plan
"aws_backup_report_plan": config.IdentifierFromProvider,
// Backup selection can be imported using the role plan_id and id separated by | plan-id|selection-id
"aws_backup_selection": config.IdentifierFromProvider,
// Backup vault lock configuration can be imported using the name of the backup vault
"aws_backup_vault_lock_configuration": config.IdentifierFromProvider,
// Backup vault notifications can be imported using the name of the backup vault
"aws_backup_vault_notifications": config.IdentifierFromProvider,
// Backup vault policy can be imported using the name of the backup vault
"aws_backup_vault_policy": config.IdentifierFromProvider,
// grafana
//
// Grafana Workspace can be imported using the workspace's id
"aws_grafana_workspace": config.IdentifierFromProvider,
// No import
"aws_grafana_role_association": config.IdentifierFromProvider,
// Grafana Workspace SAML configuration can be imported using the workspace's id
"aws_grafana_workspace_saml_configuration": FormattedIdentifierFromProvider("", "workspace_id"),
// gamelift
//
// GameLift Aliases can be imported using the ID
"aws_gamelift_alias": config.IdentifierFromProvider,
// GameLift Builds can be imported using the ID
"aws_gamelift_build": config.IdentifierFromProvider,
// GameLift Fleets can be imported using the ID
"aws_gamelift_fleet": config.IdentifierFromProvider,
// GameLift Game Session Queues can be imported by their name
"aws_gamelift_game_session_queue": config.NameAsIdentifier,
// GameLift Scripts can be imported using the ID
"aws_gamelift_script": config.IdentifierFromProvider,
// kinesis
//
// Even though the documentation says the ID is name, it uses ARN..
"aws_kinesis_stream": config.TemplatedStringAsIdentifier("name", "arn:aws:kinesis:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:stream/{{ .external_name }}"),
// Kinesis Stream Consumers can be imported using the Amazon Resource Name (ARN)
// that has a random substring.
"aws_kinesis_stream_consumer": config.IdentifierFromProvider,
// kinesisanalytics
//
"aws_kinesis_analytics_application": config.TemplatedStringAsIdentifier("name", "arn:aws:kinesisanalytics:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:application/{{ .external_name }}"),
// kinesisanalyticsv2
//
"aws_kinesisanalyticsv2_application": config.TemplatedStringAsIdentifier("name", "arn:aws:kinesisanalytics:{{ .setup.configuration.region }}:{{ .setup.client_metadata.account_id }}:application/{{ .external_name }}"),
// aws_kinesisanalyticsv2_application can be imported by using application_name together with snapshot_name
// e.g. example-application/example-snapshot
"aws_kinesisanalyticsv2_application_snapshot": FormattedIdentifierUserDefinedNameLast("snapshot_name", "/", "application_name"),
// kinesisvideo
//
// Kinesis Streams can be imported using the arn that has a random substring
// in the end.
// arn:aws:kinesisvideo:us-west-2:123456789012:stream/terraform-kinesis-test/1554978910975
"aws_kinesis_video_stream": config.IdentifierFromProvider,
// firehose
//
"aws_kinesis_firehose_delivery_stream": config.IdentifierFromProvider,
// lakeformation
//
// No import
"aws_lakeformation_data_lake_settings": config.IdentifierFromProvider,
// No import
"aws_lakeformation_permissions": config.IdentifierFromProvider,
// No import
"aws_lakeformation_resource": config.IdentifierFromProvider,
// lexmodels
//