Skip to content

Commit

Permalink
rebased and added examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishekism9450 committed Jan 13, 2023
1 parent 3b223e0 commit be38487
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
32 changes: 32 additions & 0 deletions examples/ndb/database_snapshot/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
terraform{
required_providers {
nutanix = {
source = "nutanix/nutanix"
version = "1.8.0"
}
}
}

#definig nutanix configuration
provider "nutanix"{
ndb_username = var.ndb_username
ndb_password = var.ndb_password
ndb_endpoint = var.ndb_endpoint
insecure = true
}

// resource to create snapshot with time machine id

resource "nutanix_ndb_database_snapshot" "name" {
time_machine_id = "{{ tms_ID }}"
name = "test-snap"
remove_schedule_in_days = 1
}

// resource to craete snapshot with time machine name

resource "nutanix_ndb_database_snapshot" "name" {
time_machine_name = "{{ tms_name }}"
name = "test-snap"
remove_schedule_in_days = 1
}
4 changes: 4 additions & 0 deletions examples/ndb/database_snapshot/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#define values to the variables to be used in terraform file_username = "admin"
ndb_password = "password"
ndb_endpoint = "10.xx.xx.xx"
ndb_username = "username"
10 changes: 10 additions & 0 deletions examples/ndb/database_snapshot/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#define the type of variables to be used in terraform file
variable "ndb_username" {
type = string
}
variable "ndb_password" {
type = string
}
variable "ndb_endpoint" {
type = string
}

0 comments on commit be38487

Please sign in to comment.