Skip to content

Commit 0631249

Browse files
Merge pull request #996 from terraform-providers/release_gh
Merge v3.66.0 release into master
2 parents 12a9659 + 00da037 commit 0631249

File tree

81 files changed

+940
-79
lines changed

Some content is hidden

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

81 files changed

+940
-79
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
## 3.66.0 (Unreleased)
2+
3+
### Added
4+
- Support for budget alerts service integration with events service
5+
26
## 3.65.0 (March 04, 2020)
37

48
### Added

examples/budget/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ output "budgets" {
7777
resource "oci_budget_alert_rule" "test_alert_rule" {
7878
#Required
7979
budget_id = "${oci_budget_budget.test_budget.id}"
80-
recipients = "[email protected]"
8180
threshold = "100"
8281
threshold_type = "ABSOLUTE"
8382
type = "ACTUAL"
@@ -86,6 +85,7 @@ resource "oci_budget_alert_rule" "test_alert_rule" {
8685
description = "alertRuleDescription"
8786
display_name = "alertRule"
8887
message = "possible overspend"
88+
recipients = "[email protected]"
8989
}
9090

9191
data "oci_budget_alert_rules" "test_alert_rules" {

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 v15.8.0+incompatible
9+
github.com/oracle/oci-go-sdk v16.0.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
@@ -358,6 +358,8 @@ github.com/oracle/oci-go-sdk v15.7.0+incompatible h1:CkhSZ7dL9yB/rNbVX+MVFHojuMT
358358
github.com/oracle/oci-go-sdk v15.7.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
359359
github.com/oracle/oci-go-sdk v15.8.0+incompatible h1:SEJ4DBi6DUtCZH26hGtDhQiU3IfjuBFc7R4XjQ8w9DA=
360360
github.com/oracle/oci-go-sdk v15.8.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
361+
github.com/oracle/oci-go-sdk v16.0.0+incompatible h1:4BbhAM6wz7u9vtYrBMCPeQ2oRV9oaaqsHenErPvpQs4=
362+
github.com/oracle/oci-go-sdk v16.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
361363
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58 h1:m3CEgv3ah1Rhy82L+c0QG/U3VyY1UsvsIdkh0/rU97Y=
362364
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
363365
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=

oci/budget_alert_rule_resource.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ func BudgetAlertRuleResource() *schema.Resource {
2424
Required: true,
2525
ForceNew: true,
2626
},
27-
"recipients": {
28-
Type: schema.TypeString,
29-
Required: true,
30-
},
3127
"threshold": {
3228
Type: schema.TypeFloat,
3329
Required: true,
@@ -71,6 +67,10 @@ func BudgetAlertRuleResource() *schema.Resource {
7167
Optional: true,
7268
Computed: true,
7369
},
70+
"recipients": {
71+
Type: schema.TypeString,
72+
Optional: true,
73+
},
7474

7575
// Computed
7676
"state": {

oci/budget_alert_rule_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ var (
4141

4242
alertRuleRepresentation = map[string]interface{}{
4343
"budget_id": Representation{repType: Required, create: `${oci_budget_budget.test_budget.id}`},
44-
"recipients": Representation{repType: Required, create: `[email protected]`, update: `[email protected]`},
4544
"threshold": Representation{repType: Required, create: `100`, update: `200`},
4645
"threshold_type": Representation{repType: Required, create: `PERCENTAGE`, update: `ABSOLUTE`},
4746
"type": Representation{repType: Required, create: `ACTUAL`, update: `FORECAST`},
@@ -50,6 +49,7 @@ var (
5049
"display_name": Representation{repType: Optional, create: `displayName`, update: `displayName2`},
5150
"freeform_tags": Representation{repType: Optional, create: map[string]string{"Department": "Finance"}, update: map[string]string{"Department": "Accounting"}},
5251
"message": Representation{repType: Optional, create: `message`, update: `message2`},
52+
"recipients": Representation{repType: Optional, create: `[email protected]`, update: `[email protected]`},
5353
}
5454

5555
AlertRuleResourceDependencies = generateResourceFromRepresentationMap("oci_budget_budget", "test_budget", Required, Create, budgetRepresentationWithTargetCompartmentId) +
@@ -85,7 +85,6 @@ func TestBudgetAlertRuleResource_basic(t *testing.T) {
8585
generateResourceFromRepresentationMap("oci_budget_alert_rule", "test_alert_rule", Required, Create, alertRuleRepresentation),
8686
Check: resource.ComposeAggregateTestCheckFunc(
8787
resource.TestCheckResourceAttrSet(resourceName, "budget_id"),
88-
resource.TestCheckResourceAttr(resourceName, "recipients", "[email protected]"),
8988
resource.TestCheckResourceAttr(resourceName, "threshold", "100"),
9089
resource.TestCheckResourceAttr(resourceName, "threshold_type", "PERCENTAGE"),
9190
resource.TestCheckResourceAttr(resourceName, "type", "ACTUAL"),

oci/budget_alert_rules_data_source.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ func (s *BudgetAlertRulesDataSourceCrud) Get() error {
6767
}
6868

6969
if state, ok := s.D.GetOkExists("state"); ok {
70-
tmp := state.(string)
71-
request.LifecycleState = &tmp
70+
request.LifecycleState = oci_budget.ListAlertRulesLifecycleStateEnum(state.(string))
7271
}
7372

7473
request.RequestMetadata.RetryPolicy = getRetryPolicy(false, "budget")

oci/budget_budgets_data_source.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ func (s *BudgetBudgetsDataSourceCrud) Get() error {
7171
}
7272

7373
if state, ok := s.D.GetOkExists("state"); ok {
74-
tmp := state.(string)
75-
request.LifecycleState = &tmp
74+
request.LifecycleState = oci_budget.ListBudgetsLifecycleStateEnum(state.(string))
7675
}
7776

7877
if targetType, ok := s.D.GetOkExists("target_type"); ok {

oci/database_autonomous_database_resource_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,15 @@ var (
9999
"nsg_ids": Representation{repType: Optional, create: []string{`${oci_core_network_security_group.test_network_security_group.id}`}, update: []string{`${oci_core_network_security_group.test_network_security_group.id}`, `${oci_core_network_security_group.test_network_security_group2.id}`}},
100100
"private_endpoint_label": Representation{repType: Optional, create: `xlx4fcli`},
101101
"subnet_id": Representation{repType: Optional, create: `${oci_core_subnet.test_subnet.id}`},
102+
"timeouts": RepresentationGroup{Required, autonomousDatabasePrivateEndpointTimeoutsRepresentation},
102103
}), []string{"whitelisted_ips"})
103104

105+
autonomousDatabasePrivateEndpointTimeoutsRepresentation = map[string]interface{}{
106+
"create": Representation{repType: Required, create: `10m`},
107+
"update": Representation{repType: Required, create: `10m`},
108+
"delete": Representation{repType: Required, create: `10m`},
109+
}
110+
104111
AutonomousDatabasePrivateEndpointResourceDependencies = generateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", Required, Create, subnetRepresentation) +
105112
generateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", Required, Create, vcnRepresentation) +
106113
generateResourceFromRepresentationMap("oci_core_network_security_group", "test_network_security_group", Required, Create, networkSecurityGroupRepresentation) +

oci/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"log"
77
)
88

9-
const Version = "3.65.0"
9+
const Version = "3.66.0"
1010

1111
func PrintVersion() {
1212
log.Printf("[INFO] terraform-provider-oci %s\n", Version)

0 commit comments

Comments
 (0)