You've already forked devops-exercises
Update CKA
Added additional questions to CKA and fixed some styling issues with pulumi Python code.
This commit is contained in:
@@ -7,4 +7,4 @@ pulumi.export("vpc_id", vpc.vpc_id)
|
||||
pulumi.export("publicSubnetIds", vpc.public_subnet_ids)
|
||||
pulumi.export("privateSubnetIds", vpc.private_subnet_ids)
|
||||
|
||||
# Run 'pulumi up' to create it
|
||||
# Run 'pulumi up' to create it
|
||||
|
||||
@@ -1,28 +1,25 @@
|
||||
import pulumi
|
||||
import pulumi_aws as aws
|
||||
|
||||
# Private Bucket
|
||||
private_bucket = aws.s3.Bucket("my-first-private-bucket",
|
||||
acl="private",
|
||||
tags={
|
||||
"Environment": "Exercise",
|
||||
"Name": "My First Private Bucket"},
|
||||
region="eu-west-2"
|
||||
)
|
||||
acl="private",
|
||||
tags={
|
||||
"Environment": "Exercise",
|
||||
"Name": "My First Private Bucket"},
|
||||
region="eu-west-2"
|
||||
)
|
||||
|
||||
# Bucket Object
|
||||
|
||||
aws.s3.BucketObject("bucketObject",
|
||||
key="some_object_key",
|
||||
bucket=private_bucket.id,
|
||||
content="object content")
|
||||
key="some_object_key",
|
||||
bucket=private_bucket.id,
|
||||
content="object content")
|
||||
|
||||
# Public Bucket
|
||||
aws.s3.Bucket("my-first-public-bucket",
|
||||
acl="private",
|
||||
tags={
|
||||
"Environment": "Exercise",
|
||||
"Name": "My First Public Bucket"},
|
||||
region="eu-west-1",
|
||||
versioning=aws.s3.BucketVersioningArgs(enabled=True)
|
||||
)
|
||||
acl="private",
|
||||
tags={
|
||||
"Environment": "Exercise",
|
||||
"Name": "My First Public Bucket"},
|
||||
region="eu-west-1",
|
||||
versioning=aws.s3.BucketVersioningArgs(enabled=True))
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
import pulumi
|
||||
import pulumi_aws as aws
|
||||
|
||||
availableZones = pulumi_aws.get_availability_zones(state="available")
|
||||
availableZones = aws.get_availability_zones(state="available")
|
||||
|
||||
aws.ec2.Subnet("NewSubnet1",
|
||||
vpc_id=aws_vpc["main"]["id"],
|
||||
cidr_block="10.0.0.0/24",
|
||||
availability_zone=availableZones.names[0],
|
||||
tags={"Name": "NewSubnet1"}
|
||||
)
|
||||
vpc_id=aws.vpc["main"]["id"],
|
||||
cidr_block="10.0.0.0/24",
|
||||
availability_zone=availableZones.names[0],
|
||||
tags={"Name": "NewSubnet1"}
|
||||
)
|
||||
|
||||
aws.ec2.Subnet("NewSubnet2",
|
||||
vpc_id=aws_vpc["main"]["id"],
|
||||
cidr_block="10.0.1.0/24",
|
||||
availability_zone=availableZones.names[1]
|
||||
tags={"Name": "NewSubnet2"}
|
||||
)
|
||||
vpc_id=aws.vpc["main"]["id"],
|
||||
cidr_block="10.0.1.0/24",
|
||||
availability_zone=availableZones.names[1],
|
||||
tags={"Name": "NewSubnet2"}
|
||||
)
|
||||
|
||||
aws.ec2.Subnet("NewSubnet3",
|
||||
vpc_id=aws_vpc["main"]["id"],
|
||||
cidr_block="10.0.2.0/24",
|
||||
availability_zone=availableZones.names[2]
|
||||
tags={"Name": "NewSubnet3"}
|
||||
)
|
||||
vpc_id=aws.vpc["main"]["id"],
|
||||
cidr_block="10.0.2.0/24",
|
||||
availability_zone=availableZones.names[2],
|
||||
tags={"Name": "NewSubnet3"}
|
||||
)
|
||||
|
||||
# Run "pulumi up"
|
||||
# Run "pulumi up"
|
||||
|
||||
Reference in New Issue
Block a user