Skip to content

Commit

Permalink
Merge pull request #57 from equinix/project-control
Browse files Browse the repository at this point in the history
remove unused project resource
  • Loading branch information
displague authored Mar 10, 2021
2 parents 0fe7380 + 8d43e8c commit a42062b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ jobs:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
TF_IN_AUTOMATION: 1
TF_VERSION: ${{ matrix.tf }}
# Switch to t3.small when available
TF_VAR_metal_compute-x86_type: "c3.small.x86"
TF_VAR_metal_controller_type: "c3.small.x86"
TF_VAR_metal_dashboard_type: "c3.small.x86"
# Let the project and sweeper actions manage the project
TF_VAR_metal_create_project: "false"
TF_VAR_metal_organization_id: ${{ secrets.METAL_ORGANIZATION_ID }}
# TODO only provide this to terraform steps that need it
Expand Down Expand Up @@ -58,7 +60,7 @@ jobs:
ssh-add <(echo $METAL_SSH_PRIVATE_KEY_BASE64 | base64 -d)
# Arrays of strings are hard to define via TF env vars (in yaml)
- run: |
echo 'metal_facilities = ["dfw2"]' > terraform.tfvars
echo 'metal_facilities = ["da11"]' > terraform.tfvars
echo 'metal_project_id = "${{ steps.project.outputs.projectID }}"' >> terraform.tfvars
- name: Terraform Plan
id: plan
Expand Down
4 changes: 0 additions & 4 deletions BareMetal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ resource "metal_project" "new_project" {
organization_id = var.metal_organization_id
}

resource "metal_project" "project" {
name = format("openstack-%s", random_id.cloud.b64_url)
}

provider "metal" {
auth_token = var.metal_auth_token
}
Expand Down
4 changes: 2 additions & 2 deletions ProviderNetwork.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
data "metal_precreated_ip_block" "private_ipv4" {

facility = metal_device.controller.deployed_facility
project_id = metal_project.project.id
project_id = local.metal_project_id
address_family = 4
public = false

Expand All @@ -24,7 +24,7 @@ resource "metal_ip_attachment" "controller_private_ipv4" {
data "metal_precreated_ip_block" "public_ipv6" {

facility = metal_device.controller.deployed_facility
project_id = metal_project.project.id
project_id = local.metal_project_id
address_family = 6
public = true

Expand Down

0 comments on commit a42062b

Please sign in to comment.