FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 7cdb677d authored by E. Kirk's avatar E. Kirk
Browse files

fix: move logan file again and simplify container definition

parent 28ef1fb2
No related branches found
No related tags found
1 merge request!7Add initial (trivial) pubsub module and faas module that supports pubsub
Checking pipeline status
This commit is part of merge request !7. Comments created here will be created in the context of that merge request.
......@@ -51,11 +51,12 @@ repos:
- repo: local
hooks:
# FIXME switch to use local logan settings file when pre-commit base image has logan installed
- id: terraform-fmt
name: terraform-fmt
language: system
language: docker_image
pass_filenames: false
entry: logan --writable-workdir --notty terraform fmt -recursive
entry: registry.gitlab.developers.cam.ac.uk/uis/devops/infra/dockerimages/logan-terraform:1.7 terraform fmt -recursive
- id: tflint
name: tflint
language: docker_image
......
......@@ -62,6 +62,14 @@ cmd = "pytest"
[tool.poe.tasks."terraform:auth"]
cmd = "gcloud auth application-default login"
[tool.poe.tasks."terraform:dev:init"]
cmd = "logan --workspace=development terraform init"
cwd = "terraform"
[tool.poe.tasks."terraform:dev:apply"]
cmd = "logan --workspace=development terraform apply"
cwd = "terraform"
[tool.poetry.dependencies]
python = "^3.9.1"
requests = "^2.31.0"
......
File moved
......@@ -43,34 +43,17 @@ locals {
# should be tagged explicitly with the Git commit SHA for the exact version to
# deploy. They are specified per-workspace with generic "latest from master"
# fallbacks if not otherwise specified.
#
# The full image name is formed by concatenating "..._base" and "..._tag"
# locals which makes it convenient to specify only branches and/or commit
# SHAs.
container_images = merge(
local.default_container_images,
lookup({
development = {
function_base = join("/", [
local.gcp_config.artifact_registry_docker_repository,
data.gitlab_project.faas.path,
"example",
"ek599-3-faas-and-pub-sub-terraform-module-boilerplate"
])
}
}, terraform.workspace, {})
)
# Default base URLs and images for container_images if none are specified
# for the workspace.
default_container_images = {
webapp_base = join("/", [
local.gcp_config.artifact_registry_docker_repository,
data.gitlab_project.faas.path,
data.gitlab_project.faas.default_branch
])
function_tag = "latest"
}
container_images = lookup({
development = {
function_base = join("/", [
local.gcp_config.artifact_registry_docker_repository,
data.gitlab_project.faas.path,
"example",
"main"
])
function_tag = "latest"
}
}, terraform.workspace, {})
}
# These locals are derived from resources, data sources or other locals.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment