-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CaaS Registration * Updates * Addressing review comments
- Loading branch information
Showing
8 changed files
with
203 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright 2020-2022 Hewlett Packard Enterprise Development LP | ||
|
||
terraform { | ||
required_providers { | ||
hpegl = { | ||
source = "HPE/hpegl" | ||
version = ">= 0.1.0" | ||
} | ||
} | ||
} | ||
|
||
provider hpegl { | ||
caas { | ||
api_url = "https://mcaas.intg.hpedevops.net/mcaas" | ||
} | ||
} | ||
|
||
data "hpegl_caas_site" "blr" { | ||
name = "BLR" | ||
space_id = "" | ||
} | ||
|
||
data "hpegl_caas_cluster_blueprint" "bp" { | ||
name = "demo" | ||
site_id = data.hpegl_caas_site.blr.id | ||
} | ||
|
||
resource hpegl_caas_cluster test { | ||
name = "tf-test" | ||
blueprint_id = data.hpegl_caas_cluster_blueprint.bp.id | ||
site_id = data.hpegl_caas_site.blr.id | ||
space_id = "" | ||
} |
58 changes: 58 additions & 0 deletions
58
examples/resources/hpegl_caas_cluster_blueprint/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright 2022 Hewlett Packard Enterprise Development LP | ||
|
||
terraform { | ||
required_providers { | ||
hpegl = { | ||
source = "HPE/hpegl" | ||
version = ">= 0.1.0" | ||
} | ||
} | ||
} | ||
|
||
provider hpegl { | ||
caas { | ||
api_url = "https://mcaas.intg.hpedevops.net/mcaas" | ||
} | ||
} | ||
|
||
data "hpegl_caas_site" "blr" { | ||
name = "BLR" | ||
space_id = "" | ||
} | ||
|
||
data "hpegl_caas_machine_blueprint" "mbcontrolplane" { | ||
name = "standard-master" | ||
site_id = data.hpegl_caas_site.blr.id | ||
} | ||
|
||
data "hpegl_caas_machine_blueprint" "mbworker" { | ||
name = "standard-worker" | ||
site_id = data.hpegl_caas_site.blr.id | ||
} | ||
|
||
data "hpegl_caas_cluster_provider" "clusterprovider" { | ||
name = "ecp" | ||
site_id = data.hpegl_caas_site.blr.id | ||
} | ||
|
||
resource hpegl_caas_cluster_blueprint testbp { | ||
name = "tf-cluster-bp" | ||
k8s_version = data.hpegl_caas_cluster_provider.clusterprovider.k8s_versions[0] | ||
default_storage_class = "" | ||
site_id = data.hpegl_caas_site.blr.id | ||
cluster_provider = "" | ||
control_plane_nodes = { | ||
machine_blueprint_id = data.hpegl_caas_machine_blueprint.mbcontrolplane.id | ||
count = "" | ||
} | ||
worker_nodes { | ||
name = "" | ||
machine_blueprint_id = data.hpegl_caas_machine_blueprint.mbworker.id | ||
count = "" | ||
} | ||
worker_nodes { | ||
name = "" | ||
machine_blueprint_id = data.hpegl_caas_machine_blueprint.mbworker.id | ||
count = "" | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
examples/resources/hpegl_caas_cluster_provider/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2022 Hewlett Packard Enterprise Development LP | ||
|
||
terraform { | ||
required_providers { | ||
hpegl = { | ||
source = "HPE/hpegl" | ||
version = ">= 0.1.0" | ||
} | ||
} | ||
} | ||
|
||
provider hpegl { | ||
caas { | ||
api_url = "https://mcaas.intg.hpedevops.net/mcaas" | ||
} | ||
} | ||
|
||
data "hpegl_caas_site" "blr" { | ||
name = "BLR" | ||
space_id = "" | ||
} | ||
|
||
data "hpegl_caas_cluster_provider" "clusterprovider" { | ||
name = "ecp" | ||
site_id = data.hpegl_caas_site.blr.id | ||
} | ||
|
||
output "cluster_provider" { | ||
description = "The cluster provider response" | ||
value = data.hpegl_caas_cluster_provider.clusterprovider.* | ||
} |
33 changes: 33 additions & 0 deletions
33
examples/resources/hpegl_caas_machine_blueprint/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright 2020-2022 Hewlett Packard Enterprise Development LP | ||
|
||
terraform { | ||
required_providers { | ||
hpegl = { | ||
source = "HPE/hpegl" | ||
version = ">= 0.1.0" | ||
} | ||
} | ||
} | ||
|
||
provider hpegl { | ||
caas { | ||
api_url = "https://mcaas.intg.hpedevops.net/mcaas" | ||
} | ||
} | ||
|
||
data "hpegl_caas_site" "blr" { | ||
name = "BLR" | ||
space_id = "" | ||
} | ||
|
||
resource hpegl_caas_machine_blueprint test { | ||
name = "" | ||
site_id = data.hpegl_caas_site.blr.id | ||
machine_roles = ["controlplane"] | ||
machine_provider = "vmaas" | ||
os_image = "sles-custom" | ||
os_version = "" | ||
compute_type = "" | ||
size = "" | ||
storage_type = "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters