Skip to content

DT-523 add vpc s3 endpoint resource #28

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

christopher-comet
Copy link

@christopher-comet
Copy link
Author

Deployed the changes.
tfplan.json

❯ terraform state list | grep vpc_endpoint                                                                                                                                          deployment-team-dev  12:37:25
module.comet_vpc[0].aws_vpc_endpoint.s3

Screenshot 2025-05-16 at 12 39 14 PM

@christopher-comet
Copy link
Author

Added a name
Screenshot 2025-05-16 at 12 49 55 PM

@christopher-comet
Copy link
Author

Endpoint exists

❯ aws ec2 describe-vpc-endpoints --region us-east-2 --filters Name=service-name,Values=com.amazonaws.us-east-2.s3                               

{
    "VpcEndpoints": [
        {
            "VpcEndpointId": "vpce-0cb24d1c5c8feebcb",
            "VpcEndpointType": "Gateway",
            "VpcId": "vpc-05cd3309793289ab1",
            "ServiceName": "com.amazonaws.us-east-2.s3",
            "State": "available",
            "PolicyDocument": "{\"Version\":\"2008-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"*\",\"Resource\":\"*\"}]}",
            "RouteTableIds": [
                "rtb-0174756fef3d994f3",
                "rtb-0763b317f918e1e2e"
            ],
            "SubnetIds": [],
            "Groups": [],
            "PrivateDnsEnabled": false,
            "RequesterManaged": false,
            "NetworkInterfaceIds": [],
            "DnsEntries": [],
            "CreationTimestamp": "2025-05-27T19:31:11+00:00",
            "Tags": [
                {
                    "Key": "Terraform",
                    "Value": "true"
                },
                {
                    "Key": "Environment",
                    "Value": "prod"
                },
                {
                    "Key": "Name",
                    "Value": "comet-prod-s3-endpoint"
                }
            ],
            "OwnerId": "897196112581"
        }
    ]
}

Verify route table entries

❯ PL_ID=$(aws ec2 describe-prefix-lists --region us-east-2  --filters Name=prefix-list-name,Values=com.amazonaws.us-east-2.s3  --query "PrefixLists[0].PrefixListId" --output text)

❯ echo "S3 prefix-list id = $PL_ID"                                                                                                                                                     
S3 prefix-list id = pl-7ba54012

❯ for RT in rtb-0174756fef3d994f3 rtb-0763b317f918e1e2e; do                                                                                                       
  echo "Checking RTB $RT…"
  aws ec2 describe-route-tables \
    --region us-east-2 \
    --route-table-ids $RT \
    --query "RouteTables[0].Routes[?DestinationPrefixListId=='${PL_ID}']"
done

Checking RTB rtb-0174756fef3d994f3…
[
    {
        "DestinationPrefixListId": "pl-7ba54012",
        "GatewayId": "vpce-0cb24d1c5c8feebcb",
        "Origin": "CreateRoute",
        "State": "active"
    }
]
Checking RTB rtb-0763b317f918e1e2e…
[
    {
        "DestinationPrefixListId": "pl-7ba54012",
        "GatewayId": "vpce-0cb24d1c5c8feebcb",
        "Origin": "CreateRoute",
        "State": "active"
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant