Bastion API for global¶
Bastion API documentation for global
Global¶
-
GET
/bastion/global
¶ Get the global config
Response JSON Object: - bastionID (string) – The Bastion ID. Must be between 3 and 32 characters long, contain only lowercase letters, numbers, or hyphens, and start with a letter.
- instanceID (string) – Deprecated since 1.14.0.
- source (string) – Deprecated since 1.14.0.
Example response:
{ "bastionID": "", "instanceID": "", "source": "" }
-
POST
/bastion/global
¶ Set the global config. This operation will be rejected if the terraform instance is not destroyed
Request JSON Object: - bastionID (string) – The Bastion ID. Must be between 3 and 32 characters long, contain only lowercase letters, numbers, or hyphens, and start with a letter.
- instanceID (string) – Deprecated since 1.14.0.
- source (string) – Deprecated since 1.14.0.
Example query:
{ "bastionID": "", "instanceID": "", "source": "" }
-
GET
/bastion/global/tfvars
¶ Get the global tfvars.
Response JSON Object: - [key] – Type can be any of boolean,integer,number,object,string,null.
Example response:
{ "ami_prefix": "internal", "ami_version": "1.20.0", "trusted_cidrs": [], "trusted_security_groups": [] }
-
POST
/bastion/global/tfvars
¶ Set the global tfvars.
Request JSON Object: - [key] – Type can be any of boolean,integer,number,object,string,null.
Example query:
{ "ami_prefix": "internal", "ami_version": "1.20.0", "trusted_cidrs": [], "trusted_security_groups": [] }
-
DELETE
/bastion/global/tfvars
¶ Delete the global tfvars.
Terraform¶
-
GET
/bastion/global/providers
¶ Get the global default provider configurations. This information is retrieved from Consul.
Response JSON Object: - [] (object) –
- [].name (string) – Provider name.
- [].meta.alias (string) – An optional provider alias.
- [].meta.version (string) – Version constraint following Terraform’s syntax.
- [].arguments[key] – Type can be any of boolean,integer,number,object,string,null.
Example response:
[ { "name": "aws", "meta": { "alias": null, "version": "~> 2.2.0" }, "arguments": { "region": "us-east-1" } } ]
-
PUT
/bastion/global/providers
¶ Override the global default provider configurations. This information is also stored in Consul.
Request JSON Object: - [] (object) –
- [].name (string) – Provider name.
- [].meta.alias (string) – An optional provider alias.
- [].meta.version (string) – Version constraint following Terraform’s syntax.
- [].arguments[key] – Type can be any of boolean,integer,number,object,string,null.
Example query:
[ { "name": "aws", "meta": { "alias": null, "version": "~> 2.2.0" }, "arguments": { "region": "us-east-1" } } ]
-
DELETE
/bastion/global/providers
¶ Remove the global default provider configurations. This information is wiped from Consul.
-
PUT
/bastion/global/provider
¶ Add or override a global default provider configuration. This information is stored in Consul.
Request JSON Object: - name (string) – Provider name.
- meta.alias (string) – An optional provider alias.
- meta.version (string) – Version constraint following Terraform’s syntax.
- arguments[key] – Type can be any of boolean,integer,number,object,string,null.
Example query:
{ "name": "aws", "meta": { "alias": null, "version": "~> 2.2.0" }, "arguments": { "region": "us-east-1" } }
-
GET
/bastion/global/provider/{providerName}
¶ Get the Terraform default provider arguments (unaliased provider). This information is retrieved from Consul.
Parameters: - providerName – A Terraform provider name.
Response JSON Object: - name (string) – Provider name.
- meta.alias (string) – An optional provider alias.
- meta.version (string) – Version constraint following Terraform’s syntax.
- arguments[key] – Type can be any of boolean,integer,number,object,string,null.
Example response:
{ "name": "aws", "meta": { "alias": null, "version": "~> 2.2.0" }, "arguments": { "region": "us-east-1" } }
-
DELETE
/bastion/global/provider/{providerName}
¶ Remove the Terraform default provider and all its arguments (unaliased provider). This information is removed from Consul.
Parameters: - providerName – A Terraform provider name.
-
GET
/bastion/global/provider/{providerName}/{providerAlias}
¶ Get the Terraform default arguments. This information is retrieved from Consul.
Parameters: - providerName – A Terraform provider name.
- providerAlias – A Terraform provider alias.
Response JSON Object: - name (string) – Provider name.
- meta.alias (string) – An optional provider alias.
- meta.version (string) – Version constraint following Terraform’s syntax.
- arguments[key] – Type can be any of boolean,integer,number,object,string,null.
Example response:
{ "name": "aws", "meta": { "alias": null, "version": "~> 2.2.0" }, "arguments": { "region": "us-east-1" } }
-
DELETE
/bastion/global/provider/{providerName}/{providerAlias}
¶ Remove the Terraform default provider and all its arguments. This information is removed from Consul.
Parameters: - providerName – A Terraform provider name.
- providerAlias – A Terraform provider alias.