outscalepublicip

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 12 Imported by: 0

README

Outscale Public IP Plugin

This plugin manages the Outscale Public IPs. It assigns a Public IP to an Outscale Network Interface when the endpoint is activated. On de-activation, it attempts to remove the Public IP from the Network Interface.

The Control Loop is run every minute by default and will re-assigns the Public IP to the NIC if it is not.

Environment Variables

  • OUTSCALE_PUBLIC_IP_REFRESH_INTERVAL: Interval between two control loop for an endpoint.

JSON Configuration

Name Type Optional Description
access_key string no Outscale Access Key
secret_key string no Outscale Secret Key
region string no Outscale Region
public_ip_id string no ID of the Outscale Public IP to manage
nic_id string no ID of the Outscale Network Interface to which the Public IP will be assigned once the endpoint is activated
Example
{
  "access_key": "YOUR_ACCESS_KEY",
  "secret_key": "YOUR_SECRET_KEY",
  "region": "eu-west-2",
  "public_ip_id": "eipalloc-12345678",
  "nic_id": "eni-12345678"
}

Outscale EIM Configuration

The minimum EIM policy needed to use this plugin is:

{
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["api:LinkPublicIp", "api:ReadPublicIps", "api:UnlinkPublicIp"],
      "Resource": ["*"]
    }
  ]
}

Documentation

Index

Constants

View Source
const Name = "outscale_public_ip"

Variables

This section is empty.

Functions

func Register

func Register(ctx context.Context, registry plugin.Registry, encryptedStorage models.EncryptedStorage) error

Types

type Config

type Config struct {
	RefreshEvery time.Duration `envconfig:"OUTSCALE_PUBLIC_IP_REFRESH_INTERVAL" default:"1m"`
}

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

func (Factory) Create

func (f Factory) Create(ctx context.Context, endpoint models.Endpoint) (plugin.Plugin, error)

func (Factory) Mutate

func (f Factory) Mutate(ctx context.Context, endpoint models.Endpoint) (json.RawMessage, error)

func (Factory) Validate

func (f Factory) Validate(_ context.Context, endpoint models.Endpoint) error

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) Activate

func (p *Plugin) Activate(ctx context.Context) error

func (*Plugin) Deactivate

func (p *Plugin) Deactivate(ctx context.Context) error

func (*Plugin) ElectionKey

func (p *Plugin) ElectionKey(_ context.Context) string

func (*Plugin) Ensure

func (p *Plugin) Ensure(ctx context.Context) error

func (*Plugin) LogFields

func (p *Plugin) LogFields() logrus.Fields

type PluginConfig

type PluginConfig struct {
	AccessKey string `json:"access_key"`
	SecretKey string `json:"secret_key"`
	Region    string `json:"region"`

	PublicIPID string `json:"public_ip_id"`
	NICID      string `json:"nic_id"`
}

type StorablePluginConfig

type StorablePluginConfig struct {
	AccessKey models.EncryptedData `json:"access_key"`
	SecretKey models.EncryptedData `json:"secret_key"`
	Region    string               `json:"region"`

	PublicIPID string `json:"public_ip_id"`
	NICID      string `json:"nic_id"`
}

Jump to

Keyboard shortcuts

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