Skip to content

Commit ff8d03b

Browse files
fix: allow custom urls for products that have location based urls (#708)
1 parent d25ae74 commit ff8d03b

File tree

76 files changed

+601
-191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+601
-191
lines changed

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1-
## 6.6.3 - upcoming release
1+
## 6.6.2 - upcoming release
22
### Features
3+
- Make `location` optional for `certificate_manager` resources and datasources
4+
- Make `location` optional for `vpn` resources and datasources
5+
- Make `location` optional for `nfs` resources and datasources
6+
- Make `location` optional for `kafka` resources and datasources
7+
- Add `IONOS_API_URL_NFS` to set a custom API URL for the NAS/NFS product. `location` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
8+
- Add `IONOS_API_URL_VPN` to set a custom API URL for the VPN product. `location` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
9+
- Add `IONOS_API_URL_CERT` to set a custom API URL for the Certificate Manager product. `location` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
10+
- Add `IONOS_API_URL_KAFKA` to set a custom API URL for the Event Streams product. `location` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
11+
- Add `IONOS_API_URL_MARIADB` to set a custom API URL for the MariaDB product. `location` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
12+
- Add `IONOS_API_URL_INMEMORYDB` to set a custom API URL for InMemoryDB product. `location` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
13+
- Add `IONOS_API_URL_OBJECT_STORAGE` to set a custom API URL for Object Storage product. `region` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
14+
- Add `IONOS_ALLOW_INSECURE` env variable and `insecure` field to allow insecure connections to the API. This is useful for testing purposes only.
315
- Add import tests for VPN Gateway resources
416
- Add `security_groups_ids` to `ionoscloud_server`, `ionoscloud_cube_server`, `ionoscloud_nic`, `ionoscloud_vcpu_server` resources and data sources
517
### New Product - **Network Security Groups**:
@@ -8,10 +20,15 @@
820
- [ionoscloud_nsg_firewallrule](docs/resources/nsg_firewallrule.md)
921
- `Data Sources`:
1022
- [ionoscloud_nsg](docs/data-sources/nsg.md)
23+
### Documentation
24+
- Update documentation for `s3_region` and `IONOS_S3_REGION` variables
25+
1126
## 6.6.2
1227
### Fixes
1328
- Fix empty `ssh_key` used as variable in `ssh_keys` field in `ionoscloud_server` resource
1429
- `hostname` needs to be computed as it gets the value of the server name if not set. Fix for `resource_server`, `resource_vcpu_server` and `resource_cube_server`
30+
- Add import tests for VPN Gateway resources
31+
1532
## 6.6.1
1633

1734
### Features

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ token = var.ionos_token
7676
# endpoint = "custom_cloud_api_url"
7777
# s3_access_key = <your_access_key>
7878
# s3_secret_key = <your_secret_key>
79+
# s3_region = <your_bucket_region>
7980
}
8081
```
8182

@@ -89,6 +90,7 @@ export TF_VAR_ionos_username="username"
8990
export TF_VAR_ionos_password="password"
9091
export TF_VAR_ionos_s3_access_key="accesskey"
9192
export TF_VAR_ionos_s3_secret_key="secretkey"
93+
export TF_VAR_ionos_s3_region="eu-central-3" # optional
9294
```
9395

9496
See the [IonosCloud Provider documentation](https://registry.terraform.io/providers/ionos-cloud/ionoscloud/latest/docs) for more details.
@@ -104,8 +106,9 @@ See the [IonosCloud Provider documentation](https://registry.terraform.io/provid
104106
| `IONOS_LOG_LEVEL` | Specify the Log Level used to log messages. Possible values: Off, Debug, Trace |
105107
| `IONOS_PINNED_CERT` | Specify the SHA-256 public fingerprint here, enables certificate pinning |
106108
| `IONOS_CONTRACT_NUMBER` | Specify the contract number on which you wish to provision. Only valid for reseller accounts, for other types of accounts the header will be ignored |
107-
| `IONOS_S3_ACCESS_KEY` | Specify the access key used to authenticate against the IONOS Object Storage API |
108-
| `IONOS_S3_SECRET_KEY` | Specify the secret key used to authenticate against the IONOS Object Storage API |
109+
| `IONOS_S3_ACCESS_KEY` | Specify the access key used to authenticate against the IONOS Object Storage API |
110+
| `IONOS_S3_SECRET_KEY` | Specify the secret key used to authenticate against the IONOS Object Storage API |
111+
| `IONOS_S3_REGION` | Region for IONOS Object Storage operations. Default value: eu-central-3. **If you use IONOS_API_URL_OBJECT_STORAGE, `IONOS_S3_REGION` is mandatory** |
109112

110113

111114
## Certificate pinning:

docs/data-sources/dbaas_inmemorydb_replica_set.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ data "ionoscloud_inmemorydb_replicaset" "example" {
3333

3434
* `id` - (Optional) The ID of the InMemoryDB Replica Set.
3535
* `display_name` - (Optional) The display name of the InMemoryDB Replica Set.
36-
* `location` - (Required) The location of the InMemoryDB Replica Set.
36+
* `location` - (Optional) The location of the InMemoryDB Replica Set.
3737

3838
> **Note:** Either `id` or `display_name` must be provided. If none, or both are provided, the datasource will return an error.
3939

docs/data-sources/dbaas_inmemorydb_snapshot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ data "ionoscloud_inmemorydb_snapshot" "example" {
2323
## Argument Reference
2424

2525
* `id` - (Required) The ID of the InMemoryDB Snapshot.
26-
* `location` - (Required) The location of the InMemoryDB Snapshot.
26+
* `location` - (Optional) The location of the InMemoryDB Snapshot.
2727

2828
## Attributes Reference
2929

docs/data-sources/kafka_topic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ data "ionoscloud_kafka_cluster_topic" "example" {
4444
* `id` - (Optional) ID of an existing Kafka Cluster Topic that you want to search for.
4545
* `name` - (Optional) Name of an existing Kafka Cluster Topic that you want to search for.
4646
* `cluster_id` - (Required) ID of the Kafka Cluster that the topic belongs to.
47-
* `location` - (Required) The location of the Kafka Cluster Topic. Must be the same as the location of the Kafka
47+
* `location` - (Optional) The location of the Kafka Cluster Topic. Must be the same as the location of the Kafka
4848
Cluster. Possible values: `de/fra`, `de/txl`
4949

5050
## Attributes Reference

docs/data-sources/nfs_cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ output "cluster_test_output" {
4040

4141
## Argument Reference
4242

43-
* `location` - (Required) The location where the Network File Storage cluster is located.
43+
* `location` - (Optional) The location where the Network File Storage cluster is located.
4444
* `name` - (Optional) Name of the Network File Storage cluster.
4545
* `id` - (Optional) ID of the Network File Storage cluster.
4646
* `partial_match` - (Optional) Whether partial matching is allowed or not when using the name filter. Defaults to `false`.

docs/data-sources/nfs_share.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ output "share_test_output" {
4242

4343
## Argument Reference
4444

45-
- `location` - (Required) The location where the Network File Storage share is located.
45+
- `location` - (Optional) The location where the Network File Storage share is located.
4646
- `cluster_id` - (Required) The ID of the Network File Storage cluster.
4747
- `name` - (Optional) Name of the Network File Storage share.
4848
- `id` - (Optional) ID of the Network File Storage share.

docs/data-sources/vpn_ipsec_gateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ data "ionoscloud_vpn_ipsec_gateway" "example" {
4141

4242
* `id` - (Optional) ID of an existing IPSec Gateway that you want to search for.
4343
* `name` - (Optional) Name of an existing IPSec Gateway that you want to search for.
44-
* `location` - (Required) The location of the IPSec Gateway.
44+
* `location` - (Optional) The location of the IPSec Gateway.
4545

4646
## Attributes Reference
4747

docs/data-sources/vpn_ipsec_tunnel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ data "ionoscloud_vpn_ipsec_gateway" "example" {
4444
* `id` - (Optional) ID of an existing IPSec Gateway Tunnel that you want to search for.
4545
* `name` - (Optional) Name of an existing IPSec Gateway Tunnel that you want to search for.
4646
* `gateway_id` - (Required) The ID of the IPSec Gateway that the tunnel belongs to.
47-
* `location` - (Required) The location of the IPSec Gateway Tunnel.
47+
* `location` - (Optional) The location of the IPSec Gateway Tunnel.
4848

4949
## Attributes reference
5050

docs/data-sources/vpn_wireguard_gateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The following arguments are supported:
3030

3131
- `name` - (Optional)[String] The name of the WireGuard Gateway.
3232
- `id` - (Optional)[String] The ID of the WireGuard Gateway.
33-
- `location` - (Required)[String] The location of the WireGuard Gateway.
33+
- `location` - (Optional)[String] The location of the WireGuard Gateway.
3434

3535
## Attributes Reference
3636

docs/data-sources/vpn_wireguard_peer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ output "vpn_wireguard_peer_public_key" {
3030
The following arguments are supported:
3131

3232
- `gateway_id` - (Required)[String] The ID of the WireGuard Gateway.
33-
- `location` - (Required)[String] The location of the WireGuard Gateway.
33+
- `location` - (Optional)[String] The location of the WireGuard Gateway.
3434
- `name` - (Optional)[String] The name of the WireGuard Peer.
3535
- `id` - (Optional)[String] The ID of the WireGuard Peer.
3636

docs/index.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export TF_VAR_ionos_token="token"
6868
#export TF_VAR_ionos_password="password"
6969
#export TF_VAR_ionos_s3_access_key="accesskey"
7070
#export TF_VAR_ionos_s3_secret_key="secretkey"
71+
#export TF_VAR_ionos_s3_region="region"
7172
```
7273

7374

@@ -95,6 +96,7 @@ provider "ionoscloud" {
9596
# endpoint = "custom_cloud_api_url"
9697
# s3_access_key = <your_access_key>
9798
# s3_secret_key = <your_secret_key>
99+
# s3_region = <your_bucket_region>
98100
}
99101
100102
resource "ionoscloud_datacenter" "main" {
@@ -126,6 +128,8 @@ The following arguments are supported:
126128
- `s3_access_key` - Required for managing IONOS Object Storage resources.
127129

128130
- `s3_secret_key` - Required for managing IONOS Object Storage resources.
131+
-
132+
- `s3_region` - Optional, defines the region of the Object Storage resource.
129133

130134
### Environment Variables
131135

@@ -138,8 +142,9 @@ The following arguments are supported:
138142
| `IONOS_LOG_LEVEL` | Specify the Log Level used to log messages. Possible values: Off, Debug, Trace |
139143
| `IONOS_PINNED_CERT` | Specify the SHA-256 public fingerprint here, enables certificate pinning |
140144
| `IONOS_CONTRACT_NUMBER` | Specify the contract number on which you wish to provision. Only valid for reseller accounts, for other types of accounts the header will be ignored |
141-
| `IONOS_S3_ACCESS_KEY` | Specify the access key used to authenticate against the IONOS Object Storage API |
142-
| `IONOS_S3_SECRET_KEY` | Specify the secret key used to authenticate against the IONOS Object Storage API |
145+
| `IONOS_S3_ACCESS_KEY` | Specify the access key used to authenticate against the IONOS Object Storage API |
146+
| `IONOS_S3_SECRET_KEY` | Specify the secret key used to authenticate against the IONOS Object Storage API |
147+
| `IONOS_S3_REGION` | Region for IONOS Object Storage operations. Default value: eu-central-3. **If you use IONOS_API_URL_OBJECT_STORAGE, `IONOS_S3_REGION` is mandatory** |
143148

144149
## Resource Timeout
145150

docs/resources/certificate_manager_provider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ resource "ionoscloud_auto_certificate_provider" "example" {
3030

3131
* `name` - (Required)[string] The name of the certificate provider.
3232
* `email` - (Required)[string] The email address of the certificate requester.
33-
* `location` - (Required)[string] The location of the provider.
33+
* `location` - (Optional)[string] The location of the provider.
3434
* `server` - (Required)[string] The URL of the certificate provider.
3535
* `external_account_binding` - (Optional)[list] External account binding details.
3636
* `key_id` - (Required)[string] The key ID of the external account binding.

docs/resources/dbaas_inmemorydb_replica_set.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ resource "ionoscloud_inmemorydb_replicaset" "example" {
8282

8383
## Argument Reference
8484
* `display_name` - (Required)[string] The human-readable name of your replica set.
85-
* `location` - (Required)[string] The location of your replica set. Updates to the value of the field force the replica set to be re-created.
85+
* `location` - (Optional)[string] The location of your replica set. Updates to the value of the field force the replica set to be re-created.
8686
* `version` - (Required)[string] The InMemoryDB version of your replica set.
8787
* `replicas` - (Required)[int] The total number of replicas in the replica set (one active and n-1 passive). In case of a standalone instance, the value is 1. In all other cases, the value is > 1. The replicas will not be available as read replicas, they are only standby for a failure of the active instance.
8888
* `resources` - (Required)[object] The resources of the individual replicas.
@@ -119,6 +119,8 @@ resource "ionoscloud_inmemorydb_replicaset" "example" {
119119
* `initial_snapshot_id` - (Optional)[string] The ID of a snapshot to restore the replica set from. If set, the replica set will be created from the snapshot.
120120
* `dns_name` - (Computed)[string] The DNS name pointing to your replica set. Will be used to connect to the active/standalone instance.
121121

122+
> **⚠ NOTE:** `IONOS_API_URL_INMEMORYDB` can be used to set a custom API URL for the resource. `location` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
123+
122124
## Import
123125

124126
Resource DBaaS InMemoryDB Replica Set can be imported using the `replicaset_id` and the `location`, separated by `:`, e.g:

docs/resources/dbaas_mariadb_cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ resource "random_password" "cluster_password" {
103103
* `password` - (Required)[string] The password for a MariaDB user.
104104
* `dns_name` - (Computed)[string] The DNS name pointing to your cluster.
105105

106-
> **⚠ WARNING:** `Location` attribute will become required in the future.
106+
> **⚠ WARNING:** `IONOS_API_URL_MARIADB` can be used to set a custom API URL for the MariaDB Cluster. `location` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
107107
108108
## Import
109109

docs/resources/kafka_cluster.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ resource "ionoscloud_kafka_cluster" "example" {
112112

113113
* `id` - (Computed)[string] The UUID of the Kafka Cluster.
114114
* `name` - (Required)[string] Name of the Kafka Cluster.
115-
* `location` - (Required)[string] The location of the Kafka Cluster. Possible values: `de/fra`, `de/txl`
115+
* `location` - (Optional)[string] The location of the Kafka Cluster. Possible values: `de/fra`, `de/txl`
116116
* `version` - (Required)[string] Version of the Kafka Cluster. Possible values: `3.7.0`
117117
* `size` - (Required)[string] Size of the Kafka Cluster. Possible values: `XS`, `S`
118118
* `connections` - (Required) Connection information of the Kafka Cluster. Minimum items: 1, maximum items: 1.
@@ -122,6 +122,9 @@ resource "ionoscloud_kafka_cluster" "example" {
122122
unavailable IP range: 10.224.0.0/11
123123
* `broker_addresses` - (Computed)[list] IP address and port of cluster brokers.
124124

125+
> **⚠ NOTE:** `IONOS_API_URL_KAFKA` can be used to set a custom API URL for the kafka resource. `location` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
126+
127+
125128
## Import
126129

127130
Kafka Cluster can be imported using the `location` and `kafka cluster id`:

docs/resources/kafka_topic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ resource "ionoscloud_kafka_cluster_topic" "example" {
133133

134134
* `id` - (Computed)[string] The UUID of the Kafka Cluster Topic.
135135
* `name` - (Required)[string] Name of the Kafka Cluster.
136-
* `location` - (Required)[string] The location of the Kafka Cluster Topic. Possible values: `de/fra`, `de/txl`
136+
* `location` - (Optional)[string] The location of the Kafka Cluster Topic. Possible values: `de/fra`, `de/txl`
137137
* `cluster_id` - (Required)[string] ID of the Kafka Cluster that the topic belongs to.
138138
* `replication_factor` - (Optional)[int] The number of replicas of the topic. The replication factor determines how many
139139
copies of the topic are stored on different brokers. The replication factor must be less than or equal to the number

docs/resources/nfs_cluster.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ resource "ionoscloud_nfs_cluster" "example" {
125125
The following arguments are supported:
126126

127127
- `name` - (Required) The name of the Network File Storage cluster.
128-
- `location` - (Required) The location where the Network File Storage cluster is located.
128+
- `location` - (Optional) The location where the Network File Storage cluster is located.
129129
- `de/fra` - Frankfurt
130130
- `de/txl` - Berlin
131131
- `size` - (Required) The size of the Network File Storage cluster in TiB. Note that the cluster size cannot be reduced after provisioning. This value determines the billing fees. Default is `2`. The minimum value is `2` and the maximum value is `42`.
@@ -135,6 +135,8 @@ The following arguments are supported:
135135
- `datacenter_id` - (Required) The ID of the datacenter where the Network File Storage cluster is located.
136136
- `ip_address` - (Required) The IP address and prefix of the Network File Storage cluster. The IP address can be either IPv4 or IPv6. The IP address has to be given with CIDR notation.
137137
- `lan` - (Required) The Private LAN to which the Network File Storage cluster must be connected.
138+
-
139+
> **⚠ NOTE:** `IONOS_API_URL_NFS` can be used to set a custom API URL for the resource. `location` field needs to be empty, otherwise it will override the custom API URL. Setting `token` or `IONOS_API_URL` does not have any effect.
138140
139141
## Import
140142

docs/resources/nfs_share.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ resource "ionoscloud_nfs_share" "example" {
7171

7272
The following arguments are supported:
7373

74-
- `location` - (Required) The location of the Network File Storage Cluster.
74+
- `location` - (Optional) The location of the Network File Storage Cluster.
7575
- `cluster_id` - (Required) The ID of the Network File Storage Cluster.
7676
- `name` - (Required) The directory being exported.
7777
- `quota` - (Optional) The quota in MiB for the export. The quota can restrict the amount of data that can be stored within the export. The quota can be disabled using `0`. Default is `0`.

docs/resources/vpn_ipsec_gateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ resource "ionoscloud_vpn_ipsec_gateway" "example" {
128128
## Argument reference
129129

130130
* `name` - (Required)[string] The name of the IPSec Gateway.
131-
* `location` - (Required)[string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit,
131+
* `location` - (Optional)[string] The location of the IPSec Gateway. Supported locations: de/fra, de/txl, es/vit,
132132
gb/lhr, us/ewr, us/las, us/mci, fr/par
133133
* `gateway_ip` - (Required)[string] Public IP address to be assigned to the gateway. Note: This must be an IP address in
134134
the same datacenter as the connections.

docs/resources/vpn_ipsec_tunnel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ resource "ionoscloud_vpn_ipsec_tunnel" "example" {
200200
## Argument reference
201201

202202
* `name` - (Required)[string] The name of the IPSec Gateway Tunnel.
203-
* `location` - (Required)[string] The location of the IPSec Gateway Tunnel. Supported locations: de/fra, de/txl, es/vit,
203+
* `location` - (Optional)[string] The location of the IPSec Gateway Tunnel. Supported locations: de/fra, de/txl, es/vit,
204204
gb/lhr, us/ewr, us/las, us/mci, fr/par
205205
* `gateway_id` - (Required)[string] The ID of the IPSec Gateway that the tunnel belongs to.
206206
* `description` - (Optional)[string] The human-readable description of your IPSec Gateway Tunnel.

0 commit comments

Comments
 (0)