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

update workflow #7

Merged
merged 5 commits into from
Dec 20, 2024
Merged

update workflow #7

merged 5 commits into from
Dec 20, 2024

Conversation

iabhee
Copy link
Owner

@iabhee iabhee commented Dec 20, 2024

No description provided.

Copy link

github-actions bot commented Dec 20, 2024

Terraform Format and Style 🖌 success

Terraform Initialization ⚙️ success

Terraform Validation 🤖 ``

Validation Output


Terraform Plan 📖 success

Show Plan
Running plan in HCP Terraform. Output will stream here. Pressing Ctrl-C
will stop streaming the logs, but will not stop the plan running remotely.

Preparing the remote plan...

The remote workspace is configured to work with configuration at
./learn-terraform-vnet relative to the target repository.

Terraform will upload the contents of the following directory,
excluding files or directories as defined by a .terraformignore file
at /home/runner/work/learn-terraform/learn-terraform/.terraformignore (if it is present),
in order to capture the filesystem context the remote workspace expects:
    /home/runner/work/learn-terraform/learn-terraform

To view this run in a browser, visit:
https://app.terraform.io/app/ra-devops-org/learn-terraform/runs/run-1qfFUtGim3hRmbsY

Waiting for the plan to start...

Terraform v1.10.2
on linux_amd64
Initializing plugins and modules...
module.learn-terraform-vnet.data.http.public_ip: Refreshing...
data.http.public_ip: Refreshing...
data.http.public_ip: Refresh complete after 0s [id=https://api.ipify.org?format=json]
module.learn-terraform-vnet.data.http.public_ip: Refresh complete after 0s [id=https://api.ipify.org?format=json]
module.regions.data.azurerm_client_config.current: Refreshing...
module.regions.data.azurerm_client_config.current: Refresh complete after 0s [id=Y2xpZW50Q29uZmlncy9jbGllbnRJZD1jNjQ0MmMwYi1lNmI0LTRiYmQtOTNmMC03NmI4N2NlNjQxODg7b2JqZWN0SWQ9MzBlNjRhNTAtYTA3OC00YmVlLWE2MzMtOTZhOTUzMjRiMGNkO3N1YnNjcmlwdGlvbklkPWE1ZTZjMzU2LTdjMTItNGJkYS1iNzJmLTcyNmRlZGY2ZjcxYzt0ZW5hbnRJZD02MTAzN2NlOS05ZTQyLTRkYTUtODFlYS02NTg1NTc4YzUwYzQ=]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
 <= read (data resources)

Terraform will perform the following actions:

  # module.learn-terraform-vnet.azurerm_network_security_group.nsg["nsg-backend"] will be created
  + resource "azurerm_network_security_group" "nsg" {
      + id                  = (known after apply)
      + location            = "southcentralus"
      + name                = "nsg-backend"
      + resource_group_name = "learn-tf-rsg"
      + security_rule       = [
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "*"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "AllowInternalTraffic"
              + priority                                   = 200
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "10.0.0.0/16"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "8080"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "AllowFrontendToBackend"
              + priority                                   = 100
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "10.0.1.0/24"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Deny"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "*"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "DenyAllInbound"
              + priority                                   = 4096
              + protocol                                   = "*"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
        ]
      + tags                = {
          + "Environment" = "Terraform Getting Started"
          + "Team"        = "DevOps"
        }
    }

  # module.learn-terraform-vnet.azurerm_network_security_group.nsg["nsg-database"] will be created
  + resource "azurerm_network_security_group" "nsg" {
      + id                  = (known after apply)
      + location            = "southcentralus"
      + name                = "nsg-database"
      + resource_group_name = "learn-tf-rsg"
      + security_rule       = [
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "*"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "AllowInternalTraffic"
              + priority                                   = 200
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "10.0.0.0/16"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "1433"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "AllowBackendToDatabase"
              + priority                                   = 100
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "10.0.2.0/24"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Deny"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "*"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "DenyAllInbound"
              + priority                                   = 4096
              + protocol                                   = "*"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
        ]
      + tags                = {
          + "Environment" = "Terraform Getting Started"
          + "Team"        = "DevOps"
        }
    }

  # module.learn-terraform-vnet.azurerm_network_security_group.nsg["nsg-dmz"] will be created
  + resource "azurerm_network_security_group" "nsg" {
      + id                  = (known after apply)
      + location            = "southcentralus"
      + name                = "nsg-dmz"
      + resource_group_name = "learn-tf-rsg"
      + security_rule       = [
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "*"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "AllowInternalTraffic"
              + priority                                   = 200
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "10.0.0.0/16"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "AllowPublicToDMZ"
              + priority                                   = 100
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Deny"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "*"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "DenyAllInbound"
              + priority                                   = 4096
              + protocol                                   = "*"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
        ]
      + tags                = {
          + "Environment" = "Terraform Getting Started"
          + "Team"        = "DevOps"
        }
    }

  # module.learn-terraform-vnet.azurerm_network_security_group.nsg["nsg-frontend"] will be created
  + resource "azurerm_network_security_group" "nsg" {
      + id                  = (known after apply)
      + location            = "southcentralus"
      + name                = "nsg-frontend"
      + resource_group_name = "learn-tf-rsg"
      + security_rule       = [
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "*"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "AllowInternalTraffic"
              + priority                                   = 200
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "10.0.0.0/16"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Allow"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "443"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "AllowInboundHTTPS"
              + priority                                   = 100
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "44.196.56.140"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
          + {
              + access                                     = "Deny"
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "*"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "DenyAllInbound"
              + priority                                   = 4096
              + protocol                                   = "*"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
                # (1 unchanged attribute hidden)
            },
        ]
      + tags                = {
          + "Environment" = "Terraform Getting Started"
          + "Team"        = "DevOps"
        }
    }

  # module.learn-terraform-vnet.azurerm_resource_group.resource_group_name will be created
  + resource "azurerm_resource_group" "resource_group_name" {
      + id       = (known after apply)
      + location = "southcentralus"
      + name     = "learn-tf-rsg"
      + tags     = {
          + "Environment" = "Terraform Getting Started"
          + "Team"        = "DevOps"
        }
    }

  # module.learn-terraform-vnet.azurerm_route_table.route_table["route_table_backend"] will be created
  + resource "azurerm_route_table" "route_table" {
      + bgp_route_propagation_enabled = (known after apply)
      + disable_bgp_route_propagation = (known after apply)
      + id                            = (known after apply)
      + location                      = "southcentralus"
      + name                          = "route_table_backend"
      + resource_group_name           = "learn-tf-rsg"
      + route                         = [
          + {
              + address_prefix         = "0.0.0.0/0"
              + name                   = "internet-route"
              + next_hop_type          = "Internet"
                # (1 unchanged attribute hidden)
            },
          + {
              + address_prefix         = "10.0.2.0/24"
              + name                   = "frontend-route"
              + next_hop_in_ip_address = "10.0.0.0"
              + next_hop_type          = "VirtualAppliance"
            },
        ]
      + subnets                       = (known after apply)
    }

  # module.learn-terraform-vnet.azurerm_route_table.route_table["route_table_database"] will be created
  + resource "azurerm_route_table" "route_table" {
      + bgp_route_propagation_enabled = (known after apply)
      + disable_bgp_route_propagation = (known after apply)
      + id                            = (known after apply)
      + location                      = "southcentralus"
      + name                          = "route_table_database"
      + resource_group_name           = "learn-tf-rsg"
      + route                         = [
          + {
              + address_prefix         = "0.0.0.0/0"
              + name                   = "internet-route"
              + next_hop_type          = "Internet"
                # (1 unchanged attribute hidden)
            },
          + {
              + address_prefix         = "10.0.3.0/24"
              + name                   = "backend-route"
              + next_hop_in_ip_address = "10.0.0.0"
              + next_hop_type          = "VirtualAppliance"
            },
        ]
      + subnets                       = (known after apply)
    }

  # module.learn-terraform-vnet.azurerm_route_table.route_table["route_table_frontend"] will be created
  + resource "azurerm_route_table" "route_table" {
      + bgp_route_propagation_enabled = (known after apply)
      + disable_bgp_route_propagation = (known after apply)
      + id                            = (known after apply)
      + location                      = "southcentralus"
      + name                          = "route_table_frontend"
      + resource_group_name           = "learn-tf-rsg"
      + route                         = [
          + {
              + address_prefix         = "0.0.0.0/0"
              + name                   = "internet-route"
              + next_hop_type          = "Internet"
                # (1 unchanged attribute hidden)
            },
          + {
              + address_prefix         = "10.0.1.0/24"
              + name                   = "backend-route"
              + next_hop_in_ip_address = "10.0.0.0"
              + next_hop_type          = "VirtualAppliance"
            },
        ]
      + subnets                       = (known after apply)
    }

  # module.learn-terraform-vnet.module.vnet.data.azurerm_client_config.this will be read during apply
 <= data "azurerm_client_config" "this" {
      + client_id       = (known after apply)
      + id              = (known after apply)
      + object_id       = (known after apply)
      + subscription_id = (known after apply)
      + tenant_id       = (known after apply)
    }

  # module.learn-terraform-vnet.module.vnet.azapi_resource.vnet will be created
  + resource "azapi_resource" "vnet" {
      + body                      = {
          + extendedLocation = null
          + properties       = {
              + addressSpace         = {
                  + addressPrefixes = [
                      + "10.0.0.0/16",
                    ]
                }
              + bgpCommunities       = null
              + ddosProtectionPlan   = null
              + dhcpOptions          = null
              + enableDdosProtection = false
              + enableVmProtection   = false
              + encryption           = null
              + flowTimeoutInMinutes = null
            }
        }
      + id                        = (known after apply)
      + ignore_casing             = false
      + ignore_missing_property   = true
      + location                  = "southcentralus"
      + name                      = "learn-tf-vnet"
      + output                    = (known after apply)
      + parent_id                 = (known after apply)
      + schema_validation_enabled = true
      + tags                      = {
          + "Environment" = "Terraform Getting Started"
          + "Team"        = "DevOps"
        }
      + type                      = "Microsoft.Network/virtualNetworks@2023-11-01"
    }

  # module.learn-terraform-vnet.module.vnet.module.subnet["apps-backend"].azapi_resource.subnet will be created
  + resource "azapi_resource" "subnet" {
      + body                      = {
          + properties = {
              + addressPrefix                     = null
              + addressPrefixes                   = [
                  + "10.0.2.0/24",
                ]
              + defaultOutboundAccess             = false
              + delegations                       = []
              + natGateway                        = null
              + networkSecurityGroup              = {
                  + id = (known after apply)
                }
              + privateEndpointNetworkPolicies    = "Disabled"
              + privateLinkServiceNetworkPolicies = "Disabled"
              + routeTable                        = {
                  + id = (known after apply)
                }
              + serviceEndpointPolicies           = null
              + serviceEndpoints                  = null
              + sharingScope                      = null
            }
        }
      + id                        = (known after apply)
      + ignore_casing             = false
      + ignore_missing_property   = true
      + location                  = (known after apply)
      + locks                     = [
          + (known after apply),
        ]
      + name                      = "learn-tf-apps-backend-sn"
      + output                    = (known after apply)
      + parent_id                 = (known after apply)
      + schema_validation_enabled = true
      + tags                      = (known after apply)
      + type                      = "Microsoft.Network/virtualNetworks/subnets@2023-11-01"
    }

  # module.learn-terraform-vnet.module.vnet.module.subnet["apps-database"].azapi_resource.subnet will be created
  + resource "azapi_resource" "subnet" {
      + body                      = {
          + properties = {
              + addressPrefix                     = null
              + addressPrefixes                   = [
                  + "10.0.3.0/24",
                ]
              + defaultOutboundAccess             = false
              + delegations                       = []
              + natGateway                        = null
              + networkSecurityGroup              = {
                  + id = (known after apply)
                }
              + privateEndpointNetworkPolicies    = "Disabled"
              + privateLinkServiceNetworkPolicies = "Disabled"
              + routeTable                        = {
                  + id = (known after apply)
                }
              + serviceEndpointPolicies           = null
              + serviceEndpoints                  = null
              + sharingScope                      = null
            }
        }
      + id                        = (known after apply)
      + ignore_casing             = false
      + ignore_missing_property   = true
      + location                  = (known after apply)
      + locks                     = [
          + (known after apply),
        ]
      + name                      = "learn-tf-apps-database-sn"
      + output                    = (known after apply)
      + parent_id                 = (known after apply)
      + schema_validation_enabled = true
      + tags                      = (known after apply)
      + type                      = "Microsoft.Network/virtualNetworks/subnets@2023-11-01"
    }

  # module.learn-terraform-vnet.module.vnet.module.subnet["apps-dmz"].azapi_resource.subnet will be created
  + resource "azapi_resource" "subnet" {
      + body                      = {
          + properties = {
              + addressPrefix                     = null
              + addressPrefixes                   = [
                  + "10.0.4.0/24",
                ]
              + defaultOutboundAccess             = false
              + delegations                       = []
              + natGateway                        = null
              + networkSecurityGroup              = {
                  + id = (known after apply)
                }
              + privateEndpointNetworkPolicies    = "Disabled"
              + privateLinkServiceNetworkPolicies = "Disabled"
              + routeTable                        = null
              + serviceEndpointPolicies           = null
              + serviceEndpoints                  = null
              + sharingScope                      = null
            }
        }
      + id                        = (known after apply)
      + ignore_casing             = false
      + ignore_missing_property   = true
      + location                  = (known after apply)
      + locks                     = [
          + (known after apply),
        ]
      + name                      = "learn-tf-apps-dmz-sn"
      + output                    = (known after apply)
      + parent_id                 = (known after apply)
      + schema_validation_enabled = true
      + tags                      = (known after apply)
      + type                      = "Microsoft.Network/virtualNetworks/subnets@2023-11-01"
    }

  # module.learn-terraform-vnet.module.vnet.module.subnet["apps-frontend"].azapi_resource.subnet will be created
  + resource "azapi_resource" "subnet" {
      + body                      = {
          + properties = {
              + addressPrefix                     = null
              + addressPrefixes                   = [
                  + "10.0.1.0/24",
                ]
              + defaultOutboundAccess             = false
              + delegations                       = []
              + natGateway                        = null
              + networkSecurityGroup              = {
                  + id = (known after apply)
                }
              + privateEndpointNetworkPolicies    = "Disabled"
              + privateLinkServiceNetworkPolicies = "Disabled"
              + routeTable                        = {
                  + id = (known after apply)
                }
              + serviceEndpointPolicies           = null
              + serviceEndpoints                  = null
              + sharingScope                      = null
            }
        }
      + id                        = (known after apply)
      + ignore_casing             = false
      + ignore_missing_property   = true
      + location                  = (known after apply)
      + locks                     = [
          + (known after apply),
        ]
      + name                      = "learn-tf-apps-frontend-sn"
      + output                    = (known after apply)
      + parent_id                 = (known after apply)
      + schema_validation_enabled = true
      + tags                      = (known after apply)
      + type                      = "Microsoft.Network/virtualNetworks/subnets@2023-11-01"
    }

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

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

@iabhee iabhee merged commit 3161474 into main Dec 20, 2024
1 check passed
@iabhee iabhee deleted the update_workflow_template branch December 20, 2024 19:47
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.

1 participant