Skip to content
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 Flex instance shape support #49

Merged
merged 2 commits into from
Feb 18, 2021

Conversation

kral2
Copy link
Contributor

@kral2 kral2 commented Feb 15, 2021

Ideally, same module should allow for provisioning both flex and non flex (shape-based) instances.
Flex instance requires an additionnal shape_config block with specific parameters. See OCI provider documentation for details.

The solution needs for behave correctly with the fallback options.

Fix #42, #31

- update CHANGELOG for new feature
- add repo housekeeping options (pre-commit hooks, gitattributes)
@kral2 kral2 linked an issue Feb 15, 2021 that may be closed by this pull request
Add new output: instances_summary
Fix outputs (Issue oracle-terraform-modules#31)
@kral2 kral2 linked an issue Feb 16, 2021 that may be closed by this pull request
@kral2 kral2 requested a review from aorcl February 16, 2021 21:43
Copy link
Contributor

@aorcl aorcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
The file examples/instance_default/terraform.tfvars.template and the example snippet in the file examples/instance_default/README.md are missing the initialization of the variables assign_public_ip, instance_count

@aorcl
Copy link
Contributor

aorcl commented Feb 17, 2021

When trying to apply with assign_public_ip=true and instance_count=2, the errors are thrown
(edit: same error with instance_count=1 actually)

Error: work request did not succeed, workId: ocid1.coreservicesworkrequest.oc1.eu-frankfurt-1.abtheljtvz65owfd5dbokd5zqsgq63ur4nj72nklwhvt2eexuvp3j345qhxq, entity: instance, action: CREATED. Message: A problem occurred while preparing the instance's VNIC.  (Parameter 'availabilityDomain' does not match. VNIC has 'eu-frankfurt-1-ad-3' while the subnet has 'eu-frankfurt-1-ad-1')

  on ..\..\main.tf line 58, in resource "oci_core_instance" "this":
  58: resource "oci_core_instance" "this" {



Error: work request did not succeed, workId: ocid1.coreservicesworkrequest.oc1.eu-frankfurt-1.abtheljtcnunlsdl3iwdu7sfv3kpz23z5nmvwk7u32vussh2bznma3q7ov4a, entity: instance, action: CREATED. Message: A problem occurred while preparing the instance's VNIC.  (Parameter 'availabilityDomain' does not match. VNIC has 'eu-frankfurt-1-ad-3' while the subnet has 'eu-frankfurt-1-ad-1')

  on ..\..\main.tf line 58, in resource "oci_core_instance" "this":
  58: resource "oci_core_instance" "this" {

@aorcl
Copy link
Contributor

aorcl commented Feb 17, 2021

the file example/instance_default/instance_default.tf refers to the module as relative path in the same repo:
source = "../../"

Need to replace this with a reference to the registry.

@kral2
Copy link
Contributor Author

kral2 commented Feb 18, 2021

the file example/instance_default/instance_default.tf refers to the module as relative path in the same repo:
source = "../../"

Need to replace this with a reference to the registry.

Agree, it should be changed.
But this is a problem existing before and not in the scope of the current PR.

We should open a new issue for this point -> Issue #50

@kral2
Copy link
Contributor Author

kral2 commented Feb 18, 2021

Hello,
The file examples/instance_default/terraform.tfvars.template and the example snippet in the file examples/instance_default/README.md are missing the initialization of the variables assign_public_ip, instance_count

Pre-existing problem and not in the scope of this PR. This should be a distinct issue -> Issue #51

@kral2
Copy link
Contributor Author

kral2 commented Feb 18, 2021

When trying to apply with assign_public_ip=true and instance_count=2, the errors are thrown
(edit: same error with instance_count=1 actually)

Error: work request did not succeed, workId: ocid1.coreservicesworkrequest.oc1.eu-frankfurt-1.abtheljtvz65owfd5dbokd5zqsgq63ur4nj72nklwhvt2eexuvp3j345qhxq, entity: instance, action: CREATED. Message: A problem occurred while preparing the instance's VNIC.  (Parameter 'availabilityDomain' does not match. VNIC has 'eu-frankfurt-1-ad-3' while the subnet has 'eu-frankfurt-1-ad-1')

  on ..\..\main.tf line 58, in resource "oci_core_instance" "this":
  58: resource "oci_core_instance" "this" {



Error: work request did not succeed, workId: ocid1.coreservicesworkrequest.oc1.eu-frankfurt-1.abtheljtcnunlsdl3iwdu7sfv3kpz23z5nmvwk7u32vussh2bznma3q7ov4a, entity: instance, action: CREATED. Message: A problem occurred while preparing the instance's VNIC.  (Parameter 'availabilityDomain' does not match. VNIC has 'eu-frankfurt-1-ad-3' while the subnet has 'eu-frankfurt-1-ad-1')

  on ..\..\main.tf line 58, in resource "oci_core_instance" "this":
  58: resource "oci_core_instance" "this" {

It seems the issue is related to PR #46
Additional tests required to identify the exact conditions to reproduce the problem.
My current tests successfully provision instances with count 1 to 6 all with public IPs, on regional subnets.
Probably additional checks needed with ad-specific subnets -> Issue #52

@kral2 kral2 changed the title WIP add Flex instance shape support add Flex instance shape support Feb 18, 2021
@kral2 kral2 merged commit f2df914 into oracle-terraform-modules:dev Feb 18, 2021
@kral2 kral2 deleted the 42-add-flex-instance-shapes branch February 18, 2021 11:51
kral2 added a commit that referenced this pull request Mar 2, 2021
Fix #42 - Add possibility to create flex instance shapes
Fix #31 - Outputs produces unnecessarily multidimensional objects

Add new output: instances_summary
Add repo housekeeping options (pre-commit hooks, gitattributes)
@kral2 kral2 mentioned this pull request Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add possibility to create flex instance shapes Outputs produces unnecessarily multidimensional objects
2 participants