├── .gitignore ├── LICENSE.txt ├── README.md ├── THIRD_PARTY_LICENSES.txt ├── examples ├── cis-hub_and_spoke │ ├── CIS_Hub_and_Spoke.md │ ├── bastion.auto.tfvars │ ├── cloud_guard.auto.tfvars │ ├── events.auto.tfvars │ ├── iam-dynamic-group.auto.tfvars │ ├── iam_comp.auto.tfvars │ ├── iam_groups.auto.tfvars │ ├── iam_policies.auto.tfvars │ ├── kms.auto.tfvars │ ├── logs.auto.tfvars │ ├── main.tf │ ├── network.auto.tfvars │ ├── notifications.auto.tfvars │ ├── object_storage.auto.tfvars │ ├── outputs.tf │ ├── service_connector.auto.tfvars │ ├── variables.tf │ └── vulnerability_scan.auto.tfvars ├── cis-quickstart │ ├── CIS-quickstart.md │ ├── bastion.auto.tfvars │ ├── cloud_guard.auto.tfvars │ ├── events.auto.tfvars │ ├── iam-dynamic-group.auto.tfvars │ ├── iam_comp.auto.tfvars │ ├── iam_groups.auto.tfvars │ ├── iam_policies.auto.tfvars │ ├── kms.auto.tfvars │ ├── logs.auto.tfvars │ ├── main.tf │ ├── network.auto.tfvars │ ├── notifications.auto.tfvars │ ├── object_storage.auto.tfvars │ ├── outputs.tf │ ├── service_connector.auto.tfvars │ ├── variables.tf │ └── vulnerability_scan.auto.tfvars ├── crawl │ ├── adw │ │ ├── adw.md │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── compute-image-lister │ │ └── lister.tf │ ├── crawl-workshop │ │ ├── crawl.md │ │ ├── index.html │ │ └── manifest.json │ ├── dbaas │ │ ├── dbaas.md │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── iam │ │ ├── iam.md │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── instances │ │ ├── compute.md │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ └── network │ │ ├── main.tf │ │ ├── network.md │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf ├── dev_tools │ ├── alarms │ │ ├── main.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── api-gateway │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── containers │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── dev-tools.md │ ├── functions │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── marketplace_instance │ │ ├── listing_helper │ │ │ └── lister.tf │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ └── notifications │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf ├── enterprise_tier │ ├── enterprise-tier.md │ ├── main.tf │ ├── outputs.tf │ ├── terraform.tfvars │ └── variables.tf ├── free_tier │ ├── free-tier.md │ ├── main.tf │ ├── outputs.tf │ ├── terraform.tfvars │ └── variables.tf ├── network_architectures │ ├── img │ │ ├── .gitkeep │ │ ├── isv-Isolated-Arch.png │ │ ├── isv-shared-arch.png │ │ └── n-tier.png │ ├── n_tier_web_app │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── network-architectures.md │ ├── saas_isolated_arch │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ └── saas_shared_arch │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf ├── run │ ├── asg │ │ ├── asg.md │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── blockchain │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── fss-redundancy │ │ ├── fss.md │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── glusterfs │ │ ├── examples │ │ │ ├── georeplicated_glusterfs_volume │ │ │ │ ├── dispersed │ │ │ │ │ ├── main.tf │ │ │ │ │ ├── outputs.tf │ │ │ │ │ ├── terraform.tfvars │ │ │ │ │ └── variables.tf │ │ │ │ ├── distributed │ │ │ │ │ ├── main.tf │ │ │ │ │ ├── outputs.tf │ │ │ │ │ ├── terraform.tfvars │ │ │ │ │ └── variables.tf │ │ │ │ ├── distributed_dispersed │ │ │ │ │ ├── main.tf │ │ │ │ │ ├── outputs.tf │ │ │ │ │ ├── terraform.tfvars │ │ │ │ │ └── variables.tf │ │ │ │ ├── distributed_replicated │ │ │ │ │ ├── main.tf │ │ │ │ │ ├── outputs.tf │ │ │ │ │ ├── terraform.tfvars │ │ │ │ │ └── variables.tf │ │ │ │ └── replicated │ │ │ │ │ ├── main.tf │ │ │ │ │ ├── outputs.tf │ │ │ │ │ ├── terraform.tfvars │ │ │ │ │ └── variables.tf │ │ │ └── glusterfs_volume │ │ │ │ ├── dispersed │ │ │ │ ├── main.tf │ │ │ │ ├── outputs.tf │ │ │ │ ├── terraform.tfvars │ │ │ │ └── variables.tf │ │ │ │ ├── distributed │ │ │ │ ├── main.tf │ │ │ │ ├── outputs.tf │ │ │ │ ├── terraform.tfvars │ │ │ │ └── variables.tf │ │ │ │ ├── distributed_dispersed │ │ │ │ ├── main.tf │ │ │ │ ├── outputs.tf │ │ │ │ ├── terraform.tfvars │ │ │ │ └── variables.tf │ │ │ │ ├── distributed_replicated │ │ │ │ ├── main.tf │ │ │ │ ├── outputs.tf │ │ │ │ ├── terraform.tfvars │ │ │ │ └── variables.tf │ │ │ │ └── replicated │ │ │ │ ├── main.tf │ │ │ │ ├── outputs.tf │ │ │ │ ├── terraform.tfvars │ │ │ │ └── variables.tf │ │ ├── glusterfs.md │ │ ├── modules │ │ │ ├── georeplication │ │ │ │ ├── main.tf │ │ │ │ ├── outputs.tf │ │ │ │ └── variables.tf │ │ │ └── glusterfs │ │ │ │ ├── main.tf │ │ │ │ ├── outputs.tf │ │ │ │ └── variables.tf │ │ ├── tests │ │ │ └── automated_test.sh │ │ └── userdata │ │ │ ├── ganesha.sh │ │ │ ├── glusterfs.sh │ │ │ ├── iscsi.sh │ │ │ ├── mount.sh │ │ │ ├── passwordless.sh │ │ │ └── peer.sh │ ├── grafana │ │ ├── dashboards │ │ │ └── oci_dashboard.json │ │ ├── grafana.md │ │ ├── main.tf │ │ ├── modules │ │ │ └── grafana │ │ │ │ ├── main.tf │ │ │ │ ├── outputs.tf │ │ │ │ └── variables.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ ├── userdata │ │ │ ├── grafana.sh │ │ │ └── oci.yaml │ │ ├── variables.tf │ │ └── versions.tf │ ├── kms │ │ ├── kms.md │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── oce │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ ├── run-workshop │ │ ├── index.html │ │ ├── manifest.json │ │ └── run.md │ ├── tag-namespace │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ └── variables.tf │ └── waas │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform.tfvars │ │ ├── variables.tf │ │ └── waas.md └── walk │ ├── dns │ ├── dns.md │ ├── main.tf │ ├── outputs.tf │ ├── terraform.tfvars │ └── variables.tf │ ├── fss │ ├── fss.md │ ├── main.tf │ ├── outputs.tf │ ├── terraform.tfvars │ └── variables.tf │ ├── instance-principal │ ├── instance-principal.md │ ├── main.tf │ ├── outputs.tf │ ├── terraform.tfvars │ └── variables.tf │ ├── load-balancer │ ├── load-balancer.md │ ├── main.tf │ ├── outputs.tf │ ├── terraform.tfvars │ └── variables.tf │ ├── object-storage │ ├── main.tf │ ├── object-storage.md │ ├── outputs.tf │ ├── terraform.tfvars │ └── variables.tf │ └── walk-workshop │ ├── index.html │ └── manifest.json ├── images └── thunder-structure.png ├── intro ├── crawl-walk.md ├── intro.md ├── prerequisites.md └── run.md ├── modules ├── adw │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── alarms │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── analytics │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── api-gateway │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── asg │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── bastion │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── blockchain │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── cloud_guard │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── containers │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── content-experience │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── dbaas │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── dns │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── dynamic_group │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── events │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── fastconnect │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── fss-instance-client-dest │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── fss-instance-client-local │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── fss │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── functions │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── iam │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── instance-principal │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── instances │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── ipsec │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── kms │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── load-balancer │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── logging │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── marketplace_instance │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── network │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── notifications │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── object-storage │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── remote-peering │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── service_connector │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── tag_namespace │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── vulnerability_scan │ ├── main.tf │ ├── outputs.tf │ └── variables.tf └── waas │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── userdata ├── fss_replication_dest.sh ├── fss_replication_local.sh ├── linux_mount.sh └── win_mount.ps1 └── workshop ├── content.md ├── index.html └── manifest.json /.gitignore: -------------------------------------------------------------------------------- 1 | *tfstate* 2 | *.terraform* 3 | provider.auto.tfvars 4 | *.DS_Store 5 | *pycache* -------------------------------------------------------------------------------- /examples/cis-hub_and_spoke/bastion.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | bastion_params = { 6 | webBastion = { 7 | bastion_name = "webBastion" 8 | bastion_type = "STANDARD" 9 | comp_name = "lz-security-cmp" 10 | subnet_name = "lz-0-web-subnet" 11 | cidr_block_allow_list = ["10.0.0.0/20"] 12 | max_session_ttl_in_seconds = 10800 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/cis-hub_and_spoke/cloud_guard.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | cloud_guard_config = { 6 | cg_config = { 7 | comp_name = "tenancy" 8 | status = "ENABLED" 9 | self_manage_resources = false 10 | region_name = "us-ashburn-1" 11 | } 12 | } 13 | 14 | 15 | cloud_guard_target = { 16 | lz-cloud-guard-root-target = { 17 | display_name = "lz-cloud-guard-root-target" 18 | comp_name = "tenancy" 19 | target_name = "tenancy" 20 | target_type = "COMPARTMENT" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/cis-hub_and_spoke/iam_comp.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | ##########Variabila de sters 5 | 6 | parent_comp = {} 7 | 8 | 9 | user_params = {} 10 | 11 | policy_params = {} 12 | 13 | comp_params = { 14 | lz-top-cmp = { 15 | name = "lz-top-cmp" 16 | description = "The lz-top-cmp compartment will be created under tenancy and will include all the other resources." 17 | enable_delete = false 18 | parent_name = "" 19 | } 20 | } 21 | 22 | comp_params2 = { 23 | lz-security-cmp = { 24 | name = "lz-security-cmp" 25 | description = "Landing Zone compartment for all security related resources: vaults, topics, notifications, logging, scanning, and others." 26 | enable_delete = false 27 | parent_name = "lz-top-cmp" 28 | 29 | }, 30 | lz-network-cmp = { 31 | name = "lz-network-cmp" 32 | description = "Landing Zone compartment for all network related resources: VCNs, subnets, network gateways, security lists, NSGs, load balancers, VNICs, and others." 33 | enable_delete = false 34 | parent_name = "lz-top-cmp" 35 | }, 36 | lz-appdev-cmp = { 37 | name = "lz-appdev-cmp" 38 | description = "Landing Zone compartment for all resources related to application development: compute instances, storage, functions, OKE, API Gateway, streaming, and others." 39 | enable_delete = false 40 | parent_name = "lz-top-cmp" 41 | }, 42 | lz-database-cmp = { 43 | name = "lz-database-cmp" 44 | description = "Landing Zone compartment for all database related resources." 45 | enable_delete = false 46 | parent_name = "lz-top-cmp" 47 | }, 48 | } 49 | -------------------------------------------------------------------------------- /examples/cis-hub_and_spoke/iam_groups.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | group_params = { 6 | "lz-iam-admin-group" = { 7 | name = "lz-iam-admin-group" 8 | description = "Landing Zone group for managing IAM resources in the tenancy." 9 | } 10 | } 11 | group_params2 = { 12 | 13 | "lz-security-admin-group" = { 14 | name = "lz-security-admin-group" 15 | description = "Landing Zone group for managing security services in compartment lz-security-cmp." 16 | }, 17 | "lz-network-admin-group" = { 18 | name = "lz-network-admin-group" 19 | description = "Landing Zone group for managing networking in compartment lz-network-cmp." 20 | }, 21 | "lz-database-admin-group" = { 22 | name = "lz-database-admin-group" 23 | description = "Landing Zone group for managing databases in compartment lz-database-cmp." 24 | }, 25 | "lz-appdev-admin-group" = { 26 | name = "lz-appdev-admin-group" 27 | description = "Landing Zone group for managing app development related services in compartment lz-appdev-cmp." 28 | }, 29 | "lz-cred-admin-group" = { 30 | name = "lz-cred-admin-group" 31 | description = "Landing Zone group for managing users credentials in the tenancy." 32 | }, 33 | "lz-auditor-group" = { 34 | name = "lz-auditor-group" 35 | description = "Landing Zone group for auditing the tenancy." 36 | }, 37 | "lz-announcement-reader-group" = { 38 | name = "lz-announcement-reader-group" 39 | description = "Landing Zone group for reading Console announcements." 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /examples/cis-hub_and_spoke/kms.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | vault_params = { 5 | lz-vault = { 6 | compartment_name = "lz-security-cmp" 7 | display_name = "lz-vault" 8 | vault_type = "DEFAULT" 9 | } 10 | } 11 | 12 | key_params = { 13 | lz-oss-key = { 14 | compartment_name = "lz-security-cmp" 15 | display_name = "lz-oss-key" 16 | vault_name = "lz-vault" 17 | key_shape_algorithm = "AES" 18 | key_shape_size_in_bytes = 32 19 | rotation_version = 0 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /examples/cis-hub_and_spoke/notifications.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | topic_params = { 6 | lz-security-topic = { 7 | comp_name = "lz-security-cmp" 8 | topic_name = "lz-security-topic" 9 | description = "Landing Zone topic for security related notifications." 10 | }, 11 | lz-network-topic = { 12 | comp_name = "lz-security-cmp" 13 | topic_name = "lz-network-topic" 14 | description = "Landing Zone topic for network related notifications." 15 | } 16 | } 17 | 18 | subscription_params = { 19 | subscription1 = { 20 | comp_name = "lz-security-cmp" 21 | endpoint = "testemail@test.com" 22 | protocol = "EMAIL" 23 | topic_name = "lz-security-topic" 24 | } 25 | subscription2 = { 26 | comp_name = "lz-security-cmp" 27 | endpoint = "testemail@test.com" 28 | protocol = "EMAIL" 29 | topic_name = "lz-network-topic" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /examples/cis-hub_and_spoke/object_storage.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | bucket_params = { 6 | lz-appdev-bucket = { 7 | compartment_name = "lz-appdev-cmp" 8 | name = "lz-appdev-bucket" 9 | access_type = "NoPublicAccess" 10 | storage_tier = "Standard" 11 | events_enabled = false 12 | kms_key_name = "lz-oss-key" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/cis-hub_and_spoke/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | # output "iam_users" { 4 | # value = module.iam.users 5 | # } 6 | 7 | output "iam_comp" { 8 | value = merge(module.iam_top_comp.compartments, module.iam.compartments) 9 | } 10 | 11 | output "iam_groups" { 12 | value = merge(module.iam_top_comp.groups, module.iam.groups) 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/cis-hub_and_spoke/vulnerability_scan.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | scan_recipes_params = { 5 | lz-default-scan-recipe = { 6 | display_name = "lz-default-scan-recipe" 7 | comp_name = "lz-security-cmp" 8 | scan_level = "STANDARD" 9 | agent_config_vendor = "OCI" 10 | cis_bench_scan_level = "MEDIUM" 11 | port_scan_level = "STANDARD" 12 | schedule_type = "WEEKLY" 13 | day_of_week = "SUNDAY" 14 | } 15 | } 16 | 17 | 18 | scan_target_params = { 19 | lz-security-cmp-scan-target = { 20 | display_name = "lz-security-cmp-scan-target" 21 | comp_name = "lz-security-cmp" 22 | recipe_name = "lz-default-scan-recipe" 23 | target_comp_name = "lz-security-cmp" 24 | }, 25 | lz-network-cmp-scan-target = { 26 | display_name = "lz-network-cmp-scan-target" 27 | comp_name = "lz-network-cmp" 28 | recipe_name = "lz-default-scan-recipe" 29 | target_comp_name = "lz-network-cmp" 30 | }, 31 | lz-appdev-cmp-scan-target = { 32 | display_name = "lz-appdev-cmp-scan-target" 33 | comp_name = "lz-appdev-cmp" 34 | recipe_name = "lz-default-scan-recipe" 35 | target_comp_name = "lz-appdev-cmp" 36 | }, 37 | lz-database-cmp-scan-target = { 38 | display_name = "lz-database-cmp-scan-target" 39 | comp_name = "lz-database-cmp" 40 | recipe_name = "lz-default-scan-recipe" 41 | target_comp_name = "lz-database-cmp" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /examples/cis-quickstart/bastion.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | bastion_params = { 6 | webBastion = { 7 | bastion_name = "webBastion" 8 | bastion_type = "STANDARD" 9 | comp_name = "lz-security-cmp" 10 | subnet_name = "lz-0-web-subnet" 11 | cidr_block_allow_list = ["10.0.0.0/20"] 12 | max_session_ttl_in_seconds = 10800 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/cis-quickstart/cloud_guard.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | cloud_guard_config = { 6 | cg_config = { 7 | comp_name = "tenancy" 8 | status = "ENABLED" 9 | self_manage_resources = false 10 | region_name = "us-ashburn-1" 11 | } 12 | } 13 | 14 | 15 | cloud_guard_target = { 16 | lz-cloud-guard-root-target = { 17 | display_name = "lz-cloud-guard-root-target" 18 | comp_name = "tenancy" 19 | target_name = "tenancy" 20 | target_type = "COMPARTMENT" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/cis-quickstart/iam_comp.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | 6 | parent_comp = {} 7 | 8 | 9 | user_params = {} 10 | 11 | policy_params = {} 12 | 13 | comp_params = { 14 | lz-top-cmp = { 15 | name = "lz-top-cmp" 16 | description = "The lz-top-cmp compartment will be created under tenancy and will include all the other resources." 17 | enable_delete = false 18 | parent_name = "" 19 | } 20 | } 21 | 22 | comp_params2 = { 23 | lz-security-cmp = { 24 | name = "lz-security-cmp" 25 | description = "Landing Zone compartment for all security related resources: vaults, topics, notifications, logging, scanning, and others." 26 | enable_delete = false 27 | parent_name = "lz-top-cmp" 28 | 29 | }, 30 | lz-network-cmp = { 31 | name = "lz-network-cmp" 32 | description = "Landing Zone compartment for all network related resources: VCNs, subnets, network gateways, security lists, NSGs, load balancers, VNICs, and others." 33 | enable_delete = false 34 | parent_name = "lz-top-cmp" 35 | }, 36 | lz-appdev-cmp = { 37 | name = "lz-appdev-cmp" 38 | description = "Landing Zone compartment for all resources related to application development: compute instances, storage, functions, OKE, API Gateway, streaming, and others." 39 | enable_delete = false 40 | parent_name = "lz-top-cmp" 41 | }, 42 | lz-database-cmp = { 43 | name = "lz-database-cmp" 44 | description = "Landing Zone compartment for all database related resources." 45 | enable_delete = false 46 | parent_name = "lz-top-cmp" 47 | }, 48 | } 49 | -------------------------------------------------------------------------------- /examples/cis-quickstart/iam_groups.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | group_params = { 6 | "lz-iam-admin-group" = { 7 | name = "lz-iam-admin-group" 8 | description = "Landing Zone group for managing IAM resources in the tenancy." 9 | } 10 | } 11 | group_params2 = { 12 | 13 | "lz-security-admin-group" = { 14 | name = "lz-security-admin-group" 15 | description = "Landing Zone group for managing security services in compartment lz-security-cmp." 16 | }, 17 | "lz-network-admin-group" = { 18 | name = "lz-network-admin-group" 19 | description = "Landing Zone group for managing networking in compartment lz-network-cmp." 20 | }, 21 | "lz-database-admin-group" = { 22 | name = "lz-database-admin-group" 23 | description = "Landing Zone group for managing databases in compartment lz-database-cmp." 24 | }, 25 | "lz-appdev-admin-group" = { 26 | name = "lz-appdev-admin-group" 27 | description = "Landing Zone group for managing app development related services in compartment lz-appdev-cmp." 28 | }, 29 | "lz-cred-admin-group" = { 30 | name = "lz-cred-admin-group" 31 | description = "Landing Zone group for managing users credentials in the tenancy." 32 | }, 33 | "lz-auditor-group" = { 34 | name = "lz-auditor-group" 35 | description = "Landing Zone group for auditing the tenancy." 36 | }, 37 | "lz-announcement-reader-group" = { 38 | name = "lz-announcement-reader-group" 39 | description = "Landing Zone group for reading Console announcements." 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /examples/cis-quickstart/kms.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | vault_params = { 5 | lz-vault = { 6 | compartment_name = "lz-security-cmp" 7 | display_name = "lz-vault" 8 | vault_type = "DEFAULT" 9 | } 10 | } 11 | 12 | key_params = { 13 | lz-oss-key = { 14 | compartment_name = "lz-security-cmp" 15 | display_name = "lz-oss-key" 16 | vault_name = "lz-vault" 17 | key_shape_algorithm = "AES" 18 | key_shape_size_in_bytes = 32 19 | rotation_version = 0 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /examples/cis-quickstart/notifications.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | topic_params = { 6 | lz-security-topic = { 7 | comp_name = "lz-security-cmp" 8 | topic_name = "lz-security-topic" 9 | description = "Landing Zone topic for security related notifications." 10 | }, 11 | lz-network-topic = { 12 | comp_name = "lz-security-cmp" 13 | topic_name = "lz-network-topic" 14 | description = "Landing Zone topic for network related notifications." 15 | } 16 | } 17 | 18 | subscription_params = { 19 | subscription1 = { 20 | comp_name = "lz-security-cmp" 21 | endpoint = "testemail@test.com" 22 | protocol = "EMAIL" 23 | topic_name = "lz-security-topic" 24 | } 25 | subscription2 = { 26 | comp_name = "lz-security-cmp" 27 | endpoint = "testemail@test.com" 28 | protocol = "EMAIL" 29 | topic_name = "lz-network-topic" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /examples/cis-quickstart/object_storage.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | bucket_params = { 6 | lz-appdev-bucket = { 7 | compartment_name = "lz-appdev-cmp" 8 | name = "lz-appdev-bucket" 9 | access_type = "NoPublicAccess" 10 | storage_tier = "Standard" 11 | events_enabled = false 12 | kms_key_name = "lz-oss-key" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/cis-quickstart/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | # output "iam_users" { 4 | # value = module.iam.users 5 | # } 6 | 7 | output "iam_comp" { 8 | value = merge(module.iam_top_comp.compartments, module.iam.compartments) 9 | } 10 | 11 | output "iam_groups" { 12 | value = merge(module.iam_top_comp.groups, module.iam.groups) 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/cis-quickstart/service_connector.auto.tfvars: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/examples/cis-quickstart/service_connector.auto.tfvars -------------------------------------------------------------------------------- /examples/cis-quickstart/vulnerability_scan.auto.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | scan_recipes_params = { 5 | lz-default-scan-recipe = { 6 | display_name = "lz-default-scan-recipe" 7 | comp_name = "lz-security-cmp" 8 | scan_level = "STANDARD" 9 | agent_config_vendor = "OCI" 10 | cis_bench_scan_level = "MEDIUM" 11 | port_scan_level = "STANDARD" 12 | schedule_type = "WEEKLY" 13 | day_of_week = "SUNDAY" 14 | } 15 | } 16 | 17 | 18 | scan_target_params = { 19 | lz-security-cmp-scan-target = { 20 | display_name = "lz-security-cmp-scan-target" 21 | comp_name = "lz-security-cmp" 22 | recipe_name = "lz-default-scan-recipe" 23 | target_comp_name = "lz-security-cmp" 24 | }, 25 | lz-network-cmp-scan-target = { 26 | display_name = "lz-network-cmp-scan-target" 27 | comp_name = "lz-network-cmp" 28 | recipe_name = "lz-default-scan-recipe" 29 | target_comp_name = "lz-network-cmp" 30 | }, 31 | lz-appdev-cmp-scan-target = { 32 | display_name = "lz-appdev-cmp-scan-target" 33 | comp_name = "lz-appdev-cmp" 34 | recipe_name = "lz-default-scan-recipe" 35 | target_comp_name = "lz-appdev-cmp" 36 | }, 37 | lz-database-cmp-scan-target = { 38 | display_name = "lz-database-cmp-scan-target" 39 | comp_name = "lz-database-cmp" 40 | recipe_name = "lz-default-scan-recipe" 41 | target_comp_name = "lz-database-cmp" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /examples/crawl/adw/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | provider "oci" { 4 | tenancy_ocid = var.provider_oci.tenancy 5 | user_ocid = var.provider_oci.user_id 6 | fingerprint = var.provider_oci.fingerprint 7 | private_key_path = var.provider_oci.key_file_path 8 | region = var.provider_oci.region 9 | } 10 | 11 | module "adw" { 12 | source = "../../../modules/adw" 13 | adw_params = var.adw_params 14 | compartment_ids = var.compartment_ids 15 | } 16 | -------------------------------------------------------------------------------- /examples/crawl/adw/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "ad" { 4 | value = module.adw.ad 5 | } 6 | -------------------------------------------------------------------------------- /examples/crawl/adw/terraform.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | compartment_ids = { 5 | sandbox = "ocid1..." 6 | } 7 | 8 | adw_params = { 9 | hurriatp = { 10 | compartment_name = "sandbox" 11 | cpu_core_count = 1 12 | size_in_tbs = 1 13 | db_name = "hurriatp" 14 | db_workload = "OLTP" 15 | enable_auto_scaling = false 16 | is_free_tier = false 17 | create_local_wallet = true 18 | } 19 | hurriadw = { 20 | compartment_name = "sandbox" 21 | cpu_core_count = 1 22 | size_in_tbs = 1 23 | db_name = "hurriadw" 24 | db_workload = "DW" 25 | enable_auto_scaling = false 26 | is_free_tier = false 27 | create_local_wallet = false 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /examples/crawl/adw/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "provider_oci" { 4 | type = map(string) 5 | } 6 | 7 | variable "adw_params" { 8 | type = map(object({ 9 | compartment_name = string 10 | cpu_core_count = number 11 | size_in_tbs = number 12 | db_name = string 13 | db_workload = string 14 | enable_auto_scaling = bool 15 | is_free_tier = bool 16 | create_local_wallet = bool 17 | })) 18 | } 19 | 20 | variable "compartment_ids" { 21 | type = map(string) 22 | } 23 | -------------------------------------------------------------------------------- /examples/crawl/compute-image-lister/lister.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | locals { 5 | images = { for i in data.oci_core_images.existing.images : 6 | i.id => { "os" : i.operating_system, "os_version" : i.operating_system_version, "name" : i.display_name } 7 | } 8 | shapes = [for i in data.oci_core_image_shapes.existing : 9 | { for j in i.image_shape_compatibilities : 10 | j.image_id => j.shape... 11 | } 12 | ] 13 | images_and_shapes = [for k in local.shapes : 14 | { for i, j in k : 15 | local.images[i].name => { "os" : local.images[i].os, "os_version" : local.images[i].os_version, "id" : i, "shapes" : j } 16 | } 17 | ] 18 | } 19 | 20 | data "oci_core_images" "existing" { 21 | compartment_id = "" 22 | operating_system = "" 23 | operating_system_version = "" 24 | } 25 | 26 | data "oci_core_image_shapes" "existing" { 27 | for_each = local.images 28 | image_id = each.key 29 | } 30 | 31 | output "images" { 32 | value = local.images_and_shapes 33 | } 34 | 35 | # Supported values: 36 | # Operating System: 'Canonical Ubuntu', 'Oracle Linux', 'CentOS', 'Windows' 37 | -------------------------------------------------------------------------------- /examples/crawl/crawl-workshop/crawl.md: -------------------------------------------------------------------------------- 1 | ## Important 2 | 3 | ## Introduction 4 | In order to do this workshop series, you will first have to finish the Crawl-Walk walkthrough. 5 | In case you already did that, you can proceed with the lab series. 6 | 7 | [Click here to go to Crawl-Walk walkthrough](https://oracle.github.io/learning-library/solutions-library/infrastructure-automation/thunder/workshop/index.html?lab=lab-4-crawl-walk) 8 | -------------------------------------------------------------------------------- /examples/crawl/dbaas/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | provider "oci" { 4 | tenancy_ocid = var.provider_oci.tenancy 5 | user_ocid = var.provider_oci.user_id 6 | fingerprint = var.provider_oci.fingerprint 7 | private_key_path = var.provider_oci.key_file_path 8 | region = var.provider_oci.region 9 | } 10 | 11 | module "dbaas" { 12 | source = "../../../modules/dbaas" 13 | database_params = var.database_params 14 | compartment_ids = var.compartment_ids 15 | subnet_ids = var.subnet_ids 16 | } 17 | -------------------------------------------------------------------------------- /examples/crawl/dbaas/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "database" { 4 | value = module.dbaas.database 5 | } 6 | -------------------------------------------------------------------------------- /examples/crawl/dbaas/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "provider_oci" { 4 | type = map(string) 5 | } 6 | 7 | variable "database_params" { 8 | description = "The paramaters for the database" 9 | type = map(object({ 10 | compartment_name = string 11 | ad = number 12 | cpu_core_count = number 13 | db_edition = string 14 | db_admin_password = string 15 | db_name = string 16 | db_workload = string 17 | pdb_name = string 18 | enable_auto_backup = bool 19 | db_version = string 20 | display_name = string 21 | disk_redundancy = string 22 | shape = string 23 | subnet_name = string 24 | ssh_public_key = string 25 | hostname = string 26 | data_storage_size_in_gb = number 27 | license_model = string 28 | node_count = number 29 | })) 30 | } 31 | 32 | variable "compartment_ids" { 33 | type = map(string) 34 | } 35 | 36 | variable "subnet_ids" { 37 | type = map(string) 38 | } 39 | -------------------------------------------------------------------------------- /examples/crawl/iam/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | provider "oci" { 4 | tenancy_ocid = var.provider_oci.tenancy 5 | user_ocid = var.provider_oci.user_id 6 | fingerprint = var.provider_oci.fingerprint 7 | private_key_path = var.provider_oci.key_file_path 8 | region = var.provider_oci.region 9 | } 10 | 11 | module "iam" { 12 | source = "../../../modules/iam" 13 | comp_params = var.comp_params 14 | parent_comp = var.parent_comp 15 | user_params = var.user_params 16 | group_params = var.group_params 17 | policy_params = var.policy_params 18 | auth_provider = var.provider_oci 19 | } 20 | -------------------------------------------------------------------------------- /examples/crawl/iam/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "users" { 4 | value = module.iam.users 5 | } 6 | 7 | output "compartments" { 8 | value = module.iam.compartments 9 | } 10 | 11 | output "groups" { 12 | value = module.iam.groups 13 | } 14 | 15 | output "policies" { 16 | value = module.iam.policies 17 | } 18 | -------------------------------------------------------------------------------- /examples/crawl/iam/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "provider_oci" { 4 | type = map(string) 5 | } 6 | 7 | variable "parent_comp" { 8 | type = map(any) 9 | default = {} 10 | description = "Leave it empty if you want to create compartments under tenancy" 11 | } 12 | 13 | variable "comp_params" { 14 | type = map(object({ 15 | name = string 16 | description = string 17 | enable_delete = bool 18 | parent_name = string 19 | })) 20 | } 21 | 22 | variable "user_params" { 23 | type = map(object({ 24 | name = string 25 | description = string 26 | group_name = string 27 | })) 28 | } 29 | 30 | variable "group_params" { 31 | type = map(object({ 32 | name = string 33 | description = string 34 | })) 35 | } 36 | 37 | variable "policy_params" { 38 | type = map(object({ 39 | name = string 40 | description = string 41 | compartment_name = string 42 | statements = list(string) 43 | })) 44 | } 45 | -------------------------------------------------------------------------------- /examples/crawl/instances/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | provider "oci" { 4 | tenancy_ocid = var.provider_oci.tenancy 5 | user_ocid = var.provider_oci.user_id 6 | fingerprint = var.provider_oci.fingerprint 7 | private_key_path = var.provider_oci.key_file_path 8 | region = var.provider_oci.region 9 | } 10 | 11 | module "compute" { 12 | source = "../../../modules/instances" 13 | compartment_ids = var.compartment_ids 14 | subnet_ids = var.subnet_ids 15 | instance_params = var.instance_params 16 | bv_params = var.bv_params 17 | win_instance_params = var.win_instance_params 18 | win_bv_params = var.win_bv_params 19 | region = var.provider_oci.region 20 | linux_images = var.linux_images 21 | windows_images = var.windows_images 22 | kms_key_ids = var.kms_key_ids 23 | nsgs = var.nsgs 24 | } 25 | -------------------------------------------------------------------------------- /examples/crawl/instances/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "linux_instances" { 4 | value = module.compute.linux_instances 5 | } 6 | 7 | output "windows_instances" { 8 | value = module.compute.windows_instances 9 | } 10 | -------------------------------------------------------------------------------- /examples/crawl/network/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | provider "oci" { 4 | tenancy_ocid = var.provider_oci.tenancy 5 | user_ocid = var.provider_oci.user_id 6 | fingerprint = var.provider_oci.fingerprint 7 | private_key_path = var.provider_oci.key_file_path 8 | region = var.provider_oci.region 9 | } 10 | 11 | module "network" { 12 | source = "../../../modules/network" 13 | vcn_params = var.vcn_params 14 | compartment_ids = var.compartment_ids 15 | igw_params = var.igw_params 16 | ngw_params = var.ngw_params 17 | rt_params = var.rt_params 18 | sl_params = var.sl_params 19 | nsg_params = var.nsg_params 20 | nsg_rules_params = var.nsg_rules_params 21 | subnet_params = var.subnet_params 22 | lpg_params = var.lpg_params 23 | drg_params = var.drg_params 24 | drg_attachment_params = var.drg_attachment_params 25 | sgw_params = var.sgw_params 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /examples/crawl/network/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "vcns" { 4 | value = module.network.vcns 5 | } 6 | 7 | output "subnets" { 8 | value = module.network.subnets 9 | } 10 | 11 | output "nsgs" { 12 | value = module.network.nsgs 13 | } 14 | -------------------------------------------------------------------------------- /examples/dev_tools/alarms/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | provider "oci" { 5 | tenancy_ocid = var.provider_oci.tenancy 6 | user_ocid = var.provider_oci.user_id 7 | fingerprint = var.provider_oci.fingerprint 8 | private_key_path = var.provider_oci.key_file_path 9 | region = var.provider_oci.region 10 | } 11 | 12 | module "alarms" { 13 | source = "../../../modules/alarms" 14 | alarm_params = var.alarm_params 15 | compartments = var.compartments 16 | topics = var.topics 17 | } 18 | -------------------------------------------------------------------------------- /examples/dev_tools/alarms/terraform.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | compartments = { 5 | sandbox = "ocid1..." 6 | } 7 | 8 | topics = { 9 | topic1 = "ocid1..." 10 | } 11 | 12 | alarm_params = { 13 | alarm1 = { 14 | comp_name = "sandbox" 15 | destinations = ["topic1"] 16 | alarm_display_name = "alarm1" 17 | alarm_is_enabled = true 18 | alarm_metric_comp_name = "sandbox" 19 | alarm_namespace = "oci_computeagent" 20 | alarm_query = "CpuUtilization[1m]{resourceDisplayName = \"Flavius-dev\"}.absent()" 21 | alarm_severity = "WARNING" 22 | alarm_body = "Oops. Something went mega wrong with this" 23 | alarm_metric_compartment_id_in_subtree = false 24 | alarm_pending_duration = null 25 | alarm_repeat_notification_duration = null 26 | alarm_resolution = null 27 | alarm_resource_group = null 28 | suppression_params = [] 29 | } 30 | } -------------------------------------------------------------------------------- /examples/dev_tools/alarms/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "compartments" { 9 | type = map(string) 10 | } 11 | 12 | variable "alarm_params" { 13 | type = map(object({ 14 | comp_name = string 15 | destinations = list(string) 16 | alarm_display_name = string 17 | alarm_is_enabled = bool 18 | alarm_metric_comp_name = string 19 | alarm_namespace = string 20 | alarm_query = string 21 | alarm_severity = string 22 | alarm_body = string 23 | alarm_metric_compartment_id_in_subtree = bool 24 | alarm_pending_duration = string 25 | alarm_repeat_notification_duration = string 26 | alarm_resolution = string 27 | alarm_resource_group = string 28 | suppression_params = list(object({ 29 | alarm_suppression_description = string 30 | alarm_suppression_time_suppress_from = string 31 | alarm_suppression_time_suppress_until = string 32 | })) 33 | })) 34 | } 35 | 36 | variable "topics" { 37 | type = map(string) 38 | } 39 | -------------------------------------------------------------------------------- /examples/dev_tools/api-gateway/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | provider "oci" { 4 | tenancy_ocid = var.provider_oci.tenancy 5 | user_ocid = var.provider_oci.user_id 6 | fingerprint = var.provider_oci.fingerprint 7 | private_key_path = var.provider_oci.key_file_path 8 | region = var.provider_oci.region 9 | } 10 | 11 | module "api-gateway" { 12 | source = "../../../modules/api-gateway" 13 | compartment_ids = var.compartment_ids 14 | subnet_ids = var.subnet_ids 15 | function_ids = var.function_ids 16 | apigw_params = var.apigw_params 17 | gwdeploy_params = var.gwdeploy_params 18 | } 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/dev_tools/api-gateway/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "gateways" { 4 | value = module.api-gateway.gateways 5 | } 6 | 7 | output "deployments" { 8 | value = module.api-gateway.deployments 9 | } 10 | 11 | output "api_endpoints" { 12 | value = module.api-gateway.routes 13 | } 14 | -------------------------------------------------------------------------------- /examples/dev_tools/api-gateway/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "provider_oci" { 4 | type = map(string) 5 | } 6 | 7 | variable "compartment_ids" { 8 | type = map(string) 9 | } 10 | 11 | variable "subnet_ids" { 12 | type = map(string) 13 | } 14 | 15 | variable "function_ids" { 16 | type = map(string) 17 | } 18 | 19 | variable "apigw_params" { 20 | type = map(object({ 21 | compartment_name = string 22 | subnet_name = string 23 | display_name = string 24 | endpoint_type = string 25 | })) 26 | } 27 | 28 | variable "gwdeploy_params" { 29 | description = "API Gateway Deployment Params" 30 | type = map(object({ 31 | compartment_name = string 32 | gateway_name = string 33 | display_name = string 34 | path_prefix = string 35 | access_log = bool 36 | exec_log_lvl = string 37 | function_routes = list(object({ 38 | type = string 39 | path = string 40 | methods = list(string) 41 | function_name = string 42 | })) 43 | http_routes = list(object({ 44 | type = string 45 | path = string 46 | methods = list(string) 47 | url = string 48 | connect_timeout = number 49 | ssl_verify = bool 50 | read_timeout = number 51 | send_timeout = number 52 | })) 53 | stock_routes = list(object({ 54 | type = string 55 | path = string 56 | methods = list(string) 57 | status = number 58 | body = string 59 | headers = list(object({ 60 | name = string 61 | value = string 62 | })) 63 | })) 64 | })) 65 | } 66 | -------------------------------------------------------------------------------- /examples/dev_tools/containers/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | provider "oci" { 4 | tenancy_ocid = var.provider_oci.tenancy 5 | user_ocid = var.provider_oci.user_id 6 | fingerprint = var.provider_oci.fingerprint 7 | private_key_path = var.provider_oci.key_file_path 8 | region = var.provider_oci.region 9 | } 10 | 11 | module "oke" { 12 | source = "../../../modules/containers" 13 | compartment_ids = var.compartment_ids 14 | cluster_params = var.cluster_params 15 | nodepools_params = var.nodepools_params 16 | linux_images = var.linux_images 17 | region = var.provider_oci.region 18 | vcn_ids = var.vcn_ids 19 | subnet_ids = var.subnet_ids 20 | } 21 | -------------------------------------------------------------------------------- /examples/dev_tools/containers/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "cluster_ids" { 5 | value = module.oke.cluster_ids 6 | } 7 | 8 | output "pods_cidrs" { 9 | value = module.oke.pods_cidrs 10 | } 11 | 12 | output "number_of_nodes" { 13 | value = module.oke.number_of_nodes 14 | } 15 | 16 | # output "kubeconfig" { 17 | # value = module.okeadmin.kubeconfig 18 | # } 19 | -------------------------------------------------------------------------------- /examples/dev_tools/containers/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "compartment_ids" { 9 | type = map(string) 10 | } 11 | 12 | 13 | variable "subnet_ids" { 14 | type = map(string) 15 | } 16 | 17 | variable "vcn_ids" { 18 | type = map(string) 19 | } 20 | 21 | variable "cluster_params" { 22 | type = map(object({ 23 | compartment_name = string 24 | kubernetes_version = string 25 | # encryption 26 | use_encryption = bool 27 | kms_key_id = string 28 | cluster_name = string 29 | vcn_name = string 30 | is_kubernetes_dashboard_enabled = bool 31 | is_tiller_enabled = bool 32 | pods_cidr = string 33 | services_cidr = string 34 | service_lb_subnet_names = list(string) 35 | })) 36 | } 37 | 38 | variable "nodepools_params" { 39 | type = map(object({ 40 | compartment_name = string 41 | cluster_name = string 42 | pool_name = string 43 | subnet_name = string 44 | size = number 45 | node_shape = string 46 | ssh_public_key = string 47 | placement_configs = list(object({ 48 | ad = number 49 | subnet = string 50 | })) 51 | })) 52 | } 53 | 54 | variable "linux_images" { 55 | type = map(string) 56 | } 57 | -------------------------------------------------------------------------------- /examples/dev_tools/functions/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | provider "oci" { 4 | tenancy_ocid = var.provider_oci.tenancy 5 | user_ocid = var.provider_oci.user_id 6 | fingerprint = var.provider_oci.fingerprint 7 | private_key_path = var.provider_oci.key_file_path 8 | region = var.provider_oci.region 9 | } 10 | 11 | module "functions" { 12 | source = "../../../modules/functions" 13 | compartment_ids = var.compartment_ids 14 | subnet_ids = var.subnet_ids 15 | app_params = var.app_params 16 | fn_params = var.fn_params 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/dev_tools/functions/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "apps" { 4 | value = module.functions.apps 5 | } 6 | 7 | output "functions" { 8 | value = module.functions.functions 9 | } 10 | -------------------------------------------------------------------------------- /examples/dev_tools/functions/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "provider_oci" { 4 | type = map(string) 5 | } 6 | 7 | variable "compartment_ids" { 8 | type = map(string) 9 | } 10 | 11 | variable "subnet_ids" { 12 | type = map(string) 13 | } 14 | 15 | variable "app_params" { 16 | type = map(object({ 17 | compartment_name = string 18 | subnet_name = list(string) 19 | display_name = string 20 | config = map(string) 21 | freeform_tags = map(string) 22 | })) 23 | } 24 | 25 | variable "fn_params" { 26 | type = map(object({ 27 | function_app = string 28 | display_name = string 29 | image = string 30 | memory_in_mbs = number 31 | image_digest = string 32 | timeout_in_seconds = number 33 | config = map(string) 34 | freeform_tags = map(string) 35 | })) 36 | } 37 | -------------------------------------------------------------------------------- /examples/dev_tools/marketplace_instance/listing_helper/lister.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | data "oci_core_app_catalog_listings" "existing" { 4 | } 5 | 6 | locals { 7 | listings = { 8 | for i in data.oci_core_app_catalog_listings.existing.app_catalog_listings : 9 | i.display_name => {"display_name" : i.display_name, "publisher_name": i.publisher_name, "listing_id": i.listing_id} ... 10 | } 11 | helper = { 12 | for i in local.listings: 13 | format("%s: %s", i[0].publisher_name, i[0].display_name) => i[0].listing_id 14 | } 15 | 16 | versions = { 17 | for key, value in data.oci_core_app_catalog_listing_resource_versions.existing: 18 | key => { "publisher": split(":", key)[0], "display_name": split(": ", key)[1], "listing_id": value.app_catalog_listing_resource_versions[0].listing_id, "listing_resource_id": value.app_catalog_listing_resource_versions[0].listing_resource_id, "resource_version": value.app_catalog_listing_resource_versions[0].listing_resource_version} 19 | } 20 | } 21 | 22 | data "oci_core_app_catalog_listing_resource_versions" "existing" { 23 | for_each = local.helper 24 | listing_id = each.value 25 | } 26 | 27 | output "resource_version" { 28 | value = local.versions 29 | } 30 | -------------------------------------------------------------------------------- /examples/dev_tools/marketplace_instance/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | provider "oci" { 5 | tenancy_ocid = var.provider_oci.tenancy 6 | user_ocid = var.provider_oci.user_id 7 | fingerprint = var.provider_oci.fingerprint 8 | private_key_path = var.provider_oci.key_file_path 9 | region = var.provider_oci.region 10 | } 11 | 12 | module "marketplace_instance" { 13 | source = "../../../modules/marketplace_instance" 14 | compartment_ids = var.compartment_ids 15 | subnet_ids = var.subnet_ids 16 | instance_params = var.instance_params 17 | nsgs = var.nsgs 18 | kms_key_ids = var.kms_key_ids 19 | } 20 | -------------------------------------------------------------------------------- /examples/dev_tools/marketplace_instance/outputs.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/examples/dev_tools/marketplace_instance/outputs.tf -------------------------------------------------------------------------------- /examples/dev_tools/marketplace_instance/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "provider_oci" { 4 | type = map(string) 5 | } 6 | 7 | variable "compartment_ids" { 8 | type = map(string) 9 | } 10 | 11 | variable "subnet_ids" { 12 | type = map(string) 13 | } 14 | 15 | variable "nsgs" { 16 | type = map(string) 17 | } 18 | 19 | variable "kms_key_ids" { 20 | type = map(string) 21 | } 22 | 23 | variable "instance_params" { 24 | description = "Placeholder for the parameters of the instances" 25 | type = map(object({ 26 | ad = number 27 | shape = string 28 | hostname = string 29 | boot_volume_size = number 30 | assign_public_ip = bool 31 | preserve_boot_volume = bool 32 | compartment_name = string 33 | subnet_name = string 34 | ssh_public_key = string 35 | device_disk_mappings = string 36 | freeform_tags = map(string) 37 | kms_key_name = string 38 | block_vol_att_type = string 39 | encrypt_in_transit = bool 40 | fd = number 41 | image_version = string 42 | nsgs = list(string) 43 | listing_id = string 44 | listing_resource_version = string 45 | })) 46 | } 47 | -------------------------------------------------------------------------------- /examples/dev_tools/notifications/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | provider "oci" { 5 | tenancy_ocid = var.provider_oci.tenancy 6 | user_ocid = var.provider_oci.user_id 7 | fingerprint = var.provider_oci.fingerprint 8 | private_key_path = var.provider_oci.key_file_path 9 | region = var.provider_oci.region 10 | } 11 | 12 | module "notifications" { 13 | source = "../../../modules/notifications" 14 | topic_params = var.topic_params 15 | subscription_params = var.subscription_params 16 | compartments = var.compartments 17 | } 18 | -------------------------------------------------------------------------------- /examples/dev_tools/notifications/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "topics" { 5 | value = module.notifications.topics 6 | } 7 | -------------------------------------------------------------------------------- /examples/dev_tools/notifications/terraform.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | compartments = { 5 | sandbox = "ocid1..." 6 | } 7 | 8 | topic_params = { 9 | topic1 = { 10 | comp_name = "sandbox" 11 | topic_name = "topic1" 12 | description = "test topic" 13 | } 14 | } 15 | 16 | subscription_params = { 17 | subscription1 = { 18 | comp_name = "sandbox" 19 | endpoint = "testemail@test.com" 20 | protocol = "EMAIL" 21 | topic_name = "topic1" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/dev_tools/notifications/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "compartments" { 9 | type = map(string) 10 | } 11 | 12 | variable "topic_params" { 13 | type = map(object({ 14 | comp_name = string 15 | topic_name = string 16 | description = string 17 | })) 18 | } 19 | 20 | variable "subscription_params" { 21 | type = map(object({ 22 | comp_name = string 23 | endpoint = string 24 | protocol = string 25 | topic_name = string 26 | })) 27 | } 28 | -------------------------------------------------------------------------------- /examples/enterprise_tier/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "iam_users" { 4 | value = module.iam.users 5 | } 6 | 7 | output "iam_compartments" { 8 | value = module.iam.compartments 9 | } 10 | 11 | output "iam_groups" { 12 | value = module.iam.groups 13 | } 14 | 15 | output "iam_policies" { 16 | value = module.iam.policies 17 | } 18 | 19 | output "network_vcns" { 20 | value = module.network.vcns 21 | } 22 | 23 | output "network_subnets" { 24 | value = module.network.subnets 25 | } 26 | 27 | output "autonomous" { 28 | value = module.adw.ad 29 | } 30 | 31 | output "compute_linux_instances" { 32 | value = module.compute.linux_instances 33 | } 34 | 35 | output "compute_windows_instances" { 36 | value = module.compute.windows_instances 37 | } 38 | 39 | output "all_instances" { 40 | value = module.compute.all_instances 41 | } 42 | 43 | output "all_private_ips" { 44 | value = module.compute.all_private_ips 45 | } 46 | # 47 | # # output "database" { 48 | # # value = module.dbaas.database 49 | # # } 50 | # 51 | output "dns_zones" { 52 | value = module.dns.zones 53 | } 54 | 55 | output "dns_records" { 56 | value = module.dns.records 57 | } 58 | 59 | output "fss_filesystems" { 60 | value = module.fss.filesystems 61 | } 62 | 63 | output "fss_mount_targets" { 64 | value = module.fss.mount_targets 65 | } 66 | 67 | output "load_balancer_lbs" { 68 | value = module.load-balancer.load_balancers 69 | } 70 | 71 | output "load_balancer_backend_sets" { 72 | value = module.load-balancer.backend_sets 73 | } 74 | 75 | output "buckets" { 76 | value = module.object-storage.buckets 77 | } 78 | -------------------------------------------------------------------------------- /examples/free_tier/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "iam_users" { 4 | value = module.iam.users 5 | } 6 | 7 | output "iam_compartments" { 8 | value = module.iam.compartments 9 | } 10 | 11 | output "iam_groups" { 12 | value = module.iam.groups 13 | } 14 | 15 | output "iam_policies" { 16 | value = module.iam.policies 17 | } 18 | 19 | output "network_vcns" { 20 | value = module.network.vcns 21 | } 22 | 23 | output "network_subnets" { 24 | value = module.network.subnets 25 | } 26 | 27 | output "autonomous" { 28 | value = module.adw.ad 29 | } 30 | 31 | output "compute_linux_instances" { 32 | value = module.compute.linux_instances 33 | } 34 | 35 | output "load_balancer_lbs" { 36 | value = module.load-balancer.load_balancers 37 | } 38 | 39 | output "load_balancer_backend_sets" { 40 | value = module.load-balancer.backend_sets 41 | } 42 | 43 | output "buckets" { 44 | value = module.object-storage.buckets 45 | } 46 | -------------------------------------------------------------------------------- /examples/network_architectures/img/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/examples/network_architectures/img/.gitkeep -------------------------------------------------------------------------------- /examples/network_architectures/img/isv-Isolated-Arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/examples/network_architectures/img/isv-Isolated-Arch.png -------------------------------------------------------------------------------- /examples/network_architectures/img/isv-shared-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/examples/network_architectures/img/isv-shared-arch.png -------------------------------------------------------------------------------- /examples/network_architectures/img/n-tier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/examples/network_architectures/img/n-tier.png -------------------------------------------------------------------------------- /examples/network_architectures/n_tier_web_app/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "vcns" { 4 | value = module.network.vcns 5 | } 6 | 7 | output "subnets" { 8 | value = module.network.subnets 9 | } 10 | 11 | output "compute_linux_instances" { 12 | value = module.compute.linux_instances 13 | } 14 | 15 | output "load_balancer_lbs" { 16 | value = module.load-balancer.load_balancers 17 | } 18 | 19 | output "nw_ipsec_tunnel_ips" { 20 | value = module.ipsec.ipsec_tunnel_ips 21 | } 22 | -------------------------------------------------------------------------------- /examples/network_architectures/saas_isolated_arch/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "vcns" { 4 | value = module.network.vcns 5 | } 6 | 7 | output "subnets" { 8 | value = module.network.subnets 9 | } 10 | 11 | output "compute_linux_instances" { 12 | value = module.compute.linux_instances 13 | } 14 | 15 | output "load_balancer_lbs" { 16 | value = module.load-balancer.load_balancers 17 | } 18 | 19 | output "nw_ipsec_tunnel_ips" { 20 | value = module.ipsec.ipsec_tunnel_ips 21 | } 22 | -------------------------------------------------------------------------------- /examples/network_architectures/saas_shared_arch/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "nw_vcns" { 4 | value = module.network.vcns 5 | } 6 | 7 | output "nw_subnets" { 8 | value = module.network.subnets 9 | } 10 | 11 | output "nw_ipsec_tunnel_ips" { 12 | value = module.ipsec.ipsec_tunnel_ips 13 | } 14 | 15 | output "compute_linux_instances" { 16 | value = module.compute.linux_instances 17 | } 18 | -------------------------------------------------------------------------------- /examples/run/asg/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | provider "oci" { 4 | tenancy_ocid = var.provider_oci.tenancy 5 | user_ocid = var.provider_oci.user_id 6 | fingerprint = var.provider_oci.fingerprint 7 | private_key_path = var.provider_oci.key_file_path 8 | region = var.provider_oci.region 9 | } 10 | 11 | module "asg" { 12 | source = "../../../modules/asg" 13 | asg_params = var.asg_params 14 | compartment_ids = var.compartment_ids 15 | images = var.images 16 | region = var.provider_oci.region 17 | backend_sets = var.backend_sets 18 | load_balancer_ids = var.load_balancer_ids 19 | subnet_ids = var.subnet_ids 20 | } 21 | -------------------------------------------------------------------------------- /examples/run/asg/outputs.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/examples/run/asg/outputs.tf -------------------------------------------------------------------------------- /examples/run/blockchain/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | provider "oci" { 5 | tenancy_ocid = var.provider_oci.tenancy 6 | user_ocid = var.provider_oci.user_id 7 | fingerprint = var.provider_oci.fingerprint 8 | private_key_path = var.provider_oci.key_file_path 9 | region = var.provider_oci.region 10 | } 11 | 12 | module "blockchain" { 13 | source = "../../modules/blockchain" 14 | compartments = var.compartments 15 | blockchain_params = var.blockchain_params 16 | osn_params = var.osn_params 17 | peer_params = var.peer_params 18 | oci_provider = var.provider_oci 19 | } 20 | -------------------------------------------------------------------------------- /examples/run/blockchain/outputs.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/examples/run/blockchain/outputs.tf -------------------------------------------------------------------------------- /examples/run/blockchain/terraform.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | compartments = { 5 | sandbox = "ocid-of-sandbox" 6 | } 7 | 8 | blockchain_params = { 9 | "obp-ex" = { 10 | compartment_name = "sandbox" 11 | compute_shape = "ENTERPRISE_SMALL" 12 | idcs_access_token = "idcs-access-token" 13 | name = "obp-ex" 14 | platform_role = "FOUNDER" 15 | } 16 | } 17 | 18 | osn_params = { 19 | "osn1" = { 20 | ad = "AD1" 21 | ocpu = 1 22 | platform_name = "obp-ex" 23 | } 24 | } 25 | peer_params = { 26 | "peer1" = { 27 | ad = "AD2" 28 | alias = "peer" 29 | ocpu = 1 30 | platform_name = "obp-ex" 31 | role = "MEMBER" # ADMIN or MEMBER 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /examples/run/blockchain/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | variable "provider_oci" { 6 | type = map(string) 7 | } 8 | 9 | variable "compartments" { 10 | type = map(string) 11 | } 12 | 13 | variable "blockchain_params" { 14 | type = map(object({ 15 | compartment_name = string 16 | compute_shape = string 17 | idcs_access_token = string 18 | name = string 19 | platform_role = string 20 | })) 21 | } 22 | 23 | variable "osn_params" { 24 | type = map(object({ 25 | ad = string 26 | platform_name = string 27 | ocpu = number 28 | })) 29 | } 30 | 31 | variable "peer_params" { 32 | type = map(object({ 33 | ad = string 34 | platform_name = string 35 | ocpu = number 36 | role = string 37 | alias = string 38 | })) 39 | } 40 | -------------------------------------------------------------------------------- /examples/run/fss-redundancy/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "filesystems_source" { 4 | value = module.fss_source.filesystems 5 | } 6 | 7 | output "mount_targets_source" { 8 | value = module.fss_source.mount_targets 9 | } 10 | 11 | output "filesystems_dest" { 12 | value = module.fss_second.filesystems 13 | } 14 | 15 | output "mount_targets_dest" { 16 | value = module.fss_second.mount_targets 17 | } 18 | 19 | output "linux_instances" { 20 | value = module.compute.linux_instances 21 | } 22 | 23 | output "linux_instances_second" { 24 | value = module.compute_second.linux_instances 25 | } 26 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/georeplicated_glusterfs_volume/dispersed/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips_region1" { 5 | value = module.glusterfs_region_1.private_ips 6 | } 7 | 8 | output "private_ips_region2" { 9 | value = module.glusterfs_region_2.private_ips 10 | } 11 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/georeplicated_glusterfs_volume/dispersed/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "gluster_params" { 9 | type = map(string) 10 | } 11 | 12 | variable "images" { 13 | type = map(string) 14 | } 15 | 16 | variable "instance_params" { 17 | type = map(object({ 18 | ad = number 19 | comp_id = string 20 | shape = string 21 | hostname = string 22 | subnet_id = string 23 | hostname = string 24 | preserve_boot_volume = string 25 | })) 26 | } 27 | 28 | variable "bv_params" { 29 | type = map(object({ 30 | name = string 31 | instance_name = string 32 | size_in_gbs = number 33 | })) 34 | } 35 | 36 | variable "instance_params_2" { 37 | type = map(object({ 38 | ad = number 39 | comp_id = string 40 | shape = string 41 | hostname = string 42 | subnet_id = string 43 | hostname = string 44 | preserve_boot_volume = string 45 | })) 46 | } 47 | 48 | variable "bv_params_2" { 49 | type = map(object({ 50 | name = string 51 | instance_name = string 52 | size_in_gbs = number 53 | })) 54 | } 55 | 56 | variable "ssh_public_key" { 57 | type = string 58 | } 59 | 60 | variable "ssh_private_key" { 61 | type = string 62 | } 63 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/georeplicated_glusterfs_volume/distributed/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips_region1" { 5 | value = module.glusterfs_region_1.private_ips 6 | } 7 | 8 | output "private_ips_region2" { 9 | value = module.glusterfs_region_2.private_ips 10 | } 11 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/georeplicated_glusterfs_volume/distributed/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "gluster_params" { 9 | type = map(string) 10 | } 11 | 12 | variable "images" { 13 | type = map(string) 14 | } 15 | 16 | variable "instance_params" { 17 | type = map(object({ 18 | ad = number 19 | comp_id = string 20 | shape = string 21 | hostname = string 22 | subnet_id = string 23 | hostname = string 24 | preserve_boot_volume = string 25 | })) 26 | } 27 | 28 | variable "bv_params" { 29 | type = map(object({ 30 | name = string 31 | instance_name = string 32 | size_in_gbs = number 33 | })) 34 | } 35 | 36 | variable "instance_params_2" { 37 | type = map(object({ 38 | ad = number 39 | comp_id = string 40 | shape = string 41 | hostname = string 42 | subnet_id = string 43 | hostname = string 44 | preserve_boot_volume = string 45 | })) 46 | } 47 | 48 | variable "bv_params_2" { 49 | type = map(object({ 50 | name = string 51 | instance_name = string 52 | size_in_gbs = number 53 | })) 54 | } 55 | 56 | variable "ssh_public_key" { 57 | type = string 58 | } 59 | 60 | variable "ssh_private_key" { 61 | type = string 62 | } 63 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/georeplicated_glusterfs_volume/distributed_dispersed/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips_region1" { 5 | value = module.glusterfs_region_1.private_ips 6 | } 7 | 8 | output "private_ips_region2" { 9 | value = module.glusterfs_region_2.private_ips 10 | } 11 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/georeplicated_glusterfs_volume/distributed_dispersed/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "gluster_params" { 9 | type = map(string) 10 | } 11 | 12 | variable "images" { 13 | type = map(string) 14 | } 15 | 16 | variable "instance_params" { 17 | type = map(object({ 18 | ad = number 19 | comp_id = string 20 | shape = string 21 | hostname = string 22 | subnet_id = string 23 | hostname = string 24 | preserve_boot_volume = string 25 | })) 26 | } 27 | 28 | variable "bv_params" { 29 | type = map(object({ 30 | name = string 31 | instance_name = string 32 | size_in_gbs = number 33 | })) 34 | } 35 | 36 | variable "instance_params_2" { 37 | type = map(object({ 38 | ad = number 39 | comp_id = string 40 | shape = string 41 | hostname = string 42 | subnet_id = string 43 | hostname = string 44 | preserve_boot_volume = string 45 | })) 46 | } 47 | 48 | variable "bv_params_2" { 49 | type = map(object({ 50 | name = string 51 | instance_name = string 52 | size_in_gbs = number 53 | })) 54 | } 55 | 56 | variable "ssh_public_key" { 57 | type = string 58 | } 59 | 60 | variable "ssh_private_key" { 61 | type = string 62 | } 63 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/georeplicated_glusterfs_volume/distributed_replicated/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips_region1" { 5 | value = module.glusterfs_region_1.private_ips 6 | } 7 | 8 | output "private_ips_region2" { 9 | value = module.glusterfs_region_2.private_ips 10 | } 11 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/georeplicated_glusterfs_volume/distributed_replicated/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "gluster_params" { 9 | type = map(string) 10 | } 11 | 12 | variable "images" { 13 | type = map(string) 14 | } 15 | 16 | variable "instance_params" { 17 | type = map(object({ 18 | ad = number 19 | comp_id = string 20 | shape = string 21 | hostname = string 22 | subnet_id = string 23 | hostname = string 24 | preserve_boot_volume = string 25 | })) 26 | } 27 | 28 | variable "bv_params" { 29 | type = map(object({ 30 | name = string 31 | instance_name = string 32 | size_in_gbs = number 33 | })) 34 | } 35 | 36 | variable "instance_params_2" { 37 | type = map(object({ 38 | ad = number 39 | comp_id = string 40 | shape = string 41 | hostname = string 42 | subnet_id = string 43 | hostname = string 44 | preserve_boot_volume = string 45 | })) 46 | } 47 | 48 | variable "bv_params_2" { 49 | type = map(object({ 50 | name = string 51 | instance_name = string 52 | size_in_gbs = number 53 | })) 54 | } 55 | 56 | variable "ssh_public_key" { 57 | type = string 58 | } 59 | 60 | variable "ssh_private_key" { 61 | type = string 62 | } 63 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/georeplicated_glusterfs_volume/replicated/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips_region1" { 5 | value = module.glusterfs_region_1.private_ips 6 | } 7 | 8 | output "private_ips_region2" { 9 | value = module.glusterfs_region_2.private_ips 10 | } 11 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/georeplicated_glusterfs_volume/replicated/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "gluster_params" { 9 | type = map(string) 10 | } 11 | 12 | variable "images" { 13 | type = map(string) 14 | } 15 | 16 | variable "instance_params" { 17 | type = map(object({ 18 | ad = number 19 | comp_id = string 20 | shape = string 21 | hostname = string 22 | subnet_id = string 23 | hostname = string 24 | preserve_boot_volume = string 25 | })) 26 | } 27 | 28 | variable "bv_params" { 29 | type = map(object({ 30 | name = string 31 | instance_name = string 32 | size_in_gbs = number 33 | })) 34 | } 35 | 36 | variable "instance_params_2" { 37 | type = map(object({ 38 | ad = number 39 | comp_id = string 40 | shape = string 41 | hostname = string 42 | subnet_id = string 43 | hostname = string 44 | preserve_boot_volume = string 45 | })) 46 | } 47 | 48 | variable "bv_params_2" { 49 | type = map(object({ 50 | name = string 51 | instance_name = string 52 | size_in_gbs = number 53 | })) 54 | } 55 | 56 | variable "ssh_public_key" { 57 | type = string 58 | } 59 | 60 | variable "ssh_private_key" { 61 | type = string 62 | } 63 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/dispersed/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | provider "oci" { 5 | tenancy_ocid = var.provider_oci.tenancy 6 | user_ocid = var.provider_oci.user_id 7 | fingerprint = var.provider_oci.fingerprint 8 | private_key_path = var.provider_oci.key_file_path 9 | region = var.provider_oci.region 10 | } 11 | 12 | module "glusterfs_striped" { 13 | source = "../../../modules/glusterfs" 14 | gluster_params = var.gluster_params 15 | ssh_public_key = var.ssh_public_key 16 | ssh_private_key = var.ssh_private_key 17 | instance_params = var.instance_params 18 | bv_params = var.bv_params 19 | region = var.provider_oci.region 20 | images = var.images 21 | } 22 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/dispersed/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips_region1" { 5 | value = module.glusterfs_striped.private_ips 6 | } 7 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/dispersed/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "gluster_params" { 9 | type = map(string) 10 | } 11 | 12 | variable "images" { 13 | type = map(string) 14 | } 15 | 16 | variable "instance_params" { 17 | type = map(object({ 18 | ad = number 19 | comp_id = string 20 | shape = string 21 | hostname = string 22 | subnet_id = string 23 | hostname = string 24 | preserve_boot_volume = string 25 | })) 26 | } 27 | 28 | variable "bv_params" { 29 | type = map(object({ 30 | name = string 31 | instance_name = string 32 | size_in_gbs = number 33 | })) 34 | } 35 | 36 | variable "ssh_public_key" { 37 | type = string 38 | } 39 | 40 | variable "ssh_private_key" { 41 | type = string 42 | } 43 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | provider "oci" { 5 | tenancy_ocid = var.provider_oci.tenancy 6 | user_ocid = var.provider_oci.user_id 7 | fingerprint = var.provider_oci.fingerprint 8 | private_key_path = var.provider_oci.key_file_path 9 | region = var.provider_oci.region 10 | } 11 | 12 | module "glusterfs_region_1" { 13 | source = "../../../modules/glusterfs" 14 | gluster_params = var.gluster_params 15 | ssh_public_key = var.ssh_public_key 16 | ssh_private_key = var.ssh_private_key 17 | instance_params = var.instance_params 18 | bv_params = var.bv_params 19 | region = var.provider_oci.region 20 | images = var.images 21 | } 22 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips_region1" { 5 | value = module.glusterfs_region_1.private_ips 6 | } 7 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed/terraform.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | gluster_params = { 5 | replica_number = "" 6 | volume_type = "distributed" 7 | } 8 | 9 | ssh_public_key = "/home/opc/.ssh/id_rsa.pub" 10 | ssh_private_key = "/home/opc/.ssh/id_rsa" 11 | 12 | images = { 13 | ap-mumbai-1 = "ocid1...." 14 | ap-seoul-1 = "ocid1...." 15 | ap-sydney-1 = "ocid1...." 16 | ap-tokyo-1 = "ocid1...." 17 | ca-toronto-1 = "ocid1...." 18 | eu-frankfurt-1 = "ocid1...." 19 | eu-zurich-1 = "ocid1...." 20 | sa-saopaulo-1 = "ocid1...." 21 | uk-london-1 = "ocid1...." 22 | us-ashburn-1 = "ocid1...." 23 | us-langley-1 = "ocid1...." 24 | us-luke-1 = "ocid1...." 25 | us-phoenix-1 = "ocid1...." 26 | } 27 | 28 | instance_params = { 29 | gfstest1 = { 30 | ad = 1 31 | shape = "VM.Standard2.8" 32 | hostname = "gfstest1" 33 | preserve_boot_volume = true 34 | comp_id = "ocid1...." 35 | subnet_id = "ocid1...." 36 | } 37 | gfstest2 = { 38 | ad = 2 39 | shape = "VM.Standard2.8" 40 | hostname = "gfstest2" 41 | preserve_boot_volume = true 42 | comp_id = "ocid1...." 43 | subnet_id = "ocid1...." 44 | } 45 | } 46 | 47 | bv_params = { 48 | gfstest11 = { 49 | name = "gfstest11" 50 | size_in_gbs = 100 51 | instance_name = "gfstest1" 52 | } 53 | gfstest21 = { 54 | name = "gfstest21" 55 | size_in_gbs = 100 56 | instance_name = "gfstest2" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "gluster_params" { 9 | type = map(string) 10 | } 11 | 12 | variable "images" { 13 | type = map(string) 14 | } 15 | 16 | variable "instance_params" { 17 | type = map(object({ 18 | ad = number 19 | comp_id = string 20 | shape = string 21 | hostname = string 22 | subnet_id = string 23 | hostname = string 24 | preserve_boot_volume = string 25 | })) 26 | } 27 | 28 | variable "bv_params" { 29 | type = map(object({ 30 | name = string 31 | instance_name = string 32 | size_in_gbs = number 33 | })) 34 | } 35 | 36 | variable "ssh_public_key" { 37 | type = string 38 | } 39 | 40 | variable "ssh_private_key" { 41 | type = string 42 | } 43 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed_dispersed/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | provider "oci" { 5 | tenancy_ocid = var.provider_oci.tenancy 6 | user_ocid = var.provider_oci.user_id 7 | fingerprint = var.provider_oci.fingerprint 8 | private_key_path = var.provider_oci.key_file_path 9 | region = var.provider_oci.region 10 | } 11 | 12 | module "glusterfs_region_1" { 13 | source = "../../../modules/glusterfs" 14 | gluster_params = var.gluster_params 15 | ssh_public_key = var.ssh_public_key 16 | ssh_private_key = var.ssh_private_key 17 | instance_params = var.instance_params 18 | bv_params = var.bv_params 19 | region = var.provider_oci.region 20 | images = var.images 21 | } 22 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed_dispersed/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips_region1" { 5 | value = module.glusterfs_region_1.private_ips 6 | } 7 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed_dispersed/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "gluster_params" { 9 | type = map(string) 10 | } 11 | 12 | variable "images" { 13 | type = map(string) 14 | } 15 | 16 | variable "instance_params" { 17 | type = map(object({ 18 | ad = number 19 | comp_id = string 20 | shape = string 21 | hostname = string 22 | subnet_id = string 23 | hostname = string 24 | preserve_boot_volume = string 25 | })) 26 | } 27 | 28 | variable "bv_params" { 29 | type = map(object({ 30 | name = string 31 | instance_name = string 32 | size_in_gbs = number 33 | })) 34 | } 35 | 36 | variable "ssh_public_key" { 37 | type = string 38 | } 39 | 40 | variable "ssh_private_key" { 41 | type = string 42 | } 43 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed_replicated/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | provider "oci" { 5 | tenancy_ocid = var.provider_oci.tenancy 6 | user_ocid = var.provider_oci.user_id 7 | fingerprint = var.provider_oci.fingerprint 8 | private_key_path = var.provider_oci.key_file_path 9 | region = var.provider_oci.region 10 | } 11 | 12 | module "glusterfs_region_1" { 13 | source = "../../../modules/glusterfs" 14 | gluster_params = var.gluster_params 15 | ssh_public_key = var.ssh_public_key 16 | ssh_private_key = var.ssh_private_key 17 | instance_params = var.instance_params 18 | bv_params = var.bv_params 19 | region = var.provider_oci.region 20 | images = var.images 21 | } 22 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed_replicated/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips_region1" { 5 | value = module.glusterfs_region_1.private_ips 6 | } 7 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed_replicated/terraform.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | gluster_params = { 5 | replica_number = 2 6 | volume_type = "distributed_replicated" 7 | } 8 | 9 | ssh_public_key = "/home/opc/.ssh/id_rsa.pub" 10 | ssh_private_key = "/home/opc/.ssh/id_rsa" 11 | 12 | images = { 13 | ap-mumbai-1 = "ocid1...." 14 | ap-seoul-1 = "ocid1...." 15 | ap-sydney-1 = "ocid1...." 16 | ap-tokyo-1 = "ocid1...." 17 | ca-toronto-1 = "ocid1...." 18 | eu-frankfurt-1 = "ocid1...." 19 | eu-zurich-1 = "ocid1...." 20 | sa-saopaulo-1 = "ocid1...." 21 | uk-london-1 = "ocid1...." 22 | us-ashburn-1 = "ocid1...." 23 | us-langley-1 = "ocid1...." 24 | us-luke-1 = "ocid1...." 25 | us-phoenix-1 = "ocid1...." 26 | } 27 | 28 | instance_params = { 29 | gfstest1 = { 30 | ad = 1 31 | shape = "VM.Standard2.8" 32 | hostname = "gfstest1" 33 | preserve_boot_volume = true 34 | comp_id = "ocid1...." 35 | subnet_id = "ocid1...." 36 | } 37 | gfstest2 = { 38 | ad = 2 39 | shape = "VM.Standard2.8" 40 | hostname = "gfstest2" 41 | preserve_boot_volume = true 42 | comp_id = "ocid1...." 43 | subnet_id = "ocid1...." 44 | } 45 | } 46 | 47 | bv_params = { 48 | gfstest11 = { 49 | name = "gfstest11" 50 | size_in_gbs = 100 51 | instance_name = "gfstest1" 52 | } 53 | gfstest21 = { 54 | name = "gfstest21" 55 | size_in_gbs = 100 56 | instance_name = "gfstest2" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/distributed_replicated/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "gluster_params" { 9 | type = map(string) 10 | } 11 | 12 | variable "images" { 13 | type = map(string) 14 | } 15 | 16 | variable "instance_params" { 17 | type = map(object({ 18 | ad = number 19 | comp_id = string 20 | shape = string 21 | hostname = string 22 | subnet_id = string 23 | hostname = string 24 | preserve_boot_volume = string 25 | })) 26 | } 27 | 28 | variable "bv_params" { 29 | type = map(object({ 30 | name = string 31 | instance_name = string 32 | size_in_gbs = number 33 | })) 34 | } 35 | 36 | variable "ssh_public_key" { 37 | type = string 38 | } 39 | 40 | variable "ssh_private_key" { 41 | type = string 42 | } 43 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/replicated/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | provider "oci" { 5 | tenancy_ocid = var.provider_oci.tenancy 6 | user_ocid = var.provider_oci.user_id 7 | fingerprint = var.provider_oci.fingerprint 8 | private_key_path = var.provider_oci.key_file_path 9 | region = var.provider_oci.region 10 | } 11 | 12 | module "glusterfs_region_1" { 13 | source = "../../../modules/glusterfs" 14 | gluster_params = var.gluster_params 15 | ssh_public_key = var.ssh_public_key 16 | ssh_private_key = var.ssh_private_key 17 | instance_params = var.instance_params 18 | bv_params = var.bv_params 19 | region = var.provider_oci.region 20 | images = var.images 21 | } 22 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/replicated/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips_region1" { 5 | value = module.glusterfs_region_1.private_ips 6 | } 7 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/replicated/terraform.tfvars: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | gluster_params = { 5 | replica_number = 2 6 | volume_type = "replicated" 7 | } 8 | 9 | ssh_public_key = "/home/opc/.ssh/id_rsa.pub" 10 | ssh_private_key = "/home/opc/.ssh/id_rsa" 11 | 12 | images = { 13 | ap-mumbai-1 = "ocid1...." 14 | ap-seoul-1 = "ocid1...." 15 | ap-sydney-1 = "ocid1...." 16 | ap-tokyo-1 = "ocid1...." 17 | ca-toronto-1 = "ocid1...." 18 | eu-frankfurt-1 = "ocid1...." 19 | eu-zurich-1 = "ocid1...." 20 | sa-saopaulo-1 = "ocid1...." 21 | uk-london-1 = "ocid1...." 22 | us-ashburn-1 = "ocid1...." 23 | us-langley-1 = "ocid1...." 24 | us-luke-1 = "ocid1...." 25 | us-phoenix-1 = "ocid1...." 26 | } 27 | 28 | instance_params = { 29 | gfstest1 = { 30 | ad = 1 31 | shape = "VM.Standard2.8" 32 | hostname = "gfstest1" 33 | preserve_boot_volume = true 34 | comp_id = "ocid1...." 35 | subnet_id = "ocid1...." 36 | } 37 | gfstest2 = { 38 | ad = 2 39 | shape = "VM.Standard2.8" 40 | hostname = "gfstest2" 41 | preserve_boot_volume = true 42 | comp_id = "ocid1...." 43 | subnet_id = "ocid1...." 44 | } 45 | } 46 | 47 | bv_params = { 48 | gfstest11 = { 49 | name = "gfstest11" 50 | size_in_gbs = 100 51 | instance_name = "gfstest1" 52 | } 53 | gfstest21 = { 54 | name = "gfstest21" 55 | size_in_gbs = 100 56 | instance_name = "gfstest2" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /examples/run/glusterfs/examples/glusterfs_volume/replicated/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_oci" { 5 | type = map(string) 6 | } 7 | 8 | variable "gluster_params" { 9 | type = map(string) 10 | } 11 | 12 | variable "images" { 13 | type = map(string) 14 | } 15 | 16 | variable "instance_params" { 17 | type = map(object({ 18 | ad = number 19 | comp_id = string 20 | shape = string 21 | hostname = string 22 | subnet_id = string 23 | hostname = string 24 | preserve_boot_volume = string 25 | })) 26 | } 27 | 28 | variable "bv_params" { 29 | type = map(object({ 30 | name = string 31 | instance_name = string 32 | size_in_gbs = number 33 | })) 34 | } 35 | 36 | variable "ssh_public_key" { 37 | type = string 38 | } 39 | 40 | variable "ssh_private_key" { 41 | type = string 42 | } 43 | -------------------------------------------------------------------------------- /examples/run/glusterfs/modules/georeplication/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | -------------------------------------------------------------------------------- /examples/run/glusterfs/modules/georeplication/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "ssh_private_key" { 5 | type = string 6 | } 7 | 8 | variable "masters_private_ip" { 9 | type = list(string) 10 | } 11 | 12 | variable "slaves_private_ip" { 13 | type = list(string) 14 | } 15 | -------------------------------------------------------------------------------- /examples/run/glusterfs/modules/glusterfs/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "private_ips" { 5 | value = [for key, value in oci_core_instance.this : value.private_ip] 6 | } 7 | -------------------------------------------------------------------------------- /examples/run/glusterfs/modules/glusterfs/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "gluster_params" { 5 | type = map(string) 6 | } 7 | 8 | variable "instance_params" { 9 | type = map(object({ 10 | ad = number 11 | comp_id = string 12 | shape = string 13 | hostname = string 14 | subnet_id = string 15 | hostname = string 16 | preserve_boot_volume = string 17 | })) 18 | } 19 | 20 | variable "bv_params" { 21 | type = map(object({ 22 | name = string 23 | instance_name = string 24 | size_in_gbs = number 25 | })) 26 | } 27 | variable "ssh_public_key" { 28 | type = string 29 | } 30 | 31 | variable "ssh_private_key" { 32 | type = string 33 | } 34 | 35 | variable "images" { 36 | type = map(string) 37 | } 38 | 39 | variable "region" { 40 | type = string 41 | } 42 | -------------------------------------------------------------------------------- /examples/run/glusterfs/userdata/ganesha.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 3 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 4 | 5 | sudo systemctl stop nfs-server 6 | sudo systemctl disable nfs-server 7 | 8 | sudo yum install nfs-ganesha-gluster -y 9 | sudo mv /etc/ganesha/ganesha.conf /etc/ganesha/ganesha.conf.org 10 | sudo firewall-cmd --add-service=nfs --permanent 11 | sudo firewall-cmd --reload 12 | 13 | sudo cat >> /etc/ganesha/ganesha.conf <> /etc/yum.conf 11 | HERE 12 | fi 13 | 14 | sudo test -f /etc/yum.repos.d/Gluster.repo 15 | if [[ $? -ne 0 ]]; then 16 | sudo cat >> /etc/yum.repos.d/Gluster.repo <&/dev/null 25 | sleep 15 26 | 27 | sudo yum install glusterfs-server –y 28 | sleep 10 29 | 30 | sudo yum install glusterfs-geo-replication -y 31 | sleep 10 32 | 33 | sudo yum install samba -y 34 | sleep 10 35 | 36 | sudo systemctl status glusterd.service | grep running 37 | if [[ $? -ne 0 ]]; then 38 | sudo systemctl enable glusterd.service 39 | sudo systemctl start glusterd.service 40 | fi 41 | 42 | sudo firewall-cmd --zone=public --list-all | grep 24007-24009/tcp 43 | if [[ $? -ne 0 ]]; then 44 | sudo su < { "connection_strings" : ad.connection_strings.0.all_connection_strings, "password" : random_string.autonomous_database_wallet_password[idx].result } 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /modules/adw/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "adw_params" { 4 | type = map(object({ 5 | compartment_name = string 6 | cpu_core_count = number 7 | size_in_tbs = number 8 | db_name = string 9 | db_workload = string 10 | enable_auto_scaling = bool 11 | is_free_tier = bool 12 | create_local_wallet = bool 13 | })) 14 | } 15 | 16 | variable "compartment_ids" { 17 | type = map(string) 18 | } 19 | -------------------------------------------------------------------------------- /modules/alarms/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | resource "oci_monitoring_alarm" "this" { 5 | for_each = var.alarm_params 6 | compartment_id = var.compartments[each.value.comp_name] 7 | destinations = [for i in each.value.destinations : var.topics[i]] 8 | display_name = each.value.alarm_display_name 9 | is_enabled = each.value.alarm_is_enabled 10 | metric_compartment_id = var.compartments[each.value.alarm_metric_comp_name] 11 | namespace = each.value.alarm_namespace 12 | query = each.value.alarm_query 13 | severity = each.value.alarm_severity 14 | body = each.value.alarm_body 15 | metric_compartment_id_in_subtree = each.value.alarm_metric_compartment_id_in_subtree 16 | pending_duration = each.value.alarm_pending_duration 17 | repeat_notification_duration = each.value.alarm_repeat_notification_duration 18 | resolution = each.value.alarm_resolution 19 | resource_group = each.value.alarm_resource_group 20 | 21 | dynamic "suppression" { 22 | iterator = suppression 23 | for_each = each.value.suppression_params 24 | content { 25 | time_suppress_from = suppression.value.alarm_suppression_time_suppress_from 26 | time_suppress_until = suppression.value.alarm_suppression_time_suppress_until 27 | description = suppression.value.alarm_suppression_description 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /modules/alarms/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | -------------------------------------------------------------------------------- /modules/alarms/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "compartments" { 5 | type = map(string) 6 | } 7 | 8 | variable "alarm_params" { 9 | type = map(object({ 10 | comp_name = string 11 | destinations = list(string) 12 | alarm_display_name = string 13 | alarm_is_enabled = bool 14 | alarm_metric_comp_name = string 15 | alarm_namespace = string 16 | alarm_query = string 17 | alarm_severity = string 18 | alarm_body = string 19 | alarm_metric_compartment_id_in_subtree = bool 20 | alarm_pending_duration = string 21 | alarm_repeat_notification_duration = string 22 | alarm_resolution = string 23 | alarm_resource_group = string 24 | suppression_params = list(object({ 25 | alarm_suppression_description = string 26 | alarm_suppression_time_suppress_from = string 27 | alarm_suppression_time_suppress_until = string 28 | })) 29 | })) 30 | } 31 | 32 | variable "topics" { 33 | type = map(string) 34 | } 35 | -------------------------------------------------------------------------------- /modules/analytics/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | resource "oci_analytics_analytics_instance" "this" { 5 | for_each = var.oac_params 6 | capacity { 7 | capacity_type = each.value.capacity_type 8 | capacity_value = each.value.capacity_value 9 | } 10 | defined_tags = {} 11 | compartment_id = var.compartment_ids[each.value.compartment_name] 12 | feature_set = each.value.feature_set 13 | idcs_access_token = file(each.value.idcs_token_path) 14 | license_type = each.value.license_type 15 | name = each.value.display_name 16 | description = each.value.description 17 | freeform_tags = {} 18 | network_endpoint_details { 19 | #Required 20 | network_endpoint_type = each.value.network_type 21 | 22 | #Optional 23 | subnet_id = var.subnet_ids[each.value.subnet_name] 24 | vcn_id = var.vcn_ids[each.value.vcn_name] 25 | } 26 | state="ACTIVE" 27 | } -------------------------------------------------------------------------------- /modules/analytics/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -------------------------------------------------------------------------------- /modules/analytics/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "compartment_ids" { 5 | type = map(string) 6 | } 7 | 8 | variable "subnet_ids" { 9 | type = map(string) 10 | } 11 | 12 | variable "vcn_ids" { 13 | type = map(string) 14 | } 15 | 16 | variable "oac_params" { 17 | description = "Placeholder for the parameters of the OAC instances" 18 | type = map(object({ 19 | capacity_type = string 20 | capacity_value = number 21 | compartment_name = string 22 | feature_set = string 23 | idcs_token_path = string 24 | license_type = string 25 | display_name = string 26 | description = string 27 | network_type = string 28 | subnet_name = string 29 | vcn_name = string 30 | })) 31 | } -------------------------------------------------------------------------------- /modules/api-gateway/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "gateways" { 5 | value = { 6 | for gw in oci_apigateway_gateway.this : 7 | gw.display_name => { "compartment_id" : gw.compartment_id, "ocid" : gw.id, "subnet" : gw.subnet_id } 8 | } 9 | } 10 | 11 | output "deployments" { 12 | value = { 13 | for dpl in oci_apigateway_deployment.this : 14 | dpl.display_name => { "ocid" : dpl.id, "Invoke endpoint" : dpl.endpoint } 15 | } 16 | } 17 | 18 | #output that concatenates the endpoint with the path 19 | output "routes" { 20 | value = flatten([ 21 | for d in oci_apigateway_deployment.this : 22 | flatten(formatlist("%s%s", d.endpoint, flatten(d.specification[*].routes[*].path))) 23 | ]) 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /modules/api-gateway/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "compartment_ids" { 4 | type = map(string) 5 | } 6 | 7 | variable "subnet_ids" { 8 | type = map(string) 9 | } 10 | 11 | variable "function_ids" { 12 | type = map(string) 13 | } 14 | 15 | variable "apigw_params" { 16 | type = map(object({ 17 | compartment_name = string 18 | subnet_name = string 19 | display_name = string 20 | endpoint_type = string 21 | })) 22 | } 23 | 24 | variable "gwdeploy_params" { 25 | description = "API Gateway Deployment Params" 26 | type = map(object({ 27 | compartment_name = string 28 | gateway_name = string 29 | display_name = string 30 | path_prefix = string 31 | access_log = bool 32 | exec_log_lvl = string 33 | function_routes = list(object({ 34 | type = string 35 | path = string 36 | methods = list(string) 37 | function_name = string 38 | })) 39 | http_routes = list(object({ 40 | type = string 41 | path = string 42 | methods = list(string) 43 | url = string 44 | connect_timeout = number 45 | ssl_verify = bool 46 | read_timeout = number 47 | send_timeout = number 48 | })) 49 | stock_routes = list(object({ 50 | type = string 51 | path = string 52 | methods = list(string) 53 | status = number 54 | body = string 55 | headers = list(object({ 56 | name = string 57 | value = string 58 | })) 59 | })) 60 | })) 61 | } 62 | -------------------------------------------------------------------------------- /modules/asg/outputs.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/modules/asg/outputs.tf -------------------------------------------------------------------------------- /modules/bastion/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | resource "oci_bastion_bastion" "this" { 6 | for_each = var.bastion_params 7 | name = each.value.bastion_name 8 | bastion_type = each.value.bastion_type 9 | compartment_id = var.compartments[each.value.comp_name] 10 | target_subnet_id = var.subnets[each.value.subnet_name] 11 | client_cidr_block_allow_list = each.value.cidr_block_allow_list 12 | max_session_ttl_in_seconds = each.value.max_session_ttl_in_seconds 13 | } 14 | -------------------------------------------------------------------------------- /modules/bastion/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | 6 | output "bastions" { 7 | value = { 8 | for bst in oci_bastion_bastion.this : 9 | bst.name => bst.id 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/bastion/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "bastion_params" { 5 | type = map(object({ 6 | bastion_name = string 7 | bastion_type = string 8 | comp_name = string 9 | subnet_name = string 10 | cidr_block_allow_list = list(string) 11 | max_session_ttl_in_seconds = number 12 | })) 13 | } 14 | 15 | variable "compartments" { 16 | type = map(string) 17 | } 18 | 19 | variable "subnets" { 20 | type = map(string) 21 | } 22 | -------------------------------------------------------------------------------- /modules/blockchain/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "blockchain" { 5 | value = { for platform in oci_blockchain_blockchain_platform.this : 6 | platform.display_name => platform.service_endpoint 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/blockchain/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "compartments" { 5 | type = map(string) 6 | } 7 | 8 | variable "blockchain_params" { 9 | type = map(object({ 10 | compartment_name = string 11 | compute_shape = string 12 | idcs_access_token = string 13 | name = string 14 | platform_role = string 15 | })) 16 | } 17 | 18 | variable "osn_params" { 19 | type = map(object({ 20 | ad = string 21 | platform_name = string 22 | ocpu = number 23 | })) 24 | } 25 | 26 | variable "peer_params" { 27 | type = map(object({ 28 | ad = string 29 | platform_name = string 30 | ocpu = number 31 | role = string 32 | alias = string 33 | })) 34 | } 35 | 36 | variable "oci_provider" { 37 | type = map(string) 38 | } 39 | -------------------------------------------------------------------------------- /modules/cloud_guard/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "cloud_guard_config" { 5 | value = {for config in oci_cloud_guard_cloud_guard_configuration.this : 6 | config.reporting_region => config.status} 7 | } 8 | 9 | 10 | 11 | output "cloud_guard_target" { 12 | value = {for target in oci_cloud_guard_target.this : 13 | target.display_name => target.id} 14 | } 15 | 16 | -------------------------------------------------------------------------------- /modules/cloud_guard/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "cloud_guard_config" { 5 | type = map(object({ 6 | comp_name = string 7 | status = string 8 | self_manage_resources = bool 9 | region_name = string 10 | })) 11 | } 12 | 13 | 14 | variable "cloud_guard_target" { 15 | type = map(object({ 16 | comp_name = string 17 | display_name = string 18 | target_name = string 19 | target_type = string 20 | })) 21 | } 22 | 23 | variable "compartments" { 24 | type = map(string) 25 | } 26 | 27 | 28 | variable "cloud_guard_target_resource" { 29 | type = map(string) 30 | } 31 | 32 | 33 | variable "auth_provider" { 34 | type = map(string) 35 | } 36 | -------------------------------------------------------------------------------- /modules/containers/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | locals { 4 | 5 | cluster_ids = { 6 | for oke in oci_containerengine_cluster.k8s_cluster : 7 | oke.name => oke.id 8 | } 9 | 10 | kubernetes_versions = { 11 | for oke in oci_containerengine_cluster.k8s_cluster : 12 | oke.name => oke.kubernetes_version 13 | } 14 | 15 | pods_cidrs = { 16 | for oke in oci_containerengine_cluster.k8s_cluster : 17 | oke.name => oke.options[0].kubernetes_network_config[0].pods_cidr 18 | } 19 | 20 | # map {oke.name => number_of_nodes} where we have number_of_nodes = sum(nodepool_i.size) 21 | number_of_nodes_list = { 22 | for oke in oci_containerengine_cluster.k8s_cluster : 23 | oke.name => [for nodepool in oci_containerengine_node_pool.nodepool : nodepool.node_config_details[0].size if nodepool.cluster_id == oke.id] 24 | } 25 | number_of_nodes = { 26 | for okename, list_sizes in local.number_of_nodes_list : 27 | okename => length(flatten([for e in list_sizes : range(e)])) 28 | } 29 | } 30 | 31 | output "cluster_ids" { 32 | value = local.cluster_ids 33 | } 34 | 35 | output "kubernetes_versions" { 36 | value = local.kubernetes_versions 37 | } 38 | 39 | output "pods_cidrs" { 40 | value = local.pods_cidrs 41 | } 42 | 43 | output "number_of_nodes" { 44 | value = local.number_of_nodes 45 | } 46 | -------------------------------------------------------------------------------- /modules/containers/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "compartment_ids" { 4 | type = map(string) 5 | } 6 | 7 | variable "cluster_params" { 8 | type = map(object({ 9 | compartment_name = string 10 | kubernetes_version = string 11 | # encryption 12 | use_encryption = bool 13 | kms_key_id = string 14 | cluster_name = string 15 | vcn_name = string 16 | is_kubernetes_dashboard_enabled = bool 17 | is_tiller_enabled = bool 18 | pods_cidr = string 19 | services_cidr = string 20 | service_lb_subnet_names = list(string) 21 | })) 22 | } 23 | 24 | variable "nodepools_params" { 25 | type = map(object({ 26 | compartment_name = string 27 | cluster_name = string 28 | pool_name = string 29 | subnet_name = string 30 | size = number 31 | node_shape = string 32 | ssh_public_key = string 33 | placement_configs = list(object({ 34 | ad = number 35 | subnet = string 36 | })) 37 | })) 38 | } 39 | 40 | 41 | variable "linux_images" { 42 | type = map(string) 43 | } 44 | 45 | variable "region" { 46 | type = string 47 | } 48 | 49 | variable "vcn_ids" { 50 | type = map(string) 51 | } 52 | 53 | variable "subnet_ids" { 54 | type = map(string) 55 | } 56 | -------------------------------------------------------------------------------- /modules/content-experience/main.tf: -------------------------------------------------------------------------------- 1 | provider "oci" { 2 | tenancy_ocid = var.oci_provider.tenancy 3 | user_ocid = var.oci_provider.user_id 4 | fingerprint = var.oci_provider.fingerprint 5 | private_key_path = var.oci_provider.key_file_path 6 | region = data.oci_identity_regions.existing.regions[0].name 7 | alias = "home" 8 | } 9 | 10 | data "oci_identity_tenancy" "existing" { 11 | tenancy_id = var.oci_provider.tenancy 12 | } 13 | 14 | data "oci_identity_regions" "existing" { 15 | filter { 16 | name = "key" 17 | values = [data.oci_identity_tenancy.existing.home_region_key] 18 | } 19 | } 20 | 21 | data "oci_objectstorage_namespace" "this" { 22 | compartment_id = var.oci_provider["tenancy"] 23 | } 24 | 25 | resource "oci_oce_oce_instance" "this" { 26 | provider = oci.home 27 | for_each = var.oce_params 28 | admin_email = each.value.admin_email 29 | compartment_id = var.compartments[each.value.compartment_name] 30 | idcs_access_token = each.value.idcs_access_token 31 | name = each.value.name 32 | object_storage_namespace = data.oci_objectstorage_namespace.this.namespace 33 | tenancy_id = var.oci_provider.tenancy 34 | tenancy_name = data.oci_identity_tenancy.existing.name 35 | } 36 | -------------------------------------------------------------------------------- /modules/content-experience/outputs.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/modules/content-experience/outputs.tf -------------------------------------------------------------------------------- /modules/content-experience/variables.tf: -------------------------------------------------------------------------------- 1 | variable "oci_provider" { 2 | type = map(string) 3 | } 4 | 5 | variable "compartments" { 6 | type = map(string) 7 | } 8 | 9 | variable "oce_params" { 10 | type = map(object({ 11 | admin_email = string 12 | compartment_name = string 13 | idcs_access_token = string 14 | name = string 15 | })) 16 | } 17 | -------------------------------------------------------------------------------- /modules/dbaas/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | data "oci_identity_availability_domains" "ads" { 4 | compartment_id = var.compartment_ids[var.database_params[keys(var.database_params)[0]].compartment_name] 5 | } 6 | 7 | resource "oci_database_db_system" "this" { 8 | for_each = var.database_params 9 | availability_domain = data.oci_identity_availability_domains.ads.availability_domains[each.value.ad -1].name 10 | compartment_id = var.compartment_ids[each.value.compartment_name] 11 | cpu_core_count = each.value.cpu_core_count 12 | database_edition = each.value.db_edition 13 | 14 | lifecycle { 15 | ignore_changes = [cpu_core_count, ssh_public_keys] 16 | } 17 | 18 | db_home { 19 | database { 20 | admin_password = each.value.db_admin_password 21 | db_name = each.value.db_name 22 | db_workload = each.value.db_workload 23 | pdb_name = each.value.pdb_name 24 | 25 | db_backup_config { 26 | auto_backup_enabled = each.value.enable_auto_backup 27 | } 28 | } 29 | 30 | db_version = each.value.db_version 31 | display_name = each.value.display_name 32 | } 33 | 34 | disk_redundancy = each.value.disk_redundancy 35 | shape = each.value.shape 36 | subnet_id = var.subnet_ids[each.value.subnet_name] 37 | ssh_public_keys = [file(each.value.ssh_public_key)] 38 | display_name = each.value.display_name 39 | hostname = each.value.hostname 40 | data_storage_size_in_gb = each.value.data_storage_size_in_gb 41 | license_model = each.value.license_model 42 | node_count = each.value.node_count 43 | } 44 | -------------------------------------------------------------------------------- /modules/dbaas/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "database" { 4 | value = { 5 | for db in oci_database_db_system.this: 6 | db.display_name => db.id 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/dbaas/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "database_params" { 4 | description = "The paramaters for the database" 5 | type = map(object({ 6 | compartment_name = string 7 | ad = number 8 | cpu_core_count = number 9 | db_edition = string 10 | db_admin_password = string 11 | db_name = string 12 | db_workload = string 13 | pdb_name = string 14 | enable_auto_backup = bool 15 | db_version = string 16 | display_name = string 17 | disk_redundancy = string 18 | shape = string 19 | subnet_name = string 20 | ssh_public_key = string 21 | hostname = string 22 | data_storage_size_in_gb = number 23 | license_model = string 24 | node_count = number 25 | })) 26 | } 27 | 28 | variable "compartment_ids" { 29 | type = map(string) 30 | } 31 | 32 | variable "subnet_ids" { 33 | type = map(string) 34 | } 35 | -------------------------------------------------------------------------------- /modules/dns/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | resource "oci_dns_zone" "this" { 5 | for_each = var.zone_params 6 | compartment_id = var.compartments[each.value.compartment_name] 7 | name = each.value.zone_name 8 | zone_type = each.value.zone_type 9 | dynamic "external_masters" { 10 | iterator = ip 11 | for_each = each.value.external_masters 12 | content { 13 | address = ip.value.ip 14 | } 15 | } 16 | } 17 | 18 | data "oci_load_balancer_load_balancers" "existing" { 19 | for_each = var.load_balancer_params 20 | compartment_id = each.value.comp_id 21 | filter { 22 | name = "id" 23 | values = [each.value.lb_id] 24 | } 25 | } 26 | 27 | resource "oci_dns_rrset" "this" { 28 | for_each = var.dns_records_params 29 | domain = each.value.domain 30 | rtype = each.value.rtype 31 | zone_name_or_id = oci_dns_zone.this[each.value.zone_name].id 32 | 33 | dynamic "items" { 34 | iterator = dns_items 35 | for_each = each.value.dns_items 36 | content { 37 | domain = dns_items.value.domain 38 | rdata = dns_items.value.use_instance ? var.instances[dns_items.value.instance_name] : dns_items.value.use_lb ? data.oci_load_balancer_load_balancers.existing[dns_items.value.lb_name].load_balancers[0].ip_address_details[0].ip_address : dns_items.value.rdata 39 | rtype = dns_items.value.rtype 40 | ttl = dns_items.value.ttl 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /modules/dns/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "zones" { 5 | value = [for zone in oci_dns_zone.this: 6 | {"id": zone.id, "name": zone.name} 7 | ] 8 | } 9 | 10 | output "records" { 11 | value = [for record in oci_dns_rrset.this: 12 | {"domain": record.domain, "data": [for item in record.items: item.rdata]} 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /modules/dns/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "compartments" { 5 | type = map(string) 6 | } 7 | 8 | variable "instances" { 9 | type = map(any) 10 | } 11 | 12 | variable "load_balancer_params" { 13 | type = map(object({ 14 | lb_id = string 15 | comp_id = string 16 | })) 17 | } 18 | variable "zone_params" { 19 | description = "The parameters of the zones: zone_name, zone_type, compartment_id" 20 | type = map(object({ 21 | compartment_name = string 22 | zone_name = string 23 | zone_type = string 24 | external_masters = list(object({ 25 | ip = string 26 | })) 27 | })) 28 | } 29 | 30 | variable dns_records_params { 31 | description = "The DNS records for the domains(zones)" 32 | type = map(object({ 33 | zone_name = string 34 | domain = string 35 | rtype = string 36 | 37 | dns_items = list(object({ 38 | domain = string 39 | rdata = string 40 | rtype = string 41 | ttl = number 42 | use_lb = bool 43 | use_instance = bool 44 | lb_name = string 45 | instance_name = string 46 | })) 47 | })) 48 | } 49 | -------------------------------------------------------------------------------- /modules/dynamic_group/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | provider "oci" { 5 | tenancy_ocid = var.auth_provider.tenancy 6 | user_ocid = var.auth_provider.user_id 7 | fingerprint = var.auth_provider.fingerprint 8 | private_key_path = var.auth_provider.key_file_path 9 | region = data.oci_identity_regions.existing.regions[0].name 10 | alias = "home" 11 | } 12 | 13 | data "oci_identity_tenancy" "existing" { 14 | tenancy_id = var.auth_provider.tenancy 15 | } 16 | 17 | data "oci_identity_regions" "existing" { 18 | filter { 19 | name = "key" 20 | values = [data.oci_identity_tenancy.existing.home_region_key] 21 | } 22 | } 23 | 24 | resource "oci_identity_dynamic_group" "this" { 25 | for_each = var.dynamic_groups 26 | provider = oci.home 27 | name = each.value.name 28 | compartment_id = var.auth_provider.tenancy 29 | description = each.value.description 30 | matching_rule = "ALL {resource.type = '${each.value.resource_type}', resource.compartment.id = '${var.matching_compartments[each.value.matching_compartment_name].id}'}" 31 | 32 | #Optional 33 | # defined_tags = each.defined_tags 34 | # freeform_tags = each.freeform_tags 35 | } 36 | 37 | resource "oci_identity_policy" "this" { 38 | provider = oci.home 39 | depends_on = [oci_identity_dynamic_group.this] 40 | for_each = var.dg_policy_params 41 | name = each.value.name 42 | description = each.value.description 43 | compartment_id = var.matching_compartments[each.value.compartment_name].id 44 | statements = each.value.statements 45 | } 46 | -------------------------------------------------------------------------------- /modules/dynamic_group/outputs.tf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 Oracle and/or its affiliates. 2 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "dynamic_groups" { 5 | description = "The dynamic-groups indexed by group name." 6 | value = { for dg in oci_identity_dynamic_group.this : dg.name => dg.id } 7 | } -------------------------------------------------------------------------------- /modules/dynamic_group/variables.tf: -------------------------------------------------------------------------------- 1 | variable "dynamic_groups" { 2 | type = map(object({ 3 | name = string 4 | description = string 5 | resource_type = string 6 | matching_compartment_name = string 7 | })) 8 | } 9 | 10 | variable "auth_provider" { 11 | type = map(string) 12 | } 13 | 14 | variable "matching_compartments" { 15 | type = map(any) 16 | } 17 | 18 | 19 | variable "dg_policy_params" { 20 | type = map(object({ 21 | name = string 22 | compartment_name = string 23 | description = string 24 | statements = list(string) 25 | })) 26 | } 27 | -------------------------------------------------------------------------------- /modules/events/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | resource "oci_events_rule" "this" { 5 | for_each = var.events_params 6 | actions { 7 | dynamic "actions" { 8 | iterator = act 9 | for_each = each.value.action_params 10 | content { 11 | action_type = act.value.action_type 12 | description = act.value.actions_description 13 | is_enabled = act.value.is_enabled 14 | function_id = length(act.value.function_name) > 0 ? var.function_id[act.value.function_name] : "" 15 | topic_id = length(act.value.topic_name) > 0 ? var.topic_id[act.value.topic_name] : "" 16 | stream_id = length(act.value.stream_name) > 0 ? var.stream_id[act.value.stream_name] : "" 17 | 18 | } 19 | } 20 | } 21 | compartment_id = var.compartment_ids[each.value.compartment_name] 22 | condition = jsonencode(each.value.condition) 23 | display_name = each.value.rule_display_name 24 | is_enabled = each.value.rule_is_enabled 25 | freeform_tags = each.value.freeform_tags 26 | } 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /modules/events/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "events" { 5 | value = {for event in oci_events_rule.this: 6 | event.display_name => event.id} 7 | } -------------------------------------------------------------------------------- /modules/events/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "function_id" { 5 | type = map(string) 6 | } 7 | 8 | variable "topic_id" { 9 | type = map(string) 10 | } 11 | 12 | variable "stream_id" { 13 | type = map(string) 14 | } 15 | 16 | variable "compartment_ids" { 17 | type = map(any) 18 | } 19 | 20 | variable "events_params" { 21 | type = map(object({ 22 | rule_display_name = string 23 | compartment_name = string 24 | rule_is_enabled = bool 25 | condition = any 26 | freeform_tags = map(any) 27 | action_params = list(object({ 28 | action_type = string 29 | is_enabled = bool 30 | actions_description = string 31 | function_name = string 32 | topic_name = string 33 | stream_name = string 34 | 35 | })) 36 | })) 37 | } 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /modules/fastconnect/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -------------------------------------------------------------------------------- /modules/fss-instance-client-dest/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | locals { 5 | linux_instances = { 6 | for instance in oci_core_instance.this: 7 | instance.display_name => { "id" : instance.id, "ip": instance.public_ip != "" ? instance.public_ip : instance.private_ip } 8 | } 9 | 10 | linux_ids = { 11 | for instance in oci_core_instance.this: 12 | instance.display_name => instance.id 13 | } 14 | 15 | linux_private_ips = { 16 | for instance in oci_core_instance.this: 17 | instance.display_name => instance.private_ip 18 | } 19 | 20 | all_instances = merge(local.linux_ids) 21 | all_private_ips = merge(local.linux_private_ips) 22 | } 23 | 24 | output "linux_instances" { 25 | value = local.linux_instances 26 | } 27 | 28 | output "all_instances" { 29 | value = local.all_instances 30 | } 31 | 32 | output "all_private_ips" { 33 | value = local.all_private_ips 34 | } 35 | 36 | output "instance_public_ip" { 37 | value = { for instance in oci_core_instance.this: 38 | instance.display_name => instance.public_ip } 39 | } 40 | -------------------------------------------------------------------------------- /modules/fss-instance-client-dest/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "compartment_ids" { 4 | type = map(string) 5 | } 6 | 7 | variable "subnet_ids" { 8 | type = map(string) 9 | } 10 | 11 | variable "region" { 12 | type = string 13 | } 14 | 15 | variable "mount_targets_src" { 16 | type = map(string) 17 | } 18 | 19 | variable "src_instance_pip" { 20 | type = map(string) 21 | } 22 | 23 | variable "linux_images" { 24 | type = map(map(string)) 25 | } 26 | 27 | variable "nsgs" { 28 | type = map(string) 29 | } 30 | 31 | variable "instance_params" { 32 | description = "Placeholder for the parameters of the instances" 33 | type = map(object({ 34 | ad = number 35 | source_instance_name = string 36 | shape = string 37 | hostname = string 38 | boot_volume_size = number 39 | assign_public_ip = bool 40 | preserve_boot_volume = bool 41 | compartment_name = string 42 | subnet_name = string 43 | ssh_public_key = string 44 | ssh_private_key = string 45 | device_disk_mappings = string 46 | freeform_tags = map(string) 47 | kms_key_name = string 48 | block_vol_att_type = string 49 | encrypt_in_transit = bool 50 | fd = number 51 | image_version = string 52 | nsgs = list(string) 53 | dst_second_mount_name = string 54 | src_mount_path = string 55 | dst_mount_path_second = string 56 | dst_export_path_second = string 57 | data_sync_frequency = string 58 | })) 59 | } 60 | 61 | variable "kms_key_ids" { 62 | type = map(string) 63 | } 64 | 65 | -------------------------------------------------------------------------------- /modules/fss-instance-client-local/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | locals { 5 | linux_instances = { 6 | for instance in oci_core_instance.this: 7 | instance.display_name => { "id" : instance.id, "ip": instance.public_ip != "" ? instance.public_ip : instance.private_ip } 8 | } 9 | 10 | linux_ids = { 11 | for instance in oci_core_instance.this: 12 | instance.display_name => instance.id 13 | } 14 | 15 | linux_private_ips = { 16 | for instance in oci_core_instance.this: 17 | instance.display_name => instance.private_ip 18 | } 19 | 20 | all_instances = merge(local.linux_ids) 21 | all_private_ips = merge(local.linux_private_ips) 22 | } 23 | 24 | output "linux_instances" { 25 | value = local.linux_instances 26 | } 27 | 28 | output "all_instances" { 29 | value = local.all_instances 30 | } 31 | 32 | output "all_private_ips" { 33 | value = local.all_private_ips 34 | } 35 | 36 | output "instance_public_ip" { 37 | value = { for instance in oci_core_instance.this: 38 | instance.display_name => instance.public_ip } 39 | } 40 | -------------------------------------------------------------------------------- /modules/fss-instance-client-local/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "compartment_ids" { 4 | type = map(string) 5 | } 6 | 7 | variable "subnet_ids" { 8 | type = map(string) 9 | } 10 | 11 | variable "region" { 12 | type = string 13 | } 14 | 15 | variable "mount_targets_src" { 16 | type = map(string) 17 | } 18 | 19 | variable "linux_images" { 20 | type = map(map(string)) 21 | } 22 | 23 | variable "nsgs" { 24 | type = map(string) 25 | } 26 | 27 | variable "instance_params" { 28 | description = "Placeholder for the parameters of the instances" 29 | type = map(object({ 30 | ad = number 31 | source_instance_name = string 32 | shape = string 33 | hostname = string 34 | boot_volume_size = number 35 | assign_public_ip = bool 36 | preserve_boot_volume = bool 37 | compartment_name = string 38 | subnet_name = string 39 | ssh_public_key = string 40 | device_disk_mappings = string 41 | freeform_tags = map(string) 42 | kms_key_name = string 43 | block_vol_att_type = string 44 | encrypt_in_transit = bool 45 | fd = number 46 | image_version = string 47 | nsgs = list(string) 48 | src_mount_name = string 49 | dst_mount_name = string 50 | src_mount_path = string 51 | dst_mount_path = string 52 | src_export_path = string 53 | dst_export_path = string 54 | data_sync_frequency = string 55 | })) 56 | } 57 | 58 | variable "kms_key_ids" { 59 | type = map(string) 60 | } 61 | 62 | -------------------------------------------------------------------------------- /modules/fss/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "filesystems" { 4 | value = {for fs in oci_file_storage_file_system.this: 5 | fs.display_name => fs.id 6 | } 7 | } 8 | 9 | data "oci_core_private_ip" "existing" { 10 | for_each = oci_file_storage_mount_target.this 11 | private_ip_id = oci_file_storage_mount_target.this[each.key].private_ip_ids[0] 12 | } 13 | 14 | output "mount_targets" { 15 | value = {for index, mt in oci_file_storage_mount_target.this: 16 | mt.display_name => data.oci_core_private_ip.existing[index].ip_address 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /modules/fss/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "compartments" { 4 | type = map(string) 5 | } 6 | 7 | variable "subnets" { 8 | type = map(string) 9 | } 10 | 11 | variable "fss_params" { 12 | type = map(object({ 13 | ad = number 14 | compartment_name = string 15 | name = string 16 | kms_key_name = string 17 | })) 18 | } 19 | 20 | variable "mt_params" { 21 | type = map(object({ 22 | ad = number 23 | compartment_name = string 24 | name = string 25 | subnet_name = string 26 | })) 27 | } 28 | 29 | variable "export_params" { 30 | type = map(object({ 31 | export_set_name = string 32 | filesystem_name = string 33 | path = string 34 | export_options = list(object({ 35 | source = string 36 | access = string 37 | identity = string 38 | use_port = bool 39 | })) 40 | })) 41 | } 42 | 43 | variable "kms_key_ids" { 44 | type = map(string) 45 | } 46 | -------------------------------------------------------------------------------- /modules/functions/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | data "oci_identity_availability_domains" "ads" { 5 | compartment_id = var.compartment_ids[var.app_params[keys(var.app_params)[0]].compartment_name] 6 | } 7 | 8 | resource "oci_functions_application" "this" { 9 | for_each = var.app_params 10 | compartment_id = var.compartment_ids[each.value.compartment_name] 11 | subnet_ids = [for i in each.value.subnet_name : var.subnet_ids[i]] 12 | display_name = each.value.display_name 13 | config = each.value.config 14 | freeform_tags = each.value.freeform_tags 15 | } 16 | 17 | 18 | data "oci_functions_applications" "existing" { 19 | for_each = var.app_params 20 | compartment_id = var.compartment_ids[each.value.compartment_name] 21 | id = oci_functions_application.this[each.value.display_name].id 22 | } 23 | 24 | # Terraform will take 40 minutes after destroying a function due to a known service issue. 25 | # please refer: https://docs.cloud.oracle.com/iaas/Content/Functions/Tasks/functionsdeleting.htm 26 | resource "oci_functions_function" "this" { 27 | for_each = var.fn_params 28 | application_id = oci_functions_application.this[each.value.function_app].id 29 | display_name = each.value.display_name 30 | image = each.value.image 31 | memory_in_mbs = "128" 32 | config = each.value.config 33 | image_digest = each.value.image_digest 34 | timeout_in_seconds = "30" 35 | freeform_tags = each.value.freeform_tags 36 | } 37 | 38 | data "oci_functions_functions" "existing" { 39 | for_each = var.fn_params 40 | application_id = oci_functions_application.this[each.value.function_app].id 41 | } 42 | -------------------------------------------------------------------------------- /modules/functions/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | // Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. 4 | 5 | output "apps" { 6 | value = { 7 | for app in oci_functions_application.this : 8 | app.display_name => { "compartment_id" : app.compartment_id, "ocid" : app.id, "subnets" : app.subnet_ids } 9 | } 10 | } 11 | 12 | output "functions" { 13 | value = { 14 | for fn in oci_functions_function.this : 15 | fn.display_name => { "compartment_id" : fn.compartment_id, "ocid" : fn.id, "image" : fn.image, "Invoke endpoint" : fn.invoke_endpoint } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /modules/functions/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "compartment_ids" { 4 | type = map(string) 5 | } 6 | 7 | variable "subnet_ids" { 8 | type = map(string) 9 | } 10 | 11 | variable "app_params" { 12 | type = map(object({ 13 | compartment_name = string 14 | subnet_name = list(string) 15 | display_name = string 16 | config = map(string) 17 | freeform_tags = map(string) 18 | })) 19 | } 20 | 21 | variable "fn_params" { 22 | type = map(object({ 23 | function_app = string 24 | display_name = string 25 | image = string 26 | memory_in_mbs = number 27 | image_digest = string 28 | timeout_in_seconds = number 29 | config = map(string) 30 | freeform_tags = map(string) 31 | })) 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /modules/iam/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "groups" { 4 | value = { 5 | for group in oci_identity_group.this: 6 | group.name => group.id 7 | } 8 | } 9 | 10 | output "users" { 11 | value = { 12 | for user in oci_identity_user.this: 13 | user.name => user.id 14 | } 15 | } 16 | 17 | output "compartments" { 18 | value = { 19 | for compartment in oci_identity_compartment.this : 20 | split("__", format("%s__%s", compartment.name, time_sleep.wait.id))[0] => compartment.id 21 | } 22 | } 23 | 24 | output "compartment_maps" { 25 | value = { 26 | for compartment in oci_identity_compartment.this: 27 | split("__", format("%s__%s", compartment.name, time_sleep.wait.id))[0] => tomap({ "name" = compartment.name, "id" = compartment.id}) 28 | } 29 | } 30 | 31 | output "policies" { 32 | value = { 33 | for policy in oci_identity_policy.this: 34 | policy.name => policy.id 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /modules/iam/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "parent_comp" { 4 | type = map(any) 5 | } 6 | 7 | variable "comp_params" { 8 | type = map(object({ 9 | name = string 10 | parent_name = string 11 | description = string 12 | enable_delete = bool 13 | })) 14 | } 15 | 16 | variable "user_params" { 17 | type = map(object({ 18 | name = string 19 | description = string 20 | group_name = string 21 | })) 22 | } 23 | 24 | variable "group_params" { 25 | type = map(object({ 26 | name = string 27 | description = string 28 | })) 29 | } 30 | 31 | variable "policy_params" { 32 | type = map(object({ 33 | name = string 34 | compartment_name = string 35 | description = string 36 | statements = list(string) 37 | })) 38 | } 39 | 40 | variable "auth_provider" { 41 | type = map(string) 42 | } 43 | -------------------------------------------------------------------------------- /modules/instance-principal/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | provider "oci" { 4 | tenancy_ocid = var.auth_provider.tenancy 5 | user_ocid = var.auth_provider.user_id 6 | fingerprint = var.auth_provider.fingerprint 7 | private_key_path = var.auth_provider.key_file_path 8 | region = data.oci_identity_regions.existing.regions[0].name 9 | alias = "home" 10 | } 11 | 12 | data "oci_identity_tenancy" "existing" { 13 | tenancy_id = var.auth_provider.tenancy 14 | } 15 | 16 | data "oci_identity_regions" "existing" { 17 | filter { 18 | name = "key" 19 | values = [data.oci_identity_tenancy.existing.home_region_key] 20 | } 21 | } 22 | 23 | resource "oci_identity_dynamic_group" "instance_principal_dg" { 24 | provider = oci.home 25 | for_each = var.instance_principal_params 26 | compartment_id = var.auth_provider.tenancy 27 | description = each.value.dg_description 28 | matching_rule = "instance.id = '${var.instances[each.value.instance_name]}'" 29 | name = each.value.dg_name 30 | } 31 | 32 | resource "oci_identity_policy" "this" { 33 | provider = oci.home 34 | for_each = var.instance_principal_params 35 | compartment_id = var.auth_provider.tenancy 36 | description = each.value.policy_description 37 | name = each.value.policy_name 38 | statements = ["Allow dynamic-group ${oci_identity_dynamic_group.instance_principal_dg[each.value.dg_name].name} to manage all-resources in tenancy"] 39 | } 40 | -------------------------------------------------------------------------------- /modules/instance-principal/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -------------------------------------------------------------------------------- /modules/instance-principal/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "instance_principal_params" { 4 | type = map(object({ 5 | dg_description = string 6 | dg_name = string 7 | policy_description = string 8 | policy_name = string 9 | instance_name = string 10 | })) 11 | } 12 | 13 | variable "instances" { 14 | type = map(string) 15 | } 16 | 17 | variable "auth_provider" { 18 | type = map(string) 19 | } 20 | -------------------------------------------------------------------------------- /modules/ipsec/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | resource "oci_core_cpe" "this" { 5 | for_each = var.ipsec_params 6 | compartment_id = var.compartments[each.value.comp_name] 7 | ip_address = each.value.cpe_ip_address 8 | display_name = each.value.name 9 | } 10 | 11 | 12 | resource "oci_core_ipsec" "this" { 13 | for_each = var.ipsec_params 14 | compartment_id = var.compartments[each.value.comp_name] 15 | cpe_id = oci_core_cpe.this[each.value.name].id 16 | drg_id = var.drgs[each.value.drg_name] 17 | static_routes = each.value.static_routes 18 | } 19 | 20 | data "oci_core_ipsec_connection_tunnels" "this" { 21 | for_each = oci_core_ipsec.this 22 | ipsec_id = each.value.id 23 | } 24 | -------------------------------------------------------------------------------- /modules/ipsec/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "ipsec_tunnel_ips" { 5 | value = { 6 | for tunnel, tunnel_values in data.oci_core_ipsec_connection_tunnels.this : 7 | tunnel => [for values in tunnel_values.ip_sec_connection_tunnels: 8 | values.vpn_ip] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/ipsec/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "ipsec_params" { 5 | type = map(object({ 6 | comp_name = string 7 | cpe_ip_address = string 8 | name = string 9 | drg_name = string 10 | static_routes = list(string) 11 | })) 12 | } 13 | 14 | variable "compartments" { 15 | type = map(string) 16 | } 17 | 18 | variable "drgs" { 19 | type = map(string) 20 | } 21 | -------------------------------------------------------------------------------- /modules/kms/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | locals { 4 | keys_versions_list = flatten([ 5 | for idxkey in var.key_params : [ 6 | for idxversion in range(1, idxkey.rotation_version + 1) : { 7 | format("%s-%d", idxkey.display_name, idxversion) = { 8 | key_name = idxkey.display_name 9 | vault_name = idxkey.vault_name 10 | key_version = idxversion 11 | } 12 | } 13 | ] 14 | ]) 15 | 16 | keys_versions_map = { for item in local.keys_versions_list : 17 | keys(item)[0] => values(item)[0] 18 | } 19 | } 20 | 21 | # at destroy -> goes to "prepare for deletion" state 22 | resource "oci_kms_vault" "this" { 23 | for_each = var.vault_params 24 | compartment_id = var.compartment_ids[each.value.compartment_name] 25 | display_name = each.value.display_name 26 | vault_type = each.value.vault_type # DEFAULT is VIRTUAL / Another one is VIRTUAL_PRIVATE 27 | } 28 | 29 | resource "oci_kms_key" "this" { 30 | for_each = var.key_params 31 | compartment_id = var.compartment_ids[each.value.compartment_name] 32 | display_name = each.value.display_name 33 | key_shape { 34 | algorithm = each.value.key_shape_algorithm 35 | length = each.value.key_shape_size_in_bytes 36 | } 37 | management_endpoint = oci_kms_vault.this[each.value.vault_name].management_endpoint 38 | } 39 | 40 | # rotates key at each apply ? NO 41 | # rotation_version parameter needs to be incremented for rotation execution 42 | resource "oci_kms_key_version" "this" { 43 | for_each = local.keys_versions_map 44 | key_id = oci_kms_key.this[each.value.key_name].id 45 | management_endpoint = oci_kms_vault.this[each.value.vault_name].management_endpoint 46 | } 47 | -------------------------------------------------------------------------------- /modules/kms/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "kms_vault_ids" { 4 | value = { for vault in oci_kms_vault.this : 5 | vault.display_name => vault.id 6 | } 7 | } 8 | 9 | # allows "" values for kms_key_name 10 | # so that kms_key_id will be "" in the resource 11 | # output "kms_key_ids" { 12 | # value = merge({ for key in oci_kms_key.this : 13 | # key.display_name => key.id 14 | # }, { "" = "" }) 15 | # } 16 | 17 | output "kms_key_ids" { 18 | value = { for key in oci_kms_key.this : 19 | key.display_name => key.id } 20 | } 21 | 22 | output "keys_versions_map" { 23 | value = local.keys_versions_map 24 | } 25 | -------------------------------------------------------------------------------- /modules/kms/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "compartment_ids" { 4 | type = map(string) 5 | } 6 | 7 | variable "vault_params" { 8 | type = map(object({ 9 | compartment_name = string 10 | display_name = string 11 | vault_type = string 12 | })) 13 | 14 | } 15 | 16 | variable "key_params" { 17 | type = map(object({ 18 | compartment_name = string 19 | display_name = string 20 | vault_name = string 21 | key_shape_algorithm = string 22 | key_shape_size_in_bytes = number 23 | rotation_version = number 24 | })) 25 | } 26 | -------------------------------------------------------------------------------- /modules/load-balancer/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "load_balancers" { 4 | value = { for lb in oci_load_balancer.this: 5 | lb.display_name => {"id": lb.id, "ip": lb.ip_address_details[0].ip_address} 6 | } 7 | } 8 | 9 | output "backend_sets" { 10 | value = { for bs in oci_load_balancer_backendset.this: 11 | bs.name => bs.id 12 | } 13 | } 14 | 15 | output "lbs" { 16 | value = { for lb in oci_load_balancer.this: 17 | lb.display_name => {"lb_id" : lb.id, "comp_id": lb.compartment_id} 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/load-balancer/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "compartment_ids" { 4 | type = map(string) 5 | } 6 | 7 | variable "subnet_ids" { 8 | type = map(string) 9 | } 10 | 11 | variable "lb_params" { 12 | type = map(object({ 13 | shape = string 14 | compartment_name = string 15 | subnet_names = list(string) 16 | display_name = string 17 | is_private = bool 18 | shape_details = list(object({ 19 | min_bw = number 20 | max_bw = number 21 | })) 22 | })) 23 | } 24 | 25 | variable "backend_sets" { 26 | type = map(object({ 27 | name = string 28 | lb_name = string 29 | policy = string 30 | hc_port = number 31 | hc_protocol = string 32 | hc_url = string 33 | })) 34 | } 35 | 36 | # Using list(any) due to the fact that we have some optional parameters in the maps 37 | variable "listeners" { 38 | type = map(any) 39 | } 40 | 41 | variable "certificates" { 42 | type = map(any) 43 | } 44 | 45 | variable "backend_params" { 46 | type = map(any) 47 | } 48 | 49 | variable "private_ip_instances" { 50 | type = map(any) 51 | } 52 | -------------------------------------------------------------------------------- /modules/logging/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | resource "oci_logging_log_group" "this" { 5 | for_each = var.log_group_params 6 | compartment_id = var.compartments[each.value.comp_name] 7 | display_name = each.value.log_group_name 8 | } 9 | 10 | 11 | resource "oci_logging_log" "this" { 12 | for_each = var.log_params 13 | display_name = each.value.log_name 14 | log_group_id = oci_logging_log_group.this[each.value.log_group].id 15 | log_type = each.value.log_type 16 | configuration { 17 | source { 18 | category = each.value.source_log_category 19 | resource = each.value.source_service == "objectstorage" ? each.value.source_resource : var.log_resources[each.value.source_resource] 20 | service = each.value.source_service 21 | source_type = each.value.source_type 22 | } 23 | compartment_id = var.compartments[each.value.comp_name] 24 | } 25 | is_enabled = each.value.is_enabled 26 | retention_duration = each.value.retention_duration 27 | } 28 | -------------------------------------------------------------------------------- /modules/logging/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | output "log_groups" { 6 | value = {for lg in oci_logging_log_group.this : 7 | lg.display_name => lg.id} 8 | } 9 | 10 | 11 | output "logs" { 12 | value = {for l in oci_logging_log.this: 13 | l.display_name => l.id} 14 | } -------------------------------------------------------------------------------- /modules/logging/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "compartments" { 5 | type = map(string) 6 | } 7 | 8 | variable "log_resources" { 9 | type = map(string) 10 | } 11 | 12 | variable "log_group_params" { 13 | type = map(object({ 14 | comp_name = string 15 | log_group_name = string 16 | })) 17 | } 18 | 19 | 20 | variable "log_params" { 21 | type = map(object({ 22 | log_name = string 23 | log_group = string 24 | log_type = string 25 | source_log_category = string 26 | source_resource = string 27 | source_service = string 28 | source_type = string 29 | comp_name = string 30 | is_enabled = bool 31 | retention_duration = number 32 | })) 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /modules/marketplace_instance/outputs.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-quickstart/oci-adoption-framework-thunder/2588f6a9afe84378b90c4b2520d61d6c5fb62f6f/modules/marketplace_instance/outputs.tf -------------------------------------------------------------------------------- /modules/marketplace_instance/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "compartment_ids" { 4 | type = map(string) 5 | } 6 | 7 | variable "subnet_ids" { 8 | type = map(string) 9 | } 10 | 11 | variable "nsgs" { 12 | type = map(string) 13 | } 14 | 15 | variable "kms_key_ids" { 16 | type = map(string) 17 | } 18 | 19 | variable "instance_params" { 20 | description = "Placeholder for the parameters of the instances" 21 | type = map(object({ 22 | ad = number 23 | shape = string 24 | hostname = string 25 | boot_volume_size = number 26 | assign_public_ip = bool 27 | preserve_boot_volume = bool 28 | compartment_name = string 29 | subnet_name = string 30 | ssh_public_key = string 31 | device_disk_mappings = string 32 | freeform_tags = map(string) 33 | kms_key_name = string 34 | block_vol_att_type = string 35 | encrypt_in_transit = bool 36 | fd = number 37 | image_version = string 38 | nsgs = list(string) 39 | listing_id = string 40 | listing_resource_version = string 41 | })) 42 | } 43 | -------------------------------------------------------------------------------- /modules/network/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "vcns" { 4 | value = { 5 | for vcn in oci_core_virtual_network.this : 6 | vcn.display_name => tomap({ 7 | "id" = vcn.id 8 | "cidr" = vcn.cidr_block}) 9 | } 10 | } 11 | 12 | output "subnets" { 13 | value = { 14 | for subnet in oci_core_subnet.this : 15 | subnet.display_name => tomap({ 16 | "id" = subnet.id 17 | "cidr" = subnet.cidr_block}) 18 | } 19 | } 20 | 21 | output "subnets_ids" { 22 | value = { 23 | for subnet in oci_core_subnet.this : 24 | subnet.display_name => subnet.id 25 | } 26 | } 27 | 28 | output "drgs" { 29 | value = { 30 | for drg in oci_core_drg.this: 31 | drg.display_name => drg.id 32 | } 33 | } 34 | 35 | output "nsgs" { 36 | value = { 37 | for nsg in oci_core_network_security_group.this: 38 | nsg.display_name => nsg.id 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /modules/notifications/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | resource "oci_ons_notification_topic" "this" { 5 | for_each = var.topic_params 6 | compartment_id = var.compartments[each.value.comp_name] 7 | name = each.value.topic_name 8 | description = each.value.description 9 | } 10 | 11 | resource "oci_ons_subscription" "this" { 12 | for_each = var.subscription_params 13 | compartment_id = var.compartments[each.value.comp_name] 14 | endpoint = each.value.endpoint 15 | protocol = each.value.protocol 16 | topic_id = oci_ons_notification_topic.this[each.value.topic_name].id 17 | } 18 | -------------------------------------------------------------------------------- /modules/notifications/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "topics" { 5 | value = { 6 | for i in oci_ons_notification_topic.this : 7 | i.name => { "id" : i.topic_id, "api_endpoint" : i.api_endpoint, "short_topic_id" : i.short_topic_id } 8 | } 9 | } 10 | 11 | 12 | output "topic_id" { 13 | value = { for i in oci_ons_notification_topic.this : 14 | i.name => i.topic_id } 15 | } 16 | -------------------------------------------------------------------------------- /modules/notifications/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "topic_params" { 5 | type = map(object({ 6 | comp_name = string 7 | topic_name = string 8 | description = string 9 | })) 10 | } 11 | 12 | variable "subscription_params" { 13 | type = map(object({ 14 | comp_name = string 15 | endpoint = string 16 | protocol = string 17 | topic_name = string 18 | })) 19 | } 20 | 21 | variable "compartments" { 22 | type = map(string) 23 | } 24 | -------------------------------------------------------------------------------- /modules/object-storage/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | data "oci_objectstorage_namespace" "this" { 4 | compartment_id = var.oci_provider["tenancy"] 5 | } 6 | 7 | resource "oci_objectstorage_bucket" "this" { 8 | for_each = var.bucket_params 9 | compartment_id = var.compartments[each.value.compartment_name] 10 | name = each.value.name 11 | namespace = data.oci_objectstorage_namespace.this.namespace 12 | access_type = each.value.access_type 13 | storage_tier = each.value.storage_tier 14 | object_events_enabled = each.value.events_enabled 15 | kms_key_id = length(var.kms_key_ids) == 0 || each.value.kms_key_name == "" ? "" : var.kms_key_ids[each.value.kms_key_name] 16 | } 17 | -------------------------------------------------------------------------------- /modules/object-storage/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | output "buckets" { 4 | value = { 5 | for bucket in oci_objectstorage_bucket.this : 6 | bucket.name => bucket.access_type 7 | } 8 | } 9 | 10 | 11 | 12 | output "bucket_id" { 13 | value = { 14 | for bucket in oci_objectstorage_bucket.this : 15 | bucket.name => bucket.bucket_id 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /modules/object-storage/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | variable "oci_provider" { 4 | type = map(string) 5 | } 6 | 7 | variable "bucket_params" { 8 | type = map(object({ 9 | compartment_name = string 10 | name = string 11 | access_type = string 12 | storage_tier = string 13 | events_enabled = bool 14 | kms_key_name = string 15 | })) 16 | } 17 | 18 | variable "compartments" { 19 | type = map(string) 20 | } 21 | 22 | variable "kms_key_ids" { 23 | type = map(string) 24 | } 25 | -------------------------------------------------------------------------------- /modules/remote-peering/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -------------------------------------------------------------------------------- /modules/remote-peering/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "provider_path" { 5 | type = string 6 | } 7 | 8 | variable "compartment_ids" { 9 | type = map(string) 10 | } 11 | 12 | variable "vcns" { 13 | description = "The list of vcns" 14 | type = map(map(string)) 15 | } 16 | 17 | variable "vcns2" { 18 | description = "The list of vcns" 19 | type = map(map(string)) 20 | } 21 | 22 | variable "rpg_params" { 23 | description = "The parameters for the DRG" 24 | type = list(object({ 25 | compartment_name = string 26 | vcn_name_requestor = string 27 | vcn_name_acceptor = string 28 | })) 29 | } 30 | 31 | variable "requestor_region" {} 32 | variable "acceptor_region" {} 33 | -------------------------------------------------------------------------------- /modules/service_connector/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | output "service_connectors" { 6 | value = {for sc in oci_sch_service_connector.this: 7 | sc.display_name => sc.id} 8 | } -------------------------------------------------------------------------------- /modules/tag_namespace/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | resource "oci_identity_tag_namespace" "this" { 5 | for_each = var.tag_namespace_params 6 | compartment_id = var.compartments[each.value.compartment_name] 7 | description = each.value.description 8 | name = each.value.name 9 | } 10 | 11 | resource "oci_identity_tag" "this" { 12 | for_each = var.tag_key_params 13 | description = each.value.description 14 | name = each.value.name 15 | tag_namespace_id = oci_identity_tag_namespace.this[each.value.tagnamespace_name].id 16 | 17 | is_cost_tracking = each.value.is_cost_tracking 18 | validator { 19 | validator_type = each.value.validator_type 20 | values = each.value.values 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/tag_namespace/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -------------------------------------------------------------------------------- /modules/tag_namespace/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "tag_namespace_params" { 5 | type = map(object({ 6 | compartment_name = string 7 | description = string 8 | name = string 9 | })) 10 | } 11 | 12 | variable "tag_key_params" { 13 | type = map(object({ 14 | description = string 15 | name = string 16 | tagnamespace_name = string 17 | is_cost_tracking = bool 18 | validator_type = string 19 | values = list(string) 20 | })) 21 | } 22 | 23 | variable "compartments" { 24 | type = map(string) 25 | } 26 | -------------------------------------------------------------------------------- /modules/vulnerability_scan/main.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | resource "oci_vulnerability_scanning_host_scan_recipe" "this" { 5 | for_each = var.scan_recipes_params 6 | compartment_id = var.compartments[each.value.comp_name] 7 | display_name = each.value.display_name 8 | agent_settings { 9 | scan_level = each.value.scan_level 10 | agent_configuration { 11 | vendor = each.value.agent_config_vendor 12 | cis_benchmark_settings { 13 | scan_level = each.value.cis_bench_scan_level 14 | } 15 | } 16 | } 17 | port_settings { 18 | scan_level = each.value.port_scan_level 19 | } 20 | schedule { 21 | type = each.value.schedule_type 22 | day_of_week = each.value.day_of_week 23 | } 24 | 25 | } 26 | 27 | 28 | resource "oci_vulnerability_scanning_host_scan_target" "this" { 29 | for_each = var.scan_target_params 30 | compartment_id = var.compartments[each.value.comp_name] 31 | host_scan_recipe_id = oci_vulnerability_scanning_host_scan_recipe.this[each.value.recipe_name].id 32 | target_compartment_id = var.compartments[each.value.target_comp_name] 33 | display_name = each.value.display_name 34 | } 35 | -------------------------------------------------------------------------------- /modules/vulnerability_scan/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | 5 | output "host_scan_recipe" { 6 | value = {for hsr in oci_vulnerability_scanning_host_scan_recipe.this: 7 | hsr.display_name => hsr.id} 8 | } 9 | 10 | output "host_scan_target" { 11 | value = {for hst in oci_vulnerability_scanning_host_scan_target.this: 12 | hst.display_name => hst.id} 13 | } -------------------------------------------------------------------------------- /modules/vulnerability_scan/variables.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | variable "compartments" { 5 | type = map(string) 6 | } 7 | 8 | 9 | variable "scan_recipes_params" { 10 | type = map(object({ 11 | display_name = string 12 | comp_name = string 13 | scan_level = string 14 | agent_config_vendor = string 15 | cis_bench_scan_level = string 16 | port_scan_level = string 17 | schedule_type = string 18 | day_of_week = string 19 | })) 20 | } 21 | 22 | 23 | variable "scan_target_params" { 24 | type = map(object({ 25 | display_name = string 26 | comp_name = string 27 | recipe_name = string 28 | target_comp_name = string 29 | })) 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /modules/waas/outputs.tf: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 | 4 | output "cname" { 5 | value = { for waas in oci_waas_waas_policy.this : 6 | waas.display_name => waas.cname 7 | } 8 | } 9 | 10 | output "waas" { 11 | value = { for waas in oci_waas_waas_policy.this : 12 | waas.display_name => waas.id 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /userdata/fss_replication_dest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 4 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 5 | 6 | dst_mount_path_second='${dst_mount_path_second}' 7 | dst_export_path_second='${dst_export_path_second}' 8 | dst_mount_target_private_ip_second='${dst_mount_target_private_ip_second}' 9 | data_sync_frequency='${data_sync_frequency}' 10 | src_public_ip='${src_public_ip}' 11 | src_mount_path='${src_mount_path}' 12 | ssh_private_key='${ssh_private_key}' 13 | 14 | mkdir -p ${dst_mount_path_second} 15 | mount ${dst_mount_target_private_ip_second}:${dst_export_path_second} ${dst_mount_path_second} 16 | echo "${data_sync_frequency} /usr/bin/flock -n /var/run/fss-sync-up-snapshot.lck rsync -aHAXxve --numeric-ids --delete -e 'ssh -i /home/opc/.ssh/id_rsa -o StrictHostKeyChecking=no' opc@${src_public_ip}:${src_mount_path}/ ${dst_mount_path_second}/ " >> /etc/cron.d/fss-sync-up-snapshot 17 | 18 | chmod 644 /etc/cron.d/fss-sync-up-snapshot 19 | crontab /etc/cron.d/fss-sync-up-snapshot 20 | 21 | echo "${ssh_private_key}" >> ~/.ssh/id_rsa 22 | chmod 0600 ~/.ssh/id_rsa 23 | -------------------------------------------------------------------------------- /userdata/fss_replication_local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 4 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 5 | 6 | src_mount_path='${src_mount_path}' 7 | dst_mount_path='${dst_mount_path}' 8 | src_export_path='${src_export_path}' 9 | dst_export_path='${dst_export_path}' 10 | src_mount_target_private_ip='${src_mount_target_private_ip}' 11 | dst_mount_target_private_ip='${dst_mount_target_private_ip}' 12 | data_sync_frequency='${data_sync_frequency}' 13 | 14 | mkdir -p ${src_mount_path} 15 | mkdir -p ${dst_mount_path} 16 | mount ${src_mount_target_private_ip}:${src_export_path} ${src_mount_path} 17 | mount ${dst_mount_target_private_ip}:${dst_export_path} ${dst_mount_path} 18 | echo "${data_sync_frequency} /usr/bin/flock -n /var/run/fss-sync-up-file-system.lck rsync -aHAXxv --numeric-ids --delete ${src_mount_path}/ ${dst_mount_path}/ " >> /etc/cron.d/fss-sync-up-snapshot 19 | chmod 644 /etc/cron.d/fss-sync-up-snapshot 20 | crontab /etc/cron.d/fss-sync-up-snapshot 21 | --------------------------------------------------------------------------------