diff --git a/moto/ec2/models.py b/moto/ec2/models.py index 03b690113..9b382a1aa 100644 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -5050,6 +5050,10 @@ class InternetGateway(TaggedEC2Resource, CloudFormationModel): self.id = random_internet_gateway_id() self.vpc = None + @property + def owner_id(self): + return ACCOUNT_ID + @staticmethod def cloudformation_name_type(): return None diff --git a/moto/ec2/responses/internet_gateways.py b/moto/ec2/responses/internet_gateways.py index e9704429a..732faa7c0 100644 --- a/moto/ec2/responses/internet_gateways.py +++ b/moto/ec2/responses/internet_gateways.py @@ -64,11 +64,10 @@ CREATE_INTERNET_GATEWAY_RESPONSE = """ {{ igw.id }} + {{ igw.owner_id or none }} {% if igw.vpc %} @@ -102,8 +102,6 @@ DESCRIBE_INTERNET_GATEWAYS_RESPONSE = """ {% for tag in igw.get_tags() %} - {{ tag.resource_id }} - {{ tag.resource_type }} {{ tag.key }} {{ tag.value }} diff --git a/tests/terraform-tests.success.txt b/tests/terraform-tests.success.txt index c916cdc6f..c0d9f147d 100644 --- a/tests/terraform-tests.success.txt +++ b/tests/terraform-tests.success.txt @@ -98,3 +98,4 @@ TestAccAWSSsmDocumentDataSource TestAccAwsEc2ManagedPrefixList TestAccAWSEgressOnlyInternetGateway TestAccAWSSecurityGroup_ +TestAccAWSInternetGateway