Skip to content

Latest commit

 

History

History
125 lines (81 loc) · 3.47 KB

File metadata and controls

125 lines (81 loc) · 3.47 KB
Title Description
Package Repository Resource
Creating the package Repository resource.

Package Repository

This resource allows you to add, update, and delete package repository to a cluster through Tanzu Mission Control.

It's a Kubernetes resource which references Package Repository Bundle.It has information such as image url of Package Repository Bundle and necessary credentials to pull Package Repository Bundle.

Cluster scoped Package Repository

Example Usage

# Create Tanzu Mission Control package repository with attached set as default value.
resource "tanzu-mission-control_package_repository" "create_cluster_pkg_repository" {
  name = "tf-pkg-repository-name" # Required

  scope {
    cluster {
      name                    = "testcluster" # Required
      provisioner_name        = "attached"    # Default: attached
      management_cluster_name = "attached"    # Default: attached
    }
  }

  meta {
    description = "Create namespace through terraform"
    labels      = { "key" : "value" }
  }

  spec {
    imgpkg_bundle {
      image = "testImage" # Required
    }
  }
}

Schema

Required

  • name (String) Name of the package repository resource.
  • scope (Block List, Min: 1, Max: 1) Scope for the package repository, having one of the valid scopes: cluster. (see below for nested schema)
  • spec (Block List, Min: 1, Max: 1) spec for package repository. (see below for nested schema)

Optional

  • disabled (Boolean) If true, Package Repository is disabled for cluster.
  • meta (Block List, Max: 1) Metadata for the resource (see below for nested schema)

Read-Only

  • id (String) The ID of this resource.
  • namespace_name (String) Name of Namespace where package repository will be created.
  • state (List of Object) status for package repository. (see below for nested schema)

Nested Schema for scope

Optional:

Nested Schema for scope.cluster

Required:

  • name (String) Name of this cluster

Optional:

  • management_cluster_name (String) Name of the management cluster
  • provisioner_name (String) Provisioner of the cluster

Nested Schema for spec

Optional:

  • imgpkg_bundle (Block List, Max: 1) Docker image url; unqualified, tagged, or digest references supported. (see below for nested schema)

Nested Schema for spec.imgpkg_bundle

Required:

  • image (String) image url string.

Nested Schema for meta

Optional:

  • annotations (Map of String) Annotations for the resource
  • description (String) Description of the resource
  • labels (Map of String) Labels for the resource

Read-Only:

  • resource_version (String) Resource version of the resource
  • uid (String) UID of the resource

Nested Schema for state

Read-Only:

  • disabled (Boolean)
  • managed (Boolean)
  • package_repository_phase (String)
  • subscribed (Boolean)