Initialisation takes about 5 minutes and deploys the Infrastructure to support building and deploying images
Before Running the Apply workflow, you need to update the backend.tf and variables.tf
backend.tf
variables.tf
Add and configure the repository secrets
ARM_SUBSCRIPTION_ID
ARM_TENANT_ID
ARM_CLIENT_SECRET
ARM_CLIENT_ID
TF_VAR_client_secret
TF_VAR_PAT
The solution requires a parent repository to manage the solution and a child repository as a template
gh repo create ORG/PARENT --template pknw1-example-business/secops-infrastructure --private gh repo create ORG/CHILD --template pknw1-example-business/secops-baseos-template --private
gh repo clone ORG/PARENT && cd PARENT gh secret set -f ./.env
vi backend.tf <modify details for remote state> terraform { backend "azurerm" { subscription_id = "625b66d7-5b11-40fb-99ab-ba303c13ea88" resource_group_name = "tf_state" storage_account_name = "continobakerytfstate" container_name = "secops" key = "secops-infrastructure.tfstate" } }
vi variables.tf <modify variables for infrastructure setup> <set the template_repo setting to the child repo name> locals { location = "uksouth" shared_image_gallery_name = "secops_images" shared_image_gallery_resource_group_name = "secops_images-rg" build_resource_group_name = "secops_images_build-rg" build_vnet_name = "secops_images-vnet" managed_image_resource_group_name = "secops_images-rg" } variable "template_repo" { default = "secops-baseos-template" }
push & apply base configuration to deploy infrastructure
versions
dev.tfvars
requirements.yml
playlist.yml
01_packer_manifest-local.tf
02_packer_manifest_azure_arm.tf
03_packer_manifest_azure_chroot.tf
modify the 99_image_definition_configuration.tf to add a definition
99_image_definition_configuration.tf
update the cis role url
add any custom ansible playbooks & scripts
apply
Operating the OS Image Repository
version