Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make OCID property exportable after Oracle VMCluster creation #27785

Merged
merged 4 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions internal/services/oracle/cloud_vm_cluster_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type CloudVmClusterResourceModel struct {
DataStoragePercentage int64 `tfschema:"data_storage_percentage"`
IsLocalBackupEnabled bool `tfschema:"local_backup_enabled"`
IsSparseDiskgroupEnabled bool `tfschema:"sparse_diskgroup_enabled"`
Ocid string `tfschema:"ocid"`
TimeZone string `tfschema:"time_zone"`
}

Expand Down Expand Up @@ -253,6 +254,11 @@ func (CloudVmClusterResource) Attributes() map[string]*pluginsdk.Schema {
Type: pluginsdk.TypeString,
Computed: true,
},

"ocid": {
Type: pluginsdk.TypeString,
Computed: true,
},
}
}

Expand Down Expand Up @@ -437,6 +443,7 @@ func (CloudVmClusterResource) Read() sdk.ResourceFunc {
state.ClusterName = pointer.From(props.ClusterName)
state.DataCollectionOptions = FlattenDataCollectionOptions(props.DataCollectionOptions)
state.DataStoragePercentage = pointer.From(props.DataStoragePercentage)
state.Ocid = pointer.From(props.Ocid)
stephybun marked this conversation as resolved.
Show resolved Hide resolved
state.IsLocalBackupEnabled = pointer.From(props.IsLocalBackupEnabled)
state.IsSparseDiskgroupEnabled = pointer.From(props.IsSparseDiskgroupEnabled)
state.TimeZone = pointer.From(props.TimeZone)
Expand Down
6 changes: 4 additions & 2 deletions website/docs/r/oracle_cloud_vm_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ The following arguments are supported:

* `hostname` - (Required) The hostname for the Cloud VM Cluster without suffix.

* `hostname_actual` - The hostname for the Cloud VM Cluster with suffix.

* `license_model` - (Required) The Oracle license model that applies to the Cloud VM Cluster, either `BringYourOwnLicense` or `LicenseIncluded`.

* `location` - (Required) The Azure Region where the Cloud VM Cluster should exist.
Expand Down Expand Up @@ -149,6 +147,10 @@ In addition to the Arguments listed above - the following Attributes are exporte

* `id` - The ID of the Cloud VM Cluster.

* `hostname_actual` - The hostname for the Cloud VM Cluster with suffix.

* `ocid` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster.

## Timeouts

The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions:
Expand Down
Loading