OpenNebula / terraform-provider-opennebula

Terraform provider for OpenNebula
https://www.terraform.io/docs/providers/opennebula/
Mozilla Public License 2.0
63 stars 53 forks source link

Add `opennebula_marketplace` resource and datasource #414

Closed frousselet closed 11 months ago

frousselet commented 1 year ago

Community Note

Description

Add opennebula_marketplace resource and datasource

New or Affected Resource(s)

Potential Terraform Configuration

resource "opennebula_marketplace" "example" {
  name = "Example"
  description = "This is an example"

  ## Backends
  ## All backends conflict with each others
  #####

  # Example of a OpenNebula.org Marketplace
  backend_one = {
    endpoint_url = "https://example.org"
  }

  # Example of a OpenNebula.org Marketplace
  backend_http = {
    endpoint_url        = "https://example.org"
    path                = "/test"
    storage_bridge_list = ""
  }

  # Example of a S3 Marketplace
  backend_s3 = {
    type              = "AWS" # Or "CEPH"                          # Mandatory
    endpoint_url      = "https://example.org"                      # Mandatory
    access_key_id     = "AKIAIOSFODNN7EXAMPLE"                     # Mandatory
    secret_access_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" # Mandatory
    bucket            = "test"                                     # Mandatory
    aws_region        = "eu-west-1"                                # Mandatory if type = "AWS"
    total_size        = 10240 # MB                                 # Mandatory
    read_block_length = 64 # MB                                    # Default to 32
  }

  # Example of a LinuxContainers.org Marketplace
  backend_lxc = {
    endpoint_url                 = "https://example.org"
    roofs_image_size             = 1024 # MB
    filesystem                   = ""
    image_block_file_format      = ""
    show_only_autocontextualized = false
  }

  # Example of a TurnkeyLinux Marketplace
  backend_turnkey = {}

  # Example of a DockerHub Marketplace
  backend_dockerhub = {}

  template_section {
    name = "example"
    elements = {
      key1 = "value1"
    }
  }
}

data "opennebula_marketplace" "by_id" {
  id = 100
}

data "opennebula_marketplace" "by_name" {
  name = "example"
}

References

none

treywelsh commented 1 year ago

Marketplace documentation for one 6.2:

TGM commented 1 year ago

Looking forward for this feature. :)