Sr. Content Developer at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
134977 stories
·
30 followers

Trump administration reportedly shutting down federal EV chargers nationwide

1 Share

The General Services Administration, the agency that manages buildings owned by the federal government, is planning to shut down its entire network of electric vehicle chargers, according to a report in The Verge. The GSA reportedly operates a network of hundreds of EV chargers with a total of 8,000 plugs that can be used to […]

© 2024 TechCrunch. All rights reserved. For personal use only.

Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Torvalds: Rust Kernel Code Isn't Forced In Over Maintainers' Objections

1 Share
Linus Torvalds responded Thursday to kernel developer Christoph Hellwig, who had claimed Torvalds merged Rust code into the kernel even over his objections as the original C code's maintainer. Highlights from Torvalds' response: The fact is, the pull request you objected to DID NOT TOUCH THE DMA LAYER AT ALL. It was literally just another user of it, in a completely separate subdirectory, that didn't change the code you maintain in _any_ way, shape, or form... Honestly, what you have been doing is basically saying "as a DMA maintainer I control what the DMA code is used for". And that is not how *any* of this works. What's next? Saying that particular drivers can't do DMA, because you don't like that device, and as a DMA maintainer you control who can use the DMA code? That's _literally_ exactly what you are trying to do with the Rust code. You are saying that you disagree with Rust — which is fine, nobody has ever required you to write or read Rust code. But then you take that stance to mean that the Rust code cannot even use or interface to code you maintain... You don't have to like Rust. You don't have to care about it. That's been made clear pretty much from the very beginning, that nobody is forced to suddenly have to learn a new language, and that people who want to work purely on the C side can very much continue to do so. So to get back to the very core of your statement: "The document claims no subsystem is forced to take Rust" that is very much true. You are not forced to take any Rust code, or care about any Rust code in the DMA code. You can ignore it... You can't have it both ways. You can't say "I want to have nothing to do with Rust", and then in the very next sentence say "And that means that the Rust code that I will ignore cannot use the C interfaces I maintain".... So when you change the C interfaces, the Rust people will have to deal with the fallout, and will have to fix the Rust bindings. That's kind of the promise here: there's that "wall of protection" around C developers that don't want to deal with Rust issues in the promise that they don't *have* to deal with Rust. But that "wall of protection" basically goes both ways. If you don't want to deal with the Rust code, you get no *say* on the Rust code. Put another way: the "nobody is forced to deal with Rust" does not imply "everybody is allowed to veto any Rust code". Torvalds also made sure to add some kind remarks, including "I respect you technically, and I like working with you."

Read more of this story at Slashdot.

Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Links For You (2/22/25)

1 Share

Happy Link Day... oh wait, that isn't a thing? Well, let's pretend it is. Those of us in Louisiana are in Mardi Gras season with the holiday itself coming up on March 4th. If the weather holds out, we'll be outside catching beads and listening to marching bands. It can be a lot of fun if it doesn't get rained out. It's also a great chance to eat some really bad (for you but yummy) food. I'll share a pic or two on the next edition of this post. Ok, on with the links!

Introducing AX (Agent Experience)

Mathias Biilmann (CEO at Netlify, they host this blog), wrote up an introduction to the idea of AX, or "agent experience". His post describes AX as the "expeirence" AI autonomous agents have with our sites and products. It's an interesting piece and be sure to read his follow up post as well.

On Being Laid Off

Ah, here's something I'm pretty familiar with (groan). Mert Bulan writes up his experience of a lay off and if you've never had the, err, "pleasure" of experiencing this, it's a great look into what it's like. This 'current' lay off for me was my third over thirty years in the business and it never gets any easier.

The Angular Documentary

Next up is an incredibly well done documentary about Angular, which for me was my first "real" JavaScript framework. I was a huge fan of it... initially... until the big update when everything (at least in my opinion) went off the rails in a major way. This was a really fascinating look at the history of Angular, and I have to be honest, it's really made me consider taking a look at it again later this year.

Play Video

Just For Fun

Nope, nothing to see here, nothing is fun and everything is terrible. Ok, that's dramatic. My buddy Brian Rinaldi recently shared a cool song with me and after enthusiastically telling my wife about it, she reminded me that both her and our eldest had recommended the same artist like a year ago. Oh well. Cool song and a cool video. Enjoy!

Play Video

Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Live Coding with GitHub Copilot Agent Mode, Next Edit Suggestions, and GPT-4o Copilot

1 Share


Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Random.Code() - Fixing a CSLA Serialization Issue, Part 2

1 Share
From: Jason Bock
Duration: 58:58
Views: 8

I think I have a solution for this, let's see if I get my test to pass now.

https://github.com/JasonBock/CslaGeneratorSerialization/issues/16

Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Terraform Power Moves: Unlocking Advanced Features for Smarter Infrastructure

1 Share

So, you’ve mastered Terraform basics, spun up some resources, and maybe even dabbled with modules. But what if I told you Terraform can do even more?

In this post, we’re going to explore Advanced Terraform Features that will make your infrastructure smarter, more dynamic, and easier to manage. We’ll cover:

  • Provisioners (for running scripts on resources)
  • Functions (for making configs dynamic)
  • Workspaces (for managing multiple environments)

Let’s go beyond the basics and Terraform like a pro!


1. Terraform Provisioners: Running Commands on Your Resources

Terraform provisioners allow you to execute scripts or commands on a resource after it’s been created.

Think of it as Terraform’s way of saying:

“Hey, I deployed your VM. Now, let me install Nginx on it.”

Example: Remote Provisioner (SSH into a VM & Install Nginx)

resource "azurerm_virtual_machine" "example" {
  name                  = "myVM"
  resource_group_name   = "myResourceGroup"
  location              = "East US"
  vm_size               = "Standard_DS1_v2"

  os_profile {
    computer_name  = "myVM"
    admin_username = "adminuser"
  }

  provisioner "remote-exec" {
    connection {
      type        = "ssh"
      user        = "adminuser"
      private_key = file("~/.ssh/id_rsa")
      host        = azurerm_public_ip.example.ip_address
    }

    inline = [
      "sudo apt-get update",
      "sudo apt-get install nginx -y"
    ]
  }
}

When to Use Provisioners (and When NOT to)

Good Use Cases:

  • Installing software on VMs after creation.
  • Running configuration scripts after resource deployment.

Bad Use Cases:

  • Managing infrastructure dependencies (use modules instead).
  • Orchestrating multiple servers (use Ansible or Chef for that).

Pro Tip: Use cloud-init or VM images instead of provisioners when possible.


2. Terraform Functions: Adding Logic to Your Configurations

Terraform functions allow you to manipulate data dynamically inside your configuration files. Think of them as Terraform’s built-in Swiss Army knife.

Example 1: Using join() to Create a Comma-Separated List

output "environments" {
  value = join(", ", ["dev", "staging", "prod"])
}

Output:

"dev, staging, prod"

Example 2: Using length() to Count Items in a List

output "vm_count" {
  value = length(["web1", "web2", "web3"])
}

Output:

3

Example 3: Conditional Logic with the lookup() Function

variable "environment" {
  default = "dev"
}

output "vm_size" {
  value = lookup(
    { dev = "Standard_DS1_v2", prod = "Standard_DS3_v2" },
    var.environment
  )
}

For environment = "prod", the output would be:

"Standard_DS3_v2"

💡 Pro Tip: Functions make your Terraform configs smarter and more adaptable!


3. Terraform Workspaces: Managing Multiple Environments

If you’re managing multiple environments (e.g., dev, staging, prod), Terraform workspaces let you use the same configuration but maintain separate state files.

Instead of maintaining separate folders, you can switch workspaces dynamically!

How to Use Workspaces

Step 1: Create a New Workspace

terraform workspace new dev

Step 2: Check Your Current Workspace

terraform workspace show

Step 3: Switch Workspaces

terraform workspace select prod

Example: Using Workspaces in Your Configuration

You can reference the workspace inside main.tf:

resource "azurerm_storage_account" "example" {
  name                     = "storage-${terraform.workspace}"
  resource_group_name      = "myResourceGroup"
  location                 = "East US"
  account_tier             = "Standard"
}

For the dev workspace, this would create:

storage-dev

For the prod workspace, this would create:

storage-prod

Workspaces keep environments separate without duplicating Terraform code!


4. Dynamic Configuration with Count & For-Each Loops

Terraform allows looping using count and for_each to create multiple resources dynamically.

Example: Creating Multiple VMs with count

resource "azurerm_virtual_machine" "example" {
  count = 3

  name                  = "web-${count.index}"
  resource_group_name   = "myResourceGroup"
  location              = "East US"
}

This will create:

web-0
web-1
web-2

Example: Using for_each with Maps

variable "vm_names" {
  default = {
    dev  = "web-dev"
    prod = "web-prod"
  }
}

resource "azurerm_virtual_machine" "example" {
  for_each = var.vm_names

  name                  = each.value
  resource_group_name   = "myResourceGroup"
}

This dynamically creates a VM for each environment!


Terraform Advanced Features: Quick Recap

FeatureWhat It Does
ProvisionersRun commands/scripts on resources after creation
FunctionsAdd logic & transformations (e.g., conditionals, string manipulation)
WorkspacesManage multiple environments easily
Count & For-EachDynamically create multiple resources

Wrapping Up

Now that you’ve unlocked Terraform’s advanced features, your infrastructure can be more flexible, automated, and efficient.

Quick Recap:

  • Provisioners automate post-deployment scripts.
  • Functions make your configurations dynamic.
  • Workspaces separate environments without duplicate code.
  • Loops (count & for_each) create multiple resources dynamically.

Now go Terraform like a boss!


What’s Next?

In the next post, we’ll tackle “Scaling Terraform Projects: Best Practices for Large-Scale Deployments”. Stay tuned!

The post Terraform Power Moves: Unlocking Advanced Features for Smarter Infrastructure appeared first on Chris Woody Woodruff.

Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories