Git Product home page Git Product logo

Comments (2)

nightmeng avatar nightmeng commented on July 18, 2024

@alvin-huang The 1.24.0 create a default VSwitch for your instance, but the 1.25.0 doesn't create the default VSwitch anymore, so VSwitch ID must be specified when you create instances, please try the following main.tf:

provider "alicloud" {
}

data "alicloud_zones" "zones_ds" {
  "available_instance_type" = "${var.instance_type}"
}

resource "alicloud_vpc" "vpc" {
  name       = "tf_test_foo"
  cidr_block = "172.16.0.0/12"
}

resource "alicloud_vswitch" "vsw" {
  vpc_id            = "${alicloud_vpc.vpc.id}"
  cidr_block        = "172.16.0.0/21"
  availability_zone = "${data.alicloud_zones.zones_ds.zones.0.id}"
}

resource "alicloud_security_group" "default" {
  name   = "default"
  description = "default"
  vpc_id = "${alicloud_vpc.vpc.id}"
}

resource "alicloud_instance" "test" {
  count           = 2
  image_id        = "${var.image_id}"
  instance_type   = "${var.instance_type}"
  security_groups = ["${alicloud_security_group.default.id}"]
  tags            = "${var.tag}"
  vswitch_id      = "${alicloud_vswitch.vsw.id}"
}

from terraform-provider-alicloud.

iamzhout avatar iamzhout commented on July 18, 2024

@alvin-huang I also encountered the same problem using latest terraform-provider-alicloud, and follow your suggestion switch back to 1.24.0 do resolve the problem. following https://github.com/terraform-providers/terraform-provider-alicloud/issues/648#issuecomment-453891799 's tf will resolve the problem.

from terraform-provider-alicloud.

Related Issues (20)

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.