Skip to content

Commit 3199fc7

Browse files
ccushingcodycushing
authored andcommitted
Add missing display name updates to security lists and route tables
* add important notice in subnets
1 parent 21a2f2f commit 3199fc7

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

docs/resources/core/subnet.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ The following arguments are supported:
4646
* `display_name` - (Optional) User-friendly name. Does not have to be unique, and it's changeable.
4747
* `prohibit_public_ip_on_vnic` - (Optional) Whether VNICs within this subnet can have public IP. If it is allowed, VNICs created in the subnet will automatically be assigned public IP unless otherwise specified in the VNIC. If it is prohibited, VNICs in the subnet cannot have public IP address assigned. The default value is false if unspecified.
4848

49+
WARNING: With some exceptions, changing these properties in a plan after the resources has been created results in destruction and recreation of the resources and all dependent resources. Display name can be changed non-destructively.
50+
4951
## Attributes Reference
5052

5153
* `id` - The subnet's Oracle ID (OCID).

resource_obmcs_core_route_table.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ func (s *RouteTableResourceCrud) Get() (e error) {
154154

155155
func (s *RouteTableResourceCrud) Update() (e error) {
156156
opts := &baremetal.UpdateRouteTableOptions{}
157+
158+
if displayName, ok := s.D.GetOk("display_name"); ok {
159+
opts.DisplayName = displayName.(string)
160+
}
161+
157162
opts.RouteRules = s.buildRouteRules()
158163

159164
s.Res, e = s.Client.UpdateRouteTable(s.D.Id(), opts)

resource_obmcs_core_security_list.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ func (s *SecurityListResourceCrud) Get() (e error) {
219219
func (s *SecurityListResourceCrud) Update() (e error) {
220220
opts := &baremetal.UpdateSecurityListOptions{}
221221

222+
if displayName, ok := s.D.GetOk("display_name"); ok {
223+
opts.DisplayName = displayName.(string)
224+
}
225+
222226
if egress := s.buildEgressRules(); egress != nil {
223227
opts.EgressRules = egress
224228
}

0 commit comments

Comments
 (0)