-
Notifications
You must be signed in to change notification settings - Fork 83
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
Initial IPAM support #13
Conversation
There was a copy/paste bug in some unittests which caused the destruction tests to be skipped.
Fixing some compilation & fmt error in the terragen code (which automatically generates the resource code & documentation for new resources) Also adding the code for import support to terragen
Adding support for ip_pool and ip_block resources
nsxt/resource_nsxt_ip_block.go
Outdated
"net/http" | ||
) | ||
|
||
// formatLogicalRouterRollbackError defines the verbose error when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy paste error here
nsxt/resource_nsxt_ip_block.go
Outdated
old_subnets := old_data.([]interface{}) | ||
new_subnets := new_data.([]interface{}) | ||
// Go over the new subnets and check which should be created new and which was modified | ||
log.Printf("[DEBUG] DEBUG ADIT subnets changed?\n old %#v\n new %#v", old_subnets, new_subnets) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets remove this (and below)
nsxt/resource_nsxt_ip_block.go
Outdated
Optional: true, | ||
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"id": &schema.Schema{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to understand where these ids are used.. if other resources could be dependent on these, maybe it would be preferable to expose these as separate objects?
Sync vendor with the new sdk code
Update terragen
Fix destruction test in unittests
Adding support for ip_pool and ip_block resources
return fmt.Errorf("Unexpected status returned during IpBlockSubnet create: %v", resp.StatusCode) | ||
} | ||
d.SetId(ipBlockSubnet.Id) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if d.Set("block_id", blockId) here might work around the nsx bug (won't work for read though, not sure how bad this is)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the read is always called after create/update I don't think it will help. But anyway we will not fully support IPAM in this NSX version, and it will be fixed for the next one.
Adding support for ip_pool and ip_block resources