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

Project resource and datasources #121

Merged
merged 8 commits into from
May 19, 2020
Merged

Project resource and datasources #121

merged 8 commits into from
May 19, 2020

Conversation

PacoDw
Copy link
Contributor

@PacoDw PacoDw commented May 6, 2020

Added:

  • nutanix_project resource.
  • nutanix_project resource acceptance testing.
  • nutanix_project resource website documentation.
  • nutanix_project singular data source.
  • nutanix_project singular data source acceptance testing.
  • nutanix_project singular data source website documentation.
  • nutanix_projects plural data source.
  • nutanix_projects plural data source acceptance testing.
  • nutanix_projects plural data source website documentation.

Example Usage

resource "nutanix_subnet" "subnet" {
  cluster_uuid       = "<YOUR_CLUSTER_ID>"
  name               = "sunet_test_name"
  description        = "Description of my unit test VLAN"
  vlan_id            = 31
  subnet_type        = "VLAN"
  subnet_ip          = "10.250.140.0"
  default_gateway_ip = "10.250.140.1"
  prefix_length      = 24

  dhcp_options = {
    boot_file_name   = "bootfile"
    domain_name      = "nutanix"
    tftp_server_name = "10.250.140.200"
  }

  dhcp_domain_name_server_list = ["8.8.8.8", "4.2.2.2"]
  dhcp_domain_search_list      = ["terraform.nutanix.com", "terraform.unit.test.com"]
}

resource "nutanix_project" "project_test" {
  name        = "my-project"
  description = "This is my project"

  categories {
    name  = "Environment"
    value = "Staging"
  }

  resource_domain {
    resources {
      limit         = 4
      resource_type = "STORAGE"
    }
  }

  default_subnet_reference {
    uuid = nutanix_subnet.subnet.metadata.uuid
  }

  api_version = "3.1"
}

data "nutanix_project" "test" {
    project_id = nutanix_project.project_test.id
}

data "nutanix_projects" "test" {
    depends_on = ["nutanix_project.test"]
}

closes #65

@ghost ghost added the size/XXL label May 6, 2020
@PacoDw PacoDw mentioned this pull request May 6, 2020
@marinsalinas
Copy link
Contributor

Could you provide a link to the API documentation to compare the Terraform schema vs the API schema?

@PacoDw
Copy link
Contributor Author

PacoDw commented May 12, 2020

Copy link
Contributor

@marinsalinas marinsalinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Could you provide the screenshot of the ACCTest Passing?

nutanix/data_source_nutanix_project_test.go Show resolved Hide resolved
@PacoDw
Copy link
Contributor Author

PacoDw commented May 15, 2020

@marinsalinas the test cases for the resource and datasources

projectpass

projectpass2

projectpass3

projectpass4

@marinsalinas marinsalinas merged commit 8265add into master May 19, 2020
@marinsalinas marinsalinas deleted the project-rs branch May 19, 2020 15:50
yannickstruyf3 pushed a commit to yannickstruyf3/terraform-provider-nutanix that referenced this pull request Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project Support
2 participants