ves-io-schema-views-aws_tgw_site-API-Create

Examples of creating awstgwsite

Usecase:

Create tgw-site1

Request using vesctl:

vesctl configuration create aws_tgw_site -i aws_tgw_site.yaml

where file awstgwsite.yaml has following contents (awstgwsite.CreateRequest):

metadata:
  name: tgw-site1
  namespace: documentation
spec:
  awsParameters:
    assisted: {}
    awsCertifiedHw: aws-byol-multi-nic-voltmesh
    awsRegion: us-east-1
    azNodes:
    - awsAzName: us-west-2a
      diskSize: "80"
      insideSubnet:
        existingSubnetId: subnet-a2345678901234567
      outsideSubnet:
        existingSubnetId: subnet-b2345678901234567
    existingTgw:
      tgwAsn: 64500
      tgwId: tgw-a2345678901234567
      volterraSiteAsn: 64501
    instanceType: a1.xlarge
    noInsideStaticRoutes: {}
    noOutsideStaticRoutes: {}
    nodesPerAz: 2
    sshKey: ssh-rsa AAAAB..
    vpcId: vpc-a2345678901234567
  tgwSecurity:
    noForwardProxyPolicy: {}
    noNetworkPolicy: {}
  vpcAttachments:
    vpcList:
    - vpcId: vpc-a2345678901234567

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: tgw-site1
  namespace: documentation
spec:
  awsParameters:
    assisted: {}
    awsCertifiedHw: aws-byol-multi-nic-voltmesh
    awsRegion: us-east-1
    azNodes:
    - awsAzName: us-west-2a
      diskSize: "80"
      insideSubnet:
        existingSubnetId: subnet-a2345678901234567
      outsideSubnet:
        existingSubnetId: subnet-b2345678901234567
    existingTgw:
      tgwAsn: 64500
      tgwId: tgw-a2345678901234567
      volterraSiteAsn: 64501
    instanceType: a1.xlarge
    noInsideStaticRoutes: {}
    noOutsideStaticRoutes: {}
    nodesPerAz: 2
    sshKey: ssh-rsa AAAAB..
    vpcId: vpc-a2345678901234567
  tgwSecurity:
    noForwardProxyPolicy: {}
    noNetworkPolicy: {}
  tunnels: []
  vpcAttachments:
    vpcList:
    - vpcId: vpc-a2345678901234567
  vpcIpPrefixSets: {}
systemMetadata:
  creationTimestamp: "2020-09-16T10:51:00.620926400Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 2ffac1c4-a206-4c21-aef0-43dd02756fdf

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"tgw-site1","namespace":"documentation"},"spec":{"awsParameters":{"awsRegion":"us-east-1","vpcId":"vpc-a2345678901234567","existingTgw":{"tgwId":"tgw-a2345678901234567","tgwAsn":64500,"volterraSiteAsn":64501},"awsCertifiedHw":"aws-byol-multi-nic-voltmesh","instanceType":"a1.xlarge","sshKey":"ssh-rsa AAAAB..","azNodes":[{"awsAzName":"us-west-2a","insideSubnet":{"existingSubnetId":"subnet-a2345678901234567"},"outsideSubnet":{"existingSubnetId":"subnet-b2345678901234567"},"diskSize":"80"}],"nodesPerAz":2,"assisted":{},"noInsideStaticRoutes":{},"noOutsideStaticRoutes":{}},"vpcAttachments":{"vpcList":[{"vpcId":"vpc-a2345678901234567"}]},"tgwSecurity":{"noForwardProxyPolicy":{},"noNetworkPolicy":{}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build013258245_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/aws_tgw_sites'

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 16 Sep 2020 10:51:00 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "tgw-site1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "2ffac1c4-a206-4c21-aef0-43dd02756fdf",
    "creation_timestamp": "2020-09-16T10:51:00.620926400Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "aws_parameters": {
      "aws_region": "us-east-1",
      "vpc_id": "vpc-a2345678901234567",
      "existing_tgw": {
        "tgw_id": "tgw-a2345678901234567",
        "tgw_asn": 64500,
        "volterra_site_asn": 64501
      },
      "aws_certified_hw": "aws-byol-multi-nic-voltmesh",
      "instance_type": "a1.xlarge",
      "ssh_key": "ssh-rsa AAAAB..",
      "az_nodes": [
        {
          "aws_az_name": "us-west-2a",
          "inside_subnet": {
            "existing_subnet_id": "subnet-a2345678901234567"
          },
          "outside_subnet": {
            "existing_subnet_id": "subnet-b2345678901234567"
          },
          "disk_size": "80"
        }
      ],
      "nodes_per_az": 2,
      "assisted": {

      },
      "no_inside_static_routes": {

      },
      "no_outside_static_routes": {

      }
    },
    "vpc_attachments": {
      "vpc_list": [
        {
          "vpc_id": "vpc-a2345678901234567"
        }
      ]
    },
    "tgw_security": {
      "no_forward_proxy_policy": {

      },
      "no_network_policy": {

      }
    },
    "volterra_software_version": "",
    "operating_system_version": "",
    "vpc_ip_prefix_sets": {
    },
    "tunnels": [
    ]
  }
}