Skip to content

Commit

Permalink
Update CKA
Browse files Browse the repository at this point in the history
Added additional questions to CKA and fixed some styling issues with
pulumi Python code.
  • Loading branch information
abregman committed Oct 15, 2022
1 parent e3c34aa commit 9d01834
Show file tree
Hide file tree
Showing 6 changed files with 466 additions and 58 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

:information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE

:bar_chart:  There are currently **2477** exercises and questions
:bar_chart:  There are currently **2354** exercises and questions

:books:  To learn more about DevOps and SRE, check the resources in [devops-resources](https://github.com/bregman-arie/devops-resources) repository

Expand Down
2 changes: 1 addition & 1 deletion topics/aws/exercises/new_vpc/pulumi/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
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
33 changes: 15 additions & 18 deletions topics/aws/exercises/s3/new_bucket/pulumi/__main__.py
Original file line number Diff line number Diff line change
@@ -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))
35 changes: 17 additions & 18 deletions topics/aws/exercises/subnets/pulumi/__main__.py
Original file line number Diff line number Diff line change
@@ -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"
Loading

0 comments on commit 9d01834

Please sign in to comment.