Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Question
I have an issue with using a multi nic instance_template to create an instance_group for auto-scaling feature in VPC. It generates an error that is at the end of this page.
Community Note
Question
I have an issue with using a multi nic instance_template to create an instance_group for auto-scaling feature in VPC. It generates an error that is at the end of this page.
New or Affected Resource(s) or Datasource(s)
Potential Terraform Configuration
resource "ibm_is_instance_template" "vnf_instance_template" { name = "vnf-instance-template" image = ibm_is_image.vnf_custom_image.id profile = "bx2-8x32" resource_group = data.ibm_resource_group.group.id
primary_network_interface { subnet = ibm_is_subnet.vnf_subnet[0].id security_groups = [ibm_is_security_group.pub_alb_security_group.id] allow_ip_spoofing = true } network_interfaces { name = "eth1" security_groups = [ibm_is_security_group.pub_alb_security_group.id] subnet = ibm_is_subnet.web_subnet[0].id allow_ip_spoofing = true }
vpc = ibm_is_vpc.vpc.id zone = "${var.region}-1" keys = [data.ibm_is_ssh_key.sshkey.id] user_data = var.enable_end_to_end_encryption ? file("./scripts/setup_vnf.sh") : file("./scripts/setup_vnf.sh" ) } resource "ibm_is_instance_group" "vnf_instance_group" { name = "${var.basename}-vnf-instance" instance_template = ibm_is_instance_template.vnf_instance_template.id instance_count = 1 subnets = [ibm_is_subnet.vnf_subnet[0].id,ibm_is_subnet.web_subnet[0].id]
load_balancer = ibm_is_lb.pub_alb.id
load_balancer_pool = element(split("/", ibm_is_lb_pool.pub_alb_pool.id), 1)
application_port = var.enable_end_to_end_encryption ? 443 : 80
resource_group = data.ibm_resource_group.group.id
depends_on = [ibm_is_lb_listener.pub_alb_listner, ibm_is_lb_pool.pub_alb_pool, ibm_is_lb.pub_alb]
//User can configure timeouts timeouts { create = "15m" delete = "15m" update = "10m" } }
resource "ibm_is_instance_group_manager" "vnf_instance_group_manager" { name = "${var.basename}-instance-group-manager" aggregation_window = 90 instance_group = ibm_is_instance_group.vnf_instance_group.id cooldown = 120 manager_type = "autoscale" enable_manager = true min_membership_count = 1 max_membership_count = 2 }
resource "ibm_is_instance_group_manager_policy" "cpuPolicy" { instance_group = ibm_is_instance_group.vnf_instance_group.id instance_group_manager = ibm_is_instance_group_manager.vnf_instance_group_manager.manager_id metric_type = "cpu" metric_value = 10 policy_type = "target" name = "${var.basename}-instance-group-manager-policy" }
Copy-paste your Terraform configurations here - for large Terraform configs,
please use a service like Dropbox and share a link to the ZIP file. For
security, you can also encrypt the files using our GPG public key.
References
0000
ibm_is_instance_group.vnf_instance_group: Creating... ╷ │ Error: Error Creating InstanceGroup: Provided instance_template is invalid │ { │ "StatusCode": 400, │ "Headers": { │ "Cache-Control": [ │ "max-age=0, no-cache, no-store, must-revalidate" │ ], │ "Cf-Cache-Status": [ │ "DYNAMIC" │ ], │ "Cf-Ray": [ │ "6dea49a878ea2c5c-ORD" │ ], │ "Content-Length": [ │ "209" │ ], │ "Content-Type": [ │ "application/json; charset=utf-8" │ ], │ "Date": [ │ "Wed, 16 Feb 2022 22:42:19 GMT" │ ], │ "Expect-Ct": [ │ "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"" │ ], │ "Expires": [ │ "-1" │ ], │ "Pragma": [ │ "no-cache" │ ], │ "Server": [ │ "cloudflare" │ ], │ "Strict-Transport-Security": [ │ "max-age=31536000; includeSubDomains" │ ], │ "Vary": [ │ "Accept-Encoding" │ ], │ "X-Content-Type-Options": [ │ "nosniff" │ ], │ "X-Request-Id": [ │ "c5e71fe4-be0a-469b-9f61-38834e04dfae" │ ], │ "X-Xss-Protection": [ │ "1; mode=block" │ ] │ }, │ "Result": { │ "errors": [ │ { │ "code": "admission_instance_template_invalid", │ "message": "Provided instance_template is invalid", │ "target": { │ "name": "instance_template", │ "type": "field" │ } │ } │ ], │ "trace": "c5e71fe4-be0a-469b-9f61-38834e04dfae" │ }, │ "RawResult": null │ } │ │ │ with ibm_is_instance_group.vnf_instance_group, │ on main.tf line 313, in resource "ibm_is_instance_group" "vnf_instance_group": │ 313: resource "ibm_is_instance_group" "vnf_instance_group" {