This repo consists of the modules which would be requrired for the deployment of the MediaWiki in the K8S environment in an automated way. The included modules are
- Networking
- Service Accounts
- Kubernetes Cluster
The folder structure
terraform.tfvars
: Each module consists of a terraform.tfvars
file, this consists of the values which are required for the resource creation.
provider.tf
: The details of the remote state and the terraform providers configuration is present in the provider.tf
file.
main.tf
: This consists of the desclaration of the module, i.e. the location from where the module is called, ideally the modules are present in another github repository which is utilised at multiple places but for demo purposes, I have kept it here along with the definition of the module in a folder.
The folder structure
- Open the terminal according to the sequence and run the commands for terraform formatting :
terraform fmt .
- Initilise the terraform by command
terraform init
, as this will initilise the state of the terraform in remote storage. - Plan the terraform resource creation
terraform plan
. - After successful creation and analysis of the plan,
terraform apply
to give manual approval orterraform approve --auto-approve
to approve this automatically in an automated flow. - Verify the created resources.