Skip to content

Commit 8ec8ffd

Browse files
authored
Merge pull request #1002 from terraform-providers/release_merge_v3.68.0
Candidate for release_v3.68.0
2 parents e50de7c + b3a1550 commit 8ec8ffd

File tree

125 files changed

+3290
-393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+3290
-393
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
## 3.68.0 (Unreleased)
2+
3+
### Added
4+
- Support for creating DB from backup in DBAAS
5+
- Support for OCI WAF version 1.2
6+
- Support for WAF URL in `oci_oce_oce_instance` for disaster recovery
7+
28
## 3.67.0 (March 19, 2020)
39

410
### Added

examples/database/db_systems/db_exadata/resources.tf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,25 @@ resource "oci_database_database" "test_database" {
7777
db_home_id = "${data.oci_database_db_homes.db_homes.db_homes.0.db_home_id}"
7878
source = "NONE"
7979
}
80+
81+
resource "oci_database_backup" "test_backup" {
82+
depends_on = ["oci_database_db_system.test_db_system"]
83+
database_id = "${oci_database_db_system.test_db_system.db_home.0.database.0.id}"
84+
display_name = "FirstBackup"
85+
}
86+
87+
resource "oci_database_database" "test_database_backup" {
88+
#Required
89+
database {
90+
backup_id = "${oci_database_backup.test_backup.id}"
91+
backup_tde_password = "${var.db_admin_password}"
92+
admin_password = "${var.db_admin_password}"
93+
db_name = "TFdb3Exa"
94+
character_set = "${var.character_set}"
95+
ncharacter_set = "${var.n_character_set}"
96+
db_workload = "${var.db_workload}"
97+
}
98+
99+
db_home_id = "${data.oci_database_db_homes.db_homes.db_homes.0.db_home_id}"
100+
source = "DB_BACKUP"
101+
}

examples/oce/main.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ resource "oci_oce_oce_instance" "test_oce_instance" {
3030
object_storage_namespace = "${var.tenancy_name}"
3131
tenancy_id = "${var.tenancy_ocid}"
3232
tenancy_name = "${var.tenancy_name}"
33+
34+
#optional
35+
freeform_tags = "${map("freeformkey", "freeformvalue")}"
36+
description = "description"
37+
instance_usage_type = "NONPRIMARY"
38+
waf_primary_domain = "oracle.com"
3339
}
3440

3541
data "oci_oce_oce_instances" "test_oce_instances" {

examples/waas/waas_full.tf

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,35 @@ resource "oci_waas_waas_policy" "test_waas_policy" {
163163
is_https_forced = true
164164
is_origin_compression_enabled = true
165165
is_response_buffering_enabled = true
166+
is_sni_enabled = true
167+
websocket_path_prefixes = ["/url1"]
166168
tls_protocols = ["TLS_V1_1"]
169+
170+
health_checks = {
171+
is_enabled = true
172+
is_response_text_check_enabled = true
173+
expected_response_code_group = ["2XX"]
174+
expected_response_text = "testResponseText"
175+
176+
headers = {
177+
"Host" = "oracle.com"
178+
"User-Agent" = "Oracle-TerraformProvider"
179+
}
180+
181+
method = "GET"
182+
path = "/testpath"
183+
timeout_in_seconds = 10
184+
unhealthy_threshold = 5
185+
interval_in_seconds = 10
186+
healthy_threshold = 2
187+
}
188+
189+
load_balancing_method = {
190+
method = "STICKY_COOKIE"
191+
name = "name2"
192+
domain = "example.com"
193+
expiration_time_in_seconds = 10
194+
}
167195
}
168196

169197
timeouts {
@@ -195,6 +223,19 @@ resource "oci_waas_waas_policy" "test_waas_policy" {
195223
bypass_challenges = ["JS_CHALLENGE"]
196224
redirect_response_code = "FOUND"
197225
redirect_url = "http://192.168.0.3"
226+
captcha_footer = "captchaFooter"
227+
captcha_header = "captchaHeader"
228+
captcha_submit_label = "captchaSubmitLabel"
229+
captcha_title = "captchaTitle"
230+
231+
response_header_manipulation = {
232+
#Required
233+
action = "EXTEND_HTTP_RESPONSE_HEADER"
234+
header = "header"
235+
236+
#Optional
237+
value = "value"
238+
}
198239
}
199240

200241
address_rate_limiting {
@@ -243,6 +284,11 @@ resource "oci_waas_waas_policy" "test_waas_policy" {
243284
#Optional
244285
action = "DETECT"
245286
id = "${oci_waas_custom_protection_rule.test_custom_protection_rule.id}"
287+
288+
exclusions = {
289+
exclusions = ["example.com"]
290+
target = "REQUEST_COOKIES"
291+
}
246292
}
247293

248294
device_fingerprint_challenge {
@@ -312,6 +358,17 @@ resource "oci_waas_waas_policy" "test_waas_policy" {
312358
#Optional
313359
action = "DETECT"
314360
action_expiration_in_seconds = 10
361+
are_redirects_challenged = true
362+
is_nat_enabled = true
363+
364+
criteria = {
365+
#Required
366+
condition = "URL_IS"
367+
value = "/public"
368+
369+
#Optional
370+
is_case_sensitive = true
371+
}
315372

316373
challenge_settings {
317374
#Optional
@@ -351,8 +408,11 @@ resource "oci_waas_waas_policy" "test_waas_policy" {
351408

352409
whitelists {
353410
#Required
354-
addresses = ["192.168.127.127", "192.168.127.128"]
355-
name = "whitelist_name"
411+
name = "whitelist_name"
412+
413+
#Optional
414+
addresses = ["192.168.127.127", "192.168.127.128"]
415+
address_lists = ["${oci_waas_address_list.test_address_list.id}`}"]
356416
}
357417
}
358418
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce
77
github.com/hashicorp/terraform v0.12.4-0.20190628193153-a74738cd35fc
88
github.com/mitchellh/cli v1.0.0
9-
github.com/oracle/oci-go-sdk v17.0.0+incompatible
9+
github.com/oracle/oci-go-sdk v17.1.0+incompatible
1010
github.com/stretchr/objx v0.1.1 // indirect
1111
github.com/stretchr/testify v1.3.0
1212
gopkg.in/yaml.v2 v2.2.2

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ github.com/oracle/oci-go-sdk v16.0.0+incompatible h1:4BbhAM6wz7u9vtYrBMCPeQ2oRV9
362362
github.com/oracle/oci-go-sdk v16.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
363363
github.com/oracle/oci-go-sdk v17.0.0+incompatible h1:VueI9WISwu2+GwYd2WzuFO+M7ufSnpA707MooU+8xNs=
364364
github.com/oracle/oci-go-sdk v17.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
365+
github.com/oracle/oci-go-sdk v17.1.0+incompatible h1:jGo2O7T1wFAI+wh7gI1KYcYACCtWknACHQdg1vDg2/Y=
366+
github.com/oracle/oci-go-sdk v17.1.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
365367
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58 h1:m3CEgv3ah1Rhy82L+c0QG/U3VyY1UsvsIdkh0/rU97Y=
366368
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
367369
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=

oci/database_backup_resource.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ func DatabaseBackupResource() *schema.Resource {
5959
Type: schema.TypeString,
6060
Computed: true,
6161
},
62+
"shape": {
63+
Type: schema.TypeString,
64+
Computed: true,
65+
},
6266
"state": {
6367
Type: schema.TypeString,
6468
Computed: true,
@@ -220,6 +224,10 @@ func (s *DatabaseBackupResourceCrud) SetData() error {
220224
s.D.Set("lifecycle_details", *s.Res.LifecycleDetails)
221225
}
222226

227+
if s.Res.Shape != nil {
228+
s.D.Set("shape", *s.Res.Shape)
229+
}
230+
223231
s.D.Set("state", s.Res.LifecycleState)
224232

225233
if s.Res.TimeEnded != nil {

oci/database_backup_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ func TestDatabaseBackupResource_basic(t *testing.T) {
8585
resource.TestCheckResourceAttrSet(datasourceName, "backups.0.database_size_in_gbs"),
8686
resource.TestCheckResourceAttr(datasourceName, "backups.0.display_name", "Monthly Backup"),
8787
resource.TestCheckResourceAttrSet(datasourceName, "backups.0.id"),
88+
resource.TestCheckResourceAttrSet(datasourceName, "backups.0.shape"),
8889
resource.TestCheckResourceAttrSet(datasourceName, "backups.0.state"),
8990
resource.TestCheckResourceAttrSet(datasourceName, "backups.0.time_ended"),
9091
resource.TestCheckResourceAttrSet(datasourceName, "backups.0.time_started"),

oci/database_backups_data_source.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ func (s *DatabaseBackupsDataSourceCrud) SetData() error {
126126
backup["lifecycle_details"] = *r.LifecycleDetails
127127
}
128128

129+
if r.Shape != nil {
130+
backup["shape"] = *r.Shape
131+
}
132+
129133
backup["state"] = r.LifecycleState
130134

131135
if r.TimeEnded != nil {

0 commit comments

Comments
 (0)