awlsringcdktfsurrealbackend

package module
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

cdktf-surreal-backend

This is library to create a CDKTF construct for terraform-backend-surreal. This library vends a single construct, SurrealBackend, which extends the default HttpBackend construct to make instantiation of this easier.

Usage

Example
import { TerraformStack } from "cdktf";
import { SurrealBackend } from '@awlsring/cdktf-surreal-backend';

export class MyStack extends TerraformStack {
  constructor(scope: Construct, name: string, props: MyStackProps) {
    super(scope, name);

    const backend = new SurrealBackend(this, 'Backend', {
      address: 'https://localhost:8032',
      project: "homelab",
      stack: "infra",
      username: "terraform",
      password: "alligator3",
    });

    ... // other stuff

  }
}
Construct Properties:
  • address: The address your backend sever is reachable at.
  • project: The project name to use for this stack.
  • stack: The stack name to use for this stack. stacks names must be unique across a project.
  • username: The username to use for authentication, configured in the server's config.yaml file
  • password: The password to use for authentication, configured in the server's config.yaml file

Documentation

Overview

A package that vends a construct to setup the surreal backend in CDKTF

A package that vends a construct to setup the surreal backend in CDKTF

A package that vends a construct to setup the surreal backend in CDKTF

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSurrealBackend_Override

func NewSurrealBackend_Override(s SurrealBackend, scope constructs.Construct, props *SurrealBackendProps)

func SurrealBackend_IsBackend

func SurrealBackend_IsBackend(x interface{}) *bool

Experimental.

func SurrealBackend_IsConstruct

func SurrealBackend_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func SurrealBackend_IsTerraformElement

func SurrealBackend_IsTerraformElement(x interface{}) *bool

Experimental.

Types

type SurrealBackend

type SurrealBackend interface {
	cdktf.HttpBackend
	// Experimental.
	CdktfStack() cdktf.TerraformStack
	// Experimental.
	ConstructNodeMetadata() *map[string]interface{}
	// Experimental.
	Fqn() *string
	// Experimental.
	FriendlyUniqueId() *string
	// Experimental.
	Name() *string
	// The tree node.
	Node() constructs.Node
	// Experimental.
	RawOverrides() interface{}
	// Experimental.
	AddOverride(path *string, value interface{})
	// Creates a TerraformRemoteState resource that accesses this backend.
	// Experimental.
	GetRemoteStateDataSource(scope constructs.Construct, name *string, _fromStack *string) cdktf.TerraformRemoteState
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Resets a previously passed logical Id to use the auto-generated logical id again.
	// Experimental.
	ResetOverrideLogicalId()
	// Experimental.
	SynthesizeAttributes() *map[string]interface{}
	// Experimental.
	ToMetadata() interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Adds this resource to the terraform JSON output.
	// Experimental.
	ToTerraform() interface{}
}

func NewSurrealBackend

func NewSurrealBackend(scope constructs.Construct, props *SurrealBackendProps) SurrealBackend

type SurrealBackendProps

type SurrealBackendProps struct {
	Address              *string `field:"required" json:"address" yaml:"address"`
	Password             *string `field:"required" json:"password" yaml:"password"`
	Project              *string `field:"required" json:"project" yaml:"project"`
	Stack                *string `field:"required" json:"stack" yaml:"stack"`
	Username             *string `field:"required" json:"username" yaml:"username"`
	SkipCertVerification *bool   `field:"optional" json:"skipCertVerification" yaml:"skipCertVerification"`
}

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

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