-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from junior/example-using-existent-network
Example using existent network
- Loading branch information
Showing
16 changed files
with
236 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.8.12 | ||
0.8.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. | ||
# | ||
|
||
# OCI authentication | ||
tenancy_ocid = "ocid1.tenancy....." | ||
fingerprint = "" # e.g.: "5f:53:..." or leave blank if using CloudShell | ||
user_ocid = "" # e.g.: "ocid1.user..." or leave blank if using CloudShell | ||
private_key_path = "" # e.g.: "/users/user/.oci/oci_api_key.pem" or leave blank if using CloudShell | ||
|
||
# Deployment compartment | ||
compartment_ocid = "ocid1.compartment...." | ||
|
||
# region | ||
region = "us-ashburn-1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. | ||
# | ||
|
||
module "oke-quickstart" { | ||
source = "github.com/oracle-quickstart/terraform-oci-oke-quickstart?ref=0.8.15" | ||
|
||
# Oracle Cloud Infrastructure Tenancy and Compartment OCID | ||
tenancy_ocid = var.tenancy_ocid | ||
compartment_ocid = var.compartment_ocid | ||
region = var.region | ||
|
||
# Note: Just few arguments are showing here to simplify the basic example. All other arguments are using default values. | ||
# App Name to identify deployment. Used for naming resources. | ||
app_name = "Basic with Existent Network" | ||
|
||
# Freeform Tags + Defined Tags. Tags are applied to all resources. | ||
tag_values = { "freeformTags" = { "Environment" = "Development", "DeploymentType" = "basic", "QuickstartExample" = "basic-with-existing-network" }, "definedTags" = {} } | ||
|
||
# OKE Node Pool 1 arguments | ||
node_pool_cni_type_1 = "FLANNEL_OVERLAY" # Use "OCI_VCN_IP_NATIVE" for VCN Native PODs Network. If the node pool 1 uses the OCI_VCN_IP_NATIVE, the cluster will also be configured with same cni | ||
cluster_autoscaler_enabled = true | ||
node_pool_initial_num_worker_nodes_1 = 3 # Minimum number of nodes in the node pool | ||
node_pool_max_num_worker_nodes_1 = 10 # Maximum number of nodes in the node pool | ||
node_pool_instance_shape_1 = { "instanceShape" = "VM.Standard.E4.Flex", "ocpus" = 2, "memory" = 64 } # If not using a Flex shape, ocpus and memory are ignored | ||
|
||
# VCN for OKE arguments | ||
create_new_vcn = false | ||
existent_vcn_ocid = "ocid1.vcn.oc1.iad.amaaaaaadoggtjaat6nl5pla7kw52nbxpu73erej3nbd4shjhjczn2tfeadq" | ||
existent_vcn_compartment_ocid = "" # Optional. Specify if want to create terraform to create the subnets and the VCN is in a different compartment than the OKE cluster | ||
|
||
# Subnet for OKE arguments | ||
create_subnets = false | ||
existent_oke_k8s_endpoint_subnet_ocid = "ocid1.subnet.oc1.iad.aaaaaaaakwyp2rkytg3yepvx7qzytff7estok277lda7gjjso3k4wnz6dpoa" | ||
existent_oke_nodes_subnet_ocid = "ocid1.subnet.oc1.iad.aaaaaaaack6edaxj6vxdxvbgw4ae232to3ou7rpfmv6lyscpbzcetjkeifiq" | ||
existent_oke_load_balancer_subnet_ocid = "ocid1.subnet.oc1.iad.aaaaaaaao6j4ixl23bcp6367he7l5qytuvmm74hrmg4ajiqyfzxowrbrx3pa" | ||
existent_oke_vcn_native_pod_networking_subnet_ocid = "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. | ||
# | ||
|
||
# Deployment outputs | ||
output "deploy_id" { | ||
value = module.oke-quickstart.deploy_id | ||
} | ||
|
||
# OKE Outputs | ||
output "comments" { | ||
value = module.oke-quickstart.comments | ||
} | ||
output "deployed_oke_kubernetes_version" { | ||
value = module.oke-quickstart.deployed_oke_kubernetes_version | ||
} | ||
output "deployed_to_region" { | ||
value = module.oke-quickstart.deployed_to_region | ||
} | ||
output "kubeconfig" { | ||
value = module.oke-quickstart.kubeconfig | ||
sensitive = true | ||
} | ||
output "kubeconfig_for_kubectl" { | ||
value = module.oke-quickstart.kubeconfig_for_kubectl | ||
description = "If using Terraform locally, this command set KUBECONFIG environment variable to run kubectl locally" | ||
} | ||
output "dev" { | ||
value = module.oke-quickstart.dev | ||
} | ||
### Important Security Notice ### | ||
# The private key generated by this resource will be stored unencrypted in your Terraform state file. | ||
# Use of this resource for production deployments is not recommended. | ||
# Instead, generate a private key file outside of Terraform and distribute it securely to the system where Terraform will be run. | ||
output "generated_private_key_pem" { | ||
value = module.oke-quickstart.generated_private_key_pem | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. | ||
# | ||
|
||
terraform { | ||
required_version = ">= 1.1" | ||
required_providers { | ||
oci = { | ||
source = "oracle/oci" | ||
version = "~> 4, < 5" | ||
# https://registry.terraform.io/providers/oracle/oci/ | ||
} | ||
kubernetes = { | ||
source = "hashicorp/kubernetes" | ||
version = "~> 2" | ||
# https://registry.terraform.io/providers/hashicorp/kubernetes/ | ||
} | ||
helm = { | ||
source = "hashicorp/helm" | ||
version = "~> 2" | ||
# https://registry.terraform.io/providers/hashicorp/helm/ | ||
} | ||
tls = { | ||
source = "hashicorp/tls" | ||
version = "~> 4" | ||
# https://registry.terraform.io/providers/hashicorp/tls/ | ||
} | ||
local = { | ||
source = "hashicorp/local" | ||
version = "~> 2" | ||
# https://registry.terraform.io/providers/hashicorp/local/ | ||
} | ||
random = { | ||
source = "hashicorp/random" | ||
version = "~> 3" | ||
# https://registry.terraform.io/providers/hashicorp/random/ | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
examples/basic-with-existing-network/terraform.tfvars.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. | ||
# | ||
|
||
# OCI authentication | ||
tenancy_ocid = "ocid1.tenancy....." | ||
fingerprint = "" # e.g.: "5f:53:..." or leave blank if using CloudShell | ||
user_ocid = "" # e.g.: "ocid1.user..." or leave blank if using CloudShell | ||
private_key_path = "" # e.g.: "/users/user/.oci/oci_api_key.pem" or leave blank if using CloudShell | ||
|
||
# Deployment compartment | ||
compartment_ocid = "ocid1.compartment...." | ||
|
||
# region | ||
region = "us-ashburn-1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# OCI Provider | ||
variable "tenancy_ocid" {} | ||
variable "compartment_ocid" {} | ||
variable "region" {} | ||
variable "user_ocid" { | ||
default = "" | ||
} | ||
variable "fingerprint" { | ||
default = "" | ||
} | ||
variable "private_key_path" { | ||
default = "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.