Skip to content

Commit 9c91ca7

Browse files
committed
added availability zone
1 parent 1d844d2 commit 9c91ca7

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

internal/service/odb/network.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ func (r *resourceNetwork) Schema(ctx context.Context, req resource.SchemaRequest
7575
stringplanmodifier.RequiresReplace(),
7676
},
7777
},
78+
names.AttrAvailabilityZone: schema.StringAttribute{
79+
Optional: true,
80+
Computed: true,
81+
PlanModifiers: []planmodifier.String{
82+
stringplanmodifier.RequiresReplace(),
83+
stringplanmodifier.UseStateForUnknown(),
84+
},
85+
Description: "The name of the Availability Zone (AZ) where the odb network is located. Changing this will force terraform to create new resource",
86+
},
7887
"availability_zone_id": schema.StringAttribute{
7988
Required: true,
8089
PlanModifiers: []planmodifier.String{
@@ -650,6 +659,7 @@ func FindOracleDBNetworkResourceByID(ctx context.Context, conn *odb.Client, id s
650659
type odbNetworkResourceModel struct {
651660
framework.WithRegionModel
652661
DisplayName types.String `tfsdk:"display_name"`
662+
AvailabilityZone types.String `tfsdk:"availability_zone"`
653663
AvailabilityZoneId types.String `tfsdk:"availability_zone_id"`
654664
ClientSubnetCidr types.String `tfsdk:"client_subnet_cidr"`
655665
BackupSubnetCidr types.String `tfsdk:"backup_subnet_cidr"`

website/docs/r/odb_network.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ The following arguments are required:
5555
The following arguments are optional:
5656

5757
* `custom_domain_name` - (Optional) The name of the custom domain that the network is located. Custom_domain_name and default_dns_prefix both can't be given. Changing this will force terraform to create new resource.
58+
* `availability_zone` - (Optional) The name of the Availability Zone (AZ) where the odb network is located. Changing this will force terraform to create new resource. Make sure availability_zone maps correctly with availability_zone_id.
5859
* `s3_policy_document` - (Optional) Specifies the endpoint policy for Amazon S3 access from the ODB network.
5960
* `default_dns_prefix` - (Optional) The default DNS prefix for the network resource. Changing this will force terraform to create new resource. Changing this will force terraform to create new resource.
6061
* `tags` - (Optional) A map of tags to assign to the exadata infrastructure. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.

0 commit comments

Comments
 (0)