-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add vApp network resources and data sources #455
Merged
Merged
Changes from 116 commits
Commits
Show all changes
119 commits
Select commit
Hold shift + click to select a range
6585559
Add missing file
vbauzys e247d25
Merge branch 'master' of github.com:terraform-providers/terraform-pro…
vbauzys cf1e7c2
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys be6790f
Merge branch 'master' of github.com:terraform-providers/terraform-pro…
vbauzys 6f4c5cb
Merge branch 'master' of github.com:terraform-providers/terraform-pro…
vbauzys c73d402
Merge branch 'master' of github.com:terraform-providers/terraform-pro…
vbauzys 261d142
git push origin master
vbauzys c431d43
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 414b3bf
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 8b03ab8
Merge branch 'master' of github.com:terraform-providers/terraform-pro…
vbauzys 36c5487
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys db01eec
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 331e895
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys a85d555
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys e1996e3
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 9c63eec
Merge branch 'master' of github.com:terraform-providers/terraform-pro…
vbauzys 5073f6c
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys f0bdef3
git push origin master
vbauzys 24f169d
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 06b36d1
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 30d6a79
Merge branch 'master' of github.com:terraform-providers/terraform-pro…
vbauzys 0ca001f
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 8c9c7c4
git push origin master
vbauzys 4c8d081
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 206bc9f
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 48970bc
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys e7ef092
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys cb5659a
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 1e097fd
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys ae2d955
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 67f9230
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 867b991
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 7ec2137
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 3f3798b
Merge
vbauzys ec131aa
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys e985ac6
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 7bac78e
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys b299b2b
added new parameters and update function
vbauzys d027cc8
Added org network resource
vbauzys 2b81637
git push origin master
vbauzys 2bd657a
Cleanup after usage latest govcd
vbauzys 2b82082
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 9d3ed9d
bump govcd
vbauzys ebbbcee
cleanup
vbauzys d45b231
Add tests
vbauzys bb0639b
swtiching
vbauzys 5301c6f
bump govcd
vbauzys 218b30f
Added tests
vbauzys 47bb204
Improve testing and name handling
vbauzys eeba5f3
Improve testing and name handling
vbauzys 3543d7a
Added import functionality and tests
vbauzys 9c7f656
Add datasources and testes. Improved read functionality
vbauzys bdc1a4e
Add part of docs
vbauzys 4b50016
Fix
vbauzys 0049eda
Add part of docs
vbauzys be07503
Add data source docs
vbauzys d5a3b97
Improvements
vbauzys aa2198d
git push origin master
vbauzys eda9486
bump govcd
vbauzys 0c0dc77
fix after govcd changes
vbauzys 6316a5b
bump govcd missing part
vbauzys ef068bd
Merge branch 'master' into vapp-netw
vbauzys bb26c30
Improve comment
vbauzys 4137f26
Improve comment
vbauzys 49ef28c
Improve comment
vbauzys b785dcf
Fix module
vbauzys b9c3ea4
Removed default values for DNS
vbauzys de266cd
bump govcd version
vbauzys ca5c78b
Add change log
vbauzys 46d1e66
Improve docs
vbauzys cb7bb97
git push origin masterMerge branch 'master' of github.com:terraform-p…
vbauzys 03ced76
Merge branch 'master' into vapp-netw
vbauzys e47fc38
Improved docs
vbauzys 759c62d
Improved docs
vbauzys 62eb5a1
Small improvement
vbauzys 0b6855d
Add additional check for empty vApp network
vbauzys e706b4a
Refactor dhcp pool
vbauzys e923709
Improve error message
vbauzys 9f41ec2
Improve error message
vbauzys 470740e
Improve error message
vbauzys a15565c
Add missing descriptions
vbauzys be6c080
Rename org_network to org_network_name
vbauzys 5f4f4de
Rename org_network to org_network_name
vbauzys 197a832
Rename org_network to org_network_name
vbauzys ae84aad
Added validation for import
vbauzys 13d9998
Improvements
vbauzys 931bf68
bump govcd
vbauzys 792178e
bump govcd
vbauzys 28af28e
improved docs
vbauzys 28b0ce9
Improve read functionality and bump govcd
vbauzys 0e920f5
Improve handling of DHCP end address
vbauzys 1e14e32
Removed firewall enabled and nat enabled default values
vbauzys 585b898
Fix test issue
vbauzys 3506d75
Fix issue
vbauzys a9e1e58
Fix test issue
vbauzys 59aa12b
Fix nil issue
vbauzys ab6c7e1
Fix test issue
vbauzys ff50f77
Improve tests, by removing create vapp networks
vbauzys 43d01f3
Improvements
vbauzys 04442b0
Improve test
vbauzys e8a174a
Improve test
vbauzys 2be8e13
Improve test
vbauzys b4813b6
Improve tests
vbauzys 32c0937
Improve tests
vbauzys fa86791
Improve tests
vbauzys ced2f24
Revert back change
vbauzys dab1988
Improve tests
vbauzys 51e8a00
Improve docs
vbauzys d1a65ff
Improve docs
vbauzys aa23587
Added warning for VM
vbauzys e537072
Removed firewall enabled and nat enabled default values
vbauzys 455e78e
Improve docs, update example of VM
vbauzys a75efde
Add section for changelog about deprecation
vbauzys 418dd49
bump govcd version
vbauzys 2ee27ea
Improve changelog
vbauzys a7b9768
Improve changelog
vbauzys f78bde5
Improve changelog
vbauzys f433df0
Improve changelog
vbauzys 811a39c
Improve changelog
vbauzys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
package vcd | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-sdk/helper/schema" | ||
) | ||
|
||
func datasourceVcdVappNetwork() *schema.Resource { | ||
return &schema.Resource{ | ||
Read: datasourceVappNetworkRead, | ||
Schema: map[string]*schema.Schema{ | ||
"name": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Required: true, | ||
Description: "vApp network name", | ||
}, | ||
"vapp_name": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Required: true, | ||
Description: "vApp to use", | ||
}, | ||
"org": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Description: "The name of organization to use, optional if defined at provider " + | ||
"level. Useful when connected as sysadmin working across different organizations", | ||
}, | ||
"vdc": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Description: "The name of VDC to use, optional if defined at provider level", | ||
}, | ||
"description": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "Optional description for the network", | ||
}, | ||
"netmask": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "Netmask address for a subnet", | ||
}, | ||
"gateway": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "Gateway of the network", | ||
}, | ||
|
||
"dns1": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "Primary DNS server", | ||
}, | ||
|
||
"dns2": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "Secondary DNS server", | ||
}, | ||
|
||
"dns_suffix": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "DNS suffix", | ||
}, | ||
|
||
"guest_vlan_allowed": &schema.Schema{ | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
Description: "True if Network allows guest VLAN tagging", | ||
}, | ||
"org_network_name": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
Description: "org network name to which vapp network is connected", | ||
}, | ||
"firewall_enabled": { | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
Description: "firewall service enabled or disabled. Default is true", | ||
}, | ||
"nat_enabled": { | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
Description: "NAT service enabled or disabled. Default is true", | ||
}, | ||
"retain_ip_mac_enabled": { | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
Description: "Specifies whether the network resources such as IP/MAC of router will be retained across deployments.", | ||
}, | ||
"dhcp_pool": &schema.Schema{ | ||
Type: schema.TypeSet, | ||
Computed: true, | ||
Description: "A range of IPs to issue to virtual machines that don't have a static IP", | ||
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"start_address": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
}, | ||
|
||
"end_address": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
}, | ||
|
||
"default_lease_time": &schema.Schema{ | ||
Type: schema.TypeInt, | ||
Computed: true, | ||
}, | ||
|
||
"max_lease_time": &schema.Schema{ | ||
Type: schema.TypeInt, | ||
Computed: true, | ||
}, | ||
|
||
"enabled": &schema.Schema{ | ||
Type: schema.TypeBool, | ||
Computed: true, | ||
}, | ||
}, | ||
}, | ||
Set: resourceVcdNetworkIPAddressHash, | ||
}, | ||
"static_ip_pool": &schema.Schema{ | ||
Type: schema.TypeSet, | ||
Computed: true, | ||
Description: "A range of IPs permitted to be used as static IPs for virtual machines", | ||
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"start_address": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
}, | ||
|
||
"end_address": &schema.Schema{ | ||
Type: schema.TypeString, | ||
Computed: true, | ||
}, | ||
}, | ||
}, | ||
Set: resourceVcdNetworkIPAddressHash, | ||
}, | ||
}, | ||
} | ||
} | ||
|
||
func datasourceVappNetworkRead(d *schema.ResourceData, meta interface{}) error { | ||
return genericVappNetworkRead(d, meta, "datasource") | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We need a "DEPRECATIONS:" section with the note about behavior we're deprecating of VM creating vApp Org Network if it doesn't exist.
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.
added