func resourceCloudStackConfiguration()

in cloudstack/resource_cloudstack_configuration.go [29:103]


func resourceCloudStackConfiguration() *schema.Resource {
	return &schema.Resource{
		Create: resourceCloudStackConfigurationCreate,
		Read:   resourceCloudStackConfigurationRead,
		Update: resourceCloudStackConfigurationUpdate,
		Delete: resourceCloudStackConfigurationDelete,
		Importer: &schema.ResourceImporter{
			State: importStatePassthrough,
		},

		Schema: map[string]*schema.Schema{
			"name": {
				Description: "configuration by name",
				Type:        schema.TypeString,
				Required:    true,
			},
			"account_id": {
				Description: "the ID of the Account to update the parameter value for corresponding account",
				Type:        schema.TypeString,
				Optional:    true,
			},
			"cluster_id": {
				Description: "the ID of the Cluster to update the parameter value for corresponding cluster",
				Type:        schema.TypeString,
				Optional:    true,
			},
			"domain_id": {
				Description: "the ID of the Domain to update the parameter value for corresponding domain",
				Type:        schema.TypeString,
				Optional:    true,
			},
			"image_store_uuid": {
				Description: "the ID of the Image Store to update the parameter value for corresponding image store",
				Type:        schema.TypeString,
				Optional:    true,
			},
			"store_id": {
				Description: "the ID of the Storage pool to update the parameter value for corresponding storage pool",
				Type:        schema.TypeString,
				Optional:    true,
			},
			"value": {
				Description: "the value of the configuration",
				Type:        schema.TypeString,
				Optional:    true,
			},
			"zone_id": {
				Description: "the ID of the Zone to update the parameter value for corresponding zone",
				Type:        schema.TypeString,
				Optional:    true,
			},
			// computed
			"category": {
				Description: "configurations by category",
				Type:        schema.TypeString,
				Computed:    true,
			},
			"description": {
				Description: "the description of the configuration",
				Type:        schema.TypeString,
				Computed:    true,
			},
			"is_dynamic": {
				Description: "true if the configuration is dynamic",
				Type:        schema.TypeBool,
				Computed:    true,
			},
			"scope": {
				Description: "scope(zone/cluster/pool/account) of the parameter that needs to be updated",
				Type:        schema.TypeString,
				Computed:    true,
			},
		},
	}
}