diff --git a/examples/README.md b/examples/README.md
new file mode 100644
index 0000000..23cf7ee
--- /dev/null
+++ b/examples/README.md
@@ -0,0 +1,233 @@
+
+## Terraform Modules
+These modules are generated by CD3 Automation Toolkit.
+
+Purpose: To efficiently build and maintain the Infrastructure in Oracle Cloud.
+
+## Requirements
+
+| Name | Version |
+|------|---------|
+| [oci](#requirement\_oci) | >= 4.0.0 |
+
+## Providers
+
+| Name | Version |
+|------|---------|
+| [oci](#provider\_oci) | >= 4.0.0 |
+
+## Modules
+
+| Name | Source | Version |
+|------|--------|---------|
+| [alarms](#module\_alarms) | ./modules/managementservices/alarm | n/a |
+| [backend-sets](#module\_backend-sets) | ./modules/loadbalancer/lb-backend-set | n/a |
+| [backends](#module\_backends) | ./modules/loadbalancer/lb-backend | n/a |
+| [block-volumes](#module\_block-volumes) | ./modules/storage/block-volume | n/a |
+| [budget-alert-rules](#module\_budget-alert-rules) | ./modules/governance/billing/budget-alert-rule | n/a |
+| [budgets](#module\_budgets) | ./modules/governance/billing/budget | n/a |
+| [certificates](#module\_certificates) | ./modules/loadbalancer/lb-certificate | n/a |
+| [cipher-suites](#module\_cipher-suites) | ./modules/loadbalancer/lb-cipher-suite | n/a |
+| [cloud-guard-configurations](#module\_cloud-guard-configurations) | ./modules/security/cloud-guard-configuration | n/a |
+| [cloud-guard-targets](#module\_cloud-guard-targets) | ./modules/security/cloud-guard-target | n/a |
+| [custom-backup-policies](#module\_custom-backup-policies) | ./modules/storage/custom-backup-policy | n/a |
+| [custom-dhcps](#module\_custom-dhcps) | ./modules/network/custom-dhcp | n/a |
+| [dbsystems-vm-bm](#module\_dbsystems-vm-bm) | ./modules/database/dbsystem-vm-bm | n/a |
+| [dedicated-hosts](#module\_dedicated-hosts) | ./modules/compute/dedicated-vm-host | n/a |
+| [default-dhcps](#module\_default-dhcps) | ./modules/network/default-dhcp | n/a |
+| [default-route-tables](#module\_default-route-tables) | ./modules/network/default-route-table | n/a |
+| [default-security-lists](#module\_default-security-lists) | ./modules/network/default-sec-list | n/a |
+| [drg-attachments](#module\_drg-attachments) | ./modules/network/drg-attachment | n/a |
+| [drg-route-distribution-statements](#module\_drg-route-distribution-statements) | ./modules/network/drg-route-distribution-statement | n/a |
+| [drg-route-distributions](#module\_drg-route-distributions) | ./modules/network/drg-route-distribution | n/a |
+| [drg-route-rules](#module\_drg-route-rules) | ./modules/network/drg-route-rule | n/a |
+| [drg-route-tables](#module\_drg-route-tables) | ./modules/network/drg-route-table | n/a |
+| [drgs](#module\_drgs) | ./modules/network/drg | n/a |
+| [endpoints](#module\_endpoints) | ./modules/dns/endpoint | n/a |
+| [events](#module\_events) | ./modules/managementservices/event | n/a |
+| [exa-infra](#module\_exa-infra) | ./modules/database/exa-infra | n/a |
+| [exa-vmclusters](#module\_exa-vmclusters) | ./modules/database/exa-vmcluster | n/a |
+| [exported-lpgs](#module\_exported-lpgs) | ./modules/network/lpg | n/a |
+| [fss](#module\_fss) | ./modules/storage/file-storage/fss | n/a |
+| [fss-export-options](#module\_fss-export-options) | ./modules/storage/file-storage/export-option | n/a |
+| [hostnames](#module\_hostnames) | ./modules/loadbalancer/lb-hostname | n/a |
+| [hub-lpgs](#module\_hub-lpgs) | ./modules/network/lpg | n/a |
+| [iam-compartments](#module\_iam-compartments) | ./modules/identity/iam-compartment | n/a |
+| [iam-groups](#module\_iam-groups) | ./modules/identity/iam-group | n/a |
+| [iam-policies](#module\_iam-policies) | ./modules/identity/iam-policy | n/a |
+| [igws](#module\_igws) | ./modules/network/igw | n/a |
+| [instances](#module\_instances) | ./modules/compute/instance | n/a |
+| [keys](#module\_keys) | ./modules/security/key | n/a |
+| [lbr-reserved-ips](#module\_lbr-reserved-ips) | ./modules/ip/reserved-public-ip | n/a |
+| [listeners](#module\_listeners) | ./modules/loadbalancer/lb-listener | n/a |
+| [load-balancers](#module\_load-balancers) | ./modules/loadbalancer/lb-load-balancer | n/a |
+| [loadbalancer-log-groups](#module\_loadbalancer-log-groups) | ./modules/managementservices/log-group | n/a |
+| [loadbalancer-logs](#module\_loadbalancer-logs) | ./modules/managementservices/log | n/a |
+| [mts](#module\_mts) | ./modules/storage/file-storage/mount-target | n/a |
+| [network-load-balancers](#module\_network-load-balancers) | ./modules/networkloadbalancer/nlb | n/a |
+| [ngws](#module\_ngws) | ./modules/network/ngw | n/a |
+| [nlb-backend-sets](#module\_nlb-backend-sets) | ./modules/networkloadbalancer/nlb-backendset | n/a |
+| [nlb-backends](#module\_nlb-backends) | ./modules/networkloadbalancer/nlb-backend | n/a |
+| [nlb-listeners](#module\_nlb-listeners) | ./modules/networkloadbalancer/nlb-listener | n/a |
+| [nlb-reserved-ips](#module\_nlb-reserved-ips) | ./modules/ip/reserved-public-ip | n/a |
+| [none-lpgs](#module\_none-lpgs) | ./modules/network/lpg | n/a |
+| [notifications-subscriptions](#module\_notifications-subscriptions) | ./modules/managementservices/notification-subscription | n/a |
+| [notifications-topics](#module\_notifications-topics) | ./modules/managementservices/notification-topic | n/a |
+| [nsg-rules](#module\_nsg-rules) | ./modules/network/nsg-rules | n/a |
+| [nsgs](#module\_nsgs) | ./modules/network/nsg | n/a |
+| [oss-buckets](#module\_oss-buckets) | ./modules/storage/object-storage | n/a |
+| [oss-log-groups](#module\_oss-log-groups) | ./modules/managementservices/log-group | n/a |
+| [oss-logs](#module\_oss-logs) | ./modules/managementservices/log | n/a |
+| [oss-policies](#module\_oss-policies) | ./modules/identity/iam-policy | n/a |
+| [path-route-sets](#module\_path-route-sets) | ./modules/loadbalancer/lb-path-route-set | n/a |
+| [peer-lpgs](#module\_peer-lpgs) | ./modules/network/lpg | n/a |
+| [private-ips](#module\_private-ips) | ./modules/ip/secondary-private-ip | n/a |
+| [public-ip-pools](#module\_public-ip-pools) | ./modules/ip/public-ip-pool | n/a |
+| [reserved-ips](#module\_reserved-ips) | ./modules/ip/reserved-public-ip | n/a |
+| [route-tables](#module\_route-tables) | ./modules/network/route-table | n/a |
+| [rule-sets](#module\_rule-sets) | ./modules/loadbalancer/lb-rule-set | n/a |
+| [security-lists](#module\_security-lists) | ./modules/network/sec-list | n/a |
+| [sgws](#module\_sgws) | ./modules/network/sgw | n/a |
+| [spoke-lpgs](#module\_spoke-lpgs) | ./modules/network/lpg | n/a |
+| [sub-compartments-level1](#module\_sub-compartments-level1) | ./modules/identity/iam-compartment | n/a |
+| [sub-compartments-level2](#module\_sub-compartments-level2) | ./modules/identity/iam-compartment | n/a |
+| [sub-compartments-level3](#module\_sub-compartments-level3) | ./modules/identity/iam-compartment | n/a |
+| [sub-compartments-level4](#module\_sub-compartments-level4) | ./modules/identity/iam-compartment | n/a |
+| [sub-compartments-level5](#module\_sub-compartments-level5) | ./modules/identity/iam-compartment | n/a |
+| [subnets](#module\_subnets) | ./modules/network/subnet | n/a |
+| [tag-defaults](#module\_tag-defaults) | ./modules/tagging/tag-default | n/a |
+| [tag-keys](#module\_tag-keys) | ./modules/tagging/tag-key | n/a |
+| [tag-namespaces](#module\_tag-namespaces) | ./modules/tagging/tag-namespace | n/a |
+| [vaults](#module\_vaults) | ./modules/security/vault | n/a |
+| [vcn-log-groups](#module\_vcn-log-groups) | ./modules/managementservices/log-group | n/a |
+| [vcn-logs](#module\_vcn-logs) | ./modules/managementservices/log | n/a |
+| [vcns](#module\_vcns) | ./modules/network/vcn | n/a |
+| [vnic-attachments](#module\_vnic-attachments) | ./modules/network/vnic-attachment | n/a |
+
+## Resources
+
+| Name | Type |
+|------|------|
+| [oci_core_drg_route_distributions.drg_route_distributions](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_drg_route_distributions) | data source |
+| [oci_core_drg_route_tables.drg_route_tables](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_drg_route_tables) | data source |
+| [oci_core_instance.instance_ip](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_instance) | data source |
+| [oci_core_instance.nlb_instance_ip](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_instance) | data source |
+| [oci_core_instances.instances](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_instances) | data source |
+| [oci_core_instances.instances_for_vnic](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_instances) | data source |
+| [oci_core_instances.nlb_instances](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_instances) | data source |
+| [oci_core_private_ips.ip_address](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_private_ips) | data source |
+| [oci_core_private_ips.private_ips_by_ip_address](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_private_ips) | data source |
+| [oci_core_subnets.oci_nlb_subnets](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_subnets) | data source |
+| [oci_core_subnets.oci_subnets](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_subnets) | data source |
+| [oci_core_subnets.oci_subnets_dns](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_subnets) | data source |
+| [oci_core_subnets.oci_subnets_vnics](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_subnets) | data source |
+| [oci_core_vcns.oci_vcns](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_vcns) | data source |
+| [oci_core_vcns.oci_vcns_vnics](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_vcns) | data source |
+| [oci_core_vnic_attachments.nlb_instance_vnic_attachments](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_vnic_attachments) | data source |
+| [oci_core_vnic_attachments.vnic_attachments](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/core_vnic_attachments) | data source |
+| [oci_dns_resolvers.resolvers](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/dns_resolvers) | data source |
+| [oci_identity_availability_domains.availability_domains](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/identity_availability_domains) | data source |
+| [oci_identity_compartments.compartments](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/identity_compartments) | data source |
+| [oci_objectstorage_bucket.buckets](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/objectstorage_bucket) | data source |
+| [oci_objectstorage_namespace.bucket_namespace](https://registry.terraform.io/providers/hashicorp/oci/latest/docs/data-sources/objectstorage_namespace) | data source |
+
+## Inputs
+
+| Name | Description | Type | Default | Required |
+|------|-------------|------|---------|:--------:|
+| [alarms](#input\_alarms) | n/a | `map(any)` | `{}` | no |
+| [backend\_sets](#input\_backend\_sets) | To provision Load Balancer Backend Sets | `map(any)` | `{}` | no |
+| [backends](#input\_backends) | To provision Load Balancer Backends | `map(any)` | `{}` | no |
+| [block\_backup\_policies](#input\_block\_backup\_policies) | To create block volume back policy | `map(any)` | `{}` | no |
+| [blockvolumes](#input\_blockvolumes) | To provision block volumes | `map(any)` | `{}` | no |
+| [boot\_backup\_policies](#input\_boot\_backup\_policies) | Map of boot volume backup policies to be provisioned | `map(any)` | `{}` | no |
+| [budget\_alert\_rules](#input\_budget\_alert\_rules) | n/a | `map(any)` | `{}` | no |
+| [budgets](#input\_budgets) | n/a | `map(any)` | `{}` | no |
+| [capacity\_reservation\_ocids](#input\_capacity\_reservation\_ocids) | n/a | `map(any)` |
{ "AD1": "", "AD2": "", "AD3": "" } | no |
+| [certificates](#input\_certificates) | To provision Load Balancer Certificates | `map(any)` | `{}` | no |
+| [cipher\_suites](#input\_cipher\_suites) | To provision Load Balancer Cipher Suites | `map(any)` | `{}` | no |
+| [cloud\_guard\_configs](#input\_cloud\_guard\_configs) | n/a | `map(any)` | `{}` | no |
+| [cloud\_guard\_targets](#input\_cloud\_guard\_targets) | n/a | `map(any)` | `{}` | no |
+| [compartment\_ocids](#input\_compartment\_ocids) | n/a | `map(any)` | `{}` | no |
+| [compartments](#input\_compartments) | n/a | object({ root = optional(map(object({ tenancy_ocid = optional(string) parent_compartment_id = string name = string description = optional(string) enable_delete = optional(bool) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) }))) compartment_level1 = optional(map(object({ tenancy_ocid = optional(string) parent_compartment_id = string name = string description = optional(string) enable_delete = optional(bool) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) }))) compartment_level2 = optional(map(object({ tenancy_ocid = optional(string) parent_compartment_id = string name = string description = optional(string) enable_delete = optional(bool) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) }))) compartment_level3 = optional(map(object({ tenancy_ocid = optional(string) parent_compartment_id = string name = string description = optional(string) enable_delete = optional(bool) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) }))) compartment_level4 = optional(map(object({ tenancy_ocid = optional(string) parent_compartment_id = string name = string description = optional(string) enable_delete = optional(bool) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) }))) compartment_level5 = optional(map(object({ tenancy_ocid = optional(string) parent_compartment_id = string name = string description = optional(string) enable_delete = optional(bool) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) }))) }) | { "compartment_level1": {}, "compartment_level2": {}, "compartment_level3": {}, "compartment_level4": {}, "compartment_level5": {}, "root": {} } | no |
+| [custom\_backup\_policies](#input\_custom\_backup\_policies) | n/a | `map(any)` | `{}` | no |
+| [custom\_dhcps](#input\_custom\_dhcps) | n/a | map(object({ compartment_id = string server_type = string vcn_id = string custom_dns_servers = list(any) domain_name_type = optional(string) display_name = optional(string) search_domain = optional(map(any)) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) })) | `{}` | no |
+| [data\_drg\_route\_table\_distributions](#input\_data\_drg\_route\_table\_distributions) | n/a | `map(any)` | `{}` | no |
+| [data\_drg\_route\_tables](#input\_data\_drg\_route\_tables) | n/a | `map(any)` | `{}` | no |
+| [databases](#input\_databases) | Map of databases to be provisioned in an existing db\_home | `map(any)` | `{}` | no |
+| [db\_home](#input\_db\_home) | Map of database db home to be provisioned | `map(any)` | `{}` | no |
+| [dbsystem\_ssh\_keys](#input\_dbsystem\_ssh\_keys) | n/a | `map(any)` | { "ssh_public_key": [ "" ] } | no |
+| [dbsystems\_vm\_bm](#input\_dbsystems\_vm\_bm) | To provision DB System | `map(any)` | `{}` | no |
+| [dedicated\_hosts](#input\_dedicated\_hosts) | To provision new dedicated VM hosts | `map(any)` | `{}` | no |
+| [default\_dhcps](#input\_default\_dhcps) | n/a | map(object({ server_type = string manage_default_resource_id = optional(string) custom_dns_servers = optional(list(any)) search_domain = optional(map(any)) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) })) | `{}` | no |
+| [default\_route\_tables](#input\_default\_route\_tables) | n/a | `map(any)` | `{}` | no |
+| [default\_seclists](#input\_default\_seclists) | n/a | map(object({ compartment_id = string vcn_id = string display_name = optional(string) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) ingress_sec_rules = optional(list(object({ protocol = optional(string) stateless = optional(string) description = optional(string) source = optional(string) source_type = optional(string) options = optional(map(any)) }))) egress_sec_rules = optional(list(object({ protocol = optional(string) stateless = optional(string) description = optional(string) destination = optional(string) destination_type = optional(string) options = optional(map(any)) }))) })) | `{}` | no |
+| [drg\_attachments](#input\_drg\_attachments) | n/a | `map(any)` | `{}` | no |
+| [drg\_route\_distribution\_statements](#input\_drg\_route\_distribution\_statements) | n/a | map(object({ drg_route_distribution_id = string action = string match_criteria = optional(list(object({ match_type = string attachment_type = optional(string) drg_attachment_id = optional(string) }))) priority = optional(string) })) | `{}` | no |
+| [drg\_route\_distributions](#input\_drg\_route\_distributions) | n/a | map(object({ distribution_type = string drg_id = string defined_tags = optional(string) freeform_tags = optional(string) display_name = optional(string) })) | `{}` | no |
+| [drg\_route\_rules](#input\_drg\_route\_rules) | n/a | `map(any)` | `{}` | no |
+| [drg\_route\_tables](#input\_drg\_route\_tables) | n/a | `map(any)` | `{}` | no |
+| [drgs](#input\_drgs) | n/a | map(object({ compartment_id = string display_name = optional(string) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) })) | `{}` | no |
+| [events](#input\_events) | n/a | `map(any)` | `{}` | no |
+| [exa\_infra](#input\_exa\_infra) | To provision exadata infrastructure | `map(any)` | `{}` | no |
+| [exa\_vmclusters](#input\_exa\_vmclusters) | To provision exadata cloud VM cluster | `map(any)` | `{}` | no |
+| [exacs\_ssh\_keys](#input\_exacs\_ssh\_keys) | n/a | `map(any)` | { "ssh_public_key": [ "" ] } | no |
+| [fingerprint](#input\_fingerprint) | n/a | `string` | `""` | no |
+| [fss](#input\_fss) | To provision File System Services | `map(any)` | `{}` | no |
+| [groups](#input\_groups) | n/a | map(object({ group_name = string group_description = string matching_rule = optional(string) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) })) | `{}` | no |
+| [hostnames](#input\_hostnames) | To provision Load Balancer Hostnames | `map(any)` | `{}` | no |
+| [igws](#input\_igws) | n/a | map(object({ compartment_id = string vcn_id = string enable_igw = optional(bool) igw_name = optional(string) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) })) | `{}` | no |
+| [instance\_source\_ocids](#input\_instance\_source\_ocids) | n/a | `map(any)` | { "Linux": "", "PaloAlto": "Palo Alto Networks VM-Series Next Generation Firewall", "Windows": "" } | no |
+| [instance\_ssh\_keys](#input\_instance\_ssh\_keys) | n/a | `map(any)` | { "ssh_public_key": "" } | no |
+| [instances](#input\_instances) | Map of instances to be provisioned | `map(any)` | `{}` | no |
+| [keys](#input\_keys) | n/a | `map(any)` | `{}` | no |
+| [lbr\_reserved\_ips](#input\_lbr\_reserved\_ips) | To provision Load Balancer Reserved IPs | `map(any)` | `{}` | no |
+| [listeners](#input\_listeners) | To provision Load Balancer Listeners | `map(any)` | `{}` | no |
+| [load\_balancers](#input\_load\_balancers) | To provision Load Balancers | `map(any)` | `{}` | no |
+| [loadbalancer\_log\_groups](#input\_loadbalancer\_log\_groups) | To provision Log Groups for Load Balancers | `map(any)` | `{}` | no |
+| [loadbalancer\_logs](#input\_loadbalancer\_logs) | To provision Logs for Load Balancers | `map(any)` | `{}` | no |
+| [lpgs](#input\_lpgs) | n/a | `map(any)` | { "exported-lpgs": {}, "hub-lpgs": {}, "none-lpgs": {}, "peer-lpgs": {}, "spoke-lpgs": {} } | no |
+| [mount\_targets](#input\_mount\_targets) | To provision Mount Targets | `map(any)` | `{}` | no |
+| [network\_load\_balancers](#input\_network\_load\_balancers) | n/a | `map(any)` | `{}` | no |
+| [nfs\_export\_options](#input\_nfs\_export\_options) | To provision Export Sets | `map(any)` | `{}` | no |
+| [ngws](#input\_ngws) | n/a | map(object({ compartment_id = string vcn_id = string block_traffic = optional(bool) public_ip_id = optional(string) ngw_name = optional(string) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) })) | `{}` | no |
+| [nlb\_backend\_sets](#input\_nlb\_backend\_sets) | n/a | `map(any)` | `{}` | no |
+| [nlb\_backends](#input\_nlb\_backends) | n/a | `map(any)` | `{}` | no |
+| [nlb\_listeners](#input\_nlb\_listeners) | n/a | `map(any)` | `{}` | no |
+| [nlb\_reserved\_ips](#input\_nlb\_reserved\_ips) | To provision Network Load Balancer Reserved IPs | `map(any)` | `{}` | no |
+| [notifications\_subscriptions](#input\_notifications\_subscriptions) | n/a | `map(any)` | `{}` | no |
+| [notifications\_topics](#input\_notifications\_topics) | n/a | `map(any)` | `{}` | no |
+| [nsg\_rules](#input\_nsg\_rules) | n/a | map(object({ nsg_id = string direction = string protocol = string description = optional(string) stateless = optional(string) source_type = optional(string) destination_type = optional(string) destination = optional(string) source = optional(string) options = optional(map(any)) })) | `{}` | no |
+| [nsgs](#input\_nsgs) | n/a | map(object({ compartment_id = string vcn_id = string display_name = optional(string) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) })) | `{}` | no |
+| [oss](#input\_oss) | To provision Buckets - OSS | `map(any)` | `{}` | no |
+| [oss\_log\_groups](#input\_oss\_log\_groups) | To provision Log Groups for OSS | `map(any)` | `{}` | no |
+| [oss\_logs](#input\_oss\_logs) | To provision Logs for OSS | `map(any)` | `{}` | no |
+| [oss\_policies](#input\_oss\_policies) | n/a | `map(any)` | `{}` | no |
+| [path\_route\_sets](#input\_path\_route\_sets) | To provision Load Balancer Path Route Sets | `map(any)` | `{}` | no |
+| [policies](#input\_policies) | n/a | map(object({ name = string compartment_id = string policy_description = string policy_statements = list(string) policy_version_date = optional(string) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) })) | `{}` | no |
+| [private\_ips](#input\_private\_ips) | n/a | `map(any)` | `{}` | no |
+| [private\_key\_path](#input\_private\_key\_path) | n/a | `string` | `""` | no |
+| [public\_ip\_pools](#input\_public\_ip\_pools) | n/a | `map(any)` | `{}` | no |
+| [region](#input\_region) | n/a | `string` | `""` | no |
+| [reserved\_ips](#input\_reserved\_ips) | n/a | `map(any)` | `{}` | no |
+| [route\_tables](#input\_route\_tables) | n/a | `map(any)` | `{}` | no |
+| [rule\_sets](#input\_rule\_sets) | To provision Load Balancer Rule Sets | `map(any)` | `{}` | no |
+| [seclists](#input\_seclists) | n/a | map(object({ compartment_id = string vcn_id = string display_name = optional(string) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) ingress_sec_rules = optional(list(object({ protocol = optional(string) stateless = optional(string) description = optional(string) source = optional(string) source_type = optional(string) options = optional(map(any)) }))) egress_sec_rules = optional(list(object({ protocol = optional(string) stateless = optional(string) description = optional(string) destination = optional(string) destination_type = optional(string) options = optional(map(any)) }))) })) | `{}` | no |
+| [sgws](#input\_sgws) | n/a | `map(any)` | `{}` | no |
+| [subnets](#input\_subnets) | n/a | map(object({ compartment_id = string vcn_id = string cidr_block = string display_name = optional(string) dns_label = optional(string) ipv6cidr_block = optional(string) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) prohibit_internet_ingress = optional(string) prohibit_public_ip_on_vnic = optional(string) availability_domain = optional(string) dhcp_options_id = optional(string) route_table_id = optional(string) security_list_ids = optional(list(string)) })) | `{}` | no |
+| [tag\_defaults](#input\_tag\_defaults) | To make the Tag keys as default to compartments | map(object({ compartment_id = string tag_definition_id = string value = string is_required = optional(string) })) | `{}` | no |
+| [tag\_keys](#input\_tag\_keys) | To provision Tag Keys | map(object({ tag_namespace_id = string description = string name = string defined_tags = optional(map(any)) freeform_tags = optional(map(any)) is_cost_tracking = optional(string) is_retired = optional(string) validator = optional(list(object({ validator_type = optional(string) validator_values = optional(list(any)) }))) })) | `{}` | no |
+| [tag\_namespaces](#input\_tag\_namespaces) | To provision Namespaces | map(object({ compartment_id = string description = string name = string defined_tags = optional(map(any)) freeform_tags = optional(map(any)) is_retired = optional(string) })) | `{}` | no |
+| [tenancy\_ocid](#input\_tenancy\_ocid) | n/a | `string` | `""` | no |
+| [user\_ocid](#input\_user\_ocid) | n/a | `string` | `""` | no |
+| [vaults](#input\_vaults) | n/a | `map(any)` | `{}` | no |
+| [vcn\_log\_groups](#input\_vcn\_log\_groups) | n/a | `map(any)` | `{}` | no |
+| [vcn\_logs](#input\_vcn\_logs) | n/a | `map(any)` | `{}` | no |
+| [vcns](#input\_vcns) | n/a | map(object({ compartment_id = string cidr_blocks = optional(list(string)) display_name = optional(string) dns_label = optional(string) is_ipv6enabled = optional(string) defined_tags = optional(map(any)) freeform_tags = optional(map(any)) })) | `{}` | no |
+| [vnic\_attachments](#input\_vnic\_attachments) | n/a | `map(any)` | `{}` | no |
+
+## Outputs
+
+No outputs.
+
+
\ No newline at end of file
diff --git a/examples/budget/backend.tf b/examples/budget/backend.tf
new file mode 100644
index 0000000..16bc557
--- /dev/null
+++ b/examples/budget/backend.tf
@@ -0,0 +1,21 @@
+/*This line will be removed when using remote state
+# !!! WARNING !!! Terraform State Lock is not supported with OCI Object Storage.
+# Pre-Requisite: Create a version enabled object storage bucket to store the state file.
+# End Point Format: https://.compat.objectstorage..oraclecloud.com
+# Please look at the below doc for information about shared_credentials_file and other parameters:
+# Reference: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
+
+terraform {
+ backend "s3" {
+ key = ""
+ bucket = ""
+ region = ""
+ endpoint = ""
+ shared_credentials_file = "~/.aws/credentials"
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_metadata_api_check = true
+ force_path_style = true
+ }
+}
+This line will be removed when using remote state*/
\ No newline at end of file
diff --git a/examples/budget/budget.tf b/examples/budget/budget.tf
new file mode 100644
index 0000000..5224880
--- /dev/null
+++ b/examples/budget/budget.tf
@@ -0,0 +1,62 @@
+// Copyright (c) 2024, Oracle and/or its affiliates.
+
+############################
+# Module Block - Cost Management
+# Create Budgets and Rule Alerts
+############################
+
+#locals {
+# comp_ocids = {for key, val in var.budgets : key => [
+# var.compartment_ocids[flatten([for targets in val.targets : targets])[0]]
+# ] if val.target_type == "COMPARTMENT" }
+#}
+
+
+
+module "budget-alert-rules" {
+ source = "./modules/costmanagement/budget-alert-rule"
+ for_each = var.budget_alert_rules
+
+ #Required
+ budget_id = length(regexall("ocid1.budget.oc*", each.value.budget_id)) > 0 ? each.value.budget_id : merge(module.budgets.*...)[each.value.budget_id]["budget_tf_id"]
+ threshold = each.value.threshold
+ threshold_type = each.value.threshold_type
+ type = each.value.type
+
+ #Optional
+ description = each.value.description
+ display_name = each.value.display_name
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+ message = each.value.message
+ recipients = each.value.recipients
+}
+
+module "budgets" {
+ source = "./modules/costmanagement/budget"
+ for_each = var.budgets
+
+ #Required
+ amount = each.value.amount
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]):var.tenancy_ocid
+
+ reset_period = each.value.reset_period != null ? each.value.reset_period : "MONTHLY"
+
+ #Optional
+ budget_processing_period_start_offset = each.value.budget_processing_period_start_offset
+ description = each.value.description
+ display_name = each.value.display_name
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+ processing_period_type = each.value.processing_period_type
+ budget_start_date = each.value.processing_period_type == "SINGLE_USE" ? each.value.budget_start_date : null
+ budget_end_date = each.value.processing_period_type == "SINGLE_USE" ? each.value.budget_end_date : null
+
+ #target_compartment_id = each.value.target_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.target_compartment_id)) > 0 ? each.value.target_compartment_id : var.compartment_ocids[each.value.target_compartment_id]) : null
+
+ target_type = each.value.target_type
+ #targets = each.value.targets
+
+ targets = each.value.target_type == "COMPARTMENT" ? (length(regexall("ocid1.compartment.oc*", each.value.targets[0])) > 0 ? each.value.targets : [var.compartment_ocids[each.value.targets[0]]]) : each.value.targets
+
+}
\ No newline at end of file
diff --git a/examples/budget/oci-data.tf b/examples/budget/oci-data.tf
new file mode 100644
index 0000000..1495707
--- /dev/null
+++ b/examples/budget/oci-data.tf
@@ -0,0 +1,42 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Resource Block - Identity
+# Fetch Compartments
+############################
+
+#Fetch Compartment Details
+data "oci_identity_compartments" "compartments" {
+ #Required
+ compartment_id = var.tenancy_ocid
+
+ #Optional
+ #name = var.compartment_name
+ access_level = "ANY"
+ compartment_id_in_subtree = true
+ state = "ACTIVE"
+}
+
+
+############################
+# Data Block - Network
+# Fetch ADs
+############################
+
+data "oci_identity_availability_domains" "availability_domains" {
+ #Required
+ compartment_id = var.tenancy_ocid
+}
+
+
+/*
+output "compartment_id_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ value = zipmap(data.oci_identity_compartments.compartments.compartments.*.name,data.oci_identity_compartments.compartments.compartments.*.id)
+}
+
+output "ads" {
+ value = data.oci_identity_availability_domains.availability_domains.availability_domains.*.name
+}
+*/
\ No newline at end of file
diff --git a/examples/budget/provider.tf b/examples/budget/provider.tf
new file mode 100644
index 0000000..9a69c98
--- /dev/null
+++ b/examples/budget/provider.tf
@@ -0,0 +1,24 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Provider Block
+# OCI
+############################
+
+provider "oci" {
+ tenancy_ocid = var.tenancy_ocid
+ user_ocid = var.user_ocid
+ fingerprint = var.fingerprint
+ private_key_path = var.private_key_path
+ region = var.region
+ ignore_defined_tags = ["Oracle-Tags.CreatedBy", "Oracle-Tags.CreatedOn"]
+}
+
+terraform {
+ required_providers {
+ oci = {
+ source = "oracle/oci"
+ version = "5.40.0"
+ }
+ }
+}
diff --git a/examples/budget/variables_example.tf b/examples/budget/variables_example.tf
new file mode 100644
index 0000000..fae17ea
--- /dev/null
+++ b/examples/budget/variables_example.tf
@@ -0,0 +1,2082 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+#
+# Variables Block
+# OCI
+#
+############################
+
+variable "tenancy_ocid" {
+ type = string
+ default = ""
+}
+
+variable "user_ocid" {
+ type = string
+ default = ""
+}
+
+variable "fingerprint" {
+ type = string
+ default = ""
+}
+
+variable "private_key_path" {
+ type = string
+ default = ""
+}
+
+variable "region" {
+ type = string
+ default = ""
+}
+
+#################################
+# SSH Keys
+#################################
+
+variable "instance_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_instance_ssh_keys#
+ # exported instance ssh keys
+ #instance_ssh_keys_END#
+ }
+}
+
+variable "oke_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_oke_ssh_keys#
+ #oke_ssh_keys_END#
+ }
+}
+variable "sddc_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_sddc_ssh_keys#
+ #sddc_ssh_keys_END#
+ }
+}
+
+variable "exacs_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_exacs_ssh_keys#
+ # exported exacs ssh keys
+ #exacs_ssh_keys_END#
+ }
+}
+
+variable "dbsystem_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_dbsystem_ssh_keys#
+ # exported dbsystem ssh keys
+ #dbsystem_ssh_keys_END#
+ }
+}
+
+#################################
+# Platform Image OCIDs and
+# Market Place Images
+#################################
+
+variable "instance_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ Windows = ""
+ PaloAlto = "Palo Alto Networks VM-Series Next Generation Firewall"
+ #START_instance_source_ocids#
+ # exported instance image ocids
+ #instance_source_ocids_END#
+ }
+}
+
+variable "blockvolume_source_ocids" {
+ type = map(any)
+ default = {
+ block1 = ""
+ #blockvolume_source_ocid = ""
+ #START_blockvolume_source_ocids#
+ # exported block volume source ocids
+ #blockvolume_source_ocids_END#
+ }
+}
+
+variable "fss_source_ocids" {
+ type = map(any)
+ default = {
+ snapshot1 = ""
+ #fss_source_snapshot_ocid = ""
+ #START_fss_source_snapshot_ocids#
+ # exported fss source snapshot ocids
+ #fss_source_snapshot_ocids_END#
+ }
+}
+
+variable "oke_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ #START_oke_source_ocids#
+ # exported oke image ocids
+ #oke_source_ocids_END#
+ }
+}
+
+#################################
+#
+# Variables according to Services
+# PLEASE DO NOT MODIFY
+#
+#################################
+
+##########################
+## Fetch Compartments ####
+##########################
+
+variable "compartment_ocids" {
+ type = map(any)
+ default = {
+ #START_compartment_ocids#
+ # compartment ocids
+ #compartment_ocids_END#
+ }
+}
+
+#########################
+##### Identity ##########
+#########################
+
+variable "compartments" {
+ type = object({
+ root = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level1 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level2 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level3 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level4 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level5 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ })
+ default = {
+ root = {},
+ compartment_level1 = {},
+ compartment_level2 = {},
+ compartment_level3 = {},
+ compartment_level4 = {},
+ compartment_level5 = {},
+ }
+}
+
+variable "policies" {
+ type = map(object({
+ name = string
+ compartment_id = string
+ policy_description = string
+ policy_statements = list(string)
+ policy_version_date = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "groups" {
+ type = map(object({
+ group_name = string
+ group_description = string
+ matching_rule = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "users" {
+ type = map(object({
+ name = string
+ description = string
+ email = string
+ disable_capabilities = optional(list(string))
+ group_membership = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "networkSources" {
+ type = map(object({
+ name = string
+ description = string
+ public_source_list = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ virtual_source_list = optional(list(map(list(string))))
+
+ }))
+ default = {}
+}
+
+#########################
+####### Governance #########
+#########################
+
+variable "tag_namespaces" {
+ description = "To provision Namespaces"
+ type = map(object({
+ compartment_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_retired = optional(bool)
+ }))
+ default = {}
+}
+
+variable "tag_keys" {
+ description = "To provision Tag Keys"
+ type = map(object({
+ tag_namespace_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_cost_tracking = optional(bool)
+ is_retired = optional(bool)
+ validator = optional(list(object({
+ validator_type = optional(string)
+ validator_values = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "tag_defaults" {
+ description = "To make the Tag keys as default to compartments"
+ type = map(object({
+ compartment_id = string
+ tag_definition_id = string
+ value = string
+ is_required = optional(bool)
+ }))
+ default = {}
+}
+
+variable "quota_policies" {
+ type = map(object({
+ quota_name = string
+ quota_description = string
+ quota_statements = list(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### Network ##########
+#########################
+
+variable "default_dhcps" {
+ type = map(object({
+ server_type = string
+ manage_default_resource_id = optional(string)
+ custom_dns_servers = optional(list(any))
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "custom_dhcps" {
+ type = map(object({
+ compartment_id = string
+ server_type = string
+ vcn_id = string
+ custom_dns_servers = optional(list(any))
+ domain_name_type = optional(string)
+ display_name = optional(string)
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcns" {
+ type = map(object({
+ compartment_id = string
+ cidr_blocks = optional(list(string))
+ byoipv6cidr_details = optional(list(map(any)))
+ display_name = optional(string)
+ dns_label = optional(string)
+ is_ipv6enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ipv6private_cidr_blocks = optional(list(string))
+ is_oracle_gua_allocation_enabled = optional(bool)
+ }))
+ default = {}
+}
+
+variable "igws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ enable_igw = optional(bool)
+ igw_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_table_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "sgws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ service = optional(string)
+ sgw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "ngws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ block_traffic = optional(bool)
+ public_ip_id = optional(string)
+ ngw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "lpgs" {
+ type = map(any)
+ default = {
+ hub-lpgs = {},
+ spoke-lpgs = {},
+ peer-lpgs = {},
+ none-lpgs = {},
+ exported-lpgs = {},
+ }
+}
+
+variable "drgs" {
+ type = map(object({
+ compartment_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "default_seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+
+}))
+default = {}
+}
+
+variable "default_route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+}))
+ default = {}
+}
+
+variable "nsgs" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nsg_rules" {
+ type = map(object({
+ nsg_id = string
+ direction = string
+ protocol = string
+ description = optional(string)
+ stateless = optional(string)
+ source_type = optional(string)
+ destination_type = optional(string)
+ destination = optional(string)
+ source = optional(string)
+ options = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "subnets" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ cidr_block = string
+ display_name = optional(string)
+ dns_label = optional(string)
+ ipv6cidr_block = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ prohibit_internet_ingress = optional(string)
+ prohibit_public_ip_on_vnic = optional(string)
+ availability_domain = optional(string)
+ dhcp_options_id = optional(string)
+ route_table_id = optional(string)
+ security_list_ids = optional(list(string))
+ }))
+ default = {}
+}
+
+variable "vlans" {
+ type = map(object({
+ cidr_block = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ nsg_ids = optional(list(string))
+ route_table_name = optional(string)
+ vlan_tag = optional(string)
+ availability_domain = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "drg_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_other_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_tables" {
+ type = map(object({
+ drg_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_ecmp_enabled = optional(bool)
+ import_drg_route_distribution_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_rules" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_distributions" {
+ type = map(object({
+ distribution_type = string
+ drg_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_distribution_statements" {
+ type = map(object({
+ drg_route_distribution_id = string
+ action = string
+ match_criteria = optional(list(object({
+ match_type = string
+ attachment_type = optional(string)
+ drg_attachment_id = optional(string)
+ })))
+ priority = optional(string)
+ }))
+ default = {}
+}
+
+variable "data_drg_route_tables" {
+ type = map(any)
+ default = {}
+}
+
+variable "data_drg_route_table_distributions" {
+ type = map(any)
+ default = {}
+}
+
+####################
+####### DNS #######
+####################
+
+variable "zones" {
+type = map(object({
+compartment_id = string
+display_name = string
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_type = optional(string)
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+variable "views" {
+type = map(object({
+compartment_id = string
+display_name = string
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+ default = {}
+}
+
+variable "rrsets" {
+type = map(object({
+compartment_id = optional(string)
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_id = string
+domain = string
+rtype = string
+ttl = number
+rdata = optional(list(string))
+scope = optional(string)
+}))
+default = {}
+}
+
+variable "resolvers" {
+type = map(object({
+network_compartment_id= string
+vcn_name = string
+display_name = optional(string)
+views = optional(map(object({
+ view_id = optional(string)
+ view_compartment_id = optional(string)
+})))
+resolver_rules = optional(map(object({
+ client_address_conditions = optional(list(any))
+ destination_addresses = optional(list(any))
+ qname_cover_conditions = optional(list(any))
+ source_endpoint_name = optional(string)
+})))
+endpoint_names = optional(map(object({
+ is_forwarding = optional(bool)
+ is_listening = optional(bool)
+ name = optional(string)
+ subnet_name = optional(string)
+ forwarding_address = optional(string)
+ listening_address = optional(string)
+ nsg_ids = optional(list(string))
+})))
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+
+#########################
+## Dedicated VM Hosts ##
+#########################
+
+variable "dedicated_hosts" {
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ vm_host_shape = string
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ fault_domain = optional(string)
+ freeform_tags = optional(map(any))
+ }))
+ description = "To provision new dedicated VM hosts"
+ default = {}
+}
+
+#########################
+## Instances/Block Volumes ##
+#########################
+
+variable "blockvolumes" {
+ description = "To provision block volumes"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = string
+ size_in_gbs = optional(string)
+ is_auto_tune_enabled = optional(string)
+ vpus_per_gb = optional(string)
+ kms_key_id = optional(string)
+ attach_to_instance = optional(string)
+ attachment_type = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ device = optional(string)
+ encryption_in_transit_type = optional(string)
+ attachment_display_name = optional(string)
+ is_read_only = optional(bool)
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ is_shareable = optional(bool)
+ use_chap = optional(bool)
+ is_agent_auto_iscsi_login_enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ source_details = optional(list(map(any)))
+ block_volume_replicas = optional(list(map(any)))
+ block_volume_replicas_deletion = optional(bool)
+ autotune_policies = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "block_backup_policies" {
+ type = map(any)
+ description = "To create block volume back policy"
+ default = {}
+}
+
+variable "instances" {
+ description = "Map of instances to be provisioned"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ shape = string
+ source_id = string
+ source_type = string
+ vcn_name = string
+ subnet_id = string
+ network_compartment_id = string
+ display_name = optional(string)
+ assign_public_ip = optional(bool)
+ boot_volume_size_in_gbs = optional(string)
+ fault_domain = optional(string)
+ dedicated_vm_host_id = optional(string)
+ private_ip = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(string))
+ ocpus = optional(string)
+ memory_in_gbs = optional(number)
+ capacity_reservation_id = optional(string)
+ create_is_pv_encryption_in_transit_enabled = optional(bool)
+ remote_execute = optional(string)
+ bastion_ip = optional(string)
+ cloud_init_script = optional(string)
+ ssh_authorized_keys = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ network_type = optional(string)
+ #extended_metadata = optional(string)
+ skip_source_dest_check = optional(bool)
+ baseline_ocpu_utilization = optional(string)
+ #preemptible_instance_config = optional(string)
+ all_plugins_disabled = optional(bool)
+ is_management_disabled = optional(bool)
+ is_monitoring_disabled = optional(bool)
+ assign_private_dns_record = optional(string)
+ plugins_details = optional(map(any))
+ is_live_migration_preferred = optional(bool)
+ recovery_action = optional(string)
+ are_legacy_imds_endpoints_disabled = optional(bool)
+ boot_volume_type = optional(string)
+ firmware = optional(string)
+ is_consistent_volume_naming_enabled = optional(bool)
+ remote_data_volume_type = optional(string)
+ platform_config = optional(list(map(any)))
+ launch_options = optional(list(map(any)))
+ ipxe_script = optional(string)
+ preserve_boot_volume = optional(bool)
+ vlan_id = optional(string)
+ kms_key_id = optional(string)
+ vnic_display_name = optional(string)
+ vnic_defined_tags = optional(map(any))
+ vnic_freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "boot_backup_policies" {
+ type = map(any)
+ description = "Map of boot volume backup policies to be provisioned"
+ default = {}
+}
+
+#########################
+####### Database ########
+#########################
+
+variable "exa_infra" {
+ description = "To provision exadata infrastructure"
+ type = map(any)
+ default = {}
+}
+
+variable "exa_vmclusters" {
+ description = "To provision exadata cloud VM cluster"
+ type = map(any)
+ default = {}
+}
+
+variable "dbsystems_vm_bm" {
+ description = "To provision DB System"
+ type = map(any)
+ default = {}
+}
+
+variable "db_home" {
+ type = map(any)
+ description = "Map of database db home to be provisioned"
+ default = {}
+}
+
+variable "databases" {
+ description = "Map of databases to be provisioned in an existing db_home"
+ type = map(any)
+ default = {}
+}
+
+####################################
+####### Autonomous Database ########
+####################################
+
+variable "adb" {
+ type = map(object({
+ admin_password = optional(string)
+ character_set = optional(string)
+ compartment_id = string
+ cpu_core_count = optional(number)
+ database_edition = optional(string)
+ data_storage_size_in_tbs = optional(number)
+ customer_contacts = optional(list(string))
+ db_name = string
+ db_version = optional(string)
+ db_workload = optional(string)
+ display_name = optional(string)
+ license_model = optional(string)
+ ncharacter_set = optional(string)
+ network_compartment_id = optional(string)
+ nsg_ids = optional(list(string))
+ subnet_id = optional(string)
+ vcn_name = optional(string)
+ whitelisted_ips = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+######### FSS ###########
+#########################
+
+variable "mount_targets" {
+ description = "To provision Mount Targets"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ display_name = optional(string)
+ ip_address = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fss" {
+ description = "To provision File System Services"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = optional(string)
+ source_snapshot = optional(string)
+ snapshot_policy = optional(string)
+ policy_compartment_id = optional(string)
+ kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_export_options" {
+ description = "To provision Export Sets"
+ type = map(object({
+ export_set_id = string
+ file_system_id = string
+ path = string
+ export_options = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_idmap_groups_for_sys_auth = optional(bool)
+ }))
+ default = {}
+}
+
+variable "fss_replication" {
+ description = "To provision File System Replication"
+ type = map(object({
+ compartment_id = string
+ source_id = string
+ target_id = string
+ display_name = optional(string)
+ replication_interval = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+####### FSS Logs ########
+#########################
+
+variable "nfs_log_groups" {
+ description = "To provision Log Groups for Mount Target"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_logs" {
+ description = "To provision Logs for Mount Target"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+#########################
+#### Load Balancers #####
+#########################
+
+variable "load_balancers" {
+ description = "To provision Load Balancers"
+ type = map(object({
+ compartment_id = string
+ vcn_name = string
+ shape = string
+ subnet_ids = list(any)
+ network_compartment_id = string
+ display_name = string
+ shape_details = optional(list(map(any)))
+ nsg_ids = optional(list(any))
+ is_private = optional(bool)
+ ip_mode = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ reserved_ips_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "hostnames" {
+ description = "To provision Load Balancer Hostnames"
+ type = map(object({
+ load_balancer_id = string
+ hostname = string
+ name = string
+ }))
+ default = {}
+}
+
+variable "certificates" {
+ description = "To provision Load Balancer Certificates"
+ type = map(object({
+ certificate_name = string
+ load_balancer_id = string
+ ca_certificate = optional(string)
+ passphrase = optional(string)
+ private_key = optional(string)
+ public_certificate = optional(string)
+ }))
+ default = {}
+}
+
+variable "cipher_suites" {
+ description = "To provision Load Balancer Cipher Suites"
+ type = map(object({
+ ciphers = list(string)
+ name = string
+ load_balancer_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "backend_sets" {
+ description = "To provision Load Balancer Backend Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ policy = string
+ protocol = optional(string)
+ interval_ms = optional(string)
+ is_force_plain_text = optional(string)
+ port = optional(string)
+ response_body_regex = optional(string)
+ retries = optional(string)
+ return_code = optional(string)
+ timeout_in_millis = optional(string)
+ url_path = optional(string)
+ lb_cookie_session = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ path = optional(string)
+ domain = optional(string)
+ is_http_only = optional(string)
+ is_secure = optional(string)
+ max_age_in_seconds = optional(string)
+ })))
+ session_persistence_configuration = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ })))
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "backends" {
+ description = "To provision Load Balancer Backends"
+ type = map(object({
+ backendset_name = string
+ ip_address = string
+ load_balancer_id = string
+ port = string
+ instance_compartment = optional(string)
+ backup = optional(string)
+ drain = optional(string)
+ offline = optional(string)
+ weight = optional(string)
+ }))
+ default = {}
+}
+
+variable "listeners" {
+ description = "To provision Load Balancer Listeners"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ port = string
+ protocol = string
+ default_backend_set_name = string
+ connection_configuration = optional(list(map(any)))
+ hostname_names = optional(list(any))
+ path_route_set_name = optional(string)
+ rule_set_names = optional(list(any))
+ routing_policy_name = optional(string)
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "path_route_sets" {
+ description = "To provision Load Balancer Path Route Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ path_routes = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "rule_sets" {
+ description = "To provision Load Balancer Rule Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ access_control_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ description = optional(string)
+ })))
+ access_control_method_rules = optional(list(object({
+ action = string
+ allowed_methods = optional(list(any))
+ status_code = optional(string)
+ })))
+ http_header_rules = optional(list(object({
+ action = string
+ are_invalid_characters_allowed = optional(bool)
+ http_large_header_size_in_kb = optional(string)
+ })))
+ uri_redirect_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ operator = optional(string)
+ host = optional(string)
+ path = optional(string)
+ port = optional(string)
+ protocol = optional(string)
+ query = optional(string)
+ response_code = optional(string)
+ })))
+ request_response_header_rules = optional(list(object({
+ action = string
+ header = optional(string)
+ prefix = optional(string)
+ suffix = optional(string)
+ value = optional(string)
+ })))
+ }))
+ default = {}
+}
+
+variable "lbr_reserved_ips" {
+ description = "To provision Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ lifetime = string
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+###################################
+####### Load Balancer Logs ########
+###################################
+
+variable "loadbalancer_log_groups" {
+ description = "To provision Log Groups for Load Balancers"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "loadbalancer_logs" {
+ description = "To provision Logs for Load Balancers"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+## Network Load Balancers ##
+#########################
+
+variable "network_load_balancers" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ is_private = optional(bool)
+ reserved_ips_id = string
+ is_preserve_source_destination = optional(bool)
+ is_symmetric_hash_enabled = optional(bool)
+ nlb_ip_version = optional(string)
+ assigned_private_ipv4 = optional(string)
+ nsg_ids = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "nlb_listeners" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ default_backend_set_name = string
+ port = number
+ protocol = string
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+
+variable "nlb_backend_sets" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ policy = string
+ protocol = string
+ domain_name = optional(string)
+ query_class = optional(string)
+ query_type = optional(string)
+ rcodes = optional(list(string))
+ transport_protocol = optional(string)
+ return_code = optional(number)
+ interval_in_millis = optional(number)
+ port = optional(number)
+ request_data = optional(string)
+ response_body_regex = optional(string)
+ response_data = optional(string)
+ retries = optional(number)
+ timeout_in_millis = optional(number)
+ url_path = optional(string)
+ is_preserve_source = optional(bool)
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_backends" {
+ type = map(object({
+ name = optional(string)
+ backend_set_name = string
+ network_load_balancer_id = string
+ port = number
+ ip_address = string
+ instance_compartment = string
+ is_drain = optional(bool)
+ is_backup = optional(bool)
+ is_offline = optional(bool)
+ weight = optional(number)
+ target_id = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_reserved_ips" {
+ description = "To provision Network Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ lifetime = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ }))
+ default = {}
+}
+
+
+#########################
+##### IP Management #####
+#########################
+
+variable "public_ip_pools" {
+ type = map(any)
+ default = {}
+}
+
+variable "private_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "reserved_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "vnic_attachments" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+##### VCN Logs ##########
+#########################
+
+variable "vcn_log_groups" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcn_logs" {
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### OSS Buckets ######
+#########################
+
+variable "buckets" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+####### OSS Logs ########
+#########################
+
+variable "oss_log_groups" {
+ description = "To provision Log Groups for OSS"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "oss_logs" {
+ description = "To provision Logs for OSS"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+### OSS IAM Policies ####
+#########################
+
+variable "oss_policies" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+## Management Services ##
+#########################
+
+variable "alarms" {
+ type = map(object({
+ compartment_id = string
+ destinations = list(string)
+ alarm_name = string
+ is_enabled = bool
+ metric_compartment_id = string
+ namespace = string
+ query = string
+ severity = string
+ body = optional(string)
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_notifications_per_metric_dimension_enabled = optional(bool)
+ metric_compartment_id_in_subtree = optional(string)
+ trigger_delay_minutes = optional(string)
+ repeat_notification_duration = optional(string)
+ resolution = optional(string)
+ resource_group = optional(string)
+ suppression = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "events" {
+ type = map(object({
+ event_name = string
+ compartment_id = string
+ description = string
+ is_enabled = bool
+ condition = string
+ actions = optional(list(object({
+ action_type = string
+ is_enabled = string
+ description = optional(string)
+ function_id = optional(string)
+ stream_id = optional(string)
+ topic_id = optional(string)
+ })))
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_topics" {
+ type = map(object({
+ compartment_id = string
+ topic_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_subscriptions" {
+ type = map(object({
+ compartment_id = string
+ endpoint = string
+ protocol = string
+ topic_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "service_connectors" {
+ type = any
+ default = {}
+ description = "To provision service connector hub resources"
+}
+
+#########################
+## Developer Services ##
+#########################
+
+## OKE
+
+variable "clusters" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ kubernetes_version = string
+ cni_type = string
+ cluster_type = string
+ is_policy_enabled = optional(bool)
+ policy_kms_key_id = optional(string)
+ is_kubernetes_dashboard_enabled = optional(bool)
+ is_tiller_enabled = optional(bool)
+ is_public_ip_enabled = optional(bool)
+ nsg_ids = optional(list(string))
+ endpoint_subnet_id = string
+ is_pod_security_policy_enabled = optional(bool)
+ pods_cidr = optional(string)
+ services_cidr = optional(string)
+ service_lb_subnet_ids = optional(list(string))
+ cluster_kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ lb_defined_tags = optional(map(any))
+ lb_freeform_tags = optional(map(any))
+ volume_defined_tags = optional(map(any))
+ volume_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_node_labels = optional(map(any))
+ kubernetes_version = string
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ availability_domain = number
+ fault_domains = optional(list(string))
+ subnet_id = string
+ size = number
+ cni_type = string
+ max_pods_per_node = optional(number)
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_ids = optional(string)
+ worker_nsg_ids = optional(list(string))
+ memory_in_gbs = optional(number)
+ ocpus = optional(number)
+ image_id = string
+ source_type = string
+ boot_volume_size_in_gbs = optional(number)
+ ssh_public_key = optional(string)
+ nodepool_kms_key_id = optional(string)
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "virtual-nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_virtual_node_labels = optional(map(any))
+ availability_domain = number
+ fault_domains = list(string)
+ subnet_id = string
+ size = number
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_id = string
+ worker_nsg_ids = optional(list(string))
+ taints = optional(list(any))
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+##################################
+############## SDDCs #############
+##################################
+variable "sddcs" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = string
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = string
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ initial_cluster_display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ management_datastore = optional(list(string))
+ workload_datastore = optional(list(string))
+
+ }))
+ default = {}
+
+}
+
+variable "sddc-clusters" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = optional(string)
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = optional(string)
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ workload_datastore = optional(list(string))
+ sddc_id = optional(string)
+ esxi_software_version = optional(string)
+
+ }))
+ default = {}
+
+}
+
+
+############################
+## Key Management Service ##
+############################
+
+variable "vaults" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_type = string
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ replica_region = optional(string)
+ }))
+ default = {}
+}
+
+variable "keys" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_name = string
+ algorithm = optional(string)
+ length = optional(string)
+ curve_id = optional(string)
+ protection_mode = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ is_auto_rotation_enabled = optional(bool)
+ rotation_interval_in_days = optional(string)
+
+ }))
+ default = {}
+}
+
+###########################
+######### Budgets #########
+###########################
+
+variable "budgets" {
+ type = map(object({
+ amount = string
+ compartment_id = string
+ reset_period = string
+ budget_processing_period_start_offset = optional(string)
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ processing_period_type = optional(string)
+ budget_end_date = optional(string)
+ budget_start_date = optional(string)
+ target_type = optional(string)
+ targets = optional(list(any))
+ }))
+ default = {}
+}
+
+variable "budget_alert_rules" {
+ type = map(object({
+ budget_id = string
+ threshold = string
+ threshold_type = string
+ type = string
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ message = optional(string)
+ recipients = optional(string)
+ }))
+ default = {}
+}
+
+###########################
+####### Cloud Guard #######
+###########################
+
+variable "cloud_guard_configs" {
+ type = map(object({
+ compartment_id = string
+ reporting_region = string
+ status = string
+ self_manage_resources = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "cloud_guard_targets" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ target_resource_id = string
+ target_resource_type = string
+ prefix = string
+ description = optional(string)
+ state = optional(string)
+ target_detector_recipes = optional(list(any))
+ target_responder_recipes = optional(list(any))
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+####################################
+####### Custom Backup Policy #######
+####################################
+
+variable "custom_backup_policies" {
+ type = map(any)
+ default = {}
+}
+
+variable "capacity_reservation_ocids" {
+ type = map(any)
+ default = {
+ "AD1" : "",
+ "AD2" : "",
+ "AD3" : ""
+ }
+}
+
+#####################################
+####### Firewall as a Service #######
+#####################################
+variable "firewalls" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ network_firewall_policy_id = string
+ subnet_id = string
+ vcn_name = string
+ display_name = string
+ ipv4address = optional(string)
+ nsg_id = optional(list(string))
+ ipv6address = optional(string)
+ availability_domain = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw-policies" {
+ type = map(object({
+ compartment_id = optional(string)
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "services" {
+ type = map(object({
+ service_name = string
+ service_type = string
+ network_firewall_policy_id = string
+ port_ranges = list(object({
+ minimum_port = string
+ maximum_port = optional(string)
+ }))
+ }))
+ default = {}
+}
+variable "url_lists" {
+ type = map(object({
+ urllist_name = string
+ network_firewall_policy_id = string
+ urls = list(object({
+ pattern = string
+ type = string
+ }))
+ }))
+ default = {}
+}
+variable "service_lists" {
+ type = map(object({
+ service_list_name = string
+ network_firewall_policy_id = string
+ services = list(string)
+ }))
+ default = {}
+}
+
+variable "address_lists" {
+ type = map(object({
+ address_list_name = string
+ network_firewall_policy_id = string
+ address_type = string
+ addresses = list(string)
+ }))
+ default = {}
+}
+
+variable "applications" {
+ type = map(object({
+ app_list_name = string
+ network_firewall_policy_id = string
+ app_type = string
+ icmp_type = number
+ icmp_code = optional(number)
+ }))
+ default = {}
+}
+
+variable "application_groups" {
+ type = map(object({
+ app_group_name = string
+ network_firewall_policy_id = string
+ apps = list(string)
+
+ }))
+ default = {}
+}
+
+variable "security_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+ application = optional(list(string))
+ destination_address = optional(list(string))
+ service = optional(list(string))
+ source_address = optional(list(string))
+ url = optional(list(string))
+ })))
+ inspection = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "secrets" {
+ type = map(object({
+ secret_name = string
+ network_firewall_policy_id = string
+ secret_source = string
+ secret_type = string
+ vault_secret_id = string
+ version_number = number
+ vault_name = string
+ vault_compartment_id = string
+ }))
+ default = {}
+}
+
+variable "decryption_profiles" {
+ type = map(object({
+ profile_name = string
+ profile_type = string
+ network_firewall_policy_id = string
+ are_certificate_extensions_restricted = optional(bool)
+ is_auto_include_alt_name = optional(bool)
+ is_expired_certificate_blocked = optional(bool)
+ is_out_of_capacity_blocked = optional(bool)
+ is_revocation_status_timeout_blocked = optional(bool)
+ is_unknown_revocation_status_blocked = optional(bool)
+ is_unsupported_cipher_blocked = optional(bool)
+ is_unsupported_version_blocked = optional(bool)
+ is_untrusted_issuer_blocked = optional(bool)
+ }))
+ default = {}
+}
+
+variable "decryption_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+
+ destination_address = optional(list(string))
+
+ source_address = optional(list(string))
+
+ })))
+ decryption_profile = optional(string)
+ secret = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+#########################
+####### Firewall Logs ########
+#########################
+
+variable "fw_log_groups" {
+ description = "To provision Log Groups for Network Firewall"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw_logs" {
+ description = "To provision Logs for Network Firewall"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+##########################
+# Add new variables here #
+##########################
+######################### END #########################
diff --git a/examples/compute/backend.tf b/examples/compute/backend.tf
new file mode 100644
index 0000000..16bc557
--- /dev/null
+++ b/examples/compute/backend.tf
@@ -0,0 +1,21 @@
+/*This line will be removed when using remote state
+# !!! WARNING !!! Terraform State Lock is not supported with OCI Object Storage.
+# Pre-Requisite: Create a version enabled object storage bucket to store the state file.
+# End Point Format: https://.compat.objectstorage..oraclecloud.com
+# Please look at the below doc for information about shared_credentials_file and other parameters:
+# Reference: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
+
+terraform {
+ backend "s3" {
+ key = ""
+ bucket = ""
+ region = ""
+ endpoint = ""
+ shared_credentials_file = "~/.aws/credentials"
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_metadata_api_check = true
+ force_path_style = true
+ }
+}
+This line will be removed when using remote state*/
\ No newline at end of file
diff --git a/examples/compute/block-volume.tf b/examples/compute/block-volume.tf
new file mode 100644
index 0000000..f593e6b
--- /dev/null
+++ b/examples/compute/block-volume.tf
@@ -0,0 +1,49 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Module Block - BlockVolume
+# Create BlockVolume and Block Volume Backup Policy
+############################
+/*
+data "oci_core_instances" "instance" {
+ depends_on = [module.instances]
+ for_each = var.blockvolumes != null ? var.blockvolumes : {}
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ display_name = one(each.value.attach_to_instance)
+ state = "RUNNING"
+}
+*/
+
+module "block-volumes" {
+ source = "./modules/storage/block-volume"
+ for_each = var.blockvolumes != null ? var.blockvolumes : {}
+ attachment_type = each.value.attachment_type
+ attach_to_instance = each.value.attach_to_instance != null ? length(regexall("ocid1.instance.oc*", each.value.attach_to_instance)) > 0 ? each.value.attach_to_instance : merge(module.instances.*...)[each.value.attach_to_instance]["instance_tf_id"] : null
+ #attach_to_instance = length(each.value.attach_to_instance) > 0 ? [data.oci_core_instances.instance[each.value.display_name].instances[0].id] : []
+ availability_domain = each.value.availability_domain != "" && each.value.availability_domain != null ? data.oci_identity_availability_domains.availability_domains.availability_domains[each.value.availability_domain].name : null
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ vpus_per_gb = each.value.vpus_per_gb != null ? each.value.vpus_per_gb : null
+ device = each.value.device
+ defined_tags = each.value.defined_tags
+ display_name = each.value.display_name
+ freeform_tags = each.value.freeform_tags
+ is_auto_tune_enabled = each.value.is_auto_tune_enabled
+ kms_key_id = each.value.kms_key_id
+ size_in_gbs = each.value.size_in_gbs != null ? each.value.size_in_gbs : null
+ block_tf_policy = each.value.backup_policy != null ? each.value.backup_policy : null
+ policy_tf_compartment_id = each.value.policy_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.policy_compartment_id)) > 0 ? each.value.policy_compartment_id : var.compartment_ocids[each.value.policy_compartment_id]) : null
+ autotune_policies = each.value.autotune_policies
+ source_details = each.value.source_details
+ block_volume_replicas = each.value.block_volume_replicas
+ block_volume_replicas_deletion = each.value.block_volume_replicas_deletion
+
+ #Volume Attachment Optional Params
+ # attachment_display_name = each.value.attachment_display_name
+ # encryption_in_transit_type = each.value.encryption_in_transit_type # Applicable when attachment_type=iscsi
+ is_pv_encryption_in_transit_enabled = each.value.is_pv_encryption_in_transit_enabled # Applicable when attachment_type=paravirtualized
+ is_read_only = each.value.is_read_only
+ is_shareable = each.value.is_shareable
+ use_chap = each.value.use_chap
+ is_agent_auto_iscsi_login_enabled = each.value.is_agent_auto_iscsi_login_enabled # Applicable when attachment_type=iscsi
+ blockvolume_source_ocids = var.blockvolume_source_ocids
+}
diff --git a/examples/compute/dedicated-vm-host.tf b/examples/compute/dedicated-vm-host.tf
new file mode 100755
index 0000000..74eb287
--- /dev/null
+++ b/examples/compute/dedicated-vm-host.tf
@@ -0,0 +1,20 @@
+#// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+#
+###################################
+## Module Block - Dedicated VM Host
+## Create Dedicated VM Hosts
+###################################
+
+module "dedicated-hosts" {
+ source = "./modules/compute/dedicated-vm-host"
+ for_each = var.dedicated_hosts != null ? var.dedicated_hosts : {}
+
+ availability_domain = each.value.availability_domain != null ? data.oci_identity_availability_domains.availability_domains.availability_domains[each.value.availability_domain].name : null
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+ vm_host_shape = each.value.vm_host_shape
+ display_name = each.value.display_name
+ fault_domain = each.value.fault_domain
+
+}
\ No newline at end of file
diff --git a/examples/compute/instance.tf b/examples/compute/instance.tf
new file mode 100755
index 0000000..10b191e
--- /dev/null
+++ b/examples/compute/instance.tf
@@ -0,0 +1,81 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+#############################
+## Module Block - Instances
+## Create Instance
+#############################
+
+data "oci_core_subnets" "oci_subnets" {
+ # depends_on = [module.subnets] # Uncomment to create Network and Instances together
+ for_each = var.instances != null ? var.instances : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.subnet_id
+ vcn_id = data.oci_core_vcns.oci_vcns[each.key].virtual_networks.*.id[0]
+}
+
+data "oci_core_vcns" "oci_vcns" {
+ # depends_on = [module.vcns] # Uncomment to create Network and Instances together
+ for_each = var.instances != null ? var.instances : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.vcn_name
+}
+
+module "instances" {
+ source = "./modules/compute/instance"
+ # depends_on = [module.nsgs] # Uncomment to create NSG and Instances together
+ for_each = var.instances != null ? var.instances : {}
+ availability_domain = each.value.availability_domain != "" && each.value.availability_domain != null ? data.oci_identity_availability_domains.availability_domains.availability_domains[each.value.availability_domain].name : ""
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ network_compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : null
+ vcn_names = [each.value.vcn_name]
+ dedicated_vm_host_name = each.value.dedicated_vm_host_id != null ? each.value.dedicated_vm_host_id : null
+ shape = each.value.shape
+ ocpu_count = each.value.ocpus
+ private_ip = each.value.private_ip != null ? each.value.private_ip : null
+ defined_tags = each.value.defined_tags
+ display_name = each.value.display_name
+ fault_domain = each.value.fault_domain
+ freeform_tags = each.value.freeform_tags
+ source_type = each.value.source_type
+ source_image_id = length(regexall("ocid1.image.oc*", each.value.source_id)) > 0 || length(regexall("ocid1.bootvolume.oc*", each.value.source_id)) > 0 ? each.value.source_id : lookup(var.instance_source_ocids, each.value.source_id, null)
+ subnet_id = each.value.subnet_id != "" ? (length(regexall("ocid1.subnet.oc*", each.value.subnet_id)) > 0 ? each.value.subnet_id : data.oci_core_subnets.oci_subnets[each.key].subnets.*.id[0]) : null
+ assign_public_ip = each.value.assign_public_ip
+ ssh_public_keys = each.value.ssh_authorized_keys != null ? (length(regexall("ssh-rsa*", each.value.ssh_authorized_keys)) > 0 ? each.value.ssh_authorized_keys : lookup(var.instance_ssh_keys, each.value.ssh_authorized_keys, null)) : null
+ hostname_label = each.value.hostname_label
+ nsg_ids = each.value.nsg_ids
+ #nsg_ids = each.value.nsg_ids != [] ? [for nsg in each.value.nsg_ids : length(regexall("ocid1.networksecuritygroup.oc*",nsg)) > 0 ? nsg : merge(module.nsgs.*...)[nsg]["nsg_tf_id"]] : []
+ boot_volume_size_in_gbs = each.value.boot_volume_size_in_gbs != null ? each.value.boot_volume_size_in_gbs : null
+ memory_in_gbs = each.value.memory_in_gbs != null ? each.value.memory_in_gbs : null
+ capacity_reservation_id = each.value.capacity_reservation_id != null ? lookup(var.capacity_reservation_ocids, each.value.capacity_reservation_id, null) : null
+ create_is_pv_encryption_in_transit_enabled = each.value.create_is_pv_encryption_in_transit_enabled
+
+ boot_tf_policy = each.value.backup_policy != null ? each.value.backup_policy : null
+ policy_tf_compartment_id = each.value.policy_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.policy_compartment_id)) > 0 ? each.value.policy_compartment_id : var.compartment_ocids[each.value.policy_compartment_id]) : null
+ remote_execute = each.value.remote_execute != null ? each.value.remote_execute : null
+ bastion_ip = each.value.bastion_ip != null ? each.value.bastion_ip : null
+ cloud_init_script = each.value.cloud_init_script != null ? each.value.cloud_init_script : null
+ launch_options = each.value.launch_options
+ plugins_details = each.value.plugins_details
+ platform_config = each.value.platform_config != null ? each.value.platform_config : null
+ is_live_migration_preferred = each.value.is_live_migration_preferred
+
+ # extended_metadata = each.value.extended_metadata
+ skip_source_dest_check = each.value.skip_source_dest_check != null ? each.value.skip_source_dest_check : null
+ baseline_ocpu_utilization = each.value.baseline_ocpu_utilization
+ # preemptible_instance_config = each.value.preemptible_instance_config
+ all_plugins_disabled = each.value.all_plugins_disabled
+ is_management_disabled = each.value.is_management_disabled
+ is_monitoring_disabled = each.value.is_monitoring_disabled
+ recovery_action = each.value.recovery_action
+ are_legacy_imds_endpoints_disabled = each.value.are_legacy_imds_endpoints_disabled
+ ipxe_script = each.value.ipxe_script
+ preserve_boot_volume = each.value.preserve_boot_volume
+ assign_private_dns_record = each.value.assign_private_dns_record
+ vlan_id = each.value.vlan_id
+ kms_key_id = each.value.kms_key_id
+
+ # VNIC Details
+ vnic_defined_tags = each.value.vnic_defined_tags
+ vnic_freeform_tags = each.value.vnic_freeform_tags
+ vnic_display_name = each.value.vnic_display_name
+}
diff --git a/examples/compute/oci-data.tf b/examples/compute/oci-data.tf
new file mode 100644
index 0000000..1495707
--- /dev/null
+++ b/examples/compute/oci-data.tf
@@ -0,0 +1,42 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Resource Block - Identity
+# Fetch Compartments
+############################
+
+#Fetch Compartment Details
+data "oci_identity_compartments" "compartments" {
+ #Required
+ compartment_id = var.tenancy_ocid
+
+ #Optional
+ #name = var.compartment_name
+ access_level = "ANY"
+ compartment_id_in_subtree = true
+ state = "ACTIVE"
+}
+
+
+############################
+# Data Block - Network
+# Fetch ADs
+############################
+
+data "oci_identity_availability_domains" "availability_domains" {
+ #Required
+ compartment_id = var.tenancy_ocid
+}
+
+
+/*
+output "compartment_id_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ value = zipmap(data.oci_identity_compartments.compartments.compartments.*.name,data.oci_identity_compartments.compartments.compartments.*.id)
+}
+
+output "ads" {
+ value = data.oci_identity_availability_domains.availability_domains.availability_domains.*.name
+}
+*/
\ No newline at end of file
diff --git a/examples/compute/provider.tf b/examples/compute/provider.tf
new file mode 100644
index 0000000..9a69c98
--- /dev/null
+++ b/examples/compute/provider.tf
@@ -0,0 +1,24 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Provider Block
+# OCI
+############################
+
+provider "oci" {
+ tenancy_ocid = var.tenancy_ocid
+ user_ocid = var.user_ocid
+ fingerprint = var.fingerprint
+ private_key_path = var.private_key_path
+ region = var.region
+ ignore_defined_tags = ["Oracle-Tags.CreatedBy", "Oracle-Tags.CreatedOn"]
+}
+
+terraform {
+ required_providers {
+ oci = {
+ source = "oracle/oci"
+ version = "5.40.0"
+ }
+ }
+}
diff --git a/examples/compute/variables_example.tf b/examples/compute/variables_example.tf
new file mode 100644
index 0000000..fae17ea
--- /dev/null
+++ b/examples/compute/variables_example.tf
@@ -0,0 +1,2082 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+#
+# Variables Block
+# OCI
+#
+############################
+
+variable "tenancy_ocid" {
+ type = string
+ default = ""
+}
+
+variable "user_ocid" {
+ type = string
+ default = ""
+}
+
+variable "fingerprint" {
+ type = string
+ default = ""
+}
+
+variable "private_key_path" {
+ type = string
+ default = ""
+}
+
+variable "region" {
+ type = string
+ default = ""
+}
+
+#################################
+# SSH Keys
+#################################
+
+variable "instance_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_instance_ssh_keys#
+ # exported instance ssh keys
+ #instance_ssh_keys_END#
+ }
+}
+
+variable "oke_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_oke_ssh_keys#
+ #oke_ssh_keys_END#
+ }
+}
+variable "sddc_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_sddc_ssh_keys#
+ #sddc_ssh_keys_END#
+ }
+}
+
+variable "exacs_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_exacs_ssh_keys#
+ # exported exacs ssh keys
+ #exacs_ssh_keys_END#
+ }
+}
+
+variable "dbsystem_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_dbsystem_ssh_keys#
+ # exported dbsystem ssh keys
+ #dbsystem_ssh_keys_END#
+ }
+}
+
+#################################
+# Platform Image OCIDs and
+# Market Place Images
+#################################
+
+variable "instance_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ Windows = ""
+ PaloAlto = "Palo Alto Networks VM-Series Next Generation Firewall"
+ #START_instance_source_ocids#
+ # exported instance image ocids
+ #instance_source_ocids_END#
+ }
+}
+
+variable "blockvolume_source_ocids" {
+ type = map(any)
+ default = {
+ block1 = ""
+ #blockvolume_source_ocid = ""
+ #START_blockvolume_source_ocids#
+ # exported block volume source ocids
+ #blockvolume_source_ocids_END#
+ }
+}
+
+variable "fss_source_ocids" {
+ type = map(any)
+ default = {
+ snapshot1 = ""
+ #fss_source_snapshot_ocid = ""
+ #START_fss_source_snapshot_ocids#
+ # exported fss source snapshot ocids
+ #fss_source_snapshot_ocids_END#
+ }
+}
+
+variable "oke_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ #START_oke_source_ocids#
+ # exported oke image ocids
+ #oke_source_ocids_END#
+ }
+}
+
+#################################
+#
+# Variables according to Services
+# PLEASE DO NOT MODIFY
+#
+#################################
+
+##########################
+## Fetch Compartments ####
+##########################
+
+variable "compartment_ocids" {
+ type = map(any)
+ default = {
+ #START_compartment_ocids#
+ # compartment ocids
+ #compartment_ocids_END#
+ }
+}
+
+#########################
+##### Identity ##########
+#########################
+
+variable "compartments" {
+ type = object({
+ root = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level1 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level2 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level3 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level4 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level5 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ })
+ default = {
+ root = {},
+ compartment_level1 = {},
+ compartment_level2 = {},
+ compartment_level3 = {},
+ compartment_level4 = {},
+ compartment_level5 = {},
+ }
+}
+
+variable "policies" {
+ type = map(object({
+ name = string
+ compartment_id = string
+ policy_description = string
+ policy_statements = list(string)
+ policy_version_date = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "groups" {
+ type = map(object({
+ group_name = string
+ group_description = string
+ matching_rule = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "users" {
+ type = map(object({
+ name = string
+ description = string
+ email = string
+ disable_capabilities = optional(list(string))
+ group_membership = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "networkSources" {
+ type = map(object({
+ name = string
+ description = string
+ public_source_list = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ virtual_source_list = optional(list(map(list(string))))
+
+ }))
+ default = {}
+}
+
+#########################
+####### Governance #########
+#########################
+
+variable "tag_namespaces" {
+ description = "To provision Namespaces"
+ type = map(object({
+ compartment_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_retired = optional(bool)
+ }))
+ default = {}
+}
+
+variable "tag_keys" {
+ description = "To provision Tag Keys"
+ type = map(object({
+ tag_namespace_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_cost_tracking = optional(bool)
+ is_retired = optional(bool)
+ validator = optional(list(object({
+ validator_type = optional(string)
+ validator_values = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "tag_defaults" {
+ description = "To make the Tag keys as default to compartments"
+ type = map(object({
+ compartment_id = string
+ tag_definition_id = string
+ value = string
+ is_required = optional(bool)
+ }))
+ default = {}
+}
+
+variable "quota_policies" {
+ type = map(object({
+ quota_name = string
+ quota_description = string
+ quota_statements = list(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### Network ##########
+#########################
+
+variable "default_dhcps" {
+ type = map(object({
+ server_type = string
+ manage_default_resource_id = optional(string)
+ custom_dns_servers = optional(list(any))
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "custom_dhcps" {
+ type = map(object({
+ compartment_id = string
+ server_type = string
+ vcn_id = string
+ custom_dns_servers = optional(list(any))
+ domain_name_type = optional(string)
+ display_name = optional(string)
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcns" {
+ type = map(object({
+ compartment_id = string
+ cidr_blocks = optional(list(string))
+ byoipv6cidr_details = optional(list(map(any)))
+ display_name = optional(string)
+ dns_label = optional(string)
+ is_ipv6enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ipv6private_cidr_blocks = optional(list(string))
+ is_oracle_gua_allocation_enabled = optional(bool)
+ }))
+ default = {}
+}
+
+variable "igws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ enable_igw = optional(bool)
+ igw_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_table_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "sgws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ service = optional(string)
+ sgw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "ngws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ block_traffic = optional(bool)
+ public_ip_id = optional(string)
+ ngw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "lpgs" {
+ type = map(any)
+ default = {
+ hub-lpgs = {},
+ spoke-lpgs = {},
+ peer-lpgs = {},
+ none-lpgs = {},
+ exported-lpgs = {},
+ }
+}
+
+variable "drgs" {
+ type = map(object({
+ compartment_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "default_seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+
+}))
+default = {}
+}
+
+variable "default_route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+}))
+ default = {}
+}
+
+variable "nsgs" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nsg_rules" {
+ type = map(object({
+ nsg_id = string
+ direction = string
+ protocol = string
+ description = optional(string)
+ stateless = optional(string)
+ source_type = optional(string)
+ destination_type = optional(string)
+ destination = optional(string)
+ source = optional(string)
+ options = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "subnets" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ cidr_block = string
+ display_name = optional(string)
+ dns_label = optional(string)
+ ipv6cidr_block = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ prohibit_internet_ingress = optional(string)
+ prohibit_public_ip_on_vnic = optional(string)
+ availability_domain = optional(string)
+ dhcp_options_id = optional(string)
+ route_table_id = optional(string)
+ security_list_ids = optional(list(string))
+ }))
+ default = {}
+}
+
+variable "vlans" {
+ type = map(object({
+ cidr_block = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ nsg_ids = optional(list(string))
+ route_table_name = optional(string)
+ vlan_tag = optional(string)
+ availability_domain = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "drg_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_other_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_tables" {
+ type = map(object({
+ drg_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_ecmp_enabled = optional(bool)
+ import_drg_route_distribution_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_rules" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_distributions" {
+ type = map(object({
+ distribution_type = string
+ drg_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_distribution_statements" {
+ type = map(object({
+ drg_route_distribution_id = string
+ action = string
+ match_criteria = optional(list(object({
+ match_type = string
+ attachment_type = optional(string)
+ drg_attachment_id = optional(string)
+ })))
+ priority = optional(string)
+ }))
+ default = {}
+}
+
+variable "data_drg_route_tables" {
+ type = map(any)
+ default = {}
+}
+
+variable "data_drg_route_table_distributions" {
+ type = map(any)
+ default = {}
+}
+
+####################
+####### DNS #######
+####################
+
+variable "zones" {
+type = map(object({
+compartment_id = string
+display_name = string
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_type = optional(string)
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+variable "views" {
+type = map(object({
+compartment_id = string
+display_name = string
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+ default = {}
+}
+
+variable "rrsets" {
+type = map(object({
+compartment_id = optional(string)
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_id = string
+domain = string
+rtype = string
+ttl = number
+rdata = optional(list(string))
+scope = optional(string)
+}))
+default = {}
+}
+
+variable "resolvers" {
+type = map(object({
+network_compartment_id= string
+vcn_name = string
+display_name = optional(string)
+views = optional(map(object({
+ view_id = optional(string)
+ view_compartment_id = optional(string)
+})))
+resolver_rules = optional(map(object({
+ client_address_conditions = optional(list(any))
+ destination_addresses = optional(list(any))
+ qname_cover_conditions = optional(list(any))
+ source_endpoint_name = optional(string)
+})))
+endpoint_names = optional(map(object({
+ is_forwarding = optional(bool)
+ is_listening = optional(bool)
+ name = optional(string)
+ subnet_name = optional(string)
+ forwarding_address = optional(string)
+ listening_address = optional(string)
+ nsg_ids = optional(list(string))
+})))
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+
+#########################
+## Dedicated VM Hosts ##
+#########################
+
+variable "dedicated_hosts" {
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ vm_host_shape = string
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ fault_domain = optional(string)
+ freeform_tags = optional(map(any))
+ }))
+ description = "To provision new dedicated VM hosts"
+ default = {}
+}
+
+#########################
+## Instances/Block Volumes ##
+#########################
+
+variable "blockvolumes" {
+ description = "To provision block volumes"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = string
+ size_in_gbs = optional(string)
+ is_auto_tune_enabled = optional(string)
+ vpus_per_gb = optional(string)
+ kms_key_id = optional(string)
+ attach_to_instance = optional(string)
+ attachment_type = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ device = optional(string)
+ encryption_in_transit_type = optional(string)
+ attachment_display_name = optional(string)
+ is_read_only = optional(bool)
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ is_shareable = optional(bool)
+ use_chap = optional(bool)
+ is_agent_auto_iscsi_login_enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ source_details = optional(list(map(any)))
+ block_volume_replicas = optional(list(map(any)))
+ block_volume_replicas_deletion = optional(bool)
+ autotune_policies = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "block_backup_policies" {
+ type = map(any)
+ description = "To create block volume back policy"
+ default = {}
+}
+
+variable "instances" {
+ description = "Map of instances to be provisioned"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ shape = string
+ source_id = string
+ source_type = string
+ vcn_name = string
+ subnet_id = string
+ network_compartment_id = string
+ display_name = optional(string)
+ assign_public_ip = optional(bool)
+ boot_volume_size_in_gbs = optional(string)
+ fault_domain = optional(string)
+ dedicated_vm_host_id = optional(string)
+ private_ip = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(string))
+ ocpus = optional(string)
+ memory_in_gbs = optional(number)
+ capacity_reservation_id = optional(string)
+ create_is_pv_encryption_in_transit_enabled = optional(bool)
+ remote_execute = optional(string)
+ bastion_ip = optional(string)
+ cloud_init_script = optional(string)
+ ssh_authorized_keys = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ network_type = optional(string)
+ #extended_metadata = optional(string)
+ skip_source_dest_check = optional(bool)
+ baseline_ocpu_utilization = optional(string)
+ #preemptible_instance_config = optional(string)
+ all_plugins_disabled = optional(bool)
+ is_management_disabled = optional(bool)
+ is_monitoring_disabled = optional(bool)
+ assign_private_dns_record = optional(string)
+ plugins_details = optional(map(any))
+ is_live_migration_preferred = optional(bool)
+ recovery_action = optional(string)
+ are_legacy_imds_endpoints_disabled = optional(bool)
+ boot_volume_type = optional(string)
+ firmware = optional(string)
+ is_consistent_volume_naming_enabled = optional(bool)
+ remote_data_volume_type = optional(string)
+ platform_config = optional(list(map(any)))
+ launch_options = optional(list(map(any)))
+ ipxe_script = optional(string)
+ preserve_boot_volume = optional(bool)
+ vlan_id = optional(string)
+ kms_key_id = optional(string)
+ vnic_display_name = optional(string)
+ vnic_defined_tags = optional(map(any))
+ vnic_freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "boot_backup_policies" {
+ type = map(any)
+ description = "Map of boot volume backup policies to be provisioned"
+ default = {}
+}
+
+#########################
+####### Database ########
+#########################
+
+variable "exa_infra" {
+ description = "To provision exadata infrastructure"
+ type = map(any)
+ default = {}
+}
+
+variable "exa_vmclusters" {
+ description = "To provision exadata cloud VM cluster"
+ type = map(any)
+ default = {}
+}
+
+variable "dbsystems_vm_bm" {
+ description = "To provision DB System"
+ type = map(any)
+ default = {}
+}
+
+variable "db_home" {
+ type = map(any)
+ description = "Map of database db home to be provisioned"
+ default = {}
+}
+
+variable "databases" {
+ description = "Map of databases to be provisioned in an existing db_home"
+ type = map(any)
+ default = {}
+}
+
+####################################
+####### Autonomous Database ########
+####################################
+
+variable "adb" {
+ type = map(object({
+ admin_password = optional(string)
+ character_set = optional(string)
+ compartment_id = string
+ cpu_core_count = optional(number)
+ database_edition = optional(string)
+ data_storage_size_in_tbs = optional(number)
+ customer_contacts = optional(list(string))
+ db_name = string
+ db_version = optional(string)
+ db_workload = optional(string)
+ display_name = optional(string)
+ license_model = optional(string)
+ ncharacter_set = optional(string)
+ network_compartment_id = optional(string)
+ nsg_ids = optional(list(string))
+ subnet_id = optional(string)
+ vcn_name = optional(string)
+ whitelisted_ips = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+######### FSS ###########
+#########################
+
+variable "mount_targets" {
+ description = "To provision Mount Targets"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ display_name = optional(string)
+ ip_address = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fss" {
+ description = "To provision File System Services"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = optional(string)
+ source_snapshot = optional(string)
+ snapshot_policy = optional(string)
+ policy_compartment_id = optional(string)
+ kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_export_options" {
+ description = "To provision Export Sets"
+ type = map(object({
+ export_set_id = string
+ file_system_id = string
+ path = string
+ export_options = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_idmap_groups_for_sys_auth = optional(bool)
+ }))
+ default = {}
+}
+
+variable "fss_replication" {
+ description = "To provision File System Replication"
+ type = map(object({
+ compartment_id = string
+ source_id = string
+ target_id = string
+ display_name = optional(string)
+ replication_interval = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+####### FSS Logs ########
+#########################
+
+variable "nfs_log_groups" {
+ description = "To provision Log Groups for Mount Target"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_logs" {
+ description = "To provision Logs for Mount Target"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+#########################
+#### Load Balancers #####
+#########################
+
+variable "load_balancers" {
+ description = "To provision Load Balancers"
+ type = map(object({
+ compartment_id = string
+ vcn_name = string
+ shape = string
+ subnet_ids = list(any)
+ network_compartment_id = string
+ display_name = string
+ shape_details = optional(list(map(any)))
+ nsg_ids = optional(list(any))
+ is_private = optional(bool)
+ ip_mode = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ reserved_ips_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "hostnames" {
+ description = "To provision Load Balancer Hostnames"
+ type = map(object({
+ load_balancer_id = string
+ hostname = string
+ name = string
+ }))
+ default = {}
+}
+
+variable "certificates" {
+ description = "To provision Load Balancer Certificates"
+ type = map(object({
+ certificate_name = string
+ load_balancer_id = string
+ ca_certificate = optional(string)
+ passphrase = optional(string)
+ private_key = optional(string)
+ public_certificate = optional(string)
+ }))
+ default = {}
+}
+
+variable "cipher_suites" {
+ description = "To provision Load Balancer Cipher Suites"
+ type = map(object({
+ ciphers = list(string)
+ name = string
+ load_balancer_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "backend_sets" {
+ description = "To provision Load Balancer Backend Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ policy = string
+ protocol = optional(string)
+ interval_ms = optional(string)
+ is_force_plain_text = optional(string)
+ port = optional(string)
+ response_body_regex = optional(string)
+ retries = optional(string)
+ return_code = optional(string)
+ timeout_in_millis = optional(string)
+ url_path = optional(string)
+ lb_cookie_session = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ path = optional(string)
+ domain = optional(string)
+ is_http_only = optional(string)
+ is_secure = optional(string)
+ max_age_in_seconds = optional(string)
+ })))
+ session_persistence_configuration = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ })))
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "backends" {
+ description = "To provision Load Balancer Backends"
+ type = map(object({
+ backendset_name = string
+ ip_address = string
+ load_balancer_id = string
+ port = string
+ instance_compartment = optional(string)
+ backup = optional(string)
+ drain = optional(string)
+ offline = optional(string)
+ weight = optional(string)
+ }))
+ default = {}
+}
+
+variable "listeners" {
+ description = "To provision Load Balancer Listeners"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ port = string
+ protocol = string
+ default_backend_set_name = string
+ connection_configuration = optional(list(map(any)))
+ hostname_names = optional(list(any))
+ path_route_set_name = optional(string)
+ rule_set_names = optional(list(any))
+ routing_policy_name = optional(string)
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "path_route_sets" {
+ description = "To provision Load Balancer Path Route Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ path_routes = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "rule_sets" {
+ description = "To provision Load Balancer Rule Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ access_control_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ description = optional(string)
+ })))
+ access_control_method_rules = optional(list(object({
+ action = string
+ allowed_methods = optional(list(any))
+ status_code = optional(string)
+ })))
+ http_header_rules = optional(list(object({
+ action = string
+ are_invalid_characters_allowed = optional(bool)
+ http_large_header_size_in_kb = optional(string)
+ })))
+ uri_redirect_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ operator = optional(string)
+ host = optional(string)
+ path = optional(string)
+ port = optional(string)
+ protocol = optional(string)
+ query = optional(string)
+ response_code = optional(string)
+ })))
+ request_response_header_rules = optional(list(object({
+ action = string
+ header = optional(string)
+ prefix = optional(string)
+ suffix = optional(string)
+ value = optional(string)
+ })))
+ }))
+ default = {}
+}
+
+variable "lbr_reserved_ips" {
+ description = "To provision Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ lifetime = string
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+###################################
+####### Load Balancer Logs ########
+###################################
+
+variable "loadbalancer_log_groups" {
+ description = "To provision Log Groups for Load Balancers"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "loadbalancer_logs" {
+ description = "To provision Logs for Load Balancers"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+## Network Load Balancers ##
+#########################
+
+variable "network_load_balancers" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ is_private = optional(bool)
+ reserved_ips_id = string
+ is_preserve_source_destination = optional(bool)
+ is_symmetric_hash_enabled = optional(bool)
+ nlb_ip_version = optional(string)
+ assigned_private_ipv4 = optional(string)
+ nsg_ids = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "nlb_listeners" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ default_backend_set_name = string
+ port = number
+ protocol = string
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+
+variable "nlb_backend_sets" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ policy = string
+ protocol = string
+ domain_name = optional(string)
+ query_class = optional(string)
+ query_type = optional(string)
+ rcodes = optional(list(string))
+ transport_protocol = optional(string)
+ return_code = optional(number)
+ interval_in_millis = optional(number)
+ port = optional(number)
+ request_data = optional(string)
+ response_body_regex = optional(string)
+ response_data = optional(string)
+ retries = optional(number)
+ timeout_in_millis = optional(number)
+ url_path = optional(string)
+ is_preserve_source = optional(bool)
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_backends" {
+ type = map(object({
+ name = optional(string)
+ backend_set_name = string
+ network_load_balancer_id = string
+ port = number
+ ip_address = string
+ instance_compartment = string
+ is_drain = optional(bool)
+ is_backup = optional(bool)
+ is_offline = optional(bool)
+ weight = optional(number)
+ target_id = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_reserved_ips" {
+ description = "To provision Network Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ lifetime = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ }))
+ default = {}
+}
+
+
+#########################
+##### IP Management #####
+#########################
+
+variable "public_ip_pools" {
+ type = map(any)
+ default = {}
+}
+
+variable "private_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "reserved_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "vnic_attachments" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+##### VCN Logs ##########
+#########################
+
+variable "vcn_log_groups" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcn_logs" {
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### OSS Buckets ######
+#########################
+
+variable "buckets" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+####### OSS Logs ########
+#########################
+
+variable "oss_log_groups" {
+ description = "To provision Log Groups for OSS"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "oss_logs" {
+ description = "To provision Logs for OSS"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+### OSS IAM Policies ####
+#########################
+
+variable "oss_policies" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+## Management Services ##
+#########################
+
+variable "alarms" {
+ type = map(object({
+ compartment_id = string
+ destinations = list(string)
+ alarm_name = string
+ is_enabled = bool
+ metric_compartment_id = string
+ namespace = string
+ query = string
+ severity = string
+ body = optional(string)
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_notifications_per_metric_dimension_enabled = optional(bool)
+ metric_compartment_id_in_subtree = optional(string)
+ trigger_delay_minutes = optional(string)
+ repeat_notification_duration = optional(string)
+ resolution = optional(string)
+ resource_group = optional(string)
+ suppression = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "events" {
+ type = map(object({
+ event_name = string
+ compartment_id = string
+ description = string
+ is_enabled = bool
+ condition = string
+ actions = optional(list(object({
+ action_type = string
+ is_enabled = string
+ description = optional(string)
+ function_id = optional(string)
+ stream_id = optional(string)
+ topic_id = optional(string)
+ })))
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_topics" {
+ type = map(object({
+ compartment_id = string
+ topic_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_subscriptions" {
+ type = map(object({
+ compartment_id = string
+ endpoint = string
+ protocol = string
+ topic_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "service_connectors" {
+ type = any
+ default = {}
+ description = "To provision service connector hub resources"
+}
+
+#########################
+## Developer Services ##
+#########################
+
+## OKE
+
+variable "clusters" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ kubernetes_version = string
+ cni_type = string
+ cluster_type = string
+ is_policy_enabled = optional(bool)
+ policy_kms_key_id = optional(string)
+ is_kubernetes_dashboard_enabled = optional(bool)
+ is_tiller_enabled = optional(bool)
+ is_public_ip_enabled = optional(bool)
+ nsg_ids = optional(list(string))
+ endpoint_subnet_id = string
+ is_pod_security_policy_enabled = optional(bool)
+ pods_cidr = optional(string)
+ services_cidr = optional(string)
+ service_lb_subnet_ids = optional(list(string))
+ cluster_kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ lb_defined_tags = optional(map(any))
+ lb_freeform_tags = optional(map(any))
+ volume_defined_tags = optional(map(any))
+ volume_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_node_labels = optional(map(any))
+ kubernetes_version = string
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ availability_domain = number
+ fault_domains = optional(list(string))
+ subnet_id = string
+ size = number
+ cni_type = string
+ max_pods_per_node = optional(number)
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_ids = optional(string)
+ worker_nsg_ids = optional(list(string))
+ memory_in_gbs = optional(number)
+ ocpus = optional(number)
+ image_id = string
+ source_type = string
+ boot_volume_size_in_gbs = optional(number)
+ ssh_public_key = optional(string)
+ nodepool_kms_key_id = optional(string)
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "virtual-nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_virtual_node_labels = optional(map(any))
+ availability_domain = number
+ fault_domains = list(string)
+ subnet_id = string
+ size = number
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_id = string
+ worker_nsg_ids = optional(list(string))
+ taints = optional(list(any))
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+##################################
+############## SDDCs #############
+##################################
+variable "sddcs" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = string
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = string
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ initial_cluster_display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ management_datastore = optional(list(string))
+ workload_datastore = optional(list(string))
+
+ }))
+ default = {}
+
+}
+
+variable "sddc-clusters" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = optional(string)
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = optional(string)
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ workload_datastore = optional(list(string))
+ sddc_id = optional(string)
+ esxi_software_version = optional(string)
+
+ }))
+ default = {}
+
+}
+
+
+############################
+## Key Management Service ##
+############################
+
+variable "vaults" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_type = string
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ replica_region = optional(string)
+ }))
+ default = {}
+}
+
+variable "keys" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_name = string
+ algorithm = optional(string)
+ length = optional(string)
+ curve_id = optional(string)
+ protection_mode = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ is_auto_rotation_enabled = optional(bool)
+ rotation_interval_in_days = optional(string)
+
+ }))
+ default = {}
+}
+
+###########################
+######### Budgets #########
+###########################
+
+variable "budgets" {
+ type = map(object({
+ amount = string
+ compartment_id = string
+ reset_period = string
+ budget_processing_period_start_offset = optional(string)
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ processing_period_type = optional(string)
+ budget_end_date = optional(string)
+ budget_start_date = optional(string)
+ target_type = optional(string)
+ targets = optional(list(any))
+ }))
+ default = {}
+}
+
+variable "budget_alert_rules" {
+ type = map(object({
+ budget_id = string
+ threshold = string
+ threshold_type = string
+ type = string
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ message = optional(string)
+ recipients = optional(string)
+ }))
+ default = {}
+}
+
+###########################
+####### Cloud Guard #######
+###########################
+
+variable "cloud_guard_configs" {
+ type = map(object({
+ compartment_id = string
+ reporting_region = string
+ status = string
+ self_manage_resources = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "cloud_guard_targets" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ target_resource_id = string
+ target_resource_type = string
+ prefix = string
+ description = optional(string)
+ state = optional(string)
+ target_detector_recipes = optional(list(any))
+ target_responder_recipes = optional(list(any))
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+####################################
+####### Custom Backup Policy #######
+####################################
+
+variable "custom_backup_policies" {
+ type = map(any)
+ default = {}
+}
+
+variable "capacity_reservation_ocids" {
+ type = map(any)
+ default = {
+ "AD1" : "",
+ "AD2" : "",
+ "AD3" : ""
+ }
+}
+
+#####################################
+####### Firewall as a Service #######
+#####################################
+variable "firewalls" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ network_firewall_policy_id = string
+ subnet_id = string
+ vcn_name = string
+ display_name = string
+ ipv4address = optional(string)
+ nsg_id = optional(list(string))
+ ipv6address = optional(string)
+ availability_domain = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw-policies" {
+ type = map(object({
+ compartment_id = optional(string)
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "services" {
+ type = map(object({
+ service_name = string
+ service_type = string
+ network_firewall_policy_id = string
+ port_ranges = list(object({
+ minimum_port = string
+ maximum_port = optional(string)
+ }))
+ }))
+ default = {}
+}
+variable "url_lists" {
+ type = map(object({
+ urllist_name = string
+ network_firewall_policy_id = string
+ urls = list(object({
+ pattern = string
+ type = string
+ }))
+ }))
+ default = {}
+}
+variable "service_lists" {
+ type = map(object({
+ service_list_name = string
+ network_firewall_policy_id = string
+ services = list(string)
+ }))
+ default = {}
+}
+
+variable "address_lists" {
+ type = map(object({
+ address_list_name = string
+ network_firewall_policy_id = string
+ address_type = string
+ addresses = list(string)
+ }))
+ default = {}
+}
+
+variable "applications" {
+ type = map(object({
+ app_list_name = string
+ network_firewall_policy_id = string
+ app_type = string
+ icmp_type = number
+ icmp_code = optional(number)
+ }))
+ default = {}
+}
+
+variable "application_groups" {
+ type = map(object({
+ app_group_name = string
+ network_firewall_policy_id = string
+ apps = list(string)
+
+ }))
+ default = {}
+}
+
+variable "security_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+ application = optional(list(string))
+ destination_address = optional(list(string))
+ service = optional(list(string))
+ source_address = optional(list(string))
+ url = optional(list(string))
+ })))
+ inspection = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "secrets" {
+ type = map(object({
+ secret_name = string
+ network_firewall_policy_id = string
+ secret_source = string
+ secret_type = string
+ vault_secret_id = string
+ version_number = number
+ vault_name = string
+ vault_compartment_id = string
+ }))
+ default = {}
+}
+
+variable "decryption_profiles" {
+ type = map(object({
+ profile_name = string
+ profile_type = string
+ network_firewall_policy_id = string
+ are_certificate_extensions_restricted = optional(bool)
+ is_auto_include_alt_name = optional(bool)
+ is_expired_certificate_blocked = optional(bool)
+ is_out_of_capacity_blocked = optional(bool)
+ is_revocation_status_timeout_blocked = optional(bool)
+ is_unknown_revocation_status_blocked = optional(bool)
+ is_unsupported_cipher_blocked = optional(bool)
+ is_unsupported_version_blocked = optional(bool)
+ is_untrusted_issuer_blocked = optional(bool)
+ }))
+ default = {}
+}
+
+variable "decryption_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+
+ destination_address = optional(list(string))
+
+ source_address = optional(list(string))
+
+ })))
+ decryption_profile = optional(string)
+ secret = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+#########################
+####### Firewall Logs ########
+#########################
+
+variable "fw_log_groups" {
+ description = "To provision Log Groups for Network Firewall"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw_logs" {
+ description = "To provision Logs for Network Firewall"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+##########################
+# Add new variables here #
+##########################
+######################### END #########################
diff --git a/examples/database/adb.tf b/examples/database/adb.tf
new file mode 100755
index 0000000..ead0d5a
--- /dev/null
+++ b/examples/database/adb.tf
@@ -0,0 +1,95 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+#############################
+## Module Block - Autonomous database
+## Create autonomous database
+#############################
+data "oci_core_subnets" "oci_subnets_adb" {
+ # depends_on = [module.subnets] # Uncomment to create Network and FSS together
+ #for_each = var.adb != null ? var.adb : {}
+ for_each = { for k, v in var.adb : k => v if v.vcn_name != null }
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.subnet_id
+ vcn_id = data.oci_core_vcns.oci_vcns_adb[each.key].virtual_networks.*.id[0]
+}
+
+data "oci_core_vcns" "oci_vcns_adb" {
+ # depends_on = [module.vcns] # Uncomment to create Network and FSS together
+ #for_each = var.adb != null ? var.adb : {}
+ for_each = { for k, v in var.adb : k => v if v.vcn_name != null }
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.vcn_name
+}
+
+module "adb" {
+ source = "./modules/database/adb"
+ for_each = var.adb != null ? var.adb : {}
+ # depends_on = [module.nsgs]
+ admin_password = each.value.admin_password
+ character_set = each.value.character_set
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ cpu_core_count = each.value.cpu_core_count
+ database_edition = each.value.database_edition
+ data_storage_size_in_tbs = each.value.data_storage_size_in_tbs
+ db_name = each.value.db_name
+ db_version = each.value.db_version
+ db_workload = each.value.db_workload
+ defined_tags = each.value.defined_tags
+ display_name = each.value.display_name
+ license_model = each.value.license_model
+ ncharacter_set = each.value.ncharacter_set
+ customer_contacts = each.value.customer_contacts
+ network_compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : null
+ network_security_group_ids = each.value.nsg_ids
+ freeform_tags = each.value.freeform_tags
+ subnet_id = each.value.subnet_id != null ? (length(regexall("ocid1.subnet.oc*", each.value.subnet_id)) > 0 ? each.value.subnet_id : data.oci_core_subnets.oci_subnets_adb[each.key].subnets.*.id[0]) : null
+ vcn_name = each.value.vcn_name != null ? each.value.vcn_name : null
+ whitelisted_ips = each.value.whitelisted_ips
+
+ #Optional parameters for ADB
+ # are_primary_whitelisted_ips_used = var.autonomous_database_are_primary_whitelisted_ips_used
+ # autonomous_container_database_id = oci_database_autonomous_container_database.test_autonomous_container_database.id
+ # autonomous_database_backup_id = oci_database_autonomous_database_backup.test_autonomous_database_backup.id
+ # autonomous_database_id = oci_database_autonomous_database.test_autonomous_database.id
+ # autonomous_maintenance_schedule_type = var.autonomous_database_autonomous_maintenance_schedule_type
+ # clone_type = var.autonomous_database_clone_type
+ # customer_contacts {
+
+ #Optional
+ # email = var.autonomous_database_customer_contacts_email
+ # }
+ # data_safe_status = var.autonomous_database_data_safe_status
+ # data_storage_size_in_gb = var.autonomous_database_data_storage_size_in_gb
+ # is_access_control_enabled = var.autonomous_database_is_access_control_enabled
+ # is_auto_scaling_enabled = var.autonomous_database_is_auto_scaling_enabled
+ # is_auto_scaling_for_storage_enabled = var.autonomous_database_is_auto_scaling_for_storage_enabled
+ # is_data_guard_enabled = var.autonomous_database_is_data_guard_enabled
+ # is_dedicated = var.autonomous_database_is_dedicated
+ # is_free_tier = var.autonomous_database_is_free_tier
+ # is_local_data_guard_enabled = var.autonomous_database_is_local_data_guard_enabled
+ # is_mtls_connection_required = var.autonomous_database_is_mtls_connection_required
+ # is_preview_version_with_service_terms_accepted = var.autonomous_database_is_preview_version_with_service_terms_accepted
+ # kms_key_id = oci_kms_key.test_key.id
+ # max_cpu_core_count = var.autonomous_database_max_cpu_core_count
+ # ocpu_count = var.autonomous_database_ocpu_count
+ # private_endpoint_label = var.autonomous_database_private_endpoint_label
+ # refreshable_mode = var.autonomous_database_refreshable_mode
+ # scheduled_operations {
+ # #Required
+ # day_of_week {
+ # #Required
+ # name = var.autonomous_database_scheduled_operations_day_of_week_name
+ # }
+
+ # #Optional
+ # scheduled_start_time = var.autonomous_database_scheduled_operations_scheduled_start_time
+ # scheduled_stop_time = var.autonomous_database_scheduled_operations_scheduled_stop_time
+ # }
+ # source = var.autonomous_database_source
+ # source_id = oci_database_source.test_source.id
+ # standby_whitelisted_ips = var.autonomous_database_standby_whitelisted_ips
+ # timestamp = var.autonomous_database_timestamp
+ # vault_id = oci_kms_vault.test_vault.id
+ # whitelisted_ips = var.autonomous_database_whitelisted_ips
+
+}
\ No newline at end of file
diff --git a/examples/database/backend.tf b/examples/database/backend.tf
new file mode 100644
index 0000000..16bc557
--- /dev/null
+++ b/examples/database/backend.tf
@@ -0,0 +1,21 @@
+/*This line will be removed when using remote state
+# !!! WARNING !!! Terraform State Lock is not supported with OCI Object Storage.
+# Pre-Requisite: Create a version enabled object storage bucket to store the state file.
+# End Point Format: https://.compat.objectstorage..oraclecloud.com
+# Please look at the below doc for information about shared_credentials_file and other parameters:
+# Reference: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
+
+terraform {
+ backend "s3" {
+ key = ""
+ bucket = ""
+ region = ""
+ endpoint = ""
+ shared_credentials_file = "~/.aws/credentials"
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_metadata_api_check = true
+ force_path_style = true
+ }
+}
+This line will be removed when using remote state*/
\ No newline at end of file
diff --git a/examples/database/database-exacs.tf b/examples/database/database-exacs.tf
new file mode 100644
index 0000000..7dfc158
--- /dev/null
+++ b/examples/database/database-exacs.tf
@@ -0,0 +1,96 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################################
+# Module Block - Database
+# Create ExaInfra
+############################################
+
+data "oci_core_subnets" "oci_exacs_subnets" {
+ # depends_on = [module.subnets] # Uncomment to create Network and Instances together
+ for_each = var.exa_vmclusters != null ? var.exa_vmclusters : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.cluster_subnet_id
+ vcn_id = data.oci_core_vcns.oci_exacs_vcns[each.key].virtual_networks.*.id[0]
+}
+
+data "oci_core_subnets" "oci_exacs_backup_subnets" {
+ # depends_on = [module.subnets] # Uncomment to create Network and Instances together
+ for_each = var.exa_vmclusters != null ? var.exa_vmclusters : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.backup_subnet_id
+ vcn_id = data.oci_core_vcns.oci_exacs_vcns[each.key].virtual_networks.*.id[0]
+}
+
+data "oci_core_vcns" "oci_exacs_vcns" {
+ # depends_on = [module.vcns] # Uncomment to create Network and Instances together
+ for_each = var.exa_vmclusters != null ? var.exa_vmclusters : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.vcn_name
+}
+
+module "exa-infra" {
+ source = "./modules/database/exa-infra"
+ for_each = var.exa_infra != null ? var.exa_infra : {}
+ availability_domain = each.value.availability_domain != "" && each.value.availability_domain != null ? data.oci_identity_availability_domains.availability_domains.availability_domains[each.value.availability_domain].name : ""
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ display_name = each.value.display_name
+ shape = each.value.shape
+ compute_count = each.value.compute_count
+ # customer_contacts_email = each.value.customer_contacts_email
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+ storage_count = each.value.storage_count
+
+ #Optional
+ # maintenance_window_preference = each.value.maintenance_window_preference
+ # maintenance_window_days_of_week_name = each.value.maintenance_window_days_of_week_name
+ # maintenance_window_hours_of_day = each.value.maintenance_window_hours_of_day
+ # maintenance_window_lead_time_in_weeks = each.value.maintenance_window_lead_time_in_weeks
+ # maintenance_window_months_name = each.value.maintenance_window_months_name
+ # maintenance_window_weeks_of_month = each.value.maintenance_window_weeks_of_month
+}
+
+
+############################################
+# Module Block - Database
+# Create ExaVMClusters
+############################################
+
+module "exa-vmclusters" {
+ depends_on = [module.exa-infra]
+ source = "./modules/database/exa-vmcluster"
+
+ for_each = var.exa_vmclusters != null ? var.exa_vmclusters : {}
+ backup_subnet_id = each.value.backup_subnet_id != "" ? (length(regexall("ocid1.subnet.oc*", each.value.backup_subnet_id)) > 0 ? each.value.backup_subnet_id : data.oci_core_subnets.oci_exacs_backup_subnets[each.key].subnets.*.id[0]) : null
+ exadata_infrastructure_id = length(regexall("ocid1.cloudexadatainfrastructure.oc*", each.value.exadata_infrastructure_id)) > 0 ? each.value.exadata_infrastructure_id : merge(module.exa-infra.*...)[each.value.exadata_infrastructure_id].exainfra_tf_id
+ cpu_core_count = each.value.cpu_core_count
+ display_name = each.value.display_name
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ gi_version = each.value.gi_version
+ hostname = each.value.hostname
+ #ssh_public_keys = length(regexall("ssh-rsa*",each.value.ssh_public_key)) > 0 ? each.value.ssh_public_key : var.ssh_public_key
+ ssh_public_keys = lookup(var.exacs_ssh_keys, each.value.ssh_public_keys, var.exacs_ssh_keys["ssh_public_key"])
+ // cluster_subnet_id = length(regexall("ocid1.subnet.oc*", each.value.cluster_subnet_id)) > 0 ? each.value.cluster_subnet_id : merge(module.subnets.*...)[each.value.cluster_subnet_id]["subnet_tf_id"]
+ network_compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : null
+ vcn_names = [each.value.vcn_name]
+ cluster_subnet_id = each.value.cluster_subnet_id != "" ? (length(regexall("ocid1.subnet.oc*", each.value.cluster_subnet_id)) > 0 ? each.value.cluster_subnet_id : data.oci_core_subnets.oci_exacs_subnets[each.key].subnets.*.id[0]) : null
+ backup_network_nsg_ids = each.value.backup_network_nsg_ids != null ? each.value.backup_network_nsg_ids : []
+ cluster_name = each.value.cluster_name
+ data_storage_percentage = each.value.data_storage_percentage
+ db_node_storage_size_in_gbs = each.value.db_node_storage_size_in_gbs != null ? each.value.db_node_storage_size_in_gbs : null
+ memory_size_in_gbs = each.value.memory_size_in_gbs != null ? each.value.memory_size_in_gbs : null
+ data_storage_size_in_tbs = each.value.data_storage_size_in_tbs != null ? each.value.data_storage_size_in_tbs : null
+ db_servers = each.value.db_servers != [] ? each.value.db_servers : []
+ defined_tags = each.value.defined_tags
+ domain = each.value.domain
+ freeform_tags = each.value.freeform_tags
+ is_local_backup_enabled = each.value.is_local_backup_enabled
+ is_sparse_diskgroup_enabled = each.value.is_sparse_diskgroup_enabled
+ license_model = each.value.license_model
+ // nsg_ids = each.value.nsg_ids != null ? [for nsg in each.value.nsg_ids : length(regexall("ocid1.networksecuritygroup.oc*", nsg)) > 0 ? nsg : merge(module.nsgs.*...)[nsg]["nsg_tf_id"]] : null
+ nsg_ids = each.value.nsg_ids != null ? each.value.nsg_ids : []
+ ocpu_count = each.value.ocpu_count
+ scan_listener_port_tcp = each.value.scan_listener_port_tcp
+ scan_listener_port_tcp_ssl = each.value.scan_listener_port_tcp_ssl
+ time_zone = each.value.time_zone
+}
\ No newline at end of file
diff --git a/examples/database/dbsystem-vm-bm.tf b/examples/database/dbsystem-vm-bm.tf
new file mode 100755
index 0000000..8cffe73
--- /dev/null
+++ b/examples/database/dbsystem-vm-bm.tf
@@ -0,0 +1,60 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################################
+# Module Block - Database
+# Create DB Systems VM BM
+############################################
+data "oci_core_subnets" "oci_dbsystems_subnets" {
+ # depends_on = [module.subnets] # Uncomment to create Network and Instances together
+ for_each = var.dbsystems_vm_bm != null ? var.dbsystems_vm_bm : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.subnet_id
+ vcn_id = data.oci_core_vcns.oci_dbsystems_vcns[each.key].virtual_networks.*.id[0]
+}
+
+data "oci_core_vcns" "oci_dbsystems_vcns" {
+ # depends_on = [module.vcns] # Uncomment to create Network and Instances together
+ for_each = var.dbsystems_vm_bm != null ? var.dbsystems_vm_bm : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.vcn_name
+}
+
+module "dbsystems-vm-bm" {
+ source = "./modules/database/dbsystem-vm-bm"
+ # depends_on = [module.nsgs] # Uncomment to create NSG and DB Systems together
+ for_each = var.dbsystems_vm_bm != null ? var.dbsystems_vm_bm : {}
+ availability_domain = each.value.availability_domain != "" && each.value.availability_domain != null ? data.oci_identity_availability_domains.availability_domains.availability_domains[each.value.availability_domain].name : ""
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ hostname = each.value.hostname
+ display_name = each.value.display_name
+ db_version = each.value.db_version
+ cluster_name = each.value.cluster_name
+ shape = each.value.shape
+ #ssh_public_key = length(regexall("ssh-rsa*",each.value.ssh_public_key)) > 0 ? each.value.ssh_public_key : var.ssh_public_key
+ ssh_public_keys = lookup(var.dbsystem_ssh_keys, each.value.ssh_public_keys, var.dbsystem_ssh_keys["ssh_public_key"])
+ network_compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : null
+ vcn_names = [each.value.vcn_name]
+ subnet_id = each.value.subnet_id != "" ? (length(regexall("ocid1.subnet.oc*", each.value.subnet_id)) > 0 ? each.value.subnet_id : data.oci_core_subnets.oci_dbsystems_subnets[each.key].subnets.*.id[0]) : null
+ node_count = each.value.node_count
+ nsg_ids = each.value.nsg_ids != null ? each.value.nsg_ids : []
+
+ time_zone = each.value.time_zone
+ cpu_core_count = each.value.cpu_core_count
+ database_edition = each.value.database_edition
+ data_storage_size_in_gb = each.value.data_storage_size_in_gb
+ data_storage_percentage = each.value.data_storage_percentage
+ disk_redundancy = each.value.disk_redundancy
+ license_model = each.value.license_model
+ pdb_name = each.value.pdb_name
+ db_name = each.value.db_name
+ db_home_display_name = each.value.db_home_display_name
+ admin_password = each.value.admin_password
+ db_workload = each.value.db_workload
+ auto_backup_enabled = each.value.auto_backup_enabled
+ character_set = each.value.character_set
+ ncharacter_set = each.value.ncharacter_set
+ recovery_window_in_days = each.value.recovery_window_in_days
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+
+}
\ No newline at end of file
diff --git a/examples/database/oci-data.tf b/examples/database/oci-data.tf
new file mode 100644
index 0000000..1495707
--- /dev/null
+++ b/examples/database/oci-data.tf
@@ -0,0 +1,42 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Resource Block - Identity
+# Fetch Compartments
+############################
+
+#Fetch Compartment Details
+data "oci_identity_compartments" "compartments" {
+ #Required
+ compartment_id = var.tenancy_ocid
+
+ #Optional
+ #name = var.compartment_name
+ access_level = "ANY"
+ compartment_id_in_subtree = true
+ state = "ACTIVE"
+}
+
+
+############################
+# Data Block - Network
+# Fetch ADs
+############################
+
+data "oci_identity_availability_domains" "availability_domains" {
+ #Required
+ compartment_id = var.tenancy_ocid
+}
+
+
+/*
+output "compartment_id_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ value = zipmap(data.oci_identity_compartments.compartments.compartments.*.name,data.oci_identity_compartments.compartments.compartments.*.id)
+}
+
+output "ads" {
+ value = data.oci_identity_availability_domains.availability_domains.availability_domains.*.name
+}
+*/
\ No newline at end of file
diff --git a/examples/database/provider.tf b/examples/database/provider.tf
new file mode 100644
index 0000000..9a69c98
--- /dev/null
+++ b/examples/database/provider.tf
@@ -0,0 +1,24 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Provider Block
+# OCI
+############################
+
+provider "oci" {
+ tenancy_ocid = var.tenancy_ocid
+ user_ocid = var.user_ocid
+ fingerprint = var.fingerprint
+ private_key_path = var.private_key_path
+ region = var.region
+ ignore_defined_tags = ["Oracle-Tags.CreatedBy", "Oracle-Tags.CreatedOn"]
+}
+
+terraform {
+ required_providers {
+ oci = {
+ source = "oracle/oci"
+ version = "5.40.0"
+ }
+ }
+}
diff --git a/examples/database/variables_example.tf b/examples/database/variables_example.tf
new file mode 100644
index 0000000..fae17ea
--- /dev/null
+++ b/examples/database/variables_example.tf
@@ -0,0 +1,2082 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+#
+# Variables Block
+# OCI
+#
+############################
+
+variable "tenancy_ocid" {
+ type = string
+ default = ""
+}
+
+variable "user_ocid" {
+ type = string
+ default = ""
+}
+
+variable "fingerprint" {
+ type = string
+ default = ""
+}
+
+variable "private_key_path" {
+ type = string
+ default = ""
+}
+
+variable "region" {
+ type = string
+ default = ""
+}
+
+#################################
+# SSH Keys
+#################################
+
+variable "instance_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_instance_ssh_keys#
+ # exported instance ssh keys
+ #instance_ssh_keys_END#
+ }
+}
+
+variable "oke_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_oke_ssh_keys#
+ #oke_ssh_keys_END#
+ }
+}
+variable "sddc_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_sddc_ssh_keys#
+ #sddc_ssh_keys_END#
+ }
+}
+
+variable "exacs_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_exacs_ssh_keys#
+ # exported exacs ssh keys
+ #exacs_ssh_keys_END#
+ }
+}
+
+variable "dbsystem_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_dbsystem_ssh_keys#
+ # exported dbsystem ssh keys
+ #dbsystem_ssh_keys_END#
+ }
+}
+
+#################################
+# Platform Image OCIDs and
+# Market Place Images
+#################################
+
+variable "instance_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ Windows = ""
+ PaloAlto = "Palo Alto Networks VM-Series Next Generation Firewall"
+ #START_instance_source_ocids#
+ # exported instance image ocids
+ #instance_source_ocids_END#
+ }
+}
+
+variable "blockvolume_source_ocids" {
+ type = map(any)
+ default = {
+ block1 = ""
+ #blockvolume_source_ocid = ""
+ #START_blockvolume_source_ocids#
+ # exported block volume source ocids
+ #blockvolume_source_ocids_END#
+ }
+}
+
+variable "fss_source_ocids" {
+ type = map(any)
+ default = {
+ snapshot1 = ""
+ #fss_source_snapshot_ocid = ""
+ #START_fss_source_snapshot_ocids#
+ # exported fss source snapshot ocids
+ #fss_source_snapshot_ocids_END#
+ }
+}
+
+variable "oke_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ #START_oke_source_ocids#
+ # exported oke image ocids
+ #oke_source_ocids_END#
+ }
+}
+
+#################################
+#
+# Variables according to Services
+# PLEASE DO NOT MODIFY
+#
+#################################
+
+##########################
+## Fetch Compartments ####
+##########################
+
+variable "compartment_ocids" {
+ type = map(any)
+ default = {
+ #START_compartment_ocids#
+ # compartment ocids
+ #compartment_ocids_END#
+ }
+}
+
+#########################
+##### Identity ##########
+#########################
+
+variable "compartments" {
+ type = object({
+ root = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level1 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level2 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level3 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level4 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level5 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ })
+ default = {
+ root = {},
+ compartment_level1 = {},
+ compartment_level2 = {},
+ compartment_level3 = {},
+ compartment_level4 = {},
+ compartment_level5 = {},
+ }
+}
+
+variable "policies" {
+ type = map(object({
+ name = string
+ compartment_id = string
+ policy_description = string
+ policy_statements = list(string)
+ policy_version_date = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "groups" {
+ type = map(object({
+ group_name = string
+ group_description = string
+ matching_rule = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "users" {
+ type = map(object({
+ name = string
+ description = string
+ email = string
+ disable_capabilities = optional(list(string))
+ group_membership = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "networkSources" {
+ type = map(object({
+ name = string
+ description = string
+ public_source_list = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ virtual_source_list = optional(list(map(list(string))))
+
+ }))
+ default = {}
+}
+
+#########################
+####### Governance #########
+#########################
+
+variable "tag_namespaces" {
+ description = "To provision Namespaces"
+ type = map(object({
+ compartment_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_retired = optional(bool)
+ }))
+ default = {}
+}
+
+variable "tag_keys" {
+ description = "To provision Tag Keys"
+ type = map(object({
+ tag_namespace_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_cost_tracking = optional(bool)
+ is_retired = optional(bool)
+ validator = optional(list(object({
+ validator_type = optional(string)
+ validator_values = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "tag_defaults" {
+ description = "To make the Tag keys as default to compartments"
+ type = map(object({
+ compartment_id = string
+ tag_definition_id = string
+ value = string
+ is_required = optional(bool)
+ }))
+ default = {}
+}
+
+variable "quota_policies" {
+ type = map(object({
+ quota_name = string
+ quota_description = string
+ quota_statements = list(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### Network ##########
+#########################
+
+variable "default_dhcps" {
+ type = map(object({
+ server_type = string
+ manage_default_resource_id = optional(string)
+ custom_dns_servers = optional(list(any))
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "custom_dhcps" {
+ type = map(object({
+ compartment_id = string
+ server_type = string
+ vcn_id = string
+ custom_dns_servers = optional(list(any))
+ domain_name_type = optional(string)
+ display_name = optional(string)
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcns" {
+ type = map(object({
+ compartment_id = string
+ cidr_blocks = optional(list(string))
+ byoipv6cidr_details = optional(list(map(any)))
+ display_name = optional(string)
+ dns_label = optional(string)
+ is_ipv6enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ipv6private_cidr_blocks = optional(list(string))
+ is_oracle_gua_allocation_enabled = optional(bool)
+ }))
+ default = {}
+}
+
+variable "igws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ enable_igw = optional(bool)
+ igw_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_table_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "sgws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ service = optional(string)
+ sgw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "ngws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ block_traffic = optional(bool)
+ public_ip_id = optional(string)
+ ngw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "lpgs" {
+ type = map(any)
+ default = {
+ hub-lpgs = {},
+ spoke-lpgs = {},
+ peer-lpgs = {},
+ none-lpgs = {},
+ exported-lpgs = {},
+ }
+}
+
+variable "drgs" {
+ type = map(object({
+ compartment_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "default_seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+
+}))
+default = {}
+}
+
+variable "default_route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+}))
+ default = {}
+}
+
+variable "nsgs" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nsg_rules" {
+ type = map(object({
+ nsg_id = string
+ direction = string
+ protocol = string
+ description = optional(string)
+ stateless = optional(string)
+ source_type = optional(string)
+ destination_type = optional(string)
+ destination = optional(string)
+ source = optional(string)
+ options = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "subnets" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ cidr_block = string
+ display_name = optional(string)
+ dns_label = optional(string)
+ ipv6cidr_block = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ prohibit_internet_ingress = optional(string)
+ prohibit_public_ip_on_vnic = optional(string)
+ availability_domain = optional(string)
+ dhcp_options_id = optional(string)
+ route_table_id = optional(string)
+ security_list_ids = optional(list(string))
+ }))
+ default = {}
+}
+
+variable "vlans" {
+ type = map(object({
+ cidr_block = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ nsg_ids = optional(list(string))
+ route_table_name = optional(string)
+ vlan_tag = optional(string)
+ availability_domain = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "drg_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_other_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_tables" {
+ type = map(object({
+ drg_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_ecmp_enabled = optional(bool)
+ import_drg_route_distribution_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_rules" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_distributions" {
+ type = map(object({
+ distribution_type = string
+ drg_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_distribution_statements" {
+ type = map(object({
+ drg_route_distribution_id = string
+ action = string
+ match_criteria = optional(list(object({
+ match_type = string
+ attachment_type = optional(string)
+ drg_attachment_id = optional(string)
+ })))
+ priority = optional(string)
+ }))
+ default = {}
+}
+
+variable "data_drg_route_tables" {
+ type = map(any)
+ default = {}
+}
+
+variable "data_drg_route_table_distributions" {
+ type = map(any)
+ default = {}
+}
+
+####################
+####### DNS #######
+####################
+
+variable "zones" {
+type = map(object({
+compartment_id = string
+display_name = string
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_type = optional(string)
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+variable "views" {
+type = map(object({
+compartment_id = string
+display_name = string
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+ default = {}
+}
+
+variable "rrsets" {
+type = map(object({
+compartment_id = optional(string)
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_id = string
+domain = string
+rtype = string
+ttl = number
+rdata = optional(list(string))
+scope = optional(string)
+}))
+default = {}
+}
+
+variable "resolvers" {
+type = map(object({
+network_compartment_id= string
+vcn_name = string
+display_name = optional(string)
+views = optional(map(object({
+ view_id = optional(string)
+ view_compartment_id = optional(string)
+})))
+resolver_rules = optional(map(object({
+ client_address_conditions = optional(list(any))
+ destination_addresses = optional(list(any))
+ qname_cover_conditions = optional(list(any))
+ source_endpoint_name = optional(string)
+})))
+endpoint_names = optional(map(object({
+ is_forwarding = optional(bool)
+ is_listening = optional(bool)
+ name = optional(string)
+ subnet_name = optional(string)
+ forwarding_address = optional(string)
+ listening_address = optional(string)
+ nsg_ids = optional(list(string))
+})))
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+
+#########################
+## Dedicated VM Hosts ##
+#########################
+
+variable "dedicated_hosts" {
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ vm_host_shape = string
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ fault_domain = optional(string)
+ freeform_tags = optional(map(any))
+ }))
+ description = "To provision new dedicated VM hosts"
+ default = {}
+}
+
+#########################
+## Instances/Block Volumes ##
+#########################
+
+variable "blockvolumes" {
+ description = "To provision block volumes"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = string
+ size_in_gbs = optional(string)
+ is_auto_tune_enabled = optional(string)
+ vpus_per_gb = optional(string)
+ kms_key_id = optional(string)
+ attach_to_instance = optional(string)
+ attachment_type = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ device = optional(string)
+ encryption_in_transit_type = optional(string)
+ attachment_display_name = optional(string)
+ is_read_only = optional(bool)
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ is_shareable = optional(bool)
+ use_chap = optional(bool)
+ is_agent_auto_iscsi_login_enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ source_details = optional(list(map(any)))
+ block_volume_replicas = optional(list(map(any)))
+ block_volume_replicas_deletion = optional(bool)
+ autotune_policies = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "block_backup_policies" {
+ type = map(any)
+ description = "To create block volume back policy"
+ default = {}
+}
+
+variable "instances" {
+ description = "Map of instances to be provisioned"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ shape = string
+ source_id = string
+ source_type = string
+ vcn_name = string
+ subnet_id = string
+ network_compartment_id = string
+ display_name = optional(string)
+ assign_public_ip = optional(bool)
+ boot_volume_size_in_gbs = optional(string)
+ fault_domain = optional(string)
+ dedicated_vm_host_id = optional(string)
+ private_ip = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(string))
+ ocpus = optional(string)
+ memory_in_gbs = optional(number)
+ capacity_reservation_id = optional(string)
+ create_is_pv_encryption_in_transit_enabled = optional(bool)
+ remote_execute = optional(string)
+ bastion_ip = optional(string)
+ cloud_init_script = optional(string)
+ ssh_authorized_keys = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ network_type = optional(string)
+ #extended_metadata = optional(string)
+ skip_source_dest_check = optional(bool)
+ baseline_ocpu_utilization = optional(string)
+ #preemptible_instance_config = optional(string)
+ all_plugins_disabled = optional(bool)
+ is_management_disabled = optional(bool)
+ is_monitoring_disabled = optional(bool)
+ assign_private_dns_record = optional(string)
+ plugins_details = optional(map(any))
+ is_live_migration_preferred = optional(bool)
+ recovery_action = optional(string)
+ are_legacy_imds_endpoints_disabled = optional(bool)
+ boot_volume_type = optional(string)
+ firmware = optional(string)
+ is_consistent_volume_naming_enabled = optional(bool)
+ remote_data_volume_type = optional(string)
+ platform_config = optional(list(map(any)))
+ launch_options = optional(list(map(any)))
+ ipxe_script = optional(string)
+ preserve_boot_volume = optional(bool)
+ vlan_id = optional(string)
+ kms_key_id = optional(string)
+ vnic_display_name = optional(string)
+ vnic_defined_tags = optional(map(any))
+ vnic_freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "boot_backup_policies" {
+ type = map(any)
+ description = "Map of boot volume backup policies to be provisioned"
+ default = {}
+}
+
+#########################
+####### Database ########
+#########################
+
+variable "exa_infra" {
+ description = "To provision exadata infrastructure"
+ type = map(any)
+ default = {}
+}
+
+variable "exa_vmclusters" {
+ description = "To provision exadata cloud VM cluster"
+ type = map(any)
+ default = {}
+}
+
+variable "dbsystems_vm_bm" {
+ description = "To provision DB System"
+ type = map(any)
+ default = {}
+}
+
+variable "db_home" {
+ type = map(any)
+ description = "Map of database db home to be provisioned"
+ default = {}
+}
+
+variable "databases" {
+ description = "Map of databases to be provisioned in an existing db_home"
+ type = map(any)
+ default = {}
+}
+
+####################################
+####### Autonomous Database ########
+####################################
+
+variable "adb" {
+ type = map(object({
+ admin_password = optional(string)
+ character_set = optional(string)
+ compartment_id = string
+ cpu_core_count = optional(number)
+ database_edition = optional(string)
+ data_storage_size_in_tbs = optional(number)
+ customer_contacts = optional(list(string))
+ db_name = string
+ db_version = optional(string)
+ db_workload = optional(string)
+ display_name = optional(string)
+ license_model = optional(string)
+ ncharacter_set = optional(string)
+ network_compartment_id = optional(string)
+ nsg_ids = optional(list(string))
+ subnet_id = optional(string)
+ vcn_name = optional(string)
+ whitelisted_ips = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+######### FSS ###########
+#########################
+
+variable "mount_targets" {
+ description = "To provision Mount Targets"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ display_name = optional(string)
+ ip_address = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fss" {
+ description = "To provision File System Services"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = optional(string)
+ source_snapshot = optional(string)
+ snapshot_policy = optional(string)
+ policy_compartment_id = optional(string)
+ kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_export_options" {
+ description = "To provision Export Sets"
+ type = map(object({
+ export_set_id = string
+ file_system_id = string
+ path = string
+ export_options = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_idmap_groups_for_sys_auth = optional(bool)
+ }))
+ default = {}
+}
+
+variable "fss_replication" {
+ description = "To provision File System Replication"
+ type = map(object({
+ compartment_id = string
+ source_id = string
+ target_id = string
+ display_name = optional(string)
+ replication_interval = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+####### FSS Logs ########
+#########################
+
+variable "nfs_log_groups" {
+ description = "To provision Log Groups for Mount Target"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_logs" {
+ description = "To provision Logs for Mount Target"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+#########################
+#### Load Balancers #####
+#########################
+
+variable "load_balancers" {
+ description = "To provision Load Balancers"
+ type = map(object({
+ compartment_id = string
+ vcn_name = string
+ shape = string
+ subnet_ids = list(any)
+ network_compartment_id = string
+ display_name = string
+ shape_details = optional(list(map(any)))
+ nsg_ids = optional(list(any))
+ is_private = optional(bool)
+ ip_mode = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ reserved_ips_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "hostnames" {
+ description = "To provision Load Balancer Hostnames"
+ type = map(object({
+ load_balancer_id = string
+ hostname = string
+ name = string
+ }))
+ default = {}
+}
+
+variable "certificates" {
+ description = "To provision Load Balancer Certificates"
+ type = map(object({
+ certificate_name = string
+ load_balancer_id = string
+ ca_certificate = optional(string)
+ passphrase = optional(string)
+ private_key = optional(string)
+ public_certificate = optional(string)
+ }))
+ default = {}
+}
+
+variable "cipher_suites" {
+ description = "To provision Load Balancer Cipher Suites"
+ type = map(object({
+ ciphers = list(string)
+ name = string
+ load_balancer_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "backend_sets" {
+ description = "To provision Load Balancer Backend Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ policy = string
+ protocol = optional(string)
+ interval_ms = optional(string)
+ is_force_plain_text = optional(string)
+ port = optional(string)
+ response_body_regex = optional(string)
+ retries = optional(string)
+ return_code = optional(string)
+ timeout_in_millis = optional(string)
+ url_path = optional(string)
+ lb_cookie_session = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ path = optional(string)
+ domain = optional(string)
+ is_http_only = optional(string)
+ is_secure = optional(string)
+ max_age_in_seconds = optional(string)
+ })))
+ session_persistence_configuration = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ })))
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "backends" {
+ description = "To provision Load Balancer Backends"
+ type = map(object({
+ backendset_name = string
+ ip_address = string
+ load_balancer_id = string
+ port = string
+ instance_compartment = optional(string)
+ backup = optional(string)
+ drain = optional(string)
+ offline = optional(string)
+ weight = optional(string)
+ }))
+ default = {}
+}
+
+variable "listeners" {
+ description = "To provision Load Balancer Listeners"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ port = string
+ protocol = string
+ default_backend_set_name = string
+ connection_configuration = optional(list(map(any)))
+ hostname_names = optional(list(any))
+ path_route_set_name = optional(string)
+ rule_set_names = optional(list(any))
+ routing_policy_name = optional(string)
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "path_route_sets" {
+ description = "To provision Load Balancer Path Route Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ path_routes = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "rule_sets" {
+ description = "To provision Load Balancer Rule Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ access_control_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ description = optional(string)
+ })))
+ access_control_method_rules = optional(list(object({
+ action = string
+ allowed_methods = optional(list(any))
+ status_code = optional(string)
+ })))
+ http_header_rules = optional(list(object({
+ action = string
+ are_invalid_characters_allowed = optional(bool)
+ http_large_header_size_in_kb = optional(string)
+ })))
+ uri_redirect_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ operator = optional(string)
+ host = optional(string)
+ path = optional(string)
+ port = optional(string)
+ protocol = optional(string)
+ query = optional(string)
+ response_code = optional(string)
+ })))
+ request_response_header_rules = optional(list(object({
+ action = string
+ header = optional(string)
+ prefix = optional(string)
+ suffix = optional(string)
+ value = optional(string)
+ })))
+ }))
+ default = {}
+}
+
+variable "lbr_reserved_ips" {
+ description = "To provision Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ lifetime = string
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+###################################
+####### Load Balancer Logs ########
+###################################
+
+variable "loadbalancer_log_groups" {
+ description = "To provision Log Groups for Load Balancers"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "loadbalancer_logs" {
+ description = "To provision Logs for Load Balancers"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+## Network Load Balancers ##
+#########################
+
+variable "network_load_balancers" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ is_private = optional(bool)
+ reserved_ips_id = string
+ is_preserve_source_destination = optional(bool)
+ is_symmetric_hash_enabled = optional(bool)
+ nlb_ip_version = optional(string)
+ assigned_private_ipv4 = optional(string)
+ nsg_ids = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "nlb_listeners" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ default_backend_set_name = string
+ port = number
+ protocol = string
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+
+variable "nlb_backend_sets" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ policy = string
+ protocol = string
+ domain_name = optional(string)
+ query_class = optional(string)
+ query_type = optional(string)
+ rcodes = optional(list(string))
+ transport_protocol = optional(string)
+ return_code = optional(number)
+ interval_in_millis = optional(number)
+ port = optional(number)
+ request_data = optional(string)
+ response_body_regex = optional(string)
+ response_data = optional(string)
+ retries = optional(number)
+ timeout_in_millis = optional(number)
+ url_path = optional(string)
+ is_preserve_source = optional(bool)
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_backends" {
+ type = map(object({
+ name = optional(string)
+ backend_set_name = string
+ network_load_balancer_id = string
+ port = number
+ ip_address = string
+ instance_compartment = string
+ is_drain = optional(bool)
+ is_backup = optional(bool)
+ is_offline = optional(bool)
+ weight = optional(number)
+ target_id = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_reserved_ips" {
+ description = "To provision Network Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ lifetime = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ }))
+ default = {}
+}
+
+
+#########################
+##### IP Management #####
+#########################
+
+variable "public_ip_pools" {
+ type = map(any)
+ default = {}
+}
+
+variable "private_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "reserved_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "vnic_attachments" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+##### VCN Logs ##########
+#########################
+
+variable "vcn_log_groups" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcn_logs" {
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### OSS Buckets ######
+#########################
+
+variable "buckets" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+####### OSS Logs ########
+#########################
+
+variable "oss_log_groups" {
+ description = "To provision Log Groups for OSS"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "oss_logs" {
+ description = "To provision Logs for OSS"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+### OSS IAM Policies ####
+#########################
+
+variable "oss_policies" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+## Management Services ##
+#########################
+
+variable "alarms" {
+ type = map(object({
+ compartment_id = string
+ destinations = list(string)
+ alarm_name = string
+ is_enabled = bool
+ metric_compartment_id = string
+ namespace = string
+ query = string
+ severity = string
+ body = optional(string)
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_notifications_per_metric_dimension_enabled = optional(bool)
+ metric_compartment_id_in_subtree = optional(string)
+ trigger_delay_minutes = optional(string)
+ repeat_notification_duration = optional(string)
+ resolution = optional(string)
+ resource_group = optional(string)
+ suppression = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "events" {
+ type = map(object({
+ event_name = string
+ compartment_id = string
+ description = string
+ is_enabled = bool
+ condition = string
+ actions = optional(list(object({
+ action_type = string
+ is_enabled = string
+ description = optional(string)
+ function_id = optional(string)
+ stream_id = optional(string)
+ topic_id = optional(string)
+ })))
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_topics" {
+ type = map(object({
+ compartment_id = string
+ topic_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_subscriptions" {
+ type = map(object({
+ compartment_id = string
+ endpoint = string
+ protocol = string
+ topic_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "service_connectors" {
+ type = any
+ default = {}
+ description = "To provision service connector hub resources"
+}
+
+#########################
+## Developer Services ##
+#########################
+
+## OKE
+
+variable "clusters" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ kubernetes_version = string
+ cni_type = string
+ cluster_type = string
+ is_policy_enabled = optional(bool)
+ policy_kms_key_id = optional(string)
+ is_kubernetes_dashboard_enabled = optional(bool)
+ is_tiller_enabled = optional(bool)
+ is_public_ip_enabled = optional(bool)
+ nsg_ids = optional(list(string))
+ endpoint_subnet_id = string
+ is_pod_security_policy_enabled = optional(bool)
+ pods_cidr = optional(string)
+ services_cidr = optional(string)
+ service_lb_subnet_ids = optional(list(string))
+ cluster_kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ lb_defined_tags = optional(map(any))
+ lb_freeform_tags = optional(map(any))
+ volume_defined_tags = optional(map(any))
+ volume_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_node_labels = optional(map(any))
+ kubernetes_version = string
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ availability_domain = number
+ fault_domains = optional(list(string))
+ subnet_id = string
+ size = number
+ cni_type = string
+ max_pods_per_node = optional(number)
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_ids = optional(string)
+ worker_nsg_ids = optional(list(string))
+ memory_in_gbs = optional(number)
+ ocpus = optional(number)
+ image_id = string
+ source_type = string
+ boot_volume_size_in_gbs = optional(number)
+ ssh_public_key = optional(string)
+ nodepool_kms_key_id = optional(string)
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "virtual-nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_virtual_node_labels = optional(map(any))
+ availability_domain = number
+ fault_domains = list(string)
+ subnet_id = string
+ size = number
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_id = string
+ worker_nsg_ids = optional(list(string))
+ taints = optional(list(any))
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+##################################
+############## SDDCs #############
+##################################
+variable "sddcs" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = string
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = string
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ initial_cluster_display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ management_datastore = optional(list(string))
+ workload_datastore = optional(list(string))
+
+ }))
+ default = {}
+
+}
+
+variable "sddc-clusters" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = optional(string)
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = optional(string)
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ workload_datastore = optional(list(string))
+ sddc_id = optional(string)
+ esxi_software_version = optional(string)
+
+ }))
+ default = {}
+
+}
+
+
+############################
+## Key Management Service ##
+############################
+
+variable "vaults" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_type = string
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ replica_region = optional(string)
+ }))
+ default = {}
+}
+
+variable "keys" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_name = string
+ algorithm = optional(string)
+ length = optional(string)
+ curve_id = optional(string)
+ protection_mode = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ is_auto_rotation_enabled = optional(bool)
+ rotation_interval_in_days = optional(string)
+
+ }))
+ default = {}
+}
+
+###########################
+######### Budgets #########
+###########################
+
+variable "budgets" {
+ type = map(object({
+ amount = string
+ compartment_id = string
+ reset_period = string
+ budget_processing_period_start_offset = optional(string)
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ processing_period_type = optional(string)
+ budget_end_date = optional(string)
+ budget_start_date = optional(string)
+ target_type = optional(string)
+ targets = optional(list(any))
+ }))
+ default = {}
+}
+
+variable "budget_alert_rules" {
+ type = map(object({
+ budget_id = string
+ threshold = string
+ threshold_type = string
+ type = string
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ message = optional(string)
+ recipients = optional(string)
+ }))
+ default = {}
+}
+
+###########################
+####### Cloud Guard #######
+###########################
+
+variable "cloud_guard_configs" {
+ type = map(object({
+ compartment_id = string
+ reporting_region = string
+ status = string
+ self_manage_resources = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "cloud_guard_targets" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ target_resource_id = string
+ target_resource_type = string
+ prefix = string
+ description = optional(string)
+ state = optional(string)
+ target_detector_recipes = optional(list(any))
+ target_responder_recipes = optional(list(any))
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+####################################
+####### Custom Backup Policy #######
+####################################
+
+variable "custom_backup_policies" {
+ type = map(any)
+ default = {}
+}
+
+variable "capacity_reservation_ocids" {
+ type = map(any)
+ default = {
+ "AD1" : "",
+ "AD2" : "",
+ "AD3" : ""
+ }
+}
+
+#####################################
+####### Firewall as a Service #######
+#####################################
+variable "firewalls" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ network_firewall_policy_id = string
+ subnet_id = string
+ vcn_name = string
+ display_name = string
+ ipv4address = optional(string)
+ nsg_id = optional(list(string))
+ ipv6address = optional(string)
+ availability_domain = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw-policies" {
+ type = map(object({
+ compartment_id = optional(string)
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "services" {
+ type = map(object({
+ service_name = string
+ service_type = string
+ network_firewall_policy_id = string
+ port_ranges = list(object({
+ minimum_port = string
+ maximum_port = optional(string)
+ }))
+ }))
+ default = {}
+}
+variable "url_lists" {
+ type = map(object({
+ urllist_name = string
+ network_firewall_policy_id = string
+ urls = list(object({
+ pattern = string
+ type = string
+ }))
+ }))
+ default = {}
+}
+variable "service_lists" {
+ type = map(object({
+ service_list_name = string
+ network_firewall_policy_id = string
+ services = list(string)
+ }))
+ default = {}
+}
+
+variable "address_lists" {
+ type = map(object({
+ address_list_name = string
+ network_firewall_policy_id = string
+ address_type = string
+ addresses = list(string)
+ }))
+ default = {}
+}
+
+variable "applications" {
+ type = map(object({
+ app_list_name = string
+ network_firewall_policy_id = string
+ app_type = string
+ icmp_type = number
+ icmp_code = optional(number)
+ }))
+ default = {}
+}
+
+variable "application_groups" {
+ type = map(object({
+ app_group_name = string
+ network_firewall_policy_id = string
+ apps = list(string)
+
+ }))
+ default = {}
+}
+
+variable "security_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+ application = optional(list(string))
+ destination_address = optional(list(string))
+ service = optional(list(string))
+ source_address = optional(list(string))
+ url = optional(list(string))
+ })))
+ inspection = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "secrets" {
+ type = map(object({
+ secret_name = string
+ network_firewall_policy_id = string
+ secret_source = string
+ secret_type = string
+ vault_secret_id = string
+ version_number = number
+ vault_name = string
+ vault_compartment_id = string
+ }))
+ default = {}
+}
+
+variable "decryption_profiles" {
+ type = map(object({
+ profile_name = string
+ profile_type = string
+ network_firewall_policy_id = string
+ are_certificate_extensions_restricted = optional(bool)
+ is_auto_include_alt_name = optional(bool)
+ is_expired_certificate_blocked = optional(bool)
+ is_out_of_capacity_blocked = optional(bool)
+ is_revocation_status_timeout_blocked = optional(bool)
+ is_unknown_revocation_status_blocked = optional(bool)
+ is_unsupported_cipher_blocked = optional(bool)
+ is_unsupported_version_blocked = optional(bool)
+ is_untrusted_issuer_blocked = optional(bool)
+ }))
+ default = {}
+}
+
+variable "decryption_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+
+ destination_address = optional(list(string))
+
+ source_address = optional(list(string))
+
+ })))
+ decryption_profile = optional(string)
+ secret = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+#########################
+####### Firewall Logs ########
+#########################
+
+variable "fw_log_groups" {
+ description = "To provision Log Groups for Network Firewall"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw_logs" {
+ description = "To provision Logs for Network Firewall"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+##########################
+# Add new variables here #
+##########################
+######################### END #########################
diff --git a/examples/dns/backend.tf b/examples/dns/backend.tf
new file mode 100644
index 0000000..16bc557
--- /dev/null
+++ b/examples/dns/backend.tf
@@ -0,0 +1,21 @@
+/*This line will be removed when using remote state
+# !!! WARNING !!! Terraform State Lock is not supported with OCI Object Storage.
+# Pre-Requisite: Create a version enabled object storage bucket to store the state file.
+# End Point Format: https://.compat.objectstorage..oraclecloud.com
+# Please look at the below doc for information about shared_credentials_file and other parameters:
+# Reference: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
+
+terraform {
+ backend "s3" {
+ key = ""
+ bucket = ""
+ region = ""
+ endpoint = ""
+ shared_credentials_file = "~/.aws/credentials"
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_metadata_api_check = true
+ force_path_style = true
+ }
+}
+This line will be removed when using remote state*/
\ No newline at end of file
diff --git a/examples/dns/dns.tf b/examples/dns/dns.tf
new file mode 100644
index 0000000..4175ac5
--- /dev/null
+++ b/examples/dns/dns.tf
@@ -0,0 +1,213 @@
+####################
+### DNS-Resolver ###
+####################
+
+
+data "oci_core_vcn_dns_resolver_association" "resolver_vcn_dns_resolver_association" {
+ for_each = var.resolvers != null ? var.resolvers : {}
+ vcn_id = data.oci_core_vcns.resolver_oci_vcns[each.key].virtual_networks.*.id[0]
+}
+
+data "oci_core_vcns" "resolver_oci_vcns" {
+ # depends_on = [module.vcns] # Uncomment to create resolver and vcn together
+ for_each = var.resolvers != null ? var.resolvers : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.vcn_name
+}
+
+### Data for Subnet ###
+
+locals {
+ subnets = flatten([
+ for resolver_key, res in var.resolvers : [
+ for e_key, endpoint in res.endpoint_names : {
+ vcn_name = res.vcn_name
+ network_compartment_id = res.network_compartment_id
+ subnet_name = endpoint.subnet_name
+ #subnet_name = trimprefix("${endpoint.subnet_name}", "${res.vcn_name}_")
+ resolver_key = resolver_key
+ endpoint_name = endpoint.name
+ }
+ ]
+ ])
+}
+
+data "oci_core_subnets" "resolver_oci_subnets" {
+ # depends_on = [module.subnets] # Uncomment to create resolver and subnets together
+ for_each = { for sn in local.subnets : "${sn.endpoint_name}_${sn.subnet_name}" => sn }
+ compartment_id = length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.subnet_name
+ vcn_id = data.oci_core_vcns.resolver_oci_vcns[each.value.resolver_key].virtual_networks.*.id[0]
+}
+### Data for NSGs###
+
+locals {
+ nsgs = flatten([
+ for resolver_key, res in var.resolvers : [
+ for e_key, endpoint in res.endpoint_names : [
+ for nsg in endpoint.nsg_ids : {
+ vcn_name = res.vcn_name
+ network_compartment_id = res.network_compartment_id
+ nsg_name = nsg
+ resolver_key = resolver_key
+ endpoint_name = endpoint.name
+ }
+ ]
+ ]
+ ])
+}
+data "oci_core_network_security_groups" "resolver_network_security_groups" {
+ for_each = { for nsg in local.nsgs : "${nsg.endpoint_name}_${nsg.nsg_name}" => nsg }
+ compartment_id = length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.nsg_name
+ vcn_id = data.oci_core_vcns.resolver_oci_vcns[each.value.resolver_key].virtual_networks.*.id[0]
+}
+### Data for Views ###
+locals {
+ resolver_views = flatten([
+ for resolver_key, res in var.resolvers : [
+ for view_key, view in res.views : {
+ resolver_key = resolver_key
+ view_key = view_key
+ view_name = view.view_id
+ view_compartment = view.view_compartment_id
+ }
+ ]
+ ])
+}
+
+data "oci_dns_views" "resolver_views_data" {
+ #Required
+ for_each = { for rv in local.resolver_views : "${rv.view_key}" => rv }
+ compartment_id = length(regexall("ocid1.compartment.oc*", each.value.view_compartment)) > 0 ? each.value.view_compartment : var.compartment_ocids[each.value.view_compartment]
+ scope = "PRIVATE"
+ #Optional
+ display_name = each.value.view_name
+ state = "ACTIVE"
+}
+
+### Module ###
+module "dns-resolvers" {
+ source = "./modules/network/dns/dns_resolver"
+ # depends_on = [module.nsgs] # Uncomment to create NSG and DNS Resolvers together
+ for_each = var.resolvers != null ? var.resolvers : {}
+ target_resolver_id = data.oci_core_vcn_dns_resolver_association.resolver_vcn_dns_resolver_association[each.key].*.dns_resolver_id[0]
+ resolver_scope = "PRIVATE"
+ resolver_display_name = each.value.display_name != null ? each.value.display_name : null
+ views = each.value.views != null ? {
+ for v_key, view in each.value.views : v_key => {
+ view_id = length(regexall("ocid1.dnsview.oc*", view.view_id)) > 0 ? view.view_id : try(data.oci_dns_views.resolver_views_data["${v_key}"].views.*.id[0], module.dns-views[view.view_id]["dns_view_id"])
+ }
+ } : null
+
+ resolver_rules = each.value.resolver_rules != null ? each.value.resolver_rules : null
+ resolver_defined_tags = try(each.value.defined_tags, null)
+ resolver_freeform_tags = try(each.value.freeform_tags, null)
+ endpoint_names = each.value.endpoint_names != null ? {
+ for key, endpoint in each.value.endpoint_names : key => {
+ forwarding = endpoint.is_forwarding
+ listening = endpoint.is_listening
+ name = endpoint.name
+ #resolver_id = oci_dns_resolver.test_resolver.id
+ subnet_id = length(regexall("ocid1.subnet.oc*", endpoint.subnet_name)) > 0 ? endpoint.subnet_name : data.oci_core_subnets.resolver_oci_subnets["${endpoint.name}_${endpoint.subnet_name}"].subnets.*.id[0]
+ scope = "PRIVATE"
+
+ #Optional
+ endpoint_type = "VNIC"
+ forwarding_address = endpoint.forwarding_address
+ listening_address = endpoint.listening_address
+ nsg_ids = endpoint.nsg_ids != null ? flatten(tolist([for nsg in endpoint.nsg_ids : (length(regexall("ocid1.networksecuritygroup.oc*", nsg)) > 0 ? [nsg] : data.oci_core_network_security_groups.resolver_network_security_groups["${endpoint.name}_${nsg}"].network_security_groups[*].id)])) : null
+
+ }
+ } : null
+
+}
+
+##################
+### DNS-RRsets ###
+##################
+data "oci_dns_views" "rrset_views_data" {
+ #Required
+ for_each = var.rrsets
+ compartment_id = each.value.view_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.view_compartment_id)) > 0 ? each.value.view_compartment_id : var.compartment_ocids[each.value.view_compartment_id]) : null
+ scope = "PRIVATE"
+
+ #Optional
+ display_name = each.value.view_id
+ state = "ACTIVE"
+}
+
+data "oci_dns_zones" "rrset_zones_data" {
+ for_each = { for k, v in var.rrsets : k => v if try(data.oci_dns_views.rrset_views_data[k].views.*.id[0], 0) != 0 }
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+
+ #Optional
+ name = each.value.zone_id
+ scope = "PRIVATE"
+ state = "ACTIVE"
+ view_id = length(regexall("ocid1.dnsview.oc*", each.value.view_id)) > 0 ? each.value.view_id : try(data.oci_dns_views.rrset_views_data[each.key].views.*.id[0], module.dns-views[each.value.view_id]["dns_view_id"])
+}
+
+module "dns-rrsets" {
+ source = "./modules/network/dns/rrset"
+ for_each = var.rrsets != null ? var.rrsets : {}
+ depends_on = [module.dns-views, module.dns-zones]
+ rrset_zone = try(data.oci_dns_zones.rrset_zones_data[each.key].zones.*.id[0], module.dns-zones[join("_", [each.value.view_id, replace(each.value.zone_id, ".", "_")])]["dns_zone_id"])
+ #rrset_view_id = each.value.view_id != "" ? (length(regexall("ocid1.dnsview.oc*", each.value.view_id)) > 0 ? each.value.view_id : data.oci_dns_views.rrset_views_data[each.key].views.*.id[0]) : null
+ rrset_view_id = length(regexall("ocid1.dnsview.oc*", each.value.view_id)) > 0 ? each.value.view_id : try(data.oci_dns_views.rrset_views_data[each.key].views.*.id[0], module.dns-views[each.value.view_id]["dns_view_id"])
+ rrset_domain = each.value.domain
+ rrset_rtype = each.value.rtype
+ rrset_ttl = each.value.ttl
+ #rrset_compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ rrset_rdata = each.value.rdata
+ rrset_scope = "PRIVATE"
+
+}
+#output "zone_id" {
+#value = { for key, value in var.rrsets: key => module.dns-zones[join("_", [value.view_id,replace(value.zone_id, ".", "_")])]["dns_zone_id"]}
+#}
+#
+#output "zone_data" {
+#value = { for key, value in var.rrsets: key => data.oci_dns_zones.rrset_zones_data[key].zones.*.id[0]}
+#}
+
+#################
+### DNS-Zones ###
+#################
+data "oci_dns_views" "zone_views_data" {
+ #Required
+ for_each = { for k, v in var.zones : k => v if v.view_id != null }
+ compartment_id = length(regexall("ocid1.compartment.oc*", each.value.view_compartment_id)) > 0 ? each.value.view_compartment_id : var.compartment_ocids[each.value.view_compartment_id]
+ scope = "PRIVATE"
+ display_name = each.value.view_id
+ state = "ACTIVE"
+}
+
+module "dns-zones" {
+ source = "./modules/network/dns/zone"
+ depends_on = [module.dns-views]
+ for_each = { for k, v in var.zones : k => v if var.zones != null }
+ zone_compartment_id = length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]
+ zone_name = each.value.display_name
+ zone_type = "PRIMARY"
+ zone_defined_tags = try(each.value.defined_tags, null)
+ zone_freeform_tags = try(each.value.freeform_tags, null)
+ #external_masters = each.value.external_masters != null ? each.value.external_masters : {}
+ zone_scope = "PRIVATE"
+ view_id = length(regexall("ocid1.dnsview.oc*", each.value.view_id)) > 0 ? each.value.view_id : try(data.oci_dns_views.zone_views_data[each.key].views.*.id[0], module.dns-views[each.value.view_id]["dns_view_id"])
+}
+
+#################
+### DNS-Views ###
+#################
+
+module "dns-views" {
+ source = "./modules/network/dns/view"
+ for_each = var.views != null ? var.views : {}
+ view_compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ view_display_name = each.value.display_name
+ view_scope = try((each.value.scope != null ? (each.value.scope == "PRIVATE" ? each.value.scope : null) : null), null)
+ view_defined_tags = try(each.value.defined_tags, null)
+ view_freeform_tags = try(each.value.freeform_tags, null)
+
+}
\ No newline at end of file
diff --git a/examples/dns/oci-data.tf b/examples/dns/oci-data.tf
new file mode 100644
index 0000000..1495707
--- /dev/null
+++ b/examples/dns/oci-data.tf
@@ -0,0 +1,42 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Resource Block - Identity
+# Fetch Compartments
+############################
+
+#Fetch Compartment Details
+data "oci_identity_compartments" "compartments" {
+ #Required
+ compartment_id = var.tenancy_ocid
+
+ #Optional
+ #name = var.compartment_name
+ access_level = "ANY"
+ compartment_id_in_subtree = true
+ state = "ACTIVE"
+}
+
+
+############################
+# Data Block - Network
+# Fetch ADs
+############################
+
+data "oci_identity_availability_domains" "availability_domains" {
+ #Required
+ compartment_id = var.tenancy_ocid
+}
+
+
+/*
+output "compartment_id_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ value = zipmap(data.oci_identity_compartments.compartments.compartments.*.name,data.oci_identity_compartments.compartments.compartments.*.id)
+}
+
+output "ads" {
+ value = data.oci_identity_availability_domains.availability_domains.availability_domains.*.name
+}
+*/
\ No newline at end of file
diff --git a/examples/dns/provider.tf b/examples/dns/provider.tf
new file mode 100644
index 0000000..9a69c98
--- /dev/null
+++ b/examples/dns/provider.tf
@@ -0,0 +1,24 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Provider Block
+# OCI
+############################
+
+provider "oci" {
+ tenancy_ocid = var.tenancy_ocid
+ user_ocid = var.user_ocid
+ fingerprint = var.fingerprint
+ private_key_path = var.private_key_path
+ region = var.region
+ ignore_defined_tags = ["Oracle-Tags.CreatedBy", "Oracle-Tags.CreatedOn"]
+}
+
+terraform {
+ required_providers {
+ oci = {
+ source = "oracle/oci"
+ version = "5.40.0"
+ }
+ }
+}
diff --git a/examples/dns/variables_example.tf b/examples/dns/variables_example.tf
new file mode 100644
index 0000000..fae17ea
--- /dev/null
+++ b/examples/dns/variables_example.tf
@@ -0,0 +1,2082 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+#
+# Variables Block
+# OCI
+#
+############################
+
+variable "tenancy_ocid" {
+ type = string
+ default = ""
+}
+
+variable "user_ocid" {
+ type = string
+ default = ""
+}
+
+variable "fingerprint" {
+ type = string
+ default = ""
+}
+
+variable "private_key_path" {
+ type = string
+ default = ""
+}
+
+variable "region" {
+ type = string
+ default = ""
+}
+
+#################################
+# SSH Keys
+#################################
+
+variable "instance_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_instance_ssh_keys#
+ # exported instance ssh keys
+ #instance_ssh_keys_END#
+ }
+}
+
+variable "oke_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_oke_ssh_keys#
+ #oke_ssh_keys_END#
+ }
+}
+variable "sddc_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_sddc_ssh_keys#
+ #sddc_ssh_keys_END#
+ }
+}
+
+variable "exacs_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_exacs_ssh_keys#
+ # exported exacs ssh keys
+ #exacs_ssh_keys_END#
+ }
+}
+
+variable "dbsystem_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_dbsystem_ssh_keys#
+ # exported dbsystem ssh keys
+ #dbsystem_ssh_keys_END#
+ }
+}
+
+#################################
+# Platform Image OCIDs and
+# Market Place Images
+#################################
+
+variable "instance_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ Windows = ""
+ PaloAlto = "Palo Alto Networks VM-Series Next Generation Firewall"
+ #START_instance_source_ocids#
+ # exported instance image ocids
+ #instance_source_ocids_END#
+ }
+}
+
+variable "blockvolume_source_ocids" {
+ type = map(any)
+ default = {
+ block1 = ""
+ #blockvolume_source_ocid = ""
+ #START_blockvolume_source_ocids#
+ # exported block volume source ocids
+ #blockvolume_source_ocids_END#
+ }
+}
+
+variable "fss_source_ocids" {
+ type = map(any)
+ default = {
+ snapshot1 = ""
+ #fss_source_snapshot_ocid = ""
+ #START_fss_source_snapshot_ocids#
+ # exported fss source snapshot ocids
+ #fss_source_snapshot_ocids_END#
+ }
+}
+
+variable "oke_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ #START_oke_source_ocids#
+ # exported oke image ocids
+ #oke_source_ocids_END#
+ }
+}
+
+#################################
+#
+# Variables according to Services
+# PLEASE DO NOT MODIFY
+#
+#################################
+
+##########################
+## Fetch Compartments ####
+##########################
+
+variable "compartment_ocids" {
+ type = map(any)
+ default = {
+ #START_compartment_ocids#
+ # compartment ocids
+ #compartment_ocids_END#
+ }
+}
+
+#########################
+##### Identity ##########
+#########################
+
+variable "compartments" {
+ type = object({
+ root = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level1 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level2 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level3 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level4 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level5 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ })
+ default = {
+ root = {},
+ compartment_level1 = {},
+ compartment_level2 = {},
+ compartment_level3 = {},
+ compartment_level4 = {},
+ compartment_level5 = {},
+ }
+}
+
+variable "policies" {
+ type = map(object({
+ name = string
+ compartment_id = string
+ policy_description = string
+ policy_statements = list(string)
+ policy_version_date = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "groups" {
+ type = map(object({
+ group_name = string
+ group_description = string
+ matching_rule = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "users" {
+ type = map(object({
+ name = string
+ description = string
+ email = string
+ disable_capabilities = optional(list(string))
+ group_membership = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "networkSources" {
+ type = map(object({
+ name = string
+ description = string
+ public_source_list = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ virtual_source_list = optional(list(map(list(string))))
+
+ }))
+ default = {}
+}
+
+#########################
+####### Governance #########
+#########################
+
+variable "tag_namespaces" {
+ description = "To provision Namespaces"
+ type = map(object({
+ compartment_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_retired = optional(bool)
+ }))
+ default = {}
+}
+
+variable "tag_keys" {
+ description = "To provision Tag Keys"
+ type = map(object({
+ tag_namespace_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_cost_tracking = optional(bool)
+ is_retired = optional(bool)
+ validator = optional(list(object({
+ validator_type = optional(string)
+ validator_values = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "tag_defaults" {
+ description = "To make the Tag keys as default to compartments"
+ type = map(object({
+ compartment_id = string
+ tag_definition_id = string
+ value = string
+ is_required = optional(bool)
+ }))
+ default = {}
+}
+
+variable "quota_policies" {
+ type = map(object({
+ quota_name = string
+ quota_description = string
+ quota_statements = list(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### Network ##########
+#########################
+
+variable "default_dhcps" {
+ type = map(object({
+ server_type = string
+ manage_default_resource_id = optional(string)
+ custom_dns_servers = optional(list(any))
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "custom_dhcps" {
+ type = map(object({
+ compartment_id = string
+ server_type = string
+ vcn_id = string
+ custom_dns_servers = optional(list(any))
+ domain_name_type = optional(string)
+ display_name = optional(string)
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcns" {
+ type = map(object({
+ compartment_id = string
+ cidr_blocks = optional(list(string))
+ byoipv6cidr_details = optional(list(map(any)))
+ display_name = optional(string)
+ dns_label = optional(string)
+ is_ipv6enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ipv6private_cidr_blocks = optional(list(string))
+ is_oracle_gua_allocation_enabled = optional(bool)
+ }))
+ default = {}
+}
+
+variable "igws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ enable_igw = optional(bool)
+ igw_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_table_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "sgws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ service = optional(string)
+ sgw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "ngws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ block_traffic = optional(bool)
+ public_ip_id = optional(string)
+ ngw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "lpgs" {
+ type = map(any)
+ default = {
+ hub-lpgs = {},
+ spoke-lpgs = {},
+ peer-lpgs = {},
+ none-lpgs = {},
+ exported-lpgs = {},
+ }
+}
+
+variable "drgs" {
+ type = map(object({
+ compartment_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "default_seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+
+}))
+default = {}
+}
+
+variable "default_route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+}))
+ default = {}
+}
+
+variable "nsgs" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nsg_rules" {
+ type = map(object({
+ nsg_id = string
+ direction = string
+ protocol = string
+ description = optional(string)
+ stateless = optional(string)
+ source_type = optional(string)
+ destination_type = optional(string)
+ destination = optional(string)
+ source = optional(string)
+ options = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "subnets" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ cidr_block = string
+ display_name = optional(string)
+ dns_label = optional(string)
+ ipv6cidr_block = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ prohibit_internet_ingress = optional(string)
+ prohibit_public_ip_on_vnic = optional(string)
+ availability_domain = optional(string)
+ dhcp_options_id = optional(string)
+ route_table_id = optional(string)
+ security_list_ids = optional(list(string))
+ }))
+ default = {}
+}
+
+variable "vlans" {
+ type = map(object({
+ cidr_block = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ nsg_ids = optional(list(string))
+ route_table_name = optional(string)
+ vlan_tag = optional(string)
+ availability_domain = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "drg_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_other_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_tables" {
+ type = map(object({
+ drg_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_ecmp_enabled = optional(bool)
+ import_drg_route_distribution_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_rules" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_distributions" {
+ type = map(object({
+ distribution_type = string
+ drg_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_distribution_statements" {
+ type = map(object({
+ drg_route_distribution_id = string
+ action = string
+ match_criteria = optional(list(object({
+ match_type = string
+ attachment_type = optional(string)
+ drg_attachment_id = optional(string)
+ })))
+ priority = optional(string)
+ }))
+ default = {}
+}
+
+variable "data_drg_route_tables" {
+ type = map(any)
+ default = {}
+}
+
+variable "data_drg_route_table_distributions" {
+ type = map(any)
+ default = {}
+}
+
+####################
+####### DNS #######
+####################
+
+variable "zones" {
+type = map(object({
+compartment_id = string
+display_name = string
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_type = optional(string)
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+variable "views" {
+type = map(object({
+compartment_id = string
+display_name = string
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+ default = {}
+}
+
+variable "rrsets" {
+type = map(object({
+compartment_id = optional(string)
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_id = string
+domain = string
+rtype = string
+ttl = number
+rdata = optional(list(string))
+scope = optional(string)
+}))
+default = {}
+}
+
+variable "resolvers" {
+type = map(object({
+network_compartment_id= string
+vcn_name = string
+display_name = optional(string)
+views = optional(map(object({
+ view_id = optional(string)
+ view_compartment_id = optional(string)
+})))
+resolver_rules = optional(map(object({
+ client_address_conditions = optional(list(any))
+ destination_addresses = optional(list(any))
+ qname_cover_conditions = optional(list(any))
+ source_endpoint_name = optional(string)
+})))
+endpoint_names = optional(map(object({
+ is_forwarding = optional(bool)
+ is_listening = optional(bool)
+ name = optional(string)
+ subnet_name = optional(string)
+ forwarding_address = optional(string)
+ listening_address = optional(string)
+ nsg_ids = optional(list(string))
+})))
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+
+#########################
+## Dedicated VM Hosts ##
+#########################
+
+variable "dedicated_hosts" {
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ vm_host_shape = string
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ fault_domain = optional(string)
+ freeform_tags = optional(map(any))
+ }))
+ description = "To provision new dedicated VM hosts"
+ default = {}
+}
+
+#########################
+## Instances/Block Volumes ##
+#########################
+
+variable "blockvolumes" {
+ description = "To provision block volumes"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = string
+ size_in_gbs = optional(string)
+ is_auto_tune_enabled = optional(string)
+ vpus_per_gb = optional(string)
+ kms_key_id = optional(string)
+ attach_to_instance = optional(string)
+ attachment_type = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ device = optional(string)
+ encryption_in_transit_type = optional(string)
+ attachment_display_name = optional(string)
+ is_read_only = optional(bool)
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ is_shareable = optional(bool)
+ use_chap = optional(bool)
+ is_agent_auto_iscsi_login_enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ source_details = optional(list(map(any)))
+ block_volume_replicas = optional(list(map(any)))
+ block_volume_replicas_deletion = optional(bool)
+ autotune_policies = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "block_backup_policies" {
+ type = map(any)
+ description = "To create block volume back policy"
+ default = {}
+}
+
+variable "instances" {
+ description = "Map of instances to be provisioned"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ shape = string
+ source_id = string
+ source_type = string
+ vcn_name = string
+ subnet_id = string
+ network_compartment_id = string
+ display_name = optional(string)
+ assign_public_ip = optional(bool)
+ boot_volume_size_in_gbs = optional(string)
+ fault_domain = optional(string)
+ dedicated_vm_host_id = optional(string)
+ private_ip = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(string))
+ ocpus = optional(string)
+ memory_in_gbs = optional(number)
+ capacity_reservation_id = optional(string)
+ create_is_pv_encryption_in_transit_enabled = optional(bool)
+ remote_execute = optional(string)
+ bastion_ip = optional(string)
+ cloud_init_script = optional(string)
+ ssh_authorized_keys = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ network_type = optional(string)
+ #extended_metadata = optional(string)
+ skip_source_dest_check = optional(bool)
+ baseline_ocpu_utilization = optional(string)
+ #preemptible_instance_config = optional(string)
+ all_plugins_disabled = optional(bool)
+ is_management_disabled = optional(bool)
+ is_monitoring_disabled = optional(bool)
+ assign_private_dns_record = optional(string)
+ plugins_details = optional(map(any))
+ is_live_migration_preferred = optional(bool)
+ recovery_action = optional(string)
+ are_legacy_imds_endpoints_disabled = optional(bool)
+ boot_volume_type = optional(string)
+ firmware = optional(string)
+ is_consistent_volume_naming_enabled = optional(bool)
+ remote_data_volume_type = optional(string)
+ platform_config = optional(list(map(any)))
+ launch_options = optional(list(map(any)))
+ ipxe_script = optional(string)
+ preserve_boot_volume = optional(bool)
+ vlan_id = optional(string)
+ kms_key_id = optional(string)
+ vnic_display_name = optional(string)
+ vnic_defined_tags = optional(map(any))
+ vnic_freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "boot_backup_policies" {
+ type = map(any)
+ description = "Map of boot volume backup policies to be provisioned"
+ default = {}
+}
+
+#########################
+####### Database ########
+#########################
+
+variable "exa_infra" {
+ description = "To provision exadata infrastructure"
+ type = map(any)
+ default = {}
+}
+
+variable "exa_vmclusters" {
+ description = "To provision exadata cloud VM cluster"
+ type = map(any)
+ default = {}
+}
+
+variable "dbsystems_vm_bm" {
+ description = "To provision DB System"
+ type = map(any)
+ default = {}
+}
+
+variable "db_home" {
+ type = map(any)
+ description = "Map of database db home to be provisioned"
+ default = {}
+}
+
+variable "databases" {
+ description = "Map of databases to be provisioned in an existing db_home"
+ type = map(any)
+ default = {}
+}
+
+####################################
+####### Autonomous Database ########
+####################################
+
+variable "adb" {
+ type = map(object({
+ admin_password = optional(string)
+ character_set = optional(string)
+ compartment_id = string
+ cpu_core_count = optional(number)
+ database_edition = optional(string)
+ data_storage_size_in_tbs = optional(number)
+ customer_contacts = optional(list(string))
+ db_name = string
+ db_version = optional(string)
+ db_workload = optional(string)
+ display_name = optional(string)
+ license_model = optional(string)
+ ncharacter_set = optional(string)
+ network_compartment_id = optional(string)
+ nsg_ids = optional(list(string))
+ subnet_id = optional(string)
+ vcn_name = optional(string)
+ whitelisted_ips = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+######### FSS ###########
+#########################
+
+variable "mount_targets" {
+ description = "To provision Mount Targets"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ display_name = optional(string)
+ ip_address = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fss" {
+ description = "To provision File System Services"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = optional(string)
+ source_snapshot = optional(string)
+ snapshot_policy = optional(string)
+ policy_compartment_id = optional(string)
+ kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_export_options" {
+ description = "To provision Export Sets"
+ type = map(object({
+ export_set_id = string
+ file_system_id = string
+ path = string
+ export_options = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_idmap_groups_for_sys_auth = optional(bool)
+ }))
+ default = {}
+}
+
+variable "fss_replication" {
+ description = "To provision File System Replication"
+ type = map(object({
+ compartment_id = string
+ source_id = string
+ target_id = string
+ display_name = optional(string)
+ replication_interval = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+####### FSS Logs ########
+#########################
+
+variable "nfs_log_groups" {
+ description = "To provision Log Groups for Mount Target"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_logs" {
+ description = "To provision Logs for Mount Target"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+#########################
+#### Load Balancers #####
+#########################
+
+variable "load_balancers" {
+ description = "To provision Load Balancers"
+ type = map(object({
+ compartment_id = string
+ vcn_name = string
+ shape = string
+ subnet_ids = list(any)
+ network_compartment_id = string
+ display_name = string
+ shape_details = optional(list(map(any)))
+ nsg_ids = optional(list(any))
+ is_private = optional(bool)
+ ip_mode = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ reserved_ips_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "hostnames" {
+ description = "To provision Load Balancer Hostnames"
+ type = map(object({
+ load_balancer_id = string
+ hostname = string
+ name = string
+ }))
+ default = {}
+}
+
+variable "certificates" {
+ description = "To provision Load Balancer Certificates"
+ type = map(object({
+ certificate_name = string
+ load_balancer_id = string
+ ca_certificate = optional(string)
+ passphrase = optional(string)
+ private_key = optional(string)
+ public_certificate = optional(string)
+ }))
+ default = {}
+}
+
+variable "cipher_suites" {
+ description = "To provision Load Balancer Cipher Suites"
+ type = map(object({
+ ciphers = list(string)
+ name = string
+ load_balancer_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "backend_sets" {
+ description = "To provision Load Balancer Backend Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ policy = string
+ protocol = optional(string)
+ interval_ms = optional(string)
+ is_force_plain_text = optional(string)
+ port = optional(string)
+ response_body_regex = optional(string)
+ retries = optional(string)
+ return_code = optional(string)
+ timeout_in_millis = optional(string)
+ url_path = optional(string)
+ lb_cookie_session = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ path = optional(string)
+ domain = optional(string)
+ is_http_only = optional(string)
+ is_secure = optional(string)
+ max_age_in_seconds = optional(string)
+ })))
+ session_persistence_configuration = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ })))
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "backends" {
+ description = "To provision Load Balancer Backends"
+ type = map(object({
+ backendset_name = string
+ ip_address = string
+ load_balancer_id = string
+ port = string
+ instance_compartment = optional(string)
+ backup = optional(string)
+ drain = optional(string)
+ offline = optional(string)
+ weight = optional(string)
+ }))
+ default = {}
+}
+
+variable "listeners" {
+ description = "To provision Load Balancer Listeners"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ port = string
+ protocol = string
+ default_backend_set_name = string
+ connection_configuration = optional(list(map(any)))
+ hostname_names = optional(list(any))
+ path_route_set_name = optional(string)
+ rule_set_names = optional(list(any))
+ routing_policy_name = optional(string)
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "path_route_sets" {
+ description = "To provision Load Balancer Path Route Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ path_routes = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "rule_sets" {
+ description = "To provision Load Balancer Rule Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ access_control_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ description = optional(string)
+ })))
+ access_control_method_rules = optional(list(object({
+ action = string
+ allowed_methods = optional(list(any))
+ status_code = optional(string)
+ })))
+ http_header_rules = optional(list(object({
+ action = string
+ are_invalid_characters_allowed = optional(bool)
+ http_large_header_size_in_kb = optional(string)
+ })))
+ uri_redirect_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ operator = optional(string)
+ host = optional(string)
+ path = optional(string)
+ port = optional(string)
+ protocol = optional(string)
+ query = optional(string)
+ response_code = optional(string)
+ })))
+ request_response_header_rules = optional(list(object({
+ action = string
+ header = optional(string)
+ prefix = optional(string)
+ suffix = optional(string)
+ value = optional(string)
+ })))
+ }))
+ default = {}
+}
+
+variable "lbr_reserved_ips" {
+ description = "To provision Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ lifetime = string
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+###################################
+####### Load Balancer Logs ########
+###################################
+
+variable "loadbalancer_log_groups" {
+ description = "To provision Log Groups for Load Balancers"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "loadbalancer_logs" {
+ description = "To provision Logs for Load Balancers"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+## Network Load Balancers ##
+#########################
+
+variable "network_load_balancers" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ is_private = optional(bool)
+ reserved_ips_id = string
+ is_preserve_source_destination = optional(bool)
+ is_symmetric_hash_enabled = optional(bool)
+ nlb_ip_version = optional(string)
+ assigned_private_ipv4 = optional(string)
+ nsg_ids = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "nlb_listeners" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ default_backend_set_name = string
+ port = number
+ protocol = string
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+
+variable "nlb_backend_sets" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ policy = string
+ protocol = string
+ domain_name = optional(string)
+ query_class = optional(string)
+ query_type = optional(string)
+ rcodes = optional(list(string))
+ transport_protocol = optional(string)
+ return_code = optional(number)
+ interval_in_millis = optional(number)
+ port = optional(number)
+ request_data = optional(string)
+ response_body_regex = optional(string)
+ response_data = optional(string)
+ retries = optional(number)
+ timeout_in_millis = optional(number)
+ url_path = optional(string)
+ is_preserve_source = optional(bool)
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_backends" {
+ type = map(object({
+ name = optional(string)
+ backend_set_name = string
+ network_load_balancer_id = string
+ port = number
+ ip_address = string
+ instance_compartment = string
+ is_drain = optional(bool)
+ is_backup = optional(bool)
+ is_offline = optional(bool)
+ weight = optional(number)
+ target_id = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_reserved_ips" {
+ description = "To provision Network Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ lifetime = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ }))
+ default = {}
+}
+
+
+#########################
+##### IP Management #####
+#########################
+
+variable "public_ip_pools" {
+ type = map(any)
+ default = {}
+}
+
+variable "private_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "reserved_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "vnic_attachments" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+##### VCN Logs ##########
+#########################
+
+variable "vcn_log_groups" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcn_logs" {
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### OSS Buckets ######
+#########################
+
+variable "buckets" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+####### OSS Logs ########
+#########################
+
+variable "oss_log_groups" {
+ description = "To provision Log Groups for OSS"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "oss_logs" {
+ description = "To provision Logs for OSS"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+### OSS IAM Policies ####
+#########################
+
+variable "oss_policies" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+## Management Services ##
+#########################
+
+variable "alarms" {
+ type = map(object({
+ compartment_id = string
+ destinations = list(string)
+ alarm_name = string
+ is_enabled = bool
+ metric_compartment_id = string
+ namespace = string
+ query = string
+ severity = string
+ body = optional(string)
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_notifications_per_metric_dimension_enabled = optional(bool)
+ metric_compartment_id_in_subtree = optional(string)
+ trigger_delay_minutes = optional(string)
+ repeat_notification_duration = optional(string)
+ resolution = optional(string)
+ resource_group = optional(string)
+ suppression = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "events" {
+ type = map(object({
+ event_name = string
+ compartment_id = string
+ description = string
+ is_enabled = bool
+ condition = string
+ actions = optional(list(object({
+ action_type = string
+ is_enabled = string
+ description = optional(string)
+ function_id = optional(string)
+ stream_id = optional(string)
+ topic_id = optional(string)
+ })))
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_topics" {
+ type = map(object({
+ compartment_id = string
+ topic_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_subscriptions" {
+ type = map(object({
+ compartment_id = string
+ endpoint = string
+ protocol = string
+ topic_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "service_connectors" {
+ type = any
+ default = {}
+ description = "To provision service connector hub resources"
+}
+
+#########################
+## Developer Services ##
+#########################
+
+## OKE
+
+variable "clusters" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ kubernetes_version = string
+ cni_type = string
+ cluster_type = string
+ is_policy_enabled = optional(bool)
+ policy_kms_key_id = optional(string)
+ is_kubernetes_dashboard_enabled = optional(bool)
+ is_tiller_enabled = optional(bool)
+ is_public_ip_enabled = optional(bool)
+ nsg_ids = optional(list(string))
+ endpoint_subnet_id = string
+ is_pod_security_policy_enabled = optional(bool)
+ pods_cidr = optional(string)
+ services_cidr = optional(string)
+ service_lb_subnet_ids = optional(list(string))
+ cluster_kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ lb_defined_tags = optional(map(any))
+ lb_freeform_tags = optional(map(any))
+ volume_defined_tags = optional(map(any))
+ volume_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_node_labels = optional(map(any))
+ kubernetes_version = string
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ availability_domain = number
+ fault_domains = optional(list(string))
+ subnet_id = string
+ size = number
+ cni_type = string
+ max_pods_per_node = optional(number)
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_ids = optional(string)
+ worker_nsg_ids = optional(list(string))
+ memory_in_gbs = optional(number)
+ ocpus = optional(number)
+ image_id = string
+ source_type = string
+ boot_volume_size_in_gbs = optional(number)
+ ssh_public_key = optional(string)
+ nodepool_kms_key_id = optional(string)
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "virtual-nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_virtual_node_labels = optional(map(any))
+ availability_domain = number
+ fault_domains = list(string)
+ subnet_id = string
+ size = number
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_id = string
+ worker_nsg_ids = optional(list(string))
+ taints = optional(list(any))
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+##################################
+############## SDDCs #############
+##################################
+variable "sddcs" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = string
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = string
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ initial_cluster_display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ management_datastore = optional(list(string))
+ workload_datastore = optional(list(string))
+
+ }))
+ default = {}
+
+}
+
+variable "sddc-clusters" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = optional(string)
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = optional(string)
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ workload_datastore = optional(list(string))
+ sddc_id = optional(string)
+ esxi_software_version = optional(string)
+
+ }))
+ default = {}
+
+}
+
+
+############################
+## Key Management Service ##
+############################
+
+variable "vaults" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_type = string
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ replica_region = optional(string)
+ }))
+ default = {}
+}
+
+variable "keys" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_name = string
+ algorithm = optional(string)
+ length = optional(string)
+ curve_id = optional(string)
+ protection_mode = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ is_auto_rotation_enabled = optional(bool)
+ rotation_interval_in_days = optional(string)
+
+ }))
+ default = {}
+}
+
+###########################
+######### Budgets #########
+###########################
+
+variable "budgets" {
+ type = map(object({
+ amount = string
+ compartment_id = string
+ reset_period = string
+ budget_processing_period_start_offset = optional(string)
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ processing_period_type = optional(string)
+ budget_end_date = optional(string)
+ budget_start_date = optional(string)
+ target_type = optional(string)
+ targets = optional(list(any))
+ }))
+ default = {}
+}
+
+variable "budget_alert_rules" {
+ type = map(object({
+ budget_id = string
+ threshold = string
+ threshold_type = string
+ type = string
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ message = optional(string)
+ recipients = optional(string)
+ }))
+ default = {}
+}
+
+###########################
+####### Cloud Guard #######
+###########################
+
+variable "cloud_guard_configs" {
+ type = map(object({
+ compartment_id = string
+ reporting_region = string
+ status = string
+ self_manage_resources = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "cloud_guard_targets" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ target_resource_id = string
+ target_resource_type = string
+ prefix = string
+ description = optional(string)
+ state = optional(string)
+ target_detector_recipes = optional(list(any))
+ target_responder_recipes = optional(list(any))
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+####################################
+####### Custom Backup Policy #######
+####################################
+
+variable "custom_backup_policies" {
+ type = map(any)
+ default = {}
+}
+
+variable "capacity_reservation_ocids" {
+ type = map(any)
+ default = {
+ "AD1" : "",
+ "AD2" : "",
+ "AD3" : ""
+ }
+}
+
+#####################################
+####### Firewall as a Service #######
+#####################################
+variable "firewalls" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ network_firewall_policy_id = string
+ subnet_id = string
+ vcn_name = string
+ display_name = string
+ ipv4address = optional(string)
+ nsg_id = optional(list(string))
+ ipv6address = optional(string)
+ availability_domain = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw-policies" {
+ type = map(object({
+ compartment_id = optional(string)
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "services" {
+ type = map(object({
+ service_name = string
+ service_type = string
+ network_firewall_policy_id = string
+ port_ranges = list(object({
+ minimum_port = string
+ maximum_port = optional(string)
+ }))
+ }))
+ default = {}
+}
+variable "url_lists" {
+ type = map(object({
+ urllist_name = string
+ network_firewall_policy_id = string
+ urls = list(object({
+ pattern = string
+ type = string
+ }))
+ }))
+ default = {}
+}
+variable "service_lists" {
+ type = map(object({
+ service_list_name = string
+ network_firewall_policy_id = string
+ services = list(string)
+ }))
+ default = {}
+}
+
+variable "address_lists" {
+ type = map(object({
+ address_list_name = string
+ network_firewall_policy_id = string
+ address_type = string
+ addresses = list(string)
+ }))
+ default = {}
+}
+
+variable "applications" {
+ type = map(object({
+ app_list_name = string
+ network_firewall_policy_id = string
+ app_type = string
+ icmp_type = number
+ icmp_code = optional(number)
+ }))
+ default = {}
+}
+
+variable "application_groups" {
+ type = map(object({
+ app_group_name = string
+ network_firewall_policy_id = string
+ apps = list(string)
+
+ }))
+ default = {}
+}
+
+variable "security_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+ application = optional(list(string))
+ destination_address = optional(list(string))
+ service = optional(list(string))
+ source_address = optional(list(string))
+ url = optional(list(string))
+ })))
+ inspection = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "secrets" {
+ type = map(object({
+ secret_name = string
+ network_firewall_policy_id = string
+ secret_source = string
+ secret_type = string
+ vault_secret_id = string
+ version_number = number
+ vault_name = string
+ vault_compartment_id = string
+ }))
+ default = {}
+}
+
+variable "decryption_profiles" {
+ type = map(object({
+ profile_name = string
+ profile_type = string
+ network_firewall_policy_id = string
+ are_certificate_extensions_restricted = optional(bool)
+ is_auto_include_alt_name = optional(bool)
+ is_expired_certificate_blocked = optional(bool)
+ is_out_of_capacity_blocked = optional(bool)
+ is_revocation_status_timeout_blocked = optional(bool)
+ is_unknown_revocation_status_blocked = optional(bool)
+ is_unsupported_cipher_blocked = optional(bool)
+ is_unsupported_version_blocked = optional(bool)
+ is_untrusted_issuer_blocked = optional(bool)
+ }))
+ default = {}
+}
+
+variable "decryption_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+
+ destination_address = optional(list(string))
+
+ source_address = optional(list(string))
+
+ })))
+ decryption_profile = optional(string)
+ secret = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+#########################
+####### Firewall Logs ########
+#########################
+
+variable "fw_log_groups" {
+ description = "To provision Log Groups for Network Firewall"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw_logs" {
+ description = "To provision Logs for Network Firewall"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+##########################
+# Add new variables here #
+##########################
+######################### END #########################
diff --git a/examples/firewall/backend.tf b/examples/firewall/backend.tf
new file mode 100644
index 0000000..16bc557
--- /dev/null
+++ b/examples/firewall/backend.tf
@@ -0,0 +1,21 @@
+/*This line will be removed when using remote state
+# !!! WARNING !!! Terraform State Lock is not supported with OCI Object Storage.
+# Pre-Requisite: Create a version enabled object storage bucket to store the state file.
+# End Point Format: https://.compat.objectstorage..oraclecloud.com
+# Please look at the below doc for information about shared_credentials_file and other parameters:
+# Reference: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
+
+terraform {
+ backend "s3" {
+ key = ""
+ bucket = ""
+ region = ""
+ endpoint = ""
+ shared_credentials_file = "~/.aws/credentials"
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_metadata_api_check = true
+ force_path_style = true
+ }
+}
+This line will be removed when using remote state*/
\ No newline at end of file
diff --git a/examples/firewall/firewall.tf b/examples/firewall/firewall.tf
new file mode 100644
index 0000000..4818d84
--- /dev/null
+++ b/examples/firewall/firewall.tf
@@ -0,0 +1,223 @@
+data "oci_core_vcns" "firewall_vcns" {
+ for_each = var.firewalls != null ? var.firewalls : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.vcn_name
+}
+data "oci_core_subnets" "firewall_subnets" {
+ for_each = var.firewalls != null ? var.firewalls : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.subnet_id
+ vcn_id = data.oci_core_vcns.firewall_vcns[each.key].virtual_networks.*.id[0]
+}
+
+module "firewalls" {
+ source = "./modules/security/firewall/firewall"
+ for_each = var.firewalls != null ? var.firewalls : {}
+ depends_on = [module.policies, module.address_lists, module.application_groups, module.applications, module.services, module.service_lists, module.url_lists, module.decryption_profiles, module.secrets, module.security_rules, module.decryption_rules]
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : var.compartment_ocids[each.value.compartment_id]
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ subnet_id = each.value.subnet_id != "" ? (length(regexall("ocid1.subnet.oc*", each.value.subnet_id)) > 0 ? each.value.subnet_id : data.oci_core_subnets.firewall_subnets[each.key].subnets.*.id[0]) : null
+ display_name = each.value.display_name
+ ipv4address = each.value.ipv4address
+ ipv6address = each.value.ipv6address
+ availability_domain = each.value.availability_domain != "" && each.value.availability_domain != null ? data.oci_identity_availability_domains.availability_domains.availability_domains[each.value.availability_domain].name : ""
+ nsg_id = each.value.nsg_id
+ vcn_name = each.value.vcn_name
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+
+}
+
+module "policies" {
+ source = "./modules/security/firewall/firewall-policy"
+ for_each = var.fw-policies != null ? var.fw-policies : {}
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : var.compartment_ocids[each.value.compartment_id]
+ display_name = each.value.display_name
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+module "services" {
+ source = "./modules/security/firewall/service"
+ for_each = var.services != null ? var.services : {}
+ depends_on = [module.policies]
+ service_name = each.value.service_name
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ service_type = each.value.service_type
+ port_ranges = each.value.port_ranges
+}
+
+module "service_lists" {
+ source = "./modules/security/firewall/service-list"
+ for_each = var.service_lists != null ? var.service_lists : {}
+ depends_on = [module.services, module.policies]
+ service_list_name = each.value.service_list_name
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ services = each.value.services != null ? flatten(tolist([for sid in each.value.services : (length(regexall("ocid1.networkfirewallpolicy.oc*", sid)) > 0 ? merge(module.services.*...)[sid]["service+_tf_id"] : [sid])])) : null
+}
+
+module "address_lists" {
+ source = "./modules/security/firewall/address-list"
+ for_each = var.address_lists != null ? var.address_lists : {}
+ depends_on = [module.policies]
+ address_list_name = each.value.address_list_name
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ address_type = each.value.address_type
+ addresses = each.value.addresses
+}
+
+module "applications" {
+ source = "./modules/security/firewall/application"
+ for_each = var.applications != null ? var.applications : {}
+ depends_on = [module.policies]
+ icmp_type = each.value.icmp_type
+ app_list_name = each.value.app_list_name
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ app_type = each.value.app_type
+ icmp_code = each.value.icmp_code
+}
+
+module "application_groups" {
+ source = "./modules/security/firewall/application-group"
+ for_each = var.application_groups != null ? var.application_groups : {}
+ depends_on = [module.policies, module.applications]
+ app_group_name = each.value.app_group_name
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ apps = each.value.apps != null ? flatten(tolist([for app in each.value.apps : (length(regexall("ocid1.networkfirewallpolicy.oc*", app)) > 0 ? merge(module.applications.*...)[app]["application_tf_id"] : [app])])) : null
+}
+
+module "url_lists" {
+ source = "./modules/security/firewall/url-list"
+ for_each = var.url_lists != null ? var.url_lists : {}
+ depends_on = [module.policies]
+ urllist_name = each.value.urllist_name
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ #key_name = each.key
+ urls_details = each.value.urls
+}
+
+module "security_rules" {
+ source = "./modules/security/firewall/security-rules"
+ for_each = var.security_rules != null ? var.security_rules : {}
+ depends_on = [module.policies, module.address_lists, module.application_groups, module.applications, module.services, module.service_lists, module.url_lists]
+ action = each.value.action
+ rule_name = each.value.rule_name
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ application = each.value.condition[0].application != null ? each.value.condition[0].application : []
+ url = each.value.condition[0].url != null ? each.value.condition[0].url : []
+ service = each.value.condition[0].service != null ? each.value.condition[0].service : []
+ source_address = each.value.condition[0].source_address != null ? each.value.condition[0].source_address : []
+ destination_address = each.value.condition[0].destination_address != null ? each.value.condition[0].destination_address : []
+ /*application = each.value.condition != null ? each.value.condition.application : []
+ url = each.value.condition != null ? each.value.condition.url : []
+ service = each.value.condition != null ? each.value.condition.service : []
+ source_address = each.value.condition != null ? each.value.condition.source_address : []
+ destination_address = each.value.condition != null ? each.value.condition.destination_address : []*/
+ inspection = each.value.inspection
+ after_rule = each.value.after_rule
+ before_rule = each.value.before_rule
+}
+
+module "secrets" {
+ source = "./modules/security/firewall/secret"
+ for_each = var.secrets != null || var.secrets != {} ? var.secrets : {}
+ depends_on = [module.policies]
+ secret_name = each.value.secret_name
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ secret_source = each.value.secret_source
+ secret_type = each.value.secret_type
+ vault_secret_id = each.value.vault_secret_id
+ vault_name = each.value.vault_name
+ compartment_id = each.value.vault_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.vault_compartment_id)) > 0 ? each.value.vault_compartment_id : var.compartment_ocids[each.value.vault_compartment_id]) : var.compartment_ocids[each.value.vault_compartment_id]
+ version_number = each.value.version_number
+}
+
+module "decryption_profiles" {
+ source = "./modules/security/firewall/decryption-profile"
+ for_each = var.decryption_profiles != null || var.decryption_profiles != {} ? var.decryption_profiles : {}
+ depends_on = [module.policies, module.secrets]
+ profile_name = each.value.profile_name
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ profile_type = each.value.profile_type
+ are_certificate_extensions_restricted = each.value.are_certificate_extensions_restricted
+ is_auto_include_alt_name = each.value.is_auto_include_alt_name
+ is_expired_certificate_blocked = each.value.is_expired_certificate_blocked
+ is_out_of_capacity_blocked = each.value.is_out_of_capacity_blocked
+ is_revocation_status_timeout_blocked = each.value.is_revocation_status_timeout_blocked
+ is_unknown_revocation_status_blocked = each.value.is_unknown_revocation_status_blocked
+ is_unsupported_cipher_blocked = each.value.is_unsupported_cipher_blocked
+ is_unsupported_version_blocked = each.value.is_unsupported_version_blocked
+ is_untrusted_issuer_blocked = each.value.is_untrusted_issuer_blocked
+}
+
+module "decryption_rules" {
+ source = "./modules/security/firewall/decryption-rules"
+ for_each = var.decryption_rules != null ? var.decryption_rules : {}
+ depends_on = [module.policies, module.decryption_profiles, module.secrets, module.address_lists]
+ action = each.value.action
+ rule_name = each.value.rule_name
+ network_firewall_policy_id = length(regexall("ocid1.networkfirewallpolicy.oc1.*", each.value.network_firewall_policy_id)) > 0 ? each.value.network_firewall_policy_id : merge(module.policies.*...)[each.value.network_firewall_policy_id]["policy_tf_id"]
+ source_address = each.value.condition[0].source_address != null ? each.value.condition[0].source_address : []
+ destination_address = each.value.condition[0].destination_address != null ? each.value.condition[0].destination_address : []
+ after_rule = each.value.after_rule
+ before_rule = each.value.before_rule
+ decryption_profile = each.value.decryption_profile
+ secret = each.value.secret
+}
+
+
+#############################
+# Module Block - Network Firewall Logging
+# Create VCN Log Groups and Logs
+#############################
+
+module "fw-log-groups" {
+ source = "./modules/managementservices/log-group"
+ for_each = (var.fw_log_groups != null || var.fw_log_groups != {}) ? var.fw_log_groups : {}
+
+ # Log Groups
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+
+ display_name = each.value.display_name
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ description = each.value.description
+ freeform_tags = each.value.freeform_tags
+}
+
+/*
+output "vcn_log_group_map" {
+ value = [ for k,v in merge(module.vcn-log-groups.*...) : v.log_group_tf_id ]
+}
+*/
+
+module "fw-logs" {
+ source = "./modules/managementservices/log"
+ for_each = (var.fw_logs != null || var.fw_logs != {}) ? var.fw_logs : {}
+
+ # Logs
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ display_name = each.value.display_name
+ log_group_id = length(regexall("ocid1.loggroup.oc*", each.value.log_group_id)) > 0 ? each.value.log_group_id : merge(module.fw-log-groups.*...)[each.value.log_group_id]["log_group_tf_id"]
+
+ log_type = each.value.log_type
+ #Required
+ source_category = each.value.category
+ source_resource = length(regexall("ocid1.*", each.value.resource)) > 0 ? each.value.resource : merge(module.firewalls.*...)[each.value.resource]["firewall_tf_id"]
+ source_service = each.value.service
+ source_type = each.value.source_type
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+ log_is_enabled = (each.value.is_enabled == "" || each.value.is_enabled == null) ? true : each.value.is_enabled
+ log_retention_duration = (each.value.retention_duration == "" || each.value.retention_duration == null) ? 30 : each.value.retention_duration
+
+}
+
+/*
+output "vcn_logs_id" {
+ value = [ for k,v in merge(module.vcn-logs.*...) : v.log_tf_id]
+}
+*/
diff --git a/examples/firewall/oci-data.tf b/examples/firewall/oci-data.tf
new file mode 100644
index 0000000..1495707
--- /dev/null
+++ b/examples/firewall/oci-data.tf
@@ -0,0 +1,42 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Resource Block - Identity
+# Fetch Compartments
+############################
+
+#Fetch Compartment Details
+data "oci_identity_compartments" "compartments" {
+ #Required
+ compartment_id = var.tenancy_ocid
+
+ #Optional
+ #name = var.compartment_name
+ access_level = "ANY"
+ compartment_id_in_subtree = true
+ state = "ACTIVE"
+}
+
+
+############################
+# Data Block - Network
+# Fetch ADs
+############################
+
+data "oci_identity_availability_domains" "availability_domains" {
+ #Required
+ compartment_id = var.tenancy_ocid
+}
+
+
+/*
+output "compartment_id_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ value = zipmap(data.oci_identity_compartments.compartments.compartments.*.name,data.oci_identity_compartments.compartments.compartments.*.id)
+}
+
+output "ads" {
+ value = data.oci_identity_availability_domains.availability_domains.availability_domains.*.name
+}
+*/
\ No newline at end of file
diff --git a/examples/firewall/provider.tf b/examples/firewall/provider.tf
new file mode 100644
index 0000000..9a69c98
--- /dev/null
+++ b/examples/firewall/provider.tf
@@ -0,0 +1,24 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Provider Block
+# OCI
+############################
+
+provider "oci" {
+ tenancy_ocid = var.tenancy_ocid
+ user_ocid = var.user_ocid
+ fingerprint = var.fingerprint
+ private_key_path = var.private_key_path
+ region = var.region
+ ignore_defined_tags = ["Oracle-Tags.CreatedBy", "Oracle-Tags.CreatedOn"]
+}
+
+terraform {
+ required_providers {
+ oci = {
+ source = "oracle/oci"
+ version = "5.40.0"
+ }
+ }
+}
diff --git a/examples/firewall/variables_example.tf b/examples/firewall/variables_example.tf
new file mode 100644
index 0000000..fae17ea
--- /dev/null
+++ b/examples/firewall/variables_example.tf
@@ -0,0 +1,2082 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+#
+# Variables Block
+# OCI
+#
+############################
+
+variable "tenancy_ocid" {
+ type = string
+ default = ""
+}
+
+variable "user_ocid" {
+ type = string
+ default = ""
+}
+
+variable "fingerprint" {
+ type = string
+ default = ""
+}
+
+variable "private_key_path" {
+ type = string
+ default = ""
+}
+
+variable "region" {
+ type = string
+ default = ""
+}
+
+#################################
+# SSH Keys
+#################################
+
+variable "instance_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_instance_ssh_keys#
+ # exported instance ssh keys
+ #instance_ssh_keys_END#
+ }
+}
+
+variable "oke_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_oke_ssh_keys#
+ #oke_ssh_keys_END#
+ }
+}
+variable "sddc_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_sddc_ssh_keys#
+ #sddc_ssh_keys_END#
+ }
+}
+
+variable "exacs_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_exacs_ssh_keys#
+ # exported exacs ssh keys
+ #exacs_ssh_keys_END#
+ }
+}
+
+variable "dbsystem_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_dbsystem_ssh_keys#
+ # exported dbsystem ssh keys
+ #dbsystem_ssh_keys_END#
+ }
+}
+
+#################################
+# Platform Image OCIDs and
+# Market Place Images
+#################################
+
+variable "instance_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ Windows = ""
+ PaloAlto = "Palo Alto Networks VM-Series Next Generation Firewall"
+ #START_instance_source_ocids#
+ # exported instance image ocids
+ #instance_source_ocids_END#
+ }
+}
+
+variable "blockvolume_source_ocids" {
+ type = map(any)
+ default = {
+ block1 = ""
+ #blockvolume_source_ocid = ""
+ #START_blockvolume_source_ocids#
+ # exported block volume source ocids
+ #blockvolume_source_ocids_END#
+ }
+}
+
+variable "fss_source_ocids" {
+ type = map(any)
+ default = {
+ snapshot1 = ""
+ #fss_source_snapshot_ocid = ""
+ #START_fss_source_snapshot_ocids#
+ # exported fss source snapshot ocids
+ #fss_source_snapshot_ocids_END#
+ }
+}
+
+variable "oke_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ #START_oke_source_ocids#
+ # exported oke image ocids
+ #oke_source_ocids_END#
+ }
+}
+
+#################################
+#
+# Variables according to Services
+# PLEASE DO NOT MODIFY
+#
+#################################
+
+##########################
+## Fetch Compartments ####
+##########################
+
+variable "compartment_ocids" {
+ type = map(any)
+ default = {
+ #START_compartment_ocids#
+ # compartment ocids
+ #compartment_ocids_END#
+ }
+}
+
+#########################
+##### Identity ##########
+#########################
+
+variable "compartments" {
+ type = object({
+ root = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level1 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level2 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level3 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level4 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level5 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ })
+ default = {
+ root = {},
+ compartment_level1 = {},
+ compartment_level2 = {},
+ compartment_level3 = {},
+ compartment_level4 = {},
+ compartment_level5 = {},
+ }
+}
+
+variable "policies" {
+ type = map(object({
+ name = string
+ compartment_id = string
+ policy_description = string
+ policy_statements = list(string)
+ policy_version_date = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "groups" {
+ type = map(object({
+ group_name = string
+ group_description = string
+ matching_rule = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "users" {
+ type = map(object({
+ name = string
+ description = string
+ email = string
+ disable_capabilities = optional(list(string))
+ group_membership = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "networkSources" {
+ type = map(object({
+ name = string
+ description = string
+ public_source_list = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ virtual_source_list = optional(list(map(list(string))))
+
+ }))
+ default = {}
+}
+
+#########################
+####### Governance #########
+#########################
+
+variable "tag_namespaces" {
+ description = "To provision Namespaces"
+ type = map(object({
+ compartment_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_retired = optional(bool)
+ }))
+ default = {}
+}
+
+variable "tag_keys" {
+ description = "To provision Tag Keys"
+ type = map(object({
+ tag_namespace_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_cost_tracking = optional(bool)
+ is_retired = optional(bool)
+ validator = optional(list(object({
+ validator_type = optional(string)
+ validator_values = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "tag_defaults" {
+ description = "To make the Tag keys as default to compartments"
+ type = map(object({
+ compartment_id = string
+ tag_definition_id = string
+ value = string
+ is_required = optional(bool)
+ }))
+ default = {}
+}
+
+variable "quota_policies" {
+ type = map(object({
+ quota_name = string
+ quota_description = string
+ quota_statements = list(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### Network ##########
+#########################
+
+variable "default_dhcps" {
+ type = map(object({
+ server_type = string
+ manage_default_resource_id = optional(string)
+ custom_dns_servers = optional(list(any))
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "custom_dhcps" {
+ type = map(object({
+ compartment_id = string
+ server_type = string
+ vcn_id = string
+ custom_dns_servers = optional(list(any))
+ domain_name_type = optional(string)
+ display_name = optional(string)
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcns" {
+ type = map(object({
+ compartment_id = string
+ cidr_blocks = optional(list(string))
+ byoipv6cidr_details = optional(list(map(any)))
+ display_name = optional(string)
+ dns_label = optional(string)
+ is_ipv6enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ipv6private_cidr_blocks = optional(list(string))
+ is_oracle_gua_allocation_enabled = optional(bool)
+ }))
+ default = {}
+}
+
+variable "igws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ enable_igw = optional(bool)
+ igw_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_table_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "sgws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ service = optional(string)
+ sgw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "ngws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ block_traffic = optional(bool)
+ public_ip_id = optional(string)
+ ngw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "lpgs" {
+ type = map(any)
+ default = {
+ hub-lpgs = {},
+ spoke-lpgs = {},
+ peer-lpgs = {},
+ none-lpgs = {},
+ exported-lpgs = {},
+ }
+}
+
+variable "drgs" {
+ type = map(object({
+ compartment_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "default_seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+
+}))
+default = {}
+}
+
+variable "default_route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+}))
+ default = {}
+}
+
+variable "nsgs" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nsg_rules" {
+ type = map(object({
+ nsg_id = string
+ direction = string
+ protocol = string
+ description = optional(string)
+ stateless = optional(string)
+ source_type = optional(string)
+ destination_type = optional(string)
+ destination = optional(string)
+ source = optional(string)
+ options = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "subnets" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ cidr_block = string
+ display_name = optional(string)
+ dns_label = optional(string)
+ ipv6cidr_block = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ prohibit_internet_ingress = optional(string)
+ prohibit_public_ip_on_vnic = optional(string)
+ availability_domain = optional(string)
+ dhcp_options_id = optional(string)
+ route_table_id = optional(string)
+ security_list_ids = optional(list(string))
+ }))
+ default = {}
+}
+
+variable "vlans" {
+ type = map(object({
+ cidr_block = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ nsg_ids = optional(list(string))
+ route_table_name = optional(string)
+ vlan_tag = optional(string)
+ availability_domain = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "drg_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_other_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_tables" {
+ type = map(object({
+ drg_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_ecmp_enabled = optional(bool)
+ import_drg_route_distribution_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_rules" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_distributions" {
+ type = map(object({
+ distribution_type = string
+ drg_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_distribution_statements" {
+ type = map(object({
+ drg_route_distribution_id = string
+ action = string
+ match_criteria = optional(list(object({
+ match_type = string
+ attachment_type = optional(string)
+ drg_attachment_id = optional(string)
+ })))
+ priority = optional(string)
+ }))
+ default = {}
+}
+
+variable "data_drg_route_tables" {
+ type = map(any)
+ default = {}
+}
+
+variable "data_drg_route_table_distributions" {
+ type = map(any)
+ default = {}
+}
+
+####################
+####### DNS #######
+####################
+
+variable "zones" {
+type = map(object({
+compartment_id = string
+display_name = string
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_type = optional(string)
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+variable "views" {
+type = map(object({
+compartment_id = string
+display_name = string
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+ default = {}
+}
+
+variable "rrsets" {
+type = map(object({
+compartment_id = optional(string)
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_id = string
+domain = string
+rtype = string
+ttl = number
+rdata = optional(list(string))
+scope = optional(string)
+}))
+default = {}
+}
+
+variable "resolvers" {
+type = map(object({
+network_compartment_id= string
+vcn_name = string
+display_name = optional(string)
+views = optional(map(object({
+ view_id = optional(string)
+ view_compartment_id = optional(string)
+})))
+resolver_rules = optional(map(object({
+ client_address_conditions = optional(list(any))
+ destination_addresses = optional(list(any))
+ qname_cover_conditions = optional(list(any))
+ source_endpoint_name = optional(string)
+})))
+endpoint_names = optional(map(object({
+ is_forwarding = optional(bool)
+ is_listening = optional(bool)
+ name = optional(string)
+ subnet_name = optional(string)
+ forwarding_address = optional(string)
+ listening_address = optional(string)
+ nsg_ids = optional(list(string))
+})))
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+
+#########################
+## Dedicated VM Hosts ##
+#########################
+
+variable "dedicated_hosts" {
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ vm_host_shape = string
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ fault_domain = optional(string)
+ freeform_tags = optional(map(any))
+ }))
+ description = "To provision new dedicated VM hosts"
+ default = {}
+}
+
+#########################
+## Instances/Block Volumes ##
+#########################
+
+variable "blockvolumes" {
+ description = "To provision block volumes"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = string
+ size_in_gbs = optional(string)
+ is_auto_tune_enabled = optional(string)
+ vpus_per_gb = optional(string)
+ kms_key_id = optional(string)
+ attach_to_instance = optional(string)
+ attachment_type = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ device = optional(string)
+ encryption_in_transit_type = optional(string)
+ attachment_display_name = optional(string)
+ is_read_only = optional(bool)
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ is_shareable = optional(bool)
+ use_chap = optional(bool)
+ is_agent_auto_iscsi_login_enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ source_details = optional(list(map(any)))
+ block_volume_replicas = optional(list(map(any)))
+ block_volume_replicas_deletion = optional(bool)
+ autotune_policies = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "block_backup_policies" {
+ type = map(any)
+ description = "To create block volume back policy"
+ default = {}
+}
+
+variable "instances" {
+ description = "Map of instances to be provisioned"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ shape = string
+ source_id = string
+ source_type = string
+ vcn_name = string
+ subnet_id = string
+ network_compartment_id = string
+ display_name = optional(string)
+ assign_public_ip = optional(bool)
+ boot_volume_size_in_gbs = optional(string)
+ fault_domain = optional(string)
+ dedicated_vm_host_id = optional(string)
+ private_ip = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(string))
+ ocpus = optional(string)
+ memory_in_gbs = optional(number)
+ capacity_reservation_id = optional(string)
+ create_is_pv_encryption_in_transit_enabled = optional(bool)
+ remote_execute = optional(string)
+ bastion_ip = optional(string)
+ cloud_init_script = optional(string)
+ ssh_authorized_keys = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ network_type = optional(string)
+ #extended_metadata = optional(string)
+ skip_source_dest_check = optional(bool)
+ baseline_ocpu_utilization = optional(string)
+ #preemptible_instance_config = optional(string)
+ all_plugins_disabled = optional(bool)
+ is_management_disabled = optional(bool)
+ is_monitoring_disabled = optional(bool)
+ assign_private_dns_record = optional(string)
+ plugins_details = optional(map(any))
+ is_live_migration_preferred = optional(bool)
+ recovery_action = optional(string)
+ are_legacy_imds_endpoints_disabled = optional(bool)
+ boot_volume_type = optional(string)
+ firmware = optional(string)
+ is_consistent_volume_naming_enabled = optional(bool)
+ remote_data_volume_type = optional(string)
+ platform_config = optional(list(map(any)))
+ launch_options = optional(list(map(any)))
+ ipxe_script = optional(string)
+ preserve_boot_volume = optional(bool)
+ vlan_id = optional(string)
+ kms_key_id = optional(string)
+ vnic_display_name = optional(string)
+ vnic_defined_tags = optional(map(any))
+ vnic_freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "boot_backup_policies" {
+ type = map(any)
+ description = "Map of boot volume backup policies to be provisioned"
+ default = {}
+}
+
+#########################
+####### Database ########
+#########################
+
+variable "exa_infra" {
+ description = "To provision exadata infrastructure"
+ type = map(any)
+ default = {}
+}
+
+variable "exa_vmclusters" {
+ description = "To provision exadata cloud VM cluster"
+ type = map(any)
+ default = {}
+}
+
+variable "dbsystems_vm_bm" {
+ description = "To provision DB System"
+ type = map(any)
+ default = {}
+}
+
+variable "db_home" {
+ type = map(any)
+ description = "Map of database db home to be provisioned"
+ default = {}
+}
+
+variable "databases" {
+ description = "Map of databases to be provisioned in an existing db_home"
+ type = map(any)
+ default = {}
+}
+
+####################################
+####### Autonomous Database ########
+####################################
+
+variable "adb" {
+ type = map(object({
+ admin_password = optional(string)
+ character_set = optional(string)
+ compartment_id = string
+ cpu_core_count = optional(number)
+ database_edition = optional(string)
+ data_storage_size_in_tbs = optional(number)
+ customer_contacts = optional(list(string))
+ db_name = string
+ db_version = optional(string)
+ db_workload = optional(string)
+ display_name = optional(string)
+ license_model = optional(string)
+ ncharacter_set = optional(string)
+ network_compartment_id = optional(string)
+ nsg_ids = optional(list(string))
+ subnet_id = optional(string)
+ vcn_name = optional(string)
+ whitelisted_ips = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+######### FSS ###########
+#########################
+
+variable "mount_targets" {
+ description = "To provision Mount Targets"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ display_name = optional(string)
+ ip_address = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fss" {
+ description = "To provision File System Services"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = optional(string)
+ source_snapshot = optional(string)
+ snapshot_policy = optional(string)
+ policy_compartment_id = optional(string)
+ kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_export_options" {
+ description = "To provision Export Sets"
+ type = map(object({
+ export_set_id = string
+ file_system_id = string
+ path = string
+ export_options = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_idmap_groups_for_sys_auth = optional(bool)
+ }))
+ default = {}
+}
+
+variable "fss_replication" {
+ description = "To provision File System Replication"
+ type = map(object({
+ compartment_id = string
+ source_id = string
+ target_id = string
+ display_name = optional(string)
+ replication_interval = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+####### FSS Logs ########
+#########################
+
+variable "nfs_log_groups" {
+ description = "To provision Log Groups for Mount Target"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_logs" {
+ description = "To provision Logs for Mount Target"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+#########################
+#### Load Balancers #####
+#########################
+
+variable "load_balancers" {
+ description = "To provision Load Balancers"
+ type = map(object({
+ compartment_id = string
+ vcn_name = string
+ shape = string
+ subnet_ids = list(any)
+ network_compartment_id = string
+ display_name = string
+ shape_details = optional(list(map(any)))
+ nsg_ids = optional(list(any))
+ is_private = optional(bool)
+ ip_mode = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ reserved_ips_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "hostnames" {
+ description = "To provision Load Balancer Hostnames"
+ type = map(object({
+ load_balancer_id = string
+ hostname = string
+ name = string
+ }))
+ default = {}
+}
+
+variable "certificates" {
+ description = "To provision Load Balancer Certificates"
+ type = map(object({
+ certificate_name = string
+ load_balancer_id = string
+ ca_certificate = optional(string)
+ passphrase = optional(string)
+ private_key = optional(string)
+ public_certificate = optional(string)
+ }))
+ default = {}
+}
+
+variable "cipher_suites" {
+ description = "To provision Load Balancer Cipher Suites"
+ type = map(object({
+ ciphers = list(string)
+ name = string
+ load_balancer_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "backend_sets" {
+ description = "To provision Load Balancer Backend Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ policy = string
+ protocol = optional(string)
+ interval_ms = optional(string)
+ is_force_plain_text = optional(string)
+ port = optional(string)
+ response_body_regex = optional(string)
+ retries = optional(string)
+ return_code = optional(string)
+ timeout_in_millis = optional(string)
+ url_path = optional(string)
+ lb_cookie_session = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ path = optional(string)
+ domain = optional(string)
+ is_http_only = optional(string)
+ is_secure = optional(string)
+ max_age_in_seconds = optional(string)
+ })))
+ session_persistence_configuration = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ })))
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "backends" {
+ description = "To provision Load Balancer Backends"
+ type = map(object({
+ backendset_name = string
+ ip_address = string
+ load_balancer_id = string
+ port = string
+ instance_compartment = optional(string)
+ backup = optional(string)
+ drain = optional(string)
+ offline = optional(string)
+ weight = optional(string)
+ }))
+ default = {}
+}
+
+variable "listeners" {
+ description = "To provision Load Balancer Listeners"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ port = string
+ protocol = string
+ default_backend_set_name = string
+ connection_configuration = optional(list(map(any)))
+ hostname_names = optional(list(any))
+ path_route_set_name = optional(string)
+ rule_set_names = optional(list(any))
+ routing_policy_name = optional(string)
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "path_route_sets" {
+ description = "To provision Load Balancer Path Route Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ path_routes = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "rule_sets" {
+ description = "To provision Load Balancer Rule Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ access_control_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ description = optional(string)
+ })))
+ access_control_method_rules = optional(list(object({
+ action = string
+ allowed_methods = optional(list(any))
+ status_code = optional(string)
+ })))
+ http_header_rules = optional(list(object({
+ action = string
+ are_invalid_characters_allowed = optional(bool)
+ http_large_header_size_in_kb = optional(string)
+ })))
+ uri_redirect_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ operator = optional(string)
+ host = optional(string)
+ path = optional(string)
+ port = optional(string)
+ protocol = optional(string)
+ query = optional(string)
+ response_code = optional(string)
+ })))
+ request_response_header_rules = optional(list(object({
+ action = string
+ header = optional(string)
+ prefix = optional(string)
+ suffix = optional(string)
+ value = optional(string)
+ })))
+ }))
+ default = {}
+}
+
+variable "lbr_reserved_ips" {
+ description = "To provision Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ lifetime = string
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+###################################
+####### Load Balancer Logs ########
+###################################
+
+variable "loadbalancer_log_groups" {
+ description = "To provision Log Groups for Load Balancers"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "loadbalancer_logs" {
+ description = "To provision Logs for Load Balancers"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+## Network Load Balancers ##
+#########################
+
+variable "network_load_balancers" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ is_private = optional(bool)
+ reserved_ips_id = string
+ is_preserve_source_destination = optional(bool)
+ is_symmetric_hash_enabled = optional(bool)
+ nlb_ip_version = optional(string)
+ assigned_private_ipv4 = optional(string)
+ nsg_ids = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "nlb_listeners" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ default_backend_set_name = string
+ port = number
+ protocol = string
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+
+variable "nlb_backend_sets" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ policy = string
+ protocol = string
+ domain_name = optional(string)
+ query_class = optional(string)
+ query_type = optional(string)
+ rcodes = optional(list(string))
+ transport_protocol = optional(string)
+ return_code = optional(number)
+ interval_in_millis = optional(number)
+ port = optional(number)
+ request_data = optional(string)
+ response_body_regex = optional(string)
+ response_data = optional(string)
+ retries = optional(number)
+ timeout_in_millis = optional(number)
+ url_path = optional(string)
+ is_preserve_source = optional(bool)
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_backends" {
+ type = map(object({
+ name = optional(string)
+ backend_set_name = string
+ network_load_balancer_id = string
+ port = number
+ ip_address = string
+ instance_compartment = string
+ is_drain = optional(bool)
+ is_backup = optional(bool)
+ is_offline = optional(bool)
+ weight = optional(number)
+ target_id = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_reserved_ips" {
+ description = "To provision Network Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ lifetime = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ }))
+ default = {}
+}
+
+
+#########################
+##### IP Management #####
+#########################
+
+variable "public_ip_pools" {
+ type = map(any)
+ default = {}
+}
+
+variable "private_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "reserved_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "vnic_attachments" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+##### VCN Logs ##########
+#########################
+
+variable "vcn_log_groups" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcn_logs" {
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### OSS Buckets ######
+#########################
+
+variable "buckets" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+####### OSS Logs ########
+#########################
+
+variable "oss_log_groups" {
+ description = "To provision Log Groups for OSS"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "oss_logs" {
+ description = "To provision Logs for OSS"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+### OSS IAM Policies ####
+#########################
+
+variable "oss_policies" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+## Management Services ##
+#########################
+
+variable "alarms" {
+ type = map(object({
+ compartment_id = string
+ destinations = list(string)
+ alarm_name = string
+ is_enabled = bool
+ metric_compartment_id = string
+ namespace = string
+ query = string
+ severity = string
+ body = optional(string)
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_notifications_per_metric_dimension_enabled = optional(bool)
+ metric_compartment_id_in_subtree = optional(string)
+ trigger_delay_minutes = optional(string)
+ repeat_notification_duration = optional(string)
+ resolution = optional(string)
+ resource_group = optional(string)
+ suppression = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "events" {
+ type = map(object({
+ event_name = string
+ compartment_id = string
+ description = string
+ is_enabled = bool
+ condition = string
+ actions = optional(list(object({
+ action_type = string
+ is_enabled = string
+ description = optional(string)
+ function_id = optional(string)
+ stream_id = optional(string)
+ topic_id = optional(string)
+ })))
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_topics" {
+ type = map(object({
+ compartment_id = string
+ topic_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_subscriptions" {
+ type = map(object({
+ compartment_id = string
+ endpoint = string
+ protocol = string
+ topic_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "service_connectors" {
+ type = any
+ default = {}
+ description = "To provision service connector hub resources"
+}
+
+#########################
+## Developer Services ##
+#########################
+
+## OKE
+
+variable "clusters" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ kubernetes_version = string
+ cni_type = string
+ cluster_type = string
+ is_policy_enabled = optional(bool)
+ policy_kms_key_id = optional(string)
+ is_kubernetes_dashboard_enabled = optional(bool)
+ is_tiller_enabled = optional(bool)
+ is_public_ip_enabled = optional(bool)
+ nsg_ids = optional(list(string))
+ endpoint_subnet_id = string
+ is_pod_security_policy_enabled = optional(bool)
+ pods_cidr = optional(string)
+ services_cidr = optional(string)
+ service_lb_subnet_ids = optional(list(string))
+ cluster_kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ lb_defined_tags = optional(map(any))
+ lb_freeform_tags = optional(map(any))
+ volume_defined_tags = optional(map(any))
+ volume_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_node_labels = optional(map(any))
+ kubernetes_version = string
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ availability_domain = number
+ fault_domains = optional(list(string))
+ subnet_id = string
+ size = number
+ cni_type = string
+ max_pods_per_node = optional(number)
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_ids = optional(string)
+ worker_nsg_ids = optional(list(string))
+ memory_in_gbs = optional(number)
+ ocpus = optional(number)
+ image_id = string
+ source_type = string
+ boot_volume_size_in_gbs = optional(number)
+ ssh_public_key = optional(string)
+ nodepool_kms_key_id = optional(string)
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "virtual-nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_virtual_node_labels = optional(map(any))
+ availability_domain = number
+ fault_domains = list(string)
+ subnet_id = string
+ size = number
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_id = string
+ worker_nsg_ids = optional(list(string))
+ taints = optional(list(any))
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+##################################
+############## SDDCs #############
+##################################
+variable "sddcs" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = string
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = string
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ initial_cluster_display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ management_datastore = optional(list(string))
+ workload_datastore = optional(list(string))
+
+ }))
+ default = {}
+
+}
+
+variable "sddc-clusters" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = optional(string)
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = optional(string)
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ workload_datastore = optional(list(string))
+ sddc_id = optional(string)
+ esxi_software_version = optional(string)
+
+ }))
+ default = {}
+
+}
+
+
+############################
+## Key Management Service ##
+############################
+
+variable "vaults" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_type = string
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ replica_region = optional(string)
+ }))
+ default = {}
+}
+
+variable "keys" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_name = string
+ algorithm = optional(string)
+ length = optional(string)
+ curve_id = optional(string)
+ protection_mode = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ is_auto_rotation_enabled = optional(bool)
+ rotation_interval_in_days = optional(string)
+
+ }))
+ default = {}
+}
+
+###########################
+######### Budgets #########
+###########################
+
+variable "budgets" {
+ type = map(object({
+ amount = string
+ compartment_id = string
+ reset_period = string
+ budget_processing_period_start_offset = optional(string)
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ processing_period_type = optional(string)
+ budget_end_date = optional(string)
+ budget_start_date = optional(string)
+ target_type = optional(string)
+ targets = optional(list(any))
+ }))
+ default = {}
+}
+
+variable "budget_alert_rules" {
+ type = map(object({
+ budget_id = string
+ threshold = string
+ threshold_type = string
+ type = string
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ message = optional(string)
+ recipients = optional(string)
+ }))
+ default = {}
+}
+
+###########################
+####### Cloud Guard #######
+###########################
+
+variable "cloud_guard_configs" {
+ type = map(object({
+ compartment_id = string
+ reporting_region = string
+ status = string
+ self_manage_resources = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "cloud_guard_targets" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ target_resource_id = string
+ target_resource_type = string
+ prefix = string
+ description = optional(string)
+ state = optional(string)
+ target_detector_recipes = optional(list(any))
+ target_responder_recipes = optional(list(any))
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+####################################
+####### Custom Backup Policy #######
+####################################
+
+variable "custom_backup_policies" {
+ type = map(any)
+ default = {}
+}
+
+variable "capacity_reservation_ocids" {
+ type = map(any)
+ default = {
+ "AD1" : "",
+ "AD2" : "",
+ "AD3" : ""
+ }
+}
+
+#####################################
+####### Firewall as a Service #######
+#####################################
+variable "firewalls" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ network_firewall_policy_id = string
+ subnet_id = string
+ vcn_name = string
+ display_name = string
+ ipv4address = optional(string)
+ nsg_id = optional(list(string))
+ ipv6address = optional(string)
+ availability_domain = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw-policies" {
+ type = map(object({
+ compartment_id = optional(string)
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "services" {
+ type = map(object({
+ service_name = string
+ service_type = string
+ network_firewall_policy_id = string
+ port_ranges = list(object({
+ minimum_port = string
+ maximum_port = optional(string)
+ }))
+ }))
+ default = {}
+}
+variable "url_lists" {
+ type = map(object({
+ urllist_name = string
+ network_firewall_policy_id = string
+ urls = list(object({
+ pattern = string
+ type = string
+ }))
+ }))
+ default = {}
+}
+variable "service_lists" {
+ type = map(object({
+ service_list_name = string
+ network_firewall_policy_id = string
+ services = list(string)
+ }))
+ default = {}
+}
+
+variable "address_lists" {
+ type = map(object({
+ address_list_name = string
+ network_firewall_policy_id = string
+ address_type = string
+ addresses = list(string)
+ }))
+ default = {}
+}
+
+variable "applications" {
+ type = map(object({
+ app_list_name = string
+ network_firewall_policy_id = string
+ app_type = string
+ icmp_type = number
+ icmp_code = optional(number)
+ }))
+ default = {}
+}
+
+variable "application_groups" {
+ type = map(object({
+ app_group_name = string
+ network_firewall_policy_id = string
+ apps = list(string)
+
+ }))
+ default = {}
+}
+
+variable "security_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+ application = optional(list(string))
+ destination_address = optional(list(string))
+ service = optional(list(string))
+ source_address = optional(list(string))
+ url = optional(list(string))
+ })))
+ inspection = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "secrets" {
+ type = map(object({
+ secret_name = string
+ network_firewall_policy_id = string
+ secret_source = string
+ secret_type = string
+ vault_secret_id = string
+ version_number = number
+ vault_name = string
+ vault_compartment_id = string
+ }))
+ default = {}
+}
+
+variable "decryption_profiles" {
+ type = map(object({
+ profile_name = string
+ profile_type = string
+ network_firewall_policy_id = string
+ are_certificate_extensions_restricted = optional(bool)
+ is_auto_include_alt_name = optional(bool)
+ is_expired_certificate_blocked = optional(bool)
+ is_out_of_capacity_blocked = optional(bool)
+ is_revocation_status_timeout_blocked = optional(bool)
+ is_unknown_revocation_status_blocked = optional(bool)
+ is_unsupported_cipher_blocked = optional(bool)
+ is_unsupported_version_blocked = optional(bool)
+ is_untrusted_issuer_blocked = optional(bool)
+ }))
+ default = {}
+}
+
+variable "decryption_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+
+ destination_address = optional(list(string))
+
+ source_address = optional(list(string))
+
+ })))
+ decryption_profile = optional(string)
+ secret = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+#########################
+####### Firewall Logs ########
+#########################
+
+variable "fw_log_groups" {
+ description = "To provision Log Groups for Network Firewall"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw_logs" {
+ description = "To provision Logs for Network Firewall"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+##########################
+# Add new variables here #
+##########################
+######################### END #########################
diff --git a/examples/fss/backend.tf b/examples/fss/backend.tf
new file mode 100644
index 0000000..16bc557
--- /dev/null
+++ b/examples/fss/backend.tf
@@ -0,0 +1,21 @@
+/*This line will be removed when using remote state
+# !!! WARNING !!! Terraform State Lock is not supported with OCI Object Storage.
+# Pre-Requisite: Create a version enabled object storage bucket to store the state file.
+# End Point Format: https://.compat.objectstorage..oraclecloud.com
+# Please look at the below doc for information about shared_credentials_file and other parameters:
+# Reference: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
+
+terraform {
+ backend "s3" {
+ key = ""
+ bucket = ""
+ region = ""
+ endpoint = ""
+ shared_credentials_file = "~/.aws/credentials"
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_metadata_api_check = true
+ force_path_style = true
+ }
+}
+This line will be removed when using remote state*/
\ No newline at end of file
diff --git a/examples/fss/fss.tf b/examples/fss/fss.tf
new file mode 100644
index 0000000..dbe367f
--- /dev/null
+++ b/examples/fss/fss.tf
@@ -0,0 +1,149 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Module Block - Storage
+# Create FSS
+############################
+
+data "oci_core_subnets" "oci_subnets_fss" {
+ # depends_on = [module.subnets] # Uncomment to create Network and FSS together
+ for_each = var.mount_targets != null ? var.mount_targets : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.subnet_id
+ vcn_id = data.oci_core_vcns.oci_vcns_fss[each.key].virtual_networks.*.id[0]
+}
+
+data "oci_core_vcns" "oci_vcns_fss" {
+ # depends_on = [module.vcns] # Uncomment to create Network and FSS together
+ for_each = var.mount_targets != null ? var.mount_targets : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.vcn_name
+}
+
+module "mts" {
+ # depends_on = [module.nsgs] # Uncomment to execute NSG and Mount Target together
+ #Required
+ source = "./modules/storage/file-storage/mount-target"
+ for_each = (var.mount_targets != null || var.mount_targets != {}) ? var.mount_targets : {}
+ #Required
+ availability_domain = each.value.availability_domain != null && each.value.availability_domain != null ? data.oci_identity_availability_domains.availability_domains.availability_domains[each.value.availability_domain].name : null
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ network_compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ subnet_id = length(regexall("ocid1.subnet.oc*", each.value.subnet_id)) > 0 ? each.value.subnet_id : data.oci_core_subnets.oci_subnets_fss[each.key].subnets.*.id[0]
+ vcn_names = [each.value.vcn_name]
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ display_name = each.value.display_name
+ freeform_tags = each.value.freeform_tags
+ hostname_label = each.value.hostname_label
+ ip_address = each.value.ip_address
+ #nsg_ids = [for nsg in each.value.nsg_ids : length(regexall("ocid1.networksecuritygroup.oc*",nsg)) > 0 ? nsg : merge(module.nsgs.*...)[nsg]["nsg_tf_id"]]
+ #nsg_ids = each.value.nsg_ids == [] ? null : ([for nsg in each.value.nsg_ids : (length(regexall("ocid1.networksecuritygroup.oc*",nsg)) > 0 ? nsg : data.oci_core_network_security_groups.network_security_groups[nsg].network_security_groups[*].id)])
+ network_security_group_ids = each.value.nsg_ids
+}
+
+module "fss" {
+ #Required
+ source = "./modules/storage/file-storage/fss"
+ for_each = (var.fss != null || var.fss != {}) ? var.fss : {}
+
+ #Required
+ availability_domain = each.value.availability_domain != null && each.value.availability_domain != null ? data.oci_identity_availability_domains.availability_domains.availability_domains[each.value.availability_domain].name : null
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ display_name = each.value.display_name
+ freeform_tags = each.value.freeform_tags
+ kms_key_id = each.value.kms_key_id
+ source_snapshot_id = each.value.source_snapshot != null ? (length(regexall("ocid1.snapshot.oc*", each.value.source_snapshot)) > 0 ? each.value.source_snapshot : lookup(var.fss_source_ocids,each.value.source_snapshot,null)): null
+ filesystem_snapshot_policy_id = each.value.snapshot_policy
+ policy_compartment_id = each.value.policy_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.policy_compartment_id)) > 0 ? each.value.policy_compartment_id : var.compartment_ocids[each.value.policy_compartment_id]) : var.compartment_ocids[each.value.compartment_id]
+}
+
+module "fss-export-options" {
+ #Required
+ source = "./modules/storage/file-storage/export-option"
+ for_each = (var.nfs_export_options != null || var.nfs_export_options != {}) ? var.nfs_export_options : {}
+
+ #Required
+ export_set_id = length(regexall("ocid1.mounttarget.oc*", each.value.export_set_id)) > 0 ? each.value.export_set_id : merge(module.mts.*...)[each.value.export_set_id]["mt_exp_set_id"]
+ file_system_id = length(regexall("ocid1.filesystem.oc*", each.value.file_system_id)) > 0 ? each.value.file_system_id : merge(module.fss.*...)[each.value.file_system_id]["fss_tf_id"]
+ export_path = each.value.path
+ nfs_export_options = var.nfs_export_options
+ key_name = each.key
+}
+
+module "fss-replication" {
+ #Required
+ source = "./modules/storage/file-storage/fss-replication"
+ for_each = (var.fss_replication != null || var.fss_replication != {}) ? var.fss_replication : {}
+
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc1*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ source_id = length(regexall("ocid1.filesystem.oc1*", each.value.source_id)) > 0 ? each.value.source_id : merge(module.fss.*...)[each.value.source_id]["fss_tf_id"]
+ target_id = length(regexall("ocid1.filesystem.oc1*", each.value.target_id)) > 0 ? each.value.target_id : merge(module.fss.*...)[each.value.target_id]["fss_tf_id"]
+ #Optional
+ defined_tags = each.value.defined_tags
+ display_name = each.value.display_name
+ freeform_tags = each.value.freeform_tags
+ replication_interval = each.value.replication_interval
+
+}
+
+#############################
+# Module Block - FSS Logging
+# Create Log Groups and Logs
+#############################
+
+module "nfs-log-groups" {
+ source = "./modules/managementservices/log-group"
+ for_each = (var.nfs_log_groups != null || var.nfs_log_groups != {}) ? var.nfs_log_groups : {}
+
+ # Log Groups
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+
+ display_name = each.value.display_name
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ description = each.value.description
+ freeform_tags = each.value.freeform_tags
+}
+
+/*
+output "log_group_map" {
+ value = [ for k,v in merge(module.loadbalancer-log-groups.*...) : v.log_group_tf_id ]
+}
+*/
+
+module "nfs-logs" {
+ source = "./modules/managementservices/log"
+ for_each = (var.nfs_logs != null || var.nfs_logs != {}) ? var.nfs_logs : {}
+
+ # Logs
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ display_name = each.value.display_name
+ log_group_id = length(regexall("ocid1.loggroup.oc*", each.value.log_group_id)) > 0 ? each.value.log_group_id : merge(module.nfs-log-groups.*...)[each.value.log_group_id]["log_group_tf_id"]
+
+ log_type = each.value.log_type
+ #Required
+ source_category = each.value.category
+ source_resource = length(regexall("ocid1.*", each.value.resource)) > 0 ? each.value.resource : merge(module.mts.*...)[each.value.resource]["mt_tf_id"]
+ source_service = each.value.service
+ source_type = each.value.source_type
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+ log_is_enabled = (each.value.is_enabled == "" || each.value.is_enabled == null) ? true : each.value.is_enabled
+ log_retention_duration = (each.value.retention_duration == "" || each.value.retention_duration == null) ? 30 : each.value.retention_duration
+
+}
+
+/*
+output "logs_id" {
+ value = [ for k,v in merge(module.loadbalancer-logs.*...) : v.log_tf_id]
+}
+*/
diff --git a/examples/fss/oci-data.tf b/examples/fss/oci-data.tf
new file mode 100644
index 0000000..1495707
--- /dev/null
+++ b/examples/fss/oci-data.tf
@@ -0,0 +1,42 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Resource Block - Identity
+# Fetch Compartments
+############################
+
+#Fetch Compartment Details
+data "oci_identity_compartments" "compartments" {
+ #Required
+ compartment_id = var.tenancy_ocid
+
+ #Optional
+ #name = var.compartment_name
+ access_level = "ANY"
+ compartment_id_in_subtree = true
+ state = "ACTIVE"
+}
+
+
+############################
+# Data Block - Network
+# Fetch ADs
+############################
+
+data "oci_identity_availability_domains" "availability_domains" {
+ #Required
+ compartment_id = var.tenancy_ocid
+}
+
+
+/*
+output "compartment_id_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ value = zipmap(data.oci_identity_compartments.compartments.compartments.*.name,data.oci_identity_compartments.compartments.compartments.*.id)
+}
+
+output "ads" {
+ value = data.oci_identity_availability_domains.availability_domains.availability_domains.*.name
+}
+*/
\ No newline at end of file
diff --git a/examples/fss/provider.tf b/examples/fss/provider.tf
new file mode 100644
index 0000000..9a69c98
--- /dev/null
+++ b/examples/fss/provider.tf
@@ -0,0 +1,24 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Provider Block
+# OCI
+############################
+
+provider "oci" {
+ tenancy_ocid = var.tenancy_ocid
+ user_ocid = var.user_ocid
+ fingerprint = var.fingerprint
+ private_key_path = var.private_key_path
+ region = var.region
+ ignore_defined_tags = ["Oracle-Tags.CreatedBy", "Oracle-Tags.CreatedOn"]
+}
+
+terraform {
+ required_providers {
+ oci = {
+ source = "oracle/oci"
+ version = "5.40.0"
+ }
+ }
+}
diff --git a/examples/fss/variables_example.tf b/examples/fss/variables_example.tf
new file mode 100644
index 0000000..fae17ea
--- /dev/null
+++ b/examples/fss/variables_example.tf
@@ -0,0 +1,2082 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+#
+# Variables Block
+# OCI
+#
+############################
+
+variable "tenancy_ocid" {
+ type = string
+ default = ""
+}
+
+variable "user_ocid" {
+ type = string
+ default = ""
+}
+
+variable "fingerprint" {
+ type = string
+ default = ""
+}
+
+variable "private_key_path" {
+ type = string
+ default = ""
+}
+
+variable "region" {
+ type = string
+ default = ""
+}
+
+#################################
+# SSH Keys
+#################################
+
+variable "instance_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_instance_ssh_keys#
+ # exported instance ssh keys
+ #instance_ssh_keys_END#
+ }
+}
+
+variable "oke_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_oke_ssh_keys#
+ #oke_ssh_keys_END#
+ }
+}
+variable "sddc_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_sddc_ssh_keys#
+ #sddc_ssh_keys_END#
+ }
+}
+
+variable "exacs_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_exacs_ssh_keys#
+ # exported exacs ssh keys
+ #exacs_ssh_keys_END#
+ }
+}
+
+variable "dbsystem_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_dbsystem_ssh_keys#
+ # exported dbsystem ssh keys
+ #dbsystem_ssh_keys_END#
+ }
+}
+
+#################################
+# Platform Image OCIDs and
+# Market Place Images
+#################################
+
+variable "instance_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ Windows = ""
+ PaloAlto = "Palo Alto Networks VM-Series Next Generation Firewall"
+ #START_instance_source_ocids#
+ # exported instance image ocids
+ #instance_source_ocids_END#
+ }
+}
+
+variable "blockvolume_source_ocids" {
+ type = map(any)
+ default = {
+ block1 = ""
+ #blockvolume_source_ocid = ""
+ #START_blockvolume_source_ocids#
+ # exported block volume source ocids
+ #blockvolume_source_ocids_END#
+ }
+}
+
+variable "fss_source_ocids" {
+ type = map(any)
+ default = {
+ snapshot1 = ""
+ #fss_source_snapshot_ocid = ""
+ #START_fss_source_snapshot_ocids#
+ # exported fss source snapshot ocids
+ #fss_source_snapshot_ocids_END#
+ }
+}
+
+variable "oke_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ #START_oke_source_ocids#
+ # exported oke image ocids
+ #oke_source_ocids_END#
+ }
+}
+
+#################################
+#
+# Variables according to Services
+# PLEASE DO NOT MODIFY
+#
+#################################
+
+##########################
+## Fetch Compartments ####
+##########################
+
+variable "compartment_ocids" {
+ type = map(any)
+ default = {
+ #START_compartment_ocids#
+ # compartment ocids
+ #compartment_ocids_END#
+ }
+}
+
+#########################
+##### Identity ##########
+#########################
+
+variable "compartments" {
+ type = object({
+ root = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level1 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level2 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level3 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level4 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level5 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ })
+ default = {
+ root = {},
+ compartment_level1 = {},
+ compartment_level2 = {},
+ compartment_level3 = {},
+ compartment_level4 = {},
+ compartment_level5 = {},
+ }
+}
+
+variable "policies" {
+ type = map(object({
+ name = string
+ compartment_id = string
+ policy_description = string
+ policy_statements = list(string)
+ policy_version_date = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "groups" {
+ type = map(object({
+ group_name = string
+ group_description = string
+ matching_rule = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "users" {
+ type = map(object({
+ name = string
+ description = string
+ email = string
+ disable_capabilities = optional(list(string))
+ group_membership = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "networkSources" {
+ type = map(object({
+ name = string
+ description = string
+ public_source_list = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ virtual_source_list = optional(list(map(list(string))))
+
+ }))
+ default = {}
+}
+
+#########################
+####### Governance #########
+#########################
+
+variable "tag_namespaces" {
+ description = "To provision Namespaces"
+ type = map(object({
+ compartment_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_retired = optional(bool)
+ }))
+ default = {}
+}
+
+variable "tag_keys" {
+ description = "To provision Tag Keys"
+ type = map(object({
+ tag_namespace_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_cost_tracking = optional(bool)
+ is_retired = optional(bool)
+ validator = optional(list(object({
+ validator_type = optional(string)
+ validator_values = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "tag_defaults" {
+ description = "To make the Tag keys as default to compartments"
+ type = map(object({
+ compartment_id = string
+ tag_definition_id = string
+ value = string
+ is_required = optional(bool)
+ }))
+ default = {}
+}
+
+variable "quota_policies" {
+ type = map(object({
+ quota_name = string
+ quota_description = string
+ quota_statements = list(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### Network ##########
+#########################
+
+variable "default_dhcps" {
+ type = map(object({
+ server_type = string
+ manage_default_resource_id = optional(string)
+ custom_dns_servers = optional(list(any))
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "custom_dhcps" {
+ type = map(object({
+ compartment_id = string
+ server_type = string
+ vcn_id = string
+ custom_dns_servers = optional(list(any))
+ domain_name_type = optional(string)
+ display_name = optional(string)
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcns" {
+ type = map(object({
+ compartment_id = string
+ cidr_blocks = optional(list(string))
+ byoipv6cidr_details = optional(list(map(any)))
+ display_name = optional(string)
+ dns_label = optional(string)
+ is_ipv6enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ipv6private_cidr_blocks = optional(list(string))
+ is_oracle_gua_allocation_enabled = optional(bool)
+ }))
+ default = {}
+}
+
+variable "igws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ enable_igw = optional(bool)
+ igw_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_table_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "sgws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ service = optional(string)
+ sgw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "ngws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ block_traffic = optional(bool)
+ public_ip_id = optional(string)
+ ngw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "lpgs" {
+ type = map(any)
+ default = {
+ hub-lpgs = {},
+ spoke-lpgs = {},
+ peer-lpgs = {},
+ none-lpgs = {},
+ exported-lpgs = {},
+ }
+}
+
+variable "drgs" {
+ type = map(object({
+ compartment_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "default_seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+
+}))
+default = {}
+}
+
+variable "default_route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+}))
+ default = {}
+}
+
+variable "nsgs" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nsg_rules" {
+ type = map(object({
+ nsg_id = string
+ direction = string
+ protocol = string
+ description = optional(string)
+ stateless = optional(string)
+ source_type = optional(string)
+ destination_type = optional(string)
+ destination = optional(string)
+ source = optional(string)
+ options = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "subnets" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ cidr_block = string
+ display_name = optional(string)
+ dns_label = optional(string)
+ ipv6cidr_block = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ prohibit_internet_ingress = optional(string)
+ prohibit_public_ip_on_vnic = optional(string)
+ availability_domain = optional(string)
+ dhcp_options_id = optional(string)
+ route_table_id = optional(string)
+ security_list_ids = optional(list(string))
+ }))
+ default = {}
+}
+
+variable "vlans" {
+ type = map(object({
+ cidr_block = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ nsg_ids = optional(list(string))
+ route_table_name = optional(string)
+ vlan_tag = optional(string)
+ availability_domain = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "drg_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_other_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_tables" {
+ type = map(object({
+ drg_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_ecmp_enabled = optional(bool)
+ import_drg_route_distribution_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_rules" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_distributions" {
+ type = map(object({
+ distribution_type = string
+ drg_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_distribution_statements" {
+ type = map(object({
+ drg_route_distribution_id = string
+ action = string
+ match_criteria = optional(list(object({
+ match_type = string
+ attachment_type = optional(string)
+ drg_attachment_id = optional(string)
+ })))
+ priority = optional(string)
+ }))
+ default = {}
+}
+
+variable "data_drg_route_tables" {
+ type = map(any)
+ default = {}
+}
+
+variable "data_drg_route_table_distributions" {
+ type = map(any)
+ default = {}
+}
+
+####################
+####### DNS #######
+####################
+
+variable "zones" {
+type = map(object({
+compartment_id = string
+display_name = string
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_type = optional(string)
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+variable "views" {
+type = map(object({
+compartment_id = string
+display_name = string
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+ default = {}
+}
+
+variable "rrsets" {
+type = map(object({
+compartment_id = optional(string)
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_id = string
+domain = string
+rtype = string
+ttl = number
+rdata = optional(list(string))
+scope = optional(string)
+}))
+default = {}
+}
+
+variable "resolvers" {
+type = map(object({
+network_compartment_id= string
+vcn_name = string
+display_name = optional(string)
+views = optional(map(object({
+ view_id = optional(string)
+ view_compartment_id = optional(string)
+})))
+resolver_rules = optional(map(object({
+ client_address_conditions = optional(list(any))
+ destination_addresses = optional(list(any))
+ qname_cover_conditions = optional(list(any))
+ source_endpoint_name = optional(string)
+})))
+endpoint_names = optional(map(object({
+ is_forwarding = optional(bool)
+ is_listening = optional(bool)
+ name = optional(string)
+ subnet_name = optional(string)
+ forwarding_address = optional(string)
+ listening_address = optional(string)
+ nsg_ids = optional(list(string))
+})))
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+
+#########################
+## Dedicated VM Hosts ##
+#########################
+
+variable "dedicated_hosts" {
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ vm_host_shape = string
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ fault_domain = optional(string)
+ freeform_tags = optional(map(any))
+ }))
+ description = "To provision new dedicated VM hosts"
+ default = {}
+}
+
+#########################
+## Instances/Block Volumes ##
+#########################
+
+variable "blockvolumes" {
+ description = "To provision block volumes"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = string
+ size_in_gbs = optional(string)
+ is_auto_tune_enabled = optional(string)
+ vpus_per_gb = optional(string)
+ kms_key_id = optional(string)
+ attach_to_instance = optional(string)
+ attachment_type = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ device = optional(string)
+ encryption_in_transit_type = optional(string)
+ attachment_display_name = optional(string)
+ is_read_only = optional(bool)
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ is_shareable = optional(bool)
+ use_chap = optional(bool)
+ is_agent_auto_iscsi_login_enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ source_details = optional(list(map(any)))
+ block_volume_replicas = optional(list(map(any)))
+ block_volume_replicas_deletion = optional(bool)
+ autotune_policies = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "block_backup_policies" {
+ type = map(any)
+ description = "To create block volume back policy"
+ default = {}
+}
+
+variable "instances" {
+ description = "Map of instances to be provisioned"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ shape = string
+ source_id = string
+ source_type = string
+ vcn_name = string
+ subnet_id = string
+ network_compartment_id = string
+ display_name = optional(string)
+ assign_public_ip = optional(bool)
+ boot_volume_size_in_gbs = optional(string)
+ fault_domain = optional(string)
+ dedicated_vm_host_id = optional(string)
+ private_ip = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(string))
+ ocpus = optional(string)
+ memory_in_gbs = optional(number)
+ capacity_reservation_id = optional(string)
+ create_is_pv_encryption_in_transit_enabled = optional(bool)
+ remote_execute = optional(string)
+ bastion_ip = optional(string)
+ cloud_init_script = optional(string)
+ ssh_authorized_keys = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ network_type = optional(string)
+ #extended_metadata = optional(string)
+ skip_source_dest_check = optional(bool)
+ baseline_ocpu_utilization = optional(string)
+ #preemptible_instance_config = optional(string)
+ all_plugins_disabled = optional(bool)
+ is_management_disabled = optional(bool)
+ is_monitoring_disabled = optional(bool)
+ assign_private_dns_record = optional(string)
+ plugins_details = optional(map(any))
+ is_live_migration_preferred = optional(bool)
+ recovery_action = optional(string)
+ are_legacy_imds_endpoints_disabled = optional(bool)
+ boot_volume_type = optional(string)
+ firmware = optional(string)
+ is_consistent_volume_naming_enabled = optional(bool)
+ remote_data_volume_type = optional(string)
+ platform_config = optional(list(map(any)))
+ launch_options = optional(list(map(any)))
+ ipxe_script = optional(string)
+ preserve_boot_volume = optional(bool)
+ vlan_id = optional(string)
+ kms_key_id = optional(string)
+ vnic_display_name = optional(string)
+ vnic_defined_tags = optional(map(any))
+ vnic_freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "boot_backup_policies" {
+ type = map(any)
+ description = "Map of boot volume backup policies to be provisioned"
+ default = {}
+}
+
+#########################
+####### Database ########
+#########################
+
+variable "exa_infra" {
+ description = "To provision exadata infrastructure"
+ type = map(any)
+ default = {}
+}
+
+variable "exa_vmclusters" {
+ description = "To provision exadata cloud VM cluster"
+ type = map(any)
+ default = {}
+}
+
+variable "dbsystems_vm_bm" {
+ description = "To provision DB System"
+ type = map(any)
+ default = {}
+}
+
+variable "db_home" {
+ type = map(any)
+ description = "Map of database db home to be provisioned"
+ default = {}
+}
+
+variable "databases" {
+ description = "Map of databases to be provisioned in an existing db_home"
+ type = map(any)
+ default = {}
+}
+
+####################################
+####### Autonomous Database ########
+####################################
+
+variable "adb" {
+ type = map(object({
+ admin_password = optional(string)
+ character_set = optional(string)
+ compartment_id = string
+ cpu_core_count = optional(number)
+ database_edition = optional(string)
+ data_storage_size_in_tbs = optional(number)
+ customer_contacts = optional(list(string))
+ db_name = string
+ db_version = optional(string)
+ db_workload = optional(string)
+ display_name = optional(string)
+ license_model = optional(string)
+ ncharacter_set = optional(string)
+ network_compartment_id = optional(string)
+ nsg_ids = optional(list(string))
+ subnet_id = optional(string)
+ vcn_name = optional(string)
+ whitelisted_ips = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+######### FSS ###########
+#########################
+
+variable "mount_targets" {
+ description = "To provision Mount Targets"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ display_name = optional(string)
+ ip_address = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fss" {
+ description = "To provision File System Services"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = optional(string)
+ source_snapshot = optional(string)
+ snapshot_policy = optional(string)
+ policy_compartment_id = optional(string)
+ kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_export_options" {
+ description = "To provision Export Sets"
+ type = map(object({
+ export_set_id = string
+ file_system_id = string
+ path = string
+ export_options = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_idmap_groups_for_sys_auth = optional(bool)
+ }))
+ default = {}
+}
+
+variable "fss_replication" {
+ description = "To provision File System Replication"
+ type = map(object({
+ compartment_id = string
+ source_id = string
+ target_id = string
+ display_name = optional(string)
+ replication_interval = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+####### FSS Logs ########
+#########################
+
+variable "nfs_log_groups" {
+ description = "To provision Log Groups for Mount Target"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_logs" {
+ description = "To provision Logs for Mount Target"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+#########################
+#### Load Balancers #####
+#########################
+
+variable "load_balancers" {
+ description = "To provision Load Balancers"
+ type = map(object({
+ compartment_id = string
+ vcn_name = string
+ shape = string
+ subnet_ids = list(any)
+ network_compartment_id = string
+ display_name = string
+ shape_details = optional(list(map(any)))
+ nsg_ids = optional(list(any))
+ is_private = optional(bool)
+ ip_mode = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ reserved_ips_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "hostnames" {
+ description = "To provision Load Balancer Hostnames"
+ type = map(object({
+ load_balancer_id = string
+ hostname = string
+ name = string
+ }))
+ default = {}
+}
+
+variable "certificates" {
+ description = "To provision Load Balancer Certificates"
+ type = map(object({
+ certificate_name = string
+ load_balancer_id = string
+ ca_certificate = optional(string)
+ passphrase = optional(string)
+ private_key = optional(string)
+ public_certificate = optional(string)
+ }))
+ default = {}
+}
+
+variable "cipher_suites" {
+ description = "To provision Load Balancer Cipher Suites"
+ type = map(object({
+ ciphers = list(string)
+ name = string
+ load_balancer_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "backend_sets" {
+ description = "To provision Load Balancer Backend Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ policy = string
+ protocol = optional(string)
+ interval_ms = optional(string)
+ is_force_plain_text = optional(string)
+ port = optional(string)
+ response_body_regex = optional(string)
+ retries = optional(string)
+ return_code = optional(string)
+ timeout_in_millis = optional(string)
+ url_path = optional(string)
+ lb_cookie_session = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ path = optional(string)
+ domain = optional(string)
+ is_http_only = optional(string)
+ is_secure = optional(string)
+ max_age_in_seconds = optional(string)
+ })))
+ session_persistence_configuration = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ })))
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "backends" {
+ description = "To provision Load Balancer Backends"
+ type = map(object({
+ backendset_name = string
+ ip_address = string
+ load_balancer_id = string
+ port = string
+ instance_compartment = optional(string)
+ backup = optional(string)
+ drain = optional(string)
+ offline = optional(string)
+ weight = optional(string)
+ }))
+ default = {}
+}
+
+variable "listeners" {
+ description = "To provision Load Balancer Listeners"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ port = string
+ protocol = string
+ default_backend_set_name = string
+ connection_configuration = optional(list(map(any)))
+ hostname_names = optional(list(any))
+ path_route_set_name = optional(string)
+ rule_set_names = optional(list(any))
+ routing_policy_name = optional(string)
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "path_route_sets" {
+ description = "To provision Load Balancer Path Route Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ path_routes = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "rule_sets" {
+ description = "To provision Load Balancer Rule Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ access_control_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ description = optional(string)
+ })))
+ access_control_method_rules = optional(list(object({
+ action = string
+ allowed_methods = optional(list(any))
+ status_code = optional(string)
+ })))
+ http_header_rules = optional(list(object({
+ action = string
+ are_invalid_characters_allowed = optional(bool)
+ http_large_header_size_in_kb = optional(string)
+ })))
+ uri_redirect_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ operator = optional(string)
+ host = optional(string)
+ path = optional(string)
+ port = optional(string)
+ protocol = optional(string)
+ query = optional(string)
+ response_code = optional(string)
+ })))
+ request_response_header_rules = optional(list(object({
+ action = string
+ header = optional(string)
+ prefix = optional(string)
+ suffix = optional(string)
+ value = optional(string)
+ })))
+ }))
+ default = {}
+}
+
+variable "lbr_reserved_ips" {
+ description = "To provision Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ lifetime = string
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+###################################
+####### Load Balancer Logs ########
+###################################
+
+variable "loadbalancer_log_groups" {
+ description = "To provision Log Groups for Load Balancers"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "loadbalancer_logs" {
+ description = "To provision Logs for Load Balancers"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+## Network Load Balancers ##
+#########################
+
+variable "network_load_balancers" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ is_private = optional(bool)
+ reserved_ips_id = string
+ is_preserve_source_destination = optional(bool)
+ is_symmetric_hash_enabled = optional(bool)
+ nlb_ip_version = optional(string)
+ assigned_private_ipv4 = optional(string)
+ nsg_ids = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "nlb_listeners" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ default_backend_set_name = string
+ port = number
+ protocol = string
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+
+variable "nlb_backend_sets" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ policy = string
+ protocol = string
+ domain_name = optional(string)
+ query_class = optional(string)
+ query_type = optional(string)
+ rcodes = optional(list(string))
+ transport_protocol = optional(string)
+ return_code = optional(number)
+ interval_in_millis = optional(number)
+ port = optional(number)
+ request_data = optional(string)
+ response_body_regex = optional(string)
+ response_data = optional(string)
+ retries = optional(number)
+ timeout_in_millis = optional(number)
+ url_path = optional(string)
+ is_preserve_source = optional(bool)
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_backends" {
+ type = map(object({
+ name = optional(string)
+ backend_set_name = string
+ network_load_balancer_id = string
+ port = number
+ ip_address = string
+ instance_compartment = string
+ is_drain = optional(bool)
+ is_backup = optional(bool)
+ is_offline = optional(bool)
+ weight = optional(number)
+ target_id = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_reserved_ips" {
+ description = "To provision Network Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ lifetime = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ }))
+ default = {}
+}
+
+
+#########################
+##### IP Management #####
+#########################
+
+variable "public_ip_pools" {
+ type = map(any)
+ default = {}
+}
+
+variable "private_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "reserved_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "vnic_attachments" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+##### VCN Logs ##########
+#########################
+
+variable "vcn_log_groups" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcn_logs" {
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### OSS Buckets ######
+#########################
+
+variable "buckets" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+####### OSS Logs ########
+#########################
+
+variable "oss_log_groups" {
+ description = "To provision Log Groups for OSS"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "oss_logs" {
+ description = "To provision Logs for OSS"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+### OSS IAM Policies ####
+#########################
+
+variable "oss_policies" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+## Management Services ##
+#########################
+
+variable "alarms" {
+ type = map(object({
+ compartment_id = string
+ destinations = list(string)
+ alarm_name = string
+ is_enabled = bool
+ metric_compartment_id = string
+ namespace = string
+ query = string
+ severity = string
+ body = optional(string)
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_notifications_per_metric_dimension_enabled = optional(bool)
+ metric_compartment_id_in_subtree = optional(string)
+ trigger_delay_minutes = optional(string)
+ repeat_notification_duration = optional(string)
+ resolution = optional(string)
+ resource_group = optional(string)
+ suppression = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "events" {
+ type = map(object({
+ event_name = string
+ compartment_id = string
+ description = string
+ is_enabled = bool
+ condition = string
+ actions = optional(list(object({
+ action_type = string
+ is_enabled = string
+ description = optional(string)
+ function_id = optional(string)
+ stream_id = optional(string)
+ topic_id = optional(string)
+ })))
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_topics" {
+ type = map(object({
+ compartment_id = string
+ topic_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_subscriptions" {
+ type = map(object({
+ compartment_id = string
+ endpoint = string
+ protocol = string
+ topic_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "service_connectors" {
+ type = any
+ default = {}
+ description = "To provision service connector hub resources"
+}
+
+#########################
+## Developer Services ##
+#########################
+
+## OKE
+
+variable "clusters" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ kubernetes_version = string
+ cni_type = string
+ cluster_type = string
+ is_policy_enabled = optional(bool)
+ policy_kms_key_id = optional(string)
+ is_kubernetes_dashboard_enabled = optional(bool)
+ is_tiller_enabled = optional(bool)
+ is_public_ip_enabled = optional(bool)
+ nsg_ids = optional(list(string))
+ endpoint_subnet_id = string
+ is_pod_security_policy_enabled = optional(bool)
+ pods_cidr = optional(string)
+ services_cidr = optional(string)
+ service_lb_subnet_ids = optional(list(string))
+ cluster_kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ lb_defined_tags = optional(map(any))
+ lb_freeform_tags = optional(map(any))
+ volume_defined_tags = optional(map(any))
+ volume_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_node_labels = optional(map(any))
+ kubernetes_version = string
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ availability_domain = number
+ fault_domains = optional(list(string))
+ subnet_id = string
+ size = number
+ cni_type = string
+ max_pods_per_node = optional(number)
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_ids = optional(string)
+ worker_nsg_ids = optional(list(string))
+ memory_in_gbs = optional(number)
+ ocpus = optional(number)
+ image_id = string
+ source_type = string
+ boot_volume_size_in_gbs = optional(number)
+ ssh_public_key = optional(string)
+ nodepool_kms_key_id = optional(string)
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "virtual-nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_virtual_node_labels = optional(map(any))
+ availability_domain = number
+ fault_domains = list(string)
+ subnet_id = string
+ size = number
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_id = string
+ worker_nsg_ids = optional(list(string))
+ taints = optional(list(any))
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+##################################
+############## SDDCs #############
+##################################
+variable "sddcs" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = string
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = string
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ initial_cluster_display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ management_datastore = optional(list(string))
+ workload_datastore = optional(list(string))
+
+ }))
+ default = {}
+
+}
+
+variable "sddc-clusters" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = optional(string)
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = optional(string)
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ workload_datastore = optional(list(string))
+ sddc_id = optional(string)
+ esxi_software_version = optional(string)
+
+ }))
+ default = {}
+
+}
+
+
+############################
+## Key Management Service ##
+############################
+
+variable "vaults" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_type = string
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ replica_region = optional(string)
+ }))
+ default = {}
+}
+
+variable "keys" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_name = string
+ algorithm = optional(string)
+ length = optional(string)
+ curve_id = optional(string)
+ protection_mode = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ is_auto_rotation_enabled = optional(bool)
+ rotation_interval_in_days = optional(string)
+
+ }))
+ default = {}
+}
+
+###########################
+######### Budgets #########
+###########################
+
+variable "budgets" {
+ type = map(object({
+ amount = string
+ compartment_id = string
+ reset_period = string
+ budget_processing_period_start_offset = optional(string)
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ processing_period_type = optional(string)
+ budget_end_date = optional(string)
+ budget_start_date = optional(string)
+ target_type = optional(string)
+ targets = optional(list(any))
+ }))
+ default = {}
+}
+
+variable "budget_alert_rules" {
+ type = map(object({
+ budget_id = string
+ threshold = string
+ threshold_type = string
+ type = string
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ message = optional(string)
+ recipients = optional(string)
+ }))
+ default = {}
+}
+
+###########################
+####### Cloud Guard #######
+###########################
+
+variable "cloud_guard_configs" {
+ type = map(object({
+ compartment_id = string
+ reporting_region = string
+ status = string
+ self_manage_resources = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "cloud_guard_targets" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ target_resource_id = string
+ target_resource_type = string
+ prefix = string
+ description = optional(string)
+ state = optional(string)
+ target_detector_recipes = optional(list(any))
+ target_responder_recipes = optional(list(any))
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+####################################
+####### Custom Backup Policy #######
+####################################
+
+variable "custom_backup_policies" {
+ type = map(any)
+ default = {}
+}
+
+variable "capacity_reservation_ocids" {
+ type = map(any)
+ default = {
+ "AD1" : "",
+ "AD2" : "",
+ "AD3" : ""
+ }
+}
+
+#####################################
+####### Firewall as a Service #######
+#####################################
+variable "firewalls" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ network_firewall_policy_id = string
+ subnet_id = string
+ vcn_name = string
+ display_name = string
+ ipv4address = optional(string)
+ nsg_id = optional(list(string))
+ ipv6address = optional(string)
+ availability_domain = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw-policies" {
+ type = map(object({
+ compartment_id = optional(string)
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "services" {
+ type = map(object({
+ service_name = string
+ service_type = string
+ network_firewall_policy_id = string
+ port_ranges = list(object({
+ minimum_port = string
+ maximum_port = optional(string)
+ }))
+ }))
+ default = {}
+}
+variable "url_lists" {
+ type = map(object({
+ urllist_name = string
+ network_firewall_policy_id = string
+ urls = list(object({
+ pattern = string
+ type = string
+ }))
+ }))
+ default = {}
+}
+variable "service_lists" {
+ type = map(object({
+ service_list_name = string
+ network_firewall_policy_id = string
+ services = list(string)
+ }))
+ default = {}
+}
+
+variable "address_lists" {
+ type = map(object({
+ address_list_name = string
+ network_firewall_policy_id = string
+ address_type = string
+ addresses = list(string)
+ }))
+ default = {}
+}
+
+variable "applications" {
+ type = map(object({
+ app_list_name = string
+ network_firewall_policy_id = string
+ app_type = string
+ icmp_type = number
+ icmp_code = optional(number)
+ }))
+ default = {}
+}
+
+variable "application_groups" {
+ type = map(object({
+ app_group_name = string
+ network_firewall_policy_id = string
+ apps = list(string)
+
+ }))
+ default = {}
+}
+
+variable "security_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+ application = optional(list(string))
+ destination_address = optional(list(string))
+ service = optional(list(string))
+ source_address = optional(list(string))
+ url = optional(list(string))
+ })))
+ inspection = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "secrets" {
+ type = map(object({
+ secret_name = string
+ network_firewall_policy_id = string
+ secret_source = string
+ secret_type = string
+ vault_secret_id = string
+ version_number = number
+ vault_name = string
+ vault_compartment_id = string
+ }))
+ default = {}
+}
+
+variable "decryption_profiles" {
+ type = map(object({
+ profile_name = string
+ profile_type = string
+ network_firewall_policy_id = string
+ are_certificate_extensions_restricted = optional(bool)
+ is_auto_include_alt_name = optional(bool)
+ is_expired_certificate_blocked = optional(bool)
+ is_out_of_capacity_blocked = optional(bool)
+ is_revocation_status_timeout_blocked = optional(bool)
+ is_unknown_revocation_status_blocked = optional(bool)
+ is_unsupported_cipher_blocked = optional(bool)
+ is_unsupported_version_blocked = optional(bool)
+ is_untrusted_issuer_blocked = optional(bool)
+ }))
+ default = {}
+}
+
+variable "decryption_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+
+ destination_address = optional(list(string))
+
+ source_address = optional(list(string))
+
+ })))
+ decryption_profile = optional(string)
+ secret = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+#########################
+####### Firewall Logs ########
+#########################
+
+variable "fw_log_groups" {
+ description = "To provision Log Groups for Network Firewall"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw_logs" {
+ description = "To provision Logs for Network Firewall"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+##########################
+# Add new variables here #
+##########################
+######################### END #########################
diff --git a/examples/identity/backend.tf b/examples/identity/backend.tf
new file mode 100644
index 0000000..16bc557
--- /dev/null
+++ b/examples/identity/backend.tf
@@ -0,0 +1,21 @@
+/*This line will be removed when using remote state
+# !!! WARNING !!! Terraform State Lock is not supported with OCI Object Storage.
+# Pre-Requisite: Create a version enabled object storage bucket to store the state file.
+# End Point Format: https://.compat.objectstorage..oraclecloud.com
+# Please look at the below doc for information about shared_credentials_file and other parameters:
+# Reference: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
+
+terraform {
+ backend "s3" {
+ key = ""
+ bucket = ""
+ region = ""
+ endpoint = ""
+ shared_credentials_file = "~/.aws/credentials"
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_metadata_api_check = true
+ force_path_style = true
+ }
+}
+This line will be removed when using remote state*/
\ No newline at end of file
diff --git a/examples/identity/identity.tf b/examples/identity/identity.tf
new file mode 100644
index 0000000..a83c307
--- /dev/null
+++ b/examples/identity/identity.tf
@@ -0,0 +1,280 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Module Block - Identity
+# Create Compartments
+############################
+
+module "iam-compartments" {
+ source = "./modules/identity/iam-compartment"
+ for_each = var.compartments.root != null ? var.compartments.root : {}
+
+ # insert the 4 required variables here
+ tenancy_ocid = var.tenancy_ocid
+ compartment_id = each.value.parent_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.parent_compartment_id)) > 0 ? each.value.parent_compartment_id : try(var.compartment_ocids[each.value.parent_compartment_id], zipmap(data.oci_identity_compartments.compartments.compartments.*.name, data.oci_identity_compartments.compartments.compartments.*.id)[each.value.parent_compartment_id])) : var.tenancy_ocid
+ compartment_name = each.value.name
+ compartment_description = each.value.description
+ enable_delete = each.value.enable_delete
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+module "sub-compartments-level1" {
+ source = "./modules/identity/iam-compartment"
+ for_each = var.compartments.compartment_level1 != null ? var.compartments.compartment_level1 : {}
+
+ depends_on = [module.iam-compartments]
+ # insert the 4 required variables here
+ tenancy_ocid = var.tenancy_ocid
+ compartment_id = length(regexall("ocid1.compartment.oc*", each.value.parent_compartment_id)) > 0 ? each.value.parent_compartment_id : try(merge(module.iam-compartments.*...)[each.value.parent_compartment_id]["compartment_tf_id"], var.compartment_ocids[each.value.parent_compartment_id], zipmap(data.oci_identity_compartments.compartments.compartments.*.name, data.oci_identity_compartments.compartments.compartments.*.id)[each.value.parent_compartment_id])
+ compartment_name = each.value.name
+ compartment_description = each.value.description
+ enable_delete = each.value.enable_delete
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+module "sub-compartments-level2" {
+ source = "./modules/identity/iam-compartment"
+ for_each = var.compartments.compartment_level2 != null ? var.compartments.compartment_level2 : {}
+
+ depends_on = [module.sub-compartments-level1]
+ # insert the 4 required variables here
+ tenancy_ocid = var.tenancy_ocid
+ compartment_id = length(regexall("ocid1.compartment.oc*", each.value.parent_compartment_id)) > 0 ? each.value.parent_compartment_id : try(merge(module.sub-compartments-level1.*...)[each.value.parent_compartment_id]["compartment_tf_id"], var.compartment_ocids[each.value.parent_compartment_id], zipmap(data.oci_identity_compartments.compartments.compartments.*.name, data.oci_identity_compartments.compartments.compartments.*.id)[each.value.parent_compartment_id])
+ compartment_name = each.value.name
+ compartment_description = each.value.description
+
+ enable_delete = each.value.enable_delete
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+module "sub-compartments-level3" {
+ source = "./modules/identity/iam-compartment"
+ for_each = var.compartments.compartment_level3 != null ? var.compartments.compartment_level3 : {}
+
+ depends_on = [module.sub-compartments-level2]
+ # insert the 4 required variables here
+ tenancy_ocid = var.tenancy_ocid
+ compartment_id = length(regexall("ocid1.compartment.oc*", each.value.parent_compartment_id)) > 0 ? each.value.parent_compartment_id : try(merge(module.sub-compartments-level2.*...)[each.value.parent_compartment_id]["compartment_tf_id"], var.compartment_ocids[each.value.parent_compartment_id], zipmap(data.oci_identity_compartments.compartments.compartments.*.name, data.oci_identity_compartments.compartments.compartments.*.id)[each.value.parent_compartment_id])
+ compartment_name = each.value.name
+ compartment_description = each.value.description
+ enable_delete = each.value.enable_delete
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+module "sub-compartments-level4" {
+ source = "./modules/identity/iam-compartment"
+ for_each = var.compartments.compartment_level4 != null ? var.compartments.compartment_level4 : {}
+
+ depends_on = [module.sub-compartments-level3]
+ # insert the 4 required variables here
+ tenancy_ocid = var.tenancy_ocid
+ compartment_id = length(regexall("ocid1.compartment.oc*", each.value.parent_compartment_id)) > 0 ? each.value.parent_compartment_id : try(merge(module.sub-compartments-level3.*...)[each.value.parent_compartment_id]["compartment_tf_id"], var.compartment_ocids[each.value.parent_compartment_id], zipmap(data.oci_identity_compartments.compartments.compartments.*.name, data.oci_identity_compartments.compartments.compartments.*.id)[each.value.parent_compartment_id])
+ compartment_name = each.value.name
+ compartment_description = each.value.description
+ enable_delete = each.value.enable_delete
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+module "sub-compartments-level5" {
+ source = "./modules/identity/iam-compartment"
+ for_each = var.compartments.compartment_level5 != null ? var.compartments.compartment_level5 : {}
+
+ depends_on = [module.sub-compartments-level4]
+ # insert the 4 required variables here
+ tenancy_ocid = var.tenancy_ocid
+ compartment_id = length(regexall("ocid1.compartment.oc*", each.value.parent_compartment_id)) > 0 ? each.value.parent_compartment_id : try(merge(module.sub-compartments-level4.*...)[each.value.parent_compartment_id]["compartment_tf_id"], var.compartment_ocids[each.value.parent_compartment_id], zipmap(data.oci_identity_compartments.compartments.compartments.*.name, data.oci_identity_compartments.compartments.compartments.*.id)[each.value.parent_compartment_id])
+ compartment_name = each.value.name
+ compartment_description = each.value.description
+ enable_delete = each.value.enable_delete
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+/*
+output "root_compartments_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ #value = element(concat(oci_identity_compartment.this.*.id, tolist([""])), 0)
+ value = [ for k,v in merge(module.iam-compartments.*...) : v.compartment_id]
+}
+
+output "sub_compartments_level1_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ #value = element(concat(oci_identity_compartment.this.*.id, tolist([""])), 0)
+ value = [ for k,v in merge(module.sub-compartments-level1.*...) : v.compartment_id]
+}
+
+output "sub_compartments_level2_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ #value = element(concat(oci_identity_compartment.this.*.id, tolist([""])), 0)
+ value = [ for k,v in merge(module.sub-compartments-level2.*...) : v.compartment_id]
+}
+
+output "sub_compartments_level3_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ #value = element(concat(oci_identity_compartment.this.*.id, tolist([""])), 0)
+ value = [ for k,v in merge(module.sub-compartments-level3.*...) : v.compartment_id]
+}
+
+output "sub_compartments_level4_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ #value = element(concat(oci_identity_compartment.this.*.id, tolist([""])), 0)
+ value = [ for k,v in merge(module.sub-compartments-level4.*...) : v.compartment_id]
+}
+
+output "sub_compartments_level5_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ #value = element(concat(oci_identity_compartment.this.*.id, tolist([""])), 0)
+ value = [ for k,v in merge(module.sub-compartments-level5.*...) : v.compartment_id]
+}
+*/
+
+
+############################
+# Module Block - Identity
+# Create Groups
+############################
+
+module "iam-groups" {
+ source = "./modules/identity/iam-group"
+ for_each = var.groups
+
+ tenancy_ocid = var.tenancy_ocid
+ group_name = each.value.group_name
+ group_description = each.value.group_description
+ matching_rule = each.value.matching_rule
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+/*
+output "group_id_map" {
+ value = [ for k,v in merge(module.iam-groups.*...) : v.group_id_map]
+}
+
+
+output "dynamic_group_id_map" {
+ value = [ for k,v in merge(module.iam-groups.*...) : v.dynamic_group_id_map]
+}
+*/
+
+############################
+# Module Block - Identity
+# Create Policies
+############################
+
+module "iam-policies" {
+ source = "./modules/identity/iam-policy"
+ for_each = var.policies
+
+ depends_on = [module.iam-groups]
+ tenancy_ocid = var.tenancy_ocid
+ policy_name = each.value.name
+ policy_compartment_id = each.value.compartment_id != "root" ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : var.tenancy_ocid
+ policy_description = each.value.policy_description
+ policy_statements = each.value.policy_statements
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+ policy_version_date = each.value.policy_version_date
+}
+
+/*
+output "policies_id_map" {
+ value = [ for k,v in merge(module.iam-policies.*...) : v.policies_id_map]
+}
+*/
+
+############################
+# Module Block - Identity
+# Create Users
+############################
+
+module "iam-users" {
+ source = "./modules/identity/iam-user"
+ depends_on = [module.iam-groups]
+ for_each = var.users
+ user_name = each.value.name
+ user_description = each.value.description
+ user_email = each.value.email
+ group_membership = each.value.group_membership != null ? each.value.group_membership : null
+ #group_membership = each.value.group_membership != null ? length(regexall("ocid1.groupmembership.oc*", each.value.group_membership.0)) > 0 ? each.value.group_membership.0 : merge(module.iam-groups.*...)[each.value.group_membership.0]["group_tf_id"] : null
+ tenancy_ocid = var.tenancy_ocid
+ disable_capabilities = each.value.disable_capabilities != null ? each.value.disable_capabilities : null
+
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+
+
+############################
+# Module - Network Source
+# Create Network Source
+############################
+
+#locals {
+#
+#vcns = flatten ([
+#for key, val in var.networkSources : [
+# for k,virtual_source in val.virtual_source_list != null ? val.virtual_source_list : [] :{
+# vcn_name = virtual_source.vcn_name.0
+# network_compartment = virtual_source.network_compartment_id.0
+# }
+# ]
+#])
+#}
+
+#data "oci_core_vcns" "oci_vcns_networksource" {
+#
+# for_each = { for vcn in local.vcns : vcn.vcn_name => vcn... }
+# display_name = each.key
+# compartment_id = var.compartment_ocids[each.value[0].network_compartment]
+#}
+
+module "iam-network-sources" {
+ source = "./modules/identity/iam-network-sources"
+ for_each = var.networkSources
+ name = each.value.name
+ description = each.value.description
+ tenancy_ocid = var.tenancy_ocid
+
+ #Optional
+ public_source_list = each.value.public_source_list != null ? each.value.public_source_list : null
+ #virtual_source_list = each.value.virtual_source_list != null ? each.value.virtual_source_list : null
+ virtual_source_list = { for k, v in each.value.virtual_source_list != null ? each.value.virtual_source_list : [] : k =>
+ {
+ #vcn_id = data.oci_core_vcns.oci_vcns_networksource[v.vcn_name.0].virtual_networks.*.id[0]
+ ip_ranges = v.ip_ranges
+ } }
+ #vcn_comp_map = each.value.vcn_comp_map != null ? each.value.vcn_comp_map : null
+ defined_tags = try(each.value.defined_tags, null)
+ freeform_tags = try(each.value.freeform_tags, null)
+}
\ No newline at end of file
diff --git a/examples/identity/oci-data.tf b/examples/identity/oci-data.tf
new file mode 100644
index 0000000..1495707
--- /dev/null
+++ b/examples/identity/oci-data.tf
@@ -0,0 +1,42 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Resource Block - Identity
+# Fetch Compartments
+############################
+
+#Fetch Compartment Details
+data "oci_identity_compartments" "compartments" {
+ #Required
+ compartment_id = var.tenancy_ocid
+
+ #Optional
+ #name = var.compartment_name
+ access_level = "ANY"
+ compartment_id_in_subtree = true
+ state = "ACTIVE"
+}
+
+
+############################
+# Data Block - Network
+# Fetch ADs
+############################
+
+data "oci_identity_availability_domains" "availability_domains" {
+ #Required
+ compartment_id = var.tenancy_ocid
+}
+
+
+/*
+output "compartment_id_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ value = zipmap(data.oci_identity_compartments.compartments.compartments.*.name,data.oci_identity_compartments.compartments.compartments.*.id)
+}
+
+output "ads" {
+ value = data.oci_identity_availability_domains.availability_domains.availability_domains.*.name
+}
+*/
\ No newline at end of file
diff --git a/examples/identity/provider.tf b/examples/identity/provider.tf
new file mode 100644
index 0000000..9a69c98
--- /dev/null
+++ b/examples/identity/provider.tf
@@ -0,0 +1,24 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Provider Block
+# OCI
+############################
+
+provider "oci" {
+ tenancy_ocid = var.tenancy_ocid
+ user_ocid = var.user_ocid
+ fingerprint = var.fingerprint
+ private_key_path = var.private_key_path
+ region = var.region
+ ignore_defined_tags = ["Oracle-Tags.CreatedBy", "Oracle-Tags.CreatedOn"]
+}
+
+terraform {
+ required_providers {
+ oci = {
+ source = "oracle/oci"
+ version = "5.40.0"
+ }
+ }
+}
diff --git a/examples/identity/variables_example.tf b/examples/identity/variables_example.tf
new file mode 100644
index 0000000..fae17ea
--- /dev/null
+++ b/examples/identity/variables_example.tf
@@ -0,0 +1,2082 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+#
+# Variables Block
+# OCI
+#
+############################
+
+variable "tenancy_ocid" {
+ type = string
+ default = ""
+}
+
+variable "user_ocid" {
+ type = string
+ default = ""
+}
+
+variable "fingerprint" {
+ type = string
+ default = ""
+}
+
+variable "private_key_path" {
+ type = string
+ default = ""
+}
+
+variable "region" {
+ type = string
+ default = ""
+}
+
+#################################
+# SSH Keys
+#################################
+
+variable "instance_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_instance_ssh_keys#
+ # exported instance ssh keys
+ #instance_ssh_keys_END#
+ }
+}
+
+variable "oke_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_oke_ssh_keys#
+ #oke_ssh_keys_END#
+ }
+}
+variable "sddc_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_sddc_ssh_keys#
+ #sddc_ssh_keys_END#
+ }
+}
+
+variable "exacs_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_exacs_ssh_keys#
+ # exported exacs ssh keys
+ #exacs_ssh_keys_END#
+ }
+}
+
+variable "dbsystem_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_dbsystem_ssh_keys#
+ # exported dbsystem ssh keys
+ #dbsystem_ssh_keys_END#
+ }
+}
+
+#################################
+# Platform Image OCIDs and
+# Market Place Images
+#################################
+
+variable "instance_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ Windows = ""
+ PaloAlto = "Palo Alto Networks VM-Series Next Generation Firewall"
+ #START_instance_source_ocids#
+ # exported instance image ocids
+ #instance_source_ocids_END#
+ }
+}
+
+variable "blockvolume_source_ocids" {
+ type = map(any)
+ default = {
+ block1 = ""
+ #blockvolume_source_ocid = ""
+ #START_blockvolume_source_ocids#
+ # exported block volume source ocids
+ #blockvolume_source_ocids_END#
+ }
+}
+
+variable "fss_source_ocids" {
+ type = map(any)
+ default = {
+ snapshot1 = ""
+ #fss_source_snapshot_ocid = ""
+ #START_fss_source_snapshot_ocids#
+ # exported fss source snapshot ocids
+ #fss_source_snapshot_ocids_END#
+ }
+}
+
+variable "oke_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ #START_oke_source_ocids#
+ # exported oke image ocids
+ #oke_source_ocids_END#
+ }
+}
+
+#################################
+#
+# Variables according to Services
+# PLEASE DO NOT MODIFY
+#
+#################################
+
+##########################
+## Fetch Compartments ####
+##########################
+
+variable "compartment_ocids" {
+ type = map(any)
+ default = {
+ #START_compartment_ocids#
+ # compartment ocids
+ #compartment_ocids_END#
+ }
+}
+
+#########################
+##### Identity ##########
+#########################
+
+variable "compartments" {
+ type = object({
+ root = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level1 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level2 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level3 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level4 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level5 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ })
+ default = {
+ root = {},
+ compartment_level1 = {},
+ compartment_level2 = {},
+ compartment_level3 = {},
+ compartment_level4 = {},
+ compartment_level5 = {},
+ }
+}
+
+variable "policies" {
+ type = map(object({
+ name = string
+ compartment_id = string
+ policy_description = string
+ policy_statements = list(string)
+ policy_version_date = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "groups" {
+ type = map(object({
+ group_name = string
+ group_description = string
+ matching_rule = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "users" {
+ type = map(object({
+ name = string
+ description = string
+ email = string
+ disable_capabilities = optional(list(string))
+ group_membership = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "networkSources" {
+ type = map(object({
+ name = string
+ description = string
+ public_source_list = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ virtual_source_list = optional(list(map(list(string))))
+
+ }))
+ default = {}
+}
+
+#########################
+####### Governance #########
+#########################
+
+variable "tag_namespaces" {
+ description = "To provision Namespaces"
+ type = map(object({
+ compartment_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_retired = optional(bool)
+ }))
+ default = {}
+}
+
+variable "tag_keys" {
+ description = "To provision Tag Keys"
+ type = map(object({
+ tag_namespace_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_cost_tracking = optional(bool)
+ is_retired = optional(bool)
+ validator = optional(list(object({
+ validator_type = optional(string)
+ validator_values = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "tag_defaults" {
+ description = "To make the Tag keys as default to compartments"
+ type = map(object({
+ compartment_id = string
+ tag_definition_id = string
+ value = string
+ is_required = optional(bool)
+ }))
+ default = {}
+}
+
+variable "quota_policies" {
+ type = map(object({
+ quota_name = string
+ quota_description = string
+ quota_statements = list(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### Network ##########
+#########################
+
+variable "default_dhcps" {
+ type = map(object({
+ server_type = string
+ manage_default_resource_id = optional(string)
+ custom_dns_servers = optional(list(any))
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "custom_dhcps" {
+ type = map(object({
+ compartment_id = string
+ server_type = string
+ vcn_id = string
+ custom_dns_servers = optional(list(any))
+ domain_name_type = optional(string)
+ display_name = optional(string)
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcns" {
+ type = map(object({
+ compartment_id = string
+ cidr_blocks = optional(list(string))
+ byoipv6cidr_details = optional(list(map(any)))
+ display_name = optional(string)
+ dns_label = optional(string)
+ is_ipv6enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ipv6private_cidr_blocks = optional(list(string))
+ is_oracle_gua_allocation_enabled = optional(bool)
+ }))
+ default = {}
+}
+
+variable "igws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ enable_igw = optional(bool)
+ igw_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_table_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "sgws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ service = optional(string)
+ sgw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "ngws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ block_traffic = optional(bool)
+ public_ip_id = optional(string)
+ ngw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "lpgs" {
+ type = map(any)
+ default = {
+ hub-lpgs = {},
+ spoke-lpgs = {},
+ peer-lpgs = {},
+ none-lpgs = {},
+ exported-lpgs = {},
+ }
+}
+
+variable "drgs" {
+ type = map(object({
+ compartment_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "default_seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+
+}))
+default = {}
+}
+
+variable "default_route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+}))
+ default = {}
+}
+
+variable "nsgs" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nsg_rules" {
+ type = map(object({
+ nsg_id = string
+ direction = string
+ protocol = string
+ description = optional(string)
+ stateless = optional(string)
+ source_type = optional(string)
+ destination_type = optional(string)
+ destination = optional(string)
+ source = optional(string)
+ options = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "subnets" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ cidr_block = string
+ display_name = optional(string)
+ dns_label = optional(string)
+ ipv6cidr_block = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ prohibit_internet_ingress = optional(string)
+ prohibit_public_ip_on_vnic = optional(string)
+ availability_domain = optional(string)
+ dhcp_options_id = optional(string)
+ route_table_id = optional(string)
+ security_list_ids = optional(list(string))
+ }))
+ default = {}
+}
+
+variable "vlans" {
+ type = map(object({
+ cidr_block = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ nsg_ids = optional(list(string))
+ route_table_name = optional(string)
+ vlan_tag = optional(string)
+ availability_domain = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "drg_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_other_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_tables" {
+ type = map(object({
+ drg_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_ecmp_enabled = optional(bool)
+ import_drg_route_distribution_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_rules" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_distributions" {
+ type = map(object({
+ distribution_type = string
+ drg_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_distribution_statements" {
+ type = map(object({
+ drg_route_distribution_id = string
+ action = string
+ match_criteria = optional(list(object({
+ match_type = string
+ attachment_type = optional(string)
+ drg_attachment_id = optional(string)
+ })))
+ priority = optional(string)
+ }))
+ default = {}
+}
+
+variable "data_drg_route_tables" {
+ type = map(any)
+ default = {}
+}
+
+variable "data_drg_route_table_distributions" {
+ type = map(any)
+ default = {}
+}
+
+####################
+####### DNS #######
+####################
+
+variable "zones" {
+type = map(object({
+compartment_id = string
+display_name = string
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_type = optional(string)
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+variable "views" {
+type = map(object({
+compartment_id = string
+display_name = string
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+ default = {}
+}
+
+variable "rrsets" {
+type = map(object({
+compartment_id = optional(string)
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_id = string
+domain = string
+rtype = string
+ttl = number
+rdata = optional(list(string))
+scope = optional(string)
+}))
+default = {}
+}
+
+variable "resolvers" {
+type = map(object({
+network_compartment_id= string
+vcn_name = string
+display_name = optional(string)
+views = optional(map(object({
+ view_id = optional(string)
+ view_compartment_id = optional(string)
+})))
+resolver_rules = optional(map(object({
+ client_address_conditions = optional(list(any))
+ destination_addresses = optional(list(any))
+ qname_cover_conditions = optional(list(any))
+ source_endpoint_name = optional(string)
+})))
+endpoint_names = optional(map(object({
+ is_forwarding = optional(bool)
+ is_listening = optional(bool)
+ name = optional(string)
+ subnet_name = optional(string)
+ forwarding_address = optional(string)
+ listening_address = optional(string)
+ nsg_ids = optional(list(string))
+})))
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+
+#########################
+## Dedicated VM Hosts ##
+#########################
+
+variable "dedicated_hosts" {
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ vm_host_shape = string
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ fault_domain = optional(string)
+ freeform_tags = optional(map(any))
+ }))
+ description = "To provision new dedicated VM hosts"
+ default = {}
+}
+
+#########################
+## Instances/Block Volumes ##
+#########################
+
+variable "blockvolumes" {
+ description = "To provision block volumes"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = string
+ size_in_gbs = optional(string)
+ is_auto_tune_enabled = optional(string)
+ vpus_per_gb = optional(string)
+ kms_key_id = optional(string)
+ attach_to_instance = optional(string)
+ attachment_type = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ device = optional(string)
+ encryption_in_transit_type = optional(string)
+ attachment_display_name = optional(string)
+ is_read_only = optional(bool)
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ is_shareable = optional(bool)
+ use_chap = optional(bool)
+ is_agent_auto_iscsi_login_enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ source_details = optional(list(map(any)))
+ block_volume_replicas = optional(list(map(any)))
+ block_volume_replicas_deletion = optional(bool)
+ autotune_policies = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "block_backup_policies" {
+ type = map(any)
+ description = "To create block volume back policy"
+ default = {}
+}
+
+variable "instances" {
+ description = "Map of instances to be provisioned"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ shape = string
+ source_id = string
+ source_type = string
+ vcn_name = string
+ subnet_id = string
+ network_compartment_id = string
+ display_name = optional(string)
+ assign_public_ip = optional(bool)
+ boot_volume_size_in_gbs = optional(string)
+ fault_domain = optional(string)
+ dedicated_vm_host_id = optional(string)
+ private_ip = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(string))
+ ocpus = optional(string)
+ memory_in_gbs = optional(number)
+ capacity_reservation_id = optional(string)
+ create_is_pv_encryption_in_transit_enabled = optional(bool)
+ remote_execute = optional(string)
+ bastion_ip = optional(string)
+ cloud_init_script = optional(string)
+ ssh_authorized_keys = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ network_type = optional(string)
+ #extended_metadata = optional(string)
+ skip_source_dest_check = optional(bool)
+ baseline_ocpu_utilization = optional(string)
+ #preemptible_instance_config = optional(string)
+ all_plugins_disabled = optional(bool)
+ is_management_disabled = optional(bool)
+ is_monitoring_disabled = optional(bool)
+ assign_private_dns_record = optional(string)
+ plugins_details = optional(map(any))
+ is_live_migration_preferred = optional(bool)
+ recovery_action = optional(string)
+ are_legacy_imds_endpoints_disabled = optional(bool)
+ boot_volume_type = optional(string)
+ firmware = optional(string)
+ is_consistent_volume_naming_enabled = optional(bool)
+ remote_data_volume_type = optional(string)
+ platform_config = optional(list(map(any)))
+ launch_options = optional(list(map(any)))
+ ipxe_script = optional(string)
+ preserve_boot_volume = optional(bool)
+ vlan_id = optional(string)
+ kms_key_id = optional(string)
+ vnic_display_name = optional(string)
+ vnic_defined_tags = optional(map(any))
+ vnic_freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "boot_backup_policies" {
+ type = map(any)
+ description = "Map of boot volume backup policies to be provisioned"
+ default = {}
+}
+
+#########################
+####### Database ########
+#########################
+
+variable "exa_infra" {
+ description = "To provision exadata infrastructure"
+ type = map(any)
+ default = {}
+}
+
+variable "exa_vmclusters" {
+ description = "To provision exadata cloud VM cluster"
+ type = map(any)
+ default = {}
+}
+
+variable "dbsystems_vm_bm" {
+ description = "To provision DB System"
+ type = map(any)
+ default = {}
+}
+
+variable "db_home" {
+ type = map(any)
+ description = "Map of database db home to be provisioned"
+ default = {}
+}
+
+variable "databases" {
+ description = "Map of databases to be provisioned in an existing db_home"
+ type = map(any)
+ default = {}
+}
+
+####################################
+####### Autonomous Database ########
+####################################
+
+variable "adb" {
+ type = map(object({
+ admin_password = optional(string)
+ character_set = optional(string)
+ compartment_id = string
+ cpu_core_count = optional(number)
+ database_edition = optional(string)
+ data_storage_size_in_tbs = optional(number)
+ customer_contacts = optional(list(string))
+ db_name = string
+ db_version = optional(string)
+ db_workload = optional(string)
+ display_name = optional(string)
+ license_model = optional(string)
+ ncharacter_set = optional(string)
+ network_compartment_id = optional(string)
+ nsg_ids = optional(list(string))
+ subnet_id = optional(string)
+ vcn_name = optional(string)
+ whitelisted_ips = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+######### FSS ###########
+#########################
+
+variable "mount_targets" {
+ description = "To provision Mount Targets"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ display_name = optional(string)
+ ip_address = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fss" {
+ description = "To provision File System Services"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = optional(string)
+ source_snapshot = optional(string)
+ snapshot_policy = optional(string)
+ policy_compartment_id = optional(string)
+ kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_export_options" {
+ description = "To provision Export Sets"
+ type = map(object({
+ export_set_id = string
+ file_system_id = string
+ path = string
+ export_options = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_idmap_groups_for_sys_auth = optional(bool)
+ }))
+ default = {}
+}
+
+variable "fss_replication" {
+ description = "To provision File System Replication"
+ type = map(object({
+ compartment_id = string
+ source_id = string
+ target_id = string
+ display_name = optional(string)
+ replication_interval = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+####### FSS Logs ########
+#########################
+
+variable "nfs_log_groups" {
+ description = "To provision Log Groups for Mount Target"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_logs" {
+ description = "To provision Logs for Mount Target"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+#########################
+#### Load Balancers #####
+#########################
+
+variable "load_balancers" {
+ description = "To provision Load Balancers"
+ type = map(object({
+ compartment_id = string
+ vcn_name = string
+ shape = string
+ subnet_ids = list(any)
+ network_compartment_id = string
+ display_name = string
+ shape_details = optional(list(map(any)))
+ nsg_ids = optional(list(any))
+ is_private = optional(bool)
+ ip_mode = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ reserved_ips_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "hostnames" {
+ description = "To provision Load Balancer Hostnames"
+ type = map(object({
+ load_balancer_id = string
+ hostname = string
+ name = string
+ }))
+ default = {}
+}
+
+variable "certificates" {
+ description = "To provision Load Balancer Certificates"
+ type = map(object({
+ certificate_name = string
+ load_balancer_id = string
+ ca_certificate = optional(string)
+ passphrase = optional(string)
+ private_key = optional(string)
+ public_certificate = optional(string)
+ }))
+ default = {}
+}
+
+variable "cipher_suites" {
+ description = "To provision Load Balancer Cipher Suites"
+ type = map(object({
+ ciphers = list(string)
+ name = string
+ load_balancer_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "backend_sets" {
+ description = "To provision Load Balancer Backend Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ policy = string
+ protocol = optional(string)
+ interval_ms = optional(string)
+ is_force_plain_text = optional(string)
+ port = optional(string)
+ response_body_regex = optional(string)
+ retries = optional(string)
+ return_code = optional(string)
+ timeout_in_millis = optional(string)
+ url_path = optional(string)
+ lb_cookie_session = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ path = optional(string)
+ domain = optional(string)
+ is_http_only = optional(string)
+ is_secure = optional(string)
+ max_age_in_seconds = optional(string)
+ })))
+ session_persistence_configuration = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ })))
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "backends" {
+ description = "To provision Load Balancer Backends"
+ type = map(object({
+ backendset_name = string
+ ip_address = string
+ load_balancer_id = string
+ port = string
+ instance_compartment = optional(string)
+ backup = optional(string)
+ drain = optional(string)
+ offline = optional(string)
+ weight = optional(string)
+ }))
+ default = {}
+}
+
+variable "listeners" {
+ description = "To provision Load Balancer Listeners"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ port = string
+ protocol = string
+ default_backend_set_name = string
+ connection_configuration = optional(list(map(any)))
+ hostname_names = optional(list(any))
+ path_route_set_name = optional(string)
+ rule_set_names = optional(list(any))
+ routing_policy_name = optional(string)
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "path_route_sets" {
+ description = "To provision Load Balancer Path Route Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ path_routes = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "rule_sets" {
+ description = "To provision Load Balancer Rule Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ access_control_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ description = optional(string)
+ })))
+ access_control_method_rules = optional(list(object({
+ action = string
+ allowed_methods = optional(list(any))
+ status_code = optional(string)
+ })))
+ http_header_rules = optional(list(object({
+ action = string
+ are_invalid_characters_allowed = optional(bool)
+ http_large_header_size_in_kb = optional(string)
+ })))
+ uri_redirect_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ operator = optional(string)
+ host = optional(string)
+ path = optional(string)
+ port = optional(string)
+ protocol = optional(string)
+ query = optional(string)
+ response_code = optional(string)
+ })))
+ request_response_header_rules = optional(list(object({
+ action = string
+ header = optional(string)
+ prefix = optional(string)
+ suffix = optional(string)
+ value = optional(string)
+ })))
+ }))
+ default = {}
+}
+
+variable "lbr_reserved_ips" {
+ description = "To provision Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ lifetime = string
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+###################################
+####### Load Balancer Logs ########
+###################################
+
+variable "loadbalancer_log_groups" {
+ description = "To provision Log Groups for Load Balancers"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "loadbalancer_logs" {
+ description = "To provision Logs for Load Balancers"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+## Network Load Balancers ##
+#########################
+
+variable "network_load_balancers" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ is_private = optional(bool)
+ reserved_ips_id = string
+ is_preserve_source_destination = optional(bool)
+ is_symmetric_hash_enabled = optional(bool)
+ nlb_ip_version = optional(string)
+ assigned_private_ipv4 = optional(string)
+ nsg_ids = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "nlb_listeners" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ default_backend_set_name = string
+ port = number
+ protocol = string
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+
+variable "nlb_backend_sets" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ policy = string
+ protocol = string
+ domain_name = optional(string)
+ query_class = optional(string)
+ query_type = optional(string)
+ rcodes = optional(list(string))
+ transport_protocol = optional(string)
+ return_code = optional(number)
+ interval_in_millis = optional(number)
+ port = optional(number)
+ request_data = optional(string)
+ response_body_regex = optional(string)
+ response_data = optional(string)
+ retries = optional(number)
+ timeout_in_millis = optional(number)
+ url_path = optional(string)
+ is_preserve_source = optional(bool)
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_backends" {
+ type = map(object({
+ name = optional(string)
+ backend_set_name = string
+ network_load_balancer_id = string
+ port = number
+ ip_address = string
+ instance_compartment = string
+ is_drain = optional(bool)
+ is_backup = optional(bool)
+ is_offline = optional(bool)
+ weight = optional(number)
+ target_id = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_reserved_ips" {
+ description = "To provision Network Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ lifetime = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ }))
+ default = {}
+}
+
+
+#########################
+##### IP Management #####
+#########################
+
+variable "public_ip_pools" {
+ type = map(any)
+ default = {}
+}
+
+variable "private_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "reserved_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "vnic_attachments" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+##### VCN Logs ##########
+#########################
+
+variable "vcn_log_groups" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcn_logs" {
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### OSS Buckets ######
+#########################
+
+variable "buckets" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+####### OSS Logs ########
+#########################
+
+variable "oss_log_groups" {
+ description = "To provision Log Groups for OSS"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "oss_logs" {
+ description = "To provision Logs for OSS"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+### OSS IAM Policies ####
+#########################
+
+variable "oss_policies" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+## Management Services ##
+#########################
+
+variable "alarms" {
+ type = map(object({
+ compartment_id = string
+ destinations = list(string)
+ alarm_name = string
+ is_enabled = bool
+ metric_compartment_id = string
+ namespace = string
+ query = string
+ severity = string
+ body = optional(string)
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_notifications_per_metric_dimension_enabled = optional(bool)
+ metric_compartment_id_in_subtree = optional(string)
+ trigger_delay_minutes = optional(string)
+ repeat_notification_duration = optional(string)
+ resolution = optional(string)
+ resource_group = optional(string)
+ suppression = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "events" {
+ type = map(object({
+ event_name = string
+ compartment_id = string
+ description = string
+ is_enabled = bool
+ condition = string
+ actions = optional(list(object({
+ action_type = string
+ is_enabled = string
+ description = optional(string)
+ function_id = optional(string)
+ stream_id = optional(string)
+ topic_id = optional(string)
+ })))
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_topics" {
+ type = map(object({
+ compartment_id = string
+ topic_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_subscriptions" {
+ type = map(object({
+ compartment_id = string
+ endpoint = string
+ protocol = string
+ topic_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "service_connectors" {
+ type = any
+ default = {}
+ description = "To provision service connector hub resources"
+}
+
+#########################
+## Developer Services ##
+#########################
+
+## OKE
+
+variable "clusters" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ kubernetes_version = string
+ cni_type = string
+ cluster_type = string
+ is_policy_enabled = optional(bool)
+ policy_kms_key_id = optional(string)
+ is_kubernetes_dashboard_enabled = optional(bool)
+ is_tiller_enabled = optional(bool)
+ is_public_ip_enabled = optional(bool)
+ nsg_ids = optional(list(string))
+ endpoint_subnet_id = string
+ is_pod_security_policy_enabled = optional(bool)
+ pods_cidr = optional(string)
+ services_cidr = optional(string)
+ service_lb_subnet_ids = optional(list(string))
+ cluster_kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ lb_defined_tags = optional(map(any))
+ lb_freeform_tags = optional(map(any))
+ volume_defined_tags = optional(map(any))
+ volume_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_node_labels = optional(map(any))
+ kubernetes_version = string
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ availability_domain = number
+ fault_domains = optional(list(string))
+ subnet_id = string
+ size = number
+ cni_type = string
+ max_pods_per_node = optional(number)
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_ids = optional(string)
+ worker_nsg_ids = optional(list(string))
+ memory_in_gbs = optional(number)
+ ocpus = optional(number)
+ image_id = string
+ source_type = string
+ boot_volume_size_in_gbs = optional(number)
+ ssh_public_key = optional(string)
+ nodepool_kms_key_id = optional(string)
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "virtual-nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_virtual_node_labels = optional(map(any))
+ availability_domain = number
+ fault_domains = list(string)
+ subnet_id = string
+ size = number
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_id = string
+ worker_nsg_ids = optional(list(string))
+ taints = optional(list(any))
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+##################################
+############## SDDCs #############
+##################################
+variable "sddcs" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = string
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = string
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ initial_cluster_display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ management_datastore = optional(list(string))
+ workload_datastore = optional(list(string))
+
+ }))
+ default = {}
+
+}
+
+variable "sddc-clusters" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = optional(string)
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = optional(string)
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ workload_datastore = optional(list(string))
+ sddc_id = optional(string)
+ esxi_software_version = optional(string)
+
+ }))
+ default = {}
+
+}
+
+
+############################
+## Key Management Service ##
+############################
+
+variable "vaults" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_type = string
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ replica_region = optional(string)
+ }))
+ default = {}
+}
+
+variable "keys" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_name = string
+ algorithm = optional(string)
+ length = optional(string)
+ curve_id = optional(string)
+ protection_mode = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ is_auto_rotation_enabled = optional(bool)
+ rotation_interval_in_days = optional(string)
+
+ }))
+ default = {}
+}
+
+###########################
+######### Budgets #########
+###########################
+
+variable "budgets" {
+ type = map(object({
+ amount = string
+ compartment_id = string
+ reset_period = string
+ budget_processing_period_start_offset = optional(string)
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ processing_period_type = optional(string)
+ budget_end_date = optional(string)
+ budget_start_date = optional(string)
+ target_type = optional(string)
+ targets = optional(list(any))
+ }))
+ default = {}
+}
+
+variable "budget_alert_rules" {
+ type = map(object({
+ budget_id = string
+ threshold = string
+ threshold_type = string
+ type = string
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ message = optional(string)
+ recipients = optional(string)
+ }))
+ default = {}
+}
+
+###########################
+####### Cloud Guard #######
+###########################
+
+variable "cloud_guard_configs" {
+ type = map(object({
+ compartment_id = string
+ reporting_region = string
+ status = string
+ self_manage_resources = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "cloud_guard_targets" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ target_resource_id = string
+ target_resource_type = string
+ prefix = string
+ description = optional(string)
+ state = optional(string)
+ target_detector_recipes = optional(list(any))
+ target_responder_recipes = optional(list(any))
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+####################################
+####### Custom Backup Policy #######
+####################################
+
+variable "custom_backup_policies" {
+ type = map(any)
+ default = {}
+}
+
+variable "capacity_reservation_ocids" {
+ type = map(any)
+ default = {
+ "AD1" : "",
+ "AD2" : "",
+ "AD3" : ""
+ }
+}
+
+#####################################
+####### Firewall as a Service #######
+#####################################
+variable "firewalls" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ network_firewall_policy_id = string
+ subnet_id = string
+ vcn_name = string
+ display_name = string
+ ipv4address = optional(string)
+ nsg_id = optional(list(string))
+ ipv6address = optional(string)
+ availability_domain = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw-policies" {
+ type = map(object({
+ compartment_id = optional(string)
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "services" {
+ type = map(object({
+ service_name = string
+ service_type = string
+ network_firewall_policy_id = string
+ port_ranges = list(object({
+ minimum_port = string
+ maximum_port = optional(string)
+ }))
+ }))
+ default = {}
+}
+variable "url_lists" {
+ type = map(object({
+ urllist_name = string
+ network_firewall_policy_id = string
+ urls = list(object({
+ pattern = string
+ type = string
+ }))
+ }))
+ default = {}
+}
+variable "service_lists" {
+ type = map(object({
+ service_list_name = string
+ network_firewall_policy_id = string
+ services = list(string)
+ }))
+ default = {}
+}
+
+variable "address_lists" {
+ type = map(object({
+ address_list_name = string
+ network_firewall_policy_id = string
+ address_type = string
+ addresses = list(string)
+ }))
+ default = {}
+}
+
+variable "applications" {
+ type = map(object({
+ app_list_name = string
+ network_firewall_policy_id = string
+ app_type = string
+ icmp_type = number
+ icmp_code = optional(number)
+ }))
+ default = {}
+}
+
+variable "application_groups" {
+ type = map(object({
+ app_group_name = string
+ network_firewall_policy_id = string
+ apps = list(string)
+
+ }))
+ default = {}
+}
+
+variable "security_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+ application = optional(list(string))
+ destination_address = optional(list(string))
+ service = optional(list(string))
+ source_address = optional(list(string))
+ url = optional(list(string))
+ })))
+ inspection = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "secrets" {
+ type = map(object({
+ secret_name = string
+ network_firewall_policy_id = string
+ secret_source = string
+ secret_type = string
+ vault_secret_id = string
+ version_number = number
+ vault_name = string
+ vault_compartment_id = string
+ }))
+ default = {}
+}
+
+variable "decryption_profiles" {
+ type = map(object({
+ profile_name = string
+ profile_type = string
+ network_firewall_policy_id = string
+ are_certificate_extensions_restricted = optional(bool)
+ is_auto_include_alt_name = optional(bool)
+ is_expired_certificate_blocked = optional(bool)
+ is_out_of_capacity_blocked = optional(bool)
+ is_revocation_status_timeout_blocked = optional(bool)
+ is_unknown_revocation_status_blocked = optional(bool)
+ is_unsupported_cipher_blocked = optional(bool)
+ is_unsupported_version_blocked = optional(bool)
+ is_untrusted_issuer_blocked = optional(bool)
+ }))
+ default = {}
+}
+
+variable "decryption_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+
+ destination_address = optional(list(string))
+
+ source_address = optional(list(string))
+
+ })))
+ decryption_profile = optional(string)
+ secret = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+#########################
+####### Firewall Logs ########
+#########################
+
+variable "fw_log_groups" {
+ description = "To provision Log Groups for Network Firewall"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw_logs" {
+ description = "To provision Logs for Network Firewall"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+##########################
+# Add new variables here #
+##########################
+######################### END #########################
diff --git a/examples/kms/backend.tf b/examples/kms/backend.tf
new file mode 100644
index 0000000..16bc557
--- /dev/null
+++ b/examples/kms/backend.tf
@@ -0,0 +1,21 @@
+/*This line will be removed when using remote state
+# !!! WARNING !!! Terraform State Lock is not supported with OCI Object Storage.
+# Pre-Requisite: Create a version enabled object storage bucket to store the state file.
+# End Point Format: https://.compat.objectstorage..oraclecloud.com
+# Please look at the below doc for information about shared_credentials_file and other parameters:
+# Reference: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
+
+terraform {
+ backend "s3" {
+ key = ""
+ bucket = ""
+ region = ""
+ endpoint = ""
+ shared_credentials_file = "~/.aws/credentials"
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_metadata_api_check = true
+ force_path_style = true
+ }
+}
+This line will be removed when using remote state*/
\ No newline at end of file
diff --git a/examples/kms/kms.tf b/examples/kms/kms.tf
new file mode 100644
index 0000000..d6bd1f5
--- /dev/null
+++ b/examples/kms/kms.tf
@@ -0,0 +1,41 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################################
+# Module Block - Security
+# Create KMS Vault and Key
+############################################
+
+module "vaults" {
+ source = "./modules/security/vault"
+ for_each = var.vaults != null ? var.vaults : {}
+
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ display_name = each.value.display_name
+ freeform_tags = each.value.freeform_tags
+ vault_type = each.value.vault_type
+ replica_region = each.value.replica_region
+}
+
+module "keys" {
+ source = "./modules/security/key"
+ for_each = var.keys != null ? var.keys : {}
+
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ display_name = each.value.display_name
+ freeform_tags = each.value.freeform_tags
+ algorithm = each.value.algorithm != null ? each.value.algorithm : "AES"
+ length = each.value.length != null ? each.value.length : 32
+ curve_id = each.value.curve_id != null?each.value.curve_id: null
+ management_endpoint = merge(module.vaults.*...)[each.value.vault_name]["management_endpoint_tf_id"]
+ protection_mode = each.value.protection_mode
+ is_auto_rotation_enabled = each.value.is_auto_rotation_enabled
+ rotation_interval_in_days = each.value.rotation_interval_in_days !=null ? each.value.rotation_interval_in_days : 60
+}
\ No newline at end of file
diff --git a/examples/kms/oci-data.tf b/examples/kms/oci-data.tf
new file mode 100644
index 0000000..1495707
--- /dev/null
+++ b/examples/kms/oci-data.tf
@@ -0,0 +1,42 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Resource Block - Identity
+# Fetch Compartments
+############################
+
+#Fetch Compartment Details
+data "oci_identity_compartments" "compartments" {
+ #Required
+ compartment_id = var.tenancy_ocid
+
+ #Optional
+ #name = var.compartment_name
+ access_level = "ANY"
+ compartment_id_in_subtree = true
+ state = "ACTIVE"
+}
+
+
+############################
+# Data Block - Network
+# Fetch ADs
+############################
+
+data "oci_identity_availability_domains" "availability_domains" {
+ #Required
+ compartment_id = var.tenancy_ocid
+}
+
+
+/*
+output "compartment_id_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ value = zipmap(data.oci_identity_compartments.compartments.compartments.*.name,data.oci_identity_compartments.compartments.compartments.*.id)
+}
+
+output "ads" {
+ value = data.oci_identity_availability_domains.availability_domains.availability_domains.*.name
+}
+*/
\ No newline at end of file
diff --git a/examples/kms/provider.tf b/examples/kms/provider.tf
new file mode 100644
index 0000000..9a69c98
--- /dev/null
+++ b/examples/kms/provider.tf
@@ -0,0 +1,24 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Provider Block
+# OCI
+############################
+
+provider "oci" {
+ tenancy_ocid = var.tenancy_ocid
+ user_ocid = var.user_ocid
+ fingerprint = var.fingerprint
+ private_key_path = var.private_key_path
+ region = var.region
+ ignore_defined_tags = ["Oracle-Tags.CreatedBy", "Oracle-Tags.CreatedOn"]
+}
+
+terraform {
+ required_providers {
+ oci = {
+ source = "oracle/oci"
+ version = "5.40.0"
+ }
+ }
+}
diff --git a/examples/kms/variables_example.tf b/examples/kms/variables_example.tf
new file mode 100644
index 0000000..fae17ea
--- /dev/null
+++ b/examples/kms/variables_example.tf
@@ -0,0 +1,2082 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+#
+# Variables Block
+# OCI
+#
+############################
+
+variable "tenancy_ocid" {
+ type = string
+ default = ""
+}
+
+variable "user_ocid" {
+ type = string
+ default = ""
+}
+
+variable "fingerprint" {
+ type = string
+ default = ""
+}
+
+variable "private_key_path" {
+ type = string
+ default = ""
+}
+
+variable "region" {
+ type = string
+ default = ""
+}
+
+#################################
+# SSH Keys
+#################################
+
+variable "instance_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_instance_ssh_keys#
+ # exported instance ssh keys
+ #instance_ssh_keys_END#
+ }
+}
+
+variable "oke_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_oke_ssh_keys#
+ #oke_ssh_keys_END#
+ }
+}
+variable "sddc_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_sddc_ssh_keys#
+ #sddc_ssh_keys_END#
+ }
+}
+
+variable "exacs_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_exacs_ssh_keys#
+ # exported exacs ssh keys
+ #exacs_ssh_keys_END#
+ }
+}
+
+variable "dbsystem_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_dbsystem_ssh_keys#
+ # exported dbsystem ssh keys
+ #dbsystem_ssh_keys_END#
+ }
+}
+
+#################################
+# Platform Image OCIDs and
+# Market Place Images
+#################################
+
+variable "instance_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ Windows = ""
+ PaloAlto = "Palo Alto Networks VM-Series Next Generation Firewall"
+ #START_instance_source_ocids#
+ # exported instance image ocids
+ #instance_source_ocids_END#
+ }
+}
+
+variable "blockvolume_source_ocids" {
+ type = map(any)
+ default = {
+ block1 = ""
+ #blockvolume_source_ocid = ""
+ #START_blockvolume_source_ocids#
+ # exported block volume source ocids
+ #blockvolume_source_ocids_END#
+ }
+}
+
+variable "fss_source_ocids" {
+ type = map(any)
+ default = {
+ snapshot1 = ""
+ #fss_source_snapshot_ocid = ""
+ #START_fss_source_snapshot_ocids#
+ # exported fss source snapshot ocids
+ #fss_source_snapshot_ocids_END#
+ }
+}
+
+variable "oke_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ #START_oke_source_ocids#
+ # exported oke image ocids
+ #oke_source_ocids_END#
+ }
+}
+
+#################################
+#
+# Variables according to Services
+# PLEASE DO NOT MODIFY
+#
+#################################
+
+##########################
+## Fetch Compartments ####
+##########################
+
+variable "compartment_ocids" {
+ type = map(any)
+ default = {
+ #START_compartment_ocids#
+ # compartment ocids
+ #compartment_ocids_END#
+ }
+}
+
+#########################
+##### Identity ##########
+#########################
+
+variable "compartments" {
+ type = object({
+ root = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level1 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level2 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level3 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level4 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level5 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ })
+ default = {
+ root = {},
+ compartment_level1 = {},
+ compartment_level2 = {},
+ compartment_level3 = {},
+ compartment_level4 = {},
+ compartment_level5 = {},
+ }
+}
+
+variable "policies" {
+ type = map(object({
+ name = string
+ compartment_id = string
+ policy_description = string
+ policy_statements = list(string)
+ policy_version_date = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "groups" {
+ type = map(object({
+ group_name = string
+ group_description = string
+ matching_rule = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "users" {
+ type = map(object({
+ name = string
+ description = string
+ email = string
+ disable_capabilities = optional(list(string))
+ group_membership = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "networkSources" {
+ type = map(object({
+ name = string
+ description = string
+ public_source_list = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ virtual_source_list = optional(list(map(list(string))))
+
+ }))
+ default = {}
+}
+
+#########################
+####### Governance #########
+#########################
+
+variable "tag_namespaces" {
+ description = "To provision Namespaces"
+ type = map(object({
+ compartment_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_retired = optional(bool)
+ }))
+ default = {}
+}
+
+variable "tag_keys" {
+ description = "To provision Tag Keys"
+ type = map(object({
+ tag_namespace_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_cost_tracking = optional(bool)
+ is_retired = optional(bool)
+ validator = optional(list(object({
+ validator_type = optional(string)
+ validator_values = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "tag_defaults" {
+ description = "To make the Tag keys as default to compartments"
+ type = map(object({
+ compartment_id = string
+ tag_definition_id = string
+ value = string
+ is_required = optional(bool)
+ }))
+ default = {}
+}
+
+variable "quota_policies" {
+ type = map(object({
+ quota_name = string
+ quota_description = string
+ quota_statements = list(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### Network ##########
+#########################
+
+variable "default_dhcps" {
+ type = map(object({
+ server_type = string
+ manage_default_resource_id = optional(string)
+ custom_dns_servers = optional(list(any))
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "custom_dhcps" {
+ type = map(object({
+ compartment_id = string
+ server_type = string
+ vcn_id = string
+ custom_dns_servers = optional(list(any))
+ domain_name_type = optional(string)
+ display_name = optional(string)
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcns" {
+ type = map(object({
+ compartment_id = string
+ cidr_blocks = optional(list(string))
+ byoipv6cidr_details = optional(list(map(any)))
+ display_name = optional(string)
+ dns_label = optional(string)
+ is_ipv6enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ipv6private_cidr_blocks = optional(list(string))
+ is_oracle_gua_allocation_enabled = optional(bool)
+ }))
+ default = {}
+}
+
+variable "igws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ enable_igw = optional(bool)
+ igw_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_table_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "sgws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ service = optional(string)
+ sgw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "ngws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ block_traffic = optional(bool)
+ public_ip_id = optional(string)
+ ngw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "lpgs" {
+ type = map(any)
+ default = {
+ hub-lpgs = {},
+ spoke-lpgs = {},
+ peer-lpgs = {},
+ none-lpgs = {},
+ exported-lpgs = {},
+ }
+}
+
+variable "drgs" {
+ type = map(object({
+ compartment_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "default_seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+
+}))
+default = {}
+}
+
+variable "default_route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+}))
+ default = {}
+}
+
+variable "nsgs" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nsg_rules" {
+ type = map(object({
+ nsg_id = string
+ direction = string
+ protocol = string
+ description = optional(string)
+ stateless = optional(string)
+ source_type = optional(string)
+ destination_type = optional(string)
+ destination = optional(string)
+ source = optional(string)
+ options = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "subnets" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ cidr_block = string
+ display_name = optional(string)
+ dns_label = optional(string)
+ ipv6cidr_block = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ prohibit_internet_ingress = optional(string)
+ prohibit_public_ip_on_vnic = optional(string)
+ availability_domain = optional(string)
+ dhcp_options_id = optional(string)
+ route_table_id = optional(string)
+ security_list_ids = optional(list(string))
+ }))
+ default = {}
+}
+
+variable "vlans" {
+ type = map(object({
+ cidr_block = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ nsg_ids = optional(list(string))
+ route_table_name = optional(string)
+ vlan_tag = optional(string)
+ availability_domain = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "drg_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_other_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_tables" {
+ type = map(object({
+ drg_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_ecmp_enabled = optional(bool)
+ import_drg_route_distribution_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_rules" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_distributions" {
+ type = map(object({
+ distribution_type = string
+ drg_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_distribution_statements" {
+ type = map(object({
+ drg_route_distribution_id = string
+ action = string
+ match_criteria = optional(list(object({
+ match_type = string
+ attachment_type = optional(string)
+ drg_attachment_id = optional(string)
+ })))
+ priority = optional(string)
+ }))
+ default = {}
+}
+
+variable "data_drg_route_tables" {
+ type = map(any)
+ default = {}
+}
+
+variable "data_drg_route_table_distributions" {
+ type = map(any)
+ default = {}
+}
+
+####################
+####### DNS #######
+####################
+
+variable "zones" {
+type = map(object({
+compartment_id = string
+display_name = string
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_type = optional(string)
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+variable "views" {
+type = map(object({
+compartment_id = string
+display_name = string
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+ default = {}
+}
+
+variable "rrsets" {
+type = map(object({
+compartment_id = optional(string)
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_id = string
+domain = string
+rtype = string
+ttl = number
+rdata = optional(list(string))
+scope = optional(string)
+}))
+default = {}
+}
+
+variable "resolvers" {
+type = map(object({
+network_compartment_id= string
+vcn_name = string
+display_name = optional(string)
+views = optional(map(object({
+ view_id = optional(string)
+ view_compartment_id = optional(string)
+})))
+resolver_rules = optional(map(object({
+ client_address_conditions = optional(list(any))
+ destination_addresses = optional(list(any))
+ qname_cover_conditions = optional(list(any))
+ source_endpoint_name = optional(string)
+})))
+endpoint_names = optional(map(object({
+ is_forwarding = optional(bool)
+ is_listening = optional(bool)
+ name = optional(string)
+ subnet_name = optional(string)
+ forwarding_address = optional(string)
+ listening_address = optional(string)
+ nsg_ids = optional(list(string))
+})))
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+
+#########################
+## Dedicated VM Hosts ##
+#########################
+
+variable "dedicated_hosts" {
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ vm_host_shape = string
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ fault_domain = optional(string)
+ freeform_tags = optional(map(any))
+ }))
+ description = "To provision new dedicated VM hosts"
+ default = {}
+}
+
+#########################
+## Instances/Block Volumes ##
+#########################
+
+variable "blockvolumes" {
+ description = "To provision block volumes"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = string
+ size_in_gbs = optional(string)
+ is_auto_tune_enabled = optional(string)
+ vpus_per_gb = optional(string)
+ kms_key_id = optional(string)
+ attach_to_instance = optional(string)
+ attachment_type = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ device = optional(string)
+ encryption_in_transit_type = optional(string)
+ attachment_display_name = optional(string)
+ is_read_only = optional(bool)
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ is_shareable = optional(bool)
+ use_chap = optional(bool)
+ is_agent_auto_iscsi_login_enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ source_details = optional(list(map(any)))
+ block_volume_replicas = optional(list(map(any)))
+ block_volume_replicas_deletion = optional(bool)
+ autotune_policies = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "block_backup_policies" {
+ type = map(any)
+ description = "To create block volume back policy"
+ default = {}
+}
+
+variable "instances" {
+ description = "Map of instances to be provisioned"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ shape = string
+ source_id = string
+ source_type = string
+ vcn_name = string
+ subnet_id = string
+ network_compartment_id = string
+ display_name = optional(string)
+ assign_public_ip = optional(bool)
+ boot_volume_size_in_gbs = optional(string)
+ fault_domain = optional(string)
+ dedicated_vm_host_id = optional(string)
+ private_ip = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(string))
+ ocpus = optional(string)
+ memory_in_gbs = optional(number)
+ capacity_reservation_id = optional(string)
+ create_is_pv_encryption_in_transit_enabled = optional(bool)
+ remote_execute = optional(string)
+ bastion_ip = optional(string)
+ cloud_init_script = optional(string)
+ ssh_authorized_keys = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ network_type = optional(string)
+ #extended_metadata = optional(string)
+ skip_source_dest_check = optional(bool)
+ baseline_ocpu_utilization = optional(string)
+ #preemptible_instance_config = optional(string)
+ all_plugins_disabled = optional(bool)
+ is_management_disabled = optional(bool)
+ is_monitoring_disabled = optional(bool)
+ assign_private_dns_record = optional(string)
+ plugins_details = optional(map(any))
+ is_live_migration_preferred = optional(bool)
+ recovery_action = optional(string)
+ are_legacy_imds_endpoints_disabled = optional(bool)
+ boot_volume_type = optional(string)
+ firmware = optional(string)
+ is_consistent_volume_naming_enabled = optional(bool)
+ remote_data_volume_type = optional(string)
+ platform_config = optional(list(map(any)))
+ launch_options = optional(list(map(any)))
+ ipxe_script = optional(string)
+ preserve_boot_volume = optional(bool)
+ vlan_id = optional(string)
+ kms_key_id = optional(string)
+ vnic_display_name = optional(string)
+ vnic_defined_tags = optional(map(any))
+ vnic_freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "boot_backup_policies" {
+ type = map(any)
+ description = "Map of boot volume backup policies to be provisioned"
+ default = {}
+}
+
+#########################
+####### Database ########
+#########################
+
+variable "exa_infra" {
+ description = "To provision exadata infrastructure"
+ type = map(any)
+ default = {}
+}
+
+variable "exa_vmclusters" {
+ description = "To provision exadata cloud VM cluster"
+ type = map(any)
+ default = {}
+}
+
+variable "dbsystems_vm_bm" {
+ description = "To provision DB System"
+ type = map(any)
+ default = {}
+}
+
+variable "db_home" {
+ type = map(any)
+ description = "Map of database db home to be provisioned"
+ default = {}
+}
+
+variable "databases" {
+ description = "Map of databases to be provisioned in an existing db_home"
+ type = map(any)
+ default = {}
+}
+
+####################################
+####### Autonomous Database ########
+####################################
+
+variable "adb" {
+ type = map(object({
+ admin_password = optional(string)
+ character_set = optional(string)
+ compartment_id = string
+ cpu_core_count = optional(number)
+ database_edition = optional(string)
+ data_storage_size_in_tbs = optional(number)
+ customer_contacts = optional(list(string))
+ db_name = string
+ db_version = optional(string)
+ db_workload = optional(string)
+ display_name = optional(string)
+ license_model = optional(string)
+ ncharacter_set = optional(string)
+ network_compartment_id = optional(string)
+ nsg_ids = optional(list(string))
+ subnet_id = optional(string)
+ vcn_name = optional(string)
+ whitelisted_ips = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+######### FSS ###########
+#########################
+
+variable "mount_targets" {
+ description = "To provision Mount Targets"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ display_name = optional(string)
+ ip_address = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fss" {
+ description = "To provision File System Services"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = optional(string)
+ source_snapshot = optional(string)
+ snapshot_policy = optional(string)
+ policy_compartment_id = optional(string)
+ kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_export_options" {
+ description = "To provision Export Sets"
+ type = map(object({
+ export_set_id = string
+ file_system_id = string
+ path = string
+ export_options = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_idmap_groups_for_sys_auth = optional(bool)
+ }))
+ default = {}
+}
+
+variable "fss_replication" {
+ description = "To provision File System Replication"
+ type = map(object({
+ compartment_id = string
+ source_id = string
+ target_id = string
+ display_name = optional(string)
+ replication_interval = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+####### FSS Logs ########
+#########################
+
+variable "nfs_log_groups" {
+ description = "To provision Log Groups for Mount Target"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_logs" {
+ description = "To provision Logs for Mount Target"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+#########################
+#### Load Balancers #####
+#########################
+
+variable "load_balancers" {
+ description = "To provision Load Balancers"
+ type = map(object({
+ compartment_id = string
+ vcn_name = string
+ shape = string
+ subnet_ids = list(any)
+ network_compartment_id = string
+ display_name = string
+ shape_details = optional(list(map(any)))
+ nsg_ids = optional(list(any))
+ is_private = optional(bool)
+ ip_mode = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ reserved_ips_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "hostnames" {
+ description = "To provision Load Balancer Hostnames"
+ type = map(object({
+ load_balancer_id = string
+ hostname = string
+ name = string
+ }))
+ default = {}
+}
+
+variable "certificates" {
+ description = "To provision Load Balancer Certificates"
+ type = map(object({
+ certificate_name = string
+ load_balancer_id = string
+ ca_certificate = optional(string)
+ passphrase = optional(string)
+ private_key = optional(string)
+ public_certificate = optional(string)
+ }))
+ default = {}
+}
+
+variable "cipher_suites" {
+ description = "To provision Load Balancer Cipher Suites"
+ type = map(object({
+ ciphers = list(string)
+ name = string
+ load_balancer_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "backend_sets" {
+ description = "To provision Load Balancer Backend Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ policy = string
+ protocol = optional(string)
+ interval_ms = optional(string)
+ is_force_plain_text = optional(string)
+ port = optional(string)
+ response_body_regex = optional(string)
+ retries = optional(string)
+ return_code = optional(string)
+ timeout_in_millis = optional(string)
+ url_path = optional(string)
+ lb_cookie_session = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ path = optional(string)
+ domain = optional(string)
+ is_http_only = optional(string)
+ is_secure = optional(string)
+ max_age_in_seconds = optional(string)
+ })))
+ session_persistence_configuration = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ })))
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "backends" {
+ description = "To provision Load Balancer Backends"
+ type = map(object({
+ backendset_name = string
+ ip_address = string
+ load_balancer_id = string
+ port = string
+ instance_compartment = optional(string)
+ backup = optional(string)
+ drain = optional(string)
+ offline = optional(string)
+ weight = optional(string)
+ }))
+ default = {}
+}
+
+variable "listeners" {
+ description = "To provision Load Balancer Listeners"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ port = string
+ protocol = string
+ default_backend_set_name = string
+ connection_configuration = optional(list(map(any)))
+ hostname_names = optional(list(any))
+ path_route_set_name = optional(string)
+ rule_set_names = optional(list(any))
+ routing_policy_name = optional(string)
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "path_route_sets" {
+ description = "To provision Load Balancer Path Route Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ path_routes = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "rule_sets" {
+ description = "To provision Load Balancer Rule Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ access_control_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ description = optional(string)
+ })))
+ access_control_method_rules = optional(list(object({
+ action = string
+ allowed_methods = optional(list(any))
+ status_code = optional(string)
+ })))
+ http_header_rules = optional(list(object({
+ action = string
+ are_invalid_characters_allowed = optional(bool)
+ http_large_header_size_in_kb = optional(string)
+ })))
+ uri_redirect_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ operator = optional(string)
+ host = optional(string)
+ path = optional(string)
+ port = optional(string)
+ protocol = optional(string)
+ query = optional(string)
+ response_code = optional(string)
+ })))
+ request_response_header_rules = optional(list(object({
+ action = string
+ header = optional(string)
+ prefix = optional(string)
+ suffix = optional(string)
+ value = optional(string)
+ })))
+ }))
+ default = {}
+}
+
+variable "lbr_reserved_ips" {
+ description = "To provision Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ lifetime = string
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+###################################
+####### Load Balancer Logs ########
+###################################
+
+variable "loadbalancer_log_groups" {
+ description = "To provision Log Groups for Load Balancers"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "loadbalancer_logs" {
+ description = "To provision Logs for Load Balancers"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+## Network Load Balancers ##
+#########################
+
+variable "network_load_balancers" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ is_private = optional(bool)
+ reserved_ips_id = string
+ is_preserve_source_destination = optional(bool)
+ is_symmetric_hash_enabled = optional(bool)
+ nlb_ip_version = optional(string)
+ assigned_private_ipv4 = optional(string)
+ nsg_ids = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "nlb_listeners" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ default_backend_set_name = string
+ port = number
+ protocol = string
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+
+variable "nlb_backend_sets" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ policy = string
+ protocol = string
+ domain_name = optional(string)
+ query_class = optional(string)
+ query_type = optional(string)
+ rcodes = optional(list(string))
+ transport_protocol = optional(string)
+ return_code = optional(number)
+ interval_in_millis = optional(number)
+ port = optional(number)
+ request_data = optional(string)
+ response_body_regex = optional(string)
+ response_data = optional(string)
+ retries = optional(number)
+ timeout_in_millis = optional(number)
+ url_path = optional(string)
+ is_preserve_source = optional(bool)
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_backends" {
+ type = map(object({
+ name = optional(string)
+ backend_set_name = string
+ network_load_balancer_id = string
+ port = number
+ ip_address = string
+ instance_compartment = string
+ is_drain = optional(bool)
+ is_backup = optional(bool)
+ is_offline = optional(bool)
+ weight = optional(number)
+ target_id = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_reserved_ips" {
+ description = "To provision Network Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ lifetime = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ }))
+ default = {}
+}
+
+
+#########################
+##### IP Management #####
+#########################
+
+variable "public_ip_pools" {
+ type = map(any)
+ default = {}
+}
+
+variable "private_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "reserved_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "vnic_attachments" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+##### VCN Logs ##########
+#########################
+
+variable "vcn_log_groups" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcn_logs" {
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### OSS Buckets ######
+#########################
+
+variable "buckets" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+####### OSS Logs ########
+#########################
+
+variable "oss_log_groups" {
+ description = "To provision Log Groups for OSS"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "oss_logs" {
+ description = "To provision Logs for OSS"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+### OSS IAM Policies ####
+#########################
+
+variable "oss_policies" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+## Management Services ##
+#########################
+
+variable "alarms" {
+ type = map(object({
+ compartment_id = string
+ destinations = list(string)
+ alarm_name = string
+ is_enabled = bool
+ metric_compartment_id = string
+ namespace = string
+ query = string
+ severity = string
+ body = optional(string)
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_notifications_per_metric_dimension_enabled = optional(bool)
+ metric_compartment_id_in_subtree = optional(string)
+ trigger_delay_minutes = optional(string)
+ repeat_notification_duration = optional(string)
+ resolution = optional(string)
+ resource_group = optional(string)
+ suppression = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "events" {
+ type = map(object({
+ event_name = string
+ compartment_id = string
+ description = string
+ is_enabled = bool
+ condition = string
+ actions = optional(list(object({
+ action_type = string
+ is_enabled = string
+ description = optional(string)
+ function_id = optional(string)
+ stream_id = optional(string)
+ topic_id = optional(string)
+ })))
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_topics" {
+ type = map(object({
+ compartment_id = string
+ topic_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_subscriptions" {
+ type = map(object({
+ compartment_id = string
+ endpoint = string
+ protocol = string
+ topic_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "service_connectors" {
+ type = any
+ default = {}
+ description = "To provision service connector hub resources"
+}
+
+#########################
+## Developer Services ##
+#########################
+
+## OKE
+
+variable "clusters" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ kubernetes_version = string
+ cni_type = string
+ cluster_type = string
+ is_policy_enabled = optional(bool)
+ policy_kms_key_id = optional(string)
+ is_kubernetes_dashboard_enabled = optional(bool)
+ is_tiller_enabled = optional(bool)
+ is_public_ip_enabled = optional(bool)
+ nsg_ids = optional(list(string))
+ endpoint_subnet_id = string
+ is_pod_security_policy_enabled = optional(bool)
+ pods_cidr = optional(string)
+ services_cidr = optional(string)
+ service_lb_subnet_ids = optional(list(string))
+ cluster_kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ lb_defined_tags = optional(map(any))
+ lb_freeform_tags = optional(map(any))
+ volume_defined_tags = optional(map(any))
+ volume_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_node_labels = optional(map(any))
+ kubernetes_version = string
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ availability_domain = number
+ fault_domains = optional(list(string))
+ subnet_id = string
+ size = number
+ cni_type = string
+ max_pods_per_node = optional(number)
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_ids = optional(string)
+ worker_nsg_ids = optional(list(string))
+ memory_in_gbs = optional(number)
+ ocpus = optional(number)
+ image_id = string
+ source_type = string
+ boot_volume_size_in_gbs = optional(number)
+ ssh_public_key = optional(string)
+ nodepool_kms_key_id = optional(string)
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "virtual-nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_virtual_node_labels = optional(map(any))
+ availability_domain = number
+ fault_domains = list(string)
+ subnet_id = string
+ size = number
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_id = string
+ worker_nsg_ids = optional(list(string))
+ taints = optional(list(any))
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+##################################
+############## SDDCs #############
+##################################
+variable "sddcs" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = string
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = string
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ initial_cluster_display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ management_datastore = optional(list(string))
+ workload_datastore = optional(list(string))
+
+ }))
+ default = {}
+
+}
+
+variable "sddc-clusters" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = optional(string)
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = optional(string)
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ workload_datastore = optional(list(string))
+ sddc_id = optional(string)
+ esxi_software_version = optional(string)
+
+ }))
+ default = {}
+
+}
+
+
+############################
+## Key Management Service ##
+############################
+
+variable "vaults" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_type = string
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ replica_region = optional(string)
+ }))
+ default = {}
+}
+
+variable "keys" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_name = string
+ algorithm = optional(string)
+ length = optional(string)
+ curve_id = optional(string)
+ protection_mode = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ is_auto_rotation_enabled = optional(bool)
+ rotation_interval_in_days = optional(string)
+
+ }))
+ default = {}
+}
+
+###########################
+######### Budgets #########
+###########################
+
+variable "budgets" {
+ type = map(object({
+ amount = string
+ compartment_id = string
+ reset_period = string
+ budget_processing_period_start_offset = optional(string)
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ processing_period_type = optional(string)
+ budget_end_date = optional(string)
+ budget_start_date = optional(string)
+ target_type = optional(string)
+ targets = optional(list(any))
+ }))
+ default = {}
+}
+
+variable "budget_alert_rules" {
+ type = map(object({
+ budget_id = string
+ threshold = string
+ threshold_type = string
+ type = string
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ message = optional(string)
+ recipients = optional(string)
+ }))
+ default = {}
+}
+
+###########################
+####### Cloud Guard #######
+###########################
+
+variable "cloud_guard_configs" {
+ type = map(object({
+ compartment_id = string
+ reporting_region = string
+ status = string
+ self_manage_resources = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "cloud_guard_targets" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ target_resource_id = string
+ target_resource_type = string
+ prefix = string
+ description = optional(string)
+ state = optional(string)
+ target_detector_recipes = optional(list(any))
+ target_responder_recipes = optional(list(any))
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+####################################
+####### Custom Backup Policy #######
+####################################
+
+variable "custom_backup_policies" {
+ type = map(any)
+ default = {}
+}
+
+variable "capacity_reservation_ocids" {
+ type = map(any)
+ default = {
+ "AD1" : "",
+ "AD2" : "",
+ "AD3" : ""
+ }
+}
+
+#####################################
+####### Firewall as a Service #######
+#####################################
+variable "firewalls" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ network_firewall_policy_id = string
+ subnet_id = string
+ vcn_name = string
+ display_name = string
+ ipv4address = optional(string)
+ nsg_id = optional(list(string))
+ ipv6address = optional(string)
+ availability_domain = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw-policies" {
+ type = map(object({
+ compartment_id = optional(string)
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "services" {
+ type = map(object({
+ service_name = string
+ service_type = string
+ network_firewall_policy_id = string
+ port_ranges = list(object({
+ minimum_port = string
+ maximum_port = optional(string)
+ }))
+ }))
+ default = {}
+}
+variable "url_lists" {
+ type = map(object({
+ urllist_name = string
+ network_firewall_policy_id = string
+ urls = list(object({
+ pattern = string
+ type = string
+ }))
+ }))
+ default = {}
+}
+variable "service_lists" {
+ type = map(object({
+ service_list_name = string
+ network_firewall_policy_id = string
+ services = list(string)
+ }))
+ default = {}
+}
+
+variable "address_lists" {
+ type = map(object({
+ address_list_name = string
+ network_firewall_policy_id = string
+ address_type = string
+ addresses = list(string)
+ }))
+ default = {}
+}
+
+variable "applications" {
+ type = map(object({
+ app_list_name = string
+ network_firewall_policy_id = string
+ app_type = string
+ icmp_type = number
+ icmp_code = optional(number)
+ }))
+ default = {}
+}
+
+variable "application_groups" {
+ type = map(object({
+ app_group_name = string
+ network_firewall_policy_id = string
+ apps = list(string)
+
+ }))
+ default = {}
+}
+
+variable "security_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+ application = optional(list(string))
+ destination_address = optional(list(string))
+ service = optional(list(string))
+ source_address = optional(list(string))
+ url = optional(list(string))
+ })))
+ inspection = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "secrets" {
+ type = map(object({
+ secret_name = string
+ network_firewall_policy_id = string
+ secret_source = string
+ secret_type = string
+ vault_secret_id = string
+ version_number = number
+ vault_name = string
+ vault_compartment_id = string
+ }))
+ default = {}
+}
+
+variable "decryption_profiles" {
+ type = map(object({
+ profile_name = string
+ profile_type = string
+ network_firewall_policy_id = string
+ are_certificate_extensions_restricted = optional(bool)
+ is_auto_include_alt_name = optional(bool)
+ is_expired_certificate_blocked = optional(bool)
+ is_out_of_capacity_blocked = optional(bool)
+ is_revocation_status_timeout_blocked = optional(bool)
+ is_unknown_revocation_status_blocked = optional(bool)
+ is_unsupported_cipher_blocked = optional(bool)
+ is_unsupported_version_blocked = optional(bool)
+ is_untrusted_issuer_blocked = optional(bool)
+ }))
+ default = {}
+}
+
+variable "decryption_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+
+ destination_address = optional(list(string))
+
+ source_address = optional(list(string))
+
+ })))
+ decryption_profile = optional(string)
+ secret = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+#########################
+####### Firewall Logs ########
+#########################
+
+variable "fw_log_groups" {
+ description = "To provision Log Groups for Network Firewall"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw_logs" {
+ description = "To provision Logs for Network Firewall"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+##########################
+# Add new variables here #
+##########################
+######################### END #########################
diff --git a/examples/loadbalancer/backend.tf b/examples/loadbalancer/backend.tf
new file mode 100644
index 0000000..16bc557
--- /dev/null
+++ b/examples/loadbalancer/backend.tf
@@ -0,0 +1,21 @@
+/*This line will be removed when using remote state
+# !!! WARNING !!! Terraform State Lock is not supported with OCI Object Storage.
+# Pre-Requisite: Create a version enabled object storage bucket to store the state file.
+# End Point Format: https://.compat.objectstorage..oraclecloud.com
+# Please look at the below doc for information about shared_credentials_file and other parameters:
+# Reference: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
+
+terraform {
+ backend "s3" {
+ key = ""
+ bucket = ""
+ region = ""
+ endpoint = ""
+ shared_credentials_file = "~/.aws/credentials"
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_metadata_api_check = true
+ force_path_style = true
+ }
+}
+This line will be removed when using remote state*/
\ No newline at end of file
diff --git a/examples/loadbalancer/loadbalancer.tf b/examples/loadbalancer/loadbalancer.tf
new file mode 100644
index 0000000..b3831f5
--- /dev/null
+++ b/examples/loadbalancer/loadbalancer.tf
@@ -0,0 +1,358 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Module Block - Network
+# Create Load Balancers
+############################
+
+/*
+data "oci_certificates_management_certificates" "certificates_backendsets" {
+ for_each = var.backend_sets != null ? var.backend_sets : {}
+ #Optional
+ compartment_id = each.value.instance_compartment != null ? (length(regexall("ocid1.compartment.oc*", each.value.instance_compartment)) > 0 ? each.value.instance_compartment : var.compartment_ocids[each.value.instance_compartment]) : var.tenancy_ocid
+ name = each.value.certificate_name
+ state = "AVAILABLE"
+}
+*/
+
+data "oci_core_instances" "instances" {
+ # depends_on = [module.instances] # Uncomment to create Compute and Load Balancers together
+ for_each = var.backends != null ? var.backends : {}
+ state = "RUNNING"
+ #Required
+ compartment_id = each.value.instance_compartment != null && each.value.instance_compartment != "" ? (length(regexall("ocid1.compartment.oc*", each.value.instance_compartment)) > 0 ? each.value.instance_compartment : var.compartment_ocids[each.value.instance_compartment]) : var.tenancy_ocid
+}
+
+data "oci_core_instance" "instance_ip" {
+ for_each = { for k, v in var.backends : k => v.ip_address if length(regexall("IP:*", v.ip_address)) == 0 }
+ instance_id = merge(local.instance.ocid.*...)[split("NAME:", each.value)[1]][0]
+}
+
+locals {
+ instance = {
+ for instances in data.oci_core_instances.instances :
+ "ocid" => { for instance in instances.instances : instance.display_name => instance.id... }...
+ }
+}
+
+module "load-balancers" {
+ # depends_on = [module.vcns, module.subnets,module.nsgs] # Uncomment to execute Networking and Load Balancer together
+ source = "./modules/loadbalancer/lb-load-balancer"
+ for_each = var.load_balancers != null ? var.load_balancers : {}
+
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ vcn_names = [each.value.vcn_name]
+
+ display_name = each.value.display_name
+ shape = each.value.shape != null ? each.value.shape : "100Mbps" # Default value as per OCI
+ #subnet_ids = flatten(tolist([for subnet in each.value.subnet_names : (length(regexall("ocid1.subnet.oc*", subnet)) > 0 ? [subnet] : data.oci_core_subnets.oci_subnets_lbs[subnet].subnets[*].id)]))
+ subnet_ids = each.value.subnet_ids
+ network_compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : null
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+ ip_mode = each.value.ip_mode
+ is_private = each.value.is_private
+ network_security_group_ids = each.value.nsg_ids
+ key_name = each.key
+ load_balancers = var.load_balancers
+ reserved_ips_id = each.value.reserved_ips_id != null ? (lower(each.value.reserved_ips_id) != "n" ? (length(regexall("ocid1.publicip.oc*", each.value.reserved_ips_id)) > 0 ? [each.value.reserved_ips_id] : [merge(module.lbr-reserved-ips.*...)[join("-", [each.key, "reserved", "ip"])].reserved_ip_tf_id]) : []) : []
+}
+
+/*
+output "load_balancer_id_map" {
+ value = [ for k,v in merge(module.load-balancers.*...) : v.load_balancer_tf_id ]
+}
+*/
+
+module "hostnames" {
+ source = "./modules/loadbalancer/lb-hostname"
+ for_each = var.hostnames != null ? var.hostnames : {}
+
+ #Required
+ hostname = each.value.hostname
+ load_balancer_id = length(regexall("ocid1.loadbalancer.oc*", each.value.load_balancer_id)) > 0 ? each.value.load_balancer_id : merge(module.load-balancers.*...)[each.value.load_balancer_id]["load_balancer_tf_id"]
+ name = each.value.name
+}
+
+/*
+output "hostnames_id_map" {
+ value = [ for k,v in merge(module.hostnames.*...) : v.hostname_tf_id ]
+}
+*/
+
+module "certificates" {
+ source = "./modules/loadbalancer/lb-certificate"
+ for_each = var.certificates != null ? var.certificates : {}
+
+ #Required
+ certificate_name = each.value.certificate_name
+ load_balancer_id = length(regexall("ocid1.loadbalancer.oc*", each.value.load_balancer_id)) > 0 ? each.value.load_balancer_id : merge(module.load-balancers.*...)[each.value.load_balancer_id]["load_balancer_tf_id"]
+
+ #Optional
+ ca_certificate = each.value.ca_certificate != null ? file(each.value.ca_certificate) : null
+ passphrase = each.value.passphrase
+ private_key = each.value.private_key != null ? file(each.value.private_key) : null
+ public_certificate = each.value.public_certificate != null ? file(each.value.public_certificate) : null
+}
+
+/*
+output "certificates_id_map" {
+ value = [ for k,v in merge(module.certificates.*...) : v.certificate_tf_id ]
+}
+*/
+
+module "cipher-suites" {
+ source = "./modules/loadbalancer/lb-cipher-suite"
+ for_each = var.cipher_suites != null ? var.cipher_suites : {}
+
+ #Required
+ ciphers = each.value.ciphers
+ name = each.value.name
+ load_balancer_id = length(regexall("ocid1.loadbalancer.oc*", each.value.load_balancer_id)) > 0 ? each.value.load_balancer_id : merge(module.load-balancers.*...)[each.value.load_balancer_id]["load_balancer_tf_id"]
+
+}
+
+/*
+output "cipher_suites_id_map" {
+ value = [ for k,v in merge(module.cipher-suites.*...) : v.cipher_suite_tf_id ]
+}
+*/
+
+module "backend-sets" {
+ source = "./modules/loadbalancer/lb-backend-set"
+ for_each = var.backend_sets != null ? var.backend_sets : {}
+
+ #Required
+ protocol = each.value.protocol
+
+ #Optional
+ interval_ms = each.value.interval_ms
+ is_force_plain_text = each.value.is_force_plain_text
+ port = each.value.port
+ response_body_regex = each.value.response_body_regex
+ retries = each.value.retries
+ return_code = each.value.return_code
+ timeout_in_millis = each.value.timeout_in_millis
+ url_path = each.value.url_path
+
+ load_balancer_id = length(regexall("ocid1.loadbalancer.oc*", each.value.load_balancer_id)) > 0 ? each.value.load_balancer_id : merge(module.load-balancers.*...)[each.value.load_balancer_id]["load_balancer_tf_id"]
+ name = each.value.name
+ policy = each.value.policy
+ backend_sets = var.backend_sets
+ certificate_name = each.value.certificate_name != null ? merge(module.certificates.*...)[each.value.certificate_name]["certificate_tf_name"] : null
+ cipher_suite_name = each.value.cipher_suite_name != null ? (length(regexall("oci-default-ssl", each.value.cipher_suite_name)) < 0 ? merge(module.cipher-suites.*...)[each.value.cipher_suite_name]["cipher_suite_tf_name"] : "") : null
+ key_name = each.key
+
+}
+
+/*
+output "backend_sets_id_map" {
+ value = [ for k,v in merge(module.backend-sets.*...) : v.backend_set_tf_id ]
+}
+*/
+
+module "backends" {
+ depends_on = [module.backend-sets]
+ source = "./modules/loadbalancer/lb-backend"
+ for_each = var.backends != null ? var.backends : {}
+
+ #Required
+ backendset_name = merge(module.backend-sets.*...)[each.value.backendset_name].backend_set_tf_name
+ ip_address = each.value.ip_address != "" ? (length(regexall("IP:", each.value.ip_address)) > 0 ? split("IP:", each.value.ip_address)[1] : data.oci_core_instance.instance_ip[each.key].private_ip) : null
+ load_balancer_id = length(regexall("ocid1.loadbalancer.oc*", each.value.load_balancer_id)) > 0 ? each.value.load_balancer_id : merge(module.load-balancers.*...)[each.value.load_balancer_id]["load_balancer_tf_id"]
+ port = each.value.port
+
+ #Optional
+ backup = each.value.backup
+ drain = each.value.drain
+ offline = each.value.offline
+ weight = each.value.weight != null ? each.value.weight : "1"
+}
+
+/*
+output "backends_id_map" {
+ value = [ for k,v in merge(module.backends.*...) : v.backend_tf_id ]
+}
+*/
+
+module "listeners" {
+ source = "./modules/loadbalancer/lb-listener"
+ for_each = var.listeners != null ? var.listeners : {}
+
+ #Required
+ default_backend_set_name = merge(module.backend-sets.*...)[each.value.default_backend_set_name].backend_set_tf_name
+ load_balancer_id = length(regexall("ocid1.loadbalancer.oc*", each.value.load_balancer_id)) > 0 ? each.value.load_balancer_id : merge(module.load-balancers.*...)[each.value.load_balancer_id]["load_balancer_tf_id"]
+ name = each.value.name
+ port = each.value.port
+ protocol = each.value.protocol
+
+ #Optional
+ listeners = var.listeners
+ certificate_name = each.value.certificate_name != null ? merge(module.certificates.*...)[each.value.certificate_name]["certificate_tf_name"] : null
+ cipher_suite_name = each.value.cipher_suite_name != null ? (length(regexall("oci-default-ssl", each.value.cipher_suite_name)) < 0 ? each.value.cipher_suite_name : null) : null
+ key_name = each.key
+ hostname_names = each.value.hostname_names != null ? flatten(tolist([for hostnames in each.value.hostname_names : merge(module.hostnames.*...)[hostnames].hostname_tf_name])) : null
+ path_route_set_name = each.value.path_route_set_name != null ? merge(module.path-route-sets.*...)[each.value.path_route_set_name].path_route_set_tf_name : null
+ routing_policy_name = each.value.routing_policy_name #TODO
+ rule_set_names = each.value.rule_set_names != null ? flatten(tolist([for rules in each.value.rule_set_names : merge(module.rule-sets.*...)[rules].rule_set_tf_name])) : null
+}
+
+/*
+output "listeners_id_map" {
+ value = [ for k,v in merge(module.listeners.*...) : v.listener_tf_id ]
+}
+*/
+
+module "path-route-sets" {
+ depends_on = [module.backend-sets]
+ source = "./modules/loadbalancer/lb-path-route-set"
+ for_each = var.path_route_sets != null ? var.path_route_sets : {}
+
+ #Required
+ load_balancer_id = length(regexall("ocid1.loadbalancer.oc*", each.value.load_balancer_id)) > 0 ? each.value.load_balancer_id : merge(module.load-balancers.*...)[each.value.load_balancer_id]["load_balancer_tf_id"]
+ name = each.value.name
+
+ #Optional
+ path_route_sets = var.path_route_sets
+ key_name = each.key
+}
+
+/*
+output "path_route_sets_id_map" {
+ value = [ for k,v in merge(module.path-route-sets.*...) : v.path_route_set_tf_id ]
+}
+*/
+
+module "rule-sets" {
+ source = "./modules/loadbalancer/lb-rule-set"
+ for_each = var.rule_sets != null ? var.rule_sets : {}
+
+ #Required
+ load_balancer_id = length(regexall("ocid1.loadbalancer.oc*", each.value.load_balancer_id)) > 0 ? each.value.load_balancer_id : merge(module.load-balancers.*...)[each.value.load_balancer_id]["load_balancer_tf_id"]
+ name = each.value.name
+
+ #Optional
+ rule_sets = var.rule_sets
+ key_name = each.key
+}
+
+/*
+output "rule_sets_id_map" {
+ value = [ for k,v in merge(module.rule-sets.*...) : v.rule_set_tf_id ]
+}
+*/
+
+#############################
+# Module Block - LBaaS Logging
+# Create Log Groups and Logs
+#############################
+
+module "loadbalancer-log-groups" {
+ source = "./modules/managementservices/log-group"
+ for_each = (var.loadbalancer_log_groups != null || var.loadbalancer_log_groups != {}) ? var.loadbalancer_log_groups : {}
+
+ # Log Groups
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+
+ display_name = each.value.display_name
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ description = each.value.description
+ freeform_tags = each.value.freeform_tags
+}
+
+/*
+output "log_group_map" {
+ value = [ for k,v in merge(module.loadbalancer-log-groups.*...) : v.log_group_tf_id ]
+}
+*/
+
+module "loadbalancer-logs" {
+ source = "./modules/managementservices/log"
+ for_each = (var.loadbalancer_logs != null || var.loadbalancer_logs != {}) ? var.loadbalancer_logs : {}
+
+ # Logs
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ display_name = each.value.display_name
+ log_group_id = length(regexall("ocid1.loggroup.oc*", each.value.log_group_id)) > 0 ? each.value.log_group_id : merge(module.loadbalancer-log-groups.*...)[each.value.log_group_id]["log_group_tf_id"]
+
+ log_type = each.value.log_type
+ #Required
+ source_category = each.value.category
+ source_resource = length(regexall("ocid1.*", each.value.resource)) > 0 ? each.value.resource : merge(module.load-balancers.*...)[each.value.resource]["load_balancer_tf_id"]
+ source_service = each.value.service
+ source_type = each.value.source_type
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+ log_is_enabled = (each.value.is_enabled == "" || each.value.is_enabled == null) ? true : each.value.is_enabled
+ log_retention_duration = (each.value.retention_duration == "" || each.value.retention_duration == null) ? 30 : each.value.retention_duration
+
+}
+
+/*
+output "logs_id" {
+ value = [ for k,v in merge(module.loadbalancer-logs.*...) : v.log_tf_id]
+}
+*/
+
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################################
+# Module Block - Reserved IPs for LBaaS
+# Create Reserved IPs for LBaaS
+# Allowed Values:
+# Lifetime Values can be one of EPHEMERAL or RESERVED
+############################################
+
+module "lbr-reserved-ips" {
+ source = "./modules/ip/reserved-public-ip"
+ for_each = var.lbr_reserved_ips != null && var.lbr_reserved_ips != {} ? var.lbr_reserved_ips : {}
+
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ lifetime = each.value.lifetime
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ display_name = each.value.display_name
+ freeform_tags = each.value.freeform_tags
+ private_ip_id = each.value.private_ip_id
+ #private_ip_id = each.value.private_ip_id != null ? (length(regexall("ocid1.privateip.oc*", each.value.private_ip_id)) > 0 ? each.value.private_ip_id : (length(regexall("\\.", each.value.private_ip_id)) == 3 ? local.private_ip_id[0][each.value.private_ip_id] : merge(module.private-ips.*...)[each.value.private_ip_id].private_ip_tf_id)) : null
+ #public_ip_pool_id = each.value.public_ip_pool_id != null ? (length(regexall("ocid1.publicippool.oc*", each.value.public_ip_pool_id)) > 0 ? each.value.public_ip_pool_id : merge(module.public-ip-pools.*...)[each.value.public_ip_pool_id].public_ip_pool_tf_id) : null
+}
+
+/*
+resource "oci_load_balancer_load_balancer_routing_policy" "load_balancer_routing_policy" {
+
+ #Required
+ condition_language_version = "V1"
+ load_balancer_id = "ocid1.loadbalancer.oc1.uk-london-1.aaaaaaaa26pp3ygxyycgrmi2f3wuwmgntltotctwvmi4kr6bcbvwo7t5j2va"
+ name = "RP01"
+ rules {
+ #Required
+ actions {
+ #Required
+ name = "FORWARD_TO_BACKENDSET"
+
+ #Optional
+ backend_set_name = "bset01"
+ }
+ condition = "all(http.request.url.path eq (i 'test'), http.request.url.query[(i 'key01')] eq (i 'value01'), all(http.request.url.path eq (i 'testonly')))"
+ name = "rule01"
+ }
+
+ rules {
+ actions {
+ backend_set_name = "bset01"
+ name = "FORWARD_TO_BACKENDSET"
+ }
+ condition = "any(http.request.url.path eq (i 'gh'))"
+ name = "rule02"
+ }
+}*/
\ No newline at end of file
diff --git a/examples/loadbalancer/networkloadbalancer.tf b/examples/loadbalancer/networkloadbalancer.tf
new file mode 100644
index 0000000..dedd1ec
--- /dev/null
+++ b/examples/loadbalancer/networkloadbalancer.tf
@@ -0,0 +1,125 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+#######################################
+# Module Block - Network Load Balancer
+# Create Network Load Balancer
+#######################################
+
+data "oci_core_subnets" "oci_subnets_nlb" {
+ # depends_on = [module.subnets] # Uncomment to create Network and NLBs together
+ for_each = var.network_load_balancers != null ? var.network_load_balancers : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.subnet_id
+ vcn_id = data.oci_core_vcns.oci_vcns_nlb[each.key].virtual_networks.*.id[0]
+}
+
+data "oci_core_vcns" "oci_vcns_nlb" {
+ # depends_on = [module.vcns] # Uncomment to create Network and NLBs together
+ for_each = var.network_load_balancers != null ? var.network_load_balancers : {}
+ compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : var.compartment_ocids[each.value.network_compartment_id]
+ display_name = each.value.vcn_name
+}
+
+module "network-load-balancers" {
+ # depends_on = [module.nsgs] # Uncomment to create NSG and NLBs together
+ source = "./modules/networkloadbalancer/nlb"
+ for_each = var.network_load_balancers != null ? var.network_load_balancers : {}
+ network_compartment_id = each.value.network_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.network_compartment_id)) > 0 ? each.value.network_compartment_id : var.compartment_ocids[each.value.network_compartment_id]) : null
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ display_name = each.value.display_name
+ subnet_id = each.value.subnet_id != "" ? (length(regexall("ocid1.subnet.oc*", each.value.subnet_id)) > 0 ? each.value.subnet_id : data.oci_core_subnets.oci_subnets_nlb[each.key].subnets.*.id[0]) : null
+ is_preserve_source_destination = each.value.is_preserve_source_destination
+ is_symmetric_hash_enabled = each.value.is_symmetric_hash_enabled
+ is_private = each.value.is_private
+ network_security_group_ids = each.value.nsg_ids
+ nlb_ip_version = each.value.nlb_ip_version
+ assigned_private_ipv4 = each.value.assigned_private_ipv4
+ vcn_name = each.value.vcn_name
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+ reserved_ips_id = each.value.reserved_ips_id != "" && lower(each.value.reserved_ips_id) != "n" ? (length(regexall("ocid1.publicip.oc*", each.value.reserved_ips_id)) > 0 ? [each.value.reserved_ips_id] : [merge(module.nlb-reserved-ips.*...)[join("-", [each.key, "reserved", "ip"])].reserved_ip_tf_id]) : []
+}
+
+module "nlb-listeners" {
+ source = "./modules/networkloadbalancer/nlb-listener"
+ for_each = var.nlb_listeners != null ? var.nlb_listeners : {}
+ name = each.value.name
+ default_backend_set_name = merge(module.nlb-backend-sets.*...)[each.value.default_backend_set_name].nlb_backend_set_tf_name
+ network_load_balancer_id = length(regexall("ocid1.networkloadbalancer.oc*", each.value.network_load_balancer_id)) > 0 ? each.value.network_load_balancer_id : merge(module.network-load-balancers.*...)[each.value.network_load_balancer_id]["network_load_balancer_tf_id"]
+ port = each.value.port
+ protocol = each.value.protocol
+ ip_version = each.value.ip_version
+}
+
+module "nlb-backend-sets" {
+ source = "./modules/networkloadbalancer/nlb-backendset"
+ for_each = var.nlb_backend_sets != null ? var.nlb_backend_sets : {}
+ name = each.value.name
+ network_load_balancer_id = length(regexall("ocid1.networkloadbalancer.oc*", each.value.network_load_balancer_id)) > 0 ? each.value.network_load_balancer_id : merge(module.network-load-balancers.*...)[each.value.network_load_balancer_id]["network_load_balancer_tf_id"]
+ policy = each.value.policy
+ ip_version = each.value.ip_version
+ is_preserve_source = each.value.is_preserve_source
+ #healthcheck parameters
+ domain_name = each.value.domain_name
+ query_class = each.value.query_class
+ query_type = each.value.query_type
+ rcodes = each.value.rcodes
+ transport_protocol = each.value.transport_protocol
+
+ protocol = each.value.protocol
+ interval_in_millis = each.value.interval_in_millis
+ port = each.value.port
+ request_data = each.value.request_data
+ response_body_regex = each.value.response_body_regex
+ response_data = each.value.response_data
+ retries = each.value.retries
+ return_code = each.value.return_code
+ timeout_in_millis = each.value.timeout_in_millis
+ url_path = each.value.url_path
+}
+
+module "nlb-backends" {
+ source = "./modules/networkloadbalancer/nlb-backend"
+ # depends_on = [module.instances] # Uncomment to create Network and NLBs together
+ for_each = var.nlb_backends != null ? var.nlb_backends : {}
+ backend_set_name = merge(module.nlb-backend-sets.*...)[each.value.backend_set_name]["nlb_backend_set_tf_name"]
+ network_load_balancer_id = length(regexall("ocid1.loadbalancer.oc*", each.value.network_load_balancer_id)) > 0 ? each.value.network_load_balancer_id : merge(module.network-load-balancers.*...)[each.value.network_load_balancer_id]["network_load_balancer_tf_id"]
+ port = each.value.port
+ ip_address = each.value.ip_address
+ instance_compartment = each.value.instance_compartment != "" ? (length(regexall("ocid1.compartment.oc*", each.value.instance_compartment)) > 0 ? each.value.instance_compartment : var.compartment_ocids[each.value.instance_compartment]) : var.tenancy_ocid
+ #ip_address = each.value.ip_address != "" ? (length(regexall("IP:", each.value.ip_address)) > 0 ? split("IP:", each.value.ip_address)[1] : data.oci_core_instance.nlb_instance_ip[each.key].private_ip) : (length(regexall("NAME:", each.value.ip_address)) > 0 ? split("NAME:", each.value.ip_address)[1] : data.oci_core_instance.nlb_instance[each.key].private_ip) : null
+
+
+ is_drain = each.value.is_drain != "" ? each.value.is_drain : "false"
+ is_backup = each.value.is_backup != "" ? each.value.is_backup : "false"
+ is_offline = each.value.is_offline != "" ? each.value.is_offline : "false"
+ weight = each.value.weight != "" ? each.value.weight : "1"
+
+ name = each.value.ip_address
+ target_id = each.value.ip_address
+
+}
+
+############################################
+# Module Block - Reserved IPs for NLBs
+# Create Reserved IPs for NLBs
+# Allowed Values:
+# Lifetime Values can be one of EPHEMERAL or RESERVED
+############################################
+
+module "nlb-reserved-ips" {
+ source = "./modules/ip/reserved-public-ip"
+ for_each = var.nlb_reserved_ips != null && var.nlb_reserved_ips != {} ? var.nlb_reserved_ips : {}
+
+ #Required
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ lifetime = each.value.lifetime
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ display_name = each.value.display_name
+ freeform_tags = each.value.freeform_tags
+ #private_ip_id = each.value.private_ip_id != "" ? (length(regexall("ocid1.privateip.oc*", each.value.private_ip_id)) > 0 ? each.value.private_ip_id : (length(regexall("\\.", each.value.private_ip_id)) == 3 ? local.private_ip_id[0][each.value.private_ip_id] : merge(module.private-ips.*...)[each.value.private_ip_id].private_ip_tf_id)) : null
+ #public_ip_pool_id = each.value.public_ip_pool_id != "" ? (length(regexall("ocid1.publicippool.oc*", each.value.public_ip_pool_id)) > 0 ? each.value.public_ip_pool_id : merge(module.public-ip-pools.*...)[each.value.public_ip_pool_id].public_ip_pool_tf_id) : null
+}
+
diff --git a/examples/loadbalancer/oci-data.tf b/examples/loadbalancer/oci-data.tf
new file mode 100644
index 0000000..1495707
--- /dev/null
+++ b/examples/loadbalancer/oci-data.tf
@@ -0,0 +1,42 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Resource Block - Identity
+# Fetch Compartments
+############################
+
+#Fetch Compartment Details
+data "oci_identity_compartments" "compartments" {
+ #Required
+ compartment_id = var.tenancy_ocid
+
+ #Optional
+ #name = var.compartment_name
+ access_level = "ANY"
+ compartment_id_in_subtree = true
+ state = "ACTIVE"
+}
+
+
+############################
+# Data Block - Network
+# Fetch ADs
+############################
+
+data "oci_identity_availability_domains" "availability_domains" {
+ #Required
+ compartment_id = var.tenancy_ocid
+}
+
+
+/*
+output "compartment_id_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ value = zipmap(data.oci_identity_compartments.compartments.compartments.*.name,data.oci_identity_compartments.compartments.compartments.*.id)
+}
+
+output "ads" {
+ value = data.oci_identity_availability_domains.availability_domains.availability_domains.*.name
+}
+*/
\ No newline at end of file
diff --git a/examples/loadbalancer/provider.tf b/examples/loadbalancer/provider.tf
new file mode 100644
index 0000000..9a69c98
--- /dev/null
+++ b/examples/loadbalancer/provider.tf
@@ -0,0 +1,24 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Provider Block
+# OCI
+############################
+
+provider "oci" {
+ tenancy_ocid = var.tenancy_ocid
+ user_ocid = var.user_ocid
+ fingerprint = var.fingerprint
+ private_key_path = var.private_key_path
+ region = var.region
+ ignore_defined_tags = ["Oracle-Tags.CreatedBy", "Oracle-Tags.CreatedOn"]
+}
+
+terraform {
+ required_providers {
+ oci = {
+ source = "oracle/oci"
+ version = "5.40.0"
+ }
+ }
+}
diff --git a/examples/loadbalancer/variables_example.tf b/examples/loadbalancer/variables_example.tf
new file mode 100644
index 0000000..fae17ea
--- /dev/null
+++ b/examples/loadbalancer/variables_example.tf
@@ -0,0 +1,2082 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+#
+# Variables Block
+# OCI
+#
+############################
+
+variable "tenancy_ocid" {
+ type = string
+ default = ""
+}
+
+variable "user_ocid" {
+ type = string
+ default = ""
+}
+
+variable "fingerprint" {
+ type = string
+ default = ""
+}
+
+variable "private_key_path" {
+ type = string
+ default = ""
+}
+
+variable "region" {
+ type = string
+ default = ""
+}
+
+#################################
+# SSH Keys
+#################################
+
+variable "instance_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_instance_ssh_keys#
+ # exported instance ssh keys
+ #instance_ssh_keys_END#
+ }
+}
+
+variable "oke_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_oke_ssh_keys#
+ #oke_ssh_keys_END#
+ }
+}
+variable "sddc_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_sddc_ssh_keys#
+ #sddc_ssh_keys_END#
+ }
+}
+
+variable "exacs_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_exacs_ssh_keys#
+ # exported exacs ssh keys
+ #exacs_ssh_keys_END#
+ }
+}
+
+variable "dbsystem_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = [""]
+ # Use ',' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = ["ssh-rsa AAXXX......yhdlo","ssh-rsa AAxxskj...edfwf"]
+ #START_dbsystem_ssh_keys#
+ # exported dbsystem ssh keys
+ #dbsystem_ssh_keys_END#
+ }
+}
+
+#################################
+# Platform Image OCIDs and
+# Market Place Images
+#################################
+
+variable "instance_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ Windows = ""
+ PaloAlto = "Palo Alto Networks VM-Series Next Generation Firewall"
+ #START_instance_source_ocids#
+ # exported instance image ocids
+ #instance_source_ocids_END#
+ }
+}
+
+variable "blockvolume_source_ocids" {
+ type = map(any)
+ default = {
+ block1 = ""
+ #blockvolume_source_ocid = ""
+ #START_blockvolume_source_ocids#
+ # exported block volume source ocids
+ #blockvolume_source_ocids_END#
+ }
+}
+
+variable "fss_source_ocids" {
+ type = map(any)
+ default = {
+ snapshot1 = ""
+ #fss_source_snapshot_ocid = ""
+ #START_fss_source_snapshot_ocids#
+ # exported fss source snapshot ocids
+ #fss_source_snapshot_ocids_END#
+ }
+}
+
+variable "oke_source_ocids" {
+ type = map(any)
+ default = {
+ Linux = ""
+ #START_oke_source_ocids#
+ # exported oke image ocids
+ #oke_source_ocids_END#
+ }
+}
+
+#################################
+#
+# Variables according to Services
+# PLEASE DO NOT MODIFY
+#
+#################################
+
+##########################
+## Fetch Compartments ####
+##########################
+
+variable "compartment_ocids" {
+ type = map(any)
+ default = {
+ #START_compartment_ocids#
+ # compartment ocids
+ #compartment_ocids_END#
+ }
+}
+
+#########################
+##### Identity ##########
+#########################
+
+variable "compartments" {
+ type = object({
+ root = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level1 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level2 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level3 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level4 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ compartment_level5 = optional(map(object({
+ tenancy_ocid = optional(string)
+ parent_compartment_id = string
+ name = string
+ description = optional(string)
+ enable_delete = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ })))
+ })
+ default = {
+ root = {},
+ compartment_level1 = {},
+ compartment_level2 = {},
+ compartment_level3 = {},
+ compartment_level4 = {},
+ compartment_level5 = {},
+ }
+}
+
+variable "policies" {
+ type = map(object({
+ name = string
+ compartment_id = string
+ policy_description = string
+ policy_statements = list(string)
+ policy_version_date = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "groups" {
+ type = map(object({
+ group_name = string
+ group_description = string
+ matching_rule = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "users" {
+ type = map(object({
+ name = string
+ description = string
+ email = string
+ disable_capabilities = optional(list(string))
+ group_membership = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "networkSources" {
+ type = map(object({
+ name = string
+ description = string
+ public_source_list = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ virtual_source_list = optional(list(map(list(string))))
+
+ }))
+ default = {}
+}
+
+#########################
+####### Governance #########
+#########################
+
+variable "tag_namespaces" {
+ description = "To provision Namespaces"
+ type = map(object({
+ compartment_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_retired = optional(bool)
+ }))
+ default = {}
+}
+
+variable "tag_keys" {
+ description = "To provision Tag Keys"
+ type = map(object({
+ tag_namespace_id = string
+ description = string
+ name = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_cost_tracking = optional(bool)
+ is_retired = optional(bool)
+ validator = optional(list(object({
+ validator_type = optional(string)
+ validator_values = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "tag_defaults" {
+ description = "To make the Tag keys as default to compartments"
+ type = map(object({
+ compartment_id = string
+ tag_definition_id = string
+ value = string
+ is_required = optional(bool)
+ }))
+ default = {}
+}
+
+variable "quota_policies" {
+ type = map(object({
+ quota_name = string
+ quota_description = string
+ quota_statements = list(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### Network ##########
+#########################
+
+variable "default_dhcps" {
+ type = map(object({
+ server_type = string
+ manage_default_resource_id = optional(string)
+ custom_dns_servers = optional(list(any))
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "custom_dhcps" {
+ type = map(object({
+ compartment_id = string
+ server_type = string
+ vcn_id = string
+ custom_dns_servers = optional(list(any))
+ domain_name_type = optional(string)
+ display_name = optional(string)
+ search_domain = optional(map(list(any)))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcns" {
+ type = map(object({
+ compartment_id = string
+ cidr_blocks = optional(list(string))
+ byoipv6cidr_details = optional(list(map(any)))
+ display_name = optional(string)
+ dns_label = optional(string)
+ is_ipv6enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ipv6private_cidr_blocks = optional(list(string))
+ is_oracle_gua_allocation_enabled = optional(bool)
+ }))
+ default = {}
+}
+
+variable "igws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ enable_igw = optional(bool)
+ igw_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_table_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "sgws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ service = optional(string)
+ sgw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "ngws" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ block_traffic = optional(bool)
+ public_ip_id = optional(string)
+ ngw_name = optional(string)
+ route_table_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "lpgs" {
+ type = map(any)
+ default = {
+ hub-lpgs = {},
+ spoke-lpgs = {},
+ peer-lpgs = {},
+ none-lpgs = {},
+ exported-lpgs = {},
+ }
+}
+
+variable "drgs" {
+ type = map(object({
+ compartment_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "default_seclists" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ ingress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ source = optional(string)
+ source_type = optional(string)
+ options = optional(map(any))
+ })))
+ egress_sec_rules = optional(list(object({
+ protocol = optional(string)
+ stateless = optional(string)
+ description = optional(string)
+ destination = optional(string)
+ destination_type = optional(string)
+ options = optional(map(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+
+}))
+default = {}
+}
+
+variable "default_route_tables" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ route_rules_igw = list(map(any))
+ route_rules_ngw = list(map(any))
+ route_rules_sgw = list(map(any))
+ route_rules_drg = list(map(any))
+ route_rules_lpg = list(map(any))
+ route_rules_ip = list(map(any))
+ gateway_route_table = optional(bool,false)
+ default_route_table = optional(bool,false)
+}))
+ default = {}
+}
+
+variable "nsgs" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nsg_rules" {
+ type = map(object({
+ nsg_id = string
+ direction = string
+ protocol = string
+ description = optional(string)
+ stateless = optional(string)
+ source_type = optional(string)
+ destination_type = optional(string)
+ destination = optional(string)
+ source = optional(string)
+ options = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "subnets" {
+ type = map(object({
+ compartment_id = string
+ vcn_id = string
+ cidr_block = string
+ display_name = optional(string)
+ dns_label = optional(string)
+ ipv6cidr_block = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ prohibit_internet_ingress = optional(string)
+ prohibit_public_ip_on_vnic = optional(string)
+ availability_domain = optional(string)
+ dhcp_options_id = optional(string)
+ route_table_id = optional(string)
+ security_list_ids = optional(list(string))
+ }))
+ default = {}
+}
+
+variable "vlans" {
+ type = map(object({
+ cidr_block = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ display_name = optional(string)
+ nsg_ids = optional(list(string))
+ route_table_name = optional(string)
+ vlan_tag = optional(string)
+ availability_domain = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "drg_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_other_attachments" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_tables" {
+ type = map(object({
+ drg_id = string
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_ecmp_enabled = optional(bool)
+ import_drg_route_distribution_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_rules" {
+ type = map(any)
+ default = {}
+}
+
+variable "drg_route_distributions" {
+ type = map(object({
+ distribution_type = string
+ drg_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ }))
+ default = {}
+}
+
+variable "drg_route_distribution_statements" {
+ type = map(object({
+ drg_route_distribution_id = string
+ action = string
+ match_criteria = optional(list(object({
+ match_type = string
+ attachment_type = optional(string)
+ drg_attachment_id = optional(string)
+ })))
+ priority = optional(string)
+ }))
+ default = {}
+}
+
+variable "data_drg_route_tables" {
+ type = map(any)
+ default = {}
+}
+
+variable "data_drg_route_table_distributions" {
+ type = map(any)
+ default = {}
+}
+
+####################
+####### DNS #######
+####################
+
+variable "zones" {
+type = map(object({
+compartment_id = string
+display_name = string
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_type = optional(string)
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+variable "views" {
+type = map(object({
+compartment_id = string
+display_name = string
+scope = optional(string)
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+ default = {}
+}
+
+variable "rrsets" {
+type = map(object({
+compartment_id = optional(string)
+view_compartment_id = optional(string)
+view_id = optional(string)
+zone_id = string
+domain = string
+rtype = string
+ttl = number
+rdata = optional(list(string))
+scope = optional(string)
+}))
+default = {}
+}
+
+variable "resolvers" {
+type = map(object({
+network_compartment_id= string
+vcn_name = string
+display_name = optional(string)
+views = optional(map(object({
+ view_id = optional(string)
+ view_compartment_id = optional(string)
+})))
+resolver_rules = optional(map(object({
+ client_address_conditions = optional(list(any))
+ destination_addresses = optional(list(any))
+ qname_cover_conditions = optional(list(any))
+ source_endpoint_name = optional(string)
+})))
+endpoint_names = optional(map(object({
+ is_forwarding = optional(bool)
+ is_listening = optional(bool)
+ name = optional(string)
+ subnet_name = optional(string)
+ forwarding_address = optional(string)
+ listening_address = optional(string)
+ nsg_ids = optional(list(string))
+})))
+freeform_tags = optional(map(any))
+defined_tags = optional(map(any))
+}))
+default = {}
+}
+
+
+#########################
+## Dedicated VM Hosts ##
+#########################
+
+variable "dedicated_hosts" {
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ vm_host_shape = string
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ fault_domain = optional(string)
+ freeform_tags = optional(map(any))
+ }))
+ description = "To provision new dedicated VM hosts"
+ default = {}
+}
+
+#########################
+## Instances/Block Volumes ##
+#########################
+
+variable "blockvolumes" {
+ description = "To provision block volumes"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = string
+ size_in_gbs = optional(string)
+ is_auto_tune_enabled = optional(string)
+ vpus_per_gb = optional(string)
+ kms_key_id = optional(string)
+ attach_to_instance = optional(string)
+ attachment_type = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ device = optional(string)
+ encryption_in_transit_type = optional(string)
+ attachment_display_name = optional(string)
+ is_read_only = optional(bool)
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ is_shareable = optional(bool)
+ use_chap = optional(bool)
+ is_agent_auto_iscsi_login_enabled = optional(bool)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ source_details = optional(list(map(any)))
+ block_volume_replicas = optional(list(map(any)))
+ block_volume_replicas_deletion = optional(bool)
+ autotune_policies = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "block_backup_policies" {
+ type = map(any)
+ description = "To create block volume back policy"
+ default = {}
+}
+
+variable "instances" {
+ description = "Map of instances to be provisioned"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ shape = string
+ source_id = string
+ source_type = string
+ vcn_name = string
+ subnet_id = string
+ network_compartment_id = string
+ display_name = optional(string)
+ assign_public_ip = optional(bool)
+ boot_volume_size_in_gbs = optional(string)
+ fault_domain = optional(string)
+ dedicated_vm_host_id = optional(string)
+ private_ip = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(string))
+ ocpus = optional(string)
+ memory_in_gbs = optional(number)
+ capacity_reservation_id = optional(string)
+ create_is_pv_encryption_in_transit_enabled = optional(bool)
+ remote_execute = optional(string)
+ bastion_ip = optional(string)
+ cloud_init_script = optional(string)
+ ssh_authorized_keys = optional(string)
+ backup_policy = optional(string)
+ policy_compartment_id = optional(string)
+ network_type = optional(string)
+ #extended_metadata = optional(string)
+ skip_source_dest_check = optional(bool)
+ baseline_ocpu_utilization = optional(string)
+ #preemptible_instance_config = optional(string)
+ all_plugins_disabled = optional(bool)
+ is_management_disabled = optional(bool)
+ is_monitoring_disabled = optional(bool)
+ assign_private_dns_record = optional(string)
+ plugins_details = optional(map(any))
+ is_live_migration_preferred = optional(bool)
+ recovery_action = optional(string)
+ are_legacy_imds_endpoints_disabled = optional(bool)
+ boot_volume_type = optional(string)
+ firmware = optional(string)
+ is_consistent_volume_naming_enabled = optional(bool)
+ remote_data_volume_type = optional(string)
+ platform_config = optional(list(map(any)))
+ launch_options = optional(list(map(any)))
+ ipxe_script = optional(string)
+ preserve_boot_volume = optional(bool)
+ vlan_id = optional(string)
+ kms_key_id = optional(string)
+ vnic_display_name = optional(string)
+ vnic_defined_tags = optional(map(any))
+ vnic_freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "boot_backup_policies" {
+ type = map(any)
+ description = "Map of boot volume backup policies to be provisioned"
+ default = {}
+}
+
+#########################
+####### Database ########
+#########################
+
+variable "exa_infra" {
+ description = "To provision exadata infrastructure"
+ type = map(any)
+ default = {}
+}
+
+variable "exa_vmclusters" {
+ description = "To provision exadata cloud VM cluster"
+ type = map(any)
+ default = {}
+}
+
+variable "dbsystems_vm_bm" {
+ description = "To provision DB System"
+ type = map(any)
+ default = {}
+}
+
+variable "db_home" {
+ type = map(any)
+ description = "Map of database db home to be provisioned"
+ default = {}
+}
+
+variable "databases" {
+ description = "Map of databases to be provisioned in an existing db_home"
+ type = map(any)
+ default = {}
+}
+
+####################################
+####### Autonomous Database ########
+####################################
+
+variable "adb" {
+ type = map(object({
+ admin_password = optional(string)
+ character_set = optional(string)
+ compartment_id = string
+ cpu_core_count = optional(number)
+ database_edition = optional(string)
+ data_storage_size_in_tbs = optional(number)
+ customer_contacts = optional(list(string))
+ db_name = string
+ db_version = optional(string)
+ db_workload = optional(string)
+ display_name = optional(string)
+ license_model = optional(string)
+ ncharacter_set = optional(string)
+ network_compartment_id = optional(string)
+ nsg_ids = optional(list(string))
+ subnet_id = optional(string)
+ vcn_name = optional(string)
+ whitelisted_ips = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+######### FSS ###########
+#########################
+
+variable "mount_targets" {
+ description = "To provision Mount Targets"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ display_name = optional(string)
+ ip_address = optional(string)
+ hostname_label = optional(string)
+ nsg_ids = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fss" {
+ description = "To provision File System Services"
+ type = map(object({
+ availability_domain = string
+ compartment_id = string
+ display_name = optional(string)
+ source_snapshot = optional(string)
+ snapshot_policy = optional(string)
+ policy_compartment_id = optional(string)
+ kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_export_options" {
+ description = "To provision Export Sets"
+ type = map(object({
+ export_set_id = string
+ file_system_id = string
+ path = string
+ export_options = optional(list(any))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_idmap_groups_for_sys_auth = optional(bool)
+ }))
+ default = {}
+}
+
+variable "fss_replication" {
+ description = "To provision File System Replication"
+ type = map(object({
+ compartment_id = string
+ source_id = string
+ target_id = string
+ display_name = optional(string)
+ replication_interval = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+####### FSS Logs ########
+#########################
+
+variable "nfs_log_groups" {
+ description = "To provision Log Groups for Mount Target"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nfs_logs" {
+ description = "To provision Logs for Mount Target"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+#########################
+#### Load Balancers #####
+#########################
+
+variable "load_balancers" {
+ description = "To provision Load Balancers"
+ type = map(object({
+ compartment_id = string
+ vcn_name = string
+ shape = string
+ subnet_ids = list(any)
+ network_compartment_id = string
+ display_name = string
+ shape_details = optional(list(map(any)))
+ nsg_ids = optional(list(any))
+ is_private = optional(bool)
+ ip_mode = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ reserved_ips_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "hostnames" {
+ description = "To provision Load Balancer Hostnames"
+ type = map(object({
+ load_balancer_id = string
+ hostname = string
+ name = string
+ }))
+ default = {}
+}
+
+variable "certificates" {
+ description = "To provision Load Balancer Certificates"
+ type = map(object({
+ certificate_name = string
+ load_balancer_id = string
+ ca_certificate = optional(string)
+ passphrase = optional(string)
+ private_key = optional(string)
+ public_certificate = optional(string)
+ }))
+ default = {}
+}
+
+variable "cipher_suites" {
+ description = "To provision Load Balancer Cipher Suites"
+ type = map(object({
+ ciphers = list(string)
+ name = string
+ load_balancer_id = optional(string)
+ }))
+ default = {}
+}
+
+variable "backend_sets" {
+ description = "To provision Load Balancer Backend Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ policy = string
+ protocol = optional(string)
+ interval_ms = optional(string)
+ is_force_plain_text = optional(string)
+ port = optional(string)
+ response_body_regex = optional(string)
+ retries = optional(string)
+ return_code = optional(string)
+ timeout_in_millis = optional(string)
+ url_path = optional(string)
+ lb_cookie_session = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ path = optional(string)
+ domain = optional(string)
+ is_http_only = optional(string)
+ is_secure = optional(string)
+ max_age_in_seconds = optional(string)
+ })))
+ session_persistence_configuration = optional(list(object({
+ cookie_name = optional(string)
+ disable_fallback = optional(string)
+ })))
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "backends" {
+ description = "To provision Load Balancer Backends"
+ type = map(object({
+ backendset_name = string
+ ip_address = string
+ load_balancer_id = string
+ port = string
+ instance_compartment = optional(string)
+ backup = optional(string)
+ drain = optional(string)
+ offline = optional(string)
+ weight = optional(string)
+ }))
+ default = {}
+}
+
+variable "listeners" {
+ description = "To provision Load Balancer Listeners"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ port = string
+ protocol = string
+ default_backend_set_name = string
+ connection_configuration = optional(list(map(any)))
+ hostname_names = optional(list(any))
+ path_route_set_name = optional(string)
+ rule_set_names = optional(list(any))
+ routing_policy_name = optional(string)
+ certificate_name = optional(string)
+ cipher_suite_name = optional(string)
+ ssl_configuration = optional(list(object({
+ certificate_ids = optional(list(any))
+ server_order_preference = optional(string)
+ trusted_certificate_authority_ids = optional(list(any))
+ verify_peer_certificate = optional(string)
+ verify_depth = optional(string)
+ protocols = optional(list(any))
+ })))
+ }))
+ default = {}
+}
+
+variable "path_route_sets" {
+ description = "To provision Load Balancer Path Route Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ path_routes = optional(list(map(any)))
+ }))
+ default = {}
+}
+
+variable "rule_sets" {
+ description = "To provision Load Balancer Rule Sets"
+ type = map(object({
+ name = string
+ load_balancer_id = string
+ access_control_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ description = optional(string)
+ })))
+ access_control_method_rules = optional(list(object({
+ action = string
+ allowed_methods = optional(list(any))
+ status_code = optional(string)
+ })))
+ http_header_rules = optional(list(object({
+ action = string
+ are_invalid_characters_allowed = optional(bool)
+ http_large_header_size_in_kb = optional(string)
+ })))
+ uri_redirect_rules = optional(list(object({
+ action = string
+ attribute_name = optional(string)
+ attribute_value = optional(string)
+ operator = optional(string)
+ host = optional(string)
+ path = optional(string)
+ port = optional(string)
+ protocol = optional(string)
+ query = optional(string)
+ response_code = optional(string)
+ })))
+ request_response_header_rules = optional(list(object({
+ action = string
+ header = optional(string)
+ prefix = optional(string)
+ suffix = optional(string)
+ value = optional(string)
+ })))
+ }))
+ default = {}
+}
+
+variable "lbr_reserved_ips" {
+ description = "To provision Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ lifetime = string
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+###################################
+####### Load Balancer Logs ########
+###################################
+
+variable "loadbalancer_log_groups" {
+ description = "To provision Log Groups for Load Balancers"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "loadbalancer_logs" {
+ description = "To provision Logs for Load Balancers"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+## Network Load Balancers ##
+#########################
+
+variable "network_load_balancers" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ subnet_id = string
+ is_private = optional(bool)
+ reserved_ips_id = string
+ is_preserve_source_destination = optional(bool)
+ is_symmetric_hash_enabled = optional(bool)
+ nlb_ip_version = optional(string)
+ assigned_private_ipv4 = optional(string)
+ nsg_ids = optional(list(string))
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "nlb_listeners" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ default_backend_set_name = string
+ port = number
+ protocol = string
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+
+variable "nlb_backend_sets" {
+ type = map(object({
+ name = string
+ network_load_balancer_id = string
+ policy = string
+ protocol = string
+ domain_name = optional(string)
+ query_class = optional(string)
+ query_type = optional(string)
+ rcodes = optional(list(string))
+ transport_protocol = optional(string)
+ return_code = optional(number)
+ interval_in_millis = optional(number)
+ port = optional(number)
+ request_data = optional(string)
+ response_body_regex = optional(string)
+ response_data = optional(string)
+ retries = optional(number)
+ timeout_in_millis = optional(number)
+ url_path = optional(string)
+ is_preserve_source = optional(bool)
+ ip_version = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_backends" {
+ type = map(object({
+ name = optional(string)
+ backend_set_name = string
+ network_load_balancer_id = string
+ port = number
+ ip_address = string
+ instance_compartment = string
+ is_drain = optional(bool)
+ is_backup = optional(bool)
+ is_offline = optional(bool)
+ weight = optional(number)
+ target_id = optional(string)
+ }))
+ default = {}
+}
+variable "nlb_reserved_ips" {
+ description = "To provision Network Load Balancer Reserved IPs"
+ type = map(object({
+ compartment_id = string
+ lifetime = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ display_name = optional(string)
+ private_ip_id = optional(string)
+ public_ip_pool_id = optional(string)
+ }))
+ default = {}
+}
+
+
+#########################
+##### IP Management #####
+#########################
+
+variable "public_ip_pools" {
+ type = map(any)
+ default = {}
+}
+
+variable "private_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "reserved_ips" {
+ type = map(any)
+ default = {}
+}
+
+variable "vnic_attachments" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+##### VCN Logs ##########
+#########################
+
+variable "vcn_log_groups" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "vcn_logs" {
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+###### OSS Buckets ######
+#########################
+
+variable "buckets" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+####### OSS Logs ########
+#########################
+
+variable "oss_log_groups" {
+ description = "To provision Log Groups for OSS"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "oss_logs" {
+ description = "To provision Logs for OSS"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+#########################
+### OSS IAM Policies ####
+#########################
+
+variable "oss_policies" {
+ type = map(any)
+ default = {}
+}
+
+#########################
+## Management Services ##
+#########################
+
+variable "alarms" {
+ type = map(object({
+ compartment_id = string
+ destinations = list(string)
+ alarm_name = string
+ is_enabled = bool
+ metric_compartment_id = string
+ namespace = string
+ query = string
+ severity = string
+ body = optional(string)
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ is_notifications_per_metric_dimension_enabled = optional(bool)
+ metric_compartment_id_in_subtree = optional(string)
+ trigger_delay_minutes = optional(string)
+ repeat_notification_duration = optional(string)
+ resolution = optional(string)
+ resource_group = optional(string)
+ suppression = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "events" {
+ type = map(object({
+ event_name = string
+ compartment_id = string
+ description = string
+ is_enabled = bool
+ condition = string
+ actions = optional(list(object({
+ action_type = string
+ is_enabled = string
+ description = optional(string)
+ function_id = optional(string)
+ stream_id = optional(string)
+ topic_id = optional(string)
+ })))
+ message_format = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_topics" {
+ type = map(object({
+ compartment_id = string
+ topic_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "notifications_subscriptions" {
+ type = map(object({
+ compartment_id = string
+ endpoint = string
+ protocol = string
+ topic_id = string
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "service_connectors" {
+ type = any
+ default = {}
+ description = "To provision service connector hub resources"
+}
+
+#########################
+## Developer Services ##
+#########################
+
+## OKE
+
+variable "clusters" {
+ type = map(object({
+ display_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ kubernetes_version = string
+ cni_type = string
+ cluster_type = string
+ is_policy_enabled = optional(bool)
+ policy_kms_key_id = optional(string)
+ is_kubernetes_dashboard_enabled = optional(bool)
+ is_tiller_enabled = optional(bool)
+ is_public_ip_enabled = optional(bool)
+ nsg_ids = optional(list(string))
+ endpoint_subnet_id = string
+ is_pod_security_policy_enabled = optional(bool)
+ pods_cidr = optional(string)
+ services_cidr = optional(string)
+ service_lb_subnet_ids = optional(list(string))
+ cluster_kms_key_id = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ lb_defined_tags = optional(map(any))
+ lb_freeform_tags = optional(map(any))
+ volume_defined_tags = optional(map(any))
+ volume_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_node_labels = optional(map(any))
+ kubernetes_version = string
+ is_pv_encryption_in_transit_enabled = optional(bool)
+ availability_domain = number
+ fault_domains = optional(list(string))
+ subnet_id = string
+ size = number
+ cni_type = string
+ max_pods_per_node = optional(number)
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_ids = optional(string)
+ worker_nsg_ids = optional(list(string))
+ memory_in_gbs = optional(number)
+ ocpus = optional(number)
+ image_id = string
+ source_type = string
+ boot_volume_size_in_gbs = optional(number)
+ ssh_public_key = optional(string)
+ nodepool_kms_key_id = optional(string)
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "virtual-nodepools" {
+ type = map(object({
+ display_name = string
+ cluster_name = string
+ compartment_id = string
+ network_compartment_id = string
+ vcn_name = string
+ node_shape = string
+ initial_virtual_node_labels = optional(map(any))
+ availability_domain = number
+ fault_domains = list(string)
+ subnet_id = string
+ size = number
+ pod_nsg_ids = optional(list(string))
+ pod_subnet_id = string
+ worker_nsg_ids = optional(list(string))
+ taints = optional(list(any))
+ node_defined_tags = optional(map(any))
+ node_freeform_tags = optional(map(any))
+ nodepool_defined_tags = optional(map(any))
+ nodepool_freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+
+##################################
+############## SDDCs #############
+##################################
+variable "sddcs" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = string
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = string
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ initial_cluster_display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ management_datastore = optional(list(string))
+ workload_datastore = optional(list(string))
+
+ }))
+ default = {}
+
+}
+
+variable "sddc-clusters" {
+ type = map(object({
+ compartment_id = string
+ availability_domain = string
+ network_compartment_id = string
+ vcn_name = string
+ esxi_hosts_count = number
+ nsx_edge_uplink1vlan_id = string
+ nsx_edge_uplink2vlan_id = optional(string)
+ nsx_edge_vtep_vlan_id = string
+ nsx_vtep_vlan_id = string
+ provisioning_subnet_id = string
+ ssh_authorized_keys = optional(string)
+ vmotion_vlan_id = string
+ vmware_software_version = string
+ vsan_vlan_id = string
+ vsphere_vlan_id = string
+ capacity_reservation_id = optional(string)
+ defined_tags = optional(map(any))
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ hcx_action = optional(string)
+ hcx_vlan_id = optional(string)
+ initial_host_ocpu_count = optional(number)
+ initial_host_shape_name = optional(string)
+ initial_commitment = optional(string)
+ instance_display_name_prefix = optional(string)
+ is_hcx_enabled = optional(bool)
+ is_shielded_instance_enabled = optional(bool)
+ is_single_host_sddc = optional(bool)
+ provisioning_vlan_id = optional(string)
+ refresh_hcx_license_status = optional(bool)
+ replication_vlan_id = optional(string)
+ reserving_hcx_on_premise_license_keys = optional(string)
+ workload_network_cidr = optional(string)
+ workload_datastore = optional(list(string))
+ sddc_id = optional(string)
+ esxi_software_version = optional(string)
+
+ }))
+ default = {}
+
+}
+
+
+############################
+## Key Management Service ##
+############################
+
+variable "vaults" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_type = string
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ replica_region = optional(string)
+ }))
+ default = {}
+}
+
+variable "keys" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ vault_name = string
+ algorithm = optional(string)
+ length = optional(string)
+ curve_id = optional(string)
+ protection_mode = optional(string)
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ is_auto_rotation_enabled = optional(bool)
+ rotation_interval_in_days = optional(string)
+
+ }))
+ default = {}
+}
+
+###########################
+######### Budgets #########
+###########################
+
+variable "budgets" {
+ type = map(object({
+ amount = string
+ compartment_id = string
+ reset_period = string
+ budget_processing_period_start_offset = optional(string)
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ processing_period_type = optional(string)
+ budget_end_date = optional(string)
+ budget_start_date = optional(string)
+ target_type = optional(string)
+ targets = optional(list(any))
+ }))
+ default = {}
+}
+
+variable "budget_alert_rules" {
+ type = map(object({
+ budget_id = string
+ threshold = string
+ threshold_type = string
+ type = string
+ defined_tags = optional(map(any))
+ description = optional(string)
+ display_name = optional(string)
+ freeform_tags = optional(map(any))
+ message = optional(string)
+ recipients = optional(string)
+ }))
+ default = {}
+}
+
+###########################
+####### Cloud Guard #######
+###########################
+
+variable "cloud_guard_configs" {
+ type = map(object({
+ compartment_id = string
+ reporting_region = string
+ status = string
+ self_manage_resources = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "cloud_guard_targets" {
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ target_resource_id = string
+ target_resource_type = string
+ prefix = string
+ description = optional(string)
+ state = optional(string)
+ target_detector_recipes = optional(list(any))
+ target_responder_recipes = optional(list(any))
+ freeform_tags = optional(map(any))
+ defined_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+####################################
+####### Custom Backup Policy #######
+####################################
+
+variable "custom_backup_policies" {
+ type = map(any)
+ default = {}
+}
+
+variable "capacity_reservation_ocids" {
+ type = map(any)
+ default = {
+ "AD1" : "",
+ "AD2" : "",
+ "AD3" : ""
+ }
+}
+
+#####################################
+####### Firewall as a Service #######
+#####################################
+variable "firewalls" {
+ type = map(object({
+ compartment_id = string
+ network_compartment_id = string
+ network_firewall_policy_id = string
+ subnet_id = string
+ vcn_name = string
+ display_name = string
+ ipv4address = optional(string)
+ nsg_id = optional(list(string))
+ ipv6address = optional(string)
+ availability_domain = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw-policies" {
+ type = map(object({
+ compartment_id = optional(string)
+ display_name = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+variable "services" {
+ type = map(object({
+ service_name = string
+ service_type = string
+ network_firewall_policy_id = string
+ port_ranges = list(object({
+ minimum_port = string
+ maximum_port = optional(string)
+ }))
+ }))
+ default = {}
+}
+variable "url_lists" {
+ type = map(object({
+ urllist_name = string
+ network_firewall_policy_id = string
+ urls = list(object({
+ pattern = string
+ type = string
+ }))
+ }))
+ default = {}
+}
+variable "service_lists" {
+ type = map(object({
+ service_list_name = string
+ network_firewall_policy_id = string
+ services = list(string)
+ }))
+ default = {}
+}
+
+variable "address_lists" {
+ type = map(object({
+ address_list_name = string
+ network_firewall_policy_id = string
+ address_type = string
+ addresses = list(string)
+ }))
+ default = {}
+}
+
+variable "applications" {
+ type = map(object({
+ app_list_name = string
+ network_firewall_policy_id = string
+ app_type = string
+ icmp_type = number
+ icmp_code = optional(number)
+ }))
+ default = {}
+}
+
+variable "application_groups" {
+ type = map(object({
+ app_group_name = string
+ network_firewall_policy_id = string
+ apps = list(string)
+
+ }))
+ default = {}
+}
+
+variable "security_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+ application = optional(list(string))
+ destination_address = optional(list(string))
+ service = optional(list(string))
+ source_address = optional(list(string))
+ url = optional(list(string))
+ })))
+ inspection = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+variable "secrets" {
+ type = map(object({
+ secret_name = string
+ network_firewall_policy_id = string
+ secret_source = string
+ secret_type = string
+ vault_secret_id = string
+ version_number = number
+ vault_name = string
+ vault_compartment_id = string
+ }))
+ default = {}
+}
+
+variable "decryption_profiles" {
+ type = map(object({
+ profile_name = string
+ profile_type = string
+ network_firewall_policy_id = string
+ are_certificate_extensions_restricted = optional(bool)
+ is_auto_include_alt_name = optional(bool)
+ is_expired_certificate_blocked = optional(bool)
+ is_out_of_capacity_blocked = optional(bool)
+ is_revocation_status_timeout_blocked = optional(bool)
+ is_unknown_revocation_status_blocked = optional(bool)
+ is_unsupported_cipher_blocked = optional(bool)
+ is_unsupported_version_blocked = optional(bool)
+ is_untrusted_issuer_blocked = optional(bool)
+ }))
+ default = {}
+}
+
+variable "decryption_rules" {
+ type = map(object({
+ action = string
+ rule_name = string
+ network_firewall_policy_id = string
+ condition = optional(list(object({
+
+ destination_address = optional(list(string))
+
+ source_address = optional(list(string))
+
+ })))
+ decryption_profile = optional(string)
+ secret = optional(string)
+ after_rule = optional(string)
+ before_rule = optional(string)
+
+ }))
+ default = {}
+}
+
+#########################
+####### Firewall Logs ########
+#########################
+
+variable "fw_log_groups" {
+ description = "To provision Log Groups for Network Firewall"
+ type = map(object({
+ compartment_id = string
+ display_name = string
+ description = optional(string)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+variable "fw_logs" {
+ description = "To provision Logs for Network Firewall"
+ type = map(object({
+ display_name = string
+ log_group_id = string
+ log_type = string
+ compartment_id = optional(string)
+ category = optional(string)
+ resource = optional(string)
+ service = optional(string)
+ source_type = optional(string)
+ is_enabled = optional(bool)
+ retention_duration = optional(number)
+ defined_tags = optional(map(any))
+ freeform_tags = optional(map(any))
+ }))
+ default = {}
+}
+
+##########################
+# Add new variables here #
+##########################
+######################### END #########################
diff --git a/examples/managementservices/backend.tf b/examples/managementservices/backend.tf
new file mode 100644
index 0000000..16bc557
--- /dev/null
+++ b/examples/managementservices/backend.tf
@@ -0,0 +1,21 @@
+/*This line will be removed when using remote state
+# !!! WARNING !!! Terraform State Lock is not supported with OCI Object Storage.
+# Pre-Requisite: Create a version enabled object storage bucket to store the state file.
+# End Point Format: https://.compat.objectstorage..oraclecloud.com
+# Please look at the below doc for information about shared_credentials_file and other parameters:
+# Reference: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
+
+terraform {
+ backend "s3" {
+ key = ""
+ bucket = ""
+ region = ""
+ endpoint = ""
+ shared_credentials_file = "~/.aws/credentials"
+ skip_region_validation = true
+ skip_credentials_validation = true
+ skip_metadata_api_check = true
+ force_path_style = true
+ }
+}
+This line will be removed when using remote state*/
\ No newline at end of file
diff --git a/examples/managementservices/managementservices.tf b/examples/managementservices/managementservices.tf
new file mode 100755
index 0000000..a7d0f1d
--- /dev/null
+++ b/examples/managementservices/managementservices.tf
@@ -0,0 +1,140 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Module Block - ManagementServices
+# Create Alarms
+############################
+
+module "alarms" {
+ source = "./modules/managementservices/alarm"
+
+ depends_on = [module.notifications-topics]
+ for_each = var.alarms != null ? var.alarms : {}
+
+ alarm_name = each.value.alarm_name
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ destinations = [for tn in each.value.destinations : (length(regexall("ocid1.onstopic.oc*", tn)) > 0 ? tn : merge(module.notifications-topics.*...)[tn]["topic_tf_id"])]
+ is_enabled = each.value.is_enabled
+ metric_compartment_id = each.value.metric_compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.metric_compartment_id)) > 0 ? each.value.metric_compartment_id : var.compartment_ocids[each.value.metric_compartment_id]) : null
+ namespace = each.value.namespace
+ query = each.value.query
+ severity = each.value.severity
+ body = each.value.body
+ message_format = each.value.message_format
+ trigger_delay_minutes = each.value.trigger_delay_minutes
+ repeat_notification_duration = each.value.repeat_notification_duration
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+/*
+output "alarms_id" {
+ value = [ for k,v in merge(module.alarms.*...) : v.alarm_tf_id]
+}
+*/
+
+############################
+# Module Block - ManagementServices
+# Create Events
+############################
+
+module "events" {
+ source = "./modules/managementservices/event"
+ depends_on = [module.notifications-topics]
+ for_each = var.events != null ? var.events : {}
+
+ event_name = each.value.event_name
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ is_enabled = each.value.is_enabled
+ description = each.value.description
+ condition = each.value.condition
+ actions = var.events
+ key_name = each.key
+ topic_name = merge(module.notifications-topics.*...)
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+/*
+output "events_id" {
+ value = [ for k,v in merge(module.events.*...) : v.event_tf_id]
+}
+*/
+
+############################
+# Module Block - ManagementServices
+# Create Notifications
+############################
+
+module "notifications-topics" {
+ source = "./modules/managementservices/notification-topic"
+ for_each = var.notifications_topics != null ? var.notifications_topics : {}
+
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ description = each.value.description
+ topic_name = each.value.topic_name
+
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+module "notifications-subscriptions" {
+ source = "./modules/managementservices/notification-subscription"
+ for_each = var.notifications_subscriptions != null ? var.notifications_subscriptions : {}
+
+ depends_on = [module.notifications-topics]
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ endpoint = each.value.endpoint
+ protocol = each.value.protocol
+ topic_id = length(regexall("ocid1.onstopic.oc*", each.value.topic_id)) > 0 ? each.value.topic_id : merge(module.notifications-topics.*...)[each.value.topic_id]["topic_tf_id"]
+ #Optional
+ defined_tags = each.value.defined_tags
+ freeform_tags = each.value.freeform_tags
+}
+
+/*
+output "notifications-topics" {
+ value = [ for k,v in merge(module.notifications-topics.*...) : v.topic_tf_id ]
+}
+*/
+
+####################################
+## Module Block - Service Connector
+## Create Service Connectors
+####################################
+
+module "service-connectors" {
+ source = "./modules/managementservices/service-connector"
+
+ for_each = var.service_connectors
+
+ compartment_id = each.value.compartment_id != null ? (length(regexall("ocid1.compartment.oc*", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartment_ocids[each.value.compartment_id]) : null
+ logs_compartment_id = var.tenancy_ocid
+ source_monitoring_details = each.value.source_details.source_kind == "monitoring" ? { for k, v in each.value.source_details.source_monitoring_details : lookup(var.compartment_ocids, k, "not_found") => v } : {}
+ target_monitoring_details = each.value.target_details.target_kind == "monitoring" ? { for k, v in each.value.target_details.target_monitoring_details : lookup(var.compartment_ocids, k, "not_found") => v } : {}
+ log_group_names = each.value.source_details.source_kind == "logging" ? flatten([for key in each.value.source_details.source_log_group_names : join("&", tolist([lookup(var.compartment_ocids, split("&", key)[0], "null"), split("&", key)[1], split("&", key)[2]]))]) : []
+ display_name = each.value.display_name
+ description = each.value.description
+ source_kind = each.value.source_details.source_kind
+ target_kind = each.value.target_details.target_kind
+
+ stream_id = each.value.target_details.target_kind == "streaming" ? { for k, v in each.value.target_details.target_stream_name : lookup(var.compartment_ocids, k, "null") => v } : {}
+ source_stream_id = each.value.source_details.source_kind == "streaming" ? { for k, v in each.value.source_details.source_stream_name : lookup(var.compartment_ocids, k, "null") => v } : {}
+ bucket_name = each.value.target_details.target_kind == "objectStorage" ? each.value.target_details.target_bucket_name : ""
+ object_name_prefix = each.value.target_details.target_kind == "objectStorage" ? each.value.target_details.target_object_name_prefix : ""
+
+ topic_id = each.value.target_details.target_kind == "notifications" ? { for k, v in each.value.target_details.target_topic_name : lookup(var.compartment_ocids, k, "null") => v } : {}
+ enable_formatted_messaging = each.value.target_details.target_kind == "notifications" ? each.value.target_details.enable_formatted_messaging : false
+ destination_log_group_id = each.value.target_details.target_kind == "loggingAnalytics" ? { for k, v in each.value.target_details.target_log_group_name : lookup(var.compartment_ocids, k, "null") => v } : {}
+ target_log_source_identifier = each.value.source_details.source_kind == "streaming" && each.value.target_details.target_kind == "loggingAnalytics" ? each.value.target_details.target_log_source_identifier : ""
+
+ function_details = each.value.target_details.target_kind == "functions" ? flatten([for key in each.value.target_details.target_function_details : join("@", tolist([lookup(var.compartment_ocids, split("@", key)[0], "null"), split("@", key)[1], split("@", key)[2]]))]) : []
+ #Optional
+ defined_tags = try(each.value["defined_tags"], {})
+ freeform_tags = try(each.value["freeform_tags"], {})
+}
\ No newline at end of file
diff --git a/examples/managementservices/oci-data.tf b/examples/managementservices/oci-data.tf
new file mode 100644
index 0000000..1495707
--- /dev/null
+++ b/examples/managementservices/oci-data.tf
@@ -0,0 +1,42 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Resource Block - Identity
+# Fetch Compartments
+############################
+
+#Fetch Compartment Details
+data "oci_identity_compartments" "compartments" {
+ #Required
+ compartment_id = var.tenancy_ocid
+
+ #Optional
+ #name = var.compartment_name
+ access_level = "ANY"
+ compartment_id_in_subtree = true
+ state = "ACTIVE"
+}
+
+
+############################
+# Data Block - Network
+# Fetch ADs
+############################
+
+data "oci_identity_availability_domains" "availability_domains" {
+ #Required
+ compartment_id = var.tenancy_ocid
+}
+
+
+/*
+output "compartment_id_map" {
+ description = "Compartment ocid"
+ // This allows the compartment ID to be retrieved from the resource if it exists, and if not to use the data source.
+ value = zipmap(data.oci_identity_compartments.compartments.compartments.*.name,data.oci_identity_compartments.compartments.compartments.*.id)
+}
+
+output "ads" {
+ value = data.oci_identity_availability_domains.availability_domains.availability_domains.*.name
+}
+*/
\ No newline at end of file
diff --git a/examples/managementservices/provider.tf b/examples/managementservices/provider.tf
new file mode 100644
index 0000000..9a69c98
--- /dev/null
+++ b/examples/managementservices/provider.tf
@@ -0,0 +1,24 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+# Provider Block
+# OCI
+############################
+
+provider "oci" {
+ tenancy_ocid = var.tenancy_ocid
+ user_ocid = var.user_ocid
+ fingerprint = var.fingerprint
+ private_key_path = var.private_key_path
+ region = var.region
+ ignore_defined_tags = ["Oracle-Tags.CreatedBy", "Oracle-Tags.CreatedOn"]
+}
+
+terraform {
+ required_providers {
+ oci = {
+ source = "oracle/oci"
+ version = "5.40.0"
+ }
+ }
+}
diff --git a/examples/managementservices/variables_example.tf b/examples/managementservices/variables_example.tf
new file mode 100644
index 0000000..fae17ea
--- /dev/null
+++ b/examples/managementservices/variables_example.tf
@@ -0,0 +1,2082 @@
+// Copyright (c) 2021, 2022, Oracle and/or its affiliates.
+
+############################
+#
+# Variables Block
+# OCI
+#
+############################
+
+variable "tenancy_ocid" {
+ type = string
+ default = ""
+}
+
+variable "user_ocid" {
+ type = string
+ default = ""
+}
+
+variable "fingerprint" {
+ type = string
+ default = ""
+}
+
+variable "private_key_path" {
+ type = string
+ default = ""
+}
+
+variable "region" {
+ type = string
+ default = ""
+}
+
+#################################
+# SSH Keys
+#################################
+
+variable "instance_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_instance_ssh_keys#
+ # exported instance ssh keys
+ #instance_ssh_keys_END#
+ }
+}
+
+variable "oke_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_oke_ssh_keys#
+ #oke_ssh_keys_END#
+ }
+}
+variable "sddc_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ""
+ # Use '\n' as the delimiter to add multiple ssh keys.
+ # Example: ssh_public_key = "ssh-rsa AAXXX......yhdlo\nssh-rsa AAxxskj...edfwf"
+ #START_sddc_ssh_keys#
+ #sddc_ssh_keys_END#
+ }
+}
+
+variable "exacs_ssh_keys" {
+ type = map(any)
+ default = {
+ ssh_public_key = ["