packer-plugin-tencentcloud

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

packer-plugin-tencentcloud

Inputs

Required:
Name Type
secret_id string
secret_key string
region string
Optional:

For more details, refer to this Docs.
ImageIds and Filters cannot be specified at the same time.*

Name Type Description
image_ids list of string list of ID of the image.
image_name_regex string Regex that is used to query image by name.
filters map of string
image-id   = "img-tes1r4" 
image-type = "PRIVATE_IMAGE"
image-name = "webserver" // full image name
platform = "CentOS"
tag-key = "env"
tag-value = "prod"
tag:env = "prod" // tag:[key] = "value"
instance_type string Instance type, e.g. S1.SMALL1

Outputs

Name Type
images
list of object([{
image_id = string
image_name = string
instance_type = string
tags = list of object([{
key = string
value = string
}])
}])

Example

packer {
  required_plugins {
     st-tencentcloud = {
      source  = "github.com/myklst/tencentcloud"
      version = "~> 0.1"
    }
  }
}

// Example inputs

data "st-tencentcloud-images" "test_image" {
  secret_id  = "v1-gastisthisisnotmyaccesskey"
  secret_key = "v9-adftthisfathisisnotmysecretkey"
  region  = "cn-hongkong"
  image_name_regex = "^TencentOS\\s+Server\\s+\\d+\\.\\d+\\s+\\(TK4\\)$"
  // image_ids = ["img-altiyjog","img-1az6pxke","img-its3np62"]
  filters = {
      "image-name"    = "img-5566"
      "image-type"    = "PRIVATE_IMAGE"
      "tag:registrar" = "namecheap" // tag:[key] = "value"
    }
  instance_type = "S1.SMALL1"
}

build {
  sources = ["source.null.basic-example"]

  provisioner "shell-local" {
    inline = [
      "echo image_id: ${data.st-tencentcloud-images.test_image.images[0].image_id}",
    ]
  }
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
datasource

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL