Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repairing the rhel 7.9 image ami query #331

Merged
merged 1 commit into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/active-active-rhel7-proxy/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data "aws_ami" "rhel" {

filter {
name = "name"
values = ["RHEL-7.9_HVM-20220512-x86_64-1-Hourly2-GP2"]
values = ["RHEL-7.9_HVM-*-x86_64-*-Hourly2-GP2"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just sharing because I am learning something here, and so might others.

TIL: AMIs have a deprecation time set.
Initially I thought we would want to be specific, but instead, I believe now that making the query flexible gives us stability in the pipeline.

Nice solution.

aws ec2 describe-images --image-ids ami-01788be7cc93be6ee --region "us-west-2"

{
    "Images": [
        {
            "Architecture": "x86_64",
            "CreationDate": "2022-10-27T19:34:45.000Z",
            "ImageId": "ami-01788be7cc93be6ee",
            "ImageLocation": "amazon/RHEL-7.9_HVM-20221027-x86_64-0-Hourly2-GP2",
            "ImageType": "machine",
            "Public": true,
            "OwnerId": "309956199498",
            "PlatformDetails": "Red Hat Enterprise Linux",
            "UsageOperation": "RunInstances:0010",
            "State": "available",
            "BlockDeviceMappings": [
                {
                    "DeviceName": "/dev/sda1",
                    "Ebs": {
                        "DeleteOnTermination": true,
                        "SnapshotId": "snap-0f8f108bc3e8c4f30",
                        "VolumeSize": 10,
                        "VolumeType": "gp2",
                        "Encrypted": false
                    }
                }
            ],
            "Description": "Provided by Red Hat, Inc.",
            "EnaSupport": true,
            "Hypervisor": "xen",
            "ImageOwnerAlias": "amazon",
            "Name": "RHEL-7.9_HVM-20221027-x86_64-0-Hourly2-GP2",
            "RootDeviceName": "/dev/sda1",
            "RootDeviceType": "ebs",
            "SriovNetSupport": "simple",
            "VirtualizationType": "hvm",
            "DeprecationTime": "2024-10-27T19:34:45.000Z"
        }
    ]
}

}

filter {
Expand Down
Loading