Code Monkey home page Code Monkey logo

alicloud-aa-egress-route-failover's People

Contributors

joel-cripps avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

alicloud-aa-egress-route-failover's Issues

Error: [ERROR] terraform-provider-alicloud/alicloud/resource_alicloud_fc_function.go:173: Resource alicloud_fc_function CreateFunction Failed!!! [SDK fc-go-sdk ERROR]: in resource "alicloud_fc_function" "fortigate-AA-Failover

`
Treid to deploy A-A on default region us-east-1 . failed on resource create
resource "alicloud_fc_function" "fortigate-AA-Failover

shell@Alicloud:~/fortigate-ha$ terraform apply -var instance=ecs.c5 -var split_egress_traffic=true -var region=us-east-1
data.alicloud_images.ecs_image: Refreshing state...
data.alicloud_account.current: Refreshing state...
data.alicloud_regions.current_region_ds: Refreshing state...
data.alicloud_instance_types.types_ds: Refreshing state...
data.alicloud_zones.default: Refreshing state...

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:

  • create
    <= read (data resources)

Terraform will perform the following actions:

data.template_file.setupPrimary will be read during apply

(config refers to values not yet known)

<= data "template_file" "setupPrimary" {
+ id = (known after apply)
+ rendered = (known after apply)
+ template = "config system global\n set hostname "PrimaryFortiGate"\n set admin-sport 8443\nend\nconfig system interface\n edit "port1"\n set vdom "root"\n set mode dhcp\n set allowaccess ping https ssh fgfm\n set type physical\n set snmp-index 1\n next\n edit "port2"\n set vdom "root"\n set mode dhcp\n set defaultgw enable\n set allowaccess ping https ssh fgfm\n set type physical\n next\nend\nconfig firewall address\n edit "EgressProtected"\n set subnet 172.16.0.0 255.255.0.0\n next\nend\nconfig firewall policy\n edit 1\n set name "Egress"\n set srcintf "port1"\n set dstintf "port1"\n set srcaddr "EgressProtected"\n set dstaddr "all"\n set action accept\n set schedule "always"\n set service "ALL"\n set fsso disable\n set nat enable\n next\nend\nconfig system link-monitor\n edit "fgt-monitor"\n set srcintf "port1"\n set server "172.16.8.100"\n set update-cascade-interface disable\n set update-static-route disable\n next\nend\nconfig system automation-action\n edit "LinkStatus"\n set action-type alicloud-function\n set alicloud-account-id "${account_id}"\n set alicloud-region ${region}\n set alicloud-version "2016-08-15"\n set alicloud-service "${function_service}"\n set alicloud-function "${function_id}"\n next\nend\nconfig system automation-trigger\n edit "aliLinkStatus"\n set event-type event-log\n set logid 22922\n next\n end\nconfig system automation-stitch\n edit "aliLinkStatus"\n set trigger "aliLinkStatus"\n set action "LinkStatus"\n next\nend\n"
+ vars = {
+ "account_id" = "!!!removed"
+ "function_id" = (known after apply)
+ "function_service" = (known after apply)
+ "region" = "us-east-1"
}
}

data.template_file.setupSecondary will be read during apply

(config refers to values not yet known)

<= data "template_file" "setupSecondary" {
+ id = (known after apply)
+ rendered = (known after apply)
+ template = "\nconfig system global\n set hostname "SecondaryFortigate"\n set admin-sport 8443\nend\nconfig system interface\n edit "port1"\n set vdom "root"\n set mode dhcp\n set allowaccess ping https ssh fgfm\n set type physical\n set snmp-index 1\n next\n edit "port2"\n set vdom "root"\n set mode dhcp\n set defaultgw enable\n set allowaccess ping https ssh fgfm\n set type physical\n next\nend\nconfig firewall address\n edit "EgressProtected"\n set subnet 172.16.0.0 255.255.0.0\n next\nend\nconfig firewall policy\n edit 1\n set name "Egress"\n set srcintf "port1"\n set dstintf "port1"\n set srcaddr "EgressProtected"\n set dstaddr "all"\n set action accept\n set schedule "always"\n set service "ALL"\n set fsso disable\n set nat enable\n next\nend\nconfig system link-monitor\n edit "fgt-monitor"\n set srcintf "port1"\n set server "172.16.0.100"\n set update-cascade-interface disable\n set update-static-route disable\n next\nend\nconfig system automation-action\n edit "LinkStatus"\n set action-type alicloud-function\n set alicloud-account-id "${account_id}"\n set alicloud-region ${region}\n set alicloud-version "2016-08-15"\n set alicloud-service "${function_service}"\n set alicloud-function "${function_id}"\n next\nend\nconfig system automation-trigger\n edit "aliLinkStatus"\n set event-type event-log\n set logid 22922\n next\n end\nconfig system automation-stitch\n edit "aliLinkStatus"\n set trigger "aliLinkStatus"\n set action "LinkStatus"\n next\nend"
+ vars = {
+ "account_id" = "!!!removed"
+ "function_id" = (known after apply)
+ "function_service" = (known after apply)
+ "region" = "us-east-1"
}
}

alicloud_fc_function.fortigate-AA-Failover will be created

  • resource "alicloud_fc_function" "fortigate-AA-Failover" {
    • code_checksum = (known after apply)
    • description = "FortiGate aafailover - AliCloud Created by Terraform"
    • environment_variables = (known after apply)
    • filename = "./dist/failoverAAindex.zip"
    • function_id = (known after apply)
    • handler = "index.main"
    • id = (known after apply)
    • last_modified = (known after apply)
    • memory_size = 512
    • name = (known after apply)
    • runtime = "nodejs8"
    • service = (known after apply)
    • timeout = 500
      }

alicloud_fc_function.fortigate-callHealthCheck will be created

  • resource "alicloud_fc_function" "fortigate-callHealthCheck" {
    • code_checksum = (known after apply)
    • description = "FortiGate AA-Failover - AliCloud Created by Terraform"
    • environment_variables = (known after apply)
    • filename = "./dist/callHealthCheck.zip"
    • function_id = (known after apply)
    • handler = "callHealthCheck.callHealthCheck"
    • id = (known after apply)
    • last_modified = (known after apply)
    • memory_size = 512
    • name = (known after apply)
    • runtime = "nodejs8"
    • service = (known after apply)
    • timeout = 500
      }

alicloud_fc_service.fortigate-failover-service will be created

  • resource "alicloud_fc_service" "fortigate-failover-service" {
    • description = "Created by terraform"

    • id = (known after apply)

    • internet_access = true

    • last_modified = (known after apply)

    • name = (known after apply)

    • role = (known after apply)

    • service_id = (known after apply)

    • log_config {

      • logstore = (known after apply)
      • project = (known after apply)
        }
    • vpc_config {

      • security_group_id = (known after apply)
      • vpc_id = (known after apply)
      • vswitch_ids = (known after apply)
        }
        }

alicloud_fc_trigger.httptrigger will be created

  • resource "alicloud_fc_trigger" "httptrigger" {
    • config = (known after apply)
    • function = (known after apply)
    • id = (known after apply)
    • last_modified = (known after apply)
    • name = "HTTPTrigger"
    • service = (known after apply)
    • trigger_id = (known after apply)
    • type = "http"
      }

alicloud_fc_trigger.timer will be created

  • resource "alicloud_fc_trigger" "timer" {
    • config = (known after apply)
    • function = (known after apply)
    • id = (known after apply)
    • last_modified = (known after apply)
    • name = "CronTrigger"
    • service = (known after apply)
    • trigger_id = (known after apply)
    • type = "timer"
      }

alicloud_instance.PrimaryFortigate will be created

  • resource "alicloud_instance" "PrimaryFortigate" {
    • availability_zone = "us-east-1a"

    • credit_specification = (known after apply)

    • deletion_protection = false

    • dry_run = false

    • host_name = (known after apply)

    • id = (known after apply)

    • image_id = "m-0xif6xxwhjlqhoaqjrr6"

    • instance_charge_type = "PostPaid"

    • instance_name = (known after apply)

    • instance_type = "ecs.c5.large"

    • internet_charge_type = "PayByTraffic"

    • internet_max_bandwidth_in = 200

    • internet_max_bandwidth_out = 100

    • key_name = (known after apply)

    • private_ip = "172.16.0.100"

    • public_ip = (known after apply)

    • role_name = (known after apply)

    • security_groups = (known after apply)

    • spot_strategy = "NoSpot"

    • status = (known after apply)

    • subnet_id = (known after apply)

    • system_disk_category = "cloud_efficiency"

    • system_disk_size = 40

    • user_data = (known after apply)

    • volume_tags = (known after apply)

    • vswitch_id = (known after apply)

    • data_disks {

      • category = "cloud_ssd"
      • delete_with_instance = true
      • encrypted = false
      • size = 30
        }
        }

alicloud_instance.SecondaryFortigate will be created

  • resource "alicloud_instance" "SecondaryFortigate" {
    • availability_zone = "us-east-1b"

    • credit_specification = (known after apply)

    • deletion_protection = false

    • dry_run = false

    • host_name = (known after apply)

    • id = (known after apply)

    • image_id = "m-0xif6xxwhjlqhoaqjrr6"

    • instance_charge_type = "PostPaid"

    • instance_name = (known after apply)

    • instance_type = "ecs.c5.large"

    • internet_charge_type = "PayByTraffic"

    • internet_max_bandwidth_in = 200

    • internet_max_bandwidth_out = 100

    • key_name = (known after apply)

    • private_ip = "172.16.8.100"

    • public_ip = (known after apply)

    • role_name = (known after apply)

    • security_groups = (known after apply)

    • spot_strategy = "NoSpot"

    • status = (known after apply)

    • subnet_id = (known after apply)

    • system_disk_category = "cloud_efficiency"

    • system_disk_size = 40

    • user_data = (known after apply)

    • volume_tags = (known after apply)

    • vswitch_id = (known after apply)

    • data_disks {

      • category = "cloud_ssd"
      • delete_with_instance = true
      • encrypted = false
      • size = 30
        }
        }

alicloud_log_project.aafailoverLogging will be created

  • resource "alicloud_log_project" "aafailoverLogging" {
    • description = "created by terraform"
    • id = (known after apply)
    • name = (known after apply)
      }

alicloud_log_store.aafailoverLogging-Store will be created

  • resource "alicloud_log_store" "aafailoverLogging-Store" {
    • append_meta = true
    • auto_split = true
    • enable_web_tracking = false
    • id = (known after apply)
    • max_split_shard_count = 60
    • name = (known after apply)
    • project = (known after apply)
    • retention_period = 15
    • shard_count = 3
    • shards = (known after apply)
      }

alicloud_log_store_index.log_store_index will be created

  • resource "alicloud_log_store_index" "log_store_index" {
    • id = (known after apply)

    • logstore = (known after apply)

    • project = (known after apply)

    • field_search {

      • case_sensitive = false
      • enable_analytics = true
      • include_chinese = false
      • name = "test"
      • type = "long"
        }
    • full_text {

      • case_sensitive = true
      • include_chinese = false
      • token = " #$%^*\r\n\t"
        }
        }

alicloud_network_interface.PrimaryFortiGateInterface will be created

  • resource "alicloud_network_interface" "PrimaryFortiGateInterface" {
    • id = (known after apply)
    • mac = (known after apply)
    • name = (known after apply)
    • private_ip = (known after apply)
    • private_ips = (known after apply)
    • private_ips_count = (known after apply)
    • security_groups = (known after apply)
    • vswitch_id = (known after apply)
      }

alicloud_network_interface.SecondaryFortigateInterface will be created

  • resource "alicloud_network_interface" "SecondaryFortigateInterface" {
    • id = (known after apply)
    • mac = (known after apply)
    • name = (known after apply)
    • private_ip = (known after apply)
    • private_ips = (known after apply)
    • private_ips_count = (known after apply)
    • security_groups = (known after apply)
    • vswitch_id = (known after apply)
      }

alicloud_network_interface_attachment.PrimaryFortigateattachment will be created

  • resource "alicloud_network_interface_attachment" "PrimaryFortigateattachment" {
    • id = (known after apply)
    • instance_id = (known after apply)
    • network_interface_id = (known after apply)
      }

alicloud_network_interface_attachment.SecondaryFortigateAttachment will be created

  • resource "alicloud_network_interface_attachment" "SecondaryFortigateAttachment" {
    • id = (known after apply)
    • instance_id = (known after apply)
    • network_interface_id = (known after apply)
      }

alicloud_ram_policy.policy will be created

  • resource "alicloud_ram_policy" "policy" {
    • attachment_count = (known after apply)

    • description = "FortiGate aafailover Logging Policy"

    • document = (known after apply)

    • force = true

    • id = (known after apply)

    • name = (known after apply)

    • type = (known after apply)

    • version = "1"

    • statement {

      • action = (known after apply)
      • effect = (known after apply)
      • resource = (known after apply)
        }
        }

alicloud_ram_policy.policy_vpc will be created

  • resource "alicloud_ram_policy" "policy_vpc" {
    • attachment_count = (known after apply)

    • description = "FortiGate aafailover VPC Policy - Used to bind vpc to function compute during automated deploy"

    • document = jsonencode(
      {
      + Statement = [
      + {
      + Action = [
      + "vpc:DescribeVSwitchAttributes",
      ]
      + Effect = "Allow"
      + Resource = ""
      },
      + {
      + Action = [
      + "ecs:CreateNetworkInterface",
      + "ecs:DeleteNetworkInterface",
      + "ecs:DescribeNetworkInterfaces",
      + "ecs:CreateNetworkInterfacePermission",
      + "ecs:DescribeNetworkInterfacePermissions",
      + "ecs:DeleteNetworkInterfacePermission",
      ]
      + Effect = "Allow"
      + Resource = "
      "
      },
      ]
      + Version = "1"
      }
      )

    • force = true

    • id = (known after apply)

    • name = (known after apply)

    • type = (known after apply)

    • version = "1"

    • statement {

      • action = (known after apply)
      • effect = (known after apply)
      • resource = (known after apply)
        }
        }

alicloud_ram_role.ram_role will be created

  • resource "alicloud_ram_role" "ram_role" {
    • arn = (known after apply)
    • description = "this is a role test."
    • document = jsonencode(
      {
      + Statement = [
      + {
      + Action = "sts:AssumeRole"
      + Effect = "Allow"
      + Principal = {
      + Service = [
      + "fc.aliyuncs.com",
      ]
      }
      },
      ]
      + Version = "1"
      }
      )
    • force = true
    • id = (known after apply)
    • name = (known after apply)
    • ram_users = (known after apply)
    • role_id = (known after apply)
    • services = (known after apply)
    • version = "1"
      }

alicloud_ram_role_policy_attachment.attach will be created

  • resource "alicloud_ram_role_policy_attachment" "attach" {
    • id = (known after apply)
    • policy_name = (known after apply)
    • policy_type = (known after apply)
    • role_name = (known after apply)
      }

alicloud_ram_role_policy_attachment.attach_vpc will be created

  • resource "alicloud_ram_role_policy_attachment" "attach_vpc" {
    • id = (known after apply)
    • policy_name = (known after apply)
    • policy_type = (known after apply)
    • role_name = (known after apply)
      }

alicloud_route_entry.custom_route_table_egress[0] will be created

  • resource "alicloud_route_entry" "custom_route_table_egress" {
    • destination_cidrblock = "0.0.0.0/0"
    • id = (known after apply)
    • name = (known after apply)
    • nexthop_id = (known after apply)
    • nexthop_type = "NetworkInterface"
    • route_table_id = (known after apply)
    • router_id = (known after apply)
      }

alicloud_route_entry.custom_route_table_egress[1] will be created

  • resource "alicloud_route_entry" "custom_route_table_egress" {
    • destination_cidrblock = "0.0.0.0/0"
    • id = (known after apply)
    • name = (known after apply)
    • nexthop_id = (known after apply)
    • nexthop_type = "NetworkInterface"
    • route_table_id = (known after apply)
    • router_id = (known after apply)
      }

alicloud_route_table.custom_route_tables[0] will be created

  • resource "alicloud_route_table" "custom_route_tables" {
    • description = "FortiGate Egress route tables, created with terraform."
    • id = (known after apply)
    • name = (known after apply)
    • vpc_id = (known after apply)
      }

alicloud_route_table.custom_route_tables[1] will be created

  • resource "alicloud_route_table" "custom_route_tables" {
    • description = "FortiGate Egress route tables, created with terraform."
    • id = (known after apply)
    • name = (known after apply)
    • vpc_id = (known after apply)
      }

alicloud_route_table_attachment.custom_route_table_attachment_private[0] will be created

  • resource "alicloud_route_table_attachment" "custom_route_table_attachment_private" {
    • id = (known after apply)
    • route_table_id = (known after apply)
    • vswitch_id = (known after apply)
      }

alicloud_route_table_attachment.custom_route_table_attachment_private[1] will be created

  • resource "alicloud_route_table_attachment" "custom_route_table_attachment_private" {
    • id = (known after apply)
    • route_table_id = (known after apply)
    • vswitch_id = (known after apply)
      }

alicloud_security_group.SecGroup will be created

  • resource "alicloud_security_group" "SecGroup" {
    • description = "New security group"
    • id = (known after apply)
    • inner_access = (known after apply)
    • inner_access_policy = (known after apply)
    • name = (known after apply)
    • security_group_type = "normal"
    • vpc_id = (known after apply)
      }

alicloud_security_group.SecGroup_FC will be created

  • resource "alicloud_security_group" "SecGroup_FC" {
    • description = "New security group"
    • id = (known after apply)
    • inner_access = (known after apply)
    • inner_access_policy = (known after apply)
    • name = (known after apply)
    • security_group_type = "normal"
    • vpc_id = (known after apply)
      }

alicloud_security_group_rule.allow_a_class_ingress will be created

  • resource "alicloud_security_group_rule" "allow_a_class_ingress" {
    • cidr_ip = "10.10.0.0/8"
    • id = (known after apply)
    • ip_protocol = "tcp"
    • nic_type = "intranet"
    • policy = "accept"
    • port_range = "1/65535"
    • priority = 1
    • security_group_id = (known after apply)
    • type = "ingress"
      }

alicloud_security_group_rule.allow_all_tcp_egress will be created

  • resource "alicloud_security_group_rule" "allow_all_tcp_egress" {
    • cidr_ip = "0.0.0.0/0"
    • id = (known after apply)
    • ip_protocol = "tcp"
    • nic_type = "intranet"
    • policy = "accept"
    • port_range = "1/65535"
    • priority = 1
    • security_group_id = (known after apply)
    • type = "egress"
      }

alicloud_security_group_rule.allow_all_tcp_egress_FC will be created

  • resource "alicloud_security_group_rule" "allow_all_tcp_egress_FC" {
    • cidr_ip = "0.0.0.0/0"
    • id = (known after apply)
    • ip_protocol = "tcp"
    • nic_type = "intranet"
    • policy = "accept"
    • port_range = "1/65535"
    • priority = 1
    • security_group_id = (known after apply)
    • type = "egress"
      }

alicloud_security_group_rule.allow_all_tcp_ingress will be created

  • resource "alicloud_security_group_rule" "allow_all_tcp_ingress" {
    • cidr_ip = "0.0.0.0/0"
    • id = (known after apply)
    • ip_protocol = "tcp"
    • nic_type = "intranet"
    • policy = "accept"
    • port_range = "1/65535"
    • priority = 1
    • security_group_id = (known after apply)
    • type = "ingress"
      }

alicloud_security_group_rule.allow_b_class_ingress will be created

  • resource "alicloud_security_group_rule" "allow_b_class_ingress" {
    • cidr_ip = "172.16.0.0/12"
    • id = (known after apply)
    • ip_protocol = "tcp"
    • nic_type = "intranet"
    • policy = "accept"
    • port_range = "1/65535"
    • priority = 1
    • security_group_id = (known after apply)
    • type = "ingress"
      }

alicloud_security_group_rule.allow_c_class_ingress will be created

  • resource "alicloud_security_group_rule" "allow_c_class_ingress" {
    • cidr_ip = "192.168.0.0/16"
    • id = (known after apply)
    • ip_protocol = "tcp"
    • nic_type = "intranet"
    • policy = "accept"
    • port_range = "1/65535"
    • priority = 1
    • security_group_id = (known after apply)
    • type = "ingress"
      }

alicloud_vpc.vpc will be created

  • resource "alicloud_vpc" "vpc" {
    • cidr_block = "172.16.0.0/16"
    • id = (known after apply)
    • name = (known after apply)
    • resource_group_id = (known after apply)
    • route_table_id = (known after apply)
    • router_id = (known after apply)
    • router_table_id = (known after apply)
      }

alicloud_vswitch.vsw will be created

  • resource "alicloud_vswitch" "vsw" {
    • availability_zone = "us-east-1a"
    • cidr_block = "172.16.0.0/24"
    • id = (known after apply)
    • vpc_id = (known after apply)
      }

alicloud_vswitch.vsw2 will be created

  • resource "alicloud_vswitch" "vsw2" {
    • availability_zone = "us-east-1b"
    • cidr_block = "172.16.8.0/24"
    • id = (known after apply)
    • vpc_id = (known after apply)
      }

alicloud_vswitch.vsw_internal_A will be created

  • resource "alicloud_vswitch" "vsw_internal_A" {
    • availability_zone = "us-east-1a"
    • cidr_block = "172.16.1.0/24"
    • id = (known after apply)
    • vpc_id = (known after apply)
      }

alicloud_vswitch.vsw_internal_B will be created

  • resource "alicloud_vswitch" "vsw_internal_B" {
    • availability_zone = "us-east-1b"
    • cidr_block = "172.16.9.0/24"
    • id = (known after apply)
    • vpc_id = (known after apply)
      }

random_string.psk will be created

  • resource "random_string" "psk" {
    • id = (known after apply)
    • length = 16
    • lower = true
    • min_lower = 0
    • min_numeric = 0
    • min_special = 0
    • min_upper = 0
    • number = true
    • result = (known after apply)
    • special = true
    • upper = true
      }

random_string.random_name_post will be created

  • resource "random_string" "random_name_post" {
    • id = (known after apply)
    • length = 3
    • lower = true
    • min_lower = 3
    • min_numeric = 0
    • min_special = 0
    • min_upper = 0
    • number = true
    • result = (known after apply)
    • special = true
    • upper = true
      }

Plan: 40 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.

Enter a value: yes

random_string.random_name_post: Creating...
random_string.psk: Creating...
random_string.random_name_post: Creation complete after 0s [id=jvb]
random_string.psk: Creation complete after 0s [id=?fppWD{oY78!=1P3]
alicloud_ram_role.ram_role: Creating...
alicloud_ram_policy.policy_vpc: Creating...
alicloud_log_project.aafailoverLogging: Creating...
alicloud_vpc.vpc: Creating...
data.template_file.setupPrimary: Refreshing state...
data.template_file.setupSecondary: Refreshing state...
alicloud_ram_role.ram_role: Creation complete after 0s [id=FortiGateAAFailover-FunctionCompute-Role-jvb]
alicloud_log_project.aafailoverLogging: Creation complete after 9s [id=fortigate-aafailover-log-jvb]
alicloud_log_store.aafailoverLogging-Store: Creating...
alicloud_ram_policy.policy_vpc: Creation complete after 9s [id=FortiGateAAFailover-function-vpc-policy-jvb]
alicloud_ram_role_policy_attachment.attach_vpc: Creating...
alicloud_vpc.vpc: Still creating... [10s elapsed]
alicloud_ram_role_policy_attachment.attach_vpc: Creation complete after 9s [id=role:FortiGateAAFailover-function-vpc-policy-jvb:Custom:FortiGateAAFailover-FunctionCompute-Role-jvb]
alicloud_log_store.aafailoverLogging-Store: Still creating... [10s elapsed]
alicloud_vpc.vpc: Creation complete after 19s [id=vpc-0xi53y556bifmyu0relbq]
alicloud_route_table.custom_route_tables[0]: Creating...
alicloud_security_group.SecGroup_FC: Creating...
alicloud_vswitch.vsw2: Creating...
alicloud_route_table.custom_route_tables[1]: Creating...
alicloud_security_group.SecGroup: Creating...
alicloud_vswitch.vsw_internal_A: Creating...
alicloud_vswitch.vsw: Creating...
alicloud_vswitch.vsw_internal_B: Creating...
alicloud_log_store.aafailoverLogging-Store: Creation complete after 10s [id=fortigate-aafailover-log-jvb:aa-failoverlog-store-jvb]
alicloud_log_store_index.log_store_index: Creating...
alicloud_ram_policy.policy: Creating...
alicloud_route_table.custom_route_tables[0]: Still creating... [10s elapsed]
alicloud_security_group.SecGroup_FC: Still creating... [10s elapsed]
alicloud_vswitch.vsw2: Still creating... [10s elapsed]
alicloud_route_table.custom_route_tables[1]: Still creating... [10s elapsed]
alicloud_security_group.SecGroup: Still creating... [10s elapsed]
alicloud_vswitch.vsw_internal_A: Still creating... [10s elapsed]
alicloud_vswitch.vsw: Still creating... [10s elapsed]
alicloud_vswitch.vsw_internal_B: Still creating... [10s elapsed]
alicloud_log_store_index.log_store_index: Still creating... [10s elapsed]
alicloud_ram_policy.policy: Still creating... [10s elapsed]
alicloud_route_table.custom_route_tables[1]: Creation complete after 11s [id=vtb-0xi7clg793zmhhahhg14t]
alicloud_route_table.custom_route_tables[0]: Creation complete after 13s [id=vtb-0xijy64smrf60sj604ubp]
alicloud_ram_policy.policy: Creation complete after 13s [id=FortiGateAAFailover-Logging-Policy-jvb]
alicloud_ram_role_policy_attachment.attach: Creating...
alicloud_security_group.SecGroup_FC: Creation complete after 13s [id=sg-0xi8gn2ubhqlhoo12jde]
alicloud_security_group_rule.allow_b_class_ingress: Creating...
alicloud_security_group_rule.allow_c_class_ingress: Creating...
alicloud_security_group_rule.allow_a_class_ingress: Creating...
alicloud_security_group.SecGroup: Creation complete after 13s [id=sg-0xie0fhnb46g4n5zowfy]
alicloud_security_group_rule.allow_all_tcp_egress_FC: Creating...
alicloud_vswitch.vsw: Creation complete after 14s [id=vsw-0xio6txf0ywzucq4d2472]
alicloud_security_group_rule.allow_all_tcp_egress: Creating...
alicloud_log_store_index.log_store_index: Creation complete after 19s [id=fortigate-aafailover-log-jvb:aa-failoverlog-store-jvb]
alicloud_security_group_rule.allow_all_tcp_ingress: Creating...
alicloud_vswitch.vsw_internal_B: Creation complete after 19s [id=vsw-0xinta29ynfncxl1go38w]
alicloud_network_interface.SecondaryFortigateInterface: Creating...
alicloud_vswitch.vsw2: Creation complete after 19s [id=vsw-0xifrwrz3yb8qgw3y5oub]
alicloud_fc_service.fortigate-failover-service: Creating...
alicloud_vswitch.vsw_internal_A: Creation complete after 19s [id=vsw-0xiw0o9zf44758gucy8uf]
alicloud_network_interface.PrimaryFortiGateInterface: Creating...
alicloud_ram_role_policy_attachment.attach: Creation complete after 10s [id=role:FortiGateAAFailover-Logging-Policy-jvb:Custom:FortiGateAAFailover-FunctionCompute-Role-jvb]
alicloud_route_table_attachment.custom_route_table_attachment_private[0]: Creating...
alicloud_security_group_rule.allow_b_class_ingress: Still creating... [10s elapsed]
alicloud_security_group_rule.allow_c_class_ingress: Still creating... [10s elapsed]
alicloud_security_group_rule.allow_a_class_ingress: Still creating... [10s elapsed]
alicloud_security_group_rule.allow_all_tcp_egress_FC: Still creating... [10s elapsed]
alicloud_security_group_rule.allow_all_tcp_egress: Still creating... [10s elapsed]
alicloud_security_group_rule.allow_all_tcp_ingress: Still creating... [10s elapsed]
alicloud_network_interface.SecondaryFortigateInterface: Still creating... [10s elapsed]
alicloud_fc_service.fortigate-failover-service: Still creating... [10s elapsed]
alicloud_network_interface.PrimaryFortiGateInterface: Still creating... [10s elapsed]
alicloud_security_group_rule.allow_a_class_ingress: Creation complete after 20s [id=sg-0xi8gn2ubhqlhoo12jde:ingress:tcp:1/65535:intranet:10.10.0.0/8:accept:1]
alicloud_route_table_attachment.custom_route_table_attachment_private[1]: Creating...
alicloud_security_group_rule.allow_c_class_ingress: Creation complete after 20s [id=sg-0xi8gn2ubhqlhoo12jde:ingress:tcp:1/65535:intranet:192.168.0.0/16:accept:1]
alicloud_security_group_rule.allow_b_class_ingress: Creation complete after 20s [id=sg-0xi8gn2ubhqlhoo12jde:ingress:tcp:1/65535:intranet:172.16.0.0/12:accept:1]
alicloud_security_group_rule.allow_all_tcp_egress_FC: Creation complete after 20s [id=sg-0xi8gn2ubhqlhoo12jde:egress:tcp:1/65535:intranet:0.0.0.0/0:accept:1]
alicloud_security_group_rule.allow_all_tcp_egress: Creation complete after 19s [id=sg-0xie0fhnb46g4n5zowfy:egress:tcp:1/65535:intranet:0.0.0.0/0:accept:1]
alicloud_route_table_attachment.custom_route_table_attachment_private[0]: Still creating... [10s elapsed]
alicloud_security_group_rule.allow_all_tcp_ingress: Creation complete after 15s [id=sg-0xie0fhnb46g4n5zowfy:ingress:tcp:1/65535:intranet:0.0.0.0/0:accept:1]
alicloud_network_interface.SecondaryFortigateInterface: Creation complete after 16s [id=eni-0xibii13xfxshx6tu4nz]
alicloud_instance.SecondaryFortigate: Creating...
alicloud_fc_service.fortigate-failover-service: Still creating... [20s elapsed]
alicloud_network_interface.PrimaryFortiGateInterface: Still creating... [20s elapsed]
alicloud_route_table_attachment.custom_route_table_attachment_private[1]: Still creating... [10s elapsed]
alicloud_route_table_attachment.custom_route_table_attachment_private[0]: Still creating... [20s elapsed]
alicloud_instance.SecondaryFortigate: Still creating... [10s elapsed]
alicloud_network_interface.PrimaryFortiGateInterface: Creation complete after 28s [id=eni-0xib0h4jnr2zo7dcq4k2]
alicloud_instance.PrimaryFortigate: Creating...
alicloud_route_entry.custom_route_table_egress[1]: Creating...
alicloud_route_entry.custom_route_table_egress[0]: Creating...
alicloud_fc_service.fortigate-failover-service: Creation complete after 29s [id=FortiGateAAFailover-jvb]
alicloud_route_table_attachment.custom_route_table_attachment_private[0]: Creation complete after 25s [id=vtb-0xijy64smrf60sj604ubp:vsw-0xiw0o9zf44758gucy8uf]
alicloud_route_table_attachment.custom_route_table_attachment_private[1]: Creation complete after 17s [id=vtb-0xi7clg793zmhhahhg14t:vsw-0xinta29ynfncxl1go38w]
alicloud_instance.SecondaryFortigate: Still creating... [20s elapsed]
alicloud_instance.PrimaryFortigate: Still creating... [10s elapsed]
alicloud_route_entry.custom_route_table_egress[1]: Still creating... [10s elapsed]
alicloud_route_entry.custom_route_table_egress[0]: Still creating... [10s elapsed]
alicloud_route_entry.custom_route_table_egress[0]: Creation complete after 16s [id=vtb-0xijy64smrf60sj604ubp:vrt-0ximhbn4muf0ofi2k8fw7:0.0.0.0/0:NetworkInterface:eni-0xib0h4jnr2zo7dcq4k2]
alicloud_route_entry.custom_route_table_egress[1]: Creation complete after 16s [id=vtb-0xi7clg793zmhhahhg14t:vrt-0ximhbn4muf0ofi2k8fw7:0.0.0.0/0:NetworkInterface:eni-0xibii13xfxshx6tu4nz]
alicloud_instance.SecondaryFortigate: Still creating... [30s elapsed]
alicloud_instance.PrimaryFortigate: Still creating... [20s elapsed]
alicloud_instance.SecondaryFortigate: Still creating... [40s elapsed]
alicloud_instance.PrimaryFortigate: Still creating... [30s elapsed]
alicloud_instance.SecondaryFortigate: Still creating... [50s elapsed]
alicloud_instance.PrimaryFortigate: Still creating... [40s elapsed]
alicloud_instance.SecondaryFortigate: Still creating... [1m0s elapsed]
alicloud_instance.PrimaryFortigate: Creation complete after 48s [id=i-0xie0fhnb46g4n64usae]
alicloud_network_interface_attachment.PrimaryFortigateattachment: Creating...
alicloud_network_interface_attachment.PrimaryFortigateattachment: Creation complete after 6s [id=eni-0xib0h4jnr2zo7dcq4k2:i-0xie0fhnb46g4n64usae]
alicloud_instance.SecondaryFortigate: Creation complete after 1m7s [id=i-0xig97usfwprwl27xxce]
alicloud_fc_function.fortigate-AA-Failover: Creating...
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Creating...
alicloud_fc_function.fortigate-AA-Failover: Still creating... [10s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [10s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [20s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [20s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [30s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [30s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [40s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [40s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [50s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [50s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [1m0s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [1m0s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [1m10s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [1m10s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [1m20s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [1m20s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [1m30s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [1m30s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [1m40s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [1m40s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [1m50s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [1m50s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [2m0s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [2m0s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [2m10s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [2m10s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [2m20s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [2m20s elapsed]
alicloud_fc_function.fortigate-AA-Failover: Still creating... [2m30s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Still creating... [2m30s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Creation complete after 2m34s [id=eni-0xibii13xfxshx6tu4nz:i-0xig97usfwprwl27xxce]

Error: [ERROR] terraform-provider-alicloud/alicloud/resource_alicloud_fc_function.go:173: Resource alicloud_fc_function CreateFunction Failed!!! [SDK fc-go-sdk ERROR]:
timeout while waiting for state to become 'success' (timeout: 2m0s)

on main.tf line 304, in resource "alicloud_fc_function" "fortigate-AA-Failover":
304: resource "alicloud_fc_function" "fortigate-AA-Failover" {

shell@Alicloud:~/fortigate-ha$
`

403 Access Denied "ErrorMessage": "The service or function doesn't belong to you."

I am only using RAM account with ECS,VPC,LOG,FC privilege and created access-key/id to deploy terraform file. however, I met "403 The service or function does not belong to you" error messages.
the aliyun document said, to use FC, you have to use you aliyuncloud ID instead of a RAM account.
how can I workaround this issue if I only have RAM account ?

alicloud_network_interface_attachment.SecondaryFortigateAttachment: Creating...
alicloud_fc_service.fortigate-failover-service: Still creating... [1m0s elapsed]
alicloud_instance.PrimaryFortigate: Still creating... [1m0s elapsed]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Creation complete after 5s [id=eni-0xi6dtet037kz3yvrh02:i-0xib0h4jnr2y1o4a3p2m]
alicloud_instance.PrimaryFortigate: Creation complete after 1m2s [id=i-0xicxeoha1g2ai0w816g]
alicloud_network_interface_attachment.PrimaryFortigateattachment: Creating...
alicloud_network_interface_attachment.PrimaryFortigateattachment: Creation complete after 4s [id=eni-0xi6lt03725e73n60j1t:i-0xicxeoha1g2ai0w816g]
alicloud_fc_service.fortigate-failover-service: Still creating... [1m10s elapsed]
alicloud_fc_service.fortigate-failover-service: Still creating... [1m20s elapsed]
alicloud_fc_service.fortigate-failover-service: Still creating... [1m30s elapsed]
alicloud_fc_service.fortigate-failover-service: Still creating... [1m40s elapsed]
alicloud_fc_service.fortigate-failover-service: Still creating... [1m50s elapsed]
alicloud_fc_service.fortigate-failover-service: Still creating... [2m0s elapsed]

Error: [ERROR] terraform-provider-alicloud/alicloud/resource_alicloud_fc_service.go:157: Resource alicloud_fc_service CreateService Failed!!! [SDK fc-go-sdk ERROR]:
{
"HttpStatus": 403,
"RequestId": "b578f28b-0594-4187-8758-2fb2f418ca25",
"ErrorCode": "AccessDenied",
"ErrorMessage": "The service or function doesn't belong to you."

about the traffic symmetric

Hi Sir
wo have three questions about this architecture
1、how to enforce symmetric return ? enable snat ?
2、i deploy this architecture have to use Terraform script ? may i setup two the standalone firewalls and manual set up HA?
3、how to sync the configuration and session between the both firewalls ?

prepackage fuction code for end user

Customer hope if we can prepackage callHealthCheck.zip and failoverAAindex.zip, customer want to run the terraform and they need to run package.json first, but we havn't document for it now.

"ErrorMessage": "VSwitch 'vsw-j6ch6iui7d25x1hvw4x0r' is in unsupported zone 'cn-hongkong-b'

I am trying to deploy Fortigate AA in regon hongkong. It end with up an error messages

p.s in the vars.tf file . I modified instance_ami to the corresponding region.

variable "instance_ami" {
type = string
#default = "m-0xif6xxwhjlqhoaqjrr6"
default = "m-j6c1vzhmpllrt703ln0b"

"ErrorMessage": "VSwitch 'vsw-j6ch6iui7d25x1hvw4x0r' is in unsupported zone 'cn-hongkong-b' (allowed zones: cn-hongkong-c)"

I checked cn-hongkong-b zone. It do have this switch. But not know why Errormessages say it is unsupported zone.

shell@Alicloud:/fortigate-ha$ aliyun vpc DescribeVSwitches | jq '.VSwitches.VSwitch[] | "(.VSwitchId) (.ZoneId)"' | grep vsw-j6ch6iui7d25x1hvw4x0r
"vsw-j6ch6iui7d25x1hvw4x0r cn-hongkong-b"
shell@Alicloud:
/fortigate-ha$

see full log below.

shell@Alicloud:~/fortigate-ha$ terraform apply
random_string.psk: Refreshing state... [id=9@0[1!$h{3S2dB[u]
random_string.random_name_post: Refreshing state... [id=gui]
alicloud_ram_policy.policy_vpc: Refreshing state... [id=FortiGateAAFailover-function-vpc-policy-gui]
data.alicloud_account.current: Refreshing state...
data.alicloud_regions.current_region_ds: Refreshing state...
alicloud_vpc.vpc: Refreshing state... [id=vpc-j6c1i27qprokf9el9n24e]
alicloud_ram_role.ram_role: Refreshing state... [id=FortiGateAAFailover-FunctionCompute-Role-gui]
alicloud_log_project.aafailoverLogging: Refreshing state... [id=fortigate-aafailover-log-gui]
data.alicloud_images.ecs_image: Refreshing state...
data.alicloud_instance_types.types_ds: Refreshing state...
data.alicloud_zones.default: Refreshing state...
data.template_file.setupPrimary: Refreshing state...
data.template_file.setupSecondary: Refreshing state...
alicloud_ram_role_policy_attachment.attach_vpc: Refreshing state... [id=role:FortiGateAAFailover-function-vpc-policy-gui:Custom:FortiGateAAFailover-FunctionCompute-Role-gui]
alicloud_log_store.aafailoverLogging-Store: Refreshing state... [id=fortigate-aafailover-log-gui:aa-failoverlog-store-gui]
alicloud_route_table.custom_route_tables[0]: Refreshing state... [id=vtb-j6cdqjgud8u7i28qes48n]
alicloud_route_table.custom_route_tables[1]: Refreshing state... [id=vtb-j6ck9zivjqtg7y18v8jz2]
alicloud_security_group.SecGroup_FC: Refreshing state... [id=sg-j6ce1ke70d9i54bifnip]
alicloud_vswitch.vsw2: Refreshing state... [id=vsw-j6csgegw97i68hb2kmvi3]
alicloud_vswitch.vsw: Refreshing state... [id=vsw-j6ch6iui7d25x1hvw4x0r]
alicloud_vswitch.vsw_internal_A: Refreshing state... [id=vsw-j6ct7r8vbaorgqp43ylm2]
alicloud_vswitch.vsw_internal_B: Refreshing state... [id=vsw-j6cvh4pxiil3ui56ouirc]
alicloud_security_group.SecGroup: Refreshing state... [id=sg-j6c5ew3n85euf1pdbtoz]
alicloud_log_store_index.log_store_index: Refreshing state... [id=fortigate-aafailover-log-gui:aa-failoverlog-store-gui]
alicloud_ram_policy.policy: Refreshing state... [id=FortiGateAAFailover-Logging-Policy-gui]
alicloud_security_group_rule.allow_all_tcp_egress: Refreshing state... [id=sg-j6c5ew3n85euf1pdbtoz:egress:tcp:1/65535:intranet:0.0.0.0/0:accept:1]
alicloud_security_group_rule.allow_all_tcp_ingress: Refreshing state... [id=sg-j6c5ew3n85euf1pdbtoz:ingress:tcp:1/65535:intranet:0.0.0.0/0:accept:1]
alicloud_security_group_rule.allow_c_class_ingress: Refreshing state... [id=sg-j6ce1ke70d9i54bifnip:ingress:tcp:1/65535:intranet:192.168.0.0/16:accept:1]
alicloud_security_group_rule.allow_a_class_ingress: Refreshing state... [id=sg-j6ce1ke70d9i54bifnip:ingress:tcp:1/65535:intranet:10.10.0.0/8:accept:1]
alicloud_security_group_rule.allow_b_class_ingress: Refreshing state... [id=sg-j6ce1ke70d9i54bifnip:ingress:tcp:1/65535:intranet:172.16.0.0/12:accept:1]
alicloud_security_group_rule.allow_all_tcp_egress_FC: Refreshing state... [id=sg-j6ce1ke70d9i54bifnip:egress:tcp:1/65535:intranet:0.0.0.0/0:accept:1]
alicloud_network_interface.PrimaryFortiGateInterface: Refreshing state... [id=eni-j6cfd1qug0hxgdtpeanc]
alicloud_network_interface.SecondaryFortigateInterface: Refreshing state... [id=eni-j6cecly8r9a9r9hrjyzf]
alicloud_route_table_attachment.custom_route_table_attachment_private[0]: Refreshing state... [id=vtb-j6cdqjgud8u7i28qes48n:vsw-j6ct7r8vbaorgqp43ylm2]
alicloud_route_table_attachment.custom_route_table_attachment_private[1]: Refreshing state... [id=vtb-j6ck9zivjqtg7y18v8jz2:vsw-j6cvh4pxiil3ui56ouirc]
alicloud_ram_role_policy_attachment.attach: Refreshing state... [id=role:FortiGateAAFailover-Logging-Policy-gui:Custom:FortiGateAAFailover-FunctionCompute-Role-gui]
alicloud_route_entry.custom_route_table_egress[0]: Refreshing state... [id=vtb-j6cdqjgud8u7i28qes48n:vrt-j6ccn8bkpx4ngo6u5i54v:0.0.0.0/0:NetworkInterface:eni-j6cfd1qug0hxgdtpeanc]
alicloud_route_entry.custom_route_table_egress[1]: Refreshing state... [id=vtb-j6ck9zivjqtg7y18v8jz2:vrt-j6ccn8bkpx4ngo6u5i54v:0.0.0.0/0:NetworkInterface:eni-j6cecly8r9a9r9hrjyzf]
alicloud_instance.SecondaryFortigate: Refreshing state... [id=i-j6ch4wa069moj2a1f3g5]
alicloud_instance.PrimaryFortigate: Refreshing state... [id=i-j6c6lt03725edmfqrp0d]
alicloud_network_interface_attachment.PrimaryFortigateattachment: Refreshing state... [id=eni-j6cfd1qug0hxgdtpeanc:i-j6c6lt03725edmfqrp0d]
alicloud_network_interface_attachment.SecondaryFortigateAttachment: Refreshing state... [id=eni-j6cecly8r9a9r9hrjyzf:i-j6ch4wa069moj2a1f3g5]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:

  • create

Terraform will perform the following actions:

alicloud_fc_function.fortigate-AA-Failover will be created

  • resource "alicloud_fc_function" "fortigate-AA-Failover" {
    • code_checksum = (known after apply)
    • description = "FortiGate aafailover - AliCloud Created by Terraform"
    • environment_variables = {
      • "ACCESS_KEY_ID" = " "
      • "ACCESS_KEY_SECRET" = " "
      • "ENDPOINT_ECS" = "https://ecs.aliyuncs.com"
      • "ENDPOINT_ESS" = "https://vpc.aliyuncs.com"
      • "PIN_TO" = "both"
      • "PRIMARY_FORTIGATE_ID" = "i-j6c6lt03725edmfqrp0d"
      • "PRIMARY_FORTIGATE_SEC_ENI" = "eni-j6cfd1qug0hxgdtpeanc"
      • "REGION" = "cn-hongkong"
      • "ROUTE_TABLE_ID" = "vtb-j6cdqjgud8u7i28qes48n,vtb-j6ck9zivjqtg7y18v8jz2,vtb-j6cf3seuj6xl0g5irp1mo"
      • "SECONDARY_FORTIGATE_ID" = "i-j6ch4wa069moj2a1f3g5"
      • "SECONDARY_FORTIGATE_SEC_ENI" = "eni-j6cecly8r9a9r9hrjyzf"
      • "managedby" = "Created with Terraform"
        }
    • filename = "./dist/failoverAAindex.zip"
    • function_id = (known after apply)
    • handler = "index.main"
    • id = (known after apply)
    • last_modified = (known after apply)
    • memory_size = 512
    • name = "Fortigate-AA-Failover-gui"
    • runtime = "nodejs8"
    • service = "FortiGateAAFailover-gui"
    • timeout = 500
      }

alicloud_fc_function.fortigate-callHealthCheck will be created

  • resource "alicloud_fc_function" "fortigate-callHealthCheck" {

alicloud_fc_service.fortigate-failover-service will be created

  • resource "alicloud_fc_service" "fortigate-failover-service" {
    • description = "Created by terraform"

    • id = (known after apply)

    • internet_access = true

    • last_modified = (known after apply)

    • name = "FortiGateAAFailover-gui"

    • role = "acs:ram::5498321147060270:role/fortigateaafailover-functioncompute-role-gui"

    • service_id = (known after apply)

    • log_config {

      • logstore = "aa-failoverlog-store-gui"
      • project = "fortigate-aafailover-log-gui"
        }
    • vpc_config {

      • security_group_id = "sg-j6ce1ke70d9i54bifnip"
      • vpc_id = (known after apply)
      • vswitch_ids = [
        • "vsw-j6ch6iui7d25x1hvw4x0r",
          ]
          }
          }

alicloud_fc_trigger.httptrigger will be created

  • resource "alicloud_fc_trigger" "httptrigger" {
    • config = jsonencode(
      {
      + authType = "anonymous"
      + enable = true
      + functionParameter = {
      + a = "b"
      + c = "d"
      }
      + jobConfig = {
      + maxRetryTime = 3
      + triggerInterval = 200
      }
      + logConfig = {
      + logstore = "aa-failoverlog-store-gui"
      + project = "fortigate-aafailover-log-gui"
      }
      + methods = [
      + "GET",
      + "POST",
      ]
      + sourceConfig = {
      + logstore = "project-for-fc"
      + project = "project-for-fc"
      }
      }
      )
    • function = "Fortigate-AA-Failover-gui"
    • id = (known after apply)
    • last_modified = (known after apply)
    • name = "HTTPTrigger"
    • service = "FortiGateAAFailover-gui"
    • trigger_id = (known after apply)
    • type = "http"
      }

alicloud_fc_trigger.timer will be created

  • resource "alicloud_fc_trigger" "timer" {
    • config = jsonencode(
      {
      + authType = "anonymous"
      + cronExpression = "@every 1m"
      + enable = true
      + functionParameter = {
      + a = "b"
      + c = "d"
      }
      + jobConfig = {
      + maxRetryTime = 3
      + triggerInterval = 60
      }
      + logConfig = {
      + logstore = "aa-failoverlog-store-gui"
      + project = "fortigate-aafailover-log-gui"
      }
      + methods = [
      + "GET",
      + "POST",
      ]
      + sourceConfig = {
      + logstore = "project-for-fc"
      + project = "project-for-fc"
      }
      }
      )
    • function = "Fortigate-callHealthCheck-gui"
    • id = (known after apply)
    • last_modified = (known after apply)
    • name = "CronTrigger"
    • service = "FortiGateAAFailover-gui"
    • trigger_id = (known after apply)
    • type = "timer"
      }

Plan: 5 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.

Enter a value: yes

alicloud_fc_service.fortigate-failover-service: Creating...

Error: [ERROR] terraform-provider-alicloud/alicloud/resource_alicloud_fc_service.go:157: Resource alicloud_fc_service CreateService Failed!!! [SDK fc-go-sdk ERROR]:
{
"HttpStatus": 400,
"RequestId": "e8aa362d-57e4-4e54-9738-ed588e8a321b",
"ErrorCode": "InvalidArgument",
"ErrorMessage": "VSwitch 'vsw-j6ch6iui7d25x1hvw4x0r' is in unsupported zone 'cn-hongkong-b' (allowed zones: cn-hongkong-c)"
}

on main.tf line 283, in resource "alicloud_fc_service" "fortigate-failover-service":
283: resource "alicloud_fc_service" "fortigate-failover-service" {

shell@Alicloud:/fortigate-ha$ aliyun vpc DescribeVSwitches | jq '.VSwitches.VSwitch[] | "(.VSwitchId) (.ZoneId)"' | grep vsw-j6ch6iui7d25x1hvw4x0r
"vsw-j6ch6iui7d25x1hvw4x0r cn-hongkong-b"
shell@Alicloud:
/fortigate-ha$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.