diff --git a/.env.example b/.env.example index 314a8250..c29688a5 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,15 @@ +############################################################################## +# .env.example # +############################################################################## +# # +# >> WARNING << # +# # +# Do NOT include quotation marks around values in this file. This will # +# cause the application to crash. # +# # +# # +############################################################################## + API_KEY= POWER_WORKSPACE_DAL10= POWER_WORKSPACE_DAL12= diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 3e7800d0..627590bc 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -8,6 +8,10 @@ formatted_print() { } # run pretty +formatted_print "Updating Templates" +npm run update-templates +formatted_print "Updating Changelog" +npm run changelog formatted_print "Prettifying Code" npm run pretty diff --git a/CHANGELOG.md b/CHANGELOG.md index fd7a8f6f..016af664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,30 @@ All notable changes to this project will be documented in this file. +## 1.13.1 + +### Upgrade Notes + +- A new script `/lib/template-updater.js` has been added to update most unfound fields in CRAIG defined template JSON files +- The CRAIG JSON schema is now configured dynamically using the state store on the `/docs/json` page. Additional fields will now be added automatically +- `.env.example` has been updated to include a warning that included quotation marks in .env values will cause the application to crash +- When fetching VSI Images, the Craig API has no limit on the number of images that can be retrieved. In addition, only available images are retrieved +- Power VS Network interface outputs now use the Terraform field `pi_network_name` instead of the depricated field `name` + +### Features + +- Terraform code for Power VS Instances and FalconStor VTL instances now have a 3 hour create timeout instead of the default 2 hour timeout +- Power VS Network names and IDs are now included as outputs in CRAIG generated Terraform +- Items highlighted for emphasis in the markdown for CRAIG `CHANGELOG.md` are now also highlighted on the `/docs/releaseNotes` page +- Users can now select a Health Status for Power VS Instances and FalconStor VTL instances +- Power VS SSH Key names are now output in Terraform `outputs.tf` files +- Power VS Workspace locations are now output in Terraform `outputs.tf` files +- Object Storage Bucket names and region locations are now output in Terraform `outputs.tf` files + +### Fixes + +- Fixed an issue causing FalconStor VTL form in modals to crash + ## 1.13.0 ### Upgrade Notes diff --git a/Dockerfile b/Dockerfile index 6f0c18a7..0201d0a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ FROM node as build WORKDIR /app COPY . ./ -RUN npm install react-scripts sass cdktf cdktf-cli@latest -g RUN npm run build FROM node:alpine diff --git a/ansible/template-test/main.yml b/ansible/template-test/main.yml index 912272c9..292a6cd6 100644 --- a/ansible/template-test/main.yml +++ b/ansible/template-test/main.yml @@ -17,6 +17,7 @@ vars: description: Automated CRAIG Testing Workspace tags: ["craig"] + - name: TODO - convert to roles hosts: localhost vars_files: ./vars/vars.yml @@ -39,20 +40,19 @@ until: workspace_status.json.status == "INACTIVE" delay: 10 retries: 50 - - name: Update variablestore - set_fact: - variablestore: "{{ variablestore + [{'name': item, 'secure': true, 'use_default': false, 'value': ssh_key}] }}" - loop: "{{template_map[template]}}" - - name: Update vars in workspace - uri: - url: https://schematics.cloud.ibm.com/v1/workspaces/{{ workspace.json.id }}/template_data/{{ workspace.json.template_data[0].id }}/values - method: PUT - headers: - Authorization: Bearer {{token.json.access_token}} - Content-Type: application/json - body_format: json - body: - variablestore: "{{ variablestore }}" +- name: Update variablestore + hosts: localhost + vars_files: ./vars/vars.yml + roles: + - role: update_variablestore + vars: + # Additional variables can be added to the variablestore by adding elements to the array below. + # Each element must be a map of the following key/value pairs: + # {'name': string, 'secure': bool, 'use_default': bool, 'value': variable_value} + # Note: If using a variable defined in /vars/vars.yml, specify the map using the following syntax: + # {'name': string, 'secure': bool, 'use_default': bool, 'value': "{{variable}}"} + additional_variables: [{'name': ssh_key_public_key, 'secure': true, 'use_default': false, 'value': "{{ssh_key}}"}] + - role: update_workspace_variables - name: Start generate plan action hosts: localhost vars_files: ./vars/vars.yml diff --git a/ansible/template-test/roles/update_variablestore/README.md b/ansible/template-test/roles/update_variablestore/README.md new file mode 100644 index 00000000..225dd44b --- /dev/null +++ b/ansible/template-test/roles/update_variablestore/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/template-test/roles/update_variablestore/defaults/main.yml b/ansible/template-test/roles/update_variablestore/defaults/main.yml new file mode 100644 index 00000000..fa0be91e --- /dev/null +++ b/ansible/template-test/roles/update_variablestore/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for update_variablestore diff --git a/ansible/template-test/roles/update_variablestore/handlers/main.yml b/ansible/template-test/roles/update_variablestore/handlers/main.yml new file mode 100644 index 00000000..f781b189 --- /dev/null +++ b/ansible/template-test/roles/update_variablestore/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for update_variablestore diff --git a/ansible/template-test/roles/update_variablestore/meta/main.yml b/ansible/template-test/roles/update_variablestore/meta/main.yml new file mode 100644 index 00000000..c572acc9 --- /dev/null +++ b/ansible/template-test/roles/update_variablestore/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/template-test/roles/update_variablestore/tasks/main.yml b/ansible/template-test/roles/update_variablestore/tasks/main.yml new file mode 100644 index 00000000..315992d8 --- /dev/null +++ b/ansible/template-test/roles/update_variablestore/tasks/main.yml @@ -0,0 +1,6 @@ +--- +# tasks file for update_variablestore +- name: Add variable to variable store + set_fact: + variablestore: "{{ variablestore + additional_variables }}" + loop: "{{template_map[template]}}" \ No newline at end of file diff --git a/ansible/template-test/roles/update_variablestore/tests/inventory b/ansible/template-test/roles/update_variablestore/tests/inventory new file mode 100644 index 00000000..878877b0 --- /dev/null +++ b/ansible/template-test/roles/update_variablestore/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/template-test/roles/update_variablestore/tests/test.yml b/ansible/template-test/roles/update_variablestore/tests/test.yml new file mode 100644 index 00000000..2a29c03c --- /dev/null +++ b/ansible/template-test/roles/update_variablestore/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - update_variablestore diff --git a/ansible/template-test/roles/update_variablestore/vars/main.yml b/ansible/template-test/roles/update_variablestore/vars/main.yml new file mode 100644 index 00000000..48a3ae52 --- /dev/null +++ b/ansible/template-test/roles/update_variablestore/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for update_variablestore diff --git a/ansible/template-test/roles/update_workspace_variables/README.md b/ansible/template-test/roles/update_workspace_variables/README.md new file mode 100644 index 00000000..225dd44b --- /dev/null +++ b/ansible/template-test/roles/update_workspace_variables/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/ansible/template-test/roles/update_workspace_variables/defaults/main.yml b/ansible/template-test/roles/update_workspace_variables/defaults/main.yml new file mode 100644 index 00000000..374b44b9 --- /dev/null +++ b/ansible/template-test/roles/update_workspace_variables/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for update_vars_in_workspace diff --git a/ansible/template-test/roles/update_workspace_variables/handlers/main.yml b/ansible/template-test/roles/update_workspace_variables/handlers/main.yml new file mode 100644 index 00000000..f7779dea --- /dev/null +++ b/ansible/template-test/roles/update_workspace_variables/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for update_vars_in_workspace diff --git a/ansible/template-test/roles/update_workspace_variables/meta/main.yml b/ansible/template-test/roles/update_workspace_variables/meta/main.yml new file mode 100644 index 00000000..c572acc9 --- /dev/null +++ b/ansible/template-test/roles/update_workspace_variables/meta/main.yml @@ -0,0 +1,52 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.1 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/ansible/template-test/roles/update_workspace_variables/tasks/main.yml b/ansible/template-test/roles/update_workspace_variables/tasks/main.yml new file mode 100644 index 00000000..24620002 --- /dev/null +++ b/ansible/template-test/roles/update_workspace_variables/tasks/main.yml @@ -0,0 +1,12 @@ +--- +# tasks file for update_workspace_variables +- name: Update Workspace Variables + uri: + url: https://schematics.cloud.ibm.com/v1/workspaces/{{ workspace.json.id }}/template_data/{{ workspace.json.template_data[0].id }}/values + method: PUT + headers: + Authorization: Bearer {{token.json.access_token}} + Content-Type: application/json + body_format: json + body: + variablestore: "{{ variablestore }}" \ No newline at end of file diff --git a/ansible/template-test/roles/update_workspace_variables/tests/inventory b/ansible/template-test/roles/update_workspace_variables/tests/inventory new file mode 100644 index 00000000..878877b0 --- /dev/null +++ b/ansible/template-test/roles/update_workspace_variables/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/ansible/template-test/roles/update_workspace_variables/tests/test.yml b/ansible/template-test/roles/update_workspace_variables/tests/test.yml new file mode 100644 index 00000000..da802233 --- /dev/null +++ b/ansible/template-test/roles/update_workspace_variables/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - update_vars_in_workspace diff --git a/ansible/template-test/roles/update_workspace_variables/vars/main.yml b/ansible/template-test/roles/update_workspace_variables/vars/main.yml new file mode 100644 index 00000000..e3df7a11 --- /dev/null +++ b/ansible/template-test/roles/update_workspace_variables/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for update_vars_in_workspace diff --git a/client/package-lock.json b/client/package-lock.json index 69abd4ee..26088f54 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -12235,9 +12235,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -13478,7 +13478,7 @@ "dev": true, "dependencies": { "eventemitter3": "^4.0.0", - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "requires-port": "^1.0.0" }, "engines": { diff --git a/client/src/app.scss b/client/src/app.scss index 5464bd43..fa06428e 100644 --- a/client/src/app.scss +++ b/client/src/app.scss @@ -1195,6 +1195,12 @@ div .sgFormTopMargin { color: #da1e28; } +.spanPadding { + padding: 0.2rem; + font-size: 85%; + font-weight: bold; +} + .serviceOpen { color: #0f62fe; box-shadow: 0 10px 14px 0 rgba(0, 0, 0, 0.24), diff --git a/client/src/components/pages/CraigForms.js b/client/src/components/pages/CraigForms.js index cc97fd03..2a0a6137 100644 --- a/client/src/components/pages/CraigForms.js +++ b/client/src/components/pages/CraigForms.js @@ -1098,6 +1098,9 @@ function craigForms(craig) { pi_ibmi_pha: craig.power_instances.pi_ibmi_pha, pi_ibmi_rds_users: craig.power_instances.pi_ibmi_rds_users, }, + { + pi_health_status: craig.power_instances.pi_health_status, + }, { heading: { name: "Boot Volume", @@ -1628,6 +1631,7 @@ function craigForms(craig) { pi_license_repository_capacity: craig.vtl.pi_license_repository_capacity, pi_storage_pool_affinity: craig.vtl.pi_storage_pool_affinity, + pi_health_status: craig.vtl.pi_health_status, }, { heading: { diff --git a/client/src/components/pages/JsonDocs.js b/client/src/components/pages/JsonDocs.js index b2ffc28d..9d0eb23b 100644 --- a/client/src/components/pages/JsonDocs.js +++ b/client/src/components/pages/JsonDocs.js @@ -2,7 +2,17 @@ import { CarbonCodeMirror } from "carbon-react-code-mirror"; import { prettyJSON, keys, azsort, getType } from "lazy-z"; import React from "react"; import "./json-docs.css"; -const schema = require("../../lib/docs/schema.json"); +import { state } from "../../lib"; + +/** + * initialize store + * @returns {lazyZState} state store + */ +function newState() { + let store = new state(); + store.setUpdateCallback(() => {}); + return store; +} export const JsonDocs = (props) => { /** @@ -62,7 +72,7 @@ export const JsonDocs = (props) => { with CRAIG and may cause application crashes or errors.


- + ); }; diff --git a/client/src/components/pages/ReleaseNotes.js b/client/src/components/pages/ReleaseNotes.js index 6c521456..55438fe6 100644 --- a/client/src/components/pages/ReleaseNotes.js +++ b/client/src/components/pages/ReleaseNotes.js @@ -1,42 +1,53 @@ import { Accordion, AccordionItem } from "@carbon/react"; import "./releasenotes.scss"; +import { RegexButWithWords } from "regex-but-with-words"; +import { titleCase } from "lazy-z"; const { releaseNotes } = require("../../lib"); +const replaceFirstBacktickExp = new RegexButWithWords() + .literal("`") + .look.ahead((exp) => { + exp + .negatedSet((exp) => exp.literal("`,").whitespace()) + .anyNumber() + .literal("`"); + }) + .done("g"); const ReleaseNote = (props) => { return ( - +
- {"upgrade_notes" in props.note && ( - <> -
Upgrade Notes:
-
    - {props.note.upgrade_notes.map((fix, index) => ( -
  • {fix}
  • - ))} -
- - )} - {"features" in props.note && ( - <> -
Features:
-
    - {props.note.features.map((feature, index) => ( -
  • {feature}
  • - ))} -
- - )} - {"fixes" in props.note && ( - <> -
Fixes:
-
    - {props.note.fixes.map((fix, index) => ( -
  • {fix}
  • - ))} -
- - )} + { + // for each field + ["upgrade_notes", "features", "fixes"].map((field) => { + // if the field is part of the note object and there is at least one entry + if (props.note[field] && props.note[field].length > 0) + // render ist of items + return ( + <> +
{titleCase(field) + ":"}
+
    + {props.note[field].map((item, index) => ( +
  • ' + ) + .replace(/`/g, ""), + }} + /> + ))} +
+ + ); + }) + }
); diff --git a/client/src/components/pages/projects/Wizard.js b/client/src/components/pages/projects/Wizard.js index a28041be..8f83328e 100644 --- a/client/src/components/pages/projects/Wizard.js +++ b/client/src/components/pages/projects/Wizard.js @@ -93,8 +93,17 @@ class Wizard extends React.Component { if (name === "region") { this.setState({ region: value, - power_vs_zones: ["dal12", "wdc06"], }); + } + if (name === "ha_power_zone_site_1" && value !== "") { + let powerHaMap = { + mad02: "eu-de-1", + mad04: "eu-de-2", + "us-east": "us-south", + wdc06: "dal12", + wdc07: "dal10", + }; + this.setState({ power_vs_zones: [value].concat([powerHaMap[value]]) }); } else this.setState({ [name]: value }); } @@ -106,7 +115,7 @@ class Wizard extends React.Component { }); } else if (name === "power_vs_high_availability" && !this.state[name]) { this.setState({ - [name]: !this.state.name, + [name]: !this.state[name], power_vs_zones: [], }); } else this.setState({ [name]: !this.state[name] }); @@ -386,66 +395,107 @@ class Wizard extends React.Component { )} - {this.state.enable_power_vs && ( + {this.state.enable_power_vs && + !this.state.power_vs_high_availability && ( + + (item ? item : "")} + invalid={ + !contains( + [ + "au-syd", + "us-south", + "eu-de", + "eu-gb", + "eu-es", + "us-east", + "br-sao", + "jp-tok", + "ca-tor", + ], + this.state.region + ) || isEmpty(this.state.power_vs_zones) + } + invalidText={ + !contains( + [ + "au-syd", + "us-south", + "eu-de", + "eu-gb", + "eu-es", + "us-east", + "br-sao", + "jp-tok", + "ca-tor", + ], + this.state.region + ) + ? `The region ${this.state.region} does not have any available Power VS zones` + : "Select at least one Availability Zone" + } + /> + + )} + {this.state.power_vs_high_availability && ( - (item ? item : "")} - invalid={ - !contains( - [ - "au-syd", - "us-south", - "eu-de", - "eu-gb", - "eu-es", - "us-east", - "br-sao", - "jp-tok", - "ca-tor", - ], - this.state.region - ) || isEmpty(this.state.power_vs_zones) - } - invalidText={ - !contains( - [ - "au-syd", - "us-south", - "eu-de", - "eu-gb", - "eu-es", - "us-east", - "br-sao", - "jp-osa", - "ca-tor", - ], - this.state.region + id="ha_power_zone_site_1" + name="ha_power_zone_site_1" + labelText="Power VS Site 1" + onChange={this.handleChange} + value={this.state.power_vs_zones[0] || ""} + invalid={isEmpty(this.state.power_vs_zones)} + invalidText="Select an Availability Zone" + > + {["", "mad02", "mad04", "us-east", "wdc06", "wdc07"].map( + (value) => ( + ) - ? `The region ${this.state.region} does not have any available Power VS zones` - : "Select at least one Availability Zone" - } - /> + )} + + )} diff --git a/client/src/lib/docs/docs.json b/client/src/lib/docs/docs.json index 503ffc1d..48d06483 100644 --- a/client/src/lib/docs/docs.json +++ b/client/src/lib/docs/docs.json @@ -2103,7 +2103,7 @@ "text": "Classic network gateways control network traffic and can improve network performance and security by routing VLAN traffic. Gateways can be created in either standalone or high-availability (HA) mode. Enabling HA allows for nodes to take over for other failing nodes in the cluster, in cases where your service may be experiencing an outage or high volumes of traffic. HA ensures that your service remains available even during unexpected scenarios." }, { - "text": "When creating a classic gateway, you will need to have first created a classic SSH key and a private classic VLAN. If you wish to also attach a public classic VLAN to your gateway, you will have create that beforehand as well. You also will need to attach a domain and select a datacenter." + "text": "When creating a classic gateway, you will need to have first created a classic SSH key and a private classic VLAN. If you wish to also attach a public classic VLAN to your gateway, you will have to create that beforehand as well. You also will need to attach a domain and select a datacenter." }, { "text": "You will need to select a disk key name, package name, OS key name, and process key name. These fields will be determined by the hardware specifications you'd like to allocate to your gateway. Currently, only IBM Cloud Juniper vSRX gateways are supported in CRAIG." @@ -2294,41 +2294,247 @@ "cis_glbs": { "content": [ { - "text": "NYI" + "text": "A global load balancer manages traffic across server resources located in multiple regions. A global load balancer manages an origin pool implementation that allows for the traffic to be distributed to multiple origins. An origin pool is a group of origin servers that traffic is intelligently routed to when attached to a global load balancer. The benefits of a Global Load Balancer are minimized response time, higher availability through redundancy, and maximized traffic throughput." + }, + { + "text": "A global load balancer health check helps gain insight into the availability of pools so that traffic can be routed to the healthy ones. These checks periodically send HTTP, HTTPS, or TCP requests and monitor the responses. They can be configured with a customized port, interval, timeout, status code, and more. As soon as a pool is marked unhealthy, traffic is intelligently rerouted to another available pool." + }, + { + "text": "By default, no CIS Global Load Balancers are created." } ], - "relatedLinks": [] + "relatedLinks": [ + [ + "https://cloud.ibm.com/docs/cis?topic=cis-global-load-balancer-glb-concepts#:~:text=A%20global%20load%20balancer%20manages,is%20not%20a%20primary%20concern.", + "Global Load Balancer Concepts" + ], + [ + "https://cloud.ibm.com/docs/cis?topic=cis-configure-glb", + "Configuring a Gloabl Load Balancer" + ], + [ + "https://cloud.ibm.com/docs/cis?topic=cis-glb-features-pools", + "Setting up Origin Pools" + ], + [ + "https://cloud.ibm.com/docs/cis?topic=cis-glb-features-healthchecks", + "Setting up Health Checks" + ], + [ + "https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cis_global_load_balancer", + "IBM Cloud Global Load Balancer Terraform Documentation" + ] + ], + "last_updated": "03/18/2024" }, "fortigate_vnf": { "content": [ { - "text": "NYI" + "text": "FortiGate® Virtual Appliance on IBM Cloud® deploys a pair of FortiGate Virtual Appliances to your environment, which can help you reduce risk by implementing critical security controls within your virtual infrastructure. FortiGate Virtual Appliance on IBM Cloud is a non-IBM product that is offered under terms and conditions from Fortinet, not IBM." + }, + { + "text": "By combining stateful inspection with a comprehensive suite of powerful security features, FortiGate next generation firewall technology delivers complete content and network protection. In addition to advanced features such as an extreme threat database, vulnerability management, and flow-based inspection, features including application control, firewall, antivirus, IPS, web filter, and VPN work in concert to identify and mitigate the latest complex security threats." + }, + { + "text": "In order to provision a Fortigate Instance, you must have a VPC, SSH Key, and 2 Subnets created in CRAIG" } ], - "relatedLinks": [] + "relatedLinks": [ + [ + "https://cloud.ibm.com/docs/vmwaresolutions?topic=vmwaresolutions-fortinetvm_considerations", + "Fortigate Virtual Appliance Overview" + ], + [ + "https://docs.fortinet.com/document/fortigate-public-cloud/7.4.0/ibm-cloud-administration-guide/123172/about-fortigate-for-ibm-cloud", + "About Fortigate on IBM Cloud (Fortinet Documentation)" + ] + ], + "last_updated": "03/18/2024" }, "classic_security_groups": { "content": [ { - "text": "NYI" + "text": "An IBM Cloud Security Group is a set of IP filter rules that define how to handle incoming and outgoing traffic to both the public and private interfaces of a virtual server instance (VSI).", + "className": "marginBottomSmall" + }, + { + "text": "By default, no Classic Security Groups are created." } ], - "relatedLinks": [] + "relatedLinks": [ + [ + "https://cloud.ibm.com/docs/security-groups?topic=security-groups-about-ibm-security-groups" + ], + [ + "https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/security_group", + "Classic Security Group Terraform Documentation" + ], + [ + "https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/security_group_rule", + "Classic Security Group Rule Terraform Documentation" + ] + ], + "last_updated": "3/19/2024" }, "classic_vsi": { "content": [ { - "text": "NYI" + "text": "Classic Virtual Servers are scalable virtual servers that are purchased with cores and memory allocations. Virtual servers are deployed to the same VLANs as physical servers, which spread workloads across virtual servers and bare metal servers, while interoperability is maintained.", + "className": "marginBottomSmall" + }, + { + "text": "When creating a Classic VSI, you will need to have first created a classic SSH key and a private classic VLAN. If you wish to also attach a public classic VLAN to your gateway, you will have to create that beforehand as well.", + "className": "marginBottomSmall" + }, + { + "subHeading": "Required Fields" + }, + { + "table": [ + ["_headers", "Field", "Description"], + ["Name", "The host name for the compute instance."], + ["Domain", "The domain of the compute instance."], + [ + "Datacenter", + "The data center in which you want to provision the instance." + ], + ["Cores", "The number of CPU cores that you want to allocate."], + [ + "Memory", + "The amount of memory, expressed in megabytes, that you want to allocate." + ], + [ + "Image ID", + "The image template ID that you want to use to provision the computing instance. This is not the global identifier (UUID), but the image template group ID that should point to a valid global identifier. To retrieve the image template ID from the IBM Cloud infrastructure customer portal, navigate to Classic Infrastructure > Devices > Manage > Images, click the image that you want, and note the ID number in the resulting URL." + ], + [ + "Network Speed", + "The connection speed (in Mbps) for the instance's network components. The default value is 100." + ], + [ + "Local Disk", + "The disk type for the instance. When set to true, the disks for the computing instance are provisioned on the host that the instance runs. Otherwise, SAN disks are provisioned." + ], + [ + "SSH Keys", + "The SSH key IDs to install on the computing instance when the instance provisions." + ], + [ + "Private VLAN", + "The private VLAN to be used for the private network interface of the instance." + ], + [ + "Private Security Groups", + "The IDs of security groups to apply on the private interface. This attribute can't be updated. You can use this parameter to add a security group to your virtual server instance when you create it." + ], + [ + "Private Network Only", + "When set to true, a compute instance only has access to the private network. The default value is false." + ], + [ + "Public VLAN", + "The public VLAN to be used for the public network interface of the instance." + ], + [ + "Public Security Groups", + "The IDs of security groups to apply on the public interface. This attribute can't be updated. You can use this parameter to add a security group to your virtual server instance when you create it." + ] + ] } ], - "relatedLinks": [] + "relatedLinks": [ + [ + "https://cloud.ibm.com/docs/virtual-servers?topic=virtual-servers-getting-started-tutorial" + ], + [ + "https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/compute_vm_instance", + "Classic VSI Terraform Documentation" + ], + [ + "https://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/", + "IBM Cloud Classic Infrastructure (SoftLayer) API docs" + ] + ], + "last_updated": "3/20/2024" }, "classic_bare_metal": { "content": [ { - "text": "NYI" + "text": "Classic Bare Metal Servers are single-tenant, dedicated physical servers that can be deployed and managed as cloud services.", + "className": "marginBottomSmall" + }, + { + "text": "When creating a Classic Bare Metal, you will need to have first created a private classic VLAN. If you wish to also attach a public classic VLAN to your gateway, you will have to create that beforehand as well.", + "className": "marginBottomSmall" + }, + { + "subHeading": "Required Fields" + }, + { + "table": [ + ["_headers", "Field", "Description"], + ["Name", "The host name for the compute instance."], + ["Domain", "The domain of the compute instance."], + [ + "Datacenter", + "The data center in which you want to provision the instance." + ], + [ + "OS Key Name", + "The operating system key name that you want to use to provision the compute instance. To find available OS key names use IBM Cloud Classic SoftLayer API by referring to the instructions in the Terraform documentation linked below." + ], + [ + "Package Key Name", + "The key name for the monthly Bare Metal server's package. To find available package key names use IBM Cloud Classic SoftLayer API by referring to the instructions in the Terraform documentation linked below." + ], + [ + "Process Key Name", + "The key name for the monthly Bare Metal server's process. To find available process key names use IBM Cloud Classic SoftLayer API by referring to the instructions in the Terraform documentation linked below." + ], + [ + "Memory", + "The amount of memory, which is specified in gigabytes, for the server." + ], + [ + "Network Speed", + "The connection speed, expressed in Mbps, for the instance's network components." + ], + [ + "Private Network Only", + "When set to true, a compute instance only has access to the private network. The default value is false." + ], + [ + "Private VLAN", + "The private VLAN to be used for the private network interface of the instance." + ], + [ + "Public VLAN", + "The public VLAN to be used for the public network interface of the instance." + ], + [ + "Public Bandwidth", + "The amount of public network traffic, which is specified in gigabytes, allowed per month." + ], + [ + "Disk Key Names", + "The internal key names for the monthly Bare Metal server's disk. Use this argument when you create a new monthly Bare Metal server. To get disk key names, use IBM Cloud Classic SoftLayer API by referring to the instructions in the Terraform documentation linked below." + ] + ] } ], - "relatedLinks": [] + "relatedLinks": [ + [ + "https://cloud.ibm.com/docs/bare-metal?topic=bare-metal-getting-started" + ], + [ + "https://www.ibm.com/products/bare-metal-servers/classic", + "Classic Bare Metal Product Page" + ], + [ + "https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/compute_bare_metal", + "Classic Bare Metal Terraform Documentation" + ] + ], + "last_updated": "3/20/2024" } } diff --git a/client/src/lib/docs/release-notes.json b/client/src/lib/docs/release-notes.json index c9c2d3cc..3caf6f8e 100644 --- a/client/src/lib/docs/release-notes.json +++ b/client/src/lib/docs/release-notes.json @@ -1,4 +1,24 @@ [ + { + "version": "1.13.1", + "features": [ + "Terraform code for Power VS Instances and FalconStor VTL instances now have a 3 hour create timeout instead of the default 2 hour timeout", + "Power VS Network names and IDs are now included as outputs in CRAIG generated Terraform", + "Items highlighted for emphasis in the markdown for CRAIG `CHANGELOG.md` are now also highlighted on the `/docs/releaseNotes` page", + "Users can now select a Health Status for Power VS Instances and FalconStor VTL instances", + "Power VS SSH Key names are now output in Terraform `outputs.tf` files", + "Power VS Workspace locations are now output in Terraform `outputs.tf` files", + "Object Storage Bucket names and region locations are now output in Terraform `outputs.tf` files" + ], + "fixes": ["Fixed an issue causing FalconStor VTL form in modals to crash"], + "upgrade_notes": [ + "A new script `/lib/template-updater.js` has been added to update most unfound fields in CRAIG defined template JSON files", + "The CRAIG JSON schema is now configured dynamically using the state store on the `/docs/json` page. Additional fields will now be added automatically", + "`.env.example` has been updated to include a warning that included quotation marks in .env values will cause the application to crash", + "When fetching VSI Images, the Craig API has no limit on the number of images that can be retrieved. In addition, only available images are retrieved", + "Power VS Network interface outputs now use the Terraform field `pi_network_name` instead of the depricated field `name`" + ] + }, { "version": "1.13.0", "features": [ diff --git a/client/src/lib/docs/templates/from-scratch.json b/client/src/lib/docs/templates/from-scratch.json index 6806a051..adc63ef2 100644 --- a/client/src/lib/docs/templates/from-scratch.json +++ b/client/src/lib/docs/templates/from-scratch.json @@ -13,7 +13,9 @@ "craig_version": "1.12.0", "power_vs_zones": [], "power_vs_high_availability": false, - "no_vpn_secrets_manager_auth": false + "no_vpn_secrets_manager_auth": false, + "power_vs_ha_zone_1": null, + "power_vs_ha_zone_2": null }, "access_groups": [], "appid": [], @@ -28,10 +30,13 @@ "locations": ["global", "us-south"], "instance": false, "plan": "lite", - "resource_group": null + "resource_group": null, + "archive": false }, "cbr_rules": [], "cbr_zones": [], + "classic_ssh_keys": [], + "classic_vlans": [], "clusters": [], "dns": [], "event_streams": [], @@ -101,7 +106,5 @@ "vpcs": [], "vpn_gateways": [], "vpn_servers": [], - "vsi": [], - "classic_ssh_keys": [], - "classic_vlans": [] + "vsi": [] } diff --git a/client/src/lib/docs/templates/oracle-rac.json b/client/src/lib/docs/templates/oracle-rac.json index 6f6d98de..6a1ec1f3 100644 --- a/client/src/lib/docs/templates/oracle-rac.json +++ b/client/src/lib/docs/templates/oracle-rac.json @@ -13,7 +13,9 @@ "power_vs_zones": ["dal12", "dal10", "us-south"], "craig_version": "1.10.0", "power_vs_high_availability": false, - "no_vpn_secrets_manager_auth": false + "no_vpn_secrets_manager_auth": false, + "power_vs_ha_zone_1": null, + "power_vs_ha_zone_2": null }, "access_groups": [], "appid": [], @@ -28,10 +30,13 @@ "locations": ["global", "us-south"], "instance": false, "plan": "lite", - "resource_group": null + "resource_group": null, + "archive": false }, "cbr_rules": [], "cbr_zones": [], + "classic_ssh_keys": [], + "classic_vlans": [], "clusters": [], "dns": [], "event_streams": [], @@ -175,7 +180,8 @@ "use_data": false, "resource_group": "management-rg", "workspace": "oracle-template", - "zone": "dal12" + "zone": "dal12", + "workspace_use_data": false } ], "network": [ @@ -186,7 +192,9 @@ "pi_dns": ["127.0.0.1"], "pi_network_jumbo": false, "workspace": "oracle-template", - "zone": "dal12" + "zone": "dal12", + "workspace_use_data": false, + "pi_network_mtu": "1500" }, { "name": "oracle-private-1", @@ -195,7 +203,9 @@ "pi_dns": ["127.0.0.1"], "pi_network_jumbo": false, "workspace": "oracle-template", - "zone": "dal12" + "zone": "dal12", + "workspace_use_data": false, + "pi_network_mtu": "1500" }, { "name": "oracle-private-2", @@ -204,50 +214,24 @@ "pi_dns": ["127.0.0.1"], "pi_network_jumbo": false, "workspace": "oracle-template", - "zone": "dal12" - } - ], - "cloud_connections": [ - { - "name": "oracle-connection", - "pi_cloud_connection_speed": "50", - "pi_cloud_connection_global_routing": false, - "pi_cloud_connection_metered": false, - "pi_cloud_connection_transit_enabled": true, - "transit_gateways": ["transit-gateway"], - "workspace": "oracle-template", - "zone": "dal12" + "zone": "dal12", + "workspace_use_data": false, + "pi_network_mtu": "1500" } ], + "cloud_connections": [], "images": [ { "name": "7300-00-01", "workspace": "oracle-template", "zone": "dal12", - "pi_image_id": "2cf98f53-433d-4c7a-bc46-1f2dfcc04066" + "pi_image_id": "2cf98f53-433d-4c7a-bc46-1f2dfcc04066", + "workspace_use_data": false } ], - "attachments": [ - { - "network": "oracle-public", - "workspace": "oracle-template", - "zone": "dal12", - "connections": ["oracle-connection"] - }, - { - "network": "oracle-private-1", - "workspace": "oracle-template", - "zone": "dal12", - "connections": ["oracle-connection"] - }, - { - "network": "oracle-private-2", - "workspace": "oracle-template", - "zone": "dal12", - "connections": ["oracle-connection"] - } - ], - "imageNames": ["7300-00-01"] + "attachments": [], + "imageNames": ["7300-00-01"], + "use_data": false } ], "power_instances": [ @@ -279,7 +263,22 @@ "pi_sys_type": "s922", "storage_option": "Storage Type", "affinity_type": null, - "pi_storage_pool_affinity": true + "pi_storage_pool_affinity": true, + "sap": false, + "sap_profile": null, + "primary_subnet": "oracle-private-1", + "pi_storage_pool": null, + "pi_affinity_policy": null, + "pi_affinity_volume": null, + "pi_affinity_instance": null, + "pi_anti_affinity_volume": null, + "pi_anti_affinity_instance": null, + "pi_ibmi_css": false, + "pi_ibmi_pha": false, + "pi_ibmi_rds_users": null, + "pi_user_data": null, + "pi_pin_policy": "none", + "pi_license_repository_capacity": null }, { "name": "oracle-2", @@ -307,7 +306,24 @@ "ssh_key": "power-ssh", "pi_sys_type": "s922", "pi_processors": "2", - "pi_memory": "32" + "pi_memory": "32", + "sap": false, + "sap_profile": null, + "primary_subnet": "oracle-private-1", + "pi_storage_pool_affinity": false, + "pi_storage_pool": null, + "affinity_type": null, + "pi_affinity_policy": null, + "pi_affinity_volume": null, + "pi_affinity_instance": null, + "pi_anti_affinity_volume": null, + "pi_anti_affinity_instance": null, + "pi_ibmi_css": false, + "pi_ibmi_pha": false, + "pi_ibmi_rds_users": null, + "pi_user_data": null, + "pi_pin_policy": "none", + "pi_license_repository_capacity": null } ], "power_volumes": [ @@ -326,7 +342,10 @@ "pi_anti_affinity_volume": null, "pi_anti_affinity_instance": null, "pi_affinity_policy": "affinity", - "pi_affinity_instance": "oracle-1" + "pi_affinity_instance": "oracle-1", + "pi_volume_pool": null, + "pi_affinity_volume": null, + "count": null }, { "name": "oracle-1-db-2", @@ -343,7 +362,10 @@ "pi_anti_affinity_volume": null, "pi_anti_affinity_instance": null, "pi_affinity_policy": "affinity", - "pi_affinity_instance": "oracle-1" + "pi_affinity_instance": "oracle-1", + "pi_volume_pool": null, + "pi_affinity_volume": null, + "count": null }, { "name": "oracle-2-db-1", @@ -360,7 +382,10 @@ "pi_anti_affinity_volume": null, "pi_anti_affinity_instance": null, "pi_affinity_policy": "affinity", - "pi_affinity_instance": "oracle-2" + "pi_affinity_instance": "oracle-2", + "pi_volume_pool": null, + "pi_affinity_volume": null, + "count": null }, { "name": "oracle-2-db-2", @@ -377,7 +402,10 @@ "pi_anti_affinity_volume": null, "pi_anti_affinity_instance": null, "pi_affinity_policy": "affinity", - "pi_affinity_instance": "oracle-2" + "pi_affinity_instance": "oracle-2", + "pi_volume_pool": null, + "pi_affinity_volume": null, + "count": null }, { "name": "redo-1", @@ -389,7 +417,14 @@ "zone": "dal12", "pi_volume_size": "50", "storage_option": "Storage Type", - "affinity_type": null + "affinity_type": null, + "pi_volume_pool": null, + "pi_affinity_policy": null, + "pi_affinity_volume": null, + "pi_affinity_instance": null, + "pi_anti_affinity_volume": null, + "pi_anti_affinity_instance": null, + "count": null }, { "name": "redo-2", @@ -401,7 +436,14 @@ "zone": "dal12", "pi_volume_size": "50", "storage_option": "Storage Type", - "affinity_type": null + "affinity_type": null, + "pi_volume_pool": null, + "pi_affinity_policy": null, + "pi_affinity_volume": null, + "pi_affinity_instance": null, + "pi_anti_affinity_volume": null, + "pi_anti_affinity_instance": null, + "count": null }, { "name": "asm-data-1", @@ -419,7 +461,9 @@ "pi_affinity_volume": null, "pi_affinity_instance": null, "pi_anti_affinity_volume": null, - "pi_anti_affinity_instance": null + "pi_anti_affinity_instance": null, + "pi_volume_pool": null, + "count": null }, { "name": "asm-data-2", @@ -431,7 +475,14 @@ "zone": "dal12", "pi_volume_size": "100", "storage_option": "Storage Type", - "affinity_type": null + "affinity_type": null, + "pi_volume_pool": null, + "pi_affinity_policy": null, + "pi_affinity_volume": null, + "pi_affinity_instance": null, + "pi_anti_affinity_volume": null, + "pi_anti_affinity_instance": null, + "count": null }, { "name": "management", @@ -443,7 +494,14 @@ "zone": "dal12", "pi_volume_size": "80", "storage_option": "Storage Type", - "affinity_type": null + "affinity_type": null, + "pi_volume_pool": null, + "pi_affinity_policy": null, + "pi_affinity_volume": null, + "pi_affinity_instance": null, + "pi_anti_affinity_volume": null, + "pi_anti_affinity_instance": null, + "count": null }, { "name": "vote-1", @@ -460,7 +518,10 @@ "pi_anti_affinity_volume": null, "pi_anti_affinity_instance": null, "pi_affinity_policy": "affinity", - "pi_affinity_instance": "oracle-1" + "pi_affinity_instance": "oracle-1", + "pi_volume_pool": null, + "pi_affinity_volume": null, + "count": null }, { "name": "vote-2", @@ -477,7 +538,10 @@ "pi_anti_affinity_volume": null, "pi_anti_affinity_instance": null, "pi_affinity_policy": "affinity", - "pi_affinity_instance": "oracle-1" + "pi_affinity_instance": "oracle-1", + "pi_volume_pool": null, + "pi_affinity_volume": null, + "count": null }, { "name": "vote-3", @@ -494,7 +558,10 @@ "pi_anti_affinity_volume": null, "pi_anti_affinity_instance": null, "pi_affinity_policy": "affinity", - "pi_affinity_instance": "oracle-1" + "pi_affinity_instance": "oracle-1", + "pi_volume_pool": null, + "pi_affinity_volume": null, + "count": null } ], "resource_groups": [ @@ -555,7 +622,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -574,7 +646,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -593,7 +670,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -612,7 +694,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -631,7 +718,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -650,9 +742,15 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "workload", @@ -676,7 +774,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -695,7 +798,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -714,7 +822,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -733,7 +846,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -752,7 +870,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -771,9 +894,15 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "management", @@ -797,7 +926,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -816,7 +950,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -835,7 +974,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -854,7 +998,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -873,7 +1022,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -892,9 +1046,15 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false } ], "ssh_keys": [ @@ -927,7 +1087,12 @@ "tgw": "transit-gateway", "vpc": "workload" } - ] + ], + "use_data": false, + "prefix_filters": [], + "gre_tunnels": [], + "crns": null, + "classic": false } ], "virtual_private_endpoints": [ @@ -1108,7 +1273,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1133,7 +1305,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1158,7 +1337,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1183,11 +1369,34 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } - ] + ], + "subnetTiers": [ + { + "name": "vsi", + "zones": 3 + }, + { + "name": "vpn", + "zones": 1 + }, + { + "name": "vpe", + "zones": 3 + } + ], + "use_data": false }, { "cos": "cos", @@ -1330,7 +1539,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1355,7 +1571,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1380,7 +1603,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1405,11 +1635,30 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } - ] + ], + "subnetTiers": [ + { + "name": "vsi", + "zones": 3 + }, + { + "name": "vpe", + "zones": 3 + } + ], + "use_data": false } ], "vpn_gateways": [ @@ -1417,7 +1666,10 @@ "name": "management-gateway", "resource_group": "management-rg", "subnet": "vpn-zone-1", - "vpc": "management" + "vpc": "management", + "connections": [], + "policy_mode": false, + "additional_prefixes": [] } ], "vpn_servers": [], @@ -1435,9 +1687,12 @@ "vsi_per_subnet": 2, "resource_group": "management-rg", "override_vsi_name": null, - "user_data": "", + "user_data": null, "network_interfaces": [], - "volumes": [] + "volumes": [], + "image_name": null, + "enable_floating_ip": false, + "primary_interface_ip_spoofing": false }, { "kms": "kms", @@ -1457,9 +1712,8 @@ "subnets": ["vsi-zone-1", "vsi-zone-2", "vsi-zone-3"], "volumes": [], "subnet": "", - "enable_floating_ip": false + "enable_floating_ip": false, + "primary_interface_ip_spoofing": false } - ], - "classic_ssh_keys": [], - "classic_vlans": [] + ] } diff --git a/client/src/lib/docs/templates/oracle-si.json b/client/src/lib/docs/templates/oracle-si.json index 367601ea..07381573 100644 --- a/client/src/lib/docs/templates/oracle-si.json +++ b/client/src/lib/docs/templates/oracle-si.json @@ -12,7 +12,10 @@ "power_vs_zones": ["dal12", "dal10", "us-south"], "craig_version": "1.12.0", "power_vs_high_availability": false, - "no_vpn_secrets_manager_auth": false + "no_vpn_secrets_manager_auth": false, + "enable_classic": false, + "power_vs_ha_zone_1": null, + "power_vs_ha_zone_2": null }, "access_groups": [], "appid": [], @@ -27,10 +30,13 @@ "locations": ["global", "us-south"], "instance": false, "plan": "lite", - "resource_group": null + "resource_group": null, + "archive": false }, "cbr_rules": [], "cbr_zones": [], + "classic_ssh_keys": [], + "classic_vlans": [], "clusters": [], "dns": [], "event_streams": [], @@ -174,7 +180,8 @@ "use_data": false, "resource_group": "management-rg", "workspace": "oracle-template", - "zone": "dal12" + "zone": "dal12", + "workspace_use_data": false } ], "network": [ @@ -185,38 +192,24 @@ "pi_dns": ["127.0.0.1"], "pi_network_jumbo": false, "workspace": "oracle-template", - "zone": "dal12" - } - ], - "cloud_connections": [ - { - "name": "oracle-connection", - "pi_cloud_connection_speed": "50", - "pi_cloud_connection_global_routing": false, - "pi_cloud_connection_metered": false, - "pi_cloud_connection_transit_enabled": true, - "transit_gateways": ["transit-gateway"], - "workspace": "oracle-template", - "zone": "dal12" + "zone": "dal12", + "workspace_use_data": false, + "pi_network_mtu": "1500" } ], + "cloud_connections": [], "images": [ { "name": "7300-00-01", "workspace": "oracle-template", "zone": "dal12", - "pi_image_id": "2cf98f53-433d-4c7a-bc46-1f2dfcc04066" + "pi_image_id": "2cf98f53-433d-4c7a-bc46-1f2dfcc04066", + "workspace_use_data": false } ], - "attachments": [ - { - "network": "oracle-vlan", - "workspace": "oracle-template", - "zone": "dal12", - "connections": ["oracle-connection"] - } - ], - "imageNames": ["7300-00-01"] + "attachments": [], + "imageNames": ["7300-00-01"], + "use_data": false } ], "power_instances": [ @@ -240,7 +233,22 @@ "pi_sys_type": "s922", "storage_option": "Storage Type", "affinity_type": null, - "pi_storage_pool_affinity": true + "pi_storage_pool_affinity": true, + "sap": false, + "sap_profile": null, + "primary_subnet": "oracle-vlan", + "pi_storage_pool": null, + "pi_affinity_policy": null, + "pi_affinity_volume": null, + "pi_affinity_instance": null, + "pi_anti_affinity_volume": null, + "pi_anti_affinity_instance": null, + "pi_ibmi_css": false, + "pi_ibmi_pha": false, + "pi_ibmi_rds_users": null, + "pi_user_data": null, + "pi_pin_policy": "none", + "pi_license_repository_capacity": null } ], "power_volumes": [ @@ -259,7 +267,10 @@ "pi_anti_affinity_volume": null, "pi_anti_affinity_instance": null, "pi_affinity_policy": "affinity", - "pi_affinity_instance": "oracle-1" + "pi_affinity_instance": null, + "pi_volume_pool": null, + "pi_affinity_volume": null, + "count": null }, { "name": "oracle-db-2", @@ -276,7 +287,10 @@ "pi_anti_affinity_volume": null, "pi_anti_affinity_instance": null, "pi_affinity_policy": "affinity", - "pi_affinity_instance": "oracle-1" + "pi_affinity_instance": null, + "pi_volume_pool": null, + "pi_affinity_volume": null, + "count": null } ], "resource_groups": [ @@ -337,7 +351,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -356,7 +375,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -375,7 +399,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -394,7 +423,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -413,7 +447,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -432,9 +471,15 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "workload", @@ -458,7 +503,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -477,7 +527,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -496,7 +551,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -515,7 +575,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -534,7 +599,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -553,9 +623,15 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "management", @@ -579,7 +655,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -598,7 +679,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -617,7 +703,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -636,7 +727,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -655,7 +751,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -674,9 +775,15 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false } ], "ssh_keys": [ @@ -709,7 +816,12 @@ "tgw": "transit-gateway", "vpc": "workload" } - ] + ], + "use_data": false, + "prefix_filters": [], + "gre_tunnels": [], + "crns": null, + "classic": false } ], "virtual_private_endpoints": [ @@ -890,7 +1002,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -915,7 +1034,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -940,7 +1066,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -965,11 +1098,34 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } - ] + ], + "subnetTiers": [ + { + "name": "vsi", + "zones": 3 + }, + { + "name": "vpn", + "zones": 1 + }, + { + "name": "vpe", + "zones": 3 + } + ], + "use_data": false }, { "cos": "cos", @@ -1112,7 +1268,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1137,7 +1300,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1162,7 +1332,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1187,11 +1364,30 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } - ] + ], + "subnetTiers": [ + { + "name": "vsi", + "zones": 3 + }, + { + "name": "vpe", + "zones": 3 + } + ], + "use_data": false } ], "vpn_gateways": [ @@ -1199,7 +1395,10 @@ "name": "management-gateway", "resource_group": "management-rg", "subnet": "vpn-zone-1", - "vpc": "management" + "vpc": "management", + "connections": [], + "policy_mode": false, + "additional_prefixes": [] } ], "vpn_servers": [], @@ -1217,9 +1416,12 @@ "vsi_per_subnet": 2, "resource_group": "management-rg", "override_vsi_name": null, - "user_data": "", + "user_data": null, "network_interfaces": [], - "volumes": [] + "volumes": [], + "image_name": null, + "enable_floating_ip": false, + "primary_interface_ip_spoofing": false }, { "kms": "kms", @@ -1239,9 +1441,8 @@ "subnets": ["vsi-zone-1", "vsi-zone-2", "vsi-zone-3"], "volumes": [], "subnet": "", - "enable_floating_ip": false + "enable_floating_ip": false, + "primary_interface_ip_spoofing": false } - ], - "classic_vlans": [], - "classic_ssh_keys": [] + ] } diff --git a/client/src/lib/docs/templates/power-poc-quick-start.json b/client/src/lib/docs/templates/power-poc-quick-start.json index d20d6ea1..2f8a3702 100644 --- a/client/src/lib/docs/templates/power-poc-quick-start.json +++ b/client/src/lib/docs/templates/power-poc-quick-start.json @@ -13,7 +13,10 @@ "craig_version": "1.13.0", "power_vs_high_availability": false, "template": "Power VS POC", - "fs_cloud": false + "fs_cloud": false, + "power_vs_ha_zone_1": null, + "power_vs_ha_zone_2": null, + "no_vpn_secrets_manager_auth": false }, "access_groups": [], "appid": [], @@ -28,7 +31,8 @@ "locations": ["global", "us-south"], "instance": true, "plan": "lite", - "resource_group": "service-rg" + "resource_group": "service-rg", + "archive": false }, "cbr_rules": [], "cbr_zones": [], @@ -271,7 +275,14 @@ "affinity_type": null, "pi_affinity_instance": null, "pi_user_data": null, - "index": 0 + "index": 0, + "primary_subnet": "pvm", + "pi_affinity_policy": null, + "pi_ibmi_css": false, + "pi_ibmi_pha": false, + "pi_ibmi_rds_users": null, + "pi_pin_policy": "none", + "pi_license_repository_capacity": null }, { "sap": false, @@ -302,7 +313,14 @@ "zone": "dal10", "pi_affinity_policy": null, "pi_user_data": null, - "index": 1 + "index": 1, + "primary_subnet": "pvm", + "pi_ibmi_css": false, + "pi_ibmi_pha": false, + "pi_ibmi_rds_users": null, + "pi_pin_policy": "none", + "pi_license_repository_capacity": null, + "pi_health_status": "OK" } ], "power_volumes": [ @@ -562,9 +580,10 @@ "scc_v2": { "enable": false, "resource_group": null, - "region": "", + "region": null, "account_id": "${var.account_id}", - "profile_attachments": [] + "profile_attachments": [], + "name": null }, "secrets_manager": [], "security_groups": [ @@ -645,7 +664,8 @@ "type": null, "code": null } - ] + ], + "use_data": false }, { "vpc": "transit", @@ -748,13 +768,14 @@ "type": null, "code": null } - ] + ], + "use_data": false } ], "ssh_keys": [ { "name": "vsi-ssh-key", - "public_key": "", + "public_key": null, "use_data": false, "resource_group": "transit-rg" } @@ -784,7 +805,9 @@ ], "use_data": false, "gre_tunnels": [], - "prefix_filters": [] + "prefix_filters": [], + "crns": null, + "classic": false } ], "virtual_private_endpoints": [ diff --git a/client/src/lib/docs/templates/power-sap-hana.json b/client/src/lib/docs/templates/power-sap-hana.json index 36bd5753..ebd67ff7 100644 --- a/client/src/lib/docs/templates/power-sap-hana.json +++ b/client/src/lib/docs/templates/power-sap-hana.json @@ -14,7 +14,9 @@ "craig_version": "1.12.0", "power_vs_high_availability": false, "template": "Power VS SAP Hana", - "no_vpn_secrets_manager_auth": false + "no_vpn_secrets_manager_auth": false, + "power_vs_ha_zone_1": null, + "power_vs_ha_zone_2": null }, "access_groups": [], "appid": [ @@ -42,14 +44,21 @@ "locations": ["global", "us-south"], "instance": false, "plan": "lite", - "resource_group": null + "resource_group": null, + "archive": false }, "cbr_rules": [], "cbr_zones": [], + "cis": [], + "cis_glbs": [], + "classic_gateways": [], + "classic_ssh_keys": [], + "classic_vlans": [], "clusters": [], "dns": [], "event_streams": [], "f5_vsi": [], + "fortigate_vnf": [], "iam_account_settings": { "enable": false, "mfa": null, @@ -1160,7 +1169,13 @@ "pi_anti_affinity_instance": null, "pi_affinity_instance": null, "pi_user_data": null, - "primary_subnet": "backup" + "primary_subnet": "backup", + "pi_affinity_policy": null, + "pi_ibmi_css": false, + "pi_ibmi_pha": false, + "pi_ibmi_rds_users": null, + "pi_pin_policy": "none", + "pi_license_repository_capacity": null }, { "name": "sap-hana", @@ -1200,7 +1215,13 @@ "pi_storage_pool": null, "affinity_type": null, "pi_user_data": null, - "primary_subnet": "management" + "primary_subnet": "management", + "pi_affinity_policy": null, + "pi_ibmi_css": false, + "pi_ibmi_pha": false, + "pi_ibmi_rds_users": null, + "pi_pin_policy": "none", + "pi_license_repository_capacity": null }, { "name": "sap-netweaver", @@ -1240,7 +1261,13 @@ "pi_anti_affinity_instance": null, "pi_affinity_instance": null, "pi_user_data": null, - "primary_subnet": "management" + "primary_subnet": "management", + "pi_affinity_policy": null, + "pi_ibmi_css": false, + "pi_ibmi_pha": false, + "pi_ibmi_rds_users": null, + "pi_pin_policy": "none", + "pi_license_repository_capacity": null } ], "power_volumes": [ @@ -1567,6 +1594,14 @@ "scope_description": null, "enable": false }, + "scc_v2": { + "enable": true, + "resource_group": "service-rg", + "region": "us-south", + "account_id": "${var.account_id}", + "profile_attachments": [], + "name": null + }, "secrets_manager": [], "security_groups": [ { @@ -1814,7 +1849,8 @@ "type": null, "code": null } - ] + ], + "use_data": false }, { "vpc": "transit", @@ -2061,7 +2097,8 @@ "type": null, "code": null } - ] + ], + "use_data": false }, { "vpc": "workload", @@ -2308,13 +2345,14 @@ "type": null, "code": null } - ] + ], + "use_data": false } ], "ssh_keys": [ { "name": "ssh-key", - "public_key": "", + "public_key": null, "resource_group": "management-rg", "use_data": false } @@ -2352,7 +2390,9 @@ ], "use_data": false, "prefix_filters": [], - "gre_tunnels": [] + "gre_tunnels": [], + "crns": null, + "classic": false } ], "virtual_private_endpoints": [ @@ -4311,7 +4351,8 @@ "source_port_min": null, "source_port_max": null } - ] + ], + "use_data": false } ], "subnetTiers": [ @@ -4337,7 +4378,8 @@ "advanced": false, "select_zones": "1" } - ] + ], + "use_data": false }, { "cos": "cos", @@ -4777,7 +4819,8 @@ "source_port_min": null, "source_port_max": null } - ] + ], + "use_data": false } ], "subnetTiers": [ @@ -4799,7 +4842,8 @@ "advanced": false, "select_zones": "1" } - ] + ], + "use_data": false }, { "name": "transit", @@ -5434,7 +5478,8 @@ "source_port_min": null, "source_port_max": null } - ] + ], + "use_data": false } ], "bucket": "transit-bucket", @@ -5459,7 +5504,8 @@ "advanced": false, "select_zones": "1" } - ] + ], + "use_data": false } ], "vpn_gateways": [ @@ -5536,19 +5582,5 @@ "primary_interface_ip_spoofing": false } ], - "classic_ssh_keys": [], - "classic_vlans": [], - "vtl": [], - "classic_gateways": [], - "cis": [], - "scc_v2": { - "enable": true, - "resource_group": "service-rg", - "region": "us-south", - "account_id": "${var.account_id}", - "profile_attachments": [], - "name": null - }, - "cis_glbs": [], - "fortigate_vnf": [] + "vtl": [] } diff --git a/client/src/lib/docs/templates/quick-start-power.json b/client/src/lib/docs/templates/quick-start-power.json index 592763ea..b57ed9ef 100644 --- a/client/src/lib/docs/templates/quick-start-power.json +++ b/client/src/lib/docs/templates/quick-start-power.json @@ -13,7 +13,9 @@ "craig_version": "1.12.0", "power_vs_high_availability": false, "fs_cloud": false, - "no_vpn_secrets_manager_auth": false + "no_vpn_secrets_manager_auth": false, + "power_vs_ha_zone_1": null, + "power_vs_ha_zone_2": null }, "access_groups": [], "appid": [], @@ -28,10 +30,13 @@ "locations": ["global", "us-south"], "instance": false, "plan": "lite", - "resource_group": null + "resource_group": null, + "archive": false }, "cbr_rules": [], "cbr_zones": [], + "classic_ssh_keys": [], + "classic_vlans": [], "clusters": [], "dns": [], "event_streams": [], @@ -150,11 +155,13 @@ "name": "7100-05-09", "workspace": "workspace", "zone": "dal12", - "pi_image_id": "35eca797-6599-4597-af1f-d2eb5e292dfc" + "pi_image_id": "35eca797-6599-4597-af1f-d2eb5e292dfc", + "workspace_use_data": false } ], "attachments": [], - "imageNames": ["7100-05-09"] + "imageNames": ["7100-05-09"], + "use_data": false } ], "power_instances": [], @@ -207,7 +214,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -226,7 +238,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -245,7 +262,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -264,7 +286,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -283,7 +310,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -302,9 +334,15 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "management", @@ -328,7 +366,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -347,7 +390,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -366,7 +414,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -385,7 +438,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -404,7 +462,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -423,15 +486,21 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false } ], "ssh_keys": [ { "name": "vsi-ssh-key", - "public_key": "", + "public_key": null, "use_data": false, "resource_group": "management-rg" } @@ -454,7 +523,12 @@ "tgw": "transit-gateway", "vpc": "management" } - ] + ], + "use_data": false, + "prefix_filters": [], + "gre_tunnels": [], + "crns": null, + "classic": false } ], "virtual_private_endpoints": [ @@ -563,7 +637,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -588,7 +669,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -613,7 +701,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -638,11 +733,34 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } - ] + ], + "subnetTiers": [ + { + "name": "vsi", + "zones": 1 + }, + { + "name": "vpe", + "zones": 1 + }, + { + "name": "vpn", + "zones": 1 + } + ], + "use_data": false } ], "vpn_gateways": [], @@ -666,9 +784,8 @@ "subnets": ["vsi-zone-1"], "volumes": [], "subnet": "", - "enable_floating_ip": false + "enable_floating_ip": false, + "primary_interface_ip_spoofing": false } - ], - "classic_ssh_keys": [], - "classic_vlans": [] + ] } diff --git a/client/src/lib/docs/templates/slz-mixed.json b/client/src/lib/docs/templates/slz-mixed.json index 3cc707de..4241d55b 100644 --- a/client/src/lib/docs/templates/slz-mixed.json +++ b/client/src/lib/docs/templates/slz-mixed.json @@ -13,7 +13,9 @@ "power_vs_zones": [], "craig_version": "1.12.0", "power_vs_high_availability": false, - "no_vpn_secrets_manager_auth": false + "no_vpn_secrets_manager_auth": false, + "power_vs_ha_zone_1": null, + "power_vs_ha_zone_2": null }, "access_groups": [], "appid": [], @@ -28,10 +30,13 @@ "locations": ["global", "us-south"], "instance": false, "plan": "lite", - "resource_group": null + "resource_group": null, + "archive": false }, "cbr_rules": [], "cbr_zones": [], + "classic_ssh_keys": [], + "classic_vlans": [], "clusters": [ { "kms": "kms", @@ -249,7 +254,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -268,7 +278,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -287,7 +302,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -306,7 +326,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -325,7 +350,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -344,9 +374,15 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "workload", @@ -370,7 +406,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -389,7 +430,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -408,7 +454,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -427,7 +478,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -446,7 +502,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "workload", @@ -465,9 +526,15 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "management", @@ -491,7 +558,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -510,7 +582,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -529,7 +606,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -548,7 +630,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -567,7 +654,12 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "vpc": "management", @@ -586,15 +678,21 @@ "icmp": { "type": null, "code": null - } + }, + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false } ], "ssh_keys": [ { "name": "ssh-key", - "public_key": "", + "public_key": null, "resource_group": "management-rg", "use_data": false } @@ -621,7 +719,12 @@ "tgw": "transit-gateway", "vpc": "workload" } - ] + ], + "use_data": false, + "prefix_filters": [], + "gre_tunnels": [], + "crns": null, + "classic": false } ], "virtual_private_endpoints": [ @@ -778,7 +881,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -803,7 +913,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -828,7 +945,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -853,11 +977,34 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } - ] + ], + "subnetTiers": [ + { + "name": "vsi", + "zones": 3 + }, + { + "name": "vpn", + "zones": 1 + }, + { + "name": "vpe", + "zones": 3 + } + ], + "use_data": false }, { "cos": "cos", @@ -982,7 +1129,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1007,7 +1161,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1032,7 +1193,14 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1057,11 +1225,30 @@ "port_max": null, "source_port_min": null, "source_port_max": null - } + }, + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } - ] + ], + "subnetTiers": [ + { + "name": "vsi", + "zones": 3 + }, + { + "name": "vpe", + "zones": 3 + } + ], + "use_data": false } ], "vpn_gateways": [ @@ -1069,7 +1256,10 @@ "name": "management-gateway", "resource_group": "management-rg", "subnet": "vpn-zone-1", - "vpc": "management" + "vpc": "management", + "connections": [], + "policy_mode": false, + "additional_prefixes": [] } ], "vpn_servers": [], @@ -1087,11 +1277,12 @@ "vsi_per_subnet": 2, "resource_group": "management-rg", "override_vsi_name": null, - "user_data": "", + "user_data": null, "network_interfaces": [], - "volumes": [] + "volumes": [], + "image_name": null, + "enable_floating_ip": false, + "primary_interface_ip_spoofing": false } - ], - "classic_ssh_keys": [], - "classic_vlans": [] + ] } diff --git a/client/src/lib/docs/templates/slz-vsi-edge.json b/client/src/lib/docs/templates/slz-vsi-edge.json index 4fa4b484..cb87eae0 100644 --- a/client/src/lib/docs/templates/slz-vsi-edge.json +++ b/client/src/lib/docs/templates/slz-vsi-edge.json @@ -12,7 +12,10 @@ "fs_cloud": false, "power_vs_high_availability": false, "zones": 3, - "no_vpn_secrets_manager_auth": false + "no_vpn_secrets_manager_auth": false, + "enable_classic": false, + "power_vs_ha_zone_1": null, + "power_vs_ha_zone_2": null }, "access_groups": [], "appid": [], @@ -27,10 +30,13 @@ "target_name": "atracker-cos", "instance": false, "plan": "lite", - "resource_group": null + "resource_group": null, + "archive": false }, "cbr_rules": [], "cbr_zones": [], + "classic_ssh_keys": [], + "classic_vlans": [], "clusters": [], "dns": [], "event_streams": [], @@ -222,7 +228,12 @@ "port_min": null }, "sg": "f5-management", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -241,7 +252,12 @@ "port_min": null }, "sg": "f5-management", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -260,7 +276,12 @@ "port_min": null }, "sg": "f5-management", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -279,7 +300,12 @@ "port_min": null }, "sg": "f5-management", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -298,7 +324,12 @@ "port_min": null }, "sg": "f5-management", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -317,9 +348,15 @@ "port_min": null }, "sg": "f5-management", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "edge", @@ -343,9 +380,15 @@ "port_min": null }, "sg": "f5-external", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "edge", @@ -369,7 +412,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -388,7 +436,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -407,7 +460,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -426,7 +484,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -445,7 +508,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -464,7 +532,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -483,7 +556,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -502,7 +580,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -521,7 +604,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -540,7 +628,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -559,7 +652,12 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -578,9 +676,15 @@ "port_min": null }, "sg": "f5-workload", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "edge", @@ -604,7 +708,12 @@ "port_min": null }, "sg": "f5-bastion", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -623,7 +732,12 @@ "port_min": null }, "sg": "f5-bastion", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -642,7 +756,12 @@ "port_min": null }, "sg": "f5-bastion", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -661,7 +780,12 @@ "port_min": null }, "sg": "f5-bastion", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -680,7 +804,12 @@ "port_min": null }, "sg": "f5-bastion", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -699,9 +828,15 @@ "port_min": null }, "sg": "f5-bastion", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "edge", @@ -725,7 +860,12 @@ "port_min": null }, "sg": "edge-vpe", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -744,7 +884,12 @@ "port_min": null }, "sg": "edge-vpe", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -763,7 +908,12 @@ "port_min": null }, "sg": "edge-vpe", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -782,7 +932,12 @@ "port_min": null }, "sg": "edge-vpe", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -801,7 +956,12 @@ "port_min": null }, "sg": "edge-vpe", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -820,9 +980,15 @@ "port_min": null }, "sg": "edge-vpe", - "vpc": "edge" + "vpc": "edge", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "management", @@ -846,7 +1012,12 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -865,7 +1036,12 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -884,7 +1060,12 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -903,7 +1084,12 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -922,7 +1108,12 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -941,9 +1132,15 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "workload", @@ -967,7 +1164,12 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -986,7 +1188,12 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1005,7 +1212,12 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1024,7 +1236,12 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1043,7 +1260,12 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1062,9 +1284,15 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "management", @@ -1088,7 +1316,12 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -1107,7 +1340,12 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1126,7 +1364,12 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1145,7 +1388,12 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1164,7 +1412,12 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1183,9 +1436,15 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "workload", @@ -1209,7 +1468,12 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -1228,7 +1492,12 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1247,7 +1516,12 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1266,7 +1540,12 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1285,7 +1564,12 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -1304,9 +1588,15 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false } ], "ssh_keys": [ @@ -1314,7 +1604,7 @@ "name": "slz-ssh-key", "use_data": false, "resource_group": "management-rg", - "public_key": "" + "public_key": null } ], "sysdig": { @@ -1339,7 +1629,12 @@ "tgw": "transit-gateway", "vpc": "workload" } - ] + ], + "use_data": false, + "prefix_filters": [], + "gre_tunnels": [], + "crns": null, + "classic": false } ], "virtual_private_endpoints": [ @@ -1395,7 +1690,14 @@ "source_port_max": null }, "vpc": "edge", - "acl": "edge" + "acl": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1420,7 +1722,14 @@ "source_port_max": null }, "vpc": "edge", - "acl": "edge" + "acl": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1445,9 +1754,17 @@ "source_port_max": null }, "vpc": "edge", - "acl": "edge" + "acl": "edge", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false }, { "resource_group": "edge-rg", @@ -1477,7 +1794,14 @@ "source_port_max": null }, "vpc": "edge", - "acl": "f5-external" + "acl": "f5-external", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1502,7 +1826,14 @@ "source_port_max": null }, "vpc": "edge", - "acl": "f5-external" + "acl": "f5-external", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1527,7 +1858,14 @@ "source_port_max": null }, "vpc": "edge", - "acl": "f5-external" + "acl": "f5-external", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1552,9 +1890,17 @@ "source_port_max": null }, "vpc": "edge", - "acl": "f5-external" + "acl": "f5-external", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } ], "subnets": [ @@ -1797,7 +2143,38 @@ "default_routing_table_name": null, "default_security_group_name": null, "resource_group": "edge-rg", - "publicGateways": [] + "publicGateways": [], + "subnetTiers": [ + { + "name": "vpn-2", + "zones": 3 + }, + { + "name": "vpn-1", + "zones": 3 + }, + { + "name": "f5-workload", + "zones": 3 + }, + { + "name": "f5-management", + "zones": 3 + }, + { + "name": "f5-external", + "zones": 3 + }, + { + "name": "f5-bastion", + "zones": 3 + }, + { + "name": "vpe", + "zones": 3 + } + ], + "use_data": false }, { "name": "management", @@ -1831,7 +2208,14 @@ "source_port_max": null }, "vpc": "management", - "acl": "management" + "acl": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1856,7 +2240,14 @@ "source_port_max": null }, "vpc": "management", - "acl": "management" + "acl": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1881,9 +2272,17 @@ "source_port_max": null }, "vpc": "management", - "acl": "management" + "acl": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } ], "subnets": [ @@ -2010,7 +2409,22 @@ "default_routing_table_name": null, "default_security_group_name": null, "resource_group": "management-rg", - "publicGateways": [] + "publicGateways": [], + "subnetTiers": [ + { + "name": "vsi", + "zones": 3 + }, + { + "name": "vpe", + "zones": 3 + }, + { + "name": "vpn", + "zones": 1 + } + ], + "use_data": false }, { "name": "workload", @@ -2044,7 +2458,14 @@ "source_port_max": null }, "vpc": "workload", - "acl": "workload" + "acl": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -2069,7 +2490,14 @@ "source_port_max": null }, "vpc": "workload", - "acl": "workload" + "acl": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -2094,9 +2522,17 @@ "source_port_max": null }, "vpc": "workload", - "acl": "workload" + "acl": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } ], "subnets": [ @@ -2207,7 +2643,18 @@ "default_routing_table_name": null, "default_security_group_name": null, "resource_group": "workload-rg", - "publicGateways": [] + "publicGateways": [], + "subnetTiers": [ + { + "name": "vsi", + "zones": 3 + }, + { + "name": "vpe", + "zones": 3 + } + ], + "use_data": false } ], "vpn_gateways": [ @@ -2215,7 +2662,10 @@ "name": "management-gateway", "resource_group": "management-rg", "subnet": "vpn-zone-1", - "vpc": "management" + "vpc": "management", + "connections": [], + "policy_mode": false, + "additional_prefixes": [] } ], "vpn_servers": [], @@ -2227,15 +2677,18 @@ "profile": "cx2-4x8", "name": "management-server", "security_groups": ["management-vsi"], - "ssh_keys": ["ssh-key"], + "ssh_keys": [], "subnets": ["vsi-zone-1", "vsi-zone-2", "vsi-zone-3"], "vpc": "management", "vsi_per_subnet": 1, "resource_group": "management-rg", "override_vsi_name": null, - "user_data": "", + "user_data": null, "network_interfaces": [], - "volumes": [] + "volumes": [], + "image_name": null, + "enable_floating_ip": false, + "primary_interface_ip_spoofing": false }, { "kms": "kms", @@ -2245,7 +2698,7 @@ "profile": "cx2-4x8", "name": "workload-server", "security_groups": ["workload-vsi"], - "ssh_keys": ["ssh-key"], + "ssh_keys": [], "vpc": "workload", "vsi_per_subnet": 1, "resource_group": "workload-rg", @@ -2255,9 +2708,8 @@ "subnets": ["vsi-zone-1", "vsi-zone-2", "vsi-zone-3"], "volumes": [], "subnet": "", - "enable_floating_ip": false + "enable_floating_ip": false, + "primary_interface_ip_spoofing": false } - ], - "classic_ssh_keys": [], - "classic_vlans": [] + ] } diff --git a/client/src/lib/docs/templates/slz-vsi.json b/client/src/lib/docs/templates/slz-vsi.json index cac080dd..68f7c126 100644 --- a/client/src/lib/docs/templates/slz-vsi.json +++ b/client/src/lib/docs/templates/slz-vsi.json @@ -12,7 +12,10 @@ "power_vs_high_availability": false, "fs_cloud": false, "enable_power_vs": false, - "no_vpn_secrets_manager_auth": false + "no_vpn_secrets_manager_auth": false, + "enable_classic": false, + "power_vs_ha_zone_1": null, + "power_vs_ha_zone_2": null }, "access_groups": [], "appid": [], @@ -27,10 +30,13 @@ "target_name": "atracker-cos", "instance": false, "plan": "lite", - "resource_group": null + "resource_group": null, + "archive": false }, "cbr_rules": [], "cbr_zones": [], + "classic_ssh_keys": [], + "classic_vlans": [], "clusters": [], "dns": [], "event_streams": [], @@ -209,7 +215,12 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -228,7 +239,12 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -247,7 +263,12 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -266,7 +287,12 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -285,7 +311,12 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -304,9 +335,15 @@ "port_min": null }, "sg": "management-vpe", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "workload", @@ -330,7 +367,12 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -349,7 +391,12 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -368,7 +415,12 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -387,7 +439,12 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -406,7 +463,12 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -425,9 +487,15 @@ "port_min": null }, "sg": "workload-vpe", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "management", @@ -451,7 +519,12 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -470,7 +543,12 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -489,7 +567,12 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -508,7 +591,12 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -527,7 +615,12 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -546,9 +639,15 @@ "port_min": null }, "sg": "management-vsi", - "vpc": "management" + "vpc": "management", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false }, { "vpc": "workload", @@ -572,7 +671,12 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "inbound", @@ -591,7 +695,12 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -610,7 +719,12 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -629,7 +743,12 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -648,7 +767,12 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "direction": "outbound", @@ -667,9 +791,15 @@ "port_min": null }, "sg": "workload-vsi", - "vpc": "workload" + "vpc": "workload", + "ruleProtocol": "tcp", + "port_min": null, + "port_max": null, + "type": null, + "code": null } - ] + ], + "use_data": false } ], "ssh_keys": [ @@ -677,7 +807,7 @@ "name": "slz-ssh-key", "use_data": false, "resource_group": "management-rg", - "public_key": "" + "public_key": null } ], "sysdig": { @@ -702,7 +832,12 @@ "tgw": "transit-gateway", "vpc": "workload" } - ] + ], + "use_data": false, + "prefix_filters": [], + "gre_tunnels": [], + "crns": null, + "classic": false } ], "virtual_private_endpoints": [ @@ -758,7 +893,14 @@ "source_port_max": null }, "vpc": "management", - "acl": "management" + "acl": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -783,7 +925,14 @@ "source_port_max": null }, "vpc": "management", - "acl": "management" + "acl": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -808,9 +957,17 @@ "source_port_max": null }, "vpc": "management", - "acl": "management" + "acl": "management", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } ], "subnets": [ @@ -937,7 +1094,22 @@ "default_routing_table_name": null, "default_security_group_name": null, "resource_group": "management-rg", - "publicGateways": [] + "publicGateways": [], + "subnetTiers": [ + { + "name": "vsi", + "zones": 3 + }, + { + "name": "vpe", + "zones": 3 + }, + { + "name": "vpn", + "zones": 1 + } + ], + "use_data": false }, { "name": "workload", @@ -971,7 +1143,14 @@ "source_port_max": null }, "vpc": "workload", - "acl": "workload" + "acl": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -996,7 +1175,14 @@ "source_port_max": null }, "vpc": "workload", - "acl": "workload" + "acl": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "action": "allow", @@ -1021,9 +1207,17 @@ "source_port_max": null }, "vpc": "workload", - "acl": "workload" + "acl": "workload", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } ], "subnets": [ @@ -1134,7 +1328,18 @@ "default_routing_table_name": null, "default_security_group_name": null, "resource_group": "workload-rg", - "publicGateways": [] + "publicGateways": [], + "subnetTiers": [ + { + "name": "vsi", + "zones": 3 + }, + { + "name": "vpe", + "zones": 3 + } + ], + "use_data": false } ], "vpn_gateways": [ @@ -1142,7 +1347,10 @@ "name": "management-gateway", "resource_group": "management-rg", "subnet": "vpn-zone-1", - "vpc": "management" + "vpc": "management", + "connections": [], + "policy_mode": false, + "additional_prefixes": [] } ], "vpn_servers": [], @@ -1154,15 +1362,18 @@ "profile": "cx2-4x8", "name": "management-server", "security_groups": ["management-vsi"], - "ssh_keys": ["ssh-key"], + "ssh_keys": [], "subnets": ["vsi-zone-1", "vsi-zone-2", "vsi-zone-3"], "vpc": "management", "vsi_per_subnet": 1, "resource_group": "management-rg", "override_vsi_name": null, - "user_data": "", + "user_data": null, "network_interfaces": [], - "volumes": [] + "volumes": [], + "image_name": null, + "enable_floating_ip": false, + "primary_interface_ip_spoofing": false }, { "kms": "kms", @@ -1172,7 +1383,7 @@ "profile": "cx2-4x8", "name": "workload-server", "security_groups": ["workload-vsi"], - "ssh_keys": ["ssh-key"], + "ssh_keys": [], "vpc": "workload", "vsi_per_subnet": 1, "resource_group": "workload-rg", @@ -1182,9 +1393,8 @@ "subnets": ["vsi-zone-1", "vsi-zone-2", "vsi-zone-3"], "volumes": [], "subnet": "", - "enable_floating_ip": false + "enable_floating_ip": false, + "primary_interface_ip_spoofing": false } - ], - "classic_ssh_keys": [], - "classic_vlans": [] + ] } diff --git a/client/src/lib/docs/templates/vpn-as-a-service.json b/client/src/lib/docs/templates/vpn-as-a-service.json index c2e9187d..f614598d 100644 --- a/client/src/lib/docs/templates/vpn-as-a-service.json +++ b/client/src/lib/docs/templates/vpn-as-a-service.json @@ -13,7 +13,10 @@ "power_vs_zones": ["dal12", "dal10", "us-south"], "advanced_subnets": true, "power_vs_high_availability": false, - "no_vpn_secrets_manager_auth": false + "no_vpn_secrets_manager_auth": false, + "enable_classic": false, + "power_vs_ha_zone_1": null, + "power_vs_ha_zone_2": null }, "access_groups": [], "appid": [], @@ -28,7 +31,8 @@ "locations": ["global", "us-south"], "instance": false, "plan": "lite", - "resource_group": null + "resource_group": null, + "archive": false }, "cbr_rules": [], "cbr_zones": [], @@ -111,34 +115,29 @@ "zone": "dal12", "ssh_keys": [], "network": [], - "cloud_connections": [ - { - "name": "power-to-tgw", - "pi_cloud_connection_speed": "1000", - "pi_cloud_connection_global_routing": false, - "pi_cloud_connection_metered": false, - "pi_cloud_connection_transit_enabled": true, - "transit_gateways": ["tgw"], - "workspace": "vpnaas", - "zone": "dal12" - } - ], + "cloud_connections": [], "images": [ { "name": "7200-05-03", "workspace": "vpnaas", "zone": "dal12", - "pi_image_id": "ab5777c4-60ef-45a1-90aa-4a144dbe3104" + "pi_image_id": "ab5777c4-60ef-45a1-90aa-4a144dbe3104", + "workspace_use_data": false } ], "attachments": [], - "imageNames": ["7200-05-03"] + "imageNames": ["7200-05-03"], + "use_data": false } ], "power_instances": [], "power_volumes": [], "resource_groups": [ - { "use_prefix": true, "name": "vpnaas-rg", "use_data": false } + { + "use_prefix": true, + "name": "vpnaas-rg", + "use_data": false + } ], "routing_tables": [ { @@ -149,7 +148,9 @@ "transit_gateway_ingress": false, "vpc_zone_ingress": false, "direct_link_ingress": false, - "accept_routes_from_resource_type": ["vpn_gateway", "vpn_server"] + "accept_routes_from_resource_type": ["vpn_gateway", "vpn_server"], + "route_direct_link_ingress": false, + "route_vpc_zone_ingress": false }, { "routes": [], @@ -159,7 +160,9 @@ "transit_gateway_ingress": false, "vpc_zone_ingress": false, "direct_link_ingress": false, - "accept_routes_from_resource_type": ["vpn_server"] + "accept_routes_from_resource_type": ["vpn_server"], + "route_direct_link_ingress": false, + "route_vpc_zone_ingress": false } ], "scc": { @@ -179,7 +182,9 @@ "resource_group": "vpnaas-rg", "encryption_key": "encryption-key", "kms": "kms", - "secrets": [] + "secrets": [], + "use_data": false, + "plan": "standard" } ], "security_groups": [ @@ -189,27 +194,56 @@ { "name": "allow-all-inbound", "direction": "inbound", - "icmp": { "type": null, "code": null }, - "tcp": { "port_min": null, "port_max": null }, - "udp": { "port_min": null, "port_max": null }, + "icmp": { + "type": null, + "code": null + }, + "tcp": { + "port_min": null, + "port_max": null + }, + "udp": { + "port_min": null, + "port_max": null + }, "source": "0.0.0.0/0", "vpc": "vpc", - "sg": "vpn-server-sg" + "sg": "vpn-server-sg", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null }, { "name": "allow-all-outbounr", "direction": "inbound", - "icmp": { "type": null, "code": null }, - "tcp": { "port_min": null, "port_max": null }, - "udp": { "port_min": null, "port_max": null }, + "icmp": { + "type": null, + "code": null + }, + "tcp": { + "port_min": null, + "port_max": null + }, + "udp": { + "port_min": null, + "port_max": null + }, "source": "0.0.0.0/0", "vpc": "vpc", - "sg": "vpn-server-sg" + "sg": "vpn-server-sg", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null } ], "name": "vpn-server-sg", "vpc": "vpc", - "show": false + "show": false, + "use_data": false } ], "ssh_keys": [], @@ -224,10 +258,19 @@ "transit_gateways": [ { "global": true, - "connections": [{ "tgw": "tgw", "vpc": "vpc" }], + "connections": [ + { + "tgw": "tgw", + "vpc": "vpc" + } + ], "resource_group": "vpnaas-rg", "name": "tgw", - "crns": [] + "crns": [], + "use_data": false, + "prefix_filters": [], + "gre_tunnels": [], + "classic": false } ], "virtual_private_endpoints": [], @@ -289,7 +332,10 @@ "name": "allow-ibm-inbound", "action": "allow", "direction": "inbound", - "icmp": { "type": null, "code": null }, + "icmp": { + "type": null, + "code": null + }, "tcp": { "port_min": null, "port_max": null, @@ -305,13 +351,23 @@ "source": "161.26.0.0/16", "destination": "10.0.0.0/8", "acl": "vpn-nw", - "vpc": "vpc" + "vpc": "vpc", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "name": "allow-ibm-outbound", "action": "allow", "direction": "outbound", - "icmp": { "type": null, "code": null }, + "icmp": { + "type": null, + "code": null + }, "tcp": { "port_min": null, "port_max": null, @@ -327,13 +383,23 @@ "source": "10.0.0.0/8", "destination": "161.26.0.0/16", "acl": "vpn-nw", - "vpc": "vpc" + "vpc": "vpc", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "name": "allow-network-inbound", "action": "allow", "direction": "inbound", - "icmp": { "type": null, "code": null }, + "icmp": { + "type": null, + "code": null + }, "tcp": { "port_min": null, "port_max": null, @@ -349,13 +415,23 @@ "source": "10.0.0.0/8", "destination": "10.0.0.0/8", "acl": "vpn-nw", - "vpc": "vpc" + "vpc": "vpc", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null }, { "name": "allow-network-outbound", "action": "allow", "direction": "outbound", - "icmp": { "type": null, "code": null }, + "icmp": { + "type": null, + "code": null + }, "tcp": { "port_min": null, "port_max": null, @@ -371,14 +447,35 @@ "source": "10.0.0.0/8", "destination": "10.0.0.0/8", "acl": "vpn-nw", - "vpc": "vpc" + "vpc": "vpc", + "ruleProtocol": "all", + "port_min": null, + "port_max": null, + "type": null, + "code": null, + "source_port_min": null, + "source_port_max": null } - ] + ], + "use_data": false } ], "bucket": "vpc-bucket", "publicGateways": [], - "cos": "object-storage" + "cos": "object-storage", + "subnetTiers": [ + { + "name": "vpn", + "zones": 1 + }, + { + "name": "vpn-server", + "select_zones": [1], + "advanced": true, + "subnets": ["vpn-server-zone-1"] + } + ], + "use_data": false } ], "vpn_gateways": [ @@ -387,7 +484,9 @@ "resource_group": "vpnaas-rg", "vpc": "vpc", "subnet": "vpn-zone-1", - "policy_mode": true + "policy_mode": true, + "connections": [], + "additional_prefixes": [] } ], "vpn_servers": [ @@ -395,18 +494,22 @@ "name": "client-to-site", "certificate_crn": "CHEATER", "method": "certificate", - "client_ca_crn": "", + "client_ca_crn": null, "client_ip_pool": "192.168.8.0/22", "enable_split_tunneling": false, - "client_idle_timeout": "", + "client_idle_timeout": null, "port": "443", "protocol": "tcp", "resource_group": "vpnaas-rg", "vpc": "vpc", "security_groups": ["vpn-server-sg"], - "client_dns_server_ips": "", + "client_dns_server_ips": null, "routes": [ - { "name": "route", "destination": "10.0.0.0/8", "action": "deliver" } + { + "name": "route", + "destination": "10.0.0.0/8", + "action": "deliver" + } ], "subnets": ["vpn-server-zone-1"], "additional_prefixes": ["192.168.8.0/22"], diff --git a/client/src/lib/json-to-iac/outputs.js b/client/src/lib/json-to-iac/outputs.js index 0d253b7a..6193cace 100644 --- a/client/src/lib/json-to-iac/outputs.js +++ b/client/src/lib/json-to-iac/outputs.js @@ -113,7 +113,7 @@ function outputsTf(config) { config.power.forEach((workspace, index) => { let outputs = {}; // power workspace outputs - ["name", "guid", "crn"].forEach((field) => { + ["name", "guid", "crn", "location"].forEach((field) => { outputs["power_vs_workspace_" + snakeCase(workspace.name) + "_" + field] = { value: `\${${ @@ -124,6 +124,30 @@ function outputsTf(config) { }; }); + workspace.ssh_keys.forEach((sshKey) => { + outputs[ + snakeCase(`power vs workspace ${workspace.name} ssh key ${sshKey.name}`) + ] = { + value: `\${${sshKey.use_data ? "data." : ""}ibm_pi_key.${snakeCase( + `power vs ssh key ${sshKey.name}` + )}.name}`, + }; + }); + + workspace.network.forEach((nw) => { + ["name", "id"].forEach((field) => { + outputs[ + snakeCase( + `power vs workspace ${nw.workspace} network ${nw.name} ${field}` + ) + ] = { + value: `\${${nw.use_data ? "data." : ""}ibm_pi_network.${snakeCase( + `power network ${nw.workspace} ${nw.name}` + )}.${field === "name" ? "pi_network_name" : field}}`, + }; + }); + }); + tf += (tf.length > 0 && index < 1 ? "\n" : "") + tfBlock( @@ -150,13 +174,35 @@ function outputsTf(config) { value: `\${ibm_pi_instance.${vsiRef}.pi_network[0].ip_address}`, }; }); - if (Object.keys(powerInstanceOutputs).length > 0) + if (Object.keys(powerInstanceOutputs).length > 0) { tf += "\n" + tfBlock( "Power VS Instance Outputs", "\n" + jsonToTf(JSON.stringify({ output: powerInstanceOutputs })) + "\n" ); + } + + config.object_storage.forEach((cos) => { + let cosOutputs = {}; + cos.buckets.forEach((bucket) => { + ["bucket_name", "region_location"].forEach((field) => { + cosOutputs[ + snakeCase(`${cos.name} object storage bucket ${bucket.name} ${field}`) + ] = { + value: `\${ibm_cos_bucket.${snakeCase( + `${cos.name} object storage ${bucket.name} bucket` + )}.${field}}`, + }; + }); + }); + tf += + "\n" + + tfBlock( + `${cos.name} Object Storage Outputs`, + "\n" + jsonToTf(JSON.stringify({ output: cosOutputs })) + "\n" + ); + }); return tf; } diff --git a/client/src/lib/json-to-iac/power-vs-instances.js b/client/src/lib/json-to-iac/power-vs-instances.js index 3c6916eb..06ea53f7 100644 --- a/client/src/lib/json-to-iac/power-vs-instances.js +++ b/client/src/lib/json-to-iac/power-vs-instances.js @@ -1,5 +1,5 @@ const { powerVsWorkspaceRef } = require("./power-vs"); -const { jsonToTfPrint, tfBlock } = require("./utils"); +const { jsonToTfPrint, tfBlock, timeouts } = require("./utils"); const { snakeCase, isNullOrEmptyString, @@ -78,6 +78,23 @@ function powerVsInstanceData(instance, config) { delete data.pi_ibmi_rds_users; } + if (isNullOrEmptyString(data.pi_pin_policy)) { + delete data.pi_pin_policy; + } + + if (!data.pi_license_repository_capacity) { + delete data.pi_license_repository_capacity; + } + + if (!data.pi_storage_pool) { + delete data.pi_storage_pool; + } else { + data.pi_storage_pool = data.pi_storage_pool.replace( + " (Replication Enabled)", + "" + ); + } + // add pi network here to have the items at the bottom of the terraform code data.pi_network = []; instance.network.forEach((nw) => { @@ -104,6 +121,9 @@ function powerVsInstanceData(instance, config) { } data.pi_network.push(nwData); }); + + data.timeouts = timeouts("3h"); + [ "network", "zone", diff --git a/client/src/lib/json-to-iac/power-vs-volumes.js b/client/src/lib/json-to-iac/power-vs-volumes.js index 99323327..d2f37542 100644 --- a/client/src/lib/json-to-iac/power-vs-volumes.js +++ b/client/src/lib/json-to-iac/power-vs-volumes.js @@ -55,7 +55,10 @@ function formatPowerVsVolume(volume, config) { )}.volume_id}`; } } else { - data.pi_storage_pool = volume.pi_volume_pool; + data.pi_storage_pool = volume.pi_volume_pool?.replace( + " (Replication Enabled)", + "" + ); } } delete data.index; diff --git a/client/src/lib/state/classic-bare-metal.js b/client/src/lib/state/classic-bare-metal.js index 2052ec00..2348df3a 100644 --- a/client/src/lib/state/classic-bare-metal.js +++ b/client/src/lib/state/classic-bare-metal.js @@ -83,7 +83,7 @@ function initClassicBareMetalStore(store) { invalidText: unconditionalInvalidText("Enter a Package Key Name"), tooltip: { content: - "The key name for the monthly Bare Metal server's package. You can find available package key names in the IBM Cloud Classic API'", + "The key name for the monthly Bare Metal server's package. You can find available package key names in the IBM Cloud Classic API.", align: "right", }, }, @@ -94,8 +94,8 @@ function initClassicBareMetalStore(store) { invalidText: unconditionalInvalidText("Enter a Process Key Name"), tooltip: { content: - "The key name for the monthly Bare Metal server's process. To get a process key name, find the package key name in the IBM Cloud Classic API", - align: "right", + "The key name for the monthly Bare Metal server's process. To get a process key name, find the package key name in the IBM Cloud Classic API.", + align: "left", }, }, memory: { @@ -109,7 +109,7 @@ function initClassicBareMetalStore(store) { network_speed: { size: "small", default: "", - labelText: "Network Speed (Mbs)", + labelText: "Network Speed (Mbps)", placeholder: "100", invalid: fieldIsNullOrEmptyString("network_speed"), invalidText: unconditionalInvalidText("Invalid network speed value"), @@ -133,7 +133,7 @@ function initClassicBareMetalStore(store) { onInputChange: onArrayInputChange("disk_key_names"), tooltip: { content: - "The internal key names for the monthly Bare Metal server's disk. To get disk key names, find the package key name in the IBM Cloud Classic API", + "The internal key names for the monthly Bare Metal server's disk. To get disk key names, find the package key name in the IBM Cloud Classic API.", align: "right", alignModal: "right", }, diff --git a/client/src/lib/state/classic-vsi.js b/client/src/lib/state/classic-vsi.js index ee475758..2a23c126 100644 --- a/client/src/lib/state/classic-vsi.js +++ b/client/src/lib/state/classic-vsi.js @@ -113,6 +113,7 @@ function initClassicVsi(store) { }, memory: { default: "", + labelText: "Memory (Mb)", invalid: fieldIsNullOrEmptyString("memory"), size: "small", }, diff --git a/client/src/lib/state/classic.js b/client/src/lib/state/classic.js index b8a309a8..e78723de 100644 --- a/client/src/lib/state/classic.js +++ b/client/src/lib/state/classic.js @@ -24,9 +24,8 @@ function classicSshKeyOnStoreUpdate(config) { if (!config.store.json.classic_ssh_keys) { config.store.json.classic_ssh_keys = []; } else if ( - config.store.json?.classic_ssh_keys.length === 0 && - config.store.json?.classic_vlans.length === 0 && - config.store.json?.classic_gateways.length === 0 + config.store.json?.classic_ssh_keys?.length === 0 && + config.store.json?.classic_vlans?.length === 0 ) { config.store.json._options.enable_classic = false; } diff --git a/client/src/lib/state/options.js b/client/src/lib/state/options.js index 1f5b96b7..a6fa5caa 100644 --- a/client/src/lib/state/options.js +++ b/client/src/lib/state/options.js @@ -321,6 +321,7 @@ function initOptions(store) { ? false : stateData.power_vs_zones.length === 0; }, + invalidText: unconditionalInvalidText("Select an Availability Zone"), }, power_vs_ha_zone_2: { size: "small", diff --git a/client/src/lib/state/power-vs-instances/power-instances-schema.js b/client/src/lib/state/power-vs-instances/power-instances-schema.js index 74bfde45..a57093ee 100644 --- a/client/src/lib/state/power-vs-instances/power-instances-schema.js +++ b/client/src/lib/state/power-vs-instances/power-instances-schema.js @@ -427,10 +427,11 @@ function powerVsInstanceSchema(vtl) { pi_license_repository_capacity: { labelText: "Repository Capacity (TB)", size: "small", - default: "1", invalid: function (stateData) { - return stateData.pi_license_repository_capacity === "" || - stateData.pi_license_repository_capacity.match(/^\d+$/g) === null + return isNullOrEmptyString( + stateData.pi_license_repository_capacity, + true + ) || stateData.pi_license_repository_capacity.match(/^\d+$/g) === null ? true : !isWholeNumber(parseInt(stateData.pi_license_repository_capacity)); }, @@ -486,6 +487,13 @@ function powerVsInstanceSchema(vtl) { "When you soft pin an instance for high availability, the instance automatically migrates back to the original host once the host is back to its operating state. If the instance has a licensing restriction with the host, the hard pin option restricts the movement of the instance during remote restart, automated remote restart, DRO, and live partition migration. The default pinning policy is none", }, }, + pi_health_status: { + labelText: "Health Status", + type: "select", + size: "small", + groups: ["OK", "WARNING"], + default: "OK", + }, }; } diff --git a/client/src/lib/state/state.js b/client/src/lib/state/state.js index 4f1bf07a..ca457b4d 100644 --- a/client/src/lib/state/state.js +++ b/client/src/lib/state/state.js @@ -1,5 +1,15 @@ const { lazyZstate } = require("lazy-z/lib/store"); -const { contains, typeCheck, transpose, snakeCase } = require("lazy-z"); +const { + contains, + typeCheck, + transpose, + snakeCase, + isArray, + eachKey, + isBoolean, + containsKeys, + azsort, +} = require("lazy-z"); const { initOptions } = require("./options"); const { initKeyManagement } = require("./key-management"); const { initResourceGroup } = require("./resource-groups"); @@ -54,6 +64,22 @@ const { initClassicSecurityGroups } = require("./classic-security-groups.js"); const { initClassicVsi } = require("./classic-vsi.js"); const { initClassicBareMetalStore } = require("./classic-bare-metal.js"); +// fields not to add to craig json sub object +const doNotRenderFields = [ + "heading", + "vsi_tiles", + "vpc_connections", + "power_connections", + "hideWhen", + "pgw_zone_1", + "pgw_zone_2", + "pgw_zone_3", + "ip_address", +]; + +// reserved field names for lazy-z state methods +const reservedStateFields = ["create", "save", "delete", "shouldDisableSave"]; + /** * get state for craig * @param {boolean=} legacy this param is for unit tests and is not passed in the application @@ -358,6 +384,153 @@ const state = function (legacy) { return allKeys; }; + /** + * get field type + * @param {*} ref craig field reference + * @returns {string} type string + */ + function getFieldType(ref) { + return ref.type === "toggle" || isBoolean(ref.default) + ? "boolean" + : isArray(ref.default) + ? "Array" + : "string"; + } + + /** + * get groups for schema + * @param {*} ref craig ref + * @param {string} key key name + * @returns {Array|string} groups + */ + function getSchemaGroups(ref, key) { + return isArray(ref.groups) + ? ref.groups.map((item) => { + if (ref.onInputChange) { + return ref.onInputChange({ + [key]: item, + }); + } else return item; + }) + : ""; + } + + /** + * build field schema + * @param {string} field field name + * @returns {Object} schema object + */ + store.buildFieldSchema = function (field) { + // top level type + let schemaType = isArray(store.store.json[field]) ? "Array" : "object"; + // field JSON + let fieldJson = { + [field]: { + [schemaType]: {}, + }, + }; + // shortcut to ref + let innerFieldRef = fieldJson[field][schemaType]; + // subcomponents to add to object after other fields are done + let subComponents = []; + // for each item + if (!store[field]) return {}; + else + eachKey(store[field], (key) => { + if ( + !contains(reservedStateFields, key) && // if is not reserved name + !containsKeys(store[field][key], "save") // and is not a sub component + ) { + // create object + innerFieldRef[key] = { + type: getFieldType(store[field][key]), + default: store[field][key].default, + }; + + // if is select, add groups when possible + if ( + store[field][key].type === "select" && + !isBoolean(innerFieldRef[key].default) + ) { + innerFieldRef[key].groups = getSchemaGroups(store[field][key], key); + } + } else if (containsKeys(store[field][key], "save")) { + // add subcomponents to list + subComponents.push(key); + } + }); + + // for each sub component + subComponents.forEach((subField) => { + // create item + innerFieldRef[subField] = { + Array: {}, + }; + // shortcut to item + let subComponentRef = innerFieldRef[subField].Array; + // for each key in the sub field + eachKey(store[field][subField], (key) => { + // if not a reserved field + if ( + !contains(reservedStateFields, key) && + !containsKeys(store[field][subField][key], "save") + ) { + // create item + subComponentRef[key] = { + type: getFieldType(store[field][subField][key]), + default: store[field][subField][key].default, + }; + // if is select add groups when possible + if (store[field][subField][key]?.type === "select") { + subComponentRef[key].groups = getSchemaGroups( + store[field][subField][key], + key + ); + } + } + }); + }); + + if (field === "vpcs") { + innerFieldRef.acls.Array.rules = { + Array: {}, + }; + eachKey(store.vpcs.acls.rules, (key) => { + if (!contains(reservedStateFields, key)) { + innerFieldRef.acls.Array.rules.Array[key] = { + type: getFieldType(store.vpcs.acls.rules[key]), + default: store.vpcs.acls.rules[key].default, + }; + // if is select add groups when possible + if (store.vpcs.acls.rules[key]?.type === "select") { + innerFieldRef.acls.Array.rules.Array[key].groups = getSchemaGroups( + store.vpcs.acls.rules[key], + key + ); + } + } + }); + } + + return fieldJson; + }; + + store.buildSchema = function () { + let schema = {}; + // console.log(store.store.json) + Object.keys(store.store.json) + .sort(azsort) + .forEach((key) => { + if (key !== "_options") { + transpose(store.buildFieldSchema(key), schema); + } else { + let optionsSchema = store.buildFieldSchema("options"); + schema._options = optionsSchema.options; + } + }); + return schema; + }; + // this line enforces scalable subnets without causing application to rerender if (!legacy) vpcOnStoreUpdate(store); diff --git a/client/src/lib/state/transit-gateways/transit-gateways.js b/client/src/lib/state/transit-gateways/transit-gateways.js index ea037ec7..9dca2862 100644 --- a/client/src/lib/state/transit-gateways/transit-gateways.js +++ b/client/src/lib/state/transit-gateways/transit-gateways.js @@ -355,10 +355,10 @@ function initTransitGateway(store) { crns: { default: "", invalid: function (stateData) { - return invalidCrnList(stateData.crns); + return invalidCrnList(stateData.crns || []); }, invalidText: function (stateData) { - return invalidCrnList(stateData.crns); + return invalidCrnList(stateData.crns || []); }, }, connections: { diff --git a/client/src/lib/state/utils.js b/client/src/lib/state/utils.js index 5ddeeb01..24d380e2 100644 --- a/client/src/lib/state/utils.js +++ b/client/src/lib/state/utils.js @@ -607,7 +607,11 @@ function sshKeySchema(fieldName) { invalid: invalidSshKey, invalidText: function (stateData, componentProps) { return !validSshKey(stateData.public_key) && - stateData.public_key !== "NONE" + stateData.public_key !== "NONE" && + fieldName === "power_vs_ssh_keys" + ? "Provide a unique SSH public key for this workspace" + : !validSshKey(stateData.public_key) && + stateData.public_key !== "NONE" ? "Provide a unique SSH public key that does not exist in the IBM Cloud account in your region" : invalidSshKey(stateData, componentProps) ? "SSH Public Key in use" @@ -1217,7 +1221,10 @@ function powerStoragePoolSelect(isVolume) { onInputChange: function (stateData) { let replicationEnabledPools = replicationEnabledStoragePoolMap[stateData.zone] || []; - if (!contains(replicationEnabledPools, stateData[field])) { + if ( + !contains(replicationEnabledPools, stateData[field]) && + !stateData[field].includes("(Replication Enabled)") + ) { stateData.pi_replication_enabled = false; } diff --git a/express-controllers/power-api.js b/express-controllers/power-api.js index 566688a2..d9597ce6 100644 --- a/express-controllers/power-api.js +++ b/express-controllers/power-api.js @@ -192,8 +192,12 @@ function powerRoutes(axios, controller) { } else { let formattedStoragePools = []; response.data.storagePoolsCapacity.forEach((pool) => { - formattedStoragePools.push(pool.poolName); + let name = + pool.poolName + + (pool.replicationEnabled ? " (Replication Enabled)" : ""); + formattedStoragePools.push(name); }); + res.send(formattedStoragePools); } }) diff --git a/express-controllers/vsi-api.js b/express-controllers/vsi-api.js index 287f7477..731ce788 100644 --- a/express-controllers/vsi-api.js +++ b/express-controllers/vsi-api.js @@ -35,50 +35,67 @@ function vsiRoutes(axios, controller) { res.send(instanceProfiles); }) .catch((error) => { - res.send(JSON.stringify(error.response)); + res.send(error.response); }); }); }; /** - * get a list of images for vsi in a region + * recursive call to get images for vsi * @param {object} req express request object * @param {object} res express resolve object + * @param {string} sToken token to retrieve next page of images + * @returns */ - controller.vsiImages = (req, res) => { - // inherit context with anonymous function - return controller.sendDataOnTokenValid(res, "images", () => { - // get token and use to get vsi images - return controller - .getBearerToken() - .then(() => { - let region = req.params["region"]; - let requestConfig = { - method: "get", - url: `http://${region}.iaas.cloud.ibm.com/v1/images?version=2022-11-15&generation=2`, - headers: { - "Accept-Encoding": "application/json", - }, - }; - requestConfig.headers.Authorization = `Bearer ${controller.token}`; - return axios(requestConfig); - }) + controller.imageGet = (req, res, sToken) => { + return controller.getBearerToken().then(() => { + let region = req.params["region"]; + let requestConfig = { + method: "get", + url: sToken + ? `http://${region}.iaas.cloud.ibm.com/v1/images?version=2024-03-12&generation=2&limit=100&status=available&start=${sToken}` + : `http://${region}.iaas.cloud.ibm.com/v1/images?version=2024-03-12&generation=2&limit=100&status=available`, + headers: { + "Accept-Encoding": "application/json", + }, + }; + requestConfig.headers.Authorization = `Bearer ${controller.token}`; + return axios(requestConfig) .then((response) => { - // iterate through the response object and collect image names - let images = []; response.data.images.forEach((element) => { - images.push( + controller.images.push( element.operating_system.display_name + ` [${element.name}]` ); }); - controller.images = images.sort(azsort); - res.send(images); + if (response.data.total_count > 100) { + let start_token = response.data.next.href.match( + /(?<=start=)[A-Za-z0-9]*/gm + ); + controller.imageGet(req, res, start_token); + } else { + controller.images = controller.images.sort(azsort); + res.send(controller.images); + } }) .catch((error) => { res.send(error.data); }); }); }; + + /** + * get a list of images for vsi in a region + * @param {object} req express request object + * @param {object} res express resolve object + */ + controller.vsiImages = (req, res) => { + controller.images = []; + // inherit context with anonymous function + return controller.sendDataOnTokenValid(res, "images", () => { + // get token and use to get vsi images + return controller.imageGet(req, res); + }); + }; } module.exports = { diff --git a/lib/template-updater.js b/lib/template-updater.js new file mode 100644 index 00000000..be011b14 --- /dev/null +++ b/lib/template-updater.js @@ -0,0 +1,191 @@ +const fs = require("fs"); +const { state } = require("../client/src/lib"); +const { + eachKey, + isBoolean, + contains, + isFunction, + isArray, + azsort, +} = require("lazy-z"); +/** + * initialize store + * @returns {lazyZState} state store + */ +function newState() { + let store = new state(); + store.setUpdateCallback(() => {}); + return store; +} + +let craigState = newState(); + +// fields not to add to craig json sub object +const doNotRenderFields = [ + "heading", + "vsi_tiles", + "vpc_connections", + "power_connections", + "hideWhen", + "pgw_zone_1", + "pgw_zone_2", + "pgw_zone_3", + "ip_address", +]; + +// reserved field names for lazy-z state methods +const reservedStateFields = ["create", "save", "delete", "shouldDisableSave"]; + +/** + * get a list of form fields + * @param {string} craigField field string + * @param {*} craigRef reference to CRAIG or sub component + * @returns {Array} list of fields + */ +function getFormFields(craigField, craigRef) { + return Object.keys(craigRef[craigField]).filter((key) => { + if ( + // if is not reserved + !contains(reservedStateFields, key) && + // and is not a function + !isFunction(craigRef[craigField][key]) && + // and does not have save + !craigRef[craigField][key].save + ) + // then it is a schema field and should be returned + return key; + }); +} + +/** + * setup a form object as though it were part of a dynamic form + * @param {*} originalItem object to check + * @param {string} jsonField field to check + * @param {*} craigRef reference to craig / subcomponent parent + * @param {string} parent name of parent resource + * @returns {Object} update item + */ +function dynamicFormSetup(originalItem, jsonField, craigRef, parentName) { + let craig = craigRef; // ref to craig state, needs to be ref for sub components + let item = { ...originalItem }; // copy + let selectFields = {}; // fields that are created using a select + + // for each field item that isn't a subcomponent or reserved state field + getFormFields(jsonField, craig).forEach((field) => { + if ( + // field on item is not defined + !item[field] && + // is not a boolean value + !isBoolean(item[field]) && + // and field should be rendered + !contains(doNotRenderFields, field) + ) { + if (craig[jsonField][field]?.type === "select") { + // add to select fields + selectFields[field] = craig[jsonField][field]; + } + + // set value to default + item[field] = isBoolean(craig[jsonField][field].default) + ? craig[jsonField][field].default + : craig[jsonField][field].default === null && + field !== "router_hostname" + ? null + : craig[jsonField][field].default || ""; + } + }); + + // for each selected field + eachKey(selectFields, (field) => { + // if groups is function evaluate + let groups = isFunction(selectFields[field].groups) + ? selectFields[field].groups(item, { + // mock componentProps object + craig: craigState, + vpc_name: parentName, + arrayParentName: parentName, + }) + : selectFields[field].groups; + // if only one option set state value to value + if (groups.length === 1 && item[field] !== null) { + item[field] = groups[0]; + } + }); + + if ( + contains(["power_instances", "vtl"], jsonField) && + item?.network?.length > 0 + ) { + item.primary_subnet = item.network[0].name; + } + + return item; +} + +// for each template +fs.readdirSync("./client/src/lib/docs/templates").forEach((template) => { + // composed path + let templatePath = "./client/src/lib/docs/templates/" + template; + // read data + let templateData = fs.readFileSync(templatePath, "utf-8"); + // parse data + let parsedData = JSON.parse(templateData); + // set to store json + craigState.hardSetJson(parsedData, true); + eachKey(parsedData, (jsonField) => { + if (isArray(parsedData[jsonField])) { + // if the item is an array, check each item + parsedData[jsonField].forEach((item, itemIndex) => { + // get list of sub components for that field + let subComponents = Object.keys(craigState[jsonField]).filter((key) => { + if ( + !contains(reservedStateFields, key) && + !isFunction(craigState[jsonField][key]) && + craigState[jsonField][key].save + ) + return key; + }); + // set item value to be updated value + parsedData[jsonField][itemIndex] = dynamicFormSetup( + item, + jsonField, + craigState + ); + // if there are subcomponents + if (subComponents.length > 0) { + // for each sub component + subComponents.forEach((subComponent) => { + // for each subcomponent as part of the updated item + item[subComponent].forEach((subItem) => { + // update sub item + subItem = dynamicFormSetup( + subItem, + subComponent, + craigState[jsonField], + item.name + ); + }); + }); + } + }); + } else { + // update object field + parsedData[jsonField] = dynamicFormSetup( + parsedData[jsonField], + jsonField === "_options" ? "options" : jsonField, + craigState + ); + } + }); + + // reorder fields in alphabetical order + let azTemplate = {}; + Object.keys(parsedData) + .sort(azsort) + .forEach((key) => { + azTemplate[key] = parsedData[key]; + }); + + // write file to template path + fs.writeFileSync(templatePath, JSON.stringify(azTemplate, null, 2)); +}); diff --git a/package-lock.json b/package-lock.json index 8aa7d8ca..145fb2b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -859,7 +859,7 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz", "integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==", "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -1588,9 +1588,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", diff --git a/package.json b/package.json index c8275df2..4f836b03 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,9 @@ "i-all": "npm i && cd client && npm i", "pretty": "npx prettier --write .", "dev-start": "cd client && npm start", - "pre-commit-build": "cd client && npm run build" + "pre-commit-build": "cd client && npm run build", + "update-templates": "node lib/template-updater.js", + "before-commit": "npm run changelog && npm run update-templates && npm run pretty" }, "authors": [ "Jennifer Valle", diff --git a/unit-tests/api/craig-api.test.js b/unit-tests/api/craig-api.test.js index 07d1322f..327f6536 100644 --- a/unit-tests/api/craig-api.test.js +++ b/unit-tests/api/craig-api.test.js @@ -67,7 +67,7 @@ describe("craig api", () => { }, { name: "craig/variables.tf", - data: '##############################################################################\n# Variables\n##############################################################################\n\nvariable "ibmcloud_api_key" {\n description = "The IBM Cloud platform API key needed to deploy IAM enabled resources."\n type = string\n sensitive = true\n}\n\nvariable "region" {\n description = "IBM Cloud Region where resources will be provisioned"\n type = string\n default = "us-south"\n}\n\nvariable "prefix" {\n description = "Name prefix that will be prepended to named resources"\n type = string\n default = "iac"\n}\n\nvariable "ssh_key_public_key" {\n description = "Public SSH Key Value for SSH Key"\n type = string\n sensitive = true\n default = ""\n}\n\n##############################################################################\n', + data: '##############################################################################\n# Variables\n##############################################################################\n\nvariable "ibmcloud_api_key" {\n description = "The IBM Cloud platform API key needed to deploy IAM enabled resources."\n type = string\n sensitive = true\n}\n\nvariable "region" {\n description = "IBM Cloud Region where resources will be provisioned"\n type = string\n default = "us-south"\n}\n\nvariable "prefix" {\n description = "Name prefix that will be prepended to named resources"\n type = string\n default = "iac"\n}\n\nvariable "ssh_key_public_key" {\n description = "Public SSH Key Value for SSH Key"\n type = string\n sensitive = true\n default = null\n}\n\n##############################################################################\n', }, { name: "craig/key_management.tf", @@ -95,7 +95,7 @@ describe("craig api", () => { }, { name: "craig/craig.json", - data: '{\n "_options": {\n "prefix": "iac",\n "region": "us-south",\n "tags": [\n "hello",\n "world"\n ],\n "zones": 3,\n "endpoints": "private",\n "account_id": null,\n "fs_cloud": false,\n "enable_classic": false,\n "dynamic_subnets": true,\n "enable_power_vs": false,\n "power_vs_zones": [],\n "craig_version": "1.12.0",\n "power_vs_high_availability": false,\n "no_vpn_secrets_manager_auth": false\n },\n "access_groups": [],\n "appid": [],\n "atracker": {\n "enabled": true,\n "type": "cos",\n "name": "atracker",\n "target_name": "atracker-cos",\n "bucket": "atracker-bucket",\n "add_route": true,\n "cos_key": "cos-bind-key",\n "locations": [\n "global",\n "us-south"\n ],\n "instance": false,\n "plan": "lite",\n "resource_group": null\n },\n "cbr_rules": [],\n "cbr_zones": [],\n "clusters": [\n {\n "kms": "kms",\n "cos": "cos",\n "entitlement": "cloud_pak",\n "kube_type": "openshift",\n "kube_version": "4.12.26_openshift",\n "flavor": "bx2.16x64",\n "name": "workload-cluster",\n "resource_group": "workload-rg",\n "encryption_key": "roks-key",\n "subnets": [\n "vsi-zone-1",\n "vsi-zone-2",\n "vsi-zone-3"\n ],\n "update_all_workers": false,\n "vpc": "workload",\n "worker_pools": [\n {\n "entitlement": "cloud_pak",\n "cluster": "workload-cluster",\n "flavor": "bx2.16x64",\n "name": "logging-worker-pool",\n "resource_group": "workload-rg",\n "subnets": [\n "vsi-zone-1",\n "vsi-zone-2",\n "vsi-zone-3"\n ],\n "vpc": "workload",\n "workers_per_subnet": 2\n }\n ],\n "opaque_secrets": [],\n "workers_per_subnet": 2,\n "private_endpoint": true\n }\n ],\n "dns": [],\n "event_streams": [],\n "f5_vsi": [],\n "iam_account_settings": {\n "enable": false,\n "mfa": null,\n "allowed_ip_addresses": null,\n "include_history": false,\n "if_match": null,\n "max_sessions_per_identity": null,\n "restrict_create_service_id": null,\n "restrict_create_platform_apikey": null,\n "session_expiration_in_seconds": null,\n "session_invalidation_in_seconds": null\n },\n "icd": [],\n "key_management": [\n {\n "name": "kms",\n "resource_group": "service-rg",\n "use_hs_crypto": false,\n "authorize_vpc_reader_role": true,\n "use_data": false,\n "keys": [\n {\n "key_ring": "ring",\n "name": "key",\n "root_key": true,\n "force_delete": true,\n "endpoint": "public",\n "rotation": 1,\n "dual_auth_delete": false\n },\n {\n "key_ring": "ring",\n "name": "atracker-key",\n "root_key": true,\n "force_delete": true,\n "endpoint": "public",\n "rotation": 1,\n "dual_auth_delete": false\n },\n {\n "key_ring": "ring",\n "name": "vsi-volume-key",\n "root_key": true,\n "force_delete": true,\n "endpoint": "public",\n "rotation": 1,\n "dual_auth_delete": false\n },\n {\n "key_ring": "ring",\n "name": "roks-key",\n "root_key": true,\n "force_delete": null,\n "endpoint": null,\n "rotation": 1,\n "dual_auth_delete": false\n }\n ]\n }\n ],\n "load_balancers": [],\n "logdna": {\n "name": "logdna",\n "archive": false,\n "enabled": false,\n "plan": "lite",\n "endpoints": "private",\n "platform_logs": false,\n "resource_group": "service-rg",\n "cos": "atracker-cos",\n "bucket": "atracker-bucket"\n },\n "object_storage": [\n {\n "buckets": [\n {\n "endpoint": "public",\n "force_delete": true,\n "kms_key": "atracker-key",\n "name": "atracker-bucket",\n "storage_class": "standard",\n "use_random_suffix": true\n }\n ],\n "keys": [\n {\n "name": "cos-bind-key",\n "role": "Writer",\n "enable_hmac": false,\n "use_random_suffix": true\n }\n ],\n "name": "atracker-cos",\n "plan": "standard",\n "resource_group": "service-rg",\n "use_data": false,\n "use_random_suffix": true,\n "kms": "kms"\n },\n {\n "buckets": [\n {\n "endpoint": "public",\n "force_delete": true,\n "kms_key": "key",\n "name": "management-bucket",\n "storage_class": "standard",\n "use_random_suffix": true\n },\n {\n "endpoint": "public",\n "force_delete": true,\n "kms_key": "key",\n "name": "workload-bucket",\n "storage_class": "standard",\n "use_random_suffix": true\n }\n ],\n "use_random_suffix": true,\n "keys": [],\n "name": "cos",\n "plan": "standard",\n "resource_group": "service-rg",\n "use_data": false,\n "kms": "kms"\n }\n ],\n "power": [],\n "power_instances": [],\n "power_volumes": [],\n "resource_groups": [\n {\n "use_prefix": true,\n "name": "service-rg",\n "use_data": false\n },\n {\n "use_prefix": true,\n "name": "management-rg",\n "use_data": false\n },\n {\n "use_prefix": true,\n "name": "workload-rg",\n "use_data": false\n }\n ],\n "routing_tables": [],\n "scc": {\n "credential_description": null,\n "id": null,\n "passphrase": null,\n "name": "",\n "location": "us",\n "collector_description": null,\n "is_public": false,\n "scope_description": null,\n "enable": false\n },\n "secrets_manager": [],\n "security_groups": [\n {\n "vpc": "management",\n "name": "management-vpe",\n "resource_group": "management-rg",\n "rules": [\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "inbound",\n "name": "allow-ibm-inbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "inbound",\n "name": "allow-vpc-inbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "outbound",\n "name": "allow-vpc-outbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-53-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 53,\n "port_min": 53\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-80-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 80,\n "port_min": 80\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-443-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 443,\n "port_min": 443\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n }\n ]\n },\n {\n "vpc": "workload",\n "name": "workload-vpe",\n "resource_group": "workload-rg",\n "rules": [\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "inbound",\n "name": "allow-ibm-inbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "inbound",\n "name": "allow-vpc-inbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "outbound",\n "name": "allow-vpc-outbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-53-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 53,\n "port_min": 53\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-80-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 80,\n "port_min": 80\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-443-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 443,\n "port_min": 443\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n }\n ]\n },\n {\n "vpc": "management",\n "name": "management-vsi",\n "resource_group": "management-rg",\n "rules": [\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "inbound",\n "name": "allow-ibm-inbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "inbound",\n "name": "allow-vpc-inbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "outbound",\n "name": "allow-vpc-outbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "outbound",\n "name": "allow-ibm-tcp-53-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 53,\n "port_min": 53\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "outbound",\n "name": "allow-ibm-tcp-80-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 80,\n "port_min": 80\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n },\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "outbound",\n "name": "allow-ibm-tcp-443-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 443,\n "port_min": 443\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n }\n }\n ]\n }\n ],\n "ssh_keys": [\n {\n "name": "ssh-key",\n "public_key": "",\n "resource_group": "management-rg",\n "use_data": false\n }\n ],\n "sysdig": {\n "enabled": false,\n "plan": "graduated-tier",\n "resource_group": "service-rg",\n "name": "sysdig",\n "platform_logs": false\n },\n "teleport_vsi": [],\n "transit_gateways": [\n {\n "name": "transit-gateway",\n "resource_group": "service-rg",\n "global": false,\n "connections": [\n {\n "tgw": "transit-gateway",\n "vpc": "management"\n },\n {\n "tgw": "transit-gateway",\n "vpc": "workload"\n }\n ]\n }\n ],\n "virtual_private_endpoints": [\n {\n "name": "management-cos",\n "service": "cos",\n "vpc": "management",\n "resource_group": "management-rg",\n "security_groups": [\n "management-vpe"\n ],\n "subnets": [\n "vpe-zone-1",\n "vpe-zone-2",\n "vpe-zone-3"\n ],\n "instance": null\n },\n {\n "name": "workload-cos",\n "service": "cos",\n "vpc": "workload",\n "resource_group": "workload-rg",\n "security_groups": [\n "workload-vpe"\n ],\n "subnets": [\n "vpe-zone-1",\n "vpe-zone-2",\n "vpe-zone-3"\n ],\n "instance": null\n }\n ],\n "vpcs": [\n {\n "cos": "cos",\n "bucket": "management-bucket",\n "name": "management",\n "resource_group": "management-rg",\n "classic_access": false,\n "manual_address_prefix_management": true,\n "default_network_acl_name": null,\n "default_security_group_name": null,\n "default_routing_table_name": null,\n "publicGateways": [],\n "address_prefixes": [\n {\n "vpc": "management",\n "zone": 1,\n "name": "management-zone-1",\n "cidr": "10.10.0.0/22"\n },\n {\n "vpc": "management",\n "zone": 2,\n "name": "management-zone-2",\n "cidr": "10.20.0.0/22"\n },\n {\n "vpc": "management",\n "zone": 3,\n "name": "management-zone-3",\n "cidr": "10.30.0.0/22"\n }\n ],\n "subnets": [\n {\n "vpc": "management",\n "zone": 1,\n "cidr": "10.10.0.0/29",\n "name": "vsi-zone-1",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 1,\n "cidr": "10.10.0.16/28",\n "name": "vpn-zone-1",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 2,\n "cidr": "10.20.0.0/29",\n "name": "vsi-zone-2",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 3,\n "cidr": "10.30.0.0/29",\n "name": "vsi-zone-3",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 1,\n "cidr": "10.10.0.48/29",\n "name": "vpe-zone-1",\n "resource_group": "management-rg",\n "network_acl": "management",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 2,\n "cidr": "10.20.0.16/29",\n "name": "vpe-zone-2",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 3,\n "cidr": "10.30.0.16/29",\n "name": "vpe-zone-3",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n }\n ],\n "public_gateways": [],\n "acls": [\n {\n "resource_group": "management-rg",\n "name": "management",\n "vpc": "management",\n "rules": [\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "inbound",\n "name": "allow-ibm-inbound",\n "source": "161.26.0.0/16",\n "acl": "management",\n "vpc": "management",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n }\n },\n {\n "action": "allow",\n "source": "10.0.0.0/8",\n "direction": "outbound",\n "name": "allow-ibm-outbound",\n "destination": "161.26.0.0/16",\n "acl": "management",\n "vpc": "management",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n }\n },\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "inbound",\n "name": "allow-all-network-inbound",\n "source": "10.0.0.0/8",\n "acl": "management",\n "vpc": "management",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n }\n },\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "outbound",\n "name": "allow-all-network-outbound",\n "source": "10.0.0.0/8",\n "acl": "management",\n "vpc": "management",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n }\n }\n ]\n }\n ]\n },\n {\n "cos": "cos",\n "bucket": "workload-bucket",\n "name": "workload",\n "resource_group": "workload-rg",\n "classic_access": false,\n "manual_address_prefix_management": true,\n "default_network_acl_name": null,\n "default_security_group_name": null,\n "default_routing_table_name": null,\n "publicGateways": [],\n "address_prefixes": [\n {\n "vpc": "workload",\n "zone": 1,\n "name": "workload-zone-1",\n "cidr": "10.40.0.0/22"\n },\n {\n "vpc": "workload",\n "zone": 2,\n "name": "workload-zone-2",\n "cidr": "10.50.0.0/22"\n },\n {\n "vpc": "workload",\n "zone": 3,\n "name": "workload-zone-3",\n "cidr": "10.60.0.0/22"\n }\n ],\n "subnets": [\n {\n "vpc": "workload",\n "zone": 1,\n "cidr": "10.40.0.0/28",\n "name": "vsi-zone-1",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "workload",\n "zone": 2,\n "cidr": "10.50.0.0/28",\n "name": "vsi-zone-2",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "workload",\n "zone": 3,\n "cidr": "10.60.0.0/28",\n "name": "vsi-zone-3",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "workload",\n "zone": 1,\n "cidr": "10.40.0.32/29",\n "name": "vpe-zone-1",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "workload",\n "zone": 2,\n "cidr": "10.50.0.32/29",\n "name": "vpe-zone-2",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "workload",\n "zone": 3,\n "cidr": "10.60.0.32/29",\n "name": "vpe-zone-3",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n }\n ],\n "public_gateways": [],\n "acls": [\n {\n "resource_group": "workload-rg",\n "name": "workload",\n "vpc": "workload",\n "rules": [\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "inbound",\n "name": "allow-ibm-inbound",\n "source": "161.26.0.0/16",\n "acl": "workload",\n "vpc": "workload",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n }\n },\n {\n "action": "allow",\n "source": "10.0.0.0/8",\n "direction": "outbound",\n "name": "allow-ibm-outbound",\n "destination": "161.26.0.0/16",\n "acl": "workload",\n "vpc": "workload",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n }\n },\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "inbound",\n "name": "allow-all-network-inbound",\n "source": "10.0.0.0/8",\n "acl": "workload",\n "vpc": "workload",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n }\n },\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "outbound",\n "name": "allow-all-network-outbound",\n "source": "10.0.0.0/8",\n "acl": "workload",\n "vpc": "workload",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n }\n }\n ]\n }\n ]\n }\n ],\n "vpn_gateways": [\n {\n "name": "management-gateway",\n "resource_group": "management-rg",\n "subnet": "vpn-zone-1",\n "vpc": "management"\n }\n ],\n "vpn_servers": [],\n "vsi": [\n {\n "kms": "kms",\n "encryption_key": "vsi-volume-key",\n "image": "ibm-ubuntu-22-04-1-minimal-amd64-1",\n "profile": "cx2-4x8",\n "name": "management-server",\n "security_groups": [\n "management-vsi"\n ],\n "ssh_keys": [\n "ssh-key"\n ],\n "subnets": [\n "vsi-zone-1",\n "vsi-zone-2",\n "vsi-zone-3"\n ],\n "vpc": "management",\n "vsi_per_subnet": 2,\n "resource_group": "management-rg",\n "override_vsi_name": null,\n "user_data": "",\n "network_interfaces": [],\n "volumes": []\n }\n ],\n "classic_ssh_keys": [],\n "classic_vlans": []\n}', + data: '{\n "_options": {\n "prefix": "iac",\n "region": "us-south",\n "tags": [\n "hello",\n "world"\n ],\n "zones": 3,\n "endpoints": "private",\n "account_id": null,\n "fs_cloud": false,\n "enable_classic": false,\n "dynamic_subnets": true,\n "enable_power_vs": false,\n "power_vs_zones": [],\n "craig_version": "1.12.0",\n "power_vs_high_availability": false,\n "no_vpn_secrets_manager_auth": false,\n "power_vs_ha_zone_1": null,\n "power_vs_ha_zone_2": null\n },\n "access_groups": [],\n "appid": [],\n "atracker": {\n "enabled": true,\n "type": "cos",\n "name": "atracker",\n "target_name": "atracker-cos",\n "bucket": "atracker-bucket",\n "add_route": true,\n "cos_key": "cos-bind-key",\n "locations": [\n "global",\n "us-south"\n ],\n "instance": false,\n "plan": "lite",\n "resource_group": null,\n "archive": false\n },\n "cbr_rules": [],\n "cbr_zones": [],\n "classic_ssh_keys": [],\n "classic_vlans": [],\n "clusters": [\n {\n "kms": "kms",\n "cos": "cos",\n "entitlement": "cloud_pak",\n "kube_type": "openshift",\n "kube_version": "4.12.26_openshift",\n "flavor": "bx2.16x64",\n "name": "workload-cluster",\n "resource_group": "workload-rg",\n "encryption_key": "roks-key",\n "subnets": [\n "vsi-zone-1",\n "vsi-zone-2",\n "vsi-zone-3"\n ],\n "update_all_workers": false,\n "vpc": "workload",\n "worker_pools": [\n {\n "entitlement": "cloud_pak",\n "cluster": "workload-cluster",\n "flavor": "bx2.16x64",\n "name": "logging-worker-pool",\n "resource_group": "workload-rg",\n "subnets": [\n "vsi-zone-1",\n "vsi-zone-2",\n "vsi-zone-3"\n ],\n "vpc": "workload",\n "workers_per_subnet": 2\n }\n ],\n "opaque_secrets": [],\n "workers_per_subnet": 2,\n "private_endpoint": true\n }\n ],\n "dns": [],\n "event_streams": [],\n "f5_vsi": [],\n "iam_account_settings": {\n "enable": false,\n "mfa": null,\n "allowed_ip_addresses": null,\n "include_history": false,\n "if_match": null,\n "max_sessions_per_identity": null,\n "restrict_create_service_id": null,\n "restrict_create_platform_apikey": null,\n "session_expiration_in_seconds": null,\n "session_invalidation_in_seconds": null\n },\n "icd": [],\n "key_management": [\n {\n "name": "kms",\n "resource_group": "service-rg",\n "use_hs_crypto": false,\n "authorize_vpc_reader_role": true,\n "use_data": false,\n "keys": [\n {\n "key_ring": "ring",\n "name": "key",\n "root_key": true,\n "force_delete": true,\n "endpoint": "public",\n "rotation": 1,\n "dual_auth_delete": false\n },\n {\n "key_ring": "ring",\n "name": "atracker-key",\n "root_key": true,\n "force_delete": true,\n "endpoint": "public",\n "rotation": 1,\n "dual_auth_delete": false\n },\n {\n "key_ring": "ring",\n "name": "vsi-volume-key",\n "root_key": true,\n "force_delete": true,\n "endpoint": "public",\n "rotation": 1,\n "dual_auth_delete": false\n },\n {\n "key_ring": "ring",\n "name": "roks-key",\n "root_key": true,\n "force_delete": null,\n "endpoint": null,\n "rotation": 1,\n "dual_auth_delete": false\n }\n ]\n }\n ],\n "load_balancers": [],\n "logdna": {\n "name": "logdna",\n "archive": false,\n "enabled": false,\n "plan": "lite",\n "endpoints": "private",\n "platform_logs": false,\n "resource_group": "service-rg",\n "cos": "atracker-cos",\n "bucket": "atracker-bucket"\n },\n "object_storage": [\n {\n "buckets": [\n {\n "endpoint": "public",\n "force_delete": true,\n "kms_key": "atracker-key",\n "name": "atracker-bucket",\n "storage_class": "standard",\n "use_random_suffix": true\n }\n ],\n "keys": [\n {\n "name": "cos-bind-key",\n "role": "Writer",\n "enable_hmac": false,\n "use_random_suffix": true\n }\n ],\n "name": "atracker-cos",\n "plan": "standard",\n "resource_group": "service-rg",\n "use_data": false,\n "use_random_suffix": true,\n "kms": "kms"\n },\n {\n "buckets": [\n {\n "endpoint": "public",\n "force_delete": true,\n "kms_key": "key",\n "name": "management-bucket",\n "storage_class": "standard",\n "use_random_suffix": true\n },\n {\n "endpoint": "public",\n "force_delete": true,\n "kms_key": "key",\n "name": "workload-bucket",\n "storage_class": "standard",\n "use_random_suffix": true\n }\n ],\n "use_random_suffix": true,\n "keys": [],\n "name": "cos",\n "plan": "standard",\n "resource_group": "service-rg",\n "use_data": false,\n "kms": "kms"\n }\n ],\n "power": [],\n "power_instances": [],\n "power_volumes": [],\n "resource_groups": [\n {\n "use_prefix": true,\n "name": "service-rg",\n "use_data": false\n },\n {\n "use_prefix": true,\n "name": "management-rg",\n "use_data": false\n },\n {\n "use_prefix": true,\n "name": "workload-rg",\n "use_data": false\n }\n ],\n "routing_tables": [],\n "scc": {\n "credential_description": null,\n "id": null,\n "passphrase": null,\n "name": "",\n "location": "us",\n "collector_description": null,\n "is_public": false,\n "scope_description": null,\n "enable": false\n },\n "secrets_manager": [],\n "security_groups": [\n {\n "vpc": "management",\n "name": "management-vpe",\n "resource_group": "management-rg",\n "rules": [\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "inbound",\n "name": "allow-ibm-inbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "inbound",\n "name": "allow-vpc-inbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "outbound",\n "name": "allow-vpc-outbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-53-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 53,\n "port_min": 53\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "tcp",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-80-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 80,\n "port_min": 80\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "tcp",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "management",\n "sg": "management-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-443-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 443,\n "port_min": 443\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "tcp",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n }\n ],\n "use_data": false\n },\n {\n "vpc": "workload",\n "name": "workload-vpe",\n "resource_group": "workload-rg",\n "rules": [\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "inbound",\n "name": "allow-ibm-inbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "inbound",\n "name": "allow-vpc-inbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "outbound",\n "name": "allow-vpc-outbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-53-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 53,\n "port_min": 53\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "tcp",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-80-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 80,\n "port_min": 80\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "tcp",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "workload",\n "sg": "workload-vpe",\n "direction": "outbound",\n "name": "allow-ibm-tcp-443-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 443,\n "port_min": 443\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "tcp",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n }\n ],\n "use_data": false\n },\n {\n "vpc": "management",\n "name": "management-vsi",\n "resource_group": "management-rg",\n "rules": [\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "inbound",\n "name": "allow-ibm-inbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "inbound",\n "name": "allow-vpc-inbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "outbound",\n "name": "allow-vpc-outbound",\n "source": "10.0.0.0/8",\n "tcp": {\n "port_max": null,\n "port_min": null\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "outbound",\n "name": "allow-ibm-tcp-53-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 53,\n "port_min": 53\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "tcp",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "outbound",\n "name": "allow-ibm-tcp-80-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 80,\n "port_min": 80\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "tcp",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n },\n {\n "vpc": "management",\n "sg": "management-vsi",\n "direction": "outbound",\n "name": "allow-ibm-tcp-443-outbound",\n "source": "161.26.0.0/16",\n "tcp": {\n "port_max": 443,\n "port_min": 443\n },\n "udp": {\n "port_max": null,\n "port_min": null\n },\n "icmp": {\n "type": null,\n "code": null\n },\n "ruleProtocol": "tcp",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null\n }\n ],\n "use_data": false\n }\n ],\n "ssh_keys": [\n {\n "name": "ssh-key",\n "public_key": null,\n "resource_group": "management-rg",\n "use_data": false\n }\n ],\n "sysdig": {\n "enabled": false,\n "plan": "graduated-tier",\n "resource_group": "service-rg",\n "name": "sysdig",\n "platform_logs": false\n },\n "teleport_vsi": [],\n "transit_gateways": [\n {\n "name": "transit-gateway",\n "resource_group": "service-rg",\n "global": false,\n "connections": [\n {\n "tgw": "transit-gateway",\n "vpc": "management"\n },\n {\n "tgw": "transit-gateway",\n "vpc": "workload"\n }\n ],\n "use_data": false,\n "prefix_filters": [],\n "gre_tunnels": [],\n "crns": null,\n "classic": false\n }\n ],\n "virtual_private_endpoints": [\n {\n "name": "management-cos",\n "service": "cos",\n "vpc": "management",\n "resource_group": "management-rg",\n "security_groups": [\n "management-vpe"\n ],\n "subnets": [\n "vpe-zone-1",\n "vpe-zone-2",\n "vpe-zone-3"\n ],\n "instance": null\n },\n {\n "name": "workload-cos",\n "service": "cos",\n "vpc": "workload",\n "resource_group": "workload-rg",\n "security_groups": [\n "workload-vpe"\n ],\n "subnets": [\n "vpe-zone-1",\n "vpe-zone-2",\n "vpe-zone-3"\n ],\n "instance": null\n }\n ],\n "vpcs": [\n {\n "cos": "cos",\n "bucket": "management-bucket",\n "name": "management",\n "resource_group": "management-rg",\n "classic_access": false,\n "manual_address_prefix_management": true,\n "default_network_acl_name": null,\n "default_security_group_name": null,\n "default_routing_table_name": null,\n "publicGateways": [],\n "address_prefixes": [\n {\n "vpc": "management",\n "zone": 1,\n "name": "management-zone-1",\n "cidr": "10.10.0.0/22"\n },\n {\n "vpc": "management",\n "zone": 2,\n "name": "management-zone-2",\n "cidr": "10.20.0.0/22"\n },\n {\n "vpc": "management",\n "zone": 3,\n "name": "management-zone-3",\n "cidr": "10.30.0.0/22"\n }\n ],\n "subnets": [\n {\n "vpc": "management",\n "zone": 1,\n "cidr": "10.10.0.0/29",\n "name": "vsi-zone-1",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 1,\n "cidr": "10.10.0.16/28",\n "name": "vpn-zone-1",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 2,\n "cidr": "10.20.0.0/29",\n "name": "vsi-zone-2",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 3,\n "cidr": "10.30.0.0/29",\n "name": "vsi-zone-3",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 1,\n "cidr": "10.10.0.48/29",\n "name": "vpe-zone-1",\n "resource_group": "management-rg",\n "network_acl": "management",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 2,\n "cidr": "10.20.0.16/29",\n "name": "vpe-zone-2",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "management",\n "zone": 3,\n "cidr": "10.30.0.16/29",\n "name": "vpe-zone-3",\n "network_acl": "management",\n "resource_group": "management-rg",\n "public_gateway": false,\n "has_prefix": false\n }\n ],\n "public_gateways": [],\n "acls": [\n {\n "resource_group": "management-rg",\n "name": "management",\n "vpc": "management",\n "rules": [\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "inbound",\n "name": "allow-ibm-inbound",\n "source": "161.26.0.0/16",\n "acl": "management",\n "vpc": "management",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null,\n "source_port_min": null,\n "source_port_max": null\n },\n {\n "action": "allow",\n "source": "10.0.0.0/8",\n "direction": "outbound",\n "name": "allow-ibm-outbound",\n "destination": "161.26.0.0/16",\n "acl": "management",\n "vpc": "management",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null,\n "source_port_min": null,\n "source_port_max": null\n },\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "inbound",\n "name": "allow-all-network-inbound",\n "source": "10.0.0.0/8",\n "acl": "management",\n "vpc": "management",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null,\n "source_port_min": null,\n "source_port_max": null\n },\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "outbound",\n "name": "allow-all-network-outbound",\n "source": "10.0.0.0/8",\n "acl": "management",\n "vpc": "management",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null,\n "source_port_min": null,\n "source_port_max": null\n }\n ],\n "use_data": false\n }\n ],\n "subnetTiers": [\n {\n "name": "vsi",\n "zones": 3\n },\n {\n "name": "vpn",\n "zones": 1\n },\n {\n "name": "vpe",\n "zones": 3\n }\n ],\n "use_data": false\n },\n {\n "cos": "cos",\n "bucket": "workload-bucket",\n "name": "workload",\n "resource_group": "workload-rg",\n "classic_access": false,\n "manual_address_prefix_management": true,\n "default_network_acl_name": null,\n "default_security_group_name": null,\n "default_routing_table_name": null,\n "publicGateways": [],\n "address_prefixes": [\n {\n "vpc": "workload",\n "zone": 1,\n "name": "workload-zone-1",\n "cidr": "10.40.0.0/22"\n },\n {\n "vpc": "workload",\n "zone": 2,\n "name": "workload-zone-2",\n "cidr": "10.50.0.0/22"\n },\n {\n "vpc": "workload",\n "zone": 3,\n "name": "workload-zone-3",\n "cidr": "10.60.0.0/22"\n }\n ],\n "subnets": [\n {\n "vpc": "workload",\n "zone": 1,\n "cidr": "10.40.0.0/28",\n "name": "vsi-zone-1",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "workload",\n "zone": 2,\n "cidr": "10.50.0.0/28",\n "name": "vsi-zone-2",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "workload",\n "zone": 3,\n "cidr": "10.60.0.0/28",\n "name": "vsi-zone-3",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "workload",\n "zone": 1,\n "cidr": "10.40.0.32/29",\n "name": "vpe-zone-1",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "workload",\n "zone": 2,\n "cidr": "10.50.0.32/29",\n "name": "vpe-zone-2",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n },\n {\n "vpc": "workload",\n "zone": 3,\n "cidr": "10.60.0.32/29",\n "name": "vpe-zone-3",\n "network_acl": "workload",\n "resource_group": "workload-rg",\n "public_gateway": false,\n "has_prefix": false\n }\n ],\n "public_gateways": [],\n "acls": [\n {\n "resource_group": "workload-rg",\n "name": "workload",\n "vpc": "workload",\n "rules": [\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "inbound",\n "name": "allow-ibm-inbound",\n "source": "161.26.0.0/16",\n "acl": "workload",\n "vpc": "workload",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null,\n "source_port_min": null,\n "source_port_max": null\n },\n {\n "action": "allow",\n "source": "10.0.0.0/8",\n "direction": "outbound",\n "name": "allow-ibm-outbound",\n "destination": "161.26.0.0/16",\n "acl": "workload",\n "vpc": "workload",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null,\n "source_port_min": null,\n "source_port_max": null\n },\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "inbound",\n "name": "allow-all-network-inbound",\n "source": "10.0.0.0/8",\n "acl": "workload",\n "vpc": "workload",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null,\n "source_port_min": null,\n "source_port_max": null\n },\n {\n "action": "allow",\n "destination": "10.0.0.0/8",\n "direction": "outbound",\n "name": "allow-all-network-outbound",\n "source": "10.0.0.0/8",\n "acl": "workload",\n "vpc": "workload",\n "icmp": {\n "type": null,\n "code": null\n },\n "tcp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "udp": {\n "port_min": null,\n "port_max": null,\n "source_port_min": null,\n "source_port_max": null\n },\n "ruleProtocol": "all",\n "port_min": null,\n "port_max": null,\n "type": null,\n "code": null,\n "source_port_min": null,\n "source_port_max": null\n }\n ],\n "use_data": false\n }\n ],\n "subnetTiers": [\n {\n "name": "vsi",\n "zones": 3\n },\n {\n "name": "vpe",\n "zones": 3\n }\n ],\n "use_data": false\n }\n ],\n "vpn_gateways": [\n {\n "name": "management-gateway",\n "resource_group": "management-rg",\n "subnet": "vpn-zone-1",\n "vpc": "management",\n "connections": [],\n "policy_mode": false,\n "additional_prefixes": []\n }\n ],\n "vpn_servers": [],\n "vsi": [\n {\n "kms": "kms",\n "encryption_key": "vsi-volume-key",\n "image": "ibm-ubuntu-22-04-1-minimal-amd64-1",\n "profile": "cx2-4x8",\n "name": "management-server",\n "security_groups": [\n "management-vsi"\n ],\n "ssh_keys": [\n "ssh-key"\n ],\n "subnets": [\n "vsi-zone-1",\n "vsi-zone-2",\n "vsi-zone-3"\n ],\n "vpc": "management",\n "vsi_per_subnet": 2,\n "resource_group": "management-rg",\n "override_vsi_name": null,\n "user_data": null,\n "network_interfaces": [],\n "volumes": [],\n "image_name": null,\n "enable_floating_ip": false,\n "primary_interface_ip_spoofing": false\n }\n ]\n}', }, { data: ' Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n"License" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n"Licensor" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n"Legal Entity" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n"control" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n"You" (or "Your") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n"Source" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n"Object" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n"Work" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n"Derivative Works" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n"Contribution" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, "submitted"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as "Not a Contribution."\n\n"Contributor" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a "NOTICE" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets "[]"\nreplaced with your own identifying information. (Don\'t include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame "printed page" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n', @@ -103,7 +103,7 @@ describe("craig api", () => { }, { name: "craig/outputs.tf", - data: '##############################################################################\n# Management VPC Outputs\n##############################################################################\n\noutput "management_vpc_name" {\n value = module.management_vpc.name\n}\n\noutput "management_vpc_id" {\n value = module.management_vpc.id\n}\n\noutput "management_vpc_crn" {\n value = module.management_vpc.crn\n}\n\noutput "management_vpc_subnet_vsi_zone_1_name" {\n value = module.management_vpc.vsi_zone_1_name\n}\n\noutput "management_vpc_subnet_vsi_zone_1_id" {\n value = module.management_vpc.vsi_zone_1_id\n}\n\noutput "management_vpc_subnet_vsi_zone_1_crn" {\n value = module.management_vpc.vsi_zone_1_crn\n}\n\noutput "management_vpc_subnet_vpn_zone_1_name" {\n value = module.management_vpc.vpn_zone_1_name\n}\n\noutput "management_vpc_subnet_vpn_zone_1_id" {\n value = module.management_vpc.vpn_zone_1_id\n}\n\noutput "management_vpc_subnet_vpn_zone_1_crn" {\n value = module.management_vpc.vpn_zone_1_crn\n}\n\noutput "management_vpc_subnet_vsi_zone_2_name" {\n value = module.management_vpc.vsi_zone_2_name\n}\n\noutput "management_vpc_subnet_vsi_zone_2_id" {\n value = module.management_vpc.vsi_zone_2_id\n}\n\noutput "management_vpc_subnet_vsi_zone_2_crn" {\n value = module.management_vpc.vsi_zone_2_crn\n}\n\noutput "management_vpc_subnet_vsi_zone_3_name" {\n value = module.management_vpc.vsi_zone_3_name\n}\n\noutput "management_vpc_subnet_vsi_zone_3_id" {\n value = module.management_vpc.vsi_zone_3_id\n}\n\noutput "management_vpc_subnet_vsi_zone_3_crn" {\n value = module.management_vpc.vsi_zone_3_crn\n}\n\noutput "management_vpc_subnet_vpe_zone_1_name" {\n value = module.management_vpc.vpe_zone_1_name\n}\n\noutput "management_vpc_subnet_vpe_zone_1_id" {\n value = module.management_vpc.vpe_zone_1_id\n}\n\noutput "management_vpc_subnet_vpe_zone_1_crn" {\n value = module.management_vpc.vpe_zone_1_crn\n}\n\noutput "management_vpc_subnet_vpe_zone_2_name" {\n value = module.management_vpc.vpe_zone_2_name\n}\n\noutput "management_vpc_subnet_vpe_zone_2_id" {\n value = module.management_vpc.vpe_zone_2_id\n}\n\noutput "management_vpc_subnet_vpe_zone_2_crn" {\n value = module.management_vpc.vpe_zone_2_crn\n}\n\noutput "management_vpc_subnet_vpe_zone_3_name" {\n value = module.management_vpc.vpe_zone_3_name\n}\n\noutput "management_vpc_subnet_vpe_zone_3_id" {\n value = module.management_vpc.vpe_zone_3_id\n}\n\noutput "management_vpc_subnet_vpe_zone_3_crn" {\n value = module.management_vpc.vpe_zone_3_crn\n}\n\noutput "management_vpc_security_group_management_vpe_name" {\n value = module.management_vpc.management_vpe_name\n}\n\noutput "management_vpc_security_group_management_vpe_id" {\n value = module.management_vpc.management_vpe_id\n}\n\noutput "management_vpc_security_group_management_vsi_name" {\n value = module.management_vpc.management_vsi_name\n}\n\noutput "management_vpc_security_group_management_vsi_id" {\n value = module.management_vpc.management_vsi_id\n}\n\n##############################################################################\n\n##############################################################################\n# Workload VPC Outputs\n##############################################################################\n\noutput "workload_vpc_name" {\n value = module.workload_vpc.name\n}\n\noutput "workload_vpc_id" {\n value = module.workload_vpc.id\n}\n\noutput "workload_vpc_crn" {\n value = module.workload_vpc.crn\n}\n\noutput "workload_vpc_subnet_vsi_zone_1_name" {\n value = module.workload_vpc.vsi_zone_1_name\n}\n\noutput "workload_vpc_subnet_vsi_zone_1_id" {\n value = module.workload_vpc.vsi_zone_1_id\n}\n\noutput "workload_vpc_subnet_vsi_zone_1_crn" {\n value = module.workload_vpc.vsi_zone_1_crn\n}\n\noutput "workload_vpc_subnet_vsi_zone_2_name" {\n value = module.workload_vpc.vsi_zone_2_name\n}\n\noutput "workload_vpc_subnet_vsi_zone_2_id" {\n value = module.workload_vpc.vsi_zone_2_id\n}\n\noutput "workload_vpc_subnet_vsi_zone_2_crn" {\n value = module.workload_vpc.vsi_zone_2_crn\n}\n\noutput "workload_vpc_subnet_vsi_zone_3_name" {\n value = module.workload_vpc.vsi_zone_3_name\n}\n\noutput "workload_vpc_subnet_vsi_zone_3_id" {\n value = module.workload_vpc.vsi_zone_3_id\n}\n\noutput "workload_vpc_subnet_vsi_zone_3_crn" {\n value = module.workload_vpc.vsi_zone_3_crn\n}\n\noutput "workload_vpc_subnet_vpe_zone_1_name" {\n value = module.workload_vpc.vpe_zone_1_name\n}\n\noutput "workload_vpc_subnet_vpe_zone_1_id" {\n value = module.workload_vpc.vpe_zone_1_id\n}\n\noutput "workload_vpc_subnet_vpe_zone_1_crn" {\n value = module.workload_vpc.vpe_zone_1_crn\n}\n\noutput "workload_vpc_subnet_vpe_zone_2_name" {\n value = module.workload_vpc.vpe_zone_2_name\n}\n\noutput "workload_vpc_subnet_vpe_zone_2_id" {\n value = module.workload_vpc.vpe_zone_2_id\n}\n\noutput "workload_vpc_subnet_vpe_zone_2_crn" {\n value = module.workload_vpc.vpe_zone_2_crn\n}\n\noutput "workload_vpc_subnet_vpe_zone_3_name" {\n value = module.workload_vpc.vpe_zone_3_name\n}\n\noutput "workload_vpc_subnet_vpe_zone_3_id" {\n value = module.workload_vpc.vpe_zone_3_id\n}\n\noutput "workload_vpc_subnet_vpe_zone_3_crn" {\n value = module.workload_vpc.vpe_zone_3_crn\n}\n\noutput "workload_vpc_security_group_workload_vpe_name" {\n value = module.workload_vpc.workload_vpe_name\n}\n\noutput "workload_vpc_security_group_workload_vpe_id" {\n value = module.workload_vpc.workload_vpe_id\n}\n\n##############################################################################\n\n##############################################################################\n# Management Vpc Management Server Deployment Outputs\n##############################################################################\n\noutput "management_vpc_management_server_vsi_1_1_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_1_1.primary_network_interface[0].primary_ip[0].address\n}\n\noutput "management_vpc_management_server_vsi_1_2_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_1_2.primary_network_interface[0].primary_ip[0].address\n}\n\noutput "management_vpc_management_server_vsi_2_1_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_2_1.primary_network_interface[0].primary_ip[0].address\n}\n\noutput "management_vpc_management_server_vsi_2_2_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_2_2.primary_network_interface[0].primary_ip[0].address\n}\n\noutput "management_vpc_management_server_vsi_3_1_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_3_1.primary_network_interface[0].primary_ip[0].address\n}\n\noutput "management_vpc_management_server_vsi_3_2_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_3_2.primary_network_interface[0].primary_ip[0].address\n}\n\n##############################################################################\n', + data: '##############################################################################\n# Management VPC Outputs\n##############################################################################\n\noutput "management_vpc_name" {\n value = module.management_vpc.name\n}\n\noutput "management_vpc_id" {\n value = module.management_vpc.id\n}\n\noutput "management_vpc_crn" {\n value = module.management_vpc.crn\n}\n\noutput "management_vpc_subnet_vsi_zone_1_name" {\n value = module.management_vpc.vsi_zone_1_name\n}\n\noutput "management_vpc_subnet_vsi_zone_1_id" {\n value = module.management_vpc.vsi_zone_1_id\n}\n\noutput "management_vpc_subnet_vsi_zone_1_crn" {\n value = module.management_vpc.vsi_zone_1_crn\n}\n\noutput "management_vpc_subnet_vpn_zone_1_name" {\n value = module.management_vpc.vpn_zone_1_name\n}\n\noutput "management_vpc_subnet_vpn_zone_1_id" {\n value = module.management_vpc.vpn_zone_1_id\n}\n\noutput "management_vpc_subnet_vpn_zone_1_crn" {\n value = module.management_vpc.vpn_zone_1_crn\n}\n\noutput "management_vpc_subnet_vsi_zone_2_name" {\n value = module.management_vpc.vsi_zone_2_name\n}\n\noutput "management_vpc_subnet_vsi_zone_2_id" {\n value = module.management_vpc.vsi_zone_2_id\n}\n\noutput "management_vpc_subnet_vsi_zone_2_crn" {\n value = module.management_vpc.vsi_zone_2_crn\n}\n\noutput "management_vpc_subnet_vsi_zone_3_name" {\n value = module.management_vpc.vsi_zone_3_name\n}\n\noutput "management_vpc_subnet_vsi_zone_3_id" {\n value = module.management_vpc.vsi_zone_3_id\n}\n\noutput "management_vpc_subnet_vsi_zone_3_crn" {\n value = module.management_vpc.vsi_zone_3_crn\n}\n\noutput "management_vpc_subnet_vpe_zone_1_name" {\n value = module.management_vpc.vpe_zone_1_name\n}\n\noutput "management_vpc_subnet_vpe_zone_1_id" {\n value = module.management_vpc.vpe_zone_1_id\n}\n\noutput "management_vpc_subnet_vpe_zone_1_crn" {\n value = module.management_vpc.vpe_zone_1_crn\n}\n\noutput "management_vpc_subnet_vpe_zone_2_name" {\n value = module.management_vpc.vpe_zone_2_name\n}\n\noutput "management_vpc_subnet_vpe_zone_2_id" {\n value = module.management_vpc.vpe_zone_2_id\n}\n\noutput "management_vpc_subnet_vpe_zone_2_crn" {\n value = module.management_vpc.vpe_zone_2_crn\n}\n\noutput "management_vpc_subnet_vpe_zone_3_name" {\n value = module.management_vpc.vpe_zone_3_name\n}\n\noutput "management_vpc_subnet_vpe_zone_3_id" {\n value = module.management_vpc.vpe_zone_3_id\n}\n\noutput "management_vpc_subnet_vpe_zone_3_crn" {\n value = module.management_vpc.vpe_zone_3_crn\n}\n\noutput "management_vpc_security_group_management_vpe_name" {\n value = module.management_vpc.management_vpe_name\n}\n\noutput "management_vpc_security_group_management_vpe_id" {\n value = module.management_vpc.management_vpe_id\n}\n\noutput "management_vpc_security_group_management_vsi_name" {\n value = module.management_vpc.management_vsi_name\n}\n\noutput "management_vpc_security_group_management_vsi_id" {\n value = module.management_vpc.management_vsi_id\n}\n\n##############################################################################\n\n##############################################################################\n# Workload VPC Outputs\n##############################################################################\n\noutput "workload_vpc_name" {\n value = module.workload_vpc.name\n}\n\noutput "workload_vpc_id" {\n value = module.workload_vpc.id\n}\n\noutput "workload_vpc_crn" {\n value = module.workload_vpc.crn\n}\n\noutput "workload_vpc_subnet_vsi_zone_1_name" {\n value = module.workload_vpc.vsi_zone_1_name\n}\n\noutput "workload_vpc_subnet_vsi_zone_1_id" {\n value = module.workload_vpc.vsi_zone_1_id\n}\n\noutput "workload_vpc_subnet_vsi_zone_1_crn" {\n value = module.workload_vpc.vsi_zone_1_crn\n}\n\noutput "workload_vpc_subnet_vsi_zone_2_name" {\n value = module.workload_vpc.vsi_zone_2_name\n}\n\noutput "workload_vpc_subnet_vsi_zone_2_id" {\n value = module.workload_vpc.vsi_zone_2_id\n}\n\noutput "workload_vpc_subnet_vsi_zone_2_crn" {\n value = module.workload_vpc.vsi_zone_2_crn\n}\n\noutput "workload_vpc_subnet_vsi_zone_3_name" {\n value = module.workload_vpc.vsi_zone_3_name\n}\n\noutput "workload_vpc_subnet_vsi_zone_3_id" {\n value = module.workload_vpc.vsi_zone_3_id\n}\n\noutput "workload_vpc_subnet_vsi_zone_3_crn" {\n value = module.workload_vpc.vsi_zone_3_crn\n}\n\noutput "workload_vpc_subnet_vpe_zone_1_name" {\n value = module.workload_vpc.vpe_zone_1_name\n}\n\noutput "workload_vpc_subnet_vpe_zone_1_id" {\n value = module.workload_vpc.vpe_zone_1_id\n}\n\noutput "workload_vpc_subnet_vpe_zone_1_crn" {\n value = module.workload_vpc.vpe_zone_1_crn\n}\n\noutput "workload_vpc_subnet_vpe_zone_2_name" {\n value = module.workload_vpc.vpe_zone_2_name\n}\n\noutput "workload_vpc_subnet_vpe_zone_2_id" {\n value = module.workload_vpc.vpe_zone_2_id\n}\n\noutput "workload_vpc_subnet_vpe_zone_2_crn" {\n value = module.workload_vpc.vpe_zone_2_crn\n}\n\noutput "workload_vpc_subnet_vpe_zone_3_name" {\n value = module.workload_vpc.vpe_zone_3_name\n}\n\noutput "workload_vpc_subnet_vpe_zone_3_id" {\n value = module.workload_vpc.vpe_zone_3_id\n}\n\noutput "workload_vpc_subnet_vpe_zone_3_crn" {\n value = module.workload_vpc.vpe_zone_3_crn\n}\n\noutput "workload_vpc_security_group_workload_vpe_name" {\n value = module.workload_vpc.workload_vpe_name\n}\n\noutput "workload_vpc_security_group_workload_vpe_id" {\n value = module.workload_vpc.workload_vpe_id\n}\n\n##############################################################################\n\n##############################################################################\n# Management Vpc Management Server Deployment Outputs\n##############################################################################\n\noutput "management_vpc_management_server_vsi_1_1_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_1_1.primary_network_interface[0].primary_ip[0].address\n}\n\noutput "management_vpc_management_server_vsi_1_2_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_1_2.primary_network_interface[0].primary_ip[0].address\n}\n\noutput "management_vpc_management_server_vsi_2_1_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_2_1.primary_network_interface[0].primary_ip[0].address\n}\n\noutput "management_vpc_management_server_vsi_2_2_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_2_2.primary_network_interface[0].primary_ip[0].address\n}\n\noutput "management_vpc_management_server_vsi_3_1_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_3_1.primary_network_interface[0].primary_ip[0].address\n}\n\noutput "management_vpc_management_server_vsi_3_2_primary_ip_address" {\n value = ibm_is_instance.management_vpc_management_server_vsi_3_2.primary_network_interface[0].primary_ip[0].address\n}\n\n##############################################################################\n\n##############################################################################\n# Atracker Cos Object Storage Outputs\n##############################################################################\n\noutput "atracker_cos_object_storage_bucket_atracker_bucket_bucket_name" {\n value = ibm_cos_bucket.atracker_cos_object_storage_atracker_bucket_bucket.bucket_name\n}\n\noutput "atracker_cos_object_storage_bucket_atracker_bucket_region_location" {\n value = ibm_cos_bucket.atracker_cos_object_storage_atracker_bucket_bucket.region_location\n}\n\n##############################################################################\n\n##############################################################################\n# Cos Object Storage Outputs\n##############################################################################\n\noutput "cos_object_storage_bucket_management_bucket_bucket_name" {\n value = ibm_cos_bucket.cos_object_storage_management_bucket_bucket.bucket_name\n}\n\noutput "cos_object_storage_bucket_management_bucket_region_location" {\n value = ibm_cos_bucket.cos_object_storage_management_bucket_bucket.region_location\n}\n\noutput "cos_object_storage_bucket_workload_bucket_bucket_name" {\n value = ibm_cos_bucket.cos_object_storage_workload_bucket_bucket.bucket_name\n}\n\noutput "cos_object_storage_bucket_workload_bucket_region_location" {\n value = ibm_cos_bucket.cos_object_storage_workload_bucket_bucket.region_location\n}\n\n##############################################################################\n', }, { name: "craig/management_vpc", data: "" }, { name: "craig/management_vpc", data: "" }, @@ -276,7 +276,7 @@ describe("craig api", () => { }, { name: "from-scratch/craig.json", - data: '{\n "_options": {\n "prefix": "iac",\n "region": "us-south",\n "tags": [\n "hello",\n "world"\n ],\n "zones": 3,\n "endpoints": "private",\n "account_id": null,\n "fs_cloud": false,\n "enable_classic": false,\n "dynamic_subnets": true,\n "enable_power_vs": false,\n "craig_version": "1.12.0",\n "power_vs_zones": [],\n "power_vs_high_availability": false,\n "no_vpn_secrets_manager_auth": false\n },\n "access_groups": [],\n "appid": [],\n "atracker": {\n "enabled": false,\n "type": "cos",\n "name": "atracker",\n "target_name": "atracker-cos",\n "bucket": null,\n "add_route": true,\n "cos_key": null,\n "locations": [\n "global",\n "us-south"\n ],\n "instance": false,\n "plan": "lite",\n "resource_group": null\n },\n "cbr_rules": [],\n "cbr_zones": [],\n "clusters": [],\n "dns": [],\n "event_streams": [],\n "f5_vsi": [],\n "iam_account_settings": {\n "enable": false,\n "mfa": null,\n "allowed_ip_addresses": null,\n "include_history": false,\n "if_match": null,\n "max_sessions_per_identity": null,\n "restrict_create_service_id": null,\n "restrict_create_platform_apikey": null,\n "session_expiration_in_seconds": null,\n "session_invalidation_in_seconds": null\n },\n "icd": [],\n "key_management": [],\n "load_balancers": [],\n "logdna": {\n "name": "logdna",\n "archive": false,\n "enabled": false,\n "plan": "lite",\n "endpoints": "private",\n "platform_logs": false,\n "resource_group": null,\n "cos": null,\n "bucket": null\n },\n "object_storage": [],\n "power": [],\n "power_instances": [],\n "power_volumes": [],\n "resource_groups": [\n {\n "use_prefix": true,\n "name": "craig-rg",\n "use_data": false\n }\n ],\n "routing_tables": [],\n "scc": {\n "credential_description": null,\n "id": null,\n "passphrase": null,\n "name": "",\n "location": "us",\n "collector_description": null,\n "is_public": false,\n "scope_description": null,\n "enable": false\n },\n "secrets_manager": [],\n "security_groups": [],\n "ssh_keys": [],\n "sysdig": {\n "enabled": false,\n "plan": "graduated-tier",\n "resource_group": null,\n "name": "sysdig",\n "platform_logs": false\n },\n "teleport_vsi": [],\n "transit_gateways": [],\n "virtual_private_endpoints": [],\n "vpcs": [],\n "vpn_gateways": [],\n "vpn_servers": [],\n "vsi": [],\n "classic_ssh_keys": [],\n "classic_vlans": []\n}', + data: '{\n "_options": {\n "prefix": "iac",\n "region": "us-south",\n "tags": [\n "hello",\n "world"\n ],\n "zones": 3,\n "endpoints": "private",\n "account_id": null,\n "fs_cloud": false,\n "enable_classic": false,\n "dynamic_subnets": true,\n "enable_power_vs": false,\n "craig_version": "1.12.0",\n "power_vs_zones": [],\n "power_vs_high_availability": false,\n "no_vpn_secrets_manager_auth": false,\n "power_vs_ha_zone_1": null,\n "power_vs_ha_zone_2": null\n },\n "access_groups": [],\n "appid": [],\n "atracker": {\n "enabled": false,\n "type": "cos",\n "name": "atracker",\n "target_name": "atracker-cos",\n "bucket": null,\n "add_route": true,\n "cos_key": null,\n "locations": [\n "global",\n "us-south"\n ],\n "instance": false,\n "plan": "lite",\n "resource_group": null,\n "archive": false\n },\n "cbr_rules": [],\n "cbr_zones": [],\n "classic_ssh_keys": [],\n "classic_vlans": [],\n "clusters": [],\n "dns": [],\n "event_streams": [],\n "f5_vsi": [],\n "iam_account_settings": {\n "enable": false,\n "mfa": null,\n "allowed_ip_addresses": null,\n "include_history": false,\n "if_match": null,\n "max_sessions_per_identity": null,\n "restrict_create_service_id": null,\n "restrict_create_platform_apikey": null,\n "session_expiration_in_seconds": null,\n "session_invalidation_in_seconds": null\n },\n "icd": [],\n "key_management": [],\n "load_balancers": [],\n "logdna": {\n "name": "logdna",\n "archive": false,\n "enabled": false,\n "plan": "lite",\n "endpoints": "private",\n "platform_logs": false,\n "resource_group": null,\n "cos": null,\n "bucket": null\n },\n "object_storage": [],\n "power": [],\n "power_instances": [],\n "power_volumes": [],\n "resource_groups": [\n {\n "use_prefix": true,\n "name": "craig-rg",\n "use_data": false\n }\n ],\n "routing_tables": [],\n "scc": {\n "credential_description": null,\n "id": null,\n "passphrase": null,\n "name": "",\n "location": "us",\n "collector_description": null,\n "is_public": false,\n "scope_description": null,\n "enable": false\n },\n "secrets_manager": [],\n "security_groups": [],\n "ssh_keys": [],\n "sysdig": {\n "enabled": false,\n "plan": "graduated-tier",\n "resource_group": null,\n "name": "sysdig",\n "platform_logs": false\n },\n "teleport_vsi": [],\n "transit_gateways": [],\n "virtual_private_endpoints": [],\n "vpcs": [],\n "vpn_gateways": [],\n "vpn_servers": [],\n "vsi": []\n}', }, { data: ' Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n"License" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n"Licensor" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n"Legal Entity" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n"control" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n"You" (or "Your") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n"Source" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n"Object" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n"Work" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n"Derivative Works" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n"Contribution" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, "submitted"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as "Not a Contribution."\n\n"Contributor" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a "NOTICE" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets "[]"\nreplaced with your own identifying information. (Don\'t include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame "printed page" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n', diff --git a/unit-tests/api/power-api.test.js b/unit-tests/api/power-api.test.js index 327faf9f..617ed1c9 100644 --- a/unit-tests/api/power-api.test.js +++ b/unit-tests/api/power-api.test.js @@ -214,10 +214,10 @@ describe("power api", () => { }, ], storagePoolsCapacity: [ - { poolName: "Tier1-Flash-1" }, - { poolName: "Tier1-Flash-2" }, - { poolName: "Tier3-Flash-1" }, - { poolName: "Tier1-Flash-2" }, + { poolName: "Tier1-Flash-1", replicationEnabled: true }, + { poolName: "Tier1-Flash-2", replicationEnabled: true }, + { poolName: "Tier3-Flash-1", replicationEnabled: false }, + { poolName: "Tier1-Flash-2", replicationEnabled: false }, ], }, false @@ -233,8 +233,8 @@ describe("power api", () => { .then(() => { assert.isTrue( res.send.calledOnceWith([ - "Tier1-Flash-1", - "Tier1-Flash-2", + "Tier1-Flash-1 (Replication Enabled)", + "Tier1-Flash-2 (Replication Enabled)", "Tier3-Flash-1", "Tier1-Flash-2", ]), diff --git a/unit-tests/api/vsi-api.test.js b/unit-tests/api/vsi-api.test.js index 7f46a09d..445cfb17 100644 --- a/unit-tests/api/vsi-api.test.js +++ b/unit-tests/api/vsi-api.test.js @@ -4,8 +4,41 @@ const controller = require("../../express-controllers/controller"); const res = require("../mocks/response.mock"); const vsiInstanceProfilesRaw = require("../data-files/vsiInstanceProfilesRaw.json"); const vsiImagesRaw = require("../data-files/vsiImagesRaw.json"); +const vsiImagesRawPage2 = require("../data-files/vsiImagesRawPage2.json"); const { initMockAxios } = require("lazy-z"); +/** + * initialize mock axios + * @param {object} data arbitrary data to return + * @param {boolean=} err reject data on error + * @param {boolean} recursive true if axios is used in a recursive test + * @returns {Promise} mock axios + */ +function initRecursiveMockAxios(data, err, recursive) { + let timesCalled = -1; + /** + * moch axios promise + * @returns {Promise} axios mock promise + */ + function mockAxios() { + timesCalled++; + return new Promise((resolve, reject) => { + if (err) reject(data); + else resolve({ data: recursive ? data[timesCalled] : data }); + }); + } + + function constructor() { + this.axios = mockAxios; + this.axios.get = mockAxios; + this.axios.post = mockAxios; + this.axios.put = mockAxios; + this.axios.patch = mockAxios; + this.axios.delete = mockAxios; + } + return new constructor(); +} + describe("vsi api", () => { beforeEach(() => { res.send = new sinon.spy(); @@ -37,9 +70,16 @@ describe("vsi api", () => { }); }); describe("vsiImages", () => { + let data; + beforeEach(() => { + data = [vsiImagesRaw, vsiImagesRawPage2]; + }); it("should respond with the correct data", () => { - let { axios } = initMockAxios(vsiImagesRaw); + let { axios } = initRecursiveMockAxios(data, false, true); let testController = new controller(axios); + testController.getBearerToken = () => { + return new Promise((resolve) => resolve("token")); + }; return testController .vsiImages({ params: { region: "us-south" } }, res) .then(() => { @@ -48,8 +88,11 @@ describe("vsi api", () => { res.send.lastCall.args, [ [ + "Debian GNU/Linux 9.x Stretch/Stable - Minimal Install (amd64) 2 [debian-9-amd64]", "Debian GNU/Linux 9.x Stretch/Stable - Minimal Install (amd64) [debian-9-amd64]", + "Ubuntu Linux 16.04 LTS Xenial Xerus Minimal Install (amd64) 2 [my-image]", "Ubuntu Linux 16.04 LTS Xenial Xerus Minimal Install (amd64) [my-image]", + "Windows Server 2016 Standard Edition (amd64) 2 [windows-2016-amd64]", "Windows Server 2016 Standard Edition (amd64) [windows-2016-amd64]", ], ], diff --git a/unit-tests/data-files/config-to-files/modules-power-config-to-files.json b/unit-tests/data-files/config-to-files/modules-power-config-to-files.json index 5365b2ba..443c9d15 100644 --- a/unit-tests/data-files/config-to-files/modules-power-config-to-files.json +++ b/unit-tests/data-files/config-to-files/modules-power-config-to-files.json @@ -31,6 +31,6 @@ "cbr.tf": "##############################################################################\n# Foo Cbr Name Zone\n##############################################################################\n\nresource \"ibm_cbr_zone\" \"slz_foo_cbr_name_zone\" {\n name = \"${var.prefix}-zone-foo-cbr-name\"\n account_id = \"12ab34cd56ef78ab90cd12ef34ab56cd\"\n description = \"this is a cbr zone description\"\n addresses {\n type = \"ipAddress\"\n value = \"169.23.56.234\"\n ref {\n account_id = \"12ab34cd56ef78ab90cd12ef34ab56cd\"\n location = var.region\n service_instance = \"fake-service-instance\"\n service_name = \"frog-service-name\"\n service_type = \"frog-service\"\n }\n }\n addresses {\n type = \"ipRange\"\n value = \"169.23.22.0-169.23.22.255\"\n ref {\n account_id = \"12ab34cd56ef78ab90cd12ef34ab56cd\"\n location = var.region\n service_instance = \"fake-service-instance\"\n service_name = \"frog-service-name\"\n service_type = \"frog-service\"\n }\n }\n excluded {\n type = \"ipAddress\"\n value = \"169.23.22.11\"\n }\n excluded {\n type = \"ipAddress\"\n value = \"169.23.22.10\"\n }\n}\n\n##############################################################################\n\n##############################################################################\n# Frog Rule\n##############################################################################\n\nresource \"ibm_cbr_rule\" \"slz_cbr_rule_frog\" {\n description = \"test cbr rule description\"\n enforcement_mode = \"enabled\"\n contexts {\n attributes {\n name = \"networkZoneId\"\n value = \"559052eb8f43302824e7ae490c0281eb, bf823d4f45b64ceaa4671bee0479346e\"\n }\n attributes {\n name = \"endpointType\"\n value = \"private\"\n }\n }\n resources {\n tags {\n name = \"tag_name\"\n value = \"tag_value\"\n }\n attributes {\n name = \"accountId\"\n value = \"12ab34cd56ef78ab90cd12ef34ab56cd\"\n }\n attributes {\n name = \"serviceName\"\n value = \"network-policy-enabled\"\n }\n }\n operations {\n api_types {\n api_type_id = \"api_type_id\"\n }\n }\n}\n\n##############################################################################\n", "dns.tf": "##############################################################################\n# Test DNS Service\n##############################################################################\n\nresource \"ibm_resource_instance\" \"test_dns_instance\" {\n name = \"${var.prefix}-test-dns-instance\"\n resource_group_id = ibm_resource_group.service_rg.id\n location = \"global\"\n service = \"dns-svcs\"\n plan = \"standard-dns\"\n}\n\n##############################################################################\n\n##############################################################################\n# Test DNS Zone Test.com\n##############################################################################\n\nresource \"ibm_dns_zone\" \"test_dns_instance_test_dot_com\" {\n name = \"test.com\"\n instance_id = ibm_resource_instance.test_dns_instance.guid\n description = \"test description\"\n label = \"test\"\n}\n\nresource \"ibm_dns_resource_record\" \"test_dns_instance_test_dot_com_testa\" {\n instance_id = ibm_resource_instance.test_dns_instance.guid\n zone_id = ibm_dns_zone.test_dns_instance_test_dot_com.zone_id\n type = \"A\"\n name = \"testA\"\n rdata = \"test.com\"\n}\n\nresource \"ibm_dns_permitted_network\" \"test_dns_instance_test_dot_com_permitted_network_management\" {\n instance_id = ibm_resource_instance.test_dns_instance.guid\n zone_id = ibm_dns_zone.test_dns_instance_test_dot_com.zone_id\n vpc_crn = module.management_vpc.crn\n type = \"vpc\"\n}\n\n##############################################################################\n\n##############################################################################\n# Test DNS Custom Resolvers\n##############################################################################\n\nresource \"ibm_dns_custom_resolver\" \"test_dns_instance_resolver_dev_res\" {\n name = \"dev-res\"\n instance_id = ibm_resource_instance.test_dns_instance.guid\n description = \"new resolve\"\n high_availability = true\n enabled = true\n locations {\n subnet_crn = module.management_vpc.vsi_zone_1_crn\n enabled = true\n }\n locations {\n subnet_crn = module.management_vpc.vsi_zone_2_crn\n enabled = true\n }\n locations {\n subnet_crn = module.management_vpc.vsi_zone_3_crn\n enabled = true\n }\n}\n\n##############################################################################\n", "power_infrastructure.tf": "##############################################################################\n# Power VS Workspace Example\n##############################################################################\n\nresource \"ibm_resource_instance\" \"power_vs_workspace_example\" {\n provider = ibm.power_vs_dal10\n name = \"${var.prefix}-power-workspace-example\"\n service = \"power-iaas\"\n plan = \"power-virtual-server-group\"\n location = \"dal10\"\n resource_group_id = ibm_resource_group.slz_management_rg.id\n tags = [\n \"slz\",\n \"landing-zone\"\n ]\n timeouts {\n create = \"6m\"\n update = \"5m\"\n delete = \"10m\"\n }\n}\n\n##############################################################################\n\n##############################################################################\n# Example Workspace SSH Keys\n##############################################################################\n\nresource \"ibm_pi_key\" \"power_vs_ssh_key_keyname\" {\n provider = ibm.power_vs_dal10\n pi_cloud_instance_id = ibm_resource_instance.power_vs_workspace_example.guid\n pi_key_name = \"${var.prefix}-power-example-keyname-key\"\n pi_ssh_key = var.power_example_keyname_key\n}\n\n##############################################################################\n\n##############################################################################\n# Example Workspace Network\n##############################################################################\n\nresource \"ibm_pi_network\" \"power_network_example_dev_nw\" {\n provider = ibm.power_vs_dal10\n pi_cloud_instance_id = ibm_resource_instance.power_vs_workspace_example.guid\n pi_network_name = \"${var.prefix}-power-network-dev-nw\"\n pi_cidr = \"1.2.3.4/5\"\n pi_network_type = \"vlan\"\n pi_network_mtu = 9000\n pi_dns = [\n \"127.0.0.1\"\n ]\n}\n\n##############################################################################\n\n##############################################################################\n# Example Workspace Images\n##############################################################################\n\nresource \"ibm_pi_image\" \"power_image_example_sles15_sp3_sap\" {\n provider = ibm.power_vs_dal10\n pi_cloud_instance_id = ibm_resource_instance.power_vs_workspace_example.guid\n pi_image_id = \"e4de6683-2a42-4993-b702-c8613f132d39\"\n pi_image_name = \"SLES15-SP3-SAP\"\n timeouts {\n create = \"9m\"\n }\n}\n\n##############################################################################\n\n##############################################################################\n# Example Workspace Dev Connection\n##############################################################################\n\nresource \"ibm_pi_cloud_connection\" \"power_network_example_connection_dev_connection\" {\n provider = ibm.power_vs_dal10\n pi_cloud_instance_id = ibm_resource_instance.power_vs_workspace_example.guid\n pi_cloud_connection_name = \"${var.prefix}-power-network-dev-connection-connection\"\n pi_cloud_connection_speed = 50\n pi_cloud_connection_global_routing = false\n pi_cloud_connection_metered = false\n pi_cloud_connection_transit_enabled = true\n}\n\ndata \"ibm_dl_gateway\" \"power_network_example_connection_dev_connection\" {\n provider = ibm.power_vs_dal10\n name = \"${var.prefix}-power-network-dev-connection-connection\"\n depends_on = [\n ibm_pi_cloud_connection.power_network_example_connection_dev_connection\n ]\n}\n\nresource \"time_sleep\" \"power_network_example_connection_dev_connection_sleep\" {\n create_duration = \"120s\"\n triggers = {\n crn = data.ibm_dl_gateway.power_network_example_connection_dev_connection.crn\n }\n depends_on = [\n data.ibm_dl_gateway.power_network_example_connection_dev_connection\n ]\n}\n\n##############################################################################\n\n##############################################################################\n# Example Workspace Network Attachments\n##############################################################################\n\nresource \"ibm_pi_cloud_connection_network_attach\" \"power_example_dev_connection_connection_dev_nw_connection\" {\n provider = ibm.power_vs_dal10\n pi_cloud_instance_id = ibm_resource_instance.power_vs_workspace_example.guid\n pi_cloud_connection_id = ibm_pi_cloud_connection.power_network_example_connection_dev_connection.cloud_connection_id\n pi_network_id = ibm_pi_network.power_network_example_dev_nw.network_id\n}\n\n##############################################################################\n", - "power_instances.tf": "##############################################################################\n# Test Power Instance\n##############################################################################\n\nresource \"ibm_pi_instance\" \"example_workspace_instance_test\" {\n provider = ibm.power_vs_dal12\n pi_image_id = ibm_pi_image.power_image_example_sles15_sp3_sap.image_id\n pi_key_pair_name = ibm_pi_key.power_vs_ssh_key_keyname.pi_key_name\n pi_cloud_instance_id = ibm_resource_instance.power_vs_workspace_example.guid\n pi_instance_name = \"${var.prefix}-test\"\n pi_memory = \"4\"\n pi_processors = \"2\"\n pi_proc_type = \"shared\"\n pi_sys_type = \"s922\"\n pi_pin_policy = \"none\"\n pi_health_status = \"WARNING\"\n pi_storage_type = \"tier1\"\n pi_network {\n network_id = ibm_pi_network.power_network_example_dev_nw.network_id\n }\n}\n\n##############################################################################\n", + "power_instances.tf": "##############################################################################\n# Test Power Instance\n##############################################################################\n\nresource \"ibm_pi_instance\" \"example_workspace_instance_test\" {\n provider = ibm.power_vs_dal12\n pi_image_id = ibm_pi_image.power_image_example_sles15_sp3_sap.image_id\n pi_key_pair_name = ibm_pi_key.power_vs_ssh_key_keyname.pi_key_name\n pi_cloud_instance_id = ibm_resource_instance.power_vs_workspace_example.guid\n pi_instance_name = \"${var.prefix}-test\"\n pi_memory = \"4\"\n pi_processors = \"2\"\n pi_proc_type = \"shared\"\n pi_sys_type = \"s922\"\n pi_pin_policy = \"none\"\n pi_health_status = \"WARNING\"\n pi_storage_type = \"tier1\"\n pi_network {\n network_id = ibm_pi_network.power_network_example_dev_nw.network_id\n }\n timeouts {\n create = \"3h\"\n }\n}\n\n##############################################################################\n", "craig.json": "{\n \"_options\": {\n \"prefix\": \"slz\",\n \"region\": \"us-south\",\n \"tags\": [\n \"slz\",\n \"landing-zone\"\n ],\n \"endpoints\": \"private\",\n \"account_id\": \"1234\"\n },\n \"icd\": [],\n \"power\": [],\n \"resource_groups\": [\n {\n \"use_prefix\": true,\n \"name\": \"slz-service-rg\",\n \"use_data\": false\n },\n {\n \"use_prefix\": true,\n \"name\": \"slz-management-rg\",\n \"use_data\": false\n },\n {\n \"use_prefix\": true,\n \"name\": \"slz-workload-rg\",\n \"use_data\": false\n }\n ],\n \"key_management\": [\n {\n \"name\": \"slz-kms\",\n \"resource_group\": \"slz-service-rg\",\n \"use_hs_crypto\": false,\n \"authorize_vpc_reader_role\": true,\n \"use_data\": false,\n \"keys\": [\n {\n \"key_ring\": \"slz-slz-ring\",\n \"name\": \"slz-slz-key\",\n \"root_key\": true,\n \"force_delete\": true,\n \"endpoint\": \"public\",\n \"rotation\": 12,\n \"dual_auth_delete\": false\n },\n {\n \"key_ring\": \"slz-slz-ring\",\n \"name\": \"slz-atracker-key\",\n \"root_key\": true,\n \"force_delete\": true,\n \"endpoint\": \"public\",\n \"rotation\": 12,\n \"dual_auth_delete\": false\n },\n {\n \"key_ring\": \"slz-slz-ring\",\n \"name\": \"slz-vsi-volume-key\",\n \"root_key\": true,\n \"force_delete\": true,\n \"endpoint\": \"public\",\n \"rotation\": 12,\n \"dual_auth_delete\": false\n }\n ]\n }\n ],\n \"object_storage\": [\n {\n \"buckets\": [\n {\n \"endpoint\": \"public\",\n \"force_delete\": true,\n \"kms_key\": \"slz-atracker-key\",\n \"name\": \"atracker-bucket\",\n \"storage_class\": \"standard\"\n }\n ],\n \"keys\": [\n {\n \"name\": \"cos-bind-key\",\n \"role\": \"Writer\",\n \"enable_hmac\": false\n }\n ],\n \"name\": \"atracker-cos\",\n \"plan\": \"standard\",\n \"resource_group\": \"slz-service-rg\",\n \"use_data\": false,\n \"use_random_suffix\": \"false\",\n \"kms\": \"slz-kms\"\n },\n {\n \"buckets\": [\n {\n \"endpoint\": \"public\",\n \"force_delete\": true,\n \"kms_key\": \"slz-slz-key\",\n \"name\": \"management-bucket\",\n \"storage_class\": \"standard\"\n },\n {\n \"endpoint\": \"public\",\n \"force_delete\": true,\n \"kms_key\": \"slz-slz-key\",\n \"name\": \"workload-bucket\",\n \"storage_class\": \"standard\"\n }\n ],\n \"keys\": [],\n \"name\": \"cos\",\n \"plan\": \"standard\",\n \"resource_group\": \"slz-service-rg\",\n \"use_random_suffix\": \"false\",\n \"kms\": \"slz-kms\"\n }\n ],\n \"secrets_manager\": [],\n \"atracker\": {\n \"enabled\": true,\n \"type\": \"cos\",\n \"name\": \"slz-atracker\",\n \"target_name\": \"atracker-cos\",\n \"bucket\": \"atracker-bucket\",\n \"add_route\": true,\n \"cos_key\": \"cos-bind-key\",\n \"locations\": [\n \"global\",\n \"us-south\"\n ]\n },\n \"vpcs\": [\n {\n \"cos\": \"cos\",\n \"bucket\": \"management-bucket\",\n \"name\": \"management\",\n \"resource_group\": \"slz-management-rg\",\n \"classic_access\": false,\n \"manual_address_prefix_management\": true,\n \"default_network_acl_name\": null,\n \"default_security_group_name\": null,\n \"default_routing_table_name\": null,\n \"address_prefixes\": [\n {\n \"vpc\": \"management\",\n \"zone\": 1,\n \"cidr\": \"10.10.10.0/24\",\n \"name\": \"vsi-zone-1\"\n },\n {\n \"vpc\": \"management\",\n \"zone\": 2,\n \"cidr\": \"10.10.20.0/24\",\n \"name\": \"vsi-zone-2\"\n },\n {\n \"vpc\": \"management\",\n \"zone\": 3,\n \"cidr\": \"10.10.30.0/24\",\n \"name\": \"vsi-zone-3\"\n },\n {\n \"vpc\": \"management\",\n \"zone\": 1,\n \"cidr\": \"10.20.10.0/24\",\n \"name\": \"vpe-zone-1\"\n },\n {\n \"vpc\": \"management\",\n \"zone\": 2,\n \"cidr\": \"10.20.20.0/24\",\n \"name\": \"vpe-zone-2\"\n },\n {\n \"vpc\": \"management\",\n \"zone\": 3,\n \"cidr\": \"10.20.30.0/24\",\n \"name\": \"vpe-zone-3\"\n },\n {\n \"vpc\": \"management\",\n \"zone\": 1,\n \"cidr\": \"10.30.10.0/24\",\n \"name\": \"vpn-zone-1\"\n }\n ],\n \"subnets\": [\n {\n \"vpc\": \"management\",\n \"zone\": 1,\n \"cidr\": \"10.10.10.0/24\",\n \"name\": \"vsi-zone-1\",\n \"network_acl\": \"management\",\n \"resource_group\": \"slz-management-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"management\",\n \"zone\": 1,\n \"cidr\": \"10.10.30.0/24\",\n \"name\": \"vpn-zone-1\",\n \"network_acl\": \"management\",\n \"resource_group\": \"slz-management-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"management\",\n \"zone\": 2,\n \"cidr\": \"10.10.20.0/24\",\n \"name\": \"vsi-zone-2\",\n \"network_acl\": \"management\",\n \"resource_group\": \"slz-management-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"management\",\n \"zone\": 3,\n \"cidr\": \"10.10.30.0/24\",\n \"name\": \"vsi-zone-3\",\n \"network_acl\": \"management\",\n \"resource_group\": \"slz-management-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"management\",\n \"zone\": 1,\n \"cidr\": \"10.20.10.0/24\",\n \"name\": \"vpe-zone-1\",\n \"resource_group\": \"slz-management-rg\",\n \"network_acl\": \"management\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"management\",\n \"zone\": 2,\n \"cidr\": \"10.20.20.0/24\",\n \"name\": \"vpe-zone-2\",\n \"network_acl\": \"management\",\n \"resource_group\": \"slz-management-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"management\",\n \"zone\": 3,\n \"cidr\": \"10.20.30.0/24\",\n \"name\": \"vpe-zone-3\",\n \"network_acl\": \"management\",\n \"resource_group\": \"slz-management-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n }\n ],\n \"public_gateways\": [],\n \"acls\": [\n {\n \"resource_group\": \"slz-management-rg\",\n \"name\": \"management\",\n \"vpc\": \"management\",\n \"rules\": [\n {\n \"action\": \"allow\",\n \"destination\": \"10.0.0.0/8\",\n \"direction\": \"inbound\",\n \"name\": \"allow-ibm-inbound\",\n \"source\": \"161.26.0.0/16\",\n \"acl\": \"management\",\n \"vpc\": \"management\",\n \"icmp\": {\n \"type\": null,\n \"code\": null\n },\n \"tcp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n },\n \"udp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n }\n },\n {\n \"action\": \"allow\",\n \"destination\": \"10.0.0.0/8\",\n \"direction\": \"inbound\",\n \"name\": \"allow-all-network-inbound\",\n \"source\": \"10.0.0.0/8\",\n \"acl\": \"management\",\n \"vpc\": \"management\",\n \"icmp\": {\n \"type\": null,\n \"code\": null\n },\n \"tcp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n },\n \"udp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n }\n },\n {\n \"action\": \"allow\",\n \"destination\": \"0.0.0.0/0\",\n \"direction\": \"outbound\",\n \"name\": \"allow-all-outbound\",\n \"source\": \"0.0.0.0/0\",\n \"acl\": \"management\",\n \"vpc\": \"management\",\n \"icmp\": {\n \"type\": null,\n \"code\": null\n },\n \"tcp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n },\n \"udp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n }\n }\n ]\n }\n ]\n },\n {\n \"cos\": \"cos\",\n \"bucket\": \"management-bucket\",\n \"name\": \"workload\",\n \"resource_group\": \"slz-workload-rg\",\n \"classic_access\": false,\n \"manual_address_prefix_management\": true,\n \"default_network_acl_name\": null,\n \"default_security_group_name\": null,\n \"default_routing_table_name\": null,\n \"address_prefixes\": [\n {\n \"vpc\": \"workload\",\n \"zone\": 1,\n \"cidr\": \"10.40.10.0/24\",\n \"name\": \"vsi-zone-1\"\n },\n {\n \"vpc\": \"workload\",\n \"zone\": 2,\n \"cidr\": \"10.50.10.0/24\",\n \"name\": \"vsi-zone-2\"\n },\n {\n \"vpc\": \"workload\",\n \"zone\": 3,\n \"cidr\": \"10.60.10.0/24\",\n \"name\": \"vsi-zone-3\"\n },\n {\n \"vpc\": \"workload\",\n \"zone\": 1,\n \"cidr\": \"10.40.20.0/24\",\n \"name\": \"vpe-zone-1\"\n },\n {\n \"vpc\": \"workload\",\n \"zone\": 2,\n \"cidr\": \"10.50.20.0/24\",\n \"name\": \"vpe-zone-2\"\n },\n {\n \"vpc\": \"workload\",\n \"zone\": 3,\n \"cidr\": \"10.60.20.0/24\",\n \"name\": \"vpe-zone-3\"\n }\n ],\n \"subnets\": [\n {\n \"vpc\": \"workload\",\n \"zone\": 1,\n \"cidr\": \"10.40.10.0/24\",\n \"name\": \"vsi-zone-1\",\n \"network_acl\": \"workload\",\n \"resource_group\": \"slz-workload-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"workload\",\n \"zone\": 2,\n \"cidr\": \"10.50.20.0/24\",\n \"name\": \"vsi-zone-2\",\n \"network_acl\": \"workload\",\n \"resource_group\": \"slz-workload-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"workload\",\n \"zone\": 3,\n \"cidr\": \"10.60.30.0/24\",\n \"name\": \"vsi-zone-3\",\n \"network_acl\": \"workload\",\n \"resource_group\": \"slz-workload-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"workload\",\n \"zone\": 1,\n \"cidr\": \"10.20.10.0/24\",\n \"name\": \"vpe-zone-1\",\n \"network_acl\": \"workload\",\n \"resource_group\": \"slz-workload-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"workload\",\n \"zone\": 2,\n \"cidr\": \"10.20.20.0/24\",\n \"name\": \"vpe-zone-2\",\n \"network_acl\": \"workload\",\n \"resource_group\": \"slz-workload-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n },\n {\n \"vpc\": \"workload\",\n \"zone\": 3,\n \"cidr\": \"10.20.30.0/24\",\n \"name\": \"vpe-zone-3\",\n \"network_acl\": \"workload\",\n \"resource_group\": \"slz-workload-rg\",\n \"public_gateway\": false,\n \"has_prefix\": true\n }\n ],\n \"public_gateways\": [],\n \"acls\": [\n {\n \"resource_group\": \"slz-workload-rg\",\n \"name\": \"workload\",\n \"vpc\": \"workload\",\n \"rules\": [\n {\n \"action\": \"allow\",\n \"destination\": \"10.0.0.0/8\",\n \"direction\": \"inbound\",\n \"name\": \"allow-ibm-inbound\",\n \"source\": \"161.26.0.0/16\",\n \"acl\": \"workload\",\n \"vpc\": \"workload\",\n \"icmp\": {\n \"type\": null,\n \"code\": null\n },\n \"tcp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n },\n \"udp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n }\n },\n {\n \"action\": \"allow\",\n \"destination\": \"10.0.0.0/8\",\n \"direction\": \"inbound\",\n \"name\": \"allow-all-network-inbound\",\n \"source\": \"10.0.0.0/8\",\n \"acl\": \"workload\",\n \"vpc\": \"workload\",\n \"icmp\": {\n \"type\": null,\n \"code\": null\n },\n \"tcp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n },\n \"udp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n }\n },\n {\n \"action\": \"allow\",\n \"destination\": \"0.0.0.0/0\",\n \"direction\": \"outbound\",\n \"name\": \"allow-all-outbound\",\n \"source\": \"0.0.0.0/0\",\n \"acl\": \"workload\",\n \"vpc\": \"workload\",\n \"icmp\": {\n \"type\": null,\n \"code\": null\n },\n \"tcp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n },\n \"udp\": {\n \"port_min\": null,\n \"port_max\": null,\n \"source_port_min\": null,\n \"source_port_max\": null\n }\n }\n ]\n }\n ]\n }\n ],\n \"virtual_private_endpoints\": [\n {\n \"vpc\": \"management\",\n \"service\": \"cos\",\n \"resource_group\": \"slz-management-rg\",\n \"security_groups\": [\n \"management-vpe-sg\"\n ],\n \"subnets\": [\n \"vpe-zone-1\",\n \"vpe-zone-2\",\n \"vpe-zone-3\"\n ]\n },\n {\n \"vpc\": \"workload\",\n \"service\": \"cos\",\n \"resource_group\": \"slz-workload-rg\",\n \"security_groups\": [\n \"workload-vpe-sg\"\n ],\n \"subnets\": [\n \"vpe-zone-1\",\n \"vpe-zone-2\",\n \"vpe-zone-3\"\n ]\n }\n ],\n \"security_groups\": [\n {\n \"vpc\": \"management\",\n \"name\": \"management-vpe-sg\",\n \"resource_group\": \"slz-management-rg\",\n \"rules\": [\n {\n \"vpc\": \"management\",\n \"sg\": \"management-vpe-sg\",\n \"direction\": \"inbound\",\n \"name\": \"allow-ibm-inbound\",\n \"source\": \"161.26.0.0/16\",\n \"tcp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n },\n {\n \"vpc\": \"management\",\n \"sg\": \"management-vpe-sg\",\n \"direction\": \"inbound\",\n \"name\": \"allow-vpc-inbound\",\n \"source\": \"10.0.0.0/8\",\n \"tcp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n },\n {\n \"vpc\": \"management\",\n \"sg\": \"management-vpe-sg\",\n \"direction\": \"outbound\",\n \"name\": \"allow-vpc-outbound\",\n \"source\": \"10.0.0.0/8\",\n \"tcp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n },\n {\n \"vpc\": \"management\",\n \"sg\": \"management-vpe-sg\",\n \"direction\": \"outbound\",\n \"name\": \"allow-ibm-tcp-53-outbound\",\n \"source\": \"161.26.0.0/16\",\n \"tcp\": {\n \"port_max\": 53,\n \"port_min\": 53\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n },\n {\n \"vpc\": \"management\",\n \"sg\": \"management-vpe-sg\",\n \"direction\": \"outbound\",\n \"name\": \"allow-ibm-tcp-80-outbound\",\n \"source\": \"161.26.0.0/16\",\n \"tcp\": {\n \"port_max\": 80,\n \"port_min\": 80\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n },\n {\n \"vpc\": \"management\",\n \"sg\": \"management-vpe-sg\",\n \"direction\": \"outbound\",\n \"name\": \"allow-ibm-tcp-443-outbound\",\n \"source\": \"161.26.0.0/16\",\n \"tcp\": {\n \"port_max\": 443,\n \"port_min\": 443\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n }\n ]\n },\n {\n \"vpc\": \"workload\",\n \"name\": \"workload-vpe-sg\",\n \"resource_group\": \"slz-workload-rg\",\n \"rules\": [\n {\n \"vpc\": \"workload\",\n \"sg\": \"workload-vpe-sg\",\n \"direction\": \"inbound\",\n \"name\": \"allow-ibm-inbound\",\n \"source\": \"161.26.0.0/16\",\n \"tcp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n },\n {\n \"vpc\": \"workload\",\n \"sg\": \"workload-vpe-sg\",\n \"direction\": \"inbound\",\n \"name\": \"allow-vpc-inbound\",\n \"source\": \"10.0.0.0/8\",\n \"tcp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n },\n {\n \"vpc\": \"workload\",\n \"sg\": \"workload-vpe-sg\",\n \"direction\": \"outbound\",\n \"name\": \"allow-vpc-outbound\",\n \"source\": \"10.0.0.0/8\",\n \"tcp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n },\n {\n \"vpc\": \"workload\",\n \"sg\": \"workload-vpe-sg\",\n \"direction\": \"outbound\",\n \"name\": \"allow-ibm-tcp-53-outbound\",\n \"source\": \"161.26.0.0/16\",\n \"tcp\": {\n \"port_max\": 53,\n \"port_min\": 53\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n },\n {\n \"vpc\": \"workload\",\n \"sg\": \"workload-vpe-sg\",\n \"direction\": \"outbound\",\n \"name\": \"allow-ibm-tcp-80-outbound\",\n \"source\": \"161.26.0.0/16\",\n \"tcp\": {\n \"port_max\": 80,\n \"port_min\": 80\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n },\n {\n \"vpc\": \"workload\",\n \"sg\": \"workload-vpe-sg\",\n \"direction\": \"outbound\",\n \"name\": \"allow-ibm-tcp-443-outbound\",\n \"source\": \"161.26.0.0/16\",\n \"tcp\": {\n \"port_max\": 443,\n \"port_min\": 443\n },\n \"udp\": {\n \"port_max\": null,\n \"port_min\": null\n },\n \"icmp\": {\n \"type\": null,\n \"code\": null\n }\n }\n ]\n }\n ],\n \"vpn_gateways\": [\n {\n \"name\": \"management-gateway\",\n \"resource_group\": \"slz-management-rg\",\n \"subnet\": \"vpn-zone-1\",\n \"vpc\": \"management\"\n }\n ],\n \"vpn_servers\": [\n {\n \"name\": \"vpn-server\",\n \"certificate_crn\": \"crn:v1:bluemix:public:cloudcerts:us-south:a/efe5afc483594adaa8325e2b4d1290df:86f62739-f3a8-42ac-abea-f23255965983:certificate:00406b5615f95dba9bf7c2ab52bb3083\",\n \"method\": \"certificate\",\n \"client_ca_crn\": \"crn:v1:bluemix:public:cloudcerts:us-south:a/efe5afc483594adaa8325e2b4d1290df:86f62739-f3a8-42ac-abea-f23255965983:certificate:00406b5615f95dba9bf7c2ab52bb3083\",\n \"client_ip_pool\": \"10.5.0.0/21\",\n \"client_dns_server_ips\": \"192.168.3.4\",\n \"client_idle_timeout\": 2000,\n \"enable_split_tunneling\": true,\n \"port\": 255,\n \"protocol\": \"udp\",\n \"resource_group\": \"slz-management-rg\",\n \"security_groups\": [\n \"management-vpe-sg\"\n ],\n \"subnets\": [\n \"vsi-zone-1\",\n \"vsi-zone-2\",\n \"vsi-zone-3\"\n ],\n \"vpc\": \"management\",\n \"routes\": [\n {\n \"name\": \"vpn-route\",\n \"action\": \"translate\",\n \"destination\": \"172.16.0.0/16\"\n }\n ]\n }\n ],\n \"ssh_keys\": [\n {\n \"name\": \"slz-ssh-key\",\n \"public_key\": \"public-key\",\n \"resource_group\": \"slz-management-rg\",\n \"use_data\": false\n }\n ],\n \"transit_gateways\": [\n {\n \"name\": \"transit-gateway\",\n \"resource_group\": \"slz-service-rg\",\n \"global\": false,\n \"connections\": [\n {\n \"tgw\": \"transit-gateway\",\n \"vpc\": \"management\"\n },\n {\n \"tgw\": \"transit-gateway\",\n \"vpc\": \"workload\"\n }\n ]\n }\n ],\n \"clusters\": [\n {\n \"kms\": \"slz-kms\",\n \"cos\": \"cos\",\n \"entitlement\": \"cloud_pak\",\n \"kube_type\": \"openshift\",\n \"kube_version\": \"default\",\n \"flavor\": \"bx2.16x64\",\n \"name\": \"workload\",\n \"resource_group\": \"slz-workload-rg\",\n \"encryption_key\": \"slz-vsi-volume-key\",\n \"subnets\": [\n \"vsi-zone-1\",\n \"vsi-zone-2\",\n \"vsi-zone-3\"\n ],\n \"update_all_workers\": false,\n \"vpc\": \"workload\",\n \"worker_pools\": [\n {\n \"entitlement\": \"cloud_pak\",\n \"cluster\": \"workload\",\n \"flavor\": \"bx2.16x64\",\n \"name\": \"logging-pool\",\n \"resource_group\": \"slz-workload-rg\",\n \"subnets\": [\n \"vsi-zone-1\",\n \"vsi-zone-2\",\n \"vsi-zone-3\"\n ],\n \"vpc\": \"workload\",\n \"workers_per_subnet\": 2\n }\n ],\n \"workers_per_subnet\": 2,\n \"private_endpoint\": false,\n \"opaque_secrets\": []\n }\n ],\n \"vsi\": [\n {\n \"kms\": \"slz-kms\",\n \"encryption_key\": \"slz-vsi-volume-key\",\n \"image\": \"ibm-ubuntu-22-04-1-minimal-amd64-1\",\n \"profile\": \"cx2-4x8\",\n \"name\": \"management-server\",\n \"security_groups\": [\n \"management-vpe-sg\"\n ],\n \"ssh_keys\": [\n \"slz-ssh-key\"\n ],\n \"subnets\": [\n \"vsi-zone-1\",\n \"vsi-zone-2\",\n \"vsi-zone-3\"\n ],\n \"vpc\": \"management\",\n \"vsi_per_subnet\": 2,\n \"resource_group\": \"slz-management-rg\"\n }\n ],\n \"appid\": [],\n \"teleport_vsi\": [],\n \"scc\": {\n \"name\": \"\"\n },\n \"event_streams\": [],\n \"load_balancers\": [],\n \"cbr_zones\": [],\n \"cbr_rules\": []\n}" } \ No newline at end of file diff --git a/unit-tests/data-files/slz.md b/unit-tests/data-files/slz.md index 817ca17d..7f148f1c 100644 --- a/unit-tests/data-files/slz.md +++ b/unit-tests/data-files/slz.md @@ -838,7 +838,7 @@ By default, no Classic SSH Keys are created. Classic network gateways control network traffic and can improve network performance and security by routing VLAN traffic. Gateways can be created in either standalone or high-availability (HA) mode. Enabling HA allows for nodes to take over for other failing nodes in the cluster, in cases where your service may be experiencing an outage or high volumes of traffic. HA ensures that your service remains available even during unexpected scenarios. -When creating a classic gateway, you will need to have first created a classic SSH key and a private classic VLAN. If you wish to also attach a public classic VLAN to your gateway, you will have create that beforehand as well. You also will need to attach a domain and select a datacenter. +When creating a classic gateway, you will need to have first created a classic SSH key and a private classic VLAN. If you wish to also attach a public classic VLAN to your gateway, you will have to create that beforehand as well. You also will need to attach a domain and select a datacenter. You will need to select a disk key name, package name, OS key name, and process key name. These fields will be determined by the hardware specifications you'd like to allocate to your gateway. Currently, only IBM Cloud Juniper vSRX gateways are supported in CRAIG. @@ -925,45 +925,112 @@ By default, IBM Cloud Security and Compliance Center is not enabled but can be e ## Cis Glbs -NYI +A global load balancer manages traffic across server resources located in multiple regions. A global load balancer manages an origin pool implementation that allows for the traffic to be distributed to multiple origins. An origin pool is a group of origin servers that traffic is intelligently routed to when attached to a global load balancer. The benefits of a Global Load Balancer are minimized response time, higher availability through redundancy, and maximized traffic throughput. + +A global load balancer health check helps gain insight into the availability of pools so that traffic can be routed to the healthy ones. These checks periodically send HTTP, HTTPS, or TCP requests and monitor the responses. They can be configured with a customized port, interval, timeout, status code, and more. As soon as a pool is marked unhealthy, traffic is intelligently rerouted to another available pool. + +By default, no CIS Global Load Balancers are created. ### Related Links +- [Global Load Balancer Concepts](https://cloud.ibm.com/docs/cis?topic=cis-global-load-balancer-glb-concepts#:~:text=A%20global%20load%20balancer%20manages,is%20not%20a%20primary%20concern.) +- [Configuring a Gloabl Load Balancer](https://cloud.ibm.com/docs/cis?topic=cis-configure-glb) +- [Setting up Origin Pools](https://cloud.ibm.com/docs/cis?topic=cis-glb-features-pools) +- [Setting up Health Checks](https://cloud.ibm.com/docs/cis?topic=cis-glb-features-healthchecks) +- [IBM Cloud Global Load Balancer Terraform Documentation](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cis_global_load_balancer) ----- ## Fortigate Vnf -NYI +FortiGate® Virtual Appliance on IBM Cloud® deploys a pair of FortiGate Virtual Appliances to your environment, which can help you reduce risk by implementing critical security controls within your virtual infrastructure. FortiGate Virtual Appliance on IBM Cloud is a non-IBM product that is offered under terms and conditions from Fortinet, not IBM. + +By combining stateful inspection with a comprehensive suite of powerful security features, FortiGate next generation firewall technology delivers complete content and network protection. In addition to advanced features such as an extreme threat database, vulnerability management, and flow-based inspection, features including application control, firewall, antivirus, IPS, web filter, and VPN work in concert to identify and mitigate the latest complex security threats. + +In order to provision a Fortigate Instance, you must have a VPC, SSH Key, and 2 Subnets created in CRAIG ### Related Links +- [Fortigate Virtual Appliance Overview](https://cloud.ibm.com/docs/vmwaresolutions?topic=vmwaresolutions-fortinetvm_considerations) +- [About Fortigate on IBM Cloud (Fortinet Documentation)](https://docs.fortinet.com/document/fortigate-public-cloud/7.4.0/ibm-cloud-administration-guide/123172/about-fortigate-for-ibm-cloud) ----- ## Classic Security Groups -NYI +An IBM Cloud Security Group is a set of IP filter rules that define how to handle incoming and outgoing traffic to both the public and private interfaces of a virtual server instance (VSI). + +By default, no Classic Security Groups are created. ### Related Links +- [Docs](https://cloud.ibm.com/docs/security-groups?topic=security-groups-about-ibm-security-groups) +- [Classic Security Group Terraform Documentation](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/security_group) +- [Classic Security Group Rule Terraform Documentation](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/security_group_rule) ----- ## Classic Vsi -NYI +Classic Virtual Servers are scalable virtual servers that are purchased with cores and memory allocations. Virtual servers are deployed to the same VLANs as physical servers, which spread workloads across virtual servers and bare metal servers, while interoperability is maintained. + +When creating a Classic VSI, you will need to have first created a classic SSH key and a private classic VLAN. If you wish to also attach a public classic VLAN to your gateway, you will have to create that beforehand as well. + +### Required Fields + +Field | Description +------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +Name | The host name for the compute instance. +Domain | The domain of the compute instance. +Datacenter | The data center in which you want to provision the instance. +Cores | The number of CPU cores that you want to allocate. +Memory | The amount of memory, expressed in megabytes, that you want to allocate. +Image ID | The image template ID that you want to use to provision the computing instance. This is not the global identifier (UUID), but the image template group ID that should point to a valid global identifier. To retrieve the image template ID from the IBM Cloud infrastructure customer portal, navigate to Classic Infrastructure > Devices > Manage > Images, click the image that you want, and note the ID number in the resulting URL. +Network Speed | The connection speed (in Mbps) for the instance's network components. The default value is 100. +Local Disk | The disk type for the instance. When set to true, the disks for the computing instance are provisioned on the host that the instance runs. Otherwise, SAN disks are provisioned. +SSH Keys | The SSH key IDs to install on the computing instance when the instance provisions. +Private VLAN | The private VLAN to be used for the private network interface of the instance. +Private Security Groups | The IDs of security groups to apply on the private interface. This attribute can't be updated. You can use this parameter to add a security group to your virtual server instance when you create it. +Private Network Only | When set to true, a compute instance only has access to the private network. The default value is false. +Public VLAN | The public VLAN to be used for the public network interface of the instance. +Public Security Groups | The IDs of security groups to apply on the public interface. This attribute can't be updated. You can use this parameter to add a security group to your virtual server instance when you create it. ### Related Links +- [Docs](https://cloud.ibm.com/docs/virtual-servers?topic=virtual-servers-getting-started-tutorial) +- [Classic VSI Terraform Documentation](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/compute_vm_instance) +- [IBM Cloud Classic Infrastructure (SoftLayer) API docs](https://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/) ----- ## Classic Bare Metal -NYI +Classic Bare Metal Servers are single-tenant, dedicated physical servers that can be deployed and managed as cloud services. + +When creating a Classic Bare Metal, you will need to have first created a private classic VLAN. If you wish to also attach a public classic VLAN to your gateway, you will have to create that beforehand as well. + +### Required Fields + +Field | Description +---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +Name | The host name for the compute instance. +Domain | The domain of the compute instance. +Datacenter | The data center in which you want to provision the instance. +OS Key Name | The operating system key name that you want to use to provision the compute instance. To find available OS key names use IBM Cloud Classic SoftLayer API by referring to the instructions in the Terraform documentation linked below. +Package Key Name | The key name for the monthly Bare Metal server's package. To find available package key names use IBM Cloud Classic SoftLayer API by referring to the instructions in the Terraform documentation linked below. +Process Key Name | The key name for the monthly Bare Metal server's process. To find available process key names use IBM Cloud Classic SoftLayer API by referring to the instructions in the Terraform documentation linked below. +Memory | The amount of memory, which is specified in gigabytes, for the server. +Network Speed | The connection speed, expressed in Mbps, for the instance's network components. +Private Network Only | When set to true, a compute instance only has access to the private network. The default value is false. +Private VLAN | The private VLAN to be used for the private network interface of the instance. +Public VLAN | The public VLAN to be used for the public network interface of the instance. +Public Bandwidth | The amount of public network traffic, which is specified in gigabytes, allowed per month. +Disk Key Names | The internal key names for the monthly Bare Metal server's disk. Use this argument when you create a new monthly Bare Metal server. To get disk key names, use IBM Cloud Classic SoftLayer API by referring to the instructions in the Terraform documentation linked below. ### Related Links +- [Docs](https://cloud.ibm.com/docs/bare-metal?topic=bare-metal-getting-started) +- [Classic Bare Metal Product Page](https://www.ibm.com/products/bare-metal-servers/classic) +- [Classic Bare Metal Terraform Documentation](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/compute_bare_metal) ----- diff --git a/unit-tests/data-files/vsiImagesRaw.json b/unit-tests/data-files/vsiImagesRaw.json index 555f0015..98dc3875 100644 --- a/unit-tests/data-files/vsiImagesRaw.json +++ b/unit-tests/data-files/vsiImagesRaw.json @@ -1,6 +1,6 @@ { "first": { - "href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=50" + "href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=100" }, "images": [ { @@ -97,5 +97,9 @@ "visibility": "public" } ], - "limit": 50 + "limit": 50, + "total_count": 101, + "next": { + "href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=100&start=123456" + } } \ No newline at end of file diff --git a/unit-tests/data-files/vsiImagesRawPage2.json b/unit-tests/data-files/vsiImagesRawPage2.json new file mode 100644 index 00000000..bab4e030 --- /dev/null +++ b/unit-tests/data-files/vsiImagesRawPage2.json @@ -0,0 +1,102 @@ +{ + "first": { + "href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=100&start=123456" + }, + "images": [ + { + "catalog_offering": { + "managed": false + }, + "created_at": "2019-03-15T21:31:37Z", + "crn": "crn:[...]", + "encryption": "none", + "file": {}, + "href": "https://us-south.iaas.cloud.ibm.com/v1/images/5ccbc579-dc22-0def-46a8-9c2e9b502d37", + "id": "5ccbc579-dc22-0def-46a8-9c2e9b502d37", + "minimum_provisioned_size": 100, + "name": "windows-2016-amd64", + "operating_system": { + "architecture": "amd64", + "dedicated_host_only": false, + "display_name": "Windows Server 2016 Standard Edition (amd64) 2", + "family": "Windows Server", + "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/windows-2016-amd64", + "name": "windows-2016-amd64", + "vendor": "Microsoft", + "version": "2016 Standard Edition" + }, + "resource_group": { + "href": "https://us-south.iaas.cloud.ibm.com/v1/resource_groups/3fad3f2204eb4998c3964d254ffcd771", + "id": "3fad3f2204eb4998c3964d254ffcd771", + "name": "Default" + }, + "status": "available", + "status_reasons": [], + "visibility": "public" + }, + { + "catalog_offering": { + "managed": false + }, + "created_at": "2018-10-04T04:04:25Z", + "crn": "crn:[...]", + "encryption": "none", + "file": {}, + "href": "https://us-south.iaas.cloud.ibm.com/v1/images/e15b69f1-c701-f621-e752-70eda3df5695", + "id": "e15b69f1-c701-f621-e752-70eda3df5695", + "minimum_provisioned_size": 100, + "name": "debian-9-amd64", + "operating_system": { + "architecture": "amd64", + "dedicated_host_only": false, + "display_name": "Debian GNU/Linux 9.x Stretch/Stable - Minimal Install (amd64) 2", + "family": "Debian GNU/Linux", + "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/debian-9-amd64", + "name": "debian-9-amd64", + "vendor": "Debian", + "version": "9.x Stretch/Stable - Minimal Install" + }, + "resource_group": { + "href": "https://us-south.iaas.cloud.ibm.com/v1/resource_groups/3fad3f2204eb4998c3964d254ffcd771", + "id": "3fad3f2204eb4998c3964d254ffcd771", + "name": "Default" + }, + "status": "available", + "status_reasons": [], + "visibility": "public" + }, + { + "catalog_offering": { + "managed": false + }, + "created_at": "2018-12-12T18:22:51Z", + "crn": "crn:[...]", + "encryption": "none", + "file": {}, + "href": "https://eu-de.iaas.cloud.ibm.com/v1/images/7eb4e35b-4257-56f8-d7da-326d85452591", + "id": "7eb4e35b-4257-56f8-d7da-326d85452591", + "minimum_provisioned_size": 100, + "name": "my-image", + "operating_system": { + "architecture": "amd64", + "dedicated_host_only": false, + "display_name": "Ubuntu Linux 16.04 LTS Xenial Xerus Minimal Install (amd64) 2", + "family": "Ubuntu Linux", + "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-04-amd64", + "name": "ubuntu-16-04-amd64", + "vendor": "Canonical", + "version": "16.04 LTS Xenial Xerus Minimal Install" + }, + "resource_group": { + "href": "https://us-south.iaas.cloud.ibm.com/v1/resource_groups/3fad3f2204eb4998c3964d254ffcd771", + "id": "3fad3f2204eb4998c3964d254ffcd771", + "name": "Default" + }, + "status": "available", + "status_reasons": [], + "visibility": "public" + } + ], + "limit": 50, + "total_count": 1 +} \ No newline at end of file diff --git a/unit-tests/forms/wizard.test.js b/unit-tests/forms/wizard.test.js index ea37c62b..186a08af 100644 --- a/unit-tests/forms/wizard.test.js +++ b/unit-tests/forms/wizard.test.js @@ -57,7 +57,7 @@ describe("setup wizard", () => { enable_power_vs: false, enable_classic: false, power_vs_zones: [], - craig_version: "1.13.0", + craig_version: "1.13.1", power_vs_high_availability: false, no_vpn_secrets_manager_auth: false, }, @@ -975,7 +975,7 @@ describe("setup wizard", () => { enable_power_vs: false, enable_classic: false, power_vs_zones: [], - craig_version: "1.13.0", + craig_version: "1.13.1", power_vs_high_availability: false, no_vpn_secrets_manager_auth: false, }, @@ -1892,7 +1892,7 @@ describe("setup wizard", () => { enable_power_vs: false, enable_classic: false, power_vs_zones: [], - craig_version: "1.13.0", + craig_version: "1.13.1", power_vs_high_availability: false, no_vpn_secrets_manager_auth: false, }, @@ -2403,7 +2403,7 @@ describe("setup wizard", () => { enable_power_vs: false, enable_classic: false, power_vs_zones: [], - craig_version: "1.13.0", + craig_version: "1.13.1", power_vs_high_availability: false, no_vpn_secrets_manager_auth: false, }, @@ -2905,7 +2905,7 @@ describe("setup wizard", () => { enable_power_vs: false, enable_classic: false, power_vs_zones: [], - craig_version: "1.13.0", + craig_version: "1.13.1", power_vs_high_availability: false, no_vpn_secrets_manager_auth: false, }, @@ -3484,7 +3484,7 @@ describe("setup wizard", () => { enable_power_vs: false, enable_classic: false, power_vs_zones: [], - craig_version: "1.13.0", + craig_version: "1.13.1", no_vpn_secrets_manager_auth: false, }, resource_groups: [ @@ -3654,7 +3654,7 @@ describe("setup wizard", () => { enable_power_vs: false, enable_classic: false, power_vs_zones: [], - craig_version: "1.13.0", + craig_version: "1.13.1", power_vs_high_availability: false, no_vpn_secrets_manager_auth: false, }, @@ -4225,7 +4225,7 @@ describe("setup wizard", () => { enable_power_vs: false, enable_classic: false, power_vs_zones: [], - craig_version: "1.13.0", + craig_version: "1.13.1", power_vs_high_availability: false, no_vpn_secrets_manager_auth: false, }, @@ -4770,7 +4770,7 @@ describe("setup wizard", () => { enable_power_vs: false, enable_classic: false, power_vs_zones: [], - craig_version: "1.13.0", + craig_version: "1.13.1", power_vs_high_availability: false, no_vpn_secrets_manager_auth: false, }, @@ -5320,7 +5320,7 @@ describe("setup wizard", () => { enable_classic: false, enable_classic: false, power_vs_zones: [], - craig_version: "1.13.0", + craig_version: "1.13.1", no_vpn_secrets_manager_auth: false, }, resource_groups: [ @@ -5812,7 +5812,7 @@ describe("setup wizard", () => { enable_power_vs: true, enable_classic: false, power_vs_zones: ["dal10"], - craig_version: "1.13.0", + craig_version: "1.13.1", power_vs_high_availability: false, no_vpn_secrets_manager_auth: false, }, @@ -6314,7 +6314,7 @@ describe("setup wizard", () => { enable_power_vs: true, enable_classic: false, power_vs_zones: ["dal10"], - craig_version: "1.13.0", + craig_version: "1.13.1", power_vs_high_availability: false, no_vpn_secrets_manager_auth: false, }, diff --git a/unit-tests/json-to-iac/outputs.test.js b/unit-tests/json-to-iac/outputs.test.js index 00a34525..598ecae9 100644 --- a/unit-tests/json-to-iac/outputs.test.js +++ b/unit-tests/json-to-iac/outputs.test.js @@ -588,6 +588,28 @@ output "management_vpc_jv_dev_server_vsi_1_1_floating_ip_address" { value = ibm_is_floating_ip.management_vpc_jv_dev_server_vsi_1_1_fip.address } +############################################################################## + +############################################################################## +# Cos Object Storage Outputs +############################################################################## + +output "cos_object_storage_bucket_management_bucket_bucket_name" { + value = ibm_cos_bucket.cos_object_storage_management_bucket_bucket.bucket_name +} + +output "cos_object_storage_bucket_management_bucket_region_location" { + value = ibm_cos_bucket.cos_object_storage_management_bucket_bucket.region_location +} + +output "cos_object_storage_bucket_workload_bucket_bucket_name" { + value = ibm_cos_bucket.cos_object_storage_workload_bucket_bucket.bucket_name +} + +output "cos_object_storage_bucket_workload_bucket_region_location" { + value = ibm_cos_bucket.cos_object_storage_workload_bucket_bucket.region_location +} + ############################################################################## `; assert.deepEqual( @@ -1216,6 +1238,28 @@ output "management_vpc_jv_dev_server2_vsi_1_1_floating_ip_address" { value = ibm_is_floating_ip.management_vpc_jv_dev_server2_vsi_1_1_fip.address } +############################################################################## + +############################################################################## +# Cos Object Storage Outputs +############################################################################## + +output "cos_object_storage_bucket_management_bucket_bucket_name" { + value = ibm_cos_bucket.cos_object_storage_management_bucket_bucket.bucket_name +} + +output "cos_object_storage_bucket_management_bucket_region_location" { + value = ibm_cos_bucket.cos_object_storage_management_bucket_bucket.region_location +} + +output "cos_object_storage_bucket_workload_bucket_bucket_name" { + value = ibm_cos_bucket.cos_object_storage_workload_bucket_bucket.bucket_name +} + +output "cos_object_storage_bucket_workload_bucket_region_location" { + value = ibm_cos_bucket.cos_object_storage_workload_bucket_bucket.region_location +} + ############################################################################## `; assert.deepEqual( @@ -1434,6 +1478,10 @@ output "power_vs_workspace_test_output_crn" { value = ibm_resource_instance.power_vs_workspace_test_output.crn } +output "power_vs_workspace_test_output_location" { + value = ibm_resource_instance.power_vs_workspace_test_output.location +} + ############################################################################## ############################################################################## @@ -1452,6 +1500,10 @@ output "power_vs_workspace_iac_power_workspace_test_output_crn" { value = data.ibm_resource_instance.power_vs_workspace_iac_power_workspace_test_output.crn } +output "power_vs_workspace_iac_power_workspace_test_output_location" { + value = data.ibm_resource_instance.power_vs_workspace_iac_power_workspace_test_output.location +} + ############################################################################## `; assert.deepEqual( @@ -2342,6 +2394,10 @@ output "power_vs_workspace_test_output_crn" { value = ibm_resource_instance.power_vs_workspace_test_output.crn } +output "power_vs_workspace_test_output_location" { + value = ibm_resource_instance.power_vs_workspace_test_output.location +} + ############################################################################## ############################################################################## @@ -2360,6 +2416,32 @@ output "power_vs_workspace_iac_power_workspace_test_output_crn" { value = data.ibm_resource_instance.power_vs_workspace_iac_power_workspace_test_output.crn } +output "power_vs_workspace_iac_power_workspace_test_output_location" { + value = data.ibm_resource_instance.power_vs_workspace_iac_power_workspace_test_output.location +} + +############################################################################## + +############################################################################## +# Cos Object Storage Outputs +############################################################################## + +output "cos_object_storage_bucket_management_bucket_bucket_name" { + value = ibm_cos_bucket.cos_object_storage_management_bucket_bucket.bucket_name +} + +output "cos_object_storage_bucket_management_bucket_region_location" { + value = ibm_cos_bucket.cos_object_storage_management_bucket_bucket.region_location +} + +output "cos_object_storage_bucket_workload_bucket_bucket_name" { + value = ibm_cos_bucket.cos_object_storage_workload_bucket_bucket.bucket_name +} + +output "cos_object_storage_bucket_workload_bucket_region_location" { + value = ibm_cos_bucket.cos_object_storage_workload_bucket_bucket.region_location +} + ############################################################################## `; assert.deepEqual( @@ -2602,6 +2684,290 @@ output "power_vs_workspace_vsi_crn" { value = ibm_resource_instance.power_vs_workspace_vsi.crn } +output "power_vs_workspace_vsi_location" { + value = ibm_resource_instance.power_vs_workspace_vsi.location +} + +output "power_vs_workspace_vsi_ssh_key_vsi" { + value = ibm_pi_key.power_vs_ssh_key_vsi.name +} + +output "power_vs_workspace_vsi_network_nw_name" { + value = ibm_pi_network.power_network_vsi_nw.pi_network_name +} + +output "power_vs_workspace_vsi_network_nw_id" { + value = ibm_pi_network.power_network_vsi_nw.id +} + +############################################################################## + +############################################################################## +# Power VS Instance Outputs +############################################################################## + +output "vsi_workspace_instance_output_test_primary_ip" { + value = ibm_pi_instance.vsi_workspace_instance_output_test.pi_network[0].ip_address +} + +############################################################################## +`; + assert.deepEqual( + actualData, + expectedData, + "it should create correct outputs" + ); + }); + it("should return the correct outputs for power vs instances with ws and nw from data", () => { + let actualData = outputsTf({ + _options: { + prefix: "jvdev", + region: "us-south", + tags: ["hello", "world"], + zones: 3, + endpoints: "private", + account_id: null, + fs_cloud: false, + enable_classic: false, + dynamic_subnets: true, + enable_power_vs: true, + craig_version: "1.13.0", + power_vs_zones: ["dal10"], + power_vs_high_availability: false, + no_vpn_secrets_manager_auth: false, + template: "Empty Project", + power_vs_ha_zone_1: null, + power_vs_ha_zone_2: null, + }, + access_groups: [], + appid: [], + atracker: { + enabled: false, + type: "cos", + name: "atracker", + target_name: "atracker-cos", + bucket: null, + add_route: true, + cos_key: null, + locations: ["global", "us-south"], + instance: false, + plan: "lite", + resource_group: null, + }, + cbr_rules: [], + cbr_zones: [], + clusters: [], + dns: [], + event_streams: [], + f5_vsi: [], + iam_account_settings: { + enable: false, + mfa: null, + allowed_ip_addresses: null, + include_history: false, + if_match: null, + max_sessions_per_identity: null, + restrict_create_service_id: null, + restrict_create_platform_apikey: null, + session_expiration_in_seconds: null, + session_invalidation_in_seconds: null, + }, + icd: [], + key_management: [], + load_balancers: [], + logdna: { + name: "logdna", + archive: false, + enabled: false, + plan: "lite", + endpoints: "private", + platform_logs: false, + resource_group: null, + cos: null, + bucket: null, + }, + object_storage: [], + power: [ + { + use_data: true, + name: "vsi", + zone: "dal10", + resource_group: "asset-development", + imageNames: ["CentOS-Stream-8"], + images: [ + { + creationDate: "2023-09-20T22:15:08.000Z", + description: "", + href: "/pcloud/v1/cloud-instances/d839ff9f75e2465a81707aa69ee9a9b7/stock-images/ecb9553c-9b7d-4a53-bf0c-0ab2c748bbc7", + imageID: "ecb9553c-9b7d-4a53-bf0c-0ab2c748bbc7", + lastUpdateDate: "2023-09-21T09:35:17.000Z", + name: "CentOS-Stream-8", + specifications: { + architecture: "ppc64", + containerFormat: "bare", + diskFormat: "raw", + endianness: "little-endian", + hypervisorType: "phyp", + operatingSystem: "rhel", + }, + state: "active", + storagePool: "Tier3-Flash-1", + storageType: "tier3", + workspace: "vsi", + zone: "dal10", + workspace_use_data: true, + }, + ], + ssh_keys: [ + { + workspace_use_data: false, + use_data: true, + name: "vsi", + public_key: "NONE", + workspace: "vsi", + zone: "dal10", + }, + ], + network: [ + { + workspace_use_data: true, + name: "nw", + use_data: true, + pi_network_type: "vlan", + pi_cidr: "10.10.10.10/25", + pi_dns: ["127.0.0.1"], + pi_network_mtu: "1450", + workspace: "vsi", + zone: "dal10", + }, + ], + cloud_connections: [], + attachments: [], + }, + ], + power_instances: [ + { + sap: false, + sap_profile: null, + name: "output-test", + ssh_key: "vsi", + workspace: "vsi", + network: [ + { + name: "nw", + ip_address: "", + }, + ], + primary_subnet: "nw", + image: "CentOS-Stream-8", + pi_sys_type: "e880", + pi_storage_pool_affinity: false, + pi_proc_type: "shared", + pi_processors: "0.25", + pi_memory: "2", + pi_ibmi_css: false, + pi_ibmi_pha: false, + pi_ibmi_rds_users: null, + pi_storage_type: "tier1", + storage_option: "None", + pi_storage_pool: null, + affinity_type: null, + pi_affinity_volume: null, + pi_anti_affinity_volume: null, + pi_anti_affinity_instance: null, + pi_affinity_instance: null, + pi_user_data: null, + zone: "dal10", + pi_affinity_policy: null, + }, + ], + power_volumes: [], + resource_groups: [ + { + use_prefix: false, + name: "asset-development", + use_data: true, + }, + ], + routing_tables: [], + scc: { + credential_description: null, + id: null, + passphrase: null, + name: "", + location: "us", + collector_description: null, + is_public: false, + scope_description: null, + enable: false, + }, + secrets_manager: [], + security_groups: [], + ssh_keys: [], + sysdig: { + enabled: false, + plan: "graduated-tier", + resource_group: null, + name: "sysdig", + platform_logs: false, + }, + teleport_vsi: [], + transit_gateways: [], + virtual_private_endpoints: [], + vpcs: [], + vpn_gateways: [], + vpn_servers: [], + vsi: [], + classic_ssh_keys: [], + classic_vlans: [], + vtl: [], + classic_gateways: [], + cis: [], + scc_v2: { + enable: false, + resource_group: null, + region: "", + account_id: "${var.account_id}", + profile_attachments: [], + }, + cis_glbs: [], + fortigate_vnf: [], + classic_security_groups: [], + classic_vsi: [], + classic_bare_metal: [], + }); + let expectedData = `############################################################################## +# VSI Power Workspace Outputs +############################################################################## + +output "power_vs_workspace_vsi_name" { + value = data.ibm_resource_instance.power_vs_workspace_vsi.name +} + +output "power_vs_workspace_vsi_guid" { + value = data.ibm_resource_instance.power_vs_workspace_vsi.guid +} + +output "power_vs_workspace_vsi_crn" { + value = data.ibm_resource_instance.power_vs_workspace_vsi.crn +} + +output "power_vs_workspace_vsi_location" { + value = data.ibm_resource_instance.power_vs_workspace_vsi.location +} + +output "power_vs_workspace_vsi_ssh_key_vsi" { + value = data.ibm_pi_key.power_vs_ssh_key_vsi.name +} + +output "power_vs_workspace_vsi_network_nw_name" { + value = data.ibm_pi_network.power_network_vsi_nw.pi_network_name +} + +output "power_vs_workspace_vsi_network_nw_id" { + value = data.ibm_pi_network.power_network_vsi_nw.id +} + ############################################################################## ############################################################################## diff --git a/unit-tests/json-to-iac/power-vs-instances.test.js b/unit-tests/json-to-iac/power-vs-instances.test.js index 91201de7..762534ab 100644 --- a/unit-tests/json-to-iac/power-vs-instances.test.js +++ b/unit-tests/json-to-iac/power-vs-instances.test.js @@ -24,10 +24,12 @@ describe("Power VS Instances", () => { pi_processors: "2", pi_proc_type: "shared", pi_sys_type: "s922", - pi_pin_policy: "none", + pi_pin_policy: "", pi_health_status: "WARNING", pi_storage_type: "tier1", pi_user_data: "", + pi_license_repository_capacity: null, + pi_storage_pool: null, }); let expectedData = ` resource "ibm_pi_instance" "example_workspace_instance_test" { @@ -40,12 +42,14 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_processors = "2" pi_proc_type = "shared" pi_sys_type = "s922" - pi_pin_policy = "none" pi_health_status = "WARNING" pi_storage_type = "tier1" pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -93,6 +97,59 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } +} +`; + assert.deepEqual( + actualData, + expectedData, + "it should return correct instance data" + ); + }); + it("should correctly return power vs instance data with pin policy", () => { + let actualData = formatPowerVsInstance({ + zone: "dal12", + workspace: "example", + name: "test", + image: "SLES15-SP3-SAP", + ssh_key: "keyname", + network: [ + { + name: "dev-nw", + }, + ], + primary_subnet: "dev-nw", + pi_memory: "4", + pi_processors: "2", + pi_proc_type: "shared", + pi_sys_type: "s922", + pi_health_status: "WARNING", + pi_storage_type: "tier1", + pi_user_data: "", + pi_pin_policy: "soft", + }); + let expectedData = ` +resource "ibm_pi_instance" "example_workspace_instance_test" { + provider = ibm.power_vs_dal12 + pi_image_id = ibm_pi_image.power_image_example_sles15_sp3_sap.image_id + pi_key_pair_name = ibm_pi_key.power_vs_ssh_key_keyname.pi_key_name + pi_cloud_instance_id = ibm_resource_instance.power_vs_workspace_example.guid + pi_instance_name = "\${var.prefix}-test" + pi_memory = "4" + pi_processors = "2" + pi_proc_type = "shared" + pi_sys_type = "s922" + pi_health_status = "WARNING" + pi_storage_type = "tier1" + pi_pin_policy = "soft" + pi_network { + network_id = ibm_pi_network.power_network_example_dev_nw.network_id + } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -146,6 +203,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -196,6 +256,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -310,6 +373,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -372,6 +438,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ERROR: Unfound Ref } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -487,6 +556,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -603,6 +675,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = data.ibm_pi_network.power_network_example_dev_nw.id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -720,6 +795,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = data.ibm_pi_network.power_network_example_dev_nw.id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -770,6 +848,9 @@ data pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -815,6 +896,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -863,6 +947,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { network_id = ibm_pi_network.power_network_example_dev_nw.network_id ip_address = "1.2.3.4" } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -909,6 +996,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -960,6 +1050,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -1017,6 +1110,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -1073,6 +1169,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -1130,6 +1229,9 @@ resource "ibm_pi_instance" "example_workspace_instance_frog" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -1179,6 +1281,9 @@ resource "ibm_pi_instance" "example_falconstor_vtl_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } `; assert.deepEqual( @@ -1236,6 +1341,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } ############################################################################## @@ -1294,6 +1402,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } ############################################################################## @@ -1372,6 +1483,9 @@ resource "ibm_pi_instance" "example_workspace_instance_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } ############################################################################## @@ -1397,6 +1511,9 @@ resource "ibm_pi_instance" "example_falconstor_vtl_test" { pi_network { network_id = ibm_pi_network.power_network_example_dev_nw.network_id } + timeouts { + create = "3h" + } } ############################################################################## diff --git a/unit-tests/state/logging-monitoring.test.js b/unit-tests/state/logging-monitoring.test.js index 8b2544de..45e1e964 100644 --- a/unit-tests/state/logging-monitoring.test.js +++ b/unit-tests/state/logging-monitoring.test.js @@ -193,7 +193,7 @@ describe("observability", () => { assert.deepEqual( craig.logdna.name.helperText({}, { craig: craig }), "iac-logdna", - "it should retrun" + "it should return" ); }); it("should return list of cos buckets", () => { @@ -207,7 +207,7 @@ describe("observability", () => { assert.deepEqual( craig.sysdig.name.helperText({}, { craig: craig }), "iac-sysdig", - "it should retrun" + "it should return" ); }); it("should return plan on render", () => { diff --git a/unit-tests/state/options.test.js b/unit-tests/state/options.test.js index f5ebc5bb..c541e007 100644 --- a/unit-tests/state/options.test.js +++ b/unit-tests/state/options.test.js @@ -487,6 +487,13 @@ describe("options", () => { "it should be true when no power vs zones" ); }); + it("should return correct invalid text for ha zone 1", () => { + assert.deepEqual( + craig.options.power_vs_ha_zone_1.invalidText({ region: "us-south" }), + "Select an Availability Zone", + "it should return correct invalid text" + ); + }); }); }); }); diff --git a/unit-tests/state/power-vs.test.js b/unit-tests/state/power-vs.test.js index 7fa314ed..92575c3e 100644 --- a/unit-tests/state/power-vs.test.js +++ b/unit-tests/state/power-vs.test.js @@ -452,6 +452,24 @@ describe("power-vs", () => { ], }, }; + assert.deepEqual( + tempState.power.ssh_keys.public_key.invalidText( + { + name: "test", + resource_group: "hi", + public_key: "sssss", + }, + { + data: { + data: "test", + }, + arrayParentName: "workspace", + craig: tempState, + } + ), + "Provide a unique SSH public key for this workspace", + "it should return correct text" + ); assert.deepEqual( tempState.power.ssh_keys.public_key.invalidText( { diff --git a/unit-tests/state/schema.test.js b/unit-tests/state/schema.test.js new file mode 100644 index 00000000..647741c6 --- /dev/null +++ b/unit-tests/state/schema.test.js @@ -0,0 +1,2088 @@ +const { assert } = require("chai"); +const { state } = require("../../client/src/lib/state"); + +/** + * initialize store + * @returns {lazyZState} state store + */ +function newState() { + let store = new state(); + store.setUpdateCallback(() => {}); + return store; +} + +describe("automate schema generation", () => { + let craig; + beforeEach(() => { + craig = newState(); + }); + describe("buildFieldSchema", () => { + it("should return the correct schema for resource groups", () => { + let expectedData = { + resource_groups: { + Array: { + use_prefix: { + type: "boolean", + default: true, + }, + name: { + type: "string", + default: null, + }, + use_data: { + type: "boolean", + default: false, + }, + }, + }, + }; + let actualData = craig.buildFieldSchema("resource_groups"); + assert.deepEqual(actualData, expectedData, "it should return schema"); + }); + it("should return correct schema for key management", () => { + let expectedData = { + key_management: { + Array: { + authorize_vpc_reader_role: { + type: "boolean", + default: true, + }, + name: { + default: null, + type: "string", + }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + use_data: { + type: "boolean", + default: false, + }, + use_hs_crypto: { + type: "boolean", + default: false, + }, + keys: { + Array: { + dual_auth_delete: { + default: false, + type: "boolean", + }, + endpoint: { + type: "string", + default: null, + groups: ["public", "private"], + }, + force_delete: { + type: "boolean", + default: false, + }, + key_ring: { + default: null, + type: "string", + }, + name: { + default: null, + type: "string", + }, + root_key: { + default: true, + type: "boolean", + }, + rotation: { + default: "1", + groups: [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + ], + type: "string", + }, + }, + }, + }, + }, + }; + let actualData = craig.buildFieldSchema("key_management"); + assert.deepEqual(actualData, expectedData, "it should return schema"); + }); + it("should return correct schema for object storage", () => { + let expectedData = { + object_storage: { + Array: { + use_data: { type: "boolean", default: false }, + use_random_suffix: { type: "boolean", default: false }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + kms: { type: "string", default: null, groups: "" }, + plan: { + type: "string", + default: null, + groups: [ + "standard", + "lite", + "cos-one-rate-plan", + "cos-satellite-12tb-plan", + "cos-satellite-24tb-plan", + "cos-satellite-48tb-plan", + "cos-satellite-96tb-plan", + ], + }, + buckets: { + Array: { + name: { type: "string", default: null }, + storage_class: { + type: "string", + default: null, + groups: ["standard", "vault", "storage", "smart"], + }, + kms_key: { + type: "string", + default: null, + groups: "", + }, + force_delete: { type: "boolean", default: false }, + }, + }, + keys: { + Array: { + name: { type: "string", default: null }, + role: { + type: "string", + default: null, + groups: [ + "Object Writer", + "Object Reader", + "Content Reader", + "Reader", + "Writer", + "Manager", + ], + }, + enable_hmac: { type: "boolean", default: true }, + }, + }, + }, + }, + }; + let actualData = craig.buildFieldSchema("object_storage"); + assert.deepEqual(actualData, expectedData, "it should return schema"); + }); + it("should return correct schema for iam account settings", () => { + let expectedData = { + iam_account_settings: { + object: { + enable: { type: "boolean", default: false }, + mfa: { + type: "string", + default: null, + groups: [ + "NONE", + "TOTP", + "TOTP4ALL", + "Email-Based MFA", + "TOTP MFA", + "U2F MFA", + ], + }, + allowed_ip_addresses: { type: "string", default: null }, + include_history: { type: "boolean", default: false }, + if_match: { type: "string", default: null }, + max_sessions_per_identity: { type: "string", default: null }, + restrict_create_service_id: { + type: "string", + default: null, + groups: ["Unset", "Yes", "No"], + }, + restrict_create_platform_apikey: { + type: "string", + default: null, + groups: ["Unset", "Yes", "No"], + }, + session_expiration_in_seconds: { type: "string", default: null }, + session_invalidation_in_seconds: { type: "string", default: null }, + }, + }, + }; + let actualData = craig.buildFieldSchema("iam_account_settings"); + assert.deepEqual(actualData, expectedData, "it should return schema"); + }); + }); + describe("buildSchema", () => { + it("should build a full schema", () => { + let expectedData = { + _options: { + object: { + fs_cloud: { type: "boolean", default: false }, + prefix: { type: "string", default: "iac" }, + region: { type: "string", default: null, groups: "" }, + zones: { type: "string", default: "3", groups: ["1", "2", "3"] }, + endpoints: { + type: "string", + default: "Private", + groups: ["private", "public", "public-and-private"], + }, + account_id: { type: "string", default: null }, + dynamic_subnets: { type: "boolean", default: true }, + enable_power_vs: { type: "boolean", default: false }, + power_vs_high_availability: { type: "boolean", default: false }, + power_vs_ha_zone_1: { + type: "string", + default: null, + groups: ["mad02", "mad04", "us-east", "wdc06", "wdc07"], + }, + power_vs_ha_zone_2: { + type: "string", + default: null, + groups: ["eu-de-1", "eu-de-2", "us-south", "dal10", "dal12"], + }, + power_vs_zones: { type: "Array", default: [] }, + enable_classic: { type: "boolean", default: false }, + tags: { type: "Array", default: ["hello", "world"] }, + no_vpn_secrets_manager_auth: { type: "boolean", default: false }, + }, + }, + access_groups: { + Array: { + name: { type: "string", default: null }, + description: { type: "string", default: null }, + policies: { + Array: { + name: { type: "string", default: null }, + resource: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + resource_instance_id: { type: "string", default: null }, + service: { type: "string", default: null }, + resource_type: { type: "string", default: null }, + }, + }, + dynamic_policies: { + Array: { + name: { type: "string", default: null }, + identity_provider: { type: "string", default: null }, + expiration: { + type: "string", + default: "24", + groups: [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + ], + }, + conditions: { type: "string", default: {} }, + claim: { type: "string", default: null }, + operator: { + type: "string", + default: null, + groups: [ + "Equals", + "Equals (Ignore Case)", + "In", + "Not Equals (Ignore Case)", + "Not Equals", + "Contains", + ], + }, + value: { type: "string", default: null }, + }, + }, + }, + }, + appid: { + Array: { + use_data: { type: "boolean", default: false }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + encryption_key: { + type: "string", + default: null, + groups: "", + }, + keys: { Array: { name: { type: "string", default: null } } }, + }, + }, + atracker: { + object: { + enabled: { type: "boolean", default: true }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + type: { type: "string", default: null }, + target_name: { type: "string", default: null }, + bucket: { type: "string", default: null, groups: "" }, + cos_key: { type: "string", default: null, groups: "" }, + add_route: { type: "boolean", default: false }, + locations: { type: "Array", default: [] }, + instance: { type: "boolean", default: false }, + plan: { + type: "string", + default: "lite", + groups: ["lite", "7-day", "14-day", "30-day"], + }, + archive: { type: "boolean", default: false }, + }, + }, + cbr_rules: { + Array: { + name: { type: "string", default: null }, + description: { type: "string", default: null }, + api_type_id: { type: "string", default: null }, + enforcement_mode: { + type: "string", + default: "Enabled", + groups: "", + }, + contexts: { + Array: { + name: { type: "string", default: null }, + value: { type: "string", default: null }, + }, + }, + resource_attributes: { + Array: { + name: { type: "string", default: null }, + value: { type: "string", default: null }, + }, + }, + tags: { + Array: { + name: { type: "string", default: null }, + value: { type: "string", default: null }, + operator: { type: "string", default: null }, + }, + }, + }, + }, + cbr_zones: { + Array: { + name: { type: "string", default: null }, + description: { type: "string", default: null }, + account_id: { type: "string", default: null }, + addresses: { + Array: { + name: { type: "string", default: null }, + account_id: { type: "string", default: null }, + location: { type: "string", default: null }, + service_name: { type: "string", default: null }, + service_type: { type: "string", default: null }, + service_instance: { type: "string", default: null }, + type: { + type: "string", + default: "ipAddress", + groups: [ + "ipAddress", + "ipRange", + "subnet", + "vpc", + "serviceRef", + ], + }, + value: { type: "string", default: null }, + }, + }, + exclusions: { + Array: { + name: { type: "string", default: null }, + account_id: { type: "string", default: null }, + location: { type: "string", default: null }, + service_name: { type: "string", default: null }, + service_type: { type: "string", default: null }, + service_instance: { type: "string", default: null }, + type: { + type: "string", + default: "ipAddress", + groups: [ + "ipAddress", + "ipRange", + "subnet", + "vpc", + "serviceRef", + ], + }, + value: { type: "string", default: null }, + }, + }, + }, + }, + cis: { + Array: { + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + plan: { + type: "string", + default: null, + groups: [ + "standard-next", + "trial", + "enterprise-advanced", + "enterprise-essential", + "enterprise-package", + "enterprise-premier", + "enterprise-usage", + "global-load-balancer", + "security", + ], + }, + domains: { + Array: { + domain: { type: "string", default: null }, + type: { + type: "string", + default: null, + groups: ["full", "partial"], + }, + }, + }, + dns_records: { + Array: { + name: { type: "string", default: null }, + type: { + type: "string", + default: null, + groups: [ + "A", + "AAAA", + "CNAME", + "NS", + "MX", + "TXT", + "CAA", + "PTR", + ], + }, + domain: { + type: "string", + default: null, + groups: "", + }, + ttl: { type: "string", default: null }, + content: { type: "string", default: null }, + }, + }, + }, + }, + cis_glbs: { + Array: { + name: { type: "string", default: null }, + cis: { type: "string", default: null, groups: "" }, + enabled: { type: "boolean", default: true }, + description: { type: "string", default: null }, + minimum_origins: { type: "string", default: "1" }, + notification_email: { type: "string", default: null }, + origins: { + Array: { + name: { type: "string", default: null }, + address: { type: "string", default: null }, + enabled: { type: "boolean", default: true }, + }, + }, + glbs: { + Array: { + domain: { + type: "string", + default: null, + groups: "", + }, + fallback_pool: { + type: "string", + default: null, + groups: "", + }, + default_pools: { type: "Array", default: [] }, + enabled: { type: "boolean", default: true }, + proxied: { type: "boolean", default: false }, + ttl: { type: "string", default: null }, + name: { type: "string", default: null }, + }, + }, + health_checks: { + Array: { + name: { type: "string", default: null }, + allow_insecure: { type: "boolean", default: false }, + follow_redirects: { type: "boolean", default: false }, + expected_codes: { type: "string", default: null }, + method: { + type: "string", + default: null, + groups: ["GET", "PUT", "POST", "PATCH", "DELETE"], + }, + timeout: { type: "string", default: null }, + interval: { type: "string", default: null }, + path: { type: "string", default: null }, + port: { type: "string", default: null }, + type: { + type: "string", + default: null, + groups: ["http", "https"], + }, + retries: { type: "string", default: null }, + }, + }, + }, + }, + classic_bare_metal: { + Array: { + name: { type: "string", default: null }, + domain: { type: "string", default: null }, + datacenter: { + type: "string", + default: null, + groups: [ + "dal10", + "dal12", + "eu-de-1", + "eu-de-2", + "lon04", + "lon06", + "sao01", + "syd04", + "syd05", + "tok04", + "tor01", + "us-east", + "us-south", + "wdc06", + "wdc07", + ], + }, + os_key_name: { type: "string", default: null }, + package_key_name: { type: "string", default: null }, + process_key_name: { type: "string", default: null }, + memory: { type: "string", default: null }, + network_speed: { type: "string", default: null }, + disk_key_names: { type: "Array", default: [] }, + private_network_only: { type: "boolean", default: false }, + private_vlan: { + type: "string", + default: null, + groups: "", + }, + public_vlan: { + type: "string", + default: null, + groups: "", + }, + public_bandwidth: { type: "string", default: null }, + }, + }, + classic_gateways: { + Array: { + name: { type: "string", default: null }, + domain: { type: "string", default: null }, + datacenter: { + type: "string", + default: null, + groups: [ + "dal10", + "dal12", + "eu-de-1", + "eu-de-2", + "lon04", + "lon06", + "sao01", + "syd04", + "syd05", + "tok04", + "tor01", + "us-east", + "us-south", + "wdc06", + "wdc07", + ], + }, + network_speed: { + type: "string", + default: null, + groups: ["1000", "10000"], + }, + public_bandwidth: { + type: "string", + default: null, + groups: ["500", "1000", "5000", "10000", "20000"], + }, + memory: { type: "string", default: "64" }, + package_key_name: { + type: "string", + default: null, + groups: ["VIRTUAL_ROUTER_APPLIANCE_1_GPBS"], + }, + os_key_name: { + type: "string", + default: null, + groups: ["OS_JUNIPER_VSRX_19_4_UP_TO_1GBPS_STANDARD_SRIOV"], + }, + process_key_name: { + type: "string", + default: null, + groups: ["INTEL_XEON_4210_2_20"], + }, + private_vlan: { + type: "string", + default: null, + groups: "", + }, + ssh_key: { type: "string", default: null, groups: "" }, + public_vlan: { + type: "string", + default: null, + groups: "", + }, + disk_key_names: { type: "Array", default: [] }, + private_network_only: { type: "boolean", default: false }, + tcp_monitoring: { type: "boolean", default: false }, + redundant_network: { type: "boolean", default: false }, + ipv6_enabled: { type: "boolean", default: false }, + hadr: { type: "boolean", default: false }, + }, + }, + classic_security_groups: { + Array: { + name: { type: "string", default: null }, + description: { type: "string", default: null }, + classic_sg_rules: { + Array: { + name: { type: "string", default: null }, + direction: { + type: "string", + default: null, + groups: ["inbound", "outbound"], + }, + ruleProtocol: { + type: "string", + default: "all", + groups: ["all", "icmp", "tcp", "udp"], + }, + port_range_min: { type: "string", default: null }, + port_range_max: { type: "string", default: null }, + }, + }, + }, + }, + classic_ssh_keys: { + Array: { + name: { type: "string", default: null }, + public_key: { type: "string", default: null }, + }, + }, + classic_vlans: { + Array: { + name: { type: "string", default: null }, + type: { + type: "string", + default: null, + groups: ["PUBLIC", "PRIVATE"], + }, + datacenter: { + type: "string", + default: null, + groups: [ + "dal10", + "dal12", + "eu-de-1", + "eu-de-2", + "lon04", + "lon06", + "sao01", + "syd04", + "syd05", + "tok04", + "tor01", + "us-east", + "us-south", + "wdc06", + "wdc07", + ], + }, + router_hostname: { + type: "string", + default: null, + groups: "", + }, + }, + }, + classic_vsi: { + Array: { + name: { type: "string", default: null }, + domain: { type: "string", default: null }, + datacenter: { + type: "string", + default: null, + groups: [ + "dal10", + "dal12", + "eu-de-1", + "eu-de-2", + "lon04", + "lon06", + "sao01", + "syd04", + "syd05", + "tok04", + "tor01", + "us-east", + "us-south", + "wdc06", + "wdc07", + ], + }, + private_vlan: { + type: "string", + default: null, + groups: "", + }, + public_vlan: { + type: "string", + default: null, + groups: "", + }, + cores: { type: "string", default: null }, + memory: { type: "string", default: null }, + image_id: { type: "string", default: null }, + network_speed: { type: "string", default: "100" }, + local_disk: { type: "boolean", default: null }, + private_network_only: { type: "boolean", default: false }, + ssh_keys: { type: "Array", default: [] }, + private_security_groups: { type: "Array", default: [] }, + public_security_groups: { type: "Array", default: [] }, + }, + }, + clusters: { + Array: { + kube_type: { + type: "string", + default: null, + groups: ["openshift", "iks"], + }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + cos: { type: "string", default: null, groups: "" }, + entitlement: { + type: "string", + default: "null", + groups: ["null", "cloud_pak"], + }, + vpc: { type: "string", default: null, groups: "" }, + subnets: { type: "Array", default: [] }, + workers_per_subnet: { + type: "string", + default: "1", + groups: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], + }, + flavor: { type: "string", default: null }, + update_all_workers: { type: "boolean", default: false }, + encryption_key: { + type: "string", + default: null, + groups: "", + }, + kube_version: { type: "string", default: null }, + private_endpoint: { type: "boolean", default: false }, + worker_pools: { + Array: { + name: { type: "string", default: null }, + flavor: { type: "string", default: null }, + subnets: { type: "Array", default: [] }, + workers_per_subnet: { + type: "string", + default: "1", + groups: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], + }, + entitlement: { + type: "string", + default: "null", + groups: ["null", "cloud_pak"], + }, + }, + }, + opaque_secrets: { + Array: { + name: { type: "string", default: null }, + namespace: { type: "string", default: null }, + persistence: { type: "boolean", default: false }, + secrets_group: { type: "string", default: null }, + arbitrary_secret_name: { type: "string", default: null }, + username_password_secret_name: { + type: "string", + default: null, + }, + labels: { type: "Array", default: [] }, + secrets_manager: { + type: "string", + default: null, + groups: "", + }, + arbitrary_secret_data: { type: "string", default: null }, + username_password_secret_username: { + type: "string", + default: null, + }, + username_password_secret_password: { + type: "string", + default: null, + }, + expiration_date: { type: "string", default: null }, + username_password_secret_description: { + type: "string", + default: null, + }, + arbitrary_secret_description: { type: "string", default: null }, + auto_rotate: { type: "boolean", default: false }, + interval: { type: "string", default: "1" }, + unit: { + type: "string", + default: "day", + groups: ["day", "month"], + }, + }, + }, + }, + }, + dns: { + Array: { + name: { type: "string", default: null }, + plan: { + type: "string", + default: "free", + groups: ["free", "standard"], + }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + zones: { + Array: { + name: { type: "string", default: null }, + vpcs: { type: "Array", default: [] }, + label: { type: "string", default: null }, + description: { type: "string", default: null }, + }, + }, + records: { + Array: { + use_vsi: { type: "boolean", default: false }, + vpc: { type: "string", default: null, groups: "" }, + vsi: { type: "string", default: null, groups: "" }, + name: { type: "string", default: null }, + dns_zone: { + type: "string", + default: null, + groups: "", + }, + rdata: { type: "string", default: null }, + ttl: { type: "string", default: null }, + type: { + type: "string", + default: null, + groups: ["A", "AAAA", "CNAME", "PTR", "TXT", "MX", "SRV"], + }, + preference: { type: "string", default: null }, + port: { type: "string", default: null }, + protocol: { + type: "string", + default: null, + groups: ["TCP", "UDP"], + }, + priority: { type: "string", default: null }, + service: { type: "string", default: null }, + weight: { type: "string", default: null }, + }, + }, + custom_resolvers: { + Array: { + name: { type: "string", default: null }, + vpc: { type: "string", default: null, groups: "" }, + subnets: { type: "Array", default: [] }, + description: { type: "string", default: null }, + }, + }, + }, + }, + event_streams: { + Array: { + name: { type: "string", default: null }, + plan: { + type: "string", + default: "lite", + groups: ["lite", "standard", "enterprise"], + }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + throughput: { + type: "string", + default: null, + groups: ["150MB/s", "300MB/s", "450MB/s"], + }, + storage_size: { + type: "string", + default: null, + groups: ["2TB", "4TB", "6TB", "8TB", "10TB", "12TB"], + }, + private_ip_allowlist: { type: "string", default: null }, + endpoints: { type: "string", default: null }, + }, + }, + fortigate_vnf: { + Array: { + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + vpc: { type: "string", default: null, groups: "" }, + primary_subnet: { + type: "string", + default: null, + groups: "", + }, + secondary_subnet: { + type: "string", + default: null, + groups: "", + }, + profile: { type: "string", default: null }, + security_groups: { type: "Array", default: [] }, + ssh_keys: { type: "Array", default: [] }, + }, + }, + iam_account_settings: { + object: { + enable: { type: "boolean", default: false }, + mfa: { + type: "string", + default: null, + groups: [ + "NONE", + "TOTP", + "TOTP4ALL", + "Email-Based MFA", + "TOTP MFA", + "U2F MFA", + ], + }, + allowed_ip_addresses: { type: "string", default: null }, + include_history: { type: "boolean", default: false }, + if_match: { type: "string", default: null }, + max_sessions_per_identity: { type: "string", default: null }, + restrict_create_service_id: { + type: "string", + default: null, + groups: ["Unset", "Yes", "No"], + }, + restrict_create_platform_apikey: { + type: "string", + default: null, + groups: ["Unset", "Yes", "No"], + }, + session_expiration_in_seconds: { type: "string", default: null }, + session_invalidation_in_seconds: { type: "string", default: null }, + }, + }, + icd: { + Array: { + use_data: { type: "boolean", default: false }, + name: { type: "string", default: null }, + service: { + type: "string", + default: null, + groups: [ + "databases-for-postgresql", + "databases-for-etcd", + "databases-for-redis", + "databases-for-mongodb", + "databases-for-mysql", + ], + }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + plan: { + type: "string", + default: "standard", + groups: "", + }, + group_id: { + type: "string", + default: "member", + groups: "", + }, + memory: { type: "string", default: null }, + disk: { type: "string", default: null }, + cpu: { type: "string", default: null }, + encryption_key: { + type: "string", + default: null, + groups: "", + }, + }, + }, + key_management: { + Array: { + use_hs_crypto: { type: "boolean", default: false }, + use_data: { type: "boolean", default: false }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + authorize_vpc_reader_role: { type: "boolean", default: true }, + keys: { + Array: { + name: { type: "string", default: null }, + key_ring: { type: "string", default: null }, + endpoint: { + type: "string", + default: null, + groups: ["public", "private"], + }, + rotation: { + type: "string", + default: "1", + groups: [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + ], + }, + force_delete: { type: "boolean", default: false }, + dual_auth_delete: { type: "boolean", default: false }, + root_key: { type: "boolean", default: true }, + }, + }, + }, + }, + load_balancers: { + Array: { + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + type: { + type: "string", + default: null, + groups: ["private", "public"], + }, + vpc: { type: "string", default: null, groups: "" }, + security_groups: { type: "Array", default: [] }, + target_vsi: { type: "Array", default: [] }, + algorithm: { + type: "string", + default: null, + groups: [ + "round_robin", + "weighted_round_robin", + "least_connections", + ], + }, + protocol: { + type: "string", + default: null, + groups: ["https", "http", "tcp", "udp"], + }, + health_type: { + type: "string", + default: null, + groups: ["https", "http", "tcp"], + }, + health_timeout: { type: "string", default: null }, + health_delay: { type: "string", default: null }, + health_retries: { type: "string", default: null }, + listener_port: { type: "string", default: null }, + listener_protocol: { + type: "string", + default: null, + groups: ["https", "http", "tcp", "udp"], + }, + connection_limit: { type: "string", default: null }, + proxy_protocol: { + type: "string", + default: "disabled", + groups: ["disabled", "v1", "v2"], + }, + session_persistence_type: { + type: "string", + default: null, + groups: ["source_ip", "app_cookie", "http_cookie"], + }, + session_persistence_app_cookie_name: { + type: "string", + default: null, + }, + port: { type: "string", default: null }, + }, + }, + logdna: { + object: { + name: { type: "string", default: "logdna" }, + enabled: { type: "boolean", default: false }, + plan: { + type: "string", + default: null, + groups: ["lite", "7-day", "14-day", "30-day"], + }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + bucket: { type: "string", default: null, groups: "" }, + archive: { type: "boolean", default: false }, + platform_logs: { type: "boolean", default: false }, + }, + }, + object_storage: { + Array: { + use_data: { type: "boolean", default: false }, + use_random_suffix: { type: "boolean", default: false }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + kms: { type: "string", default: null, groups: "" }, + plan: { + type: "string", + default: null, + groups: [ + "standard", + "lite", + "cos-one-rate-plan", + "cos-satellite-12tb-plan", + "cos-satellite-24tb-plan", + "cos-satellite-48tb-plan", + "cos-satellite-96tb-plan", + ], + }, + buckets: { + Array: { + name: { type: "string", default: null }, + storage_class: { + type: "string", + default: null, + groups: ["standard", "vault", "storage", "smart"], + }, + kms_key: { + type: "string", + default: null, + groups: "", + }, + force_delete: { type: "boolean", default: false }, + }, + }, + keys: { + Array: { + name: { type: "string", default: null }, + role: { + type: "string", + default: null, + groups: [ + "Object Writer", + "Object Reader", + "Content Reader", + "Reader", + "Writer", + "Manager", + ], + }, + enable_hmac: { type: "boolean", default: true }, + }, + }, + }, + }, + power: { + Array: { + use_data: { type: "boolean", default: false }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + zone: { type: "string", default: null, groups: "" }, + imageNames: { type: "string", default: null }, + ssh_keys: { + Array: { + name: { type: "string", default: null }, + public_key: { type: "string", default: null }, + use_data: { type: "boolean", default: false }, + }, + }, + network: { + Array: { + use_data: { type: "boolean", default: false }, + name: { type: "string", default: null }, + pi_network_type: { + type: "string", + default: null, + groups: ["vlan", "pub-vlan"], + }, + pi_cidr: { type: "string", default: null }, + pi_dns: { type: "string", default: null }, + pi_network_mtu: { type: "string", default: null }, + pi_network_jumbo: { type: "boolean", default: false }, + }, + }, + cloud_connections: { + Array: { + name: { type: "string", default: null }, + pi_cloud_connection_speed: { + type: "string", + default: null, + groups: [ + "50", + "100", + "200", + "500", + "1000", + "2000", + "5000", + "10000", + ], + }, + pi_cloud_connection_global_routing: { + type: "boolean", + default: false, + }, + pi_cloud_connection_metered: { + type: "boolean", + default: false, + }, + pi_cloud_connection_transit_enabled: { + type: "boolean", + default: false, + }, + transit_gateways: { type: "Array", default: [] }, + }, + }, + attachments: { + Array: { connections: { type: "string", default: null } }, + }, + }, + }, + power_instances: { + Array: { + name: { type: "string", default: null }, + sap: { type: "boolean", default: false }, + sap_profile: { + type: "string", + default: null, + groups: [ + "ush1-4x128", + "ush1-4x256", + "ush1-4x384", + "ush1-4x512", + "ush1-4x768", + "bh1-16x1600", + "bh1-20x2000", + "bh1-22x2200", + "bh1-25x2500", + "bh1-30x3000", + "bh1-35x3500", + "bh1-40x4000", + "bh1-50x5000", + "bh1-60x6000", + "bh1-70x7000", + "bh1-80x8000", + "bh1-100x10000", + "bh1-120x12000", + "bh1-140x14000", + "ch1-60x3000", + "ch1-70x3500", + "ch1-80x4000", + "ch1-100x5000", + "ch1-120x6000", + "ch1-140x7000", + "mh1-8x1440", + "mh1-10x1800", + "mh1-12x2160", + "mh1-16x2880", + "mh1-20x3600", + "mh1-22x3960", + "mh1-25x4500", + "mh1-30x5400", + "mh1-35x6300", + "mh1-40x7200", + "mh1-50x9000", + "mh1-60x10800", + "mh1-70x12600", + "mh1-80x14400", + "umh-4x960", + "umh-6x1440", + "umh-8x1920", + "umh-10x2400", + "umh-12x2880", + "umh-16x3840", + "umh-20x4800", + "umh-22x5280", + "umh-25x6000", + "umh-30x7200", + "umh-35x8400", + "umh-40x9600", + "umh-50x12000", + "umh-60x14400", + ], + }, + workspace: { + type: "string", + default: null, + groups: "", + }, + ip_address: { type: "string", default: null }, + network: { type: "Array", default: [] }, + primary_subnet: { + type: "string", + default: null, + groups: "", + }, + ssh_key: { type: "string", default: null, groups: "" }, + image: { type: "string", default: null, groups: "" }, + pi_sys_type: { + type: "string", + default: null, + groups: ["e880", "e980", "s922", "s1022"], + }, + pi_proc_type: { + type: "string", + default: null, + groups: ["shared", "capped", "dedicated"], + }, + pi_processors: { type: "string", default: null }, + pi_memory: { type: "string", default: null }, + pi_storage_pool_affinity: { type: "boolean", default: false }, + pi_storage_pool: { type: "string", default: null }, + storage_option: { + type: "string", + default: null, + groups: ["None", "Storage Pool", "Affinity", "Anti-Affinity"], + }, + pi_storage_type: { type: "string", default: null }, + affinity_type: { + type: "string", + default: null, + groups: ["Instance", "Volume"], + }, + pi_affinity_policy: { type: "string", default: null }, + pi_affinity_volume: { + type: "string", + default: null, + groups: "", + }, + pi_affinity_instance: { + type: "string", + default: null, + groups: "", + }, + pi_anti_affinity_volume: { + type: "string", + default: null, + groups: "", + }, + pi_anti_affinity_instance: { + type: "string", + default: null, + groups: "", + }, + pi_license_repository_capacity: { type: "string", default: null }, + pi_ibmi_css: { type: "boolean", default: false }, + pi_ibmi_pha: { type: "boolean", default: false }, + pi_ibmi_rds_users: { type: "string", default: null }, + pi_user_data: { type: "string", default: null }, + pi_pin_policy: { + type: "string", + default: "none", + groups: ["soft", "hard", "none"], + }, + pi_health_status: { + type: "string", + default: "OK", + groups: ["OK", "WARNING"], + }, + }, + }, + power_volumes: { + Array: { + name: { type: "string", default: null }, + workspace: { + type: "string", + default: null, + groups: "", + }, + pi_volume_size: { type: "string", default: null }, + storage_option: { + type: "string", + default: null, + groups: ["None", "Storage Pool", "Affinity", "Anti-Affinity"], + }, + pi_volume_type: { type: "string", default: null }, + affinity_type: { + type: "string", + default: null, + groups: ["Instance", "Volume"], + }, + pi_volume_pool: { type: "string", default: null }, + pi_affinity_policy: { type: "string", default: null }, + pi_affinity_volume: { + type: "string", + default: null, + groups: "", + }, + pi_affinity_instance: { + type: "string", + default: null, + groups: "", + }, + pi_anti_affinity_volume: { + type: "string", + default: null, + groups: "", + }, + pi_anti_affinity_instance: { + type: "string", + default: null, + groups: "", + }, + pi_replication_enabled: { type: "boolean", default: false }, + pi_volume_shareable: { type: "boolean", default: false }, + attachments: { type: "string", default: null }, + count: { type: "string", default: null }, + }, + }, + resource_groups: { + Array: { + name: { type: "string", default: null }, + use_data: { type: "boolean", default: false }, + use_prefix: { type: "boolean", default: true }, + }, + }, + routing_tables: { + Array: { + name: { type: "string", default: null }, + vpc: { type: "string", default: null, groups: "" }, + internet_ingress: { type: "boolean", default: false }, + route_direct_link_ingress: { type: "boolean", default: false }, + transit_gateway_ingress: { type: "boolean", default: false }, + route_vpc_zone_ingress: { type: "boolean", default: false }, + accept_routes_from_resource_type: { type: "Array", default: [] }, + routes: { + Array: { + name: { type: "string", default: null }, + zone: { + type: "string", + default: null, + groups: ["1", "2", "3"], + }, + action: { + type: "string", + default: null, + groups: ["delegate", "deliver", "delegate_vpc", "drop"], + }, + next_hop: { type: "string", default: null }, + destination: { type: "string", default: null }, + }, + }, + }, + }, + scc: { + object: { + collector_description: { type: "string", default: null }, + scope_description: { type: "string", default: null }, + }, + }, + scc_v2: { + object: { + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + region: { + type: "string", + default: null, + groups: ["us-south", "us-east", "eu-de"], + }, + profile_attachments: { + Array: { + name: { type: "string", default: null }, + profile: { + type: "string", + default: null, + groups: [ + "FS Cloud", + "Kubernetes Benchmark", + "Cloud Internet Services Benchmark", + ], + }, + schedule: { + type: "string", + default: null, + groups: ["daily", "every_7_days", "every_30_days"], + }, + }, + }, + }, + }, + secrets_manager: { + Array: { + use_data: { type: "boolean", default: false }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + plan: { + type: "string", + default: "standard", + groups: ["standard", "trial"], + }, + encryption_key: { + type: "string", + default: null, + groups: "", + }, + }, + }, + security_groups: { + Array: { + use_data: { type: "boolean", default: false }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + vpc: { type: "string", default: null, groups: "" }, + rules: { + Array: { + name: { type: "string", default: null }, + source: { type: "string", default: null }, + direction: { + type: "string", + default: null, + groups: ["inbound", "outbound"], + }, + ruleProtocol: { + type: "string", + default: null, + groups: ["all", "tcp", "udp", "icmp"], + }, + port_min: { type: "string", default: null }, + port_max: { type: "string", default: null }, + type: { type: "string", default: null }, + code: { type: "string", default: null }, + }, + }, + }, + }, + ssh_keys: { + Array: { + name: { type: "string", default: null }, + public_key: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + use_data: { type: "boolean", default: false }, + }, + }, + sysdig: { + object: { + enabled: { type: "boolean", default: false }, + name: { type: "string", default: "sysdig" }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + plan: { type: "string", default: null, groups: ["graduated-tier"] }, + platform_logs: { type: "boolean", default: false }, + }, + }, + transit_gateways: { + Array: { + use_data: { type: "boolean", default: false }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + global: { type: "boolean", default: true }, + crns: { type: "string", default: null }, + connections: { type: "Array", default: [] }, + vpc_connections: { type: "string", default: null }, + power_connections: { type: "string", default: null }, + classic: { type: "boolean", default: false }, + gre_tunnels: { + Array: { + gateway: { + type: "string", + default: null, + groups: "", + }, + zone: { + type: "string", + default: null, + groups: ["1", "2", "3"], + }, + local_tunnel_ip: { type: "string", default: null }, + remote_tunnel_ip: { type: "string", default: null }, + remote_bgp_asn: { type: "string", default: null }, + }, + }, + prefix_filters: { + Array: { + name: { type: "string", default: null }, + connection_type: { + type: "string", + default: null, + groups: ["VPC", "Power VS", "GRE Tunnel"], + }, + target: { + type: "string", + default: null, + groups: "", + }, + action: { + type: "string", + default: null, + groups: ["Permit", "Deny"], + }, + prefix: { type: "string", default: null }, + le: { type: "string", default: "0" }, + ge: { type: "string", default: "0" }, + }, + }, + }, + }, + virtual_private_endpoints: { + Array: { + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + service: { + type: "string", + default: null, + groups: ["hpcs", "kms", "cos", "icr", "secrets-manager"], + }, + vpc: { type: "string", default: null, groups: "" }, + security_groups: { type: "Array", default: [] }, + subnets: { type: "Array", default: [] }, + instance: { type: "string", default: null, groups: "" }, + }, + }, + vpcs: { + Array: { + use_data: { type: "boolean", default: false }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + bucket: { type: "string", default: null, groups: "" }, + default_network_acl_name: { type: "string", default: null }, + default_security_group_name: { type: "string", default: null }, + default_routing_table_name: { type: "string", default: null }, + pgw_zone_1: { type: "boolean", default: false }, + pgw_zone_2: { type: "boolean", default: false }, + pgw_zone_3: { type: "boolean", default: false }, + classic_access: { type: "boolean", default: null }, + acls: { + Array: { + use_data: { type: "boolean", default: false }, + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + rules: { + Array: { + name: { type: "string", default: null }, + source: { type: "string", default: null }, + action: { + type: "string", + default: null, + groups: ["allow", "deny"], + }, + direction: { + type: "string", + default: null, + groups: ["inbound", "outbound"], + }, + ruleProtocol: { + type: "string", + default: null, + groups: ["all", "tcp", "udp", "icmp"], + }, + destination: { type: "string", default: null }, + port_min: { type: "string", default: null }, + port_max: { type: "string", default: null }, + source_port_min: { type: "string", default: null }, + source_port_max: { type: "string", default: null }, + type: { type: "string", default: null }, + code: { type: "string", default: null }, + }, + }, + }, + }, + subnets: { + Array: { + name: { type: "string", default: null }, + cidr: { type: "string", default: null }, + network_acl: { + type: "string", + default: null, + groups: "", + }, + public_gateway: { type: "boolean", default: false }, + }, + }, + subnetTiers: { + Array: { + name: { type: "string", default: null }, + zones: { type: "string", default: "3" }, + advanced: { type: "boolean", default: false }, + networkAcl: { + type: "string", + default: null, + groups: "", + }, + addPublicGateway: { type: "boolean", default: false }, + }, + }, + }, + }, + vpn_gateways: { + Array: { + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + vpc: { type: "string", default: null, groups: "" }, + subnet: { type: "string", default: null, groups: "" }, + policy_mode: { type: "boolean", default: false }, + additional_prefixes: { type: "Array", default: [] }, + connections: { + Array: { + name: { type: "string", default: null }, + peer_address: { type: "string", default: null }, + peer_cidrs: { type: "Array", default: [] }, + local_cidrs: { type: "Array", default: [] }, + }, + }, + }, + }, + vpn_servers: { + Array: { + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + vpc: { type: "string", default: null, groups: "" }, + subnets: { type: "Array", default: [] }, + security_groups: { type: "Array", default: [] }, + method: { + type: "string", + default: null, + groups: ["certificate", "username", "byo", "INSECURE"], + }, + certificate_crn: { type: "string", default: null }, + client_ca_crn: { type: "string", default: null }, + secrets_manager: { + type: "string", + default: null, + groups: "", + }, + client_ip_pool: { type: "string", default: null }, + port: { type: "string", default: null }, + protocol: { type: "string", default: null, groups: ["tcp", "udp"] }, + enable_split_tunneling: { type: "boolean", default: false }, + client_idle_timeout: { type: "string", default: null }, + client_dns_server_ips: { type: "string", default: null }, + additional_prefixes: { type: "Array", default: [] }, + zone: { type: "string", default: null, groups: ["1", "2", "3"] }, + routes: { + Array: { + name: { type: "string", default: null }, + destination: { type: "string", default: null }, + action: { + type: "string", + default: null, + groups: ["translate", "deliver", "drop"], + }, + }, + }, + }, + }, + vsi: { + Array: { + name: { type: "string", default: null }, + resource_group: { + type: "string", + default: null, + groups: "", + }, + vpc: { type: "string", default: null, groups: "" }, + subnets: { type: "Array", default: [] }, + image_name: { type: "string", default: null }, + profile: { type: "string", default: null }, + encryption_key: { + type: "string", + default: null, + groups: "", + }, + vsi_per_subnet: { type: "string", default: null }, + security_groups: { type: "Array", default: [] }, + ssh_keys: { type: "Array", default: [] }, + enable_floating_ip: { type: "boolean", default: false }, + primary_interface_ip_spoofing: { type: "boolean", default: false }, + user_data: { type: "string", default: null }, + volumes: { + Array: { + name: { type: "string", default: null }, + profile: { + type: "string", + default: null, + groups: ["3iops-tier", "5iops-tier", "10iops-tier"], + }, + encryption_key: { + type: "string", + default: null, + groups: "", + }, + capacity: { type: "string", default: null }, + }, + }, + }, + }, + vtl: { + Array: { + name: { type: "string", default: null }, + sap: { type: "boolean", default: false }, + sap_profile: { + type: "string", + default: null, + groups: [ + "ush1-4x128", + "ush1-4x256", + "ush1-4x384", + "ush1-4x512", + "ush1-4x768", + "bh1-16x1600", + "bh1-20x2000", + "bh1-22x2200", + "bh1-25x2500", + "bh1-30x3000", + "bh1-35x3500", + "bh1-40x4000", + "bh1-50x5000", + "bh1-60x6000", + "bh1-70x7000", + "bh1-80x8000", + "bh1-100x10000", + "bh1-120x12000", + "bh1-140x14000", + "ch1-60x3000", + "ch1-70x3500", + "ch1-80x4000", + "ch1-100x5000", + "ch1-120x6000", + "ch1-140x7000", + "mh1-8x1440", + "mh1-10x1800", + "mh1-12x2160", + "mh1-16x2880", + "mh1-20x3600", + "mh1-22x3960", + "mh1-25x4500", + "mh1-30x5400", + "mh1-35x6300", + "mh1-40x7200", + "mh1-50x9000", + "mh1-60x10800", + "mh1-70x12600", + "mh1-80x14400", + "umh-4x960", + "umh-6x1440", + "umh-8x1920", + "umh-10x2400", + "umh-12x2880", + "umh-16x3840", + "umh-20x4800", + "umh-22x5280", + "umh-25x6000", + "umh-30x7200", + "umh-35x8400", + "umh-40x9600", + "umh-50x12000", + "umh-60x14400", + ], + }, + workspace: { + type: "string", + default: null, + groups: "", + }, + ip_address: { type: "string", default: null }, + network: { type: "Array", default: [] }, + primary_subnet: { + type: "string", + default: null, + groups: "", + }, + ssh_key: { type: "string", default: null, groups: "" }, + image: { type: "string", default: null, groups: "" }, + pi_sys_type: { + type: "string", + default: null, + groups: ["s922", "e980"], + }, + pi_proc_type: { + type: "string", + default: null, + groups: ["shared", "capped", "dedicated"], + }, + pi_processors: { type: "string", default: null }, + pi_memory: { type: "string", default: null }, + pi_storage_pool_affinity: { type: "boolean", default: false }, + pi_storage_pool: { type: "string", default: null }, + storage_option: { + type: "string", + default: null, + groups: ["None", "Storage Pool", "Affinity", "Anti-Affinity"], + }, + pi_storage_type: { type: "string", default: null }, + affinity_type: { + type: "string", + default: null, + groups: ["Instance", "Volume"], + }, + pi_affinity_policy: { type: "string", default: null }, + pi_affinity_volume: { + type: "string", + default: null, + groups: "", + }, + pi_affinity_instance: { + type: "string", + default: null, + groups: "", + }, + pi_anti_affinity_volume: { + type: "string", + default: null, + groups: "", + }, + pi_anti_affinity_instance: { + type: "string", + default: null, + groups: "", + }, + pi_license_repository_capacity: { type: "string", default: null }, + pi_ibmi_css: { type: "boolean", default: false }, + pi_ibmi_pha: { type: "boolean", default: false }, + pi_ibmi_rds_users: { type: "string", default: null }, + pi_user_data: { type: "string", default: null }, + pi_pin_policy: { + type: "string", + default: "none", + groups: ["soft", "hard", "none"], + }, + pi_health_status: { + type: "string", + default: "OK", + groups: ["OK", "WARNING"], + }, + }, + }, + }; + let actualData = craig.buildSchema(); + assert.deepEqual(actualData, expectedData, "it should create a schema"); + }); + }); +}); diff --git a/unit-tests/state/state.test.js b/unit-tests/state/state.test.js index a63727e7..1f859b49 100644 --- a/unit-tests/state/state.test.js +++ b/unit-tests/state/state.test.js @@ -326,7 +326,2270 @@ describe("state util functions", () => { }); it("should hard set json data and set edge pattern when edge resources are found", () => { let state = newState(); - let data = require("../../client/src/lib/docs/templates/slz-vsi-edge.json"); + let data = { + _options: { + craig_version: "1.12.0", + prefix: "slz", + region: "us-south", + tags: ["slz", "landing-zone"], + dynamic_subnets: false, + power_vs_zones: [], + endpoints: "private", + account_id: null, + enable_power_vs: false, + fs_cloud: false, + power_vs_high_availability: false, + zones: 3, + no_vpn_secrets_manager_auth: false, + }, + access_groups: [], + appid: [], + atracker: { + add_route: true, + bucket: "atracker-bucket", + locations: ["global"], + enabled: true, + type: "cos", + name: "atracker", + cos_key: "cos-bind-key", + target_name: "atracker-cos", + instance: false, + plan: "lite", + resource_group: null, + }, + cbr_rules: [], + cbr_zones: [], + clusters: [], + dns: [], + event_streams: [], + f5_vsi: [], + iam_account_settings: { + enable: false, + mfa: null, + allowed_ip_addresses: null, + include_history: false, + if_match: null, + max_sessions_per_identity: null, + restrict_create_service_id: null, + restrict_create_platform_apikey: null, + session_expiration_in_seconds: null, + session_invalidation_in_seconds: null, + }, + icd: [], + key_management: [ + { + keys: [ + { + dual_auth_delete: false, + name: "slz-atracker-key", + endpoint: "private", + force_delete: false, + root_key: true, + key_ring: "ring", + rotation: 12, + }, + { + dual_auth_delete: false, + name: "key", + endpoint: "private", + force_delete: false, + root_key: true, + key_ring: "ring", + rotation: 12, + }, + { + dual_auth_delete: false, + name: "slz-vsi-volume-key", + endpoint: "private", + force_delete: false, + root_key: true, + key_ring: "ring", + rotation: 12, + }, + ], + authorize_vpc_reader_role: true, + name: "kms", + resource_group: "service-rg", + use_data: false, + use_hs_crypto: false, + }, + ], + load_balancers: [], + logdna: { + name: "logdna", + archive: false, + enabled: false, + plan: "lite", + endpoints: "private", + platform_logs: false, + resource_group: "service-rg", + cos: "atracker-cos", + bucket: "atracker-bucket", + }, + object_storage: [ + { + kms: "kms", + name: "atracker-cos", + plan: "standard", + resource_group: "service-rg", + use_random_suffix: true, + use_data: false, + buckets: [ + { + endpoint: "public", + force_delete: true, + kms_key: "slz-atracker-key", + name: "atracker-bucket", + storage_class: "standard", + use_random_suffix: true, + }, + ], + keys: [ + { + name: "cos-bind-key", + role: "Writer", + enable_hmac: false, + use_random_suffix: true, + }, + ], + }, + { + kms: "kms", + name: "cos", + plan: "standard", + resource_group: "service-rg", + use_random_suffix: true, + use_data: false, + buckets: [ + { + endpoint: "public", + force_delete: true, + kms_key: "key", + name: "management-bucket", + storage_class: "standard", + use_random_suffix: true, + }, + { + endpoint: "public", + force_delete: true, + kms_key: "key", + name: "workload-bucket", + storage_class: "standard", + use_random_suffix: true, + }, + { + endpoint: "public", + force_delete: true, + kms_key: "key", + name: "edge-bucket", + storage_class: "standard", + use_random_suffix: true, + }, + ], + keys: [], + }, + ], + power: [], + power_instances: [], + power_volumes: [], + resource_groups: [ + { + name: "service-rg", + use_data: false, + use_prefix: true, + }, + { + name: "management-rg", + use_data: false, + use_prefix: true, + }, + { + name: "workload-rg", + use_data: false, + use_prefix: true, + }, + { + name: "edge-rg", + use_data: false, + use_prefix: true, + }, + ], + routing_tables: [], + scc: { + credential_description: null, + id: null, + passphrase: null, + name: "", + location: "us", + collector_description: null, + is_public: false, + scope_description: null, + enable: false, + }, + secrets_manager: [], + security_groups: [ + { + vpc: "edge", + name: "f5-management", + resource_group: "edge-rg", + rules: [ + { + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-management", + vpc: "edge", + }, + { + direction: "inbound", + name: "allow-vpc-inbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-management", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-vpc-outbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-management", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-53-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 53, + port_min: 53, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-management", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-80-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 80, + port_min: 80, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-management", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-443-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-management", + vpc: "edge", + }, + ], + }, + { + vpc: "edge", + name: "f5-external", + resource_group: "edge-rg", + rules: [ + { + direction: "inbound", + name: "allow-inbound-443", + source: "0.0.0.0/0", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-external", + vpc: "edge", + }, + ], + }, + { + vpc: "edge", + name: "f5-workload", + resource_group: "edge-rg", + rules: [ + { + direction: "inbound", + name: "allow-workload-subnet-1", + source: "10.10.10.0/24", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "inbound", + name: "allow-workload-subnet-2", + source: "10.20.10.0/24", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "inbound", + name: "allow-workload-subnet-3", + source: "10.30.10.0/24", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "inbound", + name: "allow-workload-subnet-4", + source: "10.40.10.0/24", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "inbound", + name: "allow-workload-subnet-5", + source: "10.50.10.0/24", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "inbound", + name: "allow-workload-subnet-6", + source: "10.60.10.0/24", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "inbound", + name: "allow-vpc-inbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-vpc-outbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-53-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 53, + port_min: 53, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-80-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 80, + port_min: 80, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-443-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-workload", + vpc: "edge", + }, + ], + }, + { + vpc: "edge", + name: "f5-bastion", + resource_group: "edge-rg", + rules: [ + { + direction: "inbound", + name: "1-inbound-3023", + source: "10.5.80.0/24", + tcp: { + port_max: 3025, + port_min: 3023, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-bastion", + vpc: "edge", + }, + { + direction: "inbound", + name: "1-inbound-3080", + source: "10.5.80.0/24", + tcp: { + port_max: 3080, + port_min: 3080, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-bastion", + vpc: "edge", + }, + { + direction: "inbound", + name: "2-inbound-3023", + source: "10.6.80.0/24", + tcp: { + port_max: 3025, + port_min: 3023, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-bastion", + vpc: "edge", + }, + { + direction: "inbound", + name: "2-inbound-3080", + source: "10.6.80.0/24", + tcp: { + port_max: 3080, + port_min: 3080, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-bastion", + vpc: "edge", + }, + { + direction: "inbound", + name: "3-inbound-3023", + source: "10.7.80.0/24", + tcp: { + port_max: 3025, + port_min: 3023, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-bastion", + vpc: "edge", + }, + { + direction: "inbound", + name: "3-inbound-3080", + source: "10.7.80.0/24", + tcp: { + port_max: 3080, + port_min: 3080, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "f5-bastion", + vpc: "edge", + }, + ], + }, + { + vpc: "edge", + name: "edge-vpe", + resource_group: "edge-rg", + rules: [ + { + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "edge-vpe", + vpc: "edge", + }, + { + direction: "inbound", + name: "allow-vpc-inbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "edge-vpe", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-vpc-outbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "edge-vpe", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-53-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 53, + port_min: 53, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "edge-vpe", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-80-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 80, + port_min: 80, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "edge-vpe", + vpc: "edge", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-443-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "edge-vpe", + vpc: "edge", + }, + ], + }, + { + vpc: "management", + name: "management-vpe", + resource_group: "management-rg", + rules: [ + { + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vpe", + vpc: "management", + }, + { + direction: "inbound", + name: "allow-vpc-inbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vpe", + vpc: "management", + }, + { + direction: "outbound", + name: "allow-vpc-outbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vpe", + vpc: "management", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-53-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 53, + port_min: 53, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vpe", + vpc: "management", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-80-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 80, + port_min: 80, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vpe", + vpc: "management", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-443-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vpe", + vpc: "management", + }, + ], + }, + { + vpc: "workload", + name: "workload-vpe", + resource_group: "workload-rg", + rules: [ + { + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vpe", + vpc: "workload", + }, + { + direction: "inbound", + name: "allow-vpc-inbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vpe", + vpc: "workload", + }, + { + direction: "outbound", + name: "allow-vpc-outbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vpe", + vpc: "workload", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-53-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 53, + port_min: 53, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vpe", + vpc: "workload", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-80-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 80, + port_min: 80, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vpe", + vpc: "workload", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-443-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vpe", + vpc: "workload", + }, + ], + }, + { + vpc: "management", + name: "management-vsi", + resource_group: "management-rg", + rules: [ + { + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vsi", + vpc: "management", + }, + { + direction: "inbound", + name: "allow-vpc-inbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vsi", + vpc: "management", + }, + { + direction: "outbound", + name: "allow-vpc-outbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vsi", + vpc: "management", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-53-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 53, + port_min: 53, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vsi", + vpc: "management", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-80-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 80, + port_min: 80, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vsi", + vpc: "management", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-443-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "management-vsi", + vpc: "management", + }, + ], + }, + { + vpc: "workload", + name: "workload-vsi", + resource_group: "workload-rg", + rules: [ + { + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vsi", + vpc: "workload", + }, + { + direction: "inbound", + name: "allow-vpc-inbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vsi", + vpc: "workload", + }, + { + direction: "outbound", + name: "allow-vpc-outbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vsi", + vpc: "workload", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-53-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 53, + port_min: 53, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vsi", + vpc: "workload", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-80-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 80, + port_min: 80, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vsi", + vpc: "workload", + }, + { + direction: "outbound", + name: "allow-ibm-tcp-443-outbound", + source: "161.26.0.0/16", + tcp: { + port_max: 443, + port_min: 443, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + }, + sg: "workload-vsi", + vpc: "workload", + }, + ], + }, + ], + ssh_keys: [ + { + name: "slz-ssh-key", + use_data: false, + resource_group: "management-rg", + public_key: "", + }, + ], + sysdig: { + enabled: false, + plan: "graduated-tier", + resource_group: "service-rg", + name: "sysdig", + platform_logs: false, + }, + teleport_vsi: [], + transit_gateways: [ + { + global: false, + name: "transit-gateway", + resource_group: "service-rg", + connections: [ + { + tgw: "transit-gateway", + vpc: "management", + }, + { + tgw: "transit-gateway", + vpc: "workload", + }, + ], + }, + ], + virtual_private_endpoints: [ + { + name: "management-cos", + service: "cos", + vpc: "management", + resource_group: "management-rg", + security_groups: ["management-vpe"], + subnets: ["vpe-zone-1", "vpe-zone-2", "vpe-zone-3"], + instance: null, + }, + { + name: "workload-cos", + service: "cos", + vpc: "workload", + resource_group: "workload-rg", + security_groups: ["workload-vpe"], + subnets: ["vpe-zone-1", "vpe-zone-2", "vpe-zone-3"], + instance: null, + }, + ], + vpcs: [ + { + name: "edge", + public_gateways: [], + acls: [ + { + resource_group: "edge-rg", + name: "edge", + vpc: "edge", + rules: [ + { + action: "allow", + destination: "10.0.0.0/8", + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + tcp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "edge", + acl: "edge", + }, + { + action: "allow", + destination: "10.0.0.0/8", + direction: "inbound", + name: "allow-all-network-inbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "edge", + acl: "edge", + }, + { + action: "allow", + destination: "0.0.0.0/0", + direction: "outbound", + name: "allow-all-outbound", + source: "0.0.0.0/0", + tcp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "edge", + acl: "edge", + }, + ], + }, + { + resource_group: "edge-rg", + name: "f5-external", + vpc: "edge", + rules: [ + { + action: "allow", + destination: "10.0.0.0/8", + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + tcp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "edge", + acl: "f5-external", + }, + { + action: "allow", + destination: "10.0.0.0/8", + direction: "inbound", + name: "allow-all-network-inbound", + source: "10.0.0.0/8", + tcp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "edge", + acl: "f5-external", + }, + { + action: "allow", + destination: "0.0.0.0/0", + direction: "outbound", + name: "allow-all-outbound", + source: "0.0.0.0/0", + tcp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "edge", + acl: "f5-external", + }, + { + action: "allow", + destination: "10.0.0.0/8", + direction: "inbound", + name: "allow-f5-external-443-inbound", + source: "0.0.0.0/0", + tcp: { + port_max: 443, + port_min: 443, + source_port_min: null, + source_port_max: null, + }, + icmp: { + code: null, + type: null, + }, + udp: { + port_max: null, + port_min: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "edge", + acl: "f5-external", + }, + ], + }, + ], + subnets: [ + { + name: "f5-bastion-zone-1", + network_acl: "edge", + cidr: "10.5.60.0/24", + has_prefix: false, + vpc: "edge", + zone: 1, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-external-zone-1", + network_acl: "f5-external", + cidr: "10.5.40.0/24", + has_prefix: false, + vpc: "edge", + zone: 1, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-management-zone-1", + network_acl: "edge", + cidr: "10.5.30.0/24", + has_prefix: false, + vpc: "edge", + zone: 1, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-workload-zone-1", + network_acl: "edge", + cidr: "10.5.50.0/24", + has_prefix: false, + vpc: "edge", + zone: 1, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "vpe-zone-1", + network_acl: "edge", + cidr: "10.5.70.0/24", + has_prefix: false, + vpc: "edge", + zone: 1, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "vpn-1-zone-1", + network_acl: "edge", + cidr: "10.5.10.0/24", + has_prefix: false, + vpc: "edge", + zone: 1, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "vpn-2-zone-1", + network_acl: "edge", + cidr: "10.5.20.0/24", + has_prefix: false, + vpc: "edge", + zone: 1, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-bastion-zone-2", + network_acl: "edge", + cidr: "10.6.60.0/24", + has_prefix: false, + vpc: "edge", + zone: 2, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-external-zone-2", + network_acl: "f5-external", + cidr: "10.6.40.0/24", + has_prefix: false, + vpc: "edge", + zone: 2, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-management-zone-2", + network_acl: "edge", + cidr: "10.6.30.0/24", + has_prefix: false, + vpc: "edge", + zone: 2, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-workload-zone-2", + network_acl: "edge", + cidr: "10.6.50.0/24", + has_prefix: false, + vpc: "edge", + zone: 2, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "vpe-zone-2", + network_acl: "edge", + cidr: "10.6.70.0/24", + has_prefix: false, + vpc: "edge", + zone: 2, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "vpn-1-zone-2", + network_acl: "edge", + cidr: "10.6.10.0/24", + has_prefix: false, + vpc: "edge", + zone: 2, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "vpn-2-zone-2", + network_acl: "edge", + cidr: "10.6.20.0/24", + has_prefix: false, + vpc: "edge", + zone: 2, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-bastion-zone-3", + network_acl: "edge", + cidr: "10.7.60.0/24", + has_prefix: false, + vpc: "edge", + zone: 3, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-external-zone-3", + network_acl: "f5-external", + cidr: "10.7.40.0/24", + has_prefix: false, + vpc: "edge", + zone: 3, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-management-zone-3", + network_acl: "edge", + cidr: "10.7.30.0/24", + has_prefix: false, + vpc: "edge", + zone: 3, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "f5-workload-zone-3", + network_acl: "edge", + cidr: "10.7.50.0/24", + has_prefix: false, + vpc: "edge", + zone: 3, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "vpe-zone-3", + network_acl: "edge", + cidr: "10.7.70.0/24", + has_prefix: false, + vpc: "edge", + zone: 3, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "vpn-1-zone-3", + network_acl: "edge", + cidr: "10.7.10.0/24", + has_prefix: false, + vpc: "edge", + zone: 3, + public_gateway: false, + resource_group: "edge-rg", + }, + { + name: "vpn-2-zone-3", + network_acl: "edge", + cidr: "10.7.20.0/24", + has_prefix: false, + vpc: "edge", + zone: 3, + public_gateway: false, + resource_group: "edge-rg", + }, + ], + address_prefixes: [ + { + vpc: "edge", + zone: 1, + cidr: "10.5.0.0/16", + name: "f5-zone-1", + }, + { + vpc: "edge", + zone: 2, + cidr: "10.6.0.0/16", + name: "f5-zone-2", + }, + { + vpc: "edge", + zone: 3, + cidr: "10.7.0.0/16", + name: "f5-zone-3", + }, + ], + bucket: "edge-bucket", + manual_address_prefix_management: true, + cos: "cos", + classic_access: false, + default_network_acl_name: null, + default_routing_table_name: null, + default_security_group_name: null, + resource_group: "edge-rg", + publicGateways: [], + }, + { + name: "management", + public_gateways: [], + acls: [ + { + resource_group: "management-rg", + name: "management", + vpc: "management", + rules: [ + { + action: "allow", + destination: "10.0.0.0/8", + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + icmp: { + type: null, + code: null, + }, + tcp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + udp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "management", + acl: "management", + }, + { + action: "allow", + destination: "10.0.0.0/8", + direction: "inbound", + name: "allow-all-network-inbound", + source: "10.0.0.0/8", + icmp: { + type: null, + code: null, + }, + tcp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + udp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "management", + acl: "management", + }, + { + action: "allow", + destination: "0.0.0.0/0", + direction: "outbound", + name: "allow-all-outbound", + source: "0.0.0.0/0", + icmp: { + type: null, + code: null, + }, + tcp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + udp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "management", + acl: "management", + }, + ], + }, + ], + subnets: [ + { + name: "vsi-zone-1", + network_acl: "management", + cidr: "10.10.10.0/24", + has_prefix: true, + vpc: "management", + zone: 1, + public_gateway: false, + resource_group: "management-rg", + }, + { + name: "vpe-zone-1", + network_acl: "management", + cidr: "10.10.20.0/24", + has_prefix: true, + vpc: "management", + zone: 1, + public_gateway: false, + resource_group: "management-rg", + }, + { + name: "vpn-zone-1", + network_acl: "management", + cidr: "10.10.30.0/24", + has_prefix: true, + vpc: "management", + zone: 1, + public_gateway: false, + resource_group: "management-rg", + }, + { + name: "vsi-zone-2", + network_acl: "management", + cidr: "10.20.10.0/24", + has_prefix: true, + vpc: "management", + zone: 2, + public_gateway: false, + resource_group: "management-rg", + }, + { + name: "vpe-zone-2", + network_acl: "management", + cidr: "10.20.20.0/24", + has_prefix: true, + vpc: "management", + zone: 2, + public_gateway: false, + resource_group: "management-rg", + }, + { + name: "vsi-zone-3", + network_acl: "management", + cidr: "10.30.10.0/24", + has_prefix: true, + vpc: "management", + zone: 3, + public_gateway: false, + resource_group: "management-rg", + }, + { + name: "vpe-zone-3", + network_acl: "management", + cidr: "10.30.20.0/24", + has_prefix: true, + vpc: "management", + zone: 3, + public_gateway: false, + resource_group: "management-rg", + }, + ], + address_prefixes: [ + { + name: "vsi-zone-1", + cidr: "10.10.10.0/24", + zone: 1, + vpc: "management", + }, + { + name: "vpe-zone-1", + cidr: "10.10.20.0/24", + zone: 1, + vpc: "management", + }, + { + name: "vpn-zone-1", + cidr: "10.10.30.0/24", + zone: 1, + vpc: "management", + }, + { + name: "vsi-zone-2", + cidr: "10.20.10.0/24", + zone: 2, + vpc: "management", + }, + { + name: "vpe-zone-2", + cidr: "10.20.20.0/24", + zone: 2, + vpc: "management", + }, + { + name: "vsi-zone-3", + cidr: "10.30.10.0/24", + zone: 3, + vpc: "management", + }, + { + name: "vpe-zone-3", + cidr: "10.30.20.0/24", + zone: 3, + vpc: "management", + }, + ], + bucket: "management-bucket", + manual_address_prefix_management: true, + cos: "cos", + classic_access: false, + default_network_acl_name: null, + default_routing_table_name: null, + default_security_group_name: null, + resource_group: "management-rg", + publicGateways: [], + }, + { + name: "workload", + public_gateways: [], + acls: [ + { + resource_group: "workload-rg", + name: "workload", + vpc: "workload", + rules: [ + { + action: "allow", + destination: "10.0.0.0/8", + direction: "inbound", + name: "allow-ibm-inbound", + source: "161.26.0.0/16", + icmp: { + type: null, + code: null, + }, + tcp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + udp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "workload", + acl: "workload", + }, + { + action: "allow", + destination: "10.0.0.0/8", + direction: "inbound", + name: "allow-all-network-inbound", + source: "10.0.0.0/8", + icmp: { + type: null, + code: null, + }, + tcp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + udp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "workload", + acl: "workload", + }, + { + action: "allow", + destination: "0.0.0.0/0", + direction: "outbound", + name: "allow-all-outbound", + source: "0.0.0.0/0", + icmp: { + type: null, + code: null, + }, + tcp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + udp: { + port_min: null, + port_max: null, + source_port_min: null, + source_port_max: null, + }, + vpc: "workload", + acl: "workload", + }, + ], + }, + ], + subnets: [ + { + name: "vsi-zone-1", + network_acl: "workload", + cidr: "10.40.10.0/24", + has_prefix: true, + vpc: "workload", + zone: 1, + public_gateway: false, + resource_group: "workload-rg", + }, + { + name: "vpe-zone-1", + network_acl: "workload", + cidr: "10.40.20.0/24", + has_prefix: true, + vpc: "workload", + zone: 1, + public_gateway: false, + resource_group: "workload-rg", + }, + { + name: "vsi-zone-2", + network_acl: "workload", + cidr: "10.50.10.0/24", + has_prefix: true, + vpc: "workload", + zone: 2, + public_gateway: false, + resource_group: "workload-rg", + }, + { + name: "vpe-zone-2", + network_acl: "workload", + cidr: "10.50.20.0/24", + has_prefix: true, + vpc: "workload", + zone: 2, + public_gateway: false, + resource_group: "workload-rg", + }, + { + name: "vsi-zone-3", + network_acl: "workload", + cidr: "10.60.10.0/24", + has_prefix: true, + vpc: "workload", + zone: 3, + public_gateway: false, + resource_group: "workload-rg", + }, + { + name: "vpe-zone-3", + network_acl: "workload", + cidr: "10.60.20.0/24", + has_prefix: true, + vpc: "workload", + zone: 3, + public_gateway: false, + resource_group: "workload-rg", + }, + ], + address_prefixes: [ + { + name: "vsi-zone-1", + cidr: "10.40.10.0/24", + zone: 1, + vpc: "workload", + }, + { + name: "vpe-zone-1", + cidr: "10.40.20.0/24", + zone: 1, + vpc: "workload", + }, + { + name: "vsi-zone-2", + cidr: "10.50.10.0/24", + zone: 2, + vpc: "workload", + }, + { + name: "vpe-zone-2", + cidr: "10.50.20.0/24", + zone: 2, + vpc: "workload", + }, + { + name: "vsi-zone-3", + cidr: "10.60.10.0/24", + zone: 3, + vpc: "workload", + }, + { + name: "vpe-zone-3", + cidr: "10.60.20.0/24", + zone: 3, + vpc: "workload", + }, + ], + bucket: "workload-bucket", + manual_address_prefix_management: true, + cos: "cos", + classic_access: false, + default_network_acl_name: null, + default_routing_table_name: null, + default_security_group_name: null, + resource_group: "workload-rg", + publicGateways: [], + }, + ], + vpn_gateways: [ + { + name: "management-gateway", + resource_group: "management-rg", + subnet: "vpn-zone-1", + vpc: "management", + }, + ], + vpn_servers: [], + vsi: [ + { + kms: "kms", + encryption_key: "slz-vsi-volume-key", + image: "ibm-ubuntu-22-04-1-minimal-amd64-1", + profile: "cx2-4x8", + name: "management-server", + security_groups: ["management-vsi"], + ssh_keys: ["ssh-key"], + subnets: ["vsi-zone-1", "vsi-zone-2", "vsi-zone-3"], + vpc: "management", + vsi_per_subnet: 1, + resource_group: "management-rg", + override_vsi_name: null, + user_data: "", + network_interfaces: [], + volumes: [], + }, + { + kms: "kms", + encryption_key: "slz-vsi-volume-key", + image: "ibm-centos-7-9-minimal-amd64-11", + image_name: + "CentOS 7.x - Minimal Install (amd64) [ibm-centos-7-9-minimal-amd64-11]", + profile: "cx2-4x8", + name: "workload-server", + security_groups: ["workload-vsi"], + ssh_keys: ["ssh-key"], + vpc: "workload", + vsi_per_subnet: 1, + resource_group: "workload-rg", + override_vsi_name: null, + user_data: null, + network_interfaces: [], + subnets: ["vsi-zone-1", "vsi-zone-2", "vsi-zone-3"], + volumes: [], + subnet: "", + enable_floating_ip: false, + }, + ], + classic_ssh_keys: [], + classic_vlans: [], + }; state.setUpdateCallback(() => {}); delete data.ssh_keys[0]; // remove extra ssh key that should not be there lol state.hardSetJson(data); diff --git a/unit-tests/state/transit-gateways.test.js b/unit-tests/state/transit-gateways.test.js index d2c94ea2..374f4527 100644 --- a/unit-tests/state/transit-gateways.test.js +++ b/unit-tests/state/transit-gateways.test.js @@ -736,6 +736,11 @@ describe("transit_gateways", () => { crns: ["crn:v1:bluemix:public:abcdf", "mooseeeeeeeeeeeeeeeeee"], }) ); + assert.isFalse( + state.transit_gateways.crns.invalidText({ + crns: undefined, + }) + ); }); }); });