Giter Club home page Giter Club logo

terraform-provider-susepubliccloud's Introduction

Go Report Unit tests License
Go Report Card tests License: Apache 2.0

The purpose of this project is to define a set of data sources that make it easier to find the resources managed by SUSE on the different public clouds.

The provider gathers data by accessing the public instance of public-cloud-info-service managed by SUSE.

You can find more information about the resources managed by SUSE on the public clouds here:

Using the Provider

Data source susepubliccloud_image_ids

Use this data source to get a list of image IDs matching the specified criteria.

Example use:

data "susepubliccloud_image_ids" "sles" {
  cloud      = "amazon"
  region     = "eu-central-1"
  state      = "active"
  name_regex = "suse-sles-15-sp1-byos.*-hvm-ssd-x86_64"
}

resource "aws_instance" "control_plane" {
  ami = "${data.susepubliccloud_image_ids.sles.ids[0]}"
  ...
}

Argument reference

  • cloud - (Required) Name of the target cloud to use. Valid values: amazon, google, microsoft and oracle.
  • region - (Required) One of the known regions in the cloud framework. Use the region identifiers as the provider describes them, for example us-east-1 in Amazon EC2, or East US 2 in Microsoft Azure.
  • state - (Defaults to active) State of the image. Valid values: active, inactive, deprecated. Note well: the deleted state isn't accepted by the data source because these images would not be usable by terraform.
  • name_regex - (Optional) A regex string to apply to the images list returned by the remote API managed by SUSE.
  • sort_ascending - (Defaults to false) Used to sort by publication time.

Note well: the values accepted by cloud, region and state are the ones specified here.

Attributes reference

ids is set to the list of images IDs, sorted by publication time according to sort_ascending.

Installing the Provider

This provider is published on the official terraform registry, that makes the provider installable by terraform. This is definitely the easiest way to go.

You can find more information about that by clicking on the "USE PROVIDER" button on the terraform registry page.

RPM packages

openSUSE and SUSE packages are being built inside of the systemsmanagement:terraform terraform-provider-susepubliccloud project on the Open Build Service.

The packages can be installed by visiting the dedicated page on software.opensuse.org.

Developing the Provider

If you wish to work on the provider, you'll need:

  • Terraform 0.10+
  • Go 1.12 (to build the provider plugin)

Note: This project uses Go Modules making it safe to work with it outside of your existing GOPATH. The instructions that follow assume a directory in your home directory outside of the standard GOPATH (i.e $HOME/development/terraform-providers/).

Clone repository to: $HOME/development/terraform-providers/

$ mkdir -p $HOME/development/terraform-providers/; cd $HOME/development/terraform-providers/
$ git clone [email protected]:SUSE/terraform-provider-susepubliccloud
...

To compile the provider execute the following command:

$ make build

This will produce the terraform-provider-susepubliccloud binary that can be copied to your ~/.terraform.d/plugins/<GOOS>_<GOARCH> directory.

More instructions about how to instead use a custom-built provider in your Terraform environment can be found here.

Testing

Unit tests can be run via:

$ make test

Unit test coverage can be seen by executing:

$ make test-coverage

Code can be linted via:

$ make lint

terraform-provider-susepubliccloud's People

Contributors

dependabot[bot] avatar flavio avatar mallozup avatar rjschwei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-provider-susepubliccloud's Issues

Provider not supporting darwin_arm64 architechure

Hi All,

I was trying to use this to provider but got the following error.

Provider registry.terraform.io/suse/susepubliccloud v0.0.5 does not have a package available for your current platform, darwin_arm64.

Do you plan to update an publish a new version of this provider?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.