Skip to content

Terraform provider and provisioner for SUSE Customer Center

Notifications You must be signed in to change notification settings

ikapelyukhin/terraform-scc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform SCC plugin

Provides a provider that registers products at SCC and a provisioner that sets up zypper services.

Minimal example

resource "scc_system" "my_sles_server" {
  regserver = "https://scc.suse.com"
  regcode = "my-awesome-regcode"
  
  # The list of products to be activated
  products = [
    {
      identifier = "SLES"
      version = "12.3"
      arch = "x86_64"
    },
  ]
}

resource "null_resource" "test_resource" {
  # A host you can access over SSH
  connection {
    host = "example.org"
  }

  # A provisioner that sets up zypper services on the machine
  provisioner "scc" {
    login    = "${scc_system.my_sles_server.login}"
    password = "${scc_system.my_sles_server.password}"
    
    products = [
      "${scc_system.my_sles_server.products[0]}",
    ]
  }
}

Building

  1. Set up $GOPATH
  2. Install the dependencies: glide install
  3. Run make

Caveats

  1. Doesn't (yet) install product release RPM package for the extension products
  2. Doesn't supply any host information (such as hostname) during registration
  3. There seems to be an issue in Terraform when it comes to interpolating complex data structures (such as list of maps):

This is why the provisioner receives one product at a time, in the ideal world should be as easy as products = "${scc_system.my_sles_server.products}".

About

Terraform provider and provisioner for SUSE Customer Center

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published