Skip to content

A Terraform Module for the Canonical Identity Platform Juju Bundle

License

Notifications You must be signed in to change notification settings

canonical/iam-bundle-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Identity Platform Juju Bundle Terraform Module

Latest Release Juju Provider Terraform License

Build pre-commit Conventional Commits

This Identity Platform Juju bundle Terraform module aims to deploy the Identity Platform Juju Bundle via Terraform.

Getting started

Prerequisites

Make sure the following software and tools are installed and running in the local environment.

  • microk8s (v1.25.0+)
  • juju (3.1.0+)
  • terraform (v1.5.0+)

Deploy locally with Terraform

Create a target Juju model:

juju add-model <juju model>

Make sure two ingresses (e.g. traefik-k8s) are deployed in the model, and the external ingress provides a Juju offer:

# Deploy external ingress
juju deploy traefik-k8s <external ingress app> --trust --channel <channel>

# Deploy internal ingress
juju deploy traefik-k8s <internal ingress app> --trust --channel <channel>

# Create the juju offer
juju offer <external ingress app>:ingress <offer name>

Because the bundle uses an external Idp provider (e.g. Microsoft EntraID), it needs to provide additional variables for the module to run. More information about the Idp provider configuration can be found here. Please create a Terraform variable definition (.tfvars) file in the root directory as follows.

# vars.tfvars
model = <juju model>

idp_provider_config = {
  client_id           = <client id>
  provider            = <provider name>
  provider_id         = <provider id>
  microsoft_tenant_id = <tenant id> # if using Microsoft Azure
}

idp_provider_credentials = {
  client_secret = <client secret>
}

internal_ingress = {
  name     = <Juju app name of the internal ingress>
  endpoint = "ingress"
}

juju_offers = {
  external_ingress_offer = <Juju offer url provided by external ingress>
}

Run the following commands to deploy the bundle.

terraform init
terraform apply -var-file="./vars.tfvars"

Run juju switch <juju model> to switch to the target Juju model.

# Observe the status of the applications and integrations
juju status --relations

Deploy to the ProdStack 6 Cloud

Please refer to the deployment documentation to learn how to deploy the module to the ProdStack Cloud.

Terraform Module Specifications

Please refer to the module specifications to learn the module specifications.

Contributing

Please refer to the contribution documentation to learn how to contribute to the project.