Coder Social home page Coder Social logo

oracle / terraform-provider-oci Goto Github PK

View Code? Open in Web Editor NEW
726.0 114.0 668.0 418.74 MB

Terraform Oracle Cloud Infrastructure provider

Home Page: https://www.terraform.io/docs/providers/oci/

License: Mozilla Public License 2.0

Makefile 0.01% Go 98.59% Shell 0.02% HTML 1.11% HCL 0.26%
terraform bare-metal iaas orchestration oracle-cloud-infrastructure oci oracle-cloud terraform-provider oracle

terraform-provider-oci's Introduction

Terraform Provider for Oracle Cloud Infrastructure

The OCI Terraform Provider is now available for automatic download through the Terraform Provider Registry.

wercker status

Requirements

  • Terraform v0.12.31 or greater
  • Go 1.20.7 (recommended)

Building the Provider

Clone repository to: $GOPATH/src/terraform-provider-oci

$ mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/terraform-providers
$ git clone [email protected]:terraform-providers/terraform-provider-oci

Enter the provider directory and build the provider

$ cd $GOPATH/src/terraform-provider-oci
$ make build

Installation

If you're building the provider, follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it and begin using Terraform with the Oracle Cloud Infrastructure provider.

Troubleshooting the Provider

See verbose logging for the details.

Developing the Provider

To add features to the provider, install Go and configure your your GOPATH

Compile the provider by running make build. The provider binary will output to your $GOPATH/bin directory, make sure this has been added to your $PATH.

$ make build

To test the provider run make testacc.

$ make testacc

Note: The tests run against live OCI service APIs, you will need to configure environment variables with valid credientials as shown in the documentation.

Contributing

This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide

Security

Please consult the security guide for our responsible security vulnerability disclosure process

License

Copyright (c) 2017, 2024 Oracle and/or its affiliates.

Released under the Mozilla Public License 2.0

terraform-provider-oci's People

Contributors

abhilash-av avatar afedorch avatar alexng-canuck avatar bowfeng avatar briangustafson avatar craigcarl-oracle avatar dshelbyo avatar elg0nz avatar gotascii avatar govindrao55 avatar jotruon avatar kilokahn avatar maxrovr avatar meharwadedivya avatar mikejihbe avatar murphybytes avatar nagarajupasunuri avatar nagendranigade avatar parrneet avatar parweza avatar rashik-bhasin avatar ravinitp avatar rcohenma avatar sagarp337 avatar sahilg11 avatar srishtipmishra avatar tf-oci-pub avatar varmax2511 avatar vsin12 avatar zexinwanoci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-provider-oci's Issues

Add docs for vnic_attachment -

The vnic_attachment datasource lists all the VNICs in a compartment, it's the required first step to get the IP addresses attached to a VNIC. The datasource is implemented but not documented in ./docs/datasources/core.

Ability to extract dns name of subnet

Is there a way to extract the DNS domain name when creating an instance?

The DNS domain name is needed to access other hosts on that subnet.

For example, if i created a host on the "ad1" subnet of the okedev vcn, I'd like to be able to extract its ad1.okedev.oraclevcn.com DNS domain name.

DefaultRoutingTableID, default_routing_table_id

Multiple issues due to incorrect attribute/resource names.

All references to DefaultRoutingTableID should be DefaultRouteTableID
All references to default_routing_table_id should be default_route_table_id

Ability to extract public IP address

Is there a way to extract the public IP address when creating an instance?

The IP address is needed when running a remote provisioner.

E.g an AWS example

"${aws_instance.jenkins.public_ip}"

BMCS Provider with Chef Provisioner...?

Is it possible to nest chef provisioner or any other Terraform provisioner within the body of BMCS Provider resources?

For example such snippet seems to be not working. During resource creation both provisioners have been omitted...

resource "baremetal_core_instance" "terraform_webserver1" {
availability_domain = "${var.ADs[0]}"
compartment_id = "${baremetal_identity_compartment.terraform_compartment.id}"
display_name = "WebServer1"
image = "${var.Images[0]}"
shape = "${var.Shapes[0]}"
subnet_id = "${baremetal_core_subnet.terraform_Subnet1.id}"
metadata {
ssh_authorized_keys = "${var.ssh_auth_key2}"
}
provisioner "local-exec" {
command = "echo ${self.private_ip_address} > file.txt"
}
provisioner "chef" {
node_name = "terraform_webserver1"
server_url = "https://chefserver.ora1521.org/organizations/oraorg"
user_name = "ora1521"
user_key = "${file("/Users/lukaszfeldman/chef/ora1521.pem")}"
run_list = ["cookbook::recipe"]
}
}

Provider doesn't support data source: baremetal_identity_availability_domains

data "baremetal_identity_availability_domains" "t" {
compartment_ocid = "${var.compartment_ocid}"
}

-> i do see a data source for API Keys. But, I do not see an equivalent definition for availability_domains.
-> we need this because the availability domain string is unique for every tenancy. so, the current examples that refer to "Uocm" is specific to a tenancy and cannot be used for other tenancy.

Does not work with latest terraform (v0.8.8)

For some reason, I just can’t get terraform(v0.8.8) to execute even the simple example configuration

I followed all the steps for install terraform and BMCS terraform provider

When I execute terraform plan or apply I get the following error

$> terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but
will not be persisted to local or remote state storage.

Error refreshing state: 1 error(s) occurred:

  • asn1: structure error: tags don't match (2 vs {class:0 tag:16 length:13 isCompound:true}) {optional:false explicit:false application:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} @5

I ran again after setting TF_LOG=1

2017/03/08 23:23:14 [ERROR] root: eval: *terraform.EvalConfigProvider, err: asn1: structure error: tags don't match (2 vs {class:0 tag:16 length:13 isCompound:true}) {optional:false explicit:false application:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} @5
2017/03/08 23:23:14 [ERROR] root: eval: *terraform.EvalSequence, err: asn1: structure error: tags don't match (2 vs {class:0 tag:16 length:13 isCompound:true}) {optional:false explicit:false application:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} @5
2017/03/08 23:23:14 [ERROR] root: eval: *terraform.EvalOpFilter, err: asn1: structure error: tags don't match (2 vs {class:0 tag:16 length:13 isCompound:true}) {optional:false explicit:false application:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} @5
2017/03/08 23:23:14 [ERROR] root: eval: *terraform.EvalSequence, err: asn1: structure error: tags don't match (2 vs {class:0 tag:16 length:13 isCompound:true}) {optional:false explicit:false application:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} @5
2017/03/08 23:23:14 [TRACE] [walkRefresh] Exiting eval tree: provider.baremetal

Is there any workaround for the above?

error destroying configuartion with multiple baremetal_core_instance resources

terraform destroy errors out when destroying configurations that have multiple baremetal_core_instance resources. Error occurs after first instance is destroyed. Remaining instances are still active, have to repeat terraform destroy multiple times until all instances are destroyed.

$ terraform destroy
Do you really want to destroy?
  Terraform will delete all your managed infrastructure.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

baremetal_core_instance.instance2: Refreshing state... (ID: ocid1.instance.oc1.phx.abyhqljr2yvk6cavsz6hkwgqqostbfi7bsjyo5rhw6kvv7g6jvdfxghndmuq)
baremetal_core_instance.instance1: Refreshing state... (ID: ocid1.instance.oc1.phx.abyhqljrka6btiho5optjiw7rsoedf3hwhb44kpdxqsjtffwqsxauc23zbkq)
baremetal_core_instance.instance2: Destroying...
baremetal_core_instance.instance1: Destroying...
baremetal_core_instance.instance1: Still destroying... (10s elapsed)
baremetal_core_instance.instance1: Destruction complete
Error applying plan:

1 error(s) occurred:

* baremetal_core_instance.instance2: Code: InternalError; OPC Request ID: /0F13DC0365F64788B21EC38BE50E222E/2E072783CD0041A4A2F96FAF31860CF3; Message: Internal error occurred

private_key var?

What exactly should this - variable "private_key" {} TF var be? The full PEM key contents? Not sure here.

Trying to run the vcn.tf example and I get the following error:

Error refreshing state: 1 error(s) occurred:

* PEM data was not found in buffer

Any help appreciated. Thanks!

Timeout Error when creating Image

Seems like underlying SDK timeout for Available state is set too low for image creation. We should offer timeout and state we want to wait for as parameters to the appropriate resources (instance, image)

module.omc-server.baremetal_core_image.bootstrap_image: Still creating... (5m0s elapsed)
Error applying plan:

1 error(s) occurred:

  • baremetal_core_image.bootstrap_image: timeout while waiting for state to become 'AVAILABLE' (last state: 'PROVISIONING', timeout: 5m0s)

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Should load balancers require 2 subnets?

We've noticed that load balancers can be created in the API with a single subnet, but require two in the UI. Should the terraform provider require exactly 2 subnets when creating a load balancer?

VCN default_route_table_id documentation issue

The default route/routing table attribute of the baremetal_core_virtual_networks resource is documented to be 'default_route_table_id'. However, looking at the code, it looks like it should be 'default_routing_table_id'.

Adding Egress Security Rule Fails on Count #51

I can't seem to add more than 50 rules to my egress security list, up to 50 workes fine. I've tried various rule types (UCP,TCP,ICMP), the common factors seems to be that is trying to add rule #51. Output below.

baremetal_core_security_list.general-1: Modifying...
egress_security_rules.#: "50" => "51"
egress_security_rules.50.destination: "" => "10.10.10.10/29"
egress_security_rules.50.protocol: "" => "6"
egress_security_rules.50.stateless: "" => "false"
egress_security_rules.50.tcp_options.#: "0" => "1"
egress_security_rules.50.tcp_options.0.max: "" => "80"
egress_security_rules.50.tcp_options.0.min: "" => "80"
Error applying plan:

1 error(s) occurred:

  • baremetal_core_security_list.GIT-PHX-SEC-all-general-1: Code: InvalidParameter; OPC Request ID: /FF795C6670E746598F48106444F7396B/69A74C6FC78144CEB48AD642DA598B47; Message: The requested egress security rule count '51' is invalid for this request type.

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

* asn1: structure error: tags don't match (16 vs {class:2 tag:22 length:99 isCompound:true}) {optional:false explicit:false application:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2

When I am trying to execute VNC example I use to receive the error:

  • asn1: structure error: tags don't match (16 vs {class:2 tag:22 length:99 isCompound:true}) {optional:false explicit:false application:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2

Instance creation works fine.

Best,

Luke

baremetal_core_images doesn't support display_name

$ terraform plan .
There are warnings and/or errors related to your configuration. Please
fix these before continuing.
Errors:
  * data.baremetal_core_images.UbuntuImageOCID: : invalid or unknown key: display_name

with -

data "baremetal_core_images" "UbuntuImageOCID" {
  compartment_id = "${var.compartment_ocid}"
  display_name = "Ubuntu"
  operating_system = "Ubuntu"
  operating_system_version = "16.04"
}

works with -

data "baremetal_core_images" "UbuntuImageOCID" {
  compartment_id = "${var.compartment_ocid}"
  operating_system = "Ubuntu"
  operating_system_version = "16.04"
}

Provider should source credentials from the config file -

If ~/.oraclebmc/config exists and the configuration doesn't specify alternative credentials then the provider should source credentials from .oraclebmc/config.

Example config file is here - https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm

Config files support the concept of profiles. We should support a variable (obmcs_profile??) that can optionally be set to the profile to be used. If a TF configuration doesn't specify a profile then use [DEFAULT].

Missing API coverage -

After an audit we have identified some missing API coverage -

GetDBSystem Datasource
Cpe update
Drg update
DrgAttachment update
Ipsec Connection update
Subnet update
VCN update
Policy list datasource
SwiftPassword resource and datasource
User updateUserState Resource
User group membership datasource and resource

P2 to add coverage.

Load Balancers

Is the load balancing resource available via terraform, or do we have an ETA?

thx!

-marcus

Create subnet issue from teraform...

I've tested "complete_vcn" example for demo propose, but facing following issues below:

Error applying plan:

9 error(s) occurred:

  • baremetal_core_subnet.BastionSubnetAD2: Code: InternalError; OPC Request ID: /F46D517E7A2941B08E9419AA6DA808AE/E7C8A6A7C2F4469CAC2B31729C5A50A9; Message: Internal error occurred
  • baremetal_core_subnet.PrivateSubnetAD1: Code: InternalError; OPC Request ID: /1A857A362C03463A8832C6D4A7581954/923B66FEE0A74D45A310F67DC140D6E0; Message: Internal error occurred
  • baremetal_core_subnet.BastionSubnetAD3: Code: NotAuthorizedOrNotFound; OPC Request ID: /0FE07B59D5214C27A7114B7F3DB9B273/C0FB59F6A57E476AA6A47D82F1C84A55; Message: Either VCN with ID ocid1.vcn.oc1.phx.aaaaaaaavzzt3djeu4az2mxm3nn7t6wl4smncy7mpu7ldlghzsvkdd6wmx6a does not exist or you are not authorized to access it.
  • baremetal_core_subnet.WebSubnetAD1: Code: InternalError; OPC Request ID: /7181518A998F48A5AB9EF406F39F1D72/9123B3293D8E474297AC697DA0A68896; Message: Internal error occurred
  • baremetal_core_subnet.WebSubnetAD3: Code: InternalError; OPC Request ID: /A0FBA0B18C1E46D98BD2F0541E203EB1/9EBEAB3604CF483F89AF229D2F3D5C8F; Message: Internal error occurred
  • baremetal_core_subnet.PrivateSubnetAD2: Code: InternalError; OPC Request ID: /EB543571B69B4D7B953657D7F7E093E2/593CD696B9A94F1690C04065108C5A16; Message: Internal error occurred
  • baremetal_core_subnet.BastionSubnetAD1: Code: InternalError; OPC Request ID: /97FD414EC9464371BA3021B9B572608E/80CCAC3901AA4D4780DF0B68F6C5CE47; Message: Internal error occurred
  • baremetal_core_subnet.WebSubnetAD2: Code: InternalError; OPC Request ID: /C5ACC1D8FE684F66AA77C0B1D90FFE17/2EE38BFDBA0744F49FB0778120F96ACE; Message: Internal error occurred
  • baremetal_core_subnet.PrivateSubnetAD3: Code: InternalError; OPC Request ID: /60FB8F1B27714BC198AC293BBA32EBAA/898D91FC834F438893621FAC63A4C19F; Message: Internal error occurred

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

I'm using teraform version 0.8.8

Any suggest to sort this issue ?

Not able to add the stateless attribute to an ingress_security_rules

Not able to add the stateless attribute to an ingress_security_rules as commented out below

resource "baremetal_core_security_list" "WebSubnet" {
compartment_id = "${var.compartment_ocid}"
display_name = "Public"
vcn_id = "${baremetal_core_virtual_network.CompleteVCN.id}"
egress_security_rules = [{
destination = "0.0.0.0/0"
protocol = "6"
stateless = "true"
}]
ingress_security_rules = [{
tcp_options {
"max" = 80
"min" = 80
}
protocol = "6"
source = "0.0.0.0/0"
},
{
protocol = "6"
source = "${var.VPC-CIDR}"
# stateless = "true"
}]
}

Error asking for user input: 1 error(s) occurred: * provider.baremetal: Incompatible API version with plugin. Plugin version: 2, Ours: 4

For Unix
I've already create file ~/.terraformrc in Unix, but still get the error, here is my configuration:
[root@rac-omc2 ~]# pwd
/root
[root@rac-omc2 ~]# cat .terraformrc
providers {
baremetal = "/root/infra-code/terraform-provider-baremetal"
}

For Windows
I've already create file %APPDATA%/terraform.rc, but still get the error
Error loading CLI configuration:
Error parsing C:\Users\ckomrang\AppData\Roaming\terraform.rc: At 2:19: illegal char escape

Here's my teraform.rc
providers {
baremetal = "D:\infra-code\terraform-provider-baremetal.exe"
}

Any suggest for that?

Resource 'data.baremetal_core_vnic_attachments.master_node_vnics' does not have attribute 'vnic_attachments.0.vnic_id'

Scenario: launching multiple instances and trying to get the public_ip_address of each instance from the vnic data source. The following configuration fails with the error below on apply

variable "master_count" { default = 1 }

# Create the Master Nodes
resource "baremetal_core_instance" "master_node" {
  count = "${var.master_count}"
  availability_domain = "CxvG:PHX-AD-2"
  compartment_id = "${var.compartment_ocid}"
  display_name = "${format("master%1d", count.index + 1)}"
  image = "ocid1.image.oc1.phx.aaaaaaaaclseho77fcdfgejstt2bflkugcx5waa6bhconbokvhdp3qw7txlq"
  shape = "VM.Standard1.1"
  subnet_id = "ocid1.subnet.oc1.phx.aaaaaaaaiejsvcgvvmthx62fij6gvdlsrjmu3eczkwiusktz4axu4gel5q3q"
  metadata {
    ssh_authorized_keys = "${file("~/.ssh/id_rsa.pub")}"
  }
}

data "baremetal_core_vnic_attachments" "master_node_vnics" {
  count = "${var.master_count}"
  availability_domain = "CxvG:PHX-AD-2"
  compartment_id = "${var.compartment_ocid}"
  instance_id = "${element(baremetal_core_instance.master_node.*.id, count.index)}"
}

data "baremetal_core_vnic" "master_node_vnics" {
  count = "${var.master_count}"
  vnic_id = "${element(data.baremetal_core_vnic_attachments.master_node_vnics.*.vnic_attachments.0.vnic_id, count.index)}"
}
Error running plan: 1 error(s) occurred:

* Resource 'data.baremetal_core_vnic_attachments.master_node_vnics' does not have attribute 'vnic_attachments.*.vnic_id' for variable 'data.baremetal_core_vnic_attachments.master_node_vnics.*.vnic_attachments.0.vnic_id'

However, if the data "baremetal_core_vnic" "master_node_vnics" item is omitted on the first terraform apply, and then added to the config and terraform apply is run again - the configuration works okay and the data source data.baremetal_core_vnic_attachments.master_node_vnics.*.public_ip_address is available for use in additional config.

Multiple security_list_ids in baremetal_core_subnet Cause Subnet Resource to Add/Detroy Every Time

Multiple security_list_ids in baremetal_core_subnet Cause Subnet Resource to Add/Detroy Every Time, even with no changes. If I reorder the security_list_ids to what terraform is expecting (ie swap the pair) this seems to resolve the issue. There doesn't seem to be a pattern, but for longer seclists (2+), they pretty much guarantees the subnets/compute instances will rebuild on every apply. Also, what is the seclist number limit for resources?

Datasource Availability_Domains is not returning any values

The following compiles but does not return any values -

data "baremetal_identity_availability_domains" "ads" {
compartment_id = "${var.tenancy_ocid}"
}

output "ads" {
value = "${data.baremetal_identity_availability_domains.ads.name}"
}

Unable to assign custom DHCP Options to a subnet

Able to create custom DNS DHCP options, but not able to use dhcp_options_id attribute in the resource "baremetal_core_subnet"

resource "baremetal_core_dhcp_options" "DHCP-Options" {
compartment_id = "${var.compartment_ocid}"
vcn_id = "${baremetal_core_virtual_network.CompleteVCN.id}"
display_name = "Custom dhcp-1"
options {
type = "DomainNameServer"
server_type = "CustomDnsServer"
custom_dns_servers = [ "10.1.1.1","10.1.1.2","10.1.1.2" ]
}
}

resource "baremetal_core_subnet" "WebSubnetAD1" {
availability_domain = "${var.ADs[0]}"
cidr_block = "10.45.1.0/24"
display_name = "WebSubnetAD1"
dhcp_options_id = "${baremetal_core_dhcp_options.DHCP-Options.id}"
compartment_id = "${var.compartment_ocid}"
vcn_id = "${baremetal_core_virtual_network.CompleteVCN.id}"
route_table_id = "${baremetal_core_route_table.RouteForComplete.id}"
security_list_ids = ["${baremetal_core_security_list.WebSubnet.id}"]
}

$ terraform plan work/terraform
There are warnings and/or errors related to your configuration. Please
fix these before continuing.

Errors:

  • baremetal_core_subnet.WebSubnetAD1: : invalid or unknown key: dhcp_options_id

load balancer preview

The README says that the Load Balancer support is expected the first half of April 2017. Are there preview examples?

Datasource Images does not return any value

provider "baremetal" {
tenancy_ocid = "${var.tenancy_ocid}"
user_ocid = "${var.user_ocid}"
fingerprint = "${var.fingerprint}"
private_key_path = "${var.private_key_path}"
}

data "baremetal_core_images" "img" {
compartment_id = "${lookup(var.compartment, "tenancy")}"
}

output "image-names" {
value = ["${data.baremetal_core_images.img.display_name}"]
}

Re running apply to an exisiting config resets iscsi attachment.

Running plan against an existing config clearly states attachments will be reset

terraform plan

-/+ baremetal_core_volume_attachment.gitbmcblk000001-slot00-attach
attachment_type: "" => "iscsi" (forces new resource)

The apply does destroy the attachment resource and recreates causing a temporary disk outage within the instance. e.g /var/log/messages

Mar 27 21:49:29 oraclelinux kernel: sd 4:0:0:0: Warning! Received an indication that the LUN assignments on this target have cha nged. The Linux SCSI layer does not automatical
Mar 27 21:49:29 oraclelinux kernel: sd 4:0:0:0: [sdb] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
.........
ISCSI_ERR_TCP_CONN_CLOSE: TCP connection
Mar 27 21:49:59 oraclelinux kernel: XFS (sdb1): xfs_log_force: error -5 returned.
Mar 27 21:50:00 oraclelinux iscsid: connection3:0 is operational after recovery (13 attempts)

Mar 27 21:50:29 oraclelinux kernel: XFS (sdb1): xfs_log_force: error -5 returned.

Fix

The solution is to add the following lifecycle parameter to the attachment resource, however, is the default action to recreate the resource incorrect? A bug or intentional?

lifecycle {
ignore_changes = ["attachment_type"]
}

VCN default_ resources

Is there are resource to edit via terraform:

default_route_table_id
default_dhcp_options_id
default_security_list_id

Also:
default_routing_table_id need to be updated to default_route_table_id, this is noted in another ticket.

thx!

Need file() interpolation around file_private_key_path

From complete_vcn/complete_vcn.tf
...
variable "private_key_path" {}
...

provider "baremetal" {
tenancy_ocid = "${var.tenancy_ocid}"
user_ocid = "${var.user_ocid}"
fingerprint = "${var.fingerprint}"
private_key = "${file(var.private_key_path)}"
}

Cannot create route tables with empty rule

We want to create route table with empty rule, UI allows
creating the empty route tables without rules, so it seems that the API
allows the empty route rule when creating route table, but so far I am
not able to create the empty route table using terraform.

sh-4.1$ terraform plan complete_vcn
There are warnings and/or errors related to your configuration. Please
fix these before continuing.

Errors:

  • baremetal_core_route_table.RouteForBastion: "route_rules.0.cidr_block": required field is not set
  • baremetal_core_route_table.RouteForBastion: "route_rules.0.network_entity_id": required field is not set
    sh-4.1$

this is what I tried (removed the cidr_block and network_entity_id):
resource "baremetal_core_route_table" "RouteForBastion" {
compartment_id = "${var.compartment_ocid}"
vcn_id = "${baremetal_core_virtual_network.adminphx1.id}"
display_name = "bastion"
route_rules {
cidr_block = "0.0.0.0/0"
network_entity_id = "${baremetal_core_internet_gateway.adminphx1IG.id}"
}
}

* baremetal_core_virtual_network.a_TF_managed_VCN: unexpected EOF

I am running into this issue consistently across all the sample code I tried. Anything that I am doing wrong ?

  • baremetal_core_virtual_network.a_TF_managed_VCN: unexpected EOF
    2017/02/17 07:55:04 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

  • baremetal_core_virtual_network.a_TF_managed_VCN: unexpected EOF
    2017/02/17 07:55:04 [TRACE] [walkApply] Exiting eval tree: baremetal_core_virtual_network.a_TF_managed_VCN
    2017/02/17 07:55:04 [DEBUG] vertex "meta.count-boundary (count boundary fixup)", got dep: "baremetal_core_virtual_network.a_TF_managed_VCN"
    2017/02/17 07:55:04 [TRACE] Preserving existing state lineage "3edcbd6a-a5e0-4413-ab78-2b217c5774e3"
    2017/02/17 07:55:04 [TRACE] Preserving existing state lineage "3edcbd6a-a5e0-4413-ab78-2b217c5774e3"
    2017/02/17 07:55:04 [DEBUG] plugin: waiting for all plugin processes to complete...

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform1 so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

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.