-
Notifications
You must be signed in to change notification settings - Fork 684
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
276 changed files
with
11,120 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. | ||
// Licensed under the Mozilla Public License v2.0 | ||
|
||
variable "tenancy_ocid" {} | ||
variable "user_ocid" {} | ||
variable "fingerprint" {} | ||
variable "private_key_path" {} | ||
variable "region" { | ||
default = "us-ashburn-1" | ||
} | ||
variable "compartment_ocid" {} | ||
|
||
variable "cluster_start_credential_rotation_management_auto_completion_delay_duration" { | ||
default = "P5D" | ||
} | ||
|
||
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 | ||
} | ||
|
||
data "oci_identity_availability_domain" "ad1" { | ||
compartment_id = var.tenancy_ocid | ||
ad_number = 1 | ||
} | ||
|
||
data "oci_identity_availability_domain" "ad2" { | ||
compartment_id = var.tenancy_ocid | ||
ad_number = 2 | ||
} | ||
|
||
data "oci_containerengine_cluster_option" "test_cluster_option" { | ||
cluster_option_id = "all" | ||
} | ||
|
||
resource "oci_core_vcn" "test_vcn" { | ||
cidr_block = "10.0.0.0/16" | ||
compartment_id = var.compartment_ocid | ||
display_name = "tfVcnForClusters" | ||
} | ||
|
||
resource "oci_core_internet_gateway" "test_ig" { | ||
compartment_id = var.compartment_ocid | ||
display_name = "tfClusterInternetGateway" | ||
vcn_id = oci_core_vcn.test_vcn.id | ||
} | ||
|
||
resource "oci_core_route_table" "test_route_table" { | ||
compartment_id = var.compartment_ocid | ||
vcn_id = oci_core_vcn.test_vcn.id | ||
display_name = "tfClustersRouteTable" | ||
|
||
route_rules { | ||
destination = "0.0.0.0/0" | ||
destination_type = "CIDR_BLOCK" | ||
network_entity_id = oci_core_internet_gateway.test_ig.id | ||
} | ||
} | ||
|
||
resource "oci_core_subnet" "clusterSubnet_1" { | ||
#Required | ||
availability_domain = data.oci_identity_availability_domain.ad1.name | ||
cidr_block = "10.0.20.0/24" | ||
compartment_id = var.compartment_ocid | ||
vcn_id = oci_core_vcn.test_vcn.id | ||
|
||
# Provider code tries to maintain compatibility with old versions. | ||
security_list_ids = [oci_core_vcn.test_vcn.default_security_list_id] | ||
display_name = "tfSubNet1ForClusters" | ||
route_table_id = oci_core_route_table.test_route_table.id | ||
} | ||
|
||
resource "oci_core_subnet" "clusterSubnet_2" { | ||
#Required | ||
availability_domain = data.oci_identity_availability_domain.ad2.name | ||
cidr_block = "10.0.21.0/24" | ||
compartment_id = var.compartment_ocid | ||
vcn_id = oci_core_vcn.test_vcn.id | ||
display_name = "tfSubNet1ForClusters" | ||
|
||
# Provider code tries to maintain compatibility with old versions. | ||
security_list_ids = [oci_core_vcn.test_vcn.default_security_list_id] | ||
route_table_id = oci_core_route_table.test_route_table.id | ||
} | ||
|
||
resource "oci_containerengine_cluster" "test_cluster" { | ||
#Required | ||
compartment_id = var.compartment_ocid | ||
kubernetes_version = reverse(data.oci_containerengine_cluster_option.test_cluster_option.kubernetes_versions)[0] | ||
name = "tfTestCluster" | ||
vcn_id = oci_core_vcn.test_vcn.id | ||
|
||
#Optional | ||
options { | ||
service_lb_subnet_ids = [oci_core_subnet.clusterSubnet_1.id, oci_core_subnet.clusterSubnet_2.id] | ||
|
||
#Optional | ||
add_ons { | ||
#Optional | ||
is_kubernetes_dashboard_enabled = "true" | ||
is_tiller_enabled = "true" | ||
} | ||
|
||
admission_controller_options { | ||
#Optional | ||
is_pod_security_policy_enabled = false | ||
} | ||
|
||
kubernetes_network_config { | ||
#Optional | ||
pods_cidr = "10.1.0.0/16" | ||
services_cidr = "10.2.0.0/16" | ||
} | ||
} | ||
} | ||
|
||
// start credential rotation on a cluster | ||
resource "oci_containerengine_cluster_start_credential_rotation_management" "test_cluster_start_credential_rotation_management" { | ||
#Required | ||
auto_completion_delay_duration = var.cluster_start_credential_rotation_management_auto_completion_delay_duration | ||
cluster_id = oci_containerengine_cluster.test_cluster.id | ||
} | ||
|
||
// get credential rotation status | ||
data "oci_containerengine_cluster_credential_rotation_status" "test_cluster_credential_rotation_status" { | ||
#Required | ||
cluster_id = oci_containerengine_cluster.test_cluster.id | ||
} | ||
|
||
// complete credential rotation on a cluster | ||
resource "oci_containerengine_cluster_complete_credential_rotation_management" "test_cluster_complete_credential_rotation_management" { | ||
#Required | ||
cluster_id = oci_containerengine_cluster.test_cluster.id | ||
depends_on = [oci_containerengine_cluster_start_credential_rotation_management.test_cluster_start_credential_rotation_management] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
examples/database/exadata_cc/adbd/autonomous_vm_cluster_ords_certificate_management.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
resource "oci_database_autonomous_vm_cluster_ords_certificate_management" "test_avm_ords_mgmt_res"{ | ||
autonomous_vm_cluster_id = oci_database_autonomous_vm_cluster.test_autonomous_vm_cluster.id | ||
certificate_generation_type = "BYOC" | ||
certificate_id = var.avm_certificate_id | ||
} | ||
|
5 changes: 5 additions & 0 deletions
5
examples/database/exadata_cc/adbd/autonomous_vm_cluster_ssl_certificate_management.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resource "oci_database_autonomous_vm_cluster_ssl_certificate_management" "test_avm_db_mgmt_res"{ | ||
autonomous_vm_cluster_id = oci_database_autonomous_vm_cluster.test_autonomous_vm_cluster.id | ||
certificate_generation_type = "SYSTEM" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,8 @@ variable "compartment_ocid" { | |
} | ||
|
||
variable "ssh_public_key" { | ||
} | ||
|
||
variable "avm_certificate_id"{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. | ||
// Licensed under the Mozilla Public License v2.0 | ||
|
||
|
||
variable "tenancy_ocid" {} | ||
variable "user_ocid" {} | ||
variable "fingerprint" {} | ||
variable "private_key_path" {} | ||
variable "region" {} | ||
variable "topic_id" {} | ||
variable "compartment_ocid" {} | ||
|
||
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 | ||
} | ||
|
||
resource "oci_identity_tag_namespace" "tag-namespace1" { | ||
compartment_id = var.tenancy_ocid | ||
description = "example tag namespace" | ||
name = "examples-tag-namespace-all" | ||
is_retired = false | ||
} | ||
|
||
resource "oci_identity_tag" "tag1" { | ||
description = "example tag" | ||
name = "example-tag" | ||
tag_namespace_id = oci_identity_tag_namespace.tag-namespace1.id | ||
is_cost_tracking = false | ||
is_retired = false | ||
} | ||
|
||
variable "news_frequency" { | ||
default = "WEEKLY" | ||
} | ||
|
||
variable "news_locale" { | ||
default = "EN" | ||
} | ||
|
||
variable "news_report_name" { | ||
default = "Example_Report" | ||
} | ||
|
||
variable "news_report_description" { | ||
default = "Example Report Description" | ||
} | ||
|
||
variable "cp_resources" { | ||
default = [ "HOST","DATABASE","EXADATA" ] | ||
} | ||
|
||
|
||
variable "news_report_defined_tags_value" { | ||
default = "value" | ||
} | ||
|
||
variable "news_report_freeform_tags" { | ||
default = { "bar-key" = "value" } | ||
} | ||
|
||
variable "resource_status" { | ||
default = "ENABLED" | ||
} | ||
|
||
// To Create a News Report | ||
resource "oci_opsi_news_report" "test_news_report" { | ||
compartment_id = var.compartment_ocid | ||
locale = var.news_locale | ||
name = var.news_report_name | ||
description = var.news_report_description | ||
news_frequency = var.news_frequency | ||
content_types { | ||
capacity_planning_resources = var.cp_resources | ||
} | ||
ons_topic_id = var.topic_id | ||
freeform_tags = var.news_report_freeform_tags | ||
status = var.resource_status | ||
} | ||
|
||
variable "news_report_state" { | ||
default = ["ACTIVE"] | ||
} | ||
|
||
variable "news_report_status" { | ||
default = ["ENABLED"] | ||
} | ||
|
||
// List news reports | ||
data "oci_opsi_news_reports" "test_news_reports" { | ||
compartment_id = var.compartment_ocid | ||
state = var.news_report_state | ||
status = var.news_report_status | ||
} | ||
|
||
// Get a news report | ||
data "oci_opsi_news_report" "test_news_report" { | ||
news_report_id = oci_opsi_news_report.test_news_report.id | ||
} | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
examples/zips/web_application_acceleration_and_security.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.