rancher / terraform-provider-rancher2

Terraform Rancher2 provider
https://www.terraform.io/docs/providers/rancher2/
Mozilla Public License 2.0
259 stars 223 forks source link

Add Custom Branding to Terraform automation #1269

Open tonybaltazar opened 10 months ago

tonybaltazar commented 10 months ago

Is your feature request related to a problem? Please describe.

It would be awesome if Custom Branding would be included into the Terraform automation just like any other Rancher setting. Users will benefit from this by including their custom branding settings into the rest of their settings that are part of the Terraform automation.

Describe the solution you'd like

Extension to existing Rancher Provider resources that include the ability to set custom branding settings. Or a new resource all together.

Describe alternatives you've considered

N/A

Additional context

At the moment each time we deploy a new Rancher Manager, we have to manually set the Custom Branding settings post Terraform deployment.

framctr commented 4 months ago

Hi @tonybaltazar . You can already do that with the rancher2_setting resource.

I put here an example on how to change the Rancher Manager logo:

  1. List the settings names

    $ kubectl get Setting -n cattle-system
    NAME                                      VALUE
    agent-image                               rancher/rancher-agent:v2.8.3
    agent-rollout-timeout                              
    ...
    ui-logo-light                             
    ...
  2. Create the rancher2_setting

    
    locals {
    ui_logo_light = filebase64("${path.root}/asset/logo.png")
    }

resource "rancher2_setting" "ui_logo_light" { name = "ui-logo-light" value = "data:image/png;base64,${local.ui_logo_light}" }