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

Zonewizard #67

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Zonewizard #67

wants to merge 10 commits into from

Conversation

poddm
Copy link
Contributor

@poddm poddm commented Aug 7, 2023

Zone wizard resources:

  • cloudstack_zone
  • cloudstack_pod
  • cloudstack_cluster
  • cloudstack_physical_network
  • cloudstack_traffic_type
  • cloudstack_storage_pool
  • cloudstack_secondary_storage
  • cloudstack_vlan_ip_range
  • cloudstack_network_service_provider_state

Also, updated data source cloudstack_zone to work with the uuid vs. name (as the id).

--
Note -

  1. this requires the latest cloudstack-go client.
  1. traffic_type is fully idempotent.

@poddm poddm mentioned this pull request Aug 7, 2023
@poddm poddm marked this pull request as ready for review August 18, 2023 20:52
@harikrishna-patnala harikrishna-patnala added this to the v0.5.0 milestone Sep 13, 2023
@@ -94,6 +94,7 @@ func Provider() terraform.ResourceProvider {
ResourcesMap: map[string]*schema.Resource{
"cloudstack_affinity_group": resourceCloudStackAffinityGroup(),
"cloudstack_autoscale_vm_profile": resourceCloudStackAutoScaleVMProfile(),
"cloudstack_cluster": resourceCloudStackCluster(),
Copy link
Contributor

Choose a reason for hiding this comment

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

great work @poddm. I'll try testing these changes.

Do we also need to add "cloudstack_zone" here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@harikrishna-patnala - cloudstack_zone was partially added in a previous merge. I extended the resource to support all of the fields and updated the ID from name to uuid.

@poddm
Copy link
Contributor Author

poddm commented Nov 28, 2023

Added additional resources

  1. cloudstack_vlan_ip_range
  2. cloudstack_network_service_provider_state

This also requires the following cloudstack-go change. apache/cloudstack-go#75

@kiranchavala
Copy link
Collaborator

@poddm could you please help in resolving the conflicts

@poddm
Copy link
Contributor Author

poddm commented Apr 26, 2024

@poddm could you please help in resolving the conflicts

Update - I'd still like to get these merged once the cloudstack SDK is updated.

cloudstack go SDK changes

@poddm poddm mentioned this pull request Apr 26, 2024
@rohityadavcloud
Copy link
Member

@poddm can you address conflicts on the PR?

@rohityadavcloud
Copy link
Member

@poddm can you review/rebase the PR & look at failing tests. Thanks.

@poddm
Copy link
Contributor Author

poddm commented Oct 29, 2024

@rohityadavcloud @vishesh92. This is now rebased and updated to the latest cloudstack library.

the ACC tests are failing here. Is there a way to bypass this storage pool check in the simulator?

=== RUN   TestAccCloudStackStoragePool_basic
    resource_cloudstack_storage_pool_test.go:29: Step 1/2 error: Error running apply: exit status 1
        
        Error: CloudStack API error 530 (CSExceptionErrorCode: 9999): Failed to add data store: No host up to associate a storage pool with in cluster 1
        
          with cloudstack_storage_pool.test,
          on terraform_plugin_test.tf line 37, in resource "cloudstack_storage_pool" "test":
          37: resource "cloudstack_storage_pool" "test" {
        
--- FAIL: TestAccCloudStackStoragePool_basic (53.68s)
FAIL
FAIL    github.com/terraform-providers/terraform-provider-cloudstack/cloudstack 55.537s
FAIL
resource "cloudstack_storage_pool" "test" {
	name         = "acc_primarystorage1"
	url          = "nfs://10.147.28.6/export/home/sandbox/primary11"
	zone_id      = cloudstack_zone.test.id
	cluster_id   = cloudstack_cluster.test.id
	pod_id       = cloudstack_pod.test.id
	scope        = "CLUSTER"
	hypervisor   = "Simulator"
	state        = "Maintenance"
	tags         = "XYZ,123,456"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants