diff --git a/docs/data-sources/kubernetes_cluster.md b/docs/data-sources/kubernetes_cluster.md index 3273743..7451bc8 100644 --- a/docs/data-sources/kubernetes_cluster.md +++ b/docs/data-sources/kubernetes_cluster.md @@ -13,12 +13,12 @@ Data source for Kubernetes cluster in MGC ## Example Usage ```terraform -data "mgc_kubernetes_cluster_kubeconfig" "cluster" { - cluster_id = mgc_kubernetes_cluster.my_cluster.id +data "mgc_kubernetes_cluster" "cluster" { + id = mgc_kubernetes_cluster.my_cluster.id } output "cluster" { - value = data.mgc_kubernetes_cluster_kubeconfig.cluster + value = data.mgc_kubernetes_cluster.cluster } ``` diff --git a/docs/data-sources/kubernetes_cluster_kubeconfig.md b/docs/data-sources/kubernetes_cluster_kubeconfig.md index f161d93..801827e 100644 --- a/docs/data-sources/kubernetes_cluster_kubeconfig.md +++ b/docs/data-sources/kubernetes_cluster_kubeconfig.md @@ -13,12 +13,12 @@ Get the kubeconfig of a Kubernetes cluster by cluster_id. ## Example Usage ```terraform -data "mgc_kubernetes_cluster" "cluster" { - id = mgc_kubernetes_cluster.my_cluster.id +data "mgc_kubernetes_cluster_kubeconfig" "cluster" { + cluster_id = mgc_kubernetes_cluster.my_cluster.id } output "cluster" { - value = data.mgc_kubernetes_cluster.cluster + value = data.mgc_kubernetes_cluster_kubeconfig.cluster } ``` diff --git a/docs/data-sources/network_public_ip.md b/docs/data-sources/network_public_ip.md new file mode 100644 index 0000000..f3a58d9 --- /dev/null +++ b/docs/data-sources/network_public_ip.md @@ -0,0 +1,37 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "mgc_network_public_ip Data Source - terraform-provider-mgc" +subcategory: "Network" +description: |- + Network Public IP +--- + +# mgc_network_public_ip (Data Source) + +Network Public IP + +## Example Usage + +```terraform +data "mgc_network_public_ip" "example" { + id = mgc_network_public_ips.example.id +} + +output "datasource_public_ip_id" { + value = data.mgc_network_public_ip.example +} +``` + + +## Schema + +### Required + +- `id` (String) The ID of the public IP + +### Read-Only + +- `description` (String) The description of the public IP +- `port_id` (String) The port ID it's attached to +- `public_ip` (String) The public IP address +- `vpc_id` (String) The related VPC ID diff --git a/docs/data-sources/network_security_group.md b/docs/data-sources/network_security_group.md new file mode 100644 index 0000000..179366f --- /dev/null +++ b/docs/data-sources/network_security_group.md @@ -0,0 +1,66 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "mgc_network_security_group Data Source - terraform-provider-mgc" +subcategory: "Network" +description: |- + Network Security Group +--- + +# mgc_network_security_group (Data Source) + +Network Security Group + +## Example Usage + +```terraform +data "mgc_network_security_group" "example" { + id = mgc_network_security_groups.example.id +} + +output "datasource_security_group" { + value = data.mgc_network_security_group.example +} +``` + + +## Schema + +### Required + +- `id` (String) The ID of the security group. + +### Optional + +- `description` (String) The description of the security group. + +### Read-Only + +- `created_at` (String) The creation timestamp of the security group. +- `error` (String) Error message, if any. +- `external_id` (String) The external ID of the security group. +- `is_default` (Boolean) Indicates if this is the default security group. +- `name` (String) The name of the security group. +- `project_type` (String) The project type of the security group. +- `rules` (Attributes List) The rules of the security group. (see [below for nested schema](#nestedatt--rules)) +- `status` (String) The status of the security group. +- `tenant_id` (String) The tenant ID of the security group. +- `updated` (String) The last update timestamp of the security group. +- `vpc_id` (String) The VPC ID of the security group. + + +### Nested Schema for `rules` + +Read-Only: + +- `created_at` (String) The creation timestamp of the rule. +- `direction` (String) The direction of the rule. +- `error` (String) Error message, if any. +- `ethertype` (String) The ethertype of the rule. +- `id` (String) The ID of the rule. +- `port_range_max` (Number) The maximum port range of the rule. +- `port_range_min` (Number) The minimum port range of the rule. +- `protocol` (String) The protocol of the rule. +- `remote_group_id` (String) The remote group ID of the rule. +- `remote_ip_prefix` (String) The remote IP prefix of the rule. +- `security_group_id` (String) The security group ID of the rule. +- `status` (String) The status of the rule. diff --git a/docs/data-sources/network_subnetpool.md b/docs/data-sources/network_subnetpool.md new file mode 100644 index 0000000..1028c1f --- /dev/null +++ b/docs/data-sources/network_subnetpool.md @@ -0,0 +1,39 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "mgc_network_subnetpool Data Source - terraform-provider-mgc" +subcategory: "Network" +description: |- + Network Subnet Pool +--- + +# mgc_network_subnetpool (Data Source) + +Network Subnet Pool + +## Example Usage + +```terraform +data "mgc_network_subnetpool" "example" { + id = "subnetpool-id" +} + +output "subnetpool_cidr" { + value = data.mgc_network_subnetpool.example +} +``` + + +## Schema + +### Required + +- `id` (String) The unique identifier of the subnetpool + +### Read-Only + +- `cidr` (String) The CIDR range associated with the subnetpool +- `created_at` (String) The timestamp when the subnetpool was created +- `description` (String) The description of the subnetpool +- `ip_version` (Number) The IP version of the subnetpool (4 or 6) +- `name` (String) The name of the subnetpool +- `tenant_id` (String) The ID of the tenant that owns the subnetpool diff --git a/docs/data-sources/network_vpc.md b/docs/data-sources/network_vpc.md new file mode 100644 index 0000000..7645bd9 --- /dev/null +++ b/docs/data-sources/network_vpc.md @@ -0,0 +1,35 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "mgc_network_vpc Data Source - terraform-provider-mgc" +subcategory: "Network" +description: |- + Network VPC +--- + +# mgc_network_vpc (Data Source) + +Network VPC + +## Example Usage + +```terraform +data "mgc_network_vpc" "example" { + id = mgc_network_vpcs.example.id +} + +output "datasource_vpc_id" { + value = data.mgc_network_vpc.example +} +``` + + +## Schema + +### Required + +- `id` (String) The ID of the VPC + +### Read-Only + +- `description` (String) The description of the VPC +- `name` (String) The name of the VPC diff --git a/docs/data-sources/network_vpcs_interface.md b/docs/data-sources/network_vpcs_interface.md new file mode 100644 index 0000000..3ae1434 --- /dev/null +++ b/docs/data-sources/network_vpcs_interface.md @@ -0,0 +1,61 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "mgc_network_vpcs_interface Data Source - terraform-provider-mgc" +subcategory: "Network" +description: |- + Network VPC Interface +--- + +# mgc_network_vpcs_interface (Data Source) + +Network VPC Interface + +## Example Usage + +```terraform +data "mgc_network_vpcs_interface" "example" { + id = mgc_network_vpcs_interfaces.example.id +} + +output "datasource_vpcs_interface" { + value = data.mgc_network_vpcs_interface.example +} +``` + + +## Schema + +### Required + +- `id` (String) The ID of the VPC interface + +### Read-Only + +- `created_at` (String) Creation timestamp of the VPC interface +- `description` (String) Description of the VPC interface +- `ip_address` (Attributes List) The IP addresses associated with the VPC interface (see [below for nested schema](#nestedatt--ip_address)) +- `is_admin_state_up` (Boolean) Administrative state of the VPC interface +- `is_port_security_enabled` (Boolean) Port security status of the VPC interface +- `name` (String) Name of the VPC interface +- `public_ip` (Attributes List) Public IP configuration of the VPC interface (see [below for nested schema](#nestedatt--public_ip)) +- `security_groups` (List of String) List of security group IDs +- `updated` (String) Last update timestamp of the VPC interface +- `vpc_id` (String) ID of the VPC this interface belongs to + + +### Nested Schema for `ip_address` + +Read-Only: + +- `ethertype` (String) The ethertype of the IP address +- `ip_address` (String) The IP address +- `subnet_id` (String) The subnet ID + + + +### Nested Schema for `public_ip` + +Read-Only: + +- `public_ip` (String) The public IP address +- `public_ip_id` (String) The public IP ID diff --git a/docs/data-sources/network_vpcs_subnet.md b/docs/data-sources/network_vpcs_subnet.md new file mode 100644 index 0000000..bb04aba --- /dev/null +++ b/docs/data-sources/network_vpcs_subnet.md @@ -0,0 +1,51 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "mgc_network_vpcs_subnet Data Source - terraform-provider-mgc" +subcategory: "Network" +description: |- + Network VPC Subnet +--- + +# mgc_network_vpcs_subnet (Data Source) + +Network VPC Subnet + +## Example Usage + +```terraform +data "mgc_network_vpcs_subnet" "example" { + id = mgc_network_vpcs_subnets.example.id +} + +output "datasource_subnet_id" { + value = data.mgc_network_vpcs_subnet.example +} +``` + + +## Schema + +### Required + +- `id` (String) The ID of the subnet + +### Read-Only + +- `cidr_block` (String) The CIDR block of the subnet +- `description` (String) The description of the subnet +- `dhcp_pools` (Attributes List) The DHCP pools of the subnet (see [below for nested schema](#nestedatt--dhcp_pools)) +- `dns_nameservers` (List of String) The DNS nameservers of the subnet +- `gateway_ip` (String) The gateway IP of the subnet +- `ip_version` (String) The IP version of the subnet +- `name` (String) The name of the subnet +- `updated` (String) The updated timestamp of the subnet +- `vpc_id` (String) The VPC ID of the subnet +- `zone` (String) The zone of the subnet + + +### Nested Schema for `dhcp_pools` + +Read-Only: + +- `end` (String) The end of the DHCP pool +- `start` (String) The start of the DHCP pool diff --git a/docs/data-sources/virtual_machine_instance.md b/docs/data-sources/virtual_machine_instance.md index 55d3b60..120e599 100644 --- a/docs/data-sources/virtual_machine_instance.md +++ b/docs/data-sources/virtual_machine_instance.md @@ -40,3 +40,4 @@ output "vm_instances" { - `ssh_key_name` (String) SSH Key name - `state` (String) State of instance - `status` (String) Status of instance. +- `user_data` (String) User data of instance diff --git a/docs/data-sources/virtual_machine_instances.md b/docs/data-sources/virtual_machine_instances.md index bf515c4..52525cc 100644 --- a/docs/data-sources/virtual_machine_instances.md +++ b/docs/data-sources/virtual_machine_instances.md @@ -43,3 +43,4 @@ Read-Only: - `ssh_key_name` (String) SSH Key name - `state` (String) State of instance - `status` (String) Status of instance. +- `user_data` (String) User data of instance diff --git a/docs/resources/network_public_ips.md b/docs/resources/network_public_ips.md index e472b88..17c95c6 100644 --- a/docs/resources/network_public_ips.md +++ b/docs/resources/network_public_ips.md @@ -3,37 +3,42 @@ page_title: "mgc_network_public_ips Resource - terraform-provider-mgc" subcategory: "Network" description: |- - VPC Public IPs + Network Public IP --- # mgc_network_public_ips (Resource) -VPC Public IPs +Network Public IP +## Example Usage +```terraform +resource "mgc_network_public_ips" "example" { + description = "example public ip" + vpc_id = mgc_network_vpc.example.id +} +``` ## Schema ### Required -- `vpc_id` (String) Id of the VPC to create the Public IP in +- `vpc_id` (String) The related VPC ID ### Optional -- `description` (String) -- `validate_quota` (Boolean) Validate the quota before creating the Public IP -- `wait` (Boolean) The request will be asynchronous. The wait parameter tells the API that you want the request to simulate synchronous behavior (to maintain endpoint compatibility). You can set an approximate timeout with the waitTimeout parameter -- `wait_timeout` (Number) the approximate time in seconds you want to wait when simulating the request as synchronous (only works with wait=true) +- `description` (String) The description of the public IP ### Read-Only -- `created_at` (String) -- `current_vpc_id` (String) -- `error` (String) -- `external_id` (String) -- `id` (String) Id of the Public IP to delete -- `port_id` (String) -- `public_ip` (String) -- `status` (String) -- `updated` (String) +- `id` (String) The ID of the public IP +- `public_ip` (String) The public IP address + +## Import + +Import is supported using the following syntax: + +```shell +terraform import mgc_network_public_ips.example 123 +``` diff --git a/docs/resources/network_public_ips_attach.md b/docs/resources/network_public_ips_attach.md new file mode 100644 index 0000000..e42e4d4 --- /dev/null +++ b/docs/resources/network_public_ips_attach.md @@ -0,0 +1,36 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "mgc_network_public_ips_attach Resource - terraform-provider-mgc" +subcategory: "Network" +description: |- + Network Public IP Attach +--- + +# mgc_network_public_ips_attach (Resource) + +Network Public IP Attach + +## Example Usage + +```terraform +resource "mgc_network_public_ips_attach" "example" { + public_ip_id = mgc_network_public_ips.example.id + interface_id = mgc_network_vpcs_interfaces.primary_interface.id +} +``` + + +## Schema + +### Required + +- `interface_id` (String) Interface ID +- `public_ip_id` (String) Public IP ID + +## Import + +Import is supported using the following syntax: + +```shell +terraform import mgc_network_public_ips_attach.example public_ip_id,interface_id +``` diff --git a/docs/resources/network_security_groups.md b/docs/resources/network_security_groups.md index 1fa2e3e..83dba81 100644 --- a/docs/resources/network_security_groups.md +++ b/docs/resources/network_security_groups.md @@ -3,57 +3,55 @@ page_title: "mgc_network_security_groups Resource - terraform-provider-mgc" subcategory: "Network" description: |- - VPC Security Groups + Network Security Group --- # mgc_network_security_groups (Resource) -VPC Security Groups +Network Security Group +## Example Usage +```terraform +resource "mgc_network_security_groups" "example" { + name = "example-security-group" + description = "An example security group" + disable_default_rules = false +} + +output "security_group_id" { + value = mgc_network_security_groups.example +} + +resource "mgc_network_security_groups" "example2" { + name = "example-security-group3" +} + +output "security_group_id2" { + value = mgc_network_security_groups.example2 +} +``` ## Schema ### Required -- `name` (String) +- `name` (String) The name of the Security Group ### Optional -- `description` (String) -- `validate_quota` (Boolean) Validate the quota before creating Security Group -- `wait` (Boolean) The request will be asynchronous. The wait parameter tells the API that you want the request to simulate synchronous behavior (to maintain endpoint compatibility). You can set an approximate timeout with the waitTimeout parameter -- `wait_timeout` (Number) the approximate time in seconds you want to wait when simulating the request as synchronous (only works with wait=true) +- `description` (String) The description of the Security Group +- `disable_default_rules` (Boolean) Disable default rules, when creating the Security Group ### Read-Only -- `created_at` (String) -- `error` (String) -- `external_id` (String) -- `id` (String) Id of the security group to delete -- `is_default` (Boolean) -- `project_type` (String) -- `rules` (Attributes List) (see [below for nested schema](#nestedatt--rules)) -- `status` (String) -- `tenant_id` (String) -- `updated` (String) -- `vpc_id` (String) - - -### Nested Schema for `rules` - -Read-Only: - -- `created_at` (String) -- `direction` (String) -- `error` (String) -- `ethertype` (String) -- `id` (String) -- `port_range_max` (Number) -- `port_range_min` (Number) -- `protocol` (String) -- `remote_group_id` (String) -- `remote_ip_prefix` (String) -- `security_group_id` (String) -- `status` (String) +- `id` (String) The ID of the Security Group + +## Import + +Import is supported using the following syntax: + +```shell +terraform import mgc_network_security_groups.example 123 +``` diff --git a/docs/resources/network_security_groups_attach.md b/docs/resources/network_security_groups_attach.md new file mode 100644 index 0000000..fc6359b --- /dev/null +++ b/docs/resources/network_security_groups_attach.md @@ -0,0 +1,41 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "mgc_network_security_groups_attach Resource - terraform-provider-mgc" +subcategory: "Network" +description: |- + Network Security Group Attach +--- + +# mgc_network_security_groups_attach (Resource) + +Network Security Group Attach + +## Example Usage + +```terraform +resource "mgc_network_security_groups_attach" "attach_example" { + security_group_id = mgc_network_security_groups.example.id + interface_id = mgc_network_vpcs_interfaces.interface_example.id +} + +output "security_group_attach_id" { + value = mgc_network_security_groups_attach.attach_example +} +``` + + +## Schema + +### Required + +- `interface_id` (String) The ID of the Network Interface +- `security_group_id` (String) The ID of the Security Group + +## Import + +Import is supported using the following syntax: + +```shell +# For importing the resource into the state file you must provide the security group id and the network id separated by a comma. +terraform import mgc_network_security_groups_attach.example 123,098 +``` diff --git a/docs/resources/network_security_groups_rules.md b/docs/resources/network_security_groups_rules.md new file mode 100644 index 0000000..e3af911 --- /dev/null +++ b/docs/resources/network_security_groups_rules.md @@ -0,0 +1,67 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "mgc_network_security_groups_rules Resource - terraform-provider-mgc" +subcategory: "Network" +description: |- + Network Security Group Rule +--- + +# mgc_network_security_groups_rules (Resource) + +Network Security Group Rule + +## Example Usage + +```terraform +resource "mgc_network_security_groups_rules" "allow_ssh" { + description = "Allow incoming SSH traffic" + direction = "ingress" + ethertype = "IPv4" + port_range_max = 22 + port_range_min = 22 + protocol = "tcp" + remote_ip_prefix = "0.0.0.0/0" + security_group_id = mgc_network_security_groups.example.id +} + +resource "mgc_network_security_groups_rules" "allow_ssh_ipv6" { + description = "Allow incoming SSH traffic from IPv6" + direction = "ingress" + ethertype = "IPv6" + port_range_max = 22 + port_range_min = 22 + protocol = "tcp" + remote_ip_prefix = "::/0" + security_group_id = mgc_network_security_groups.example.id +} +``` + + +## Schema + +### Required + +- `direction` (String) Direction of traffic flow. Allowed values: 'ingress' or 'egress'. Example: 'ingress' +- `ethertype` (String) Network protocol version. Allowed values: 'IPv4' or 'IPv6'. Example: 'IPv4' +- `security_group_id` (String) ID of the security group to which this rule will be added. Example: 'sg-0123456789abcdef0' + +### Optional + +- `description` (String) Description of the security group rule. Example: 'Allow incoming SSH traffic' +- `port_range_max` (Number) Maximum port number in the range. Valid values: 1-65535. Example: 22 +- `port_range_min` (Number) Minimum port number in the range. Valid values: 1-65535. Example: 22 +- `protocol` (String) IP protocol. Allowed values: tcp, udp, icmp, icmpv6. Example: 'tcp' +- `remote_group_id` (String) ID of the remote security group. Example: 'sg-0123456789abcdef0' +- `remote_ip_prefix` (String) CIDR notation of remote IPv4 and IPv6 range. Example: '192.168.1.0/24', '0.0.0.0/0', '::/0' or '2001:db8::/32' + +### Read-Only + +- `id` (String) The ID of the security group rule + +## Import + +Import is supported using the following syntax: + +```shell +terraform import mgc_network_security_groups_rules.example 123 +``` diff --git a/docs/resources/network_vpcs.md b/docs/resources/network_vpcs.md index ec4d33a..e2a25d2 100644 --- a/docs/resources/network_vpcs.md +++ b/docs/resources/network_vpcs.md @@ -3,37 +3,41 @@ page_title: "mgc_network_vpcs Resource - terraform-provider-mgc" subcategory: "Network" description: |- - Virtual Private Cloud (VPC) + Network VPC --- # mgc_network_vpcs (Resource) -Virtual Private Cloud (VPC) +Network VPC +## Example Usage +```terraform +resource "mgc_network_vpcs" "example" { + name = "example-vpc" + description = "An example VPC" +} +``` ## Schema ### Required -- `name` (String) +- `name` (String) The name of the VPC ### Optional -- `description` (String) +- `description` (String) The description of the VPC ### Read-Only -- `created_at` (String) -- `current_id` (String) -- `current_name` (String) -- `external_network` (String) -- `id` (String) ID of the VPC to delete -- `is_default` (Boolean) -- `network_id` (String) -- `router_id` (String) -- `security_groups` (List of String) -- `subnets` (List of String) -- `tenant_id` (String) -- `updated` (String) +- `id` (String) The ID of the VPC + +## Import + +Import is supported using the following syntax: + +```shell +terraform import mgc_network_vpcs.example 123 +``` diff --git a/docs/resources/network_vpcs_interfaces.md b/docs/resources/network_vpcs_interfaces.md new file mode 100644 index 0000000..5cae725 --- /dev/null +++ b/docs/resources/network_vpcs_interfaces.md @@ -0,0 +1,40 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "mgc_network_vpcs_interfaces Resource - terraform-provider-mgc" +subcategory: "Network" +description: |- + Network VPC Interface +--- + +# mgc_network_vpcs_interfaces (Resource) + +Network VPC Interface + +## Example Usage + +```terraform +resource "mgc_network_vpcs_interfaces" "interface_example" { + name = "example-interface" + vpc_id = mgc_network_vpcs.example.id +} +``` + + +## Schema + +### Required + +- `name` (String) The name of the VPC Interface +- `vpc_id` (String) The ID of the VPC + +### Read-Only + +- `id` (String) The ID of the VPC Interface + +## Import + +Import is supported using the following syntax: + +```shell +terraform import mgc_network_vpcs_interfaces.example 123 +``` diff --git a/docs/resources/ssh_keys.md b/docs/resources/ssh_keys.md index 19bdb77..94bae54 100644 --- a/docs/resources/ssh_keys.md +++ b/docs/resources/ssh_keys.md @@ -14,6 +14,7 @@ Add a new SSH key to your account ```terraform resource "mgc_ssh_keys" "my_key" { + provider = mgc.nordeste name = "my_new_key" key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP+E3U/DpNagT79ueF+xQn9dNFUKheopjx/kIBC1qQM3" } diff --git a/docs/resources/virtual_machine_instances.md b/docs/resources/virtual_machine_instances.md index 27b410d..7518bee 100644 --- a/docs/resources/virtual_machine_instances.md +++ b/docs/resources/virtual_machine_instances.md @@ -63,6 +63,7 @@ resource "mgc_virtual_machine_instances" "basic_instance_with_SG" { - `name_is_prefix` (Boolean) Indicates whether the provided name is a prefix or the exact name of the virtual machine instance. - `network` (Attributes) The network configuration of the virtual machine instance. (see [below for nested schema](#nestedatt--network)) - `ssh_key_name` (String) The name of the SSH key associated with the virtual machine instance. If the image is Windows, this field is not used. +- `user_data` (String) Used to perform automated configuration tasks. Must be sent in base64 format. (between 1 and 65000 characters) ### Read-Only