-
Notifications
You must be signed in to change notification settings - Fork 687
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
335 changed files
with
16,016 additions
and
445 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
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 @@ | ||
# Overview | ||
This is a Terraform configuration that creates the `computecloudatcustomer` service on Oracle Cloud Infrastructure. | ||
|
||
The Terraform code is used to create a Resource Manager stack, that creates the required resources and configures the application on the created resources. | ||
## Magic Button | ||
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/computecloudatcustomer.zip) |
137 changes: 137 additions & 0 deletions
137
examples/computecloudatcustomer/ccc_infrastructure_example/ccc_infrastructure.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,137 @@ | ||
// 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 "compartment_id" {} | ||
|
||
variable "ccc_infrastructure_access_level" { | ||
default = "RESTRICTED" | ||
} | ||
|
||
variable "ccc_infrastructure_compartment_id_in_subtree" { | ||
default = false | ||
} | ||
|
||
variable "ccc_infrastructure_connection_details" { | ||
default = "connectionDetails" | ||
} | ||
|
||
variable "ccc_infrastructure_connection_state" { | ||
default = "REJECT" | ||
} | ||
|
||
variable "ccc_infrastructure_defined_tags_value" { | ||
default = "value" | ||
} | ||
|
||
variable "ccc_infrastructure_description" { | ||
default = "Datacenter 231" | ||
} | ||
|
||
variable "ccc_infrastructure_display_name" { | ||
default = "example_cccInfrastructure" | ||
} | ||
|
||
variable "ccc_infrastructure_display_name_contains" { | ||
default = "displayNameContains" | ||
} | ||
|
||
variable "ccc_infrastructure_freeform_tags" { | ||
default = { "bar-key" = "value" } | ||
} | ||
|
||
variable "ccc_infrastructure_state" { | ||
default = "ACTIVE" | ||
} | ||
|
||
|
||
|
||
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_compute_cloud_at_customer_ccc_upgrade_schedule" "test_ccc_upgrade_schedule" { | ||
compartment_id = var.compartment_id | ||
display_name = "example_cccUpgradeSchedule" | ||
events { | ||
description = "description" | ||
schedule_event_duration = "PT49H" | ||
schedule_event_recurrences = "FREQ=MONTHLY;INTERVAL=3;" | ||
time_start = "2023-09-09T16:10:25Z" | ||
} | ||
} | ||
|
||
resource "oci_core_vcn" "test_vcn" { | ||
cidr_block = "10.0.0.0/16" | ||
compartment_id = var.compartment_id | ||
lifecycle { | ||
ignore_changes = ["defined_tags"] | ||
} | ||
} | ||
|
||
resource "oci_core_subnet" "test_subnet" { | ||
cidr_block = "10.0.0.0/24" | ||
compartment_id = var.compartment_id | ||
lifecycle { | ||
ignore_changes = ["defined_tags"] | ||
} | ||
vcn_id = oci_core_vcn.test_vcn.id | ||
} | ||
|
||
variable defined_tag_namespace_name { default = "" } | ||
resource "oci_identity_tag_namespace" "tag-namespace1" { | ||
#Required | ||
compartment_id = var.compartment_id | ||
description = "example tag namespace" | ||
name = "${var.defined_tag_namespace_name != "" ? var.defined_tag_namespace_name : "example-tag-namespace-all"}" | ||
|
||
is_retired = false | ||
lifecycle { | ||
ignore_changes = [] | ||
} | ||
} | ||
|
||
resource "oci_identity_tag" "tag1" { | ||
#Required | ||
description = "example tag" | ||
name = "example-tag" | ||
tag_namespace_id = oci_identity_tag_namespace.tag-namespace1.id | ||
|
||
is_retired = false | ||
} | ||
|
||
resource "oci_compute_cloud_at_customer_ccc_infrastructure" "test_ccc_infrastructure" { | ||
#Required | ||
compartment_id = var.compartment_id | ||
display_name = var.ccc_infrastructure_display_name | ||
subnet_id = oci_core_subnet.test_subnet.id | ||
|
||
#Optional | ||
ccc_upgrade_schedule_id = oci_compute_cloud_at_customer_ccc_upgrade_schedule.test_ccc_upgrade_schedule.id | ||
connection_details = var.ccc_infrastructure_connection_details | ||
connection_state = var.ccc_infrastructure_connection_state | ||
defined_tags = map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", var.ccc_infrastructure_defined_tags_value) | ||
description = var.ccc_infrastructure_description | ||
freeform_tags = var.ccc_infrastructure_freeform_tags | ||
} | ||
|
||
data "oci_compute_cloud_at_customer_ccc_infrastructures" "test_ccc_infrastructures" { | ||
|
||
#Optional | ||
access_level = var.ccc_infrastructure_access_level | ||
ccc_infrastructure_id = oci_compute_cloud_at_customer_ccc_infrastructure.test_ccc_infrastructure.id | ||
compartment_id = var.compartment_id | ||
compartment_id_in_subtree = var.ccc_infrastructure_compartment_id_in_subtree | ||
display_name = var.ccc_infrastructure_display_name | ||
display_name_contains = var.ccc_infrastructure_display_name_contains | ||
state = var.ccc_infrastructure_state | ||
} | ||
|
119 changes: 119 additions & 0 deletions
119
examples/computecloudatcustomer/ccc_upgrade_schedule_example/ccc_upgrade_schedule.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,119 @@ | ||
// 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 "compartment_id" {} | ||
|
||
variable "ccc_upgrade_schedule_access_level" { | ||
default = "RESTRICTED" | ||
} | ||
|
||
variable "ccc_upgrade_schedule_compartment_id_in_subtree" { | ||
default = false | ||
} | ||
|
||
variable "ccc_upgrade_schedule_defined_tags_value" { | ||
default = "value" | ||
} | ||
|
||
variable "ccc_upgrade_schedule_description" { | ||
default = "Month-start upgrade window" | ||
} | ||
|
||
variable "ccc_upgrade_schedule_display_name" { | ||
default = "example_cccUpgradeSchedule" | ||
} | ||
|
||
variable "ccc_upgrade_schedule_display_name_contains" { | ||
default = "displayNameContains" | ||
} | ||
|
||
variable "ccc_upgrade_schedule_events_description" { | ||
default = "Month-start upgrade window" | ||
} | ||
|
||
variable "ccc_upgrade_schedule_events_schedule_event_duration" { | ||
default = "P2DT6H" | ||
} | ||
|
||
variable "ccc_upgrade_schedule_events_schedule_event_recurrences" { | ||
default = "FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1" | ||
} | ||
|
||
variable "ccc_upgrade_schedule_events_time_start" { | ||
default = "2024-01-25T22:00:00Z" | ||
} | ||
|
||
variable "ccc_upgrade_schedule_freeform_tags" { | ||
default = { "bar-key" = "value" } | ||
} | ||
|
||
variable "ccc_upgrade_schedule_state" { | ||
default = "ACTIVE" | ||
} | ||
|
||
|
||
|
||
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 | ||
} | ||
|
||
variable defined_tag_namespace_name { default = "" } | ||
resource "oci_identity_tag_namespace" "tag-namespace1" { | ||
#Required | ||
compartment_id = var.compartment_id | ||
description = "example tag namespace" | ||
name = "${var.defined_tag_namespace_name != "" ? var.defined_tag_namespace_name : "example-tag-namespace-all"}" | ||
|
||
is_retired = false | ||
} | ||
|
||
resource "oci_identity_tag" "tag1" { | ||
#Required | ||
description = "example tag" | ||
name = "example-tag" | ||
tag_namespace_id = oci_identity_tag_namespace.tag-namespace1.id | ||
|
||
is_retired = false | ||
} | ||
|
||
resource "oci_compute_cloud_at_customer_ccc_upgrade_schedule" "test_ccc_upgrade_schedule" { | ||
#Required | ||
compartment_id = var.compartment_id | ||
display_name = var.ccc_upgrade_schedule_display_name | ||
events { | ||
#Required | ||
description = var.ccc_upgrade_schedule_events_description | ||
schedule_event_duration = var.ccc_upgrade_schedule_events_schedule_event_duration | ||
time_start = var.ccc_upgrade_schedule_events_time_start | ||
|
||
#Optional | ||
schedule_event_recurrences = var.ccc_upgrade_schedule_events_schedule_event_recurrences | ||
} | ||
|
||
#Optional | ||
defined_tags = map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", var.ccc_upgrade_schedule_defined_tags_value) | ||
description = var.ccc_upgrade_schedule_description | ||
freeform_tags = var.ccc_upgrade_schedule_freeform_tags | ||
} | ||
|
||
data "oci_compute_cloud_at_customer_ccc_upgrade_schedules" "test_ccc_upgrade_schedules" { | ||
|
||
#Optional | ||
access_level = var.ccc_upgrade_schedule_access_level | ||
ccc_upgrade_schedule_id = oci_compute_cloud_at_customer_ccc_upgrade_schedule.test_ccc_upgrade_schedule.id | ||
compartment_id = var.compartment_id | ||
compartment_id_in_subtree = var.ccc_upgrade_schedule_compartment_id_in_subtree | ||
display_name = var.ccc_upgrade_schedule_display_name | ||
display_name_contains = var.ccc_upgrade_schedule_display_name_contains | ||
state = var.ccc_upgrade_schedule_state | ||
} | ||
|
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,4 @@ | ||
# Overview | ||
This is a Terraform configuration that creates the `computecloudatcustomer` service on Oracle Cloud Infrastructure. | ||
|
||
The Terraform code is used to create a Resource Manager stack, that creates the required resources and configures the application on the created resources. |
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.