func Provider()

in cloudstack/provider.go [31:134]


func Provider() terraform.ResourceProvider {
	return &schema.Provider{
		Schema: map[string]*schema.Schema{
			"api_url": {
				Type:          schema.TypeString,
				Optional:      true,
				DefaultFunc:   schema.EnvDefaultFunc("CLOUDSTACK_API_URL", nil),
				ConflictsWith: []string{"config", "profile"},
			},

			"api_key": {
				Type:          schema.TypeString,
				Optional:      true,
				DefaultFunc:   schema.EnvDefaultFunc("CLOUDSTACK_API_KEY", nil),
				ConflictsWith: []string{"config", "profile"},
			},

			"secret_key": {
				Type:          schema.TypeString,
				Optional:      true,
				DefaultFunc:   schema.EnvDefaultFunc("CLOUDSTACK_SECRET_KEY", nil),
				ConflictsWith: []string{"config", "profile"},
			},

			"config": {
				Type:          schema.TypeString,
				Optional:      true,
				ConflictsWith: []string{"api_url", "api_key", "secret_key"},
			},

			"profile": {
				Type:          schema.TypeString,
				Optional:      true,
				ConflictsWith: []string{"api_url", "api_key", "secret_key"},
			},

			"http_get_only": {
				Type:        schema.TypeBool,
				Required:    true,
				DefaultFunc: schema.EnvDefaultFunc("CLOUDSTACK_HTTP_GET_ONLY", false),
			},

			"timeout": {
				Type:        schema.TypeInt,
				Required:    true,
				DefaultFunc: schema.EnvDefaultFunc("CLOUDSTACK_TIMEOUT", 900),
			},
		},

		DataSourcesMap: map[string]*schema.Resource{
			"cloudstack_template":         dataSourceCloudstackTemplate(),
			"cloudstack_ssh_keypair":      dataSourceCloudstackSSHKeyPair(),
			"cloudstack_instance":         dataSourceCloudstackInstance(),
			"cloudstack_network_offering": dataSourceCloudstackNetworkOffering(),
			"cloudstack_zone":             dataSourceCloudStackZone(),
			"cloudstack_service_offering": dataSourceCloudstackServiceOffering(),
			"cloudstack_volume":           dataSourceCloudstackVolume(),
			"cloudstack_vpc":              dataSourceCloudstackVPC(),
			"cloudstack_ipaddress":        dataSourceCloudstackIPAddress(),
			"cloudstack_user":             dataSourceCloudstackUser(),
			"cloudstack_vpn_connection":   dataSourceCloudstackVPNConnection(),
		},

		ResourcesMap: map[string]*schema.Resource{
			"cloudstack_affinity_group":       resourceCloudStackAffinityGroup(),
			"cloudstack_autoscale_vm_profile": resourceCloudStackAutoScaleVMProfile(),
			"cloudstack_disk":                 resourceCloudStackDisk(),
			"cloudstack_egress_firewall":      resourceCloudStackEgressFirewall(),
			"cloudstack_firewall":             resourceCloudStackFirewall(),
			"cloudstack_instance":             resourceCloudStackInstance(),
			"cloudstack_ipaddress":            resourceCloudStackIPAddress(),
			"cloudstack_kubernetes_cluster":   resourceCloudStackKubernetesCluster(),
			"cloudstack_kubernetes_version":   resourceCloudStackKubernetesVersion(),
			"cloudstack_loadbalancer_rule":    resourceCloudStackLoadBalancerRule(),
			"cloudstack_network":              resourceCloudStackNetwork(),
			"cloudstack_network_acl":          resourceCloudStackNetworkACL(),
			"cloudstack_network_acl_rule":     resourceCloudStackNetworkACLRule(),
			"cloudstack_nic":                  resourceCloudStackNIC(),
			"cloudstack_port_forward":         resourceCloudStackPortForward(),
			"cloudstack_private_gateway":      resourceCloudStackPrivateGateway(),
			"cloudstack_secondary_ipaddress":  resourceCloudStackSecondaryIPAddress(),
			"cloudstack_security_group":       resourceCloudStackSecurityGroup(),
			"cloudstack_security_group_rule":  resourceCloudStackSecurityGroupRule(),
			"cloudstack_ssh_keypair":          resourceCloudStackSSHKeyPair(),
			"cloudstack_static_nat":           resourceCloudStackStaticNAT(),
			"cloudstack_static_route":         resourceCloudStackStaticRoute(),
			"cloudstack_template":             resourceCloudStackTemplate(),
			"cloudstack_vpc":                  resourceCloudStackVPC(),
			"cloudstack_vpn_connection":       resourceCloudStackVPNConnection(),
			"cloudstack_vpn_customer_gateway": resourceCloudStackVPNCustomerGateway(),
			"cloudstack_vpn_gateway":          resourceCloudStackVPNGateway(),
			"cloudstack_network_offering":     resourceCloudStackNetworkOffering(),
			"cloudstack_disk_offering":        resourceCloudStackDiskOffering(),
			"cloudstack_volume":               resourceCloudStackVolume(),
			"cloudstack_zone":                 resourceCloudStackZone(),
			"cloudstack_service_offering":     resourceCloudStackServiceOffering(),
			"cloudstack_account":              resourceCloudStackAccount(),
			"cloudstack_user":                 resourceCloudStackUser(),
			"cloudstack_domain":               resourceCloudStackDomain(),
		},

		ConfigureFunc: providerConfigure,
	}
}