-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cce node pool resource #511
Conversation
604fd4b
to
f8c0956
Compare
"eip_ids": { | ||
Type: schema.TypeSet, | ||
Optional: true, | ||
ForceNew: true, | ||
Elem: &schema.Schema{Type: schema.TypeString}, | ||
Set: schema.HashString, | ||
ConflictsWith: []string{ | ||
"eip_id", "iptype", "bandwidth_charge_mode", "bandwidth_size", "sharetype", | ||
}, | ||
Deprecated: "use eip_id instead", | ||
}, | ||
"eip_id": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
ForceNew: true, | ||
ConflictsWith: []string{ | ||
"eip_ids", "iptype", "bandwidth_charge_mode", "bandwidth_size", "sharetype", | ||
}, | ||
}, | ||
"bandwidth_charge_mode": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
ForceNew: true, | ||
ConflictsWith: []string{"eip_ids", "eip_id"}, | ||
}, | ||
"iptype": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
ForceNew: true, | ||
RequiredWith: []string{ | ||
"iptype", "bandwidth_size", "sharetype", | ||
}, | ||
}, | ||
"sharetype": { | ||
Type: schema.TypeString, | ||
Optional: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"eip_ids", "iptype", "bandwidth_charge_mode", "bandwidth_size" and "sharetype" are not necessary for now.
"iptype", "bandwidth_size", "sharetype", | ||
}, | ||
}, | ||
"billing_mode": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the billing_mod can only be 0 for nodepool, so we can mark it as a computed attribute.
bda8a36
to
ea9ba76
Compare
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAjpC1hwiOCCmKEWxJ4qzTTsJbKzndLo1BCz5PcwtUnflmU+gHJtWMZKpuEGVi29h0A/+ydKek1O18k10Ff+4tyFjiHDQAT9+OfgWf7+b1yK+qDip3X1C0UPMbwHlTfSGWLGZquwhvEFx9k3h/M+VtMvwR1lJ9LUyTAImnNjWG7TAIPmui30HvM2UiFEmqkr4ijq45MyX2+fLIePLRIFuu1p4whjHAQYufqyno3BS48icQb4p6iVEZPo4AE2o9oIyQvj2mx4dk5Y8CgSETOZTYDOR3rU2fZTRDRgPJDH9FWvQjF5tA0p3d9CoWWd2s6GKKbfoUIi8R/Db1BSPJwkqB jrp-hp-pc" | ||
} | ||
|
||
resource "huaweicloud_cce_cluster_v3" "test" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use huaweicloud_cce_cluster
instead of it.
website/docs/r/cce_node_pool.html.md
Outdated
flavor_id = "s3.large.4" | ||
availability_zone = var.availability_zone | ||
key_pair = var.keypair | ||
region = "cn-east-3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
region
is not supported?
website/docs/r/cce_node_pool.html.md
Outdated
|
||
* `os` - (Optional) Operating System of the node. Changing this parameter will create a new resource. | ||
- For VM nodes, clusters of v1.13 and later support *EulerOS 2.5* and *CentOS 7.6*. | ||
- For BMS nodes purchased in the yearly/monthly billing mode, only *EulerOS 2.3* is supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node pools only support VM nodes cluster, so the supported OS are EulerOS 2.5 and CentOS 7.6
ac4f0aa
to
09c3a5a
Compare
make testacc TEST=./huaweicloud/ TESTARGS='-run TestAccCCENodePool_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/ -v -run TestAccCCENodePool_basic -timeout 360m
=== RUN TestAccCCENodePool_basic
--- PASS: TestAccCCENodePool_basic (837.03s)
PASS
ok github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud 837.063s