Module 8 Hometask
Module 8 Hometask
MICROSOFT AZURE
This document contains privileged and/or confidential information and may not be
Legal Notice:
disclosed, distributed or reproduced without the prior written permission of EPAM®.
2. ACCEPTANCE CRITERIA
1. Homework corresponds to task details, requirements and attachment recommendations.
2. Terraform configuration has normal view and meets all requirements and best practices studied
on previous modules.
3. Terraform configuration for each Azure resources must be as a module.
4. A tutor should be able to execute your Terraform configuration without modifications. Any
hardcode that can affect re-run must be fixed. If your code is related some how to OS (or
shell), inform about it your tutor and provide description why you did.
5. Minimal Terraform version is 1.5.0.
6. All resource names should use a common name pattern and be aligned with Azure abbreviation
examples. No resource names are hardcoded
7. TF configuration has usable outputs, that are used to access to resources, such as storage
account name, vault name, cdn endpoint, etc.
3. TASK
1. Create Terraform configuration that provisions the following resources:
a. Azure Redis Cache
b. Azure Container Registry
c. Azure Key Vault
Redis password and Redis Url must be saved in Key Vault as a secrets.
# Connect to Redis
redis = Redis(host=os.getenv("REDIS_URL","localhost"),
port=os.getenv("REDIS_PORT","6379"), db=0, password=os.getenv("REDIS_PWD",""),
ssl=os.getenv("REDIS_SSL_MODE",True))
app = Flask(__name__)
@app.route("/")
def hello():
try:
visits = redis.incr("counter")
except RedisError:
visits = "<i>cannot connect to Redis, counter disabled</i>"
if __name__ == "__main__":
app.run(host='0.0.0.0', port=8080)
4. TASK RESULT
A result of this task is a running applications on different Azure services such as ACI, WebAPP,
Container APP and AKS that are available by IP address or URLs.
For instance
Archive .zip with your source code named: <name-surname>-<module number> uploaded to learn
portal