This Terraform code will allow you deploy Argo CD to an existing OKE cluster or new OKE cluster.
The OCI Terraform Provider is now available for automatic download through the Terraform Provider Registry. For more information on how to get started view the documentation and setup guide.
Now, you'll want a local copy of this repo. You can make that with the commands:
git clone https://github.com/chiphwang1/oci_terraform_helm_wrapper.git
cd oci_terraform_helm_wrapper
ls
First off, you'll need to do some pre-deploy setup. That's all detailed here.
# Authentication
tenancy_ocid = "<tenancy_ocid>"
user_ocid = "<user_ocid>"
fingerprint = "<finger_print>"
private_key_path = "<pem_private_key_path>"
# Region
region = "<oci_region>"
# Compartment
compartment_ocid = "<compartment_ocid>"
# oke-variables
existent_oke_cluster_id = "ocid_of_Oke_cluster_to_deploy_helm "
Deploy:
terraform init
terraform plan
terraform apply
When you no longer need the deployment, you can run this command to destroy it:
terraform destroy
Note: Application deployment within OKE will lead to OCI LoadBalancer provisioning, created outside the Terraform realm. Consequently, terraform destroy operation will not be able to destroy OKE as dependent LB will stay untouched. Therefore you should destroy LB from OCI Console perspective beforehand. Then you can continue with terraform destroy command.