package hostedzone

import "github.com/oslokommune/okctl/pkg/cfn/components/hostedzone"

Package hostedzone knows how to create cloud formation for a hosted zone

Index

Functions

func PatchYAML

func PatchYAML(templateBody []byte) ([]byte, error)

PatchYAML the template body, so it is valid cloud formation

Types

type HostedZone

type HostedZone struct {
	StoredName string
	FQDN       string
	Comment    string
}

HostedZone contains the state for creating a cloud formation resources and outputs

func New

func New(fqdn, comment string) *HostedZone

New returns an initialised hosted zone

func (*HostedZone) GetAtt

func (h *HostedZone) GetAtt(attribute string) string

GetAtt returns a cloud formation intrinsic GetAtt to an attribute

func (*HostedZone) Name

func (h *HostedZone) Name() string

Name returns the name of the resource

func (*HostedZone) NamedOutputs

func (h *HostedZone) NamedOutputs() map[string]cloudformation.Output

NamedOutputs returns the named outputs

func (*HostedZone) Ref

func (h *HostedZone) Ref() string

Ref returns a cloud formation intrinsic ref to the resource

func (*HostedZone) Resource

func (h *HostedZone) Resource() cloudformation.Resource

Resource returns the cloud formation resource for a HostedZone

type Patcher

type Patcher struct {
	AWSTemplateFormatVersion string `yaml:"AWSTemplateFormatVersion"`
	Outputs                  struct {
		NameServers struct {
			Value interface{} `yaml:"Value"`
		} `yaml:"NameServers"`
		PublicHostedZone struct {
			Value struct {
				Ref string `yaml:"Ref"`
			} `yaml:"Value"`
		} `yaml:"PublicHostedZone"`
	} `yaml:"Outputs"`
	Resources struct {
		PublicHostedZone struct {
			Properties struct {
				HostedZoneConfig struct {
					Comment string `yaml:"Comment"`
				} `yaml:"HostedZoneConfig"`
				Name string `yaml:"Name"`
			} `yaml:"Properties"`
			Type string `yaml:"Type"`
		} `yaml:"PublicHostedZone"`
	} `yaml:"Resources"`
}

Patcher struct contains what we want to patch

Source Files

hostedzone.go

Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
4 packages
Last checked
4 days ago

Tools for package owners.