Giter Club home page Giter Club logo

terraform-provider-fmc's Introduction

FMC Provider for terraform

Note: this Terraform provider is now publically available on the Terraform Registry.

This project is a terraform provider which interacts with the FMC APIs making it manageable statefully from terraform.

0. Prerequisites

Go ahead and install terraform on your machine. You can get more instructions for that here or directly download the relevant package here.

1. Installation - Development

Follow the below steps to add this provider to your terraform plugins directory. This is only needed for development. For normal use, let the terraform download it from Hashicorp registry.

  • Download the latest suitable release from Releases.
  • Follow the document here to install the same.
  • Install tfplugindocs and run "make generate" to regenerate provider documentation.

2. Usage

Note: Check examples for more detail.

  • Create a new folder anywhere suitable for the project
  • Create a file called main.tf and initialize the provider as shown
terraform {
  required_providers {
    fmc = {
      source = "CiscoDevNet/fmc"
      # version = "0.1.1"
    }
  }
}
  • Run terraform init in a terminal from the same folder. You should not see any errors and see the output similar to the one shown below:
Initializing the backend...

Initializing provider plugins...
- Finding latest version of ciscodevnet/fmc...
- Installing ciscodevnet/fmc v0.1.1...
- Installed ciscodevnet/fmc v0.1.1 (signed by a HashiCorp partner, key ID 6EC4A79DAB7CB6D0)

That's it! You have successfully installed the FMC terraform provider. Head on to examples to see what you can do with them! Provider documentation is present here.

Note: This new version 0.2.4 uses a different url for access policy get operation than before. It uses "name=xxx" instead of "filter=name:xxx" in its query parameters. Kindly verify the url for your version of access policy get operation before upgrading.

Tutorials

The Terraform Playlist: https://www.youtube.com/playlist?list=PLyf18hdY22ESR91vJtdvY_4CNAPMR04zP

Includes:

  • FMC: Terraform and FMC Create User Account (Part1)
  • FMC: Terraform and FMC Access Policy Creation (Part 2)
  • FMC: Terraform and FMC Access Policy and Rule Creation (Part 3)
  • FMC: Terraform and FMC Access Policy Device Assignment (Part 4)
  • FMC: Terraform and FMC Access Policy Device Deploy (Part 5)
  • FMC: Terraform and FMC URL Objects
  • FMC: Terraform and FMC URL Objects and URL Object Groups
  • FMC: Terraform and FMC Network Objects
  • FMC: Terraform and FMC Network Objects and Network Object Groups
  • FMC: Terraform and FMC Host Objects
  • FMC: Terraform and FMC Port Objects
  • FMC: Terraform and FMC Port Objects and Port Groups
  • FMC: Terraform and FMC Network Range Objects
  • FMC: Terraform and FMC ICMP Objects
  • FMC: Terraform and FMC FQDN Objects
  • FMC: Terraform and FMC NAT Policy
  • FMC: Terraform and FMC NAT Policy and Manual NAT Rules
  • FMC: Terraform and FMC NAT Policy and Auto NAT Rules

############# POWER VIDEO #############

FMC: Terraform and FMC Pulling it Together (Part 1 - The Code!) https://youtu.be/TvcuXP3Yn-0 In this video we will leverage Terraform to build out a dynamic lab that includes deployment of firepower policies and a web server using Ubuntu. We will create multiple objects to support access control policy and nat policy. Then we will create the access control policy, nat policy, assign to a device then push policy. We will delay by 10min the start time of the web server build in esxi to ensure all policies are in place which allows the web server to have controlled access to repos, youtube for the custom page. We will leverage cloud-config to add a user "Kali" to the box and their public key which allows SSH access. We will also update the box using apt-get, pull apache2, start the service and customize index.html.....part 1 covers the code used to automate the entire process. NO HANDS ON REQUIRED!

FMC: Terraform and FMC Pulling it Together (Part 2 - The Push!) https://youtu.be/fE9ZAzKNMVU Pushing out configuration and validation! NO HANDS ON REQUIRED!

FMC: Terraform and FMC Pulling it Together (Part 3 - The Destroy!) https://youtu.be/EOdwrnb0FfE DESTROYING all our hard work! NO HANDS ON REQUIRED!

terraform-provider-fmc's People

Contributors

adyanth avatar id27182 avatar shbharti89 avatar jeroenwittock avatar jeff-jackson avatar sameesin avatar jajohnst avatar kgreeshm avatar patrickcisco avatar sameer666 avatar nordbergdk avatar chrivand avatar

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.