|
617 | 617 | "amzn2InstanceRole3F1DBBD2"
|
618 | 618 | ]
|
619 | 619 | },
|
620 |
| - "al2022InstanceSecurityGroupD2B46A06": { |
| 620 | + "al2023InstanceSecurityGroupB018A9BC": { |
621 | 621 | "Type": "AWS::EC2::SecurityGroup",
|
622 | 622 | "Properties": {
|
623 |
| - "GroupDescription": "integ-ec2-machine-image-test/al2022/InstanceSecurityGroup", |
| 623 | + "GroupDescription": "integ-ec2-machine-image-test/al2023/InstanceSecurityGroup", |
624 | 624 | "SecurityGroupEgress": [
|
625 | 625 | {
|
626 | 626 | "CidrIp": "0.0.0.0/0",
|
|
631 | 631 | "Tags": [
|
632 | 632 | {
|
633 | 633 | "Key": "Name",
|
634 |
| - "Value": "integ-ec2-machine-image-test/al2022" |
| 634 | + "Value": "integ-ec2-machine-image-test/al2023" |
635 | 635 | }
|
636 | 636 | ],
|
637 | 637 | "VpcId": {
|
638 | 638 | "Ref": "Vpc8378EB38"
|
639 | 639 | }
|
640 | 640 | }
|
641 | 641 | },
|
642 |
| - "al2022InstanceRole6711C818": { |
| 642 | + "al2023InstanceRoleECC2D6DD": { |
643 | 643 | "Type": "AWS::IAM::Role",
|
644 | 644 | "Properties": {
|
645 | 645 | "AssumeRolePolicyDocument": {
|
|
657 | 657 | "Tags": [
|
658 | 658 | {
|
659 | 659 | "Key": "Name",
|
660 |
| - "Value": "integ-ec2-machine-image-test/al2022" |
| 660 | + "Value": "integ-ec2-machine-image-test/al2023" |
661 | 661 | }
|
662 | 662 | ]
|
663 | 663 | }
|
664 | 664 | },
|
665 |
| - "al2022InstanceProfileAA7ED3DD": { |
| 665 | + "al2023InstanceProfileAB8077E0": { |
666 | 666 | "Type": "AWS::IAM::InstanceProfile",
|
667 | 667 | "Properties": {
|
668 | 668 | "Roles": [
|
669 | 669 | {
|
670 |
| - "Ref": "al2022InstanceRole6711C818" |
| 670 | + "Ref": "al2023InstanceRoleECC2D6DD" |
671 | 671 | }
|
672 | 672 | ]
|
673 | 673 | }
|
674 | 674 | },
|
675 |
| - "al20225AC492C0": { |
| 675 | + "al20231AC01FE4": { |
676 | 676 | "Type": "AWS::EC2::Instance",
|
677 | 677 | "Properties": {
|
678 | 678 | "AvailabilityZone": "test-region-1a",
|
679 | 679 | "IamInstanceProfile": {
|
680 |
| - "Ref": "al2022InstanceProfileAA7ED3DD" |
| 680 | + "Ref": "al2023InstanceProfileAB8077E0" |
681 | 681 | },
|
682 | 682 | "ImageId": {
|
683 |
| - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestal2022amikernel515x8664C96584B6F00A464EAD1953AFF4B05118Parameter" |
| 683 | + "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestal2023amikernel61x8664C96584B6F00A464EAD1953AFF4B05118Parameter" |
684 | 684 | },
|
685 | 685 | "InstanceType": "t3.nano",
|
686 | 686 | "SecurityGroupIds": [
|
687 | 687 | {
|
688 | 688 | "Fn::GetAtt": [
|
689 |
| - "al2022InstanceSecurityGroupD2B46A06", |
| 689 | + "al2023InstanceSecurityGroupB018A9BC", |
690 | 690 | "GroupId"
|
691 | 691 | ]
|
692 | 692 | }
|
|
697 | 697 | "Tags": [
|
698 | 698 | {
|
699 | 699 | "Key": "Name",
|
700 |
| - "Value": "integ-ec2-machine-image-test/al2022" |
| 700 | + "Value": "integ-ec2-machine-image-test/al2023" |
701 | 701 | }
|
702 | 702 | ],
|
703 | 703 | "UserData": {
|
704 | 704 | "Fn::Base64": "#!/bin/bash"
|
705 | 705 | }
|
706 | 706 | },
|
707 | 707 | "DependsOn": [
|
708 |
| - "al2022InstanceRole6711C818" |
| 708 | + "al2023InstanceRoleECC2D6DD" |
709 | 709 | ]
|
710 | 710 | },
|
711 |
| - "al2023InstanceSecurityGroupB018A9BC": { |
| 711 | + "AmiParameter": { |
| 712 | + "Type": "AWS::SSM::Parameter", |
| 713 | + "Properties": { |
| 714 | + "Type": "String", |
| 715 | + "Value": "ami-06ca3ca175f37dd66", |
| 716 | + "DataType": "aws:ec2:image", |
| 717 | + "Name": "myAmi" |
| 718 | + } |
| 719 | + }, |
| 720 | + "ssmresolveinstanceInstanceSecurityGroupEACCDB27": { |
712 | 721 | "Type": "AWS::EC2::SecurityGroup",
|
713 | 722 | "Properties": {
|
714 |
| - "GroupDescription": "integ-ec2-machine-image-test/al2023/InstanceSecurityGroup", |
| 723 | + "GroupDescription": "integ-ec2-machine-image-test/ssm-resolve-instance/InstanceSecurityGroup", |
715 | 724 | "SecurityGroupEgress": [
|
716 | 725 | {
|
717 | 726 | "CidrIp": "0.0.0.0/0",
|
|
722 | 731 | "Tags": [
|
723 | 732 | {
|
724 | 733 | "Key": "Name",
|
725 |
| - "Value": "integ-ec2-machine-image-test/al2023" |
| 734 | + "Value": "integ-ec2-machine-image-test/ssm-resolve-instance" |
726 | 735 | }
|
727 | 736 | ],
|
728 | 737 | "VpcId": {
|
729 | 738 | "Ref": "Vpc8378EB38"
|
730 | 739 | }
|
731 | 740 | }
|
732 | 741 | },
|
733 |
| - "al2023InstanceRoleECC2D6DD": { |
| 742 | + "ssmresolveinstanceInstanceRoleCC771AEF": { |
734 | 743 | "Type": "AWS::IAM::Role",
|
735 | 744 | "Properties": {
|
736 | 745 | "AssumeRolePolicyDocument": {
|
|
748 | 757 | "Tags": [
|
749 | 758 | {
|
750 | 759 | "Key": "Name",
|
751 |
| - "Value": "integ-ec2-machine-image-test/al2023" |
| 760 | + "Value": "integ-ec2-machine-image-test/ssm-resolve-instance" |
752 | 761 | }
|
753 | 762 | ]
|
754 | 763 | }
|
755 | 764 | },
|
756 |
| - "al2023InstanceProfileAB8077E0": { |
| 765 | + "ssmresolveinstanceInstanceProfileAD70EB72": { |
757 | 766 | "Type": "AWS::IAM::InstanceProfile",
|
758 | 767 | "Properties": {
|
759 | 768 | "Roles": [
|
760 | 769 | {
|
761 |
| - "Ref": "al2023InstanceRoleECC2D6DD" |
| 770 | + "Ref": "ssmresolveinstanceInstanceRoleCC771AEF" |
762 | 771 | }
|
763 | 772 | ]
|
764 | 773 | }
|
765 | 774 | },
|
766 |
| - "al20231AC01FE4": { |
| 775 | + "ssmresolveinstanceDC2C8573": { |
767 | 776 | "Type": "AWS::EC2::Instance",
|
768 | 777 | "Properties": {
|
769 | 778 | "AvailabilityZone": "test-region-1a",
|
770 | 779 | "IamInstanceProfile": {
|
771 |
| - "Ref": "al2023InstanceProfileAB8077E0" |
772 |
| - }, |
773 |
| - "ImageId": { |
774 |
| - "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestal2023amikernel61x8664C96584B6F00A464EAD1953AFF4B05118Parameter" |
| 780 | + "Ref": "ssmresolveinstanceInstanceProfileAD70EB72" |
775 | 781 | },
|
| 782 | + "ImageId": "resolve:ssm:myAmi", |
776 | 783 | "InstanceType": "t3.nano",
|
777 | 784 | "SecurityGroupIds": [
|
778 | 785 | {
|
779 | 786 | "Fn::GetAtt": [
|
780 |
| - "al2023InstanceSecurityGroupB018A9BC", |
| 787 | + "ssmresolveinstanceInstanceSecurityGroupEACCDB27", |
781 | 788 | "GroupId"
|
782 | 789 | ]
|
783 | 790 | }
|
|
788 | 795 | "Tags": [
|
789 | 796 | {
|
790 | 797 | "Key": "Name",
|
791 |
| - "Value": "integ-ec2-machine-image-test/al2023" |
| 798 | + "Value": "integ-ec2-machine-image-test/ssm-resolve-instance" |
792 | 799 | }
|
793 | 800 | ],
|
794 | 801 | "UserData": {
|
795 | 802 | "Fn::Base64": "#!/bin/bash"
|
796 | 803 | }
|
797 | 804 | },
|
798 | 805 | "DependsOn": [
|
799 |
| - "al2023InstanceRoleECC2D6DD" |
| 806 | + "ssmresolveinstanceInstanceRoleCC771AEF" |
800 | 807 | ]
|
| 808 | + }, |
| 809 | + "LTC4631592": { |
| 810 | + "Type": "AWS::EC2::LaunchTemplate", |
| 811 | + "Properties": { |
| 812 | + "LaunchTemplateData": { |
| 813 | + "ImageId": "resolve:ssm:myAmi", |
| 814 | + "InstanceType": "t3.nano", |
| 815 | + "TagSpecifications": [ |
| 816 | + { |
| 817 | + "ResourceType": "instance", |
| 818 | + "Tags": [ |
| 819 | + { |
| 820 | + "Key": "Name", |
| 821 | + "Value": "integ-ec2-machine-image-test/LT" |
| 822 | + } |
| 823 | + ] |
| 824 | + }, |
| 825 | + { |
| 826 | + "ResourceType": "volume", |
| 827 | + "Tags": [ |
| 828 | + { |
| 829 | + "Key": "Name", |
| 830 | + "Value": "integ-ec2-machine-image-test/LT" |
| 831 | + } |
| 832 | + ] |
| 833 | + } |
| 834 | + ], |
| 835 | + "UserData": { |
| 836 | + "Fn::Base64": "#!/bin/bash" |
| 837 | + } |
| 838 | + }, |
| 839 | + "TagSpecifications": [ |
| 840 | + { |
| 841 | + "ResourceType": "launch-template", |
| 842 | + "Tags": [ |
| 843 | + { |
| 844 | + "Key": "Name", |
| 845 | + "Value": "integ-ec2-machine-image-test/LT" |
| 846 | + } |
| 847 | + ] |
| 848 | + } |
| 849 | + ] |
| 850 | + } |
| 851 | + }, |
| 852 | + "ASG46ED3070": { |
| 853 | + "Type": "AWS::AutoScaling::AutoScalingGroup", |
| 854 | + "Properties": { |
| 855 | + "MaxSize": "1", |
| 856 | + "MinSize": "1", |
| 857 | + "DesiredCapacity": "1", |
| 858 | + "LaunchTemplate": { |
| 859 | + "LaunchTemplateId": { |
| 860 | + "Ref": "LTC4631592" |
| 861 | + }, |
| 862 | + "Version": { |
| 863 | + "Fn::GetAtt": [ |
| 864 | + "LTC4631592", |
| 865 | + "LatestVersionNumber" |
| 866 | + ] |
| 867 | + } |
| 868 | + }, |
| 869 | + "VPCZoneIdentifier": [ |
| 870 | + { |
| 871 | + "Ref": "VpcPrivateSubnet1Subnet536B997A" |
| 872 | + }, |
| 873 | + { |
| 874 | + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" |
| 875 | + }, |
| 876 | + { |
| 877 | + "Ref": "VpcPrivateSubnet3SubnetF258B56E" |
| 878 | + } |
| 879 | + ] |
| 880 | + }, |
| 881 | + "UpdatePolicy": { |
| 882 | + "AutoScalingScheduledAction": { |
| 883 | + "IgnoreUnmodifiedGroupSizeProperties": true |
| 884 | + } |
| 885 | + } |
801 | 886 | }
|
802 | 887 | },
|
803 | 888 | "Parameters": {
|
804 | 889 | "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amikernel510hvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": {
|
805 | 890 | "Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
|
806 | 891 | "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-gp2"
|
807 | 892 | },
|
808 |
| - "SsmParameterValueawsserviceamiamazonlinuxlatestal2022amikernel515x8664C96584B6F00A464EAD1953AFF4B05118Parameter": { |
809 |
| - "Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>", |
810 |
| - "Default": "/aws/service/ami-amazon-linux-latest/al2022-ami-kernel-5.15-x86_64" |
811 |
| - }, |
812 | 893 | "SsmParameterValueawsserviceamiamazonlinuxlatestal2023amikernel61x8664C96584B6F00A464EAD1953AFF4B05118Parameter": {
|
813 | 894 | "Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
|
814 | 895 | "Default": "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-x86_64"
|
|
0 commit comments