Fix:EC2 Tags in create vpc and create subnet (#3338)
Co-authored-by: usmankb <usman@krazybee.com>
This commit is contained in:
parent
82dbaadfc4
commit
55e7caccfe
5 changed files with 69 additions and 2 deletions
|
|
@ -680,6 +680,19 @@ def test_create_vpc_with_invalid_cidr_range():
|
|||
)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_create_vpc_with_tags():
|
||||
ec2 = boto3.resource("ec2", region_name="us-west-1")
|
||||
# Create VPC
|
||||
vpc = ec2.create_vpc(
|
||||
CidrBlock="10.0.0.0/16",
|
||||
TagSpecifications=[
|
||||
{"ResourceType": "vpc", "Tags": [{"Key": "name", "Value": "some-vpc"}]}
|
||||
],
|
||||
)
|
||||
assert vpc.tags == [{"Key": "name", "Value": "some-vpc"}]
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_enable_vpc_classic_link():
|
||||
ec2 = boto3.resource("ec2", region_name="us-west-1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue